From 5f557d5d437b32e1a44f2821144a4b7d4e3bc87d Mon Sep 17 00:00:00 2001 From: kashiuno Date: Tue, 28 Jan 2025 17:10:45 +0300 Subject: [PATCH] Initial commit --- .gitattributes | 3 + .gitignore | 38 + build.gradle.kts | 49 + gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 43583 bytes gradle/wrapper/gradle-wrapper.properties | 7 + gradlew | 252 + gradlew.bat | 94 + settings.gradle.kts | 1 + .../flow/generated-flow-imports.d.ts | 1 + .../generated/flow/generated-flow-imports.js | 12 + .../generated-flow-webcomponent-imports.js | 14 + .../generated/jar-resources/Flow.d.ts | 77 + .../frontend/generated/jar-resources/Flow.js | 394 + .../generated/jar-resources/Flow.js.map | 1 + .../jar-resources/FlowBootstrap.d.ts | 1 + .../generated/jar-resources/FlowBootstrap.js | 291 + .../generated/jar-resources/FlowClient.d.ts | 1 + .../generated/jar-resources/FlowClient.js | 1073 + .../ReactRouterOutletElement.tsx | 12 + .../jar-resources/comboBoxConnector.js | 277 + .../jar-resources/contextMenuConnector.js | 122 + .../contextMenuTargetConnector.js | 62 + .../generated/jar-resources/copilot.js | 1 + .../copilot/base-panel-CTLXjjmN.js | 24 + .../copilot-features-plugin-DArMO9Mk.js | 70 + .../copilot-feedback-plugin-B550SpdM.js | 168 + .../copilot-global-vars-later-UtaKiaeu.js | 159112 +++++++++++++++ .../copilot/copilot-info-plugin-DEhoYnCY.js | 241 + .../copilot/copilot-init-step2-tquZBMEC.js | 2655 + .../copilot/copilot-log-plugin-Dd9Vu3DN.js | 221 + .../copilot-shortcuts-plugin-Chva6DtS.js | 55 + .../jar-resources/copilot/copilot-xjoIJFQc.js | 5624 + .../jar-resources/copilot/icons-AkLm3oZf.js | 463 + .../copilot/overlay-monkeypatch-CXhp9hXg.js | 48 + .../jar-resources/copilot/state-9-chcL5F.js | 45 + .../jar-resources/datepickerConnector.js | 179 + .../jar-resources/disableOnClickFunctions.js | 14 + .../generated/jar-resources/dndConnector.js | 130 + .../jar-resources/flow-component-directive.js | 68 + .../jar-resources/flow-component-renderer.js | 208 + .../generated/jar-resources/gridConnector.ts | 1204 + .../generated/jar-resources/index.d.ts | 1 + .../frontend/generated/jar-resources/index.js | 2 + .../generated/jar-resources/index.js.map | 1 + .../generated/jar-resources/lit-renderer.ts | 112 + .../jar-resources/menubarConnector.js | 122 + .../jar-resources/messageListConnector.js | 33 + .../jar-resources/selectConnector.js | 19 + .../generated/jar-resources/theme-util.js | 175 + .../generated/jar-resources/tooltip.ts | 23 + .../jar-resources/vaadin-big-decimal-field.js | 69 + .../vaadin-dev-tools/License.d.ts | 16 + .../vaadin-dev-tools/connection.d.ts | 15 + .../live-reload-connection.d.ts | 8 + .../vaadin-dev-tools/vaadin-dev-tools.d.ts | 99 + .../vaadin-dev-tools/vaadin-dev-tools.js | 486 + .../websocket-connection.d.ts | 13 + .../vaadin-grid-flow-selection-column.js | 97 + .../jar-resources/vaadin-popover/popover.ts | 26 + .../vaadin-time-picker/helpers.js | 183 + .../vaadin-time-picker/timepickerConnector.js | 185 + .../jar-resources/virtualListConnector.js | 150 + .../frontend/generated/vaadin-featureflags.js | 11 + src/main/frontend/generated/vaadin.ts | 6 + src/main/frontend/index.html | 23 + src/main/java/aReminder | 1 + .../QrAccessAdminApplication.java | 12 + .../qr_access_admin/common/MainLayout.java | 131 + .../config/CustomShellConfigurator.java | 9 + .../common/validation/IsAfter.java | 20 + .../common/validation/IsAfterValidator.java | 27 + .../qr_access_admin/common/view/MainView.java | 12 + .../door/component/DoorEditor.java | 89 + .../door/entity/DoorEntity.java | 19 + .../door/entity/DoorRepository.java | 7 + .../qr_access_admin/door/view/DoorView.java | 79 + .../qr/component/QrEditor.java | 89 + .../qr_access_admin/qr/entity/QrEntity.java | 28 + .../qr/entity/QrRepository.java | 6 + .../qr_access_admin/qr/view/QrView.java | 76 + .../unit/component/UnitEditor.java | 80 + .../unit/entity/UnitEntity.java | 50 + .../unit/entity/UnitRepository.java | 8 + .../UnitEntityUnitComboBoxModelMapper.java | 23 + .../mapper/UnitEntityUnitModelMapper.java | 53 + .../unit/model/UnitComboBoxModel.java | 4 + .../qr_access_admin/unit/model/UnitModel.java | 29 + .../qr_access_admin/unit/view/UnitView.java | 82 + src/main/resources/application.yaml | 14 + src/main/resources/static/favicon.ico | Bin 0 -> 3740 bytes src/main/resources/static/images/avatar.png | Bin 0 -> 9434 bytes src/main/resources/static/images/logo.png | Bin 0 -> 3740 bytes .../QrAccessAdminApplicationTests.java | 11 + 93 files changed, 176146 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 build.gradle.kts create mode 100644 gradle/wrapper/gradle-wrapper.jar create mode 100644 gradle/wrapper/gradle-wrapper.properties create mode 100644 gradlew create mode 100644 gradlew.bat create mode 100644 settings.gradle.kts create mode 100644 src/main/frontend/generated/flow/generated-flow-imports.d.ts create mode 100644 src/main/frontend/generated/flow/generated-flow-imports.js create mode 100644 src/main/frontend/generated/flow/generated-flow-webcomponent-imports.js create mode 100644 src/main/frontend/generated/jar-resources/Flow.d.ts create mode 100644 src/main/frontend/generated/jar-resources/Flow.js create mode 100644 src/main/frontend/generated/jar-resources/Flow.js.map create mode 100644 src/main/frontend/generated/jar-resources/FlowBootstrap.d.ts create mode 100644 src/main/frontend/generated/jar-resources/FlowBootstrap.js create mode 100644 src/main/frontend/generated/jar-resources/FlowClient.d.ts create mode 100644 src/main/frontend/generated/jar-resources/FlowClient.js create mode 100644 src/main/frontend/generated/jar-resources/ReactRouterOutletElement.tsx create mode 100644 src/main/frontend/generated/jar-resources/comboBoxConnector.js create mode 100644 src/main/frontend/generated/jar-resources/contextMenuConnector.js create mode 100644 src/main/frontend/generated/jar-resources/contextMenuTargetConnector.js create mode 100644 src/main/frontend/generated/jar-resources/copilot.js create mode 100644 src/main/frontend/generated/jar-resources/copilot/base-panel-CTLXjjmN.js create mode 100644 src/main/frontend/generated/jar-resources/copilot/copilot-features-plugin-DArMO9Mk.js create mode 100644 src/main/frontend/generated/jar-resources/copilot/copilot-feedback-plugin-B550SpdM.js create mode 100644 src/main/frontend/generated/jar-resources/copilot/copilot-global-vars-later-UtaKiaeu.js create mode 100644 src/main/frontend/generated/jar-resources/copilot/copilot-info-plugin-DEhoYnCY.js create mode 100644 src/main/frontend/generated/jar-resources/copilot/copilot-init-step2-tquZBMEC.js create mode 100644 src/main/frontend/generated/jar-resources/copilot/copilot-log-plugin-Dd9Vu3DN.js create mode 100644 src/main/frontend/generated/jar-resources/copilot/copilot-shortcuts-plugin-Chva6DtS.js create mode 100644 src/main/frontend/generated/jar-resources/copilot/copilot-xjoIJFQc.js create mode 100644 src/main/frontend/generated/jar-resources/copilot/icons-AkLm3oZf.js create mode 100644 src/main/frontend/generated/jar-resources/copilot/overlay-monkeypatch-CXhp9hXg.js create mode 100644 src/main/frontend/generated/jar-resources/copilot/state-9-chcL5F.js create mode 100644 src/main/frontend/generated/jar-resources/datepickerConnector.js create mode 100644 src/main/frontend/generated/jar-resources/disableOnClickFunctions.js create mode 100644 src/main/frontend/generated/jar-resources/dndConnector.js create mode 100644 src/main/frontend/generated/jar-resources/flow-component-directive.js create mode 100644 src/main/frontend/generated/jar-resources/flow-component-renderer.js create mode 100644 src/main/frontend/generated/jar-resources/gridConnector.ts create mode 100644 src/main/frontend/generated/jar-resources/index.d.ts create mode 100644 src/main/frontend/generated/jar-resources/index.js create mode 100644 src/main/frontend/generated/jar-resources/index.js.map create mode 100644 src/main/frontend/generated/jar-resources/lit-renderer.ts create mode 100644 src/main/frontend/generated/jar-resources/menubarConnector.js create mode 100644 src/main/frontend/generated/jar-resources/messageListConnector.js create mode 100644 src/main/frontend/generated/jar-resources/selectConnector.js create mode 100644 src/main/frontend/generated/jar-resources/theme-util.js create mode 100644 src/main/frontend/generated/jar-resources/tooltip.ts create mode 100644 src/main/frontend/generated/jar-resources/vaadin-big-decimal-field.js create mode 100644 src/main/frontend/generated/jar-resources/vaadin-dev-tools/License.d.ts create mode 100644 src/main/frontend/generated/jar-resources/vaadin-dev-tools/connection.d.ts create mode 100644 src/main/frontend/generated/jar-resources/vaadin-dev-tools/live-reload-connection.d.ts create mode 100644 src/main/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.d.ts create mode 100644 src/main/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.js create mode 100644 src/main/frontend/generated/jar-resources/vaadin-dev-tools/websocket-connection.d.ts create mode 100644 src/main/frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js create mode 100644 src/main/frontend/generated/jar-resources/vaadin-popover/popover.ts create mode 100644 src/main/frontend/generated/jar-resources/vaadin-time-picker/helpers.js create mode 100644 src/main/frontend/generated/jar-resources/vaadin-time-picker/timepickerConnector.js create mode 100644 src/main/frontend/generated/jar-resources/virtualListConnector.js create mode 100644 src/main/frontend/generated/vaadin-featureflags.js create mode 100644 src/main/frontend/generated/vaadin.ts create mode 100644 src/main/frontend/index.html create mode 100644 src/main/java/aReminder create mode 100644 src/main/java/ru/vyatsu/qr_access_admin/QrAccessAdminApplication.java create mode 100644 src/main/java/ru/vyatsu/qr_access_admin/common/MainLayout.java create mode 100644 src/main/java/ru/vyatsu/qr_access_admin/common/config/CustomShellConfigurator.java create mode 100644 src/main/java/ru/vyatsu/qr_access_admin/common/validation/IsAfter.java create mode 100644 src/main/java/ru/vyatsu/qr_access_admin/common/validation/IsAfterValidator.java create mode 100644 src/main/java/ru/vyatsu/qr_access_admin/common/view/MainView.java create mode 100644 src/main/java/ru/vyatsu/qr_access_admin/door/component/DoorEditor.java create mode 100644 src/main/java/ru/vyatsu/qr_access_admin/door/entity/DoorEntity.java create mode 100644 src/main/java/ru/vyatsu/qr_access_admin/door/entity/DoorRepository.java create mode 100644 src/main/java/ru/vyatsu/qr_access_admin/door/view/DoorView.java create mode 100644 src/main/java/ru/vyatsu/qr_access_admin/qr/component/QrEditor.java create mode 100644 src/main/java/ru/vyatsu/qr_access_admin/qr/entity/QrEntity.java create mode 100644 src/main/java/ru/vyatsu/qr_access_admin/qr/entity/QrRepository.java create mode 100644 src/main/java/ru/vyatsu/qr_access_admin/qr/view/QrView.java create mode 100644 src/main/java/ru/vyatsu/qr_access_admin/unit/component/UnitEditor.java create mode 100644 src/main/java/ru/vyatsu/qr_access_admin/unit/entity/UnitEntity.java create mode 100644 src/main/java/ru/vyatsu/qr_access_admin/unit/entity/UnitRepository.java create mode 100644 src/main/java/ru/vyatsu/qr_access_admin/unit/mapper/UnitEntityUnitComboBoxModelMapper.java create mode 100644 src/main/java/ru/vyatsu/qr_access_admin/unit/mapper/UnitEntityUnitModelMapper.java create mode 100644 src/main/java/ru/vyatsu/qr_access_admin/unit/model/UnitComboBoxModel.java create mode 100644 src/main/java/ru/vyatsu/qr_access_admin/unit/model/UnitModel.java create mode 100644 src/main/java/ru/vyatsu/qr_access_admin/unit/view/UnitView.java create mode 100644 src/main/resources/application.yaml create mode 100644 src/main/resources/static/favicon.ico create mode 100644 src/main/resources/static/images/avatar.png create mode 100644 src/main/resources/static/images/logo.png create mode 100644 src/test/java/ru/vyatsu/qr_access_admin/QrAccessAdminApplicationTests.java diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..8af972c --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +/gradlew text eol=lf +*.bat text eol=crlf +*.jar binary diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ac0ef07 --- /dev/null +++ b/.gitignore @@ -0,0 +1,38 @@ +node_modules +HELP.md +.gradle +build/ +!gradle/wrapper/gradle-wrapper.jar +!**/src/main/**/build/ +!**/src/test/**/build/ + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache +bin/ +!**/src/main/**/bin/ +!**/src/test/**/bin/ + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr +out/ +!**/src/main/**/out/ +!**/src/test/**/out/ + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ + +### VS Code ### +.vscode/ diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..a7c5d57 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,49 @@ +plugins { + java + id("org.springframework.boot") version "3.4.1" + id("io.spring.dependency-management") version "1.1.7" + id("com.vaadin") version "24.6.0" +} + +group = "ru.vyatsu" +version = "1.0.0" + +java { + toolchain { + languageVersion = JavaLanguageVersion.of(17) + } +} + +configurations { + compileOnly { + extendsFrom(configurations.annotationProcessor.get()) + } +} + +repositories { + mavenCentral() +} + +extra["vaadinVersion"] = "24.6.0" + +dependencies { + implementation("org.springframework.boot:spring-boot-starter-data-jpa") + implementation("org.springframework.boot:spring-boot-starter-web") + implementation("com.vaadin:vaadin-spring-boot-starter") + implementation("org.yaml:snakeyaml") + compileOnly("org.projectlombok:lombok") + annotationProcessor("org.projectlombok:lombok") + runtimeOnly("org.postgresql:postgresql") + testImplementation("org.springframework.boot:spring-boot-starter-test") + testRuntimeOnly("org.junit.platform:junit-platform-launcher") +} + +dependencyManagement { + imports { + mavenBom("com.vaadin:vaadin-bom:${property("vaadinVersion")}") + } +} + +tasks.withType { + useJUnitPlatform() +} diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..a4b76b9530d66f5e68d973ea569d8e19de379189 GIT binary patch literal 43583 zcma&N1CXTcmMvW9vTb(Rwr$&4wr$(C?dmSu>@vG-+vuvg^_??!{yS%8zW-#zn-LkA z5&1^$^{lnmUON?}LBF8_K|(?T0Ra(xUH{($5eN!MR#ZihR#HxkUPe+_R8Cn`RRs(P z_^*#_XlXmGv7!4;*Y%p4nw?{bNp@UZHv1?Um8r6)Fei3p@ClJn0ECfg1hkeuUU@Or zDaPa;U3fE=3L}DooL;8f;P0ipPt0Z~9P0)lbStMS)ag54=uL9ia-Lm3nh|@(Y?B`; zx_#arJIpXH!U{fbCbI^17}6Ri*H<>OLR%c|^mh8+)*h~K8Z!9)DPf zR2h?lbDZQ`p9P;&DQ4F0sur@TMa!Y}S8irn(%d-gi0*WxxCSk*A?3lGh=gcYN?FGl z7D=Js!i~0=u3rox^eO3i@$0=n{K1lPNU zwmfjRVmLOCRfe=seV&P*1Iq=^i`502keY8Uy-WNPwVNNtJFx?IwAyRPZo2Wo1+S(xF37LJZ~%i)kpFQ3Fw=mXfd@>%+)RpYQLnr}B~~zoof(JVm^^&f zxKV^+3D3$A1G;qh4gPVjhrC8e(VYUHv#dy^)(RoUFM?o%W-EHxufuWf(l*@-l+7vt z=l`qmR56K~F|v<^Pd*p~1_y^P0P^aPC##d8+HqX4IR1gu+7w#~TBFphJxF)T$2WEa zxa?H&6=Qe7d(#tha?_1uQys2KtHQ{)Qco)qwGjrdNL7thd^G5i8Os)CHqc>iOidS} z%nFEDdm=GXBw=yXe1W-ShHHFb?Cc70+$W~z_+}nAoHFYI1MV1wZegw*0y^tC*s%3h zhD3tN8b=Gv&rj}!SUM6|ajSPp*58KR7MPpI{oAJCtY~JECm)*m_x>AZEu>DFgUcby z1Qaw8lU4jZpQ_$;*7RME+gq1KySGG#Wql>aL~k9tLrSO()LWn*q&YxHEuzmwd1?aAtI zBJ>P=&$=l1efe1CDU;`Fd+_;&wI07?V0aAIgc(!{a z0Jg6Y=inXc3^n!U0Atk`iCFIQooHqcWhO(qrieUOW8X(x?(RD}iYDLMjSwffH2~tB z)oDgNBLB^AJBM1M^c5HdRx6fBfka`(LD-qrlh5jqH~);#nw|iyp)()xVYak3;Ybik z0j`(+69aK*B>)e_p%=wu8XC&9e{AO4c~O1U`5X9}?0mrd*m$_EUek{R?DNSh(=br# z#Q61gBzEpmy`$pA*6!87 zSDD+=@fTY7<4A?GLqpA?Pb2z$pbCc4B4zL{BeZ?F-8`s$?>*lXXtn*NC61>|*w7J* z$?!iB{6R-0=KFmyp1nnEmLsA-H0a6l+1uaH^g%c(p{iT&YFrbQ$&PRb8Up#X3@Zsk zD^^&LK~111%cqlP%!_gFNa^dTYT?rhkGl}5=fL{a`UViaXWI$k-UcHJwmaH1s=S$4 z%4)PdWJX;hh5UoK?6aWoyLxX&NhNRqKam7tcOkLh{%j3K^4Mgx1@i|Pi&}<^5>hs5 zm8?uOS>%)NzT(%PjVPGa?X%`N2TQCKbeH2l;cTnHiHppPSJ<7y-yEIiC!P*ikl&!B z%+?>VttCOQM@ShFguHVjxX^?mHX^hSaO_;pnyh^v9EumqSZTi+#f&_Vaija0Q-e*| z7ulQj6Fs*bbmsWp{`auM04gGwsYYdNNZcg|ph0OgD>7O}Asn7^Z=eI>`$2*v78;sj-}oMoEj&@)9+ycEOo92xSyY344^ z11Hb8^kdOvbf^GNAK++bYioknrpdN>+u8R?JxG=!2Kd9r=YWCOJYXYuM0cOq^FhEd zBg2puKy__7VT3-r*dG4c62Wgxi52EMCQ`bKgf*#*ou(D4-ZN$+mg&7$u!! z-^+Z%;-3IDwqZ|K=ah85OLwkO zKxNBh+4QHh)u9D?MFtpbl)us}9+V!D%w9jfAMYEb>%$A;u)rrI zuBudh;5PN}_6J_}l55P3l_)&RMlH{m!)ai-i$g)&*M`eN$XQMw{v^r@-125^RRCF0 z^2>|DxhQw(mtNEI2Kj(;KblC7x=JlK$@78`O~>V!`|1Lm-^JR$-5pUANAnb(5}B}JGjBsliK4& zk6y(;$e&h)lh2)L=bvZKbvh@>vLlreBdH8No2>$#%_Wp1U0N7Ank!6$dFSi#xzh|( zRi{Uw%-4W!{IXZ)fWx@XX6;&(m_F%c6~X8hx=BN1&q}*( zoaNjWabE{oUPb!Bt$eyd#$5j9rItB-h*5JiNi(v^e|XKAj*8(k<5-2$&ZBR5fF|JA z9&m4fbzNQnAU}r8ab>fFV%J0z5awe#UZ|bz?Ur)U9bCIKWEzi2%A+5CLqh?}K4JHi z4vtM;+uPsVz{Lfr;78W78gC;z*yTch~4YkLr&m-7%-xc ztw6Mh2d>_iO*$Rd8(-Cr1_V8EO1f*^@wRoSozS) zy1UoC@pruAaC8Z_7~_w4Q6n*&B0AjOmMWa;sIav&gu z|J5&|{=a@vR!~k-OjKEgPFCzcJ>#A1uL&7xTDn;{XBdeM}V=l3B8fE1--DHjSaxoSjNKEM9|U9#m2<3>n{Iuo`r3UZp;>GkT2YBNAh|b z^jTq-hJp(ebZh#Lk8hVBP%qXwv-@vbvoREX$TqRGTgEi$%_F9tZES@z8Bx}$#5eeG zk^UsLBH{bc2VBW)*EdS({yw=?qmevwi?BL6*=12k9zM5gJv1>y#ML4!)iiPzVaH9% zgSImetD@dam~e>{LvVh!phhzpW+iFvWpGT#CVE5TQ40n%F|p(sP5mXxna+Ev7PDwA zamaV4m*^~*xV+&p;W749xhb_X=$|LD;FHuB&JL5?*Y2-oIT(wYY2;73<^#46S~Gx| z^cez%V7x$81}UWqS13Gz80379Rj;6~WdiXWOSsdmzY39L;Hg3MH43o*y8ibNBBH`(av4|u;YPq%{R;IuYow<+GEsf@R?=@tT@!}?#>zIIn0CoyV!hq3mw zHj>OOjfJM3F{RG#6ujzo?y32m^tgSXf@v=J$ELdJ+=5j|=F-~hP$G&}tDZsZE?5rX ztGj`!S>)CFmdkccxM9eGIcGnS2AfK#gXwj%esuIBNJQP1WV~b~+D7PJTmWGTSDrR` zEAu4B8l>NPuhsk5a`rReSya2nfV1EK01+G!x8aBdTs3Io$u5!6n6KX%uv@DxAp3F@{4UYg4SWJtQ-W~0MDb|j-$lwVn znAm*Pl!?Ps&3wO=R115RWKb*JKoexo*)uhhHBncEDMSVa_PyA>k{Zm2(wMQ(5NM3# z)jkza|GoWEQo4^s*wE(gHz?Xsg4`}HUAcs42cM1-qq_=+=!Gk^y710j=66(cSWqUe zklbm8+zB_syQv5A2rj!Vbw8;|$@C!vfNmNV!yJIWDQ>{+2x zKjuFX`~~HKG~^6h5FntRpnnHt=D&rq0>IJ9#F0eM)Y-)GpRjiN7gkA8wvnG#K=q{q z9dBn8_~wm4J<3J_vl|9H{7q6u2A!cW{bp#r*-f{gOV^e=8S{nc1DxMHFwuM$;aVI^ zz6A*}m8N-&x8;aunp1w7_vtB*pa+OYBw=TMc6QK=mbA-|Cf* zvyh8D4LRJImooUaSb7t*fVfih<97Gf@VE0|z>NcBwBQze);Rh!k3K_sfunToZY;f2 z^HmC4KjHRVg+eKYj;PRN^|E0>Gj_zagfRbrki68I^#~6-HaHg3BUW%+clM1xQEdPYt_g<2K+z!$>*$9nQ>; zf9Bei{?zY^-e{q_*|W#2rJG`2fy@{%6u0i_VEWTq$*(ZN37|8lFFFt)nCG({r!q#9 z5VK_kkSJ3?zOH)OezMT{!YkCuSSn!K#-Rhl$uUM(bq*jY? zi1xbMVthJ`E>d>(f3)~fozjg^@eheMF6<)I`oeJYx4*+M&%c9VArn(OM-wp%M<-`x z7sLP1&3^%Nld9Dhm@$3f2}87!quhI@nwd@3~fZl_3LYW-B?Ia>ui`ELg z&Qfe!7m6ze=mZ`Ia9$z|ARSw|IdMpooY4YiPN8K z4B(ts3p%2i(Td=tgEHX z0UQ_>URBtG+-?0E;E7Ld^dyZ;jjw0}XZ(}-QzC6+NN=40oDb2^v!L1g9xRvE#@IBR zO!b-2N7wVfLV;mhEaXQ9XAU+>=XVA6f&T4Z-@AX!leJ8obP^P^wP0aICND?~w&NykJ#54x3_@r7IDMdRNy4Hh;h*!u(Ol(#0bJdwEo$5437-UBjQ+j=Ic>Q2z` zJNDf0yO6@mr6y1#n3)s(W|$iE_i8r@Gd@!DWDqZ7J&~gAm1#~maIGJ1sls^gxL9LLG_NhU!pTGty!TbhzQnu)I*S^54U6Yu%ZeCg`R>Q zhBv$n5j0v%O_j{QYWG!R9W?5_b&67KB$t}&e2LdMvd(PxN6Ir!H4>PNlerpBL>Zvyy!yw z-SOo8caEpDt(}|gKPBd$qND5#a5nju^O>V&;f890?yEOfkSG^HQVmEbM3Ugzu+UtH zC(INPDdraBN?P%kE;*Ae%Wto&sgw(crfZ#Qy(<4nk;S|hD3j{IQRI6Yq|f^basLY; z-HB&Je%Gg}Jt@={_C{L$!RM;$$|iD6vu#3w?v?*;&()uB|I-XqEKqZPS!reW9JkLewLb!70T7n`i!gNtb1%vN- zySZj{8-1>6E%H&=V}LM#xmt`J3XQoaD|@XygXjdZ1+P77-=;=eYpoEQ01B@L*a(uW zrZeZz?HJsw_4g0vhUgkg@VF8<-X$B8pOqCuWAl28uB|@r`19DTUQQsb^pfqB6QtiT z*`_UZ`fT}vtUY#%sq2{rchyfu*pCg;uec2$-$N_xgjZcoumE5vSI{+s@iLWoz^Mf; zuI8kDP{!XY6OP~q5}%1&L}CtfH^N<3o4L@J@zg1-mt{9L`s^z$Vgb|mr{@WiwAqKg zp#t-lhrU>F8o0s1q_9y`gQNf~Vb!F%70f}$>i7o4ho$`uciNf=xgJ>&!gSt0g;M>*x4-`U)ysFW&Vs^Vk6m%?iuWU+o&m(2Jm26Y(3%TL; zA7T)BP{WS!&xmxNw%J=$MPfn(9*^*TV;$JwRy8Zl*yUZi8jWYF>==j~&S|Xinsb%c z2?B+kpet*muEW7@AzjBA^wAJBY8i|#C{WtO_or&Nj2{=6JTTX05}|H>N2B|Wf!*3_ z7hW*j6p3TvpghEc6-wufFiY!%-GvOx*bZrhZu+7?iSrZL5q9}igiF^*R3%DE4aCHZ zqu>xS8LkW+Auv%z-<1Xs92u23R$nk@Pk}MU5!gT|c7vGlEA%G^2th&Q*zfg%-D^=f z&J_}jskj|Q;73NP4<4k*Y%pXPU2Thoqr+5uH1yEYM|VtBPW6lXaetokD0u z9qVek6Q&wk)tFbQ8(^HGf3Wp16gKmr>G;#G(HRBx?F`9AIRboK+;OfHaLJ(P>IP0w zyTbTkx_THEOs%Q&aPrxbZrJlio+hCC_HK<4%f3ZoSAyG7Dn`=X=&h@m*|UYO-4Hq0 z-Bq&+Ie!S##4A6OGoC~>ZW`Y5J)*ouaFl_e9GA*VSL!O_@xGiBw!AF}1{tB)z(w%c zS1Hmrb9OC8>0a_$BzeiN?rkPLc9%&;1CZW*4}CDDNr2gcl_3z+WC15&H1Zc2{o~i) z)LLW=WQ{?ricmC`G1GfJ0Yp4Dy~Ba;j6ZV4r{8xRs`13{dD!xXmr^Aga|C=iSmor% z8hi|pTXH)5Yf&v~exp3o+sY4B^^b*eYkkCYl*T{*=-0HniSA_1F53eCb{x~1k3*`W zr~};p1A`k{1DV9=UPnLDgz{aJH=-LQo<5%+Em!DNN252xwIf*wF_zS^!(XSm(9eoj z=*dXG&n0>)_)N5oc6v!>-bd(2ragD8O=M|wGW z!xJQS<)u70m&6OmrF0WSsr@I%T*c#Qo#Ha4d3COcX+9}hM5!7JIGF>7<~C(Ear^Sn zm^ZFkV6~Ula6+8S?oOROOA6$C&q&dp`>oR-2Ym3(HT@O7Sd5c~+kjrmM)YmgPH*tL zX+znN>`tv;5eOfX?h{AuX^LK~V#gPCu=)Tigtq9&?7Xh$qN|%A$?V*v=&-2F$zTUv z`C#WyIrChS5|Kgm_GeudCFf;)!WH7FI60j^0o#65o6`w*S7R@)88n$1nrgU(oU0M9 zx+EuMkC>(4j1;m6NoGqEkpJYJ?vc|B zOlwT3t&UgL!pX_P*6g36`ZXQ; z9~Cv}ANFnJGp(;ZhS(@FT;3e)0)Kp;h^x;$*xZn*k0U6-&FwI=uOGaODdrsp-!K$Ac32^c{+FhI-HkYd5v=`PGsg%6I`4d9Jy)uW0y%) zm&j^9WBAp*P8#kGJUhB!L?a%h$hJgQrx!6KCB_TRo%9{t0J7KW8!o1B!NC)VGLM5! zpZy5Jc{`r{1e(jd%jsG7k%I+m#CGS*BPA65ZVW~fLYw0dA-H_}O zrkGFL&P1PG9p2(%QiEWm6x;U-U&I#;Em$nx-_I^wtgw3xUPVVu zqSuKnx&dIT-XT+T10p;yjo1Y)z(x1fb8Dzfn8e yu?e%!_ptzGB|8GrCfu%p?(_ zQccdaaVK$5bz;*rnyK{_SQYM>;aES6Qs^lj9lEs6_J+%nIiuQC*fN;z8md>r_~Mfl zU%p5Dt_YT>gQqfr@`cR!$NWr~+`CZb%dn;WtzrAOI>P_JtsB76PYe*<%H(y>qx-`Kq!X_; z<{RpAqYhE=L1r*M)gNF3B8r(<%8mo*SR2hu zccLRZwGARt)Hlo1euqTyM>^!HK*!Q2P;4UYrysje@;(<|$&%vQekbn|0Ruu_Io(w4#%p6ld2Yp7tlA`Y$cciThP zKzNGIMPXX%&Ud0uQh!uQZz|FB`4KGD?3!ND?wQt6!n*f4EmCoJUh&b?;B{|lxs#F- z31~HQ`SF4x$&v00@(P+j1pAaj5!s`)b2RDBp*PB=2IB>oBF!*6vwr7Dp%zpAx*dPr zb@Zjq^XjN?O4QcZ*O+8>)|HlrR>oD*?WQl5ri3R#2?*W6iJ>>kH%KnnME&TT@ZzrHS$Q%LC?n|e>V+D+8D zYc4)QddFz7I8#}y#Wj6>4P%34dZH~OUDb?uP%-E zwjXM(?Sg~1!|wI(RVuxbu)-rH+O=igSho_pDCw(c6b=P zKk4ATlB?bj9+HHlh<_!&z0rx13K3ZrAR8W)!@Y}o`?a*JJsD+twZIv`W)@Y?Amu_u zz``@-e2X}27$i(2=9rvIu5uTUOVhzwu%mNazS|lZb&PT;XE2|B&W1>=B58#*!~D&) zfVmJGg8UdP*fx(>Cj^?yS^zH#o-$Q-*$SnK(ZVFkw+er=>N^7!)FtP3y~Xxnu^nzY zikgB>Nj0%;WOltWIob|}%lo?_C7<``a5hEkx&1ku$|)i>Rh6@3h*`slY=9U}(Ql_< zaNG*J8vb&@zpdhAvv`?{=zDedJ23TD&Zg__snRAH4eh~^oawdYi6A3w8<Ozh@Kw)#bdktM^GVb zrG08?0bG?|NG+w^&JvD*7LAbjED{_Zkc`3H!My>0u5Q}m!+6VokMLXxl`Mkd=g&Xx z-a>m*#G3SLlhbKB!)tnzfWOBV;u;ftU}S!NdD5+YtOjLg?X}dl>7m^gOpihrf1;PY zvll&>dIuUGs{Qnd- zwIR3oIrct8Va^Tm0t#(bJD7c$Z7DO9*7NnRZorrSm`b`cxz>OIC;jSE3DO8`hX955ui`s%||YQtt2 z5DNA&pG-V+4oI2s*x^>-$6J?p=I>C|9wZF8z;VjR??Icg?1w2v5Me+FgAeGGa8(3S z4vg*$>zC-WIVZtJ7}o9{D-7d>zCe|z#<9>CFve-OPAYsneTb^JH!Enaza#j}^mXy1 z+ULn^10+rWLF6j2>Ya@@Kq?26>AqK{A_| zQKb*~F1>sE*=d?A?W7N2j?L09_7n+HGi{VY;MoTGr_)G9)ot$p!-UY5zZ2Xtbm=t z@dpPSGwgH=QtIcEulQNI>S-#ifbnO5EWkI;$A|pxJd885oM+ zGZ0_0gDvG8q2xebj+fbCHYfAXuZStH2j~|d^sBAzo46(K8n59+T6rzBwK)^rfPT+B zyIFw)9YC-V^rhtK`!3jrhmW-sTmM+tPH+;nwjL#-SjQPUZ53L@A>y*rt(#M(qsiB2 zx6B)dI}6Wlsw%bJ8h|(lhkJVogQZA&n{?Vgs6gNSXzuZpEyu*xySy8ro07QZ7Vk1!3tJphN_5V7qOiyK8p z#@jcDD8nmtYi1^l8ml;AF<#IPK?!pqf9D4moYk>d99Im}Jtwj6c#+A;f)CQ*f-hZ< z=p_T86jog%!p)D&5g9taSwYi&eP z#JuEK%+NULWus;0w32-SYFku#i}d~+{Pkho&^{;RxzP&0!RCm3-9K6`>KZpnzS6?L z^H^V*s!8<>x8bomvD%rh>Zp3>Db%kyin;qtl+jAv8Oo~1g~mqGAC&Qi_wy|xEt2iz zWAJEfTV%cl2Cs<1L&DLRVVH05EDq`pH7Oh7sR`NNkL%wi}8n>IXcO40hp+J+sC!W?!krJf!GJNE8uj zg-y~Ns-<~D?yqbzVRB}G>0A^f0!^N7l=$m0OdZuqAOQqLc zX?AEGr1Ht+inZ-Qiwnl@Z0qukd__a!C*CKuGdy5#nD7VUBM^6OCpxCa2A(X;e0&V4 zM&WR8+wErQ7UIc6LY~Q9x%Sn*Tn>>P`^t&idaOEnOd(Ufw#>NoR^1QdhJ8s`h^|R_ zXX`c5*O~Xdvh%q;7L!_!ohf$NfEBmCde|#uVZvEo>OfEq%+Ns7&_f$OR9xsihRpBb z+cjk8LyDm@U{YN>+r46?nn{7Gh(;WhFw6GAxtcKD+YWV?uge>;+q#Xx4!GpRkVZYu zzsF}1)7$?%s9g9CH=Zs+B%M_)+~*j3L0&Q9u7!|+T`^O{xE6qvAP?XWv9_MrZKdo& z%IyU)$Q95AB4!#hT!_dA>4e@zjOBD*Y=XjtMm)V|+IXzjuM;(l+8aA5#Kaz_$rR6! zj>#&^DidYD$nUY(D$mH`9eb|dtV0b{S>H6FBfq>t5`;OxA4Nn{J(+XihF(stSche7$es&~N$epi&PDM_N`As;*9D^L==2Q7Z2zD+CiU(|+-kL*VG+&9!Yb3LgPy?A zm7Z&^qRG_JIxK7-FBzZI3Q<;{`DIxtc48k> zc|0dmX;Z=W$+)qE)~`yn6MdoJ4co;%!`ddy+FV538Y)j(vg}5*k(WK)KWZ3WaOG!8 z!syGn=s{H$odtpqFrT#JGM*utN7B((abXnpDM6w56nhw}OY}0TiTG1#f*VFZr+^-g zbP10`$LPq_;PvrA1XXlyx2uM^mrjTzX}w{yuLo-cOClE8MMk47T25G8M!9Z5ypOSV zAJUBGEg5L2fY)ZGJb^E34R2zJ?}Vf>{~gB!8=5Z) z9y$>5c)=;o0HeHHSuE4U)#vG&KF|I%-cF6f$~pdYJWk_dD}iOA>iA$O$+4%@>JU08 zS`ep)$XLPJ+n0_i@PkF#ri6T8?ZeAot$6JIYHm&P6EB=BiaNY|aA$W0I+nz*zkz_z zkEru!tj!QUffq%)8y0y`T&`fuus-1p>=^hnBiBqD^hXrPs`PY9tU3m0np~rISY09> z`P3s=-kt_cYcxWd{de@}TwSqg*xVhp;E9zCsnXo6z z?f&Sv^U7n4`xr=mXle94HzOdN!2kB~4=%)u&N!+2;z6UYKUDqi-s6AZ!haB;@&B`? z_TRX0%@suz^TRdCb?!vNJYPY8L_}&07uySH9%W^Tc&1pia6y1q#?*Drf}GjGbPjBS zbOPcUY#*$3sL2x4v_i*Y=N7E$mR}J%|GUI(>WEr+28+V z%v5{#e!UF*6~G&%;l*q*$V?&r$Pp^sE^i-0$+RH3ERUUdQ0>rAq2(2QAbG}$y{de( z>{qD~GGuOk559Y@%$?N^1ApVL_a704>8OD%8Y%8B;FCt%AoPu8*D1 zLB5X>b}Syz81pn;xnB}%0FnwazlWfUV)Z-~rZg6~b z6!9J$EcE&sEbzcy?CI~=boWA&eeIa%z(7SE^qgVLz??1Vbc1*aRvc%Mri)AJaAG!p z$X!_9Ds;Zz)f+;%s&dRcJt2==P{^j3bf0M=nJd&xwUGlUFn?H=2W(*2I2Gdu zv!gYCwM10aeus)`RIZSrCK=&oKaO_Ry~D1B5!y0R=%!i2*KfXGYX&gNv_u+n9wiR5 z*e$Zjju&ODRW3phN925%S(jL+bCHv6rZtc?!*`1TyYXT6%Ju=|X;6D@lq$8T zW{Y|e39ioPez(pBH%k)HzFITXHvnD6hw^lIoUMA;qAJ^CU?top1fo@s7xT13Fvn1H z6JWa-6+FJF#x>~+A;D~;VDs26>^oH0EI`IYT2iagy23?nyJ==i{g4%HrAf1-*v zK1)~@&(KkwR7TL}L(A@C_S0G;-GMDy=MJn2$FP5s<%wC)4jC5PXoxrQBFZ_k0P{{s@sz+gX`-!=T8rcB(=7vW}^K6oLWMmp(rwDh}b zwaGGd>yEy6fHv%jM$yJXo5oMAQ>c9j`**}F?MCry;T@47@r?&sKHgVe$MCqk#Z_3S z1GZI~nOEN*P~+UaFGnj{{Jo@16`(qVNtbU>O0Hf57-P>x8Jikp=`s8xWs^dAJ9lCQ z)GFm+=OV%AMVqVATtN@|vp61VVAHRn87}%PC^RAzJ%JngmZTasWBAWsoAqBU+8L8u z4A&Pe?fmTm0?mK-BL9t+{y7o(7jm+RpOhL9KnY#E&qu^}B6=K_dB}*VlSEiC9fn)+V=J;OnN)Ta5v66ic1rG+dGAJ1 z1%Zb_+!$=tQ~lxQrzv3x#CPb?CekEkA}0MYSgx$Jdd}q8+R=ma$|&1a#)TQ=l$1tQ z=tL9&_^vJ)Pk}EDO-va`UCT1m#Uty1{v^A3P~83_#v^ozH}6*9mIjIr;t3Uv%@VeW zGL6(CwCUp)Jq%G0bIG%?{_*Y#5IHf*5M@wPo6A{$Um++Co$wLC=J1aoG93&T7Ho}P z=mGEPP7GbvoG!uD$k(H3A$Z))+i{Hy?QHdk>3xSBXR0j!11O^mEe9RHmw!pvzv?Ua~2_l2Yh~_!s1qS`|0~0)YsbHSz8!mG)WiJE| z2f($6TQtt6L_f~ApQYQKSb=`053LgrQq7G@98#igV>y#i==-nEjQ!XNu9 z~;mE+gtj4IDDNQJ~JVk5Ux6&LCSFL!y=>79kE9=V}J7tD==Ga+IW zX)r7>VZ9dY=V&}DR))xUoV!u(Z|%3ciQi_2jl}3=$Agc(`RPb z8kEBpvY>1FGQ9W$n>Cq=DIpski};nE)`p3IUw1Oz0|wxll^)4dq3;CCY@RyJgFgc# zKouFh!`?Xuo{IMz^xi-h=StCis_M7yq$u) z?XHvw*HP0VgR+KR6wI)jEMX|ssqYvSf*_3W8zVTQzD?3>H!#>InzpSO)@SC8q*ii- z%%h}_#0{4JG;Jm`4zg};BPTGkYamx$Xo#O~lBirRY)q=5M45n{GCfV7h9qwyu1NxOMoP4)jjZMxmT|IQQh0U7C$EbnMN<3)Kk?fFHYq$d|ICu>KbY_hO zTZM+uKHe(cIZfEqyzyYSUBZa8;Fcut-GN!HSA9ius`ltNebF46ZX_BbZNU}}ZOm{M2&nANL9@0qvih15(|`S~z}m&h!u4x~(%MAO$jHRWNfuxWF#B)E&g3ghSQ9|> z(MFaLQj)NE0lowyjvg8z0#m6FIuKE9lDO~Glg}nSb7`~^&#(Lw{}GVOS>U)m8bF}x zVjbXljBm34Cs-yM6TVusr+3kYFjr28STT3g056y3cH5Tmge~ASxBj z%|yb>$eF;WgrcOZf569sDZOVwoo%8>XO>XQOX1OyN9I-SQgrm;U;+#3OI(zrWyow3 zk==|{lt2xrQ%FIXOTejR>;wv(Pb8u8}BUpx?yd(Abh6? zsoO3VYWkeLnF43&@*#MQ9-i-d0t*xN-UEyNKeyNMHw|A(k(_6QKO=nKMCxD(W(Yop zsRQ)QeL4X3Lxp^L%wzi2-WVSsf61dqliPUM7srDB?Wm6Lzn0&{*}|IsKQW;02(Y&| zaTKv|`U(pSzuvR6Rduu$wzK_W-Y-7>7s?G$)U}&uK;<>vU}^^ns@Z!p+9?St1s)dG zK%y6xkPyyS1$~&6v{kl?Md6gwM|>mt6Upm>oa8RLD^8T{0?HC!Z>;(Bob7el(DV6x zi`I)$&E&ngwFS@bi4^xFLAn`=fzTC;aimE^!cMI2n@Vo%Ae-ne`RF((&5y6xsjjAZ zVguVoQ?Z9uk$2ON;ersE%PU*xGO@T*;j1BO5#TuZKEf(mB7|g7pcEA=nYJ{s3vlbg zd4-DUlD{*6o%Gc^N!Nptgay>j6E5;3psI+C3Q!1ZIbeCubW%w4pq9)MSDyB{HLm|k zxv-{$$A*pS@csolri$Ge<4VZ}e~78JOL-EVyrbxKra^d{?|NnPp86!q>t<&IP07?Z z^>~IK^k#OEKgRH+LjllZXk7iA>2cfH6+(e&9ku5poo~6y{GC5>(bRK7hwjiurqAiZ zg*DmtgY}v83IjE&AbiWgMyFbaRUPZ{lYiz$U^&Zt2YjG<%m((&_JUbZcfJ22(>bi5 z!J?<7AySj0JZ&<-qXX;mcV!f~>G=sB0KnjWca4}vrtunD^1TrpfeS^4dvFr!65knK zZh`d;*VOkPs4*-9kL>$GP0`(M!j~B;#x?Ba~&s6CopvO86oM?-? zOw#dIRc;6A6T?B`Qp%^<U5 z19x(ywSH$_N+Io!6;e?`tWaM$`=Db!gzx|lQ${DG!zb1Zl&|{kX0y6xvO1o z220r<-oaS^^R2pEyY;=Qllqpmue|5yI~D|iI!IGt@iod{Opz@*ml^w2bNs)p`M(Io z|E;;m*Xpjd9l)4G#KaWfV(t8YUn@A;nK^#xgv=LtnArX|vWQVuw3}B${h+frU2>9^ z!l6)!Uo4`5k`<<;E(ido7M6lKTgWezNLq>U*=uz&s=cc$1%>VrAeOoUtA|T6gO4>UNqsdK=NF*8|~*sl&wI=x9-EGiq*aqV!(VVXA57 zw9*o6Ir8Lj1npUXvlevtn(_+^X5rzdR>#(}4YcB9O50q97%rW2me5_L=%ffYPUSRc z!vv?Kv>dH994Qi>U(a<0KF6NH5b16enCp+mw^Hb3Xs1^tThFpz!3QuN#}KBbww`(h z7GO)1olDqy6?T$()R7y%NYx*B0k_2IBiZ14&8|JPFxeMF{vW>HF-Vi3+ZOI=+qP}n zw(+!WcTd~4ZJX1!ZM&y!+uyt=&i!+~d(V%GjH;-NsEEv6nS1TERt|RHh!0>W4+4pp z1-*EzAM~i`+1f(VEHI8So`S`akPfPTfq*`l{Fz`hS%k#JS0cjT2mS0#QLGf=J?1`he3W*;m4)ce8*WFq1sdP=~$5RlH1EdWm|~dCvKOi4*I_96{^95p#B<(n!d?B z=o`0{t+&OMwKcxiBECznJcfH!fL(z3OvmxP#oWd48|mMjpE||zdiTBdWelj8&Qosv zZFp@&UgXuvJw5y=q6*28AtxZzo-UUpkRW%ne+Ylf!V-0+uQXBW=5S1o#6LXNtY5!I z%Rkz#(S8Pjz*P7bqB6L|M#Er{|QLae-Y{KA>`^} z@lPjeX>90X|34S-7}ZVXe{wEei1<{*e8T-Nbj8JmD4iwcE+Hg_zhkPVm#=@b$;)h6 z<<6y`nPa`f3I6`!28d@kdM{uJOgM%`EvlQ5B2bL)Sl=|y@YB3KeOzz=9cUW3clPAU z^sYc}xf9{4Oj?L5MOlYxR{+>w=vJjvbyO5}ptT(o6dR|ygO$)nVCvNGnq(6;bHlBd zl?w-|plD8spjDF03g5ip;W3Z z><0{BCq!Dw;h5~#1BuQilq*TwEu)qy50@+BE4bX28+7erX{BD4H)N+7U`AVEuREE8 z;X?~fyhF-x_sRfHIj~6f(+^@H)D=ngP;mwJjxhQUbUdzk8f94Ab%59-eRIq?ZKrwD z(BFI=)xrUlgu(b|hAysqK<}8bslmNNeD=#JW*}^~Nrswn^xw*nL@Tx!49bfJecV&KC2G4q5a!NSv)06A_5N3Y?veAz;Gv+@U3R% z)~UA8-0LvVE{}8LVDOHzp~2twReqf}ODIyXMM6=W>kL|OHcx9P%+aJGYi_Om)b!xe zF40Vntn0+VP>o<$AtP&JANjXBn7$}C@{+@3I@cqlwR2MdwGhVPxlTIcRVu@Ho-wO` z_~Or~IMG)A_`6-p)KPS@cT9mu9RGA>dVh5wY$NM9-^c@N=hcNaw4ITjm;iWSP^ZX| z)_XpaI61<+La+U&&%2a z0za$)-wZP@mwSELo#3!PGTt$uy0C(nTT@9NX*r3Ctw6J~7A(m#8fE)0RBd`TdKfAT zCf@$MAxjP`O(u9s@c0Fd@|}UQ6qp)O5Q5DPCeE6mSIh|Rj{$cAVIWsA=xPKVKxdhg zLzPZ`3CS+KIO;T}0Ip!fAUaNU>++ZJZRk@I(h<)RsJUhZ&Ru9*!4Ptn;gX^~4E8W^TSR&~3BAZc#HquXn)OW|TJ`CTahk+{qe`5+ixON^zA9IFd8)kc%*!AiLu z>`SFoZ5bW-%7}xZ>gpJcx_hpF$2l+533{gW{a7ce^B9sIdmLrI0)4yivZ^(Vh@-1q zFT!NQK$Iz^xu%|EOK=n>ug;(7J4OnS$;yWmq>A;hsD_0oAbLYhW^1Vdt9>;(JIYjf zdb+&f&D4@4AS?!*XpH>8egQvSVX`36jMd>$+RgI|pEg))^djhGSo&#lhS~9%NuWfX zDDH;3T*GzRT@5=7ibO>N-6_XPBYxno@mD_3I#rDD?iADxX`! zh*v8^i*JEMzyN#bGEBz7;UYXki*Xr(9xXax(_1qVW=Ml)kSuvK$coq2A(5ZGhs_pF z$*w}FbN6+QDseuB9=fdp_MTs)nQf!2SlROQ!gBJBCXD&@-VurqHj0wm@LWX-TDmS= z71M__vAok|@!qgi#H&H%Vg-((ZfxPAL8AI{x|VV!9)ZE}_l>iWk8UPTGHs*?u7RfP z5MC&=c6X;XlUzrz5q?(!eO@~* zoh2I*%J7dF!!_!vXoSIn5o|wj1#_>K*&CIn{qSaRc&iFVxt*^20ngCL;QonIS>I5^ zMw8HXm>W0PGd*}Ko)f|~dDd%;Wu_RWI_d;&2g6R3S63Uzjd7dn%Svu-OKpx*o|N>F zZg=-~qLb~VRLpv`k zWSdfHh@?dp=s_X`{yxOlxE$4iuyS;Z-x!*E6eqmEm*j2bE@=ZI0YZ5%Yj29!5+J$4h{s($nakA`xgbO8w zi=*r}PWz#lTL_DSAu1?f%-2OjD}NHXp4pXOsCW;DS@BC3h-q4_l`<))8WgzkdXg3! zs1WMt32kS2E#L0p_|x+x**TFV=gn`m9BWlzF{b%6j-odf4{7a4y4Uaef@YaeuPhU8 zHBvRqN^;$Jizy+ z=zW{E5<>2gp$pH{M@S*!sJVQU)b*J5*bX4h>5VJve#Q6ga}cQ&iL#=(u+KroWrxa%8&~p{WEUF0il=db;-$=A;&9M{Rq`ouZ5m%BHT6%st%saGsD6)fQgLN}x@d3q>FC;=f%O3Cyg=Ke@Gh`XW za@RajqOE9UB6eE=zhG%|dYS)IW)&y&Id2n7r)6p_)vlRP7NJL(x4UbhlcFXWT8?K=%s7;z?Vjts?y2+r|uk8Wt(DM*73^W%pAkZa1Jd zNoE)8FvQA>Z`eR5Z@Ig6kS5?0h;`Y&OL2D&xnnAUzQz{YSdh0k zB3exx%A2TyI)M*EM6htrxSlep!Kk(P(VP`$p0G~f$smld6W1r_Z+o?=IB@^weq>5VYsYZZR@` z&XJFxd5{|KPZmVOSxc@^%71C@;z}}WhbF9p!%yLj3j%YOlPL5s>7I3vj25 z@xmf=*z%Wb4;Va6SDk9cv|r*lhZ`(y_*M@>q;wrn)oQx%B(2A$9(74>;$zmQ!4fN; z>XurIk-7@wZys<+7XL@0Fhe-f%*=(weaQEdR9Eh6>Kl-EcI({qoZqyzziGwpg-GM#251sK_ z=3|kitS!j%;fpc@oWn65SEL73^N&t>Ix37xgs= zYG%eQDJc|rqHFia0!_sm7`@lvcv)gfy(+KXA@E{3t1DaZ$DijWAcA)E0@X?2ziJ{v z&KOYZ|DdkM{}t+@{@*6ge}m%xfjIxi%qh`=^2Rwz@w0cCvZ&Tc#UmCDbVwABrON^x zEBK43FO@weA8s7zggCOWhMvGGE`baZ62cC)VHyy!5Zbt%ieH+XN|OLbAFPZWyC6)p z4P3%8sq9HdS3=ih^0OOlqTPbKuzQ?lBEI{w^ReUO{V?@`ARsL|S*%yOS=Z%sF)>-y z(LAQdhgAcuF6LQjRYfdbD1g4o%tV4EiK&ElLB&^VZHbrV1K>tHTO{#XTo>)2UMm`2 z^t4s;vnMQgf-njU-RVBRw0P0-m#d-u`(kq7NL&2T)TjI_@iKuPAK-@oH(J8?%(e!0Ir$yG32@CGUPn5w4)+9@8c&pGx z+K3GKESI4*`tYlmMHt@br;jBWTei&(a=iYslc^c#RU3Q&sYp zSG){)V<(g7+8W!Wxeb5zJb4XE{I|&Y4UrFWr%LHkdQ;~XU zgy^dH-Z3lmY+0G~?DrC_S4@=>0oM8Isw%g(id10gWkoz2Q%7W$bFk@mIzTCcIB(K8 zc<5h&ZzCdT=9n-D>&a8vl+=ZF*`uTvQviG_bLde*k>{^)&0o*b05x$MO3gVLUx`xZ z43j+>!u?XV)Yp@MmG%Y`+COH2?nQcMrQ%k~6#O%PeD_WvFO~Kct za4XoCM_X!c5vhRkIdV=xUB3xI2NNStK*8_Zl!cFjOvp-AY=D;5{uXj}GV{LK1~IE2 z|KffUiBaStRr;10R~K2VVtf{TzM7FaPm;Y(zQjILn+tIPSrJh&EMf6evaBKIvi42-WYU9Vhj~3< zZSM-B;E`g_o8_XTM9IzEL=9Lb^SPhe(f(-`Yh=X6O7+6ALXnTcUFpI>ekl6v)ZQeNCg2 z^H|{SKXHU*%nBQ@I3It0m^h+6tvI@FS=MYS$ZpBaG7j#V@P2ZuYySbp@hA# ze(kc;P4i_-_UDP?%<6>%tTRih6VBgScKU^BV6Aoeg6Uh(W^#J^V$Xo^4#Ekp ztqQVK^g9gKMTHvV7nb64UU7p~!B?>Y0oFH5T7#BSW#YfSB@5PtE~#SCCg3p^o=NkMk$<8- z6PT*yIKGrvne7+y3}_!AC8NNeI?iTY(&nakN>>U-zT0wzZf-RuyZk^X9H-DT_*wk= z;&0}6LsGtfVa1q)CEUPlx#(ED@-?H<1_FrHU#z5^P3lEB|qsxEyn%FOpjx z3S?~gvoXy~L(Q{Jh6*i~=f%9kM1>RGjBzQh_SaIDfSU_9!<>*Pm>l)cJD@wlyxpBV z4Fmhc2q=R_wHCEK69<*wG%}mgD1=FHi4h!98B-*vMu4ZGW~%IrYSLGU{^TuseqVgV zLP<%wirIL`VLyJv9XG_p8w@Q4HzNt-o;U@Au{7%Ji;53!7V8Rv0^Lu^Vf*sL>R(;c zQG_ZuFl)Mh-xEIkGu}?_(HwkB2jS;HdPLSxVU&Jxy9*XRG~^HY(f0g8Q}iqnVmgjI zfd=``2&8GsycjR?M%(zMjn;tn9agcq;&rR!Hp z$B*gzHsQ~aXw8c|a(L^LW(|`yGc!qOnV(ZjU_Q-4z1&0;jG&vAKuNG=F|H?@m5^N@ zq{E!1n;)kNTJ>|Hb2ODt-7U~-MOIFo%9I)_@7fnX+eMMNh>)V$IXesJpBn|uo8f~#aOFytCT zf9&%MCLf8mp4kwHTcojWmM3LU=#|{3L>E}SKwOd?%{HogCZ_Z1BSA}P#O(%H$;z7XyJ^sjGX;j5 zrzp>|Ud;*&VAU3x#f{CKwY7Vc{%TKKqmB@oTHA9;>?!nvMA;8+Jh=cambHz#J18x~ zs!dF>$*AnsQ{{82r5Aw&^7eRCdvcgyxH?*DV5(I$qXh^zS>us*I66_MbL8y4d3ULj z{S(ipo+T3Ag!+5`NU2sc+@*m{_X|&p#O-SAqF&g_n7ObB82~$p%fXA5GLHMC+#qqL zdt`sJC&6C2)=juQ_!NeD>U8lDVpAOkW*khf7MCcs$A(wiIl#B9HM%~GtQ^}yBPjT@ z+E=|A!Z?A(rwzZ;T}o6pOVqHzTr*i;Wrc%&36kc@jXq~+w8kVrs;%=IFdACoLAcCAmhFNpbP8;s`zG|HC2Gv?I~w4ITy=g$`0qMQdkijLSOtX6xW%Z9Nw<;M- zMN`c7=$QxN00DiSjbVt9Mi6-pjv*j(_8PyV-il8Q-&TwBwH1gz1uoxs6~uU}PrgWB zIAE_I-a1EqlIaGQNbcp@iI8W1sm9fBBNOk(k&iLBe%MCo#?xI$%ZmGA?=)M9D=0t7 zc)Q0LnI)kCy{`jCGy9lYX%mUsDWwsY`;jE(;Us@gmWPqjmXL+Hu#^;k%eT>{nMtzj zsV`Iy6leTA8-PndszF;N^X@CJrTw5IIm!GPeu)H2#FQitR{1p;MasQVAG3*+=9FYK zw*k!HT(YQorfQj+1*mCV458(T5=fH`um$gS38hw(OqVMyunQ;rW5aPbF##A3fGH6h z@W)i9Uff?qz`YbK4c}JzQpuxuE3pcQO)%xBRZp{zJ^-*|oryTxJ-rR+MXJ)!f=+pp z10H|DdGd2exhi+hftcYbM0_}C0ZI-2vh+$fU1acsB-YXid7O|=9L!3e@$H*6?G*Zp z%qFB(sgl=FcC=E4CYGp4CN>=M8#5r!RU!u+FJVlH6=gI5xHVD&k;Ta*M28BsxfMV~ zLz+@6TxnfLhF@5=yQo^1&S}cmTN@m!7*c6z;}~*!hNBjuE>NLVl2EwN!F+)0$R1S! zR|lF%n!9fkZ@gPW|x|B={V6x3`=jS*$Pu0+5OWf?wnIy>Y1MbbGSncpKO0qE(qO=ts z!~@&!N`10S593pVQu4FzpOh!tvg}p%zCU(aV5=~K#bKi zHdJ1>tQSrhW%KOky;iW+O_n;`l9~omqM%sdxdLtI`TrJzN6BQz+7xOl*rM>xVI2~# z)7FJ^Dc{DC<%~VS?@WXzuOG$YPLC;>#vUJ^MmtbSL`_yXtNKa$Hk+l-c!aC7gn(Cg ze?YPYZ(2Jw{SF6MiO5(%_pTo7j@&DHNW`|lD`~{iH+_eSTS&OC*2WTT*a`?|9w1dh zh1nh@$a}T#WE5$7Od~NvSEU)T(W$p$s5fe^GpG+7fdJ9=enRT9$wEk+ZaB>G3$KQO zgq?-rZZnIv!p#>Ty~}c*Lb_jxJg$eGM*XwHUwuQ|o^}b3^T6Bxx{!?va8aC@-xK*H ztJBFvFfsSWu89%@b^l3-B~O!CXs)I6Y}y#0C0U0R0WG zybjroj$io0j}3%P7zADXOwHwafT#uu*zfM!oD$6aJx7+WL%t-@6^rD_a_M?S^>c;z zMK580bZXo1f*L$CuMeM4Mp!;P@}b~$cd(s5*q~FP+NHSq;nw3fbWyH)i2)-;gQl{S zZO!T}A}fC}vUdskGSq&{`oxt~0i?0xhr6I47_tBc`fqaSrMOzR4>0H^;A zF)hX1nfHs)%Zb-(YGX;=#2R6C{BG;k=?FfP?9{_uFLri~-~AJ;jw({4MU7e*d)?P@ zXX*GkNY9ItFjhwgAIWq7Y!ksbMzfqpG)IrqKx9q{zu%Mdl+{Dis#p9q`02pr1LG8R z@As?eG!>IoROgS!@J*to<27coFc1zpkh?w=)h9CbYe%^Q!Ui46Y*HO0mr% zEff-*$ndMNw}H2a5@BsGj5oFfd!T(F&0$<{GO!Qdd?McKkorh=5{EIjDTHU`So>8V zBA-fqVLb2;u7UhDV1xMI?y>fe3~4urv3%PX)lDw+HYa;HFkaLqi4c~VtCm&Ca+9C~ zge+67hp#R9`+Euq59WhHX&7~RlXn=--m8$iZ~~1C8cv^2(qO#X0?vl91gzUKBeR1J z^p4!!&7)3#@@X&2aF2-)1Ffcc^F8r|RtdL2X%HgN&XU-KH2SLCbpw?J5xJ*!F-ypZ zMG%AJ!Pr&}`LW?E!K~=(NJxuSVTRCGJ$2a*Ao=uUDSys!OFYu!Vs2IT;xQ6EubLIl z+?+nMGeQQhh~??0!s4iQ#gm3!BpMpnY?04kK375e((Uc7B3RMj;wE?BCoQGu=UlZt!EZ1Q*auI)dj3Jj{Ujgt zW5hd~-HWBLI_3HuO) zNrb^XzPsTIb=*a69wAAA3J6AAZZ1VsYbIG}a`=d6?PjM)3EPaDpW2YP$|GrBX{q*! z$KBHNif)OKMBCFP5>!1d=DK>8u+Upm-{hj5o|Wn$vh1&K!lVfDB&47lw$tJ?d5|=B z^(_9=(1T3Fte)z^>|3**n}mIX;mMN5v2F#l(q*CvU{Ga`@VMp#%rQkDBy7kYbmb-q z<5!4iuB#Q_lLZ8}h|hPODI^U6`gzLJre9u3k3c#%86IKI*^H-@I48Bi*@avYm4v!n0+v zWu{M{&F8#p9cx+gF0yTB_<2QUrjMPo9*7^-uP#~gGW~y3nfPAoV%amgr>PSyVAd@l)}8#X zR5zV6t*uKJZL}?NYvPVK6J0v4iVpwiN|>+t3aYiZSp;m0!(1`bHO}TEtWR1tY%BPB z(W!0DmXbZAsT$iC13p4f>u*ZAy@JoLAkJhzFf1#4;#1deO8#8d&89}en&z!W&A3++^1(;>0SB1*54d@y&9Pn;^IAf3GiXbfT`_>{R+Xv; zQvgL>+0#8-laO!j#-WB~(I>l0NCMt_;@Gp_f0#^c)t?&#Xh1-7RR0@zPyBz!U#0Av zT?}n({(p?p7!4S2ZBw)#KdCG)uPnZe+U|0{BW!m)9 zi_9$F?m<`2!`JNFv+w8MK_K)qJ^aO@7-Ig>cM4-r0bi=>?B_2mFNJ}aE3<+QCzRr*NA!QjHw# z`1OsvcoD0?%jq{*7b!l|L1+Tw0TTAM4XMq7*ntc-Ived>Sj_ZtS|uVdpfg1_I9knY z2{GM_j5sDC7(W&}#s{jqbybqJWyn?{PW*&cQIU|*v8YGOKKlGl@?c#TCnmnAkAzV- zmK={|1G90zz=YUvC}+fMqts0d4vgA%t6Jhjv?d;(Z}(Ep8fTZfHA9``fdUHkA+z3+ zhh{ohP%Bj?T~{i0sYCQ}uC#5BwN`skI7`|c%kqkyWIQ;!ysvA8H`b-t()n6>GJj6xlYDu~8qX{AFo$Cm3d|XFL=4uvc?Keb zzb0ZmMoXca6Mob>JqkNuoP>B2Z>D`Q(TvrG6m`j}-1rGP!g|qoL=$FVQYxJQjFn33lODt3Wb1j8VR zlR++vIT6^DtYxAv_hxupbLLN3e0%A%a+hWTKDV3!Fjr^cWJ{scsAdfhpI)`Bms^M6 zQG$waKgFr=c|p9Piug=fcJvZ1ThMnNhQvBAg-8~b1?6wL*WyqXhtj^g(Ke}mEfZVM zJuLNTUVh#WsE*a6uqiz`b#9ZYg3+2%=C(6AvZGc=u&<6??!slB1a9K)=VL zY9EL^mfyKnD zSJyYBc_>G;5RRnrNgzJz#Rkn3S1`mZgO`(r5;Hw6MveN(URf_XS-r58Cn80K)ArH4 z#Rrd~LG1W&@ttw85cjp8xV&>$b%nSXH_*W}7Ch2pg$$c0BdEo-HWRTZcxngIBJad> z;C>b{jIXjb_9Jis?NZJsdm^EG}e*pR&DAy0EaSGi3XWTa(>C%tz1n$u?5Fb z1qtl?;_yjYo)(gB^iQq?=jusF%kywm?CJP~zEHi0NbZ);$(H$w(Hy@{i>$wcVRD_X|w-~(0Z9BJyh zhNh;+eQ9BEIs;tPz%jSVnfCP!3L&9YtEP;svoj_bNzeGSQIAjd zBss@A;)R^WAu-37RQrM%{DfBNRx>v!G31Z}8-El9IOJlb_MSoMu2}GDYycNaf>uny z+8xykD-7ONCM!APry_Lw6-yT>5!tR}W;W`C)1>pxSs5o1z#j7%m=&=7O4hz+Lsqm` z*>{+xsabZPr&X=}G@obTb{nPTkccJX8w3CG7X+1+t{JcMabv~UNv+G?txRqXib~c^Mo}`q{$`;EBNJ;#F*{gvS12kV?AZ%O0SFB$^ zn+}!HbmEj}w{Vq(G)OGAzH}R~kS^;(-s&=ectz8vN!_)Yl$$U@HNTI-pV`LSj7Opu zTZ5zZ)-S_{GcEQPIQXLQ#oMS`HPu{`SQiAZ)m1at*Hy%3xma|>o`h%E%8BEbi9p0r zVjcsh<{NBKQ4eKlXU|}@XJ#@uQw*$4BxKn6#W~I4T<^f99~(=}a`&3(ur8R9t+|AQ zWkQx7l}wa48-jO@ft2h+7qn%SJtL%~890FG0s5g*kNbL3I&@brh&f6)TlM`K^(bhr zJWM6N6x3flOw$@|C@kPi7yP&SP?bzP-E|HSXQXG>7gk|R9BTj`e=4de9C6+H7H7n# z#GJeVs1mtHhLDmVO?LkYRQc`DVOJ_vdl8VUihO-j#t=0T3%Fc1f9F73ufJz*adn*p zc%&vi(4NqHu^R>sAT_0EDjVR8bc%wTz#$;%NU-kbDyL_dg0%TFafZwZ?5KZpcuaO54Z9hX zD$u>q!-9`U6-D`E#`W~fIfiIF5_m6{fvM)b1NG3xf4Auw;Go~Fu7cth#DlUn{@~yu z=B;RT*dp?bO}o%4x7k9v{r=Y@^YQ^UUm(Qmliw8brO^=NP+UOohLYiaEB3^DB56&V zK?4jV61B|1Uj_5fBKW;8LdwOFZKWp)g{B%7g1~DgO&N& z#lisxf?R~Z@?3E$Mms$$JK8oe@X`5m98V*aV6Ua}8Xs2#A!{x?IP|N(%nxsH?^c{& z@vY&R1QmQs83BW28qAmJfS7MYi=h(YK??@EhjL-t*5W!p z^gYX!Q6-vBqcv~ruw@oMaU&qp0Fb(dbVzm5xJN%0o_^@fWq$oa3X?9s%+b)x4w-q5Koe(@j6Ez7V@~NRFvd zfBH~)U5!ix3isg`6be__wBJp=1@yfsCMw1C@y+9WYD9_C%{Q~7^0AF2KFryfLlUP# zwrtJEcH)jm48!6tUcxiurAMaiD04C&tPe6DI0#aoqz#Bt0_7_*X*TsF7u*zv(iEfA z;$@?XVu~oX#1YXtceQL{dSneL&*nDug^OW$DSLF0M1Im|sSX8R26&)<0Fbh^*l6!5wfSu8MpMoh=2l z^^0Sr$UpZp*9oqa23fcCfm7`ya2<4wzJ`Axt7e4jJrRFVf?nY~2&tRL* zd;6_njcz01c>$IvN=?K}9ie%Z(BO@JG2J}fT#BJQ+f5LFSgup7i!xWRKw6)iITjZU z%l6hPZia>R!`aZjwCp}I zg)%20;}f+&@t;(%5;RHL>K_&7MH^S+7<|(SZH!u zznW|jz$uA`P9@ZWtJgv$EFp>)K&Gt+4C6#*khZQXS*S~6N%JDT$r`aJDs9|uXWdbg zBwho$phWx}x!qy8&}6y5Vr$G{yGSE*r$^r{}pw zVTZKvikRZ`J_IJrjc=X1uw?estdwm&bEahku&D04HD+0Bm~q#YGS6gp!KLf$A{%Qd z&&yX@Hp>~(wU{|(#U&Bf92+1i&Q*-S+=y=3pSZy$#8Uc$#7oiJUuO{cE6=tsPhwPe| zxQpK>`Dbka`V)$}e6_OXKLB%i76~4N*zA?X+PrhH<&)}prET;kel24kW%+9))G^JI zsq7L{P}^#QsZViX%KgxBvEugr>ZmFqe^oAg?{EI=&_O#e)F3V#rc z8$4}0Zr19qd3tE4#$3_f=Bbx9oV6VO!d3(R===i-7p=Vj`520w0D3W6lQfY48}!D* z&)lZMG;~er2qBoI2gsX+Ts-hnpS~NYRDtPd^FPzn!^&yxRy#CSz(b&E*tL|jIkq|l zf%>)7Dtu>jCf`-7R#*GhGn4FkYf;B$+9IxmqH|lf6$4irg{0ept__%)V*R_OK=T06 zyT_m-o@Kp6U{l5h>W1hGq*X#8*y@<;vsOFqEjTQXFEotR+{3}ODDnj;o0@!bB5x=N z394FojuGOtVKBlVRLtHp%EJv_G5q=AgF)SKyRN5=cGBjDWv4LDn$IL`*=~J7u&Dy5 zrMc83y+w^F&{?X(KOOAl-sWZDb{9X9#jrQtmrEXD?;h-}SYT7yM(X_6qksM=K_a;Z z3u0qT0TtaNvDER_8x*rxXw&C^|h{P1qxK|@pS7vdlZ#P z7PdB7MmC2}%sdzAxt>;WM1s0??`1983O4nFK|hVAbHcZ3x{PzytQLkCVk7hA!Lo` zEJH?4qw|}WH{dc4z%aB=0XqsFW?^p=X}4xnCJXK%c#ItOSjdSO`UXJyuc8bh^Cf}8 z@Ht|vXd^6{Fgai8*tmyRGmD_s_nv~r^Fy7j`Bu`6=G)5H$i7Q7lvQnmea&TGvJp9a|qOrUymZ$6G|Ly z#zOCg++$3iB$!6!>215A4!iryregKuUT344X)jQb3|9qY>c0LO{6Vby05n~VFzd?q zgGZv&FGlkiH*`fTurp>B8v&nSxNz)=5IF$=@rgND4d`!AaaX;_lK~)-U8la_Wa8i?NJC@BURO*sUW)E9oyv3RG^YGfN%BmxzjlT)bp*$<| zX3tt?EAy<&K+bhIuMs-g#=d1}N_?isY)6Ay$mDOKRh z4v1asEGWoAp=srraLW^h&_Uw|6O+r;wns=uwYm=JN4Q!quD8SQRSeEcGh|Eb5Jg8m zOT}u;N|x@aq)=&;wufCc^#)5U^VcZw;d_wwaoh9$p@Xrc{DD6GZUqZ ziC6OT^zSq@-lhbgR8B+e;7_Giv;DK5gn^$bs<6~SUadiosfewWDJu`XsBfOd1|p=q zE>m=zF}!lObA%ePey~gqU8S6h-^J2Y?>7)L2+%8kV}Gp=h`Xm_}rlm)SyUS=`=S7msKu zC|T!gPiI1rWGb1z$Md?0YJQ;%>uPLOXf1Z>N~`~JHJ!^@D5kSXQ4ugnFZ>^`zH8CAiZmp z6Ms|#2gcGsQ{{u7+Nb9sA?U>(0e$5V1|WVwY`Kn)rsnnZ4=1u=7u!4WexZD^IQ1Jk zfF#NLe>W$3m&C^ULjdw+5|)-BSHwpegdyt9NYC{3@QtMfd8GrIWDu`gd0nv-3LpGCh@wgBaG z176tikL!_NXM+Bv#7q^cyn9$XSeZR6#!B4JE@GVH zoobHZN_*RF#@_SVYKkQ_igme-Y5U}cV(hkR#k1c{bQNMji zU7aE`?dHyx=1`kOYZo_8U7?3-7vHOp`Qe%Z*i+FX!s?6huNp0iCEW-Z7E&jRWmUW_ z67j>)Ew!yq)hhG4o?^z}HWH-e=es#xJUhDRc4B51M4~E-l5VZ!&zQq`gWe`?}#b~7w1LH4Xa-UCT5LXkXQWheBa2YJYbyQ zl1pXR%b(KCXMO0OsXgl0P0Og<{(@&z1aokU-Pq`eQq*JYgt8xdFQ6S z6Z3IFSua8W&M#`~*L#r>Jfd6*BzJ?JFdBR#bDv$_0N!_5vnmo@!>vULcDm`MFU823 zpG9pqjqz^FE5zMDoGqhs5OMmC{Y3iVcl>F}5Rs24Y5B^mYQ;1T&ks@pIApHOdrzXF z-SdX}Hf{X;TaSxG_T$0~#RhqKISGKNK47}0*x&nRIPtmdwxc&QT3$8&!3fWu1eZ_P zJveQj^hJL#Sn!*4k`3}(d(aasl&7G0j0-*_2xtAnoX1@9+h zO#c>YQg60Z;o{Bi=3i7S`Ic+ZE>K{(u|#)9y}q*j8uKQ1^>+(BI}m%1v3$=4ojGBc zm+o1*!T&b}-lVvZqIUBc8V}QyFEgm#oyIuC{8WqUNV{Toz`oxhYpP!_p2oHHh5P@iB*NVo~2=GQm+8Yrkm2Xjc_VyHg1c0>+o~@>*Qzo zHVBJS>$$}$_4EniTI;b1WShX<5-p#TPB&!;lP!lBVBbLOOxh6FuYloD%m;n{r|;MU3!q4AVkua~fieeWu2 zQAQ$ue(IklX6+V;F1vCu-&V?I3d42FgWgsb_e^29ol}HYft?{SLf>DrmOp9o!t>I^ zY7fBCk+E8n_|apgM|-;^=#B?6RnFKlN`oR)`e$+;D=yO-(U^jV;rft^G_zl`n7qnM zL z*-Y4Phq+ZI1$j$F-f;`CD#|`-T~OM5Q>x}a>B~Gb3-+9i>Lfr|Ca6S^8g*{*?_5!x zH_N!SoRP=gX1?)q%>QTY!r77e2j9W(I!uAz{T`NdNmPBBUzi2{`XMB^zJGGwFWeA9 z{fk33#*9SO0)DjROug+(M)I-pKA!CX;IY(#gE!UxXVsa)X!UftIN98{pt#4MJHOhY zM$_l}-TJlxY?LS6Nuz1T<44m<4i^8k@D$zuCPrkmz@sdv+{ciyFJG2Zwy&%c7;atIeTdh!a(R^QXnu1Oq1b42*OQFWnyQ zWeQrdvP|w_idy53Wa<{QH^lFmEd+VlJkyiC>6B#s)F;w-{c;aKIm;Kp50HnA-o3lY z9B~F$gJ@yYE#g#X&3ADx&tO+P_@mnQTz9gv30_sTsaGXkfNYXY{$(>*PEN3QL>I!k zp)KibPhrfX3%Z$H6SY`rXGYS~143wZrG2;=FLj50+VM6soI~up_>fU(2Wl@{BRsMi zO%sL3x?2l1cXTF)k&moNsHfQrQ+wu(gBt{sk#CU=UhrvJIncy@tJX5klLjgMn>~h= zg|FR&;@eh|C7`>s_9c~0-{IAPV){l|Ts`i=)AW;d9&KPc3fMeoTS%8@V~D8*h;&(^>yjT84MM}=%#LS7shLAuuj(0VAYoozhWjq z4LEr?wUe2^WGwdTIgWBkDUJa>YP@5d9^Rs$kCXmMRxuF*YMVrn?0NFyPl}>`&dqZb z<5eqR=ZG3>n2{6v6BvJ`YBZeeTtB88TAY(x0a58EWyuf>+^|x8Qa6wA|1Nb_p|nA zWWa}|z8a)--Wj`LqyFk_a3gN2>5{Rl_wbW?#by7&i*^hRknK%jwIH6=dQ8*-_{*x0j^DUfMX0`|K@6C<|1cgZ~D(e5vBFFm;HTZF(!vT8=T$K+|F)x3kqzBV4-=p1V(lzi(s7jdu0>LD#N=$Lk#3HkG!a zIF<7>%B7sRNzJ66KrFV76J<2bdYhxll0y2^_rdG=I%AgW4~)1Nvz=$1UkE^J%BxLo z+lUci`UcU062os*=`-j4IfSQA{w@y|3}Vk?i;&SSdh8n+$iHA#%ERL{;EpXl6u&8@ zzg}?hkEOUOJt?ZL=pWZFJ19mI1@P=$U5*Im1e_8Z${JsM>Ov?nh8Z zP5QvI!{Jy@&BP48%P2{Jr_VgzW;P@7)M9n|lDT|Ep#}7C$&ud&6>C^5ZiwKIg2McPU(4jhM!BD@@L(Gd*Nu$ji(ljZ<{FIeW_1Mmf;76{LU z-ywN~=uNN)Xi6$<12A9y)K%X|(W0p|&>>4OXB?IiYr||WKDOJPxiSe01NSV-h24^L z_>m$;|C+q!Mj**-qQ$L-*++en(g|hw;M!^%_h-iDjFHLo-n3JpB;p?+o2;`*jpvJU zLY^lt)Un4joij^^)O(CKs@7E%*!w>!HA4Q?0}oBJ7Nr8NQ7QmY^4~jvf0-`%waOLn zdNjAPaC0_7c|RVhw)+71NWjRi!y>C+Bl;Z`NiL^zn2*0kmj5gyhCLCxts*cWCdRI| zjsd=sT5BVJc^$GxP~YF$-U{-?kW6r@^vHXB%{CqYzU@1>dzf#3SYedJG-Rm6^RB7s zGM5PR(yKPKR)>?~vpUIeTP7A1sc8-knnJk*9)3t^e%izbdm>Y=W{$wm(cy1RB-19i za#828DMBY+ps#7Y8^6t)=Ea@%Nkt)O6JCx|ybC;Ap}Z@Zw~*}3P>MZLPb4Enxz9Wf zssobT^(R@KuShj8>@!1M7tm|2%-pYYDxz-5`rCbaTCG5{;Uxm z*g=+H1X8{NUvFGzz~wXa%Eo};I;~`37*WrRU&K0dPSB$yk(Z*@K&+mFal^?c zurbqB-+|Kb5|sznT;?Pj!+kgFY1#Dr;_%A(GIQC{3ct|{*Bji%FNa6c-thbpBkA;U zURV!Dr&X{0J}iht#-Qp2=xzuh(fM>zRoiGrYl5ttw2#r34gC41CCOC31m~^UPTK@s z6;A@)7O7_%C)>bnAXerYuAHdE93>j2N}H${zEc6&SbZ|-fiG*-qtGuy-qDelH(|u$ zorf8_T6Zqe#Ub!+e3oSyrskt_HyW_^5lrWt#30l)tHk|j$@YyEkXUOV;6B51L;M@=NIWZXU;GrAa(LGxO%|im%7F<-6N;en0Cr zLH>l*y?pMwt`1*cH~LdBPFY_l;~`N!Clyfr;7w<^X;&(ZiVdF1S5e(+Q%60zgh)s4 zn2yj$+mE=miVERP(g8}G4<85^-5f@qxh2ec?n+$A_`?qN=iyT1?U@t?V6DM~BIlBB z>u~eXm-aE>R0sQy!-I4xtCNi!!qh?R1!kKf6BoH2GG{L4%PAz0{Sh6xpuyI%*~u)s z%rLuFl)uQUCBQAtMyN;%)zFMx4loh7uTfKeB2Xif`lN?2gq6NhWhfz0u5WP9J>=V2 zo{mLtSy&BA!mSzs&CrKWq^y40JF5a&GSXIi2= z{EYb59J4}VwikL4P=>+mc6{($FNE@e=VUwG+KV21;<@lrN`mnz5jYGASyvz7BOG_6(p^eTxD-4O#lROgon;R35=|nj#eHIfJBYPWG>H>`dHKCDZ3`R{-?HO0mE~(5_WYcFmp8sU?wr*UkAQiNDGc6T zA%}GOLXlOWqL?WwfHO8MB#8M8*~Y*gz;1rWWoVSXP&IbKxbQ8+s%4Jnt?kDsq7btI zCDr0PZ)b;B%!lu&CT#RJzm{l{2fq|BcY85`w~3LSK<><@(2EdzFLt9Y_`;WXL6x`0 zDoQ?=?I@Hbr;*VVll1Gmd8*%tiXggMK81a+T(5Gx6;eNb8=uYn z5BG-0g>pP21NPn>$ntBh>`*})Fl|38oC^9Qz>~MAazH%3Q~Qb!ALMf$srexgPZ2@&c~+hxRi1;}+)-06)!#Mq<6GhP z-Q?qmgo${aFBApb5p}$1OJKTClfi8%PpnczyVKkoHw7Ml9e7ikrF0d~UB}i3vizos zXW4DN$SiEV9{faLt5bHy2a>33K%7Td-n5C*N;f&ZqAg#2hIqEb(y<&f4u5BWJ>2^4 z414GosL=Aom#m&=x_v<0-fp1r%oVJ{T-(xnomNJ(Dryv zh?vj+%=II_nV+@NR+(!fZZVM&(W6{6%9cm+o+Z6}KqzLw{(>E86uA1`_K$HqINlb1 zKelh3-jr2I9V?ych`{hta9wQ2c9=MM`2cC{m6^MhlL2{DLv7C^j z$xXBCnDl_;l|bPGMX@*tV)B!c|4oZyftUlP*?$YU9C_eAsuVHJ58?)zpbr30P*C`T z7y#ao`uE-SOG(Pi+`$=e^mle~)pRrdwL5)N;o{gpW21of(QE#U6w%*C~`v-z0QqBML!!5EeYA5IQB0 z^l01c;L6E(iytN!LhL}wfwP7W9PNAkb+)Cst?qg#$n;z41O4&v+8-zPs+XNb-q zIeeBCh#ivnFLUCwfS;p{LC0O7tm+Sf9Jn)~b%uwP{%69;QC)Ok0t%*a5M+=;y8j=v z#!*pp$9@!x;UMIs4~hP#pnfVc!%-D<+wsG@R2+J&%73lK|2G!EQC)O05TCV=&3g)C!lT=czLpZ@Sa%TYuoE?v8T8`V;e$#Zf2_Nj6nvBgh1)2 GZ~q4|mN%#X literal 0 HcmV?d00001 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..e2847c8 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100644 index 0000000..f5feea6 --- /dev/null +++ b/gradlew @@ -0,0 +1,252 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..9d21a21 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,94 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..a79ae85 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1 @@ +rootProject.name = "qr-access-admin" diff --git a/src/main/frontend/generated/flow/generated-flow-imports.d.ts b/src/main/frontend/generated/flow/generated-flow-imports.d.ts new file mode 100644 index 0000000..693da49 --- /dev/null +++ b/src/main/frontend/generated/flow/generated-flow-imports.d.ts @@ -0,0 +1 @@ +export {} \ No newline at end of file diff --git a/src/main/frontend/generated/flow/generated-flow-imports.js b/src/main/frontend/generated/flow/generated-flow-imports.js new file mode 100644 index 0000000..1ec740e --- /dev/null +++ b/src/main/frontend/generated/flow/generated-flow-imports.js @@ -0,0 +1,12 @@ +import '@vaadin/polymer-legacy-adapter/style-modules.js'; +import '@vaadin/app-layout/src/vaadin-app-layout.js'; +import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js'; +const loadOnDemand = (key) => { return Promise.resolve(0); } +window.Vaadin = window.Vaadin || {}; +window.Vaadin.Flow = window.Vaadin.Flow || {}; +window.Vaadin.Flow.loadOnDemand = loadOnDemand; +window.Vaadin.Flow.resetFocus = () => { + let ae=document.activeElement; + while(ae&&ae.shadowRoot) ae = ae.shadowRoot.activeElement; + return !ae || ae.blur() || ae.focus() || true; +} \ No newline at end of file diff --git a/src/main/frontend/generated/flow/generated-flow-webcomponent-imports.js b/src/main/frontend/generated/flow/generated-flow-webcomponent-imports.js new file mode 100644 index 0000000..7d48b70 --- /dev/null +++ b/src/main/frontend/generated/flow/generated-flow-webcomponent-imports.js @@ -0,0 +1,14 @@ +import { injectGlobalWebcomponentCss } from 'Frontend/generated/jar-resources/theme-util.js'; + +import '@vaadin/polymer-legacy-adapter/style-modules.js'; +import '@vaadin/app-layout/src/vaadin-app-layout.js'; +import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js'; +const loadOnDemand = (key) => { return Promise.resolve(0); } +window.Vaadin = window.Vaadin || {}; +window.Vaadin.Flow = window.Vaadin.Flow || {}; +window.Vaadin.Flow.loadOnDemand = loadOnDemand; +window.Vaadin.Flow.resetFocus = () => { + let ae=document.activeElement; + while(ae&&ae.shadowRoot) ae = ae.shadowRoot.activeElement; + return !ae || ae.blur() || ae.focus() || true; +} \ No newline at end of file diff --git a/src/main/frontend/generated/jar-resources/Flow.d.ts b/src/main/frontend/generated/jar-resources/Flow.d.ts new file mode 100644 index 0000000..23bf223 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/Flow.d.ts @@ -0,0 +1,77 @@ +export interface FlowConfig { + imports?: () => Promise; +} +interface AppConfig { + productionMode: boolean; + appId: string; + uidl: any; +} +interface AppInitResponse { + appConfig: AppConfig; + pushScript?: string; +} +interface Router { + render: (ctx: NavigationParameters, shouldUpdateHistory: boolean) => Promise; +} +interface HTMLRouterContainer extends HTMLElement { + onBeforeEnter?: (ctx: NavigationParameters, cmd: PreventAndRedirectCommands, router: Router) => void | Promise; + onBeforeLeave?: (ctx: NavigationParameters, cmd: PreventCommands, router: Router) => void | Promise; + serverConnected?: (cancel: boolean, url?: NavigationParameters) => void; + serverPaused?: () => void; +} +interface FlowRoute { + action: (params: NavigationParameters) => Promise; + path: string; +} +export interface NavigationParameters { + pathname: string; + search?: string; +} +export interface PreventCommands { + prevent: () => any; + continue?: () => any; +} +export interface PreventAndRedirectCommands extends PreventCommands { + redirect: (route: string) => any; +} +/** + * Client API for flow UI operations. + */ +export declare class Flow { + config: FlowConfig; + response?: AppInitResponse; + pathname: string; + container: HTMLRouterContainer; + private isActive; + private baseRegex; + private appShellTitle; + private navigation; + constructor(config?: FlowConfig); + /** + * Return a `route` object for vaadin-router in an one-element array. + * + * The `FlowRoute` object `path` property handles any route, + * and the `action` returns the flow container without updating the content, + * delaying the actual Flow server call to the `onBeforeEnter` phase. + * + * This is a specific API for its use with `vaadin-router`. + */ + get serverSideRoutes(): [FlowRoute]; + loadingStarted(): void; + loadingFinished(): void; + private get action(); + private flowLeave; + private flowNavigate; + private getFlowRoutePath; + private getFlowRouteQuery; + private flowInit; + private loadScript; + private findNonce; + private injectAppIdScript; + private flowInitClient; + private flowInitUi; + private addConnectionIndicator; + private offlineStubAction; + private isFlowClientLoaded; +} +export {}; diff --git a/src/main/frontend/generated/jar-resources/Flow.js b/src/main/frontend/generated/jar-resources/Flow.js new file mode 100644 index 0000000..6344f67 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/Flow.js @@ -0,0 +1,394 @@ +import { ConnectionIndicator, ConnectionState } from '@vaadin/common-frontend'; +class FlowUiInitializationError extends Error { +} +// flow uses body for keeping references +const flowRoot = window.document.body; +const $wnd = window; +const ROOT_NODE_ID = 1; // See StateTree.java +function getClients() { + return Object.keys($wnd.Vaadin.Flow.clients) + .filter((key) => key !== 'TypeScript') + .map((id) => $wnd.Vaadin.Flow.clients[id]); +} +function sendEvent(eventName, data) { + getClients().forEach((client) => client.sendEventMessage(ROOT_NODE_ID, eventName, data)); +} +/** + * Client API for flow UI operations. + */ +export class Flow { + constructor(config) { + this.response = undefined; + this.pathname = ''; + // flag used to inform Testbench whether a server route is in progress + this.isActive = false; + this.baseRegex = /^\//; + this.navigation = ''; + flowRoot.$ = flowRoot.$ || []; + this.config = config || {}; + // TB checks for the existence of window.Vaadin.Flow in order + // to consider that TB needs to wait for `initFlow()`. + $wnd.Vaadin = $wnd.Vaadin || {}; + $wnd.Vaadin.Flow = $wnd.Vaadin.Flow || {}; + $wnd.Vaadin.Flow.clients = { + TypeScript: { + isActive: () => this.isActive + } + }; + // Regular expression used to remove the app-context + const elm = document.head.querySelector('base'); + this.baseRegex = new RegExp(`^${ + // IE11 does not support document.baseURI + (document.baseURI || (elm && elm.href) || '/').replace(/^https?:\/\/[^/]+/i, '')}`); + this.appShellTitle = document.title; + // Put a vaadin-connection-indicator in the dom + this.addConnectionIndicator(); + } + /** + * Return a `route` object for vaadin-router in an one-element array. + * + * The `FlowRoute` object `path` property handles any route, + * and the `action` returns the flow container without updating the content, + * delaying the actual Flow server call to the `onBeforeEnter` phase. + * + * This is a specific API for its use with `vaadin-router`. + */ + get serverSideRoutes() { + return [ + { + path: '(.*)', + action: this.action + } + ]; + } + loadingStarted() { + // Make Testbench know that server request is in progress + this.isActive = true; + $wnd.Vaadin.connectionState.loadingStarted(); + } + loadingFinished() { + // Make Testbench know that server request has finished + this.isActive = false; + $wnd.Vaadin.connectionState.loadingFinished(); + if ($wnd.Vaadin.listener) { + // Listeners registered, do not register again. + return; + } + $wnd.Vaadin.listener = {}; + // Listen for click on router-links -> 'link' navigation trigger + // and on nodes -> 'client' navigation trigger. + // Use capture phase to detect prevented / stopped events. + document.addEventListener('click', (_e) => { + if (_e.target) { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + if (_e.target.hasAttribute('router-link')) { + this.navigation = 'link'; + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + } + else if (_e.composedPath().some((node) => node.nodeName === 'A')) { + this.navigation = 'client'; + } + } + }, { + capture: true + }); + } + get action() { + // Return a function which is bound to the flow instance, thus we can use + // the syntax `...serverSideRoutes` in vaadin-router. + return async (params) => { + // Store last action pathname so as we can check it in events + this.pathname = params.pathname; + if ($wnd.Vaadin.connectionState.online) { + try { + await this.flowInit(); + } + catch (error) { + if (error instanceof FlowUiInitializationError) { + // error initializing Flow: assume connection lost + $wnd.Vaadin.connectionState.state = ConnectionState.CONNECTION_LOST; + return this.offlineStubAction(); + } + else { + throw error; + } + } + } + else { + // insert an offline stub + return this.offlineStubAction(); + } + // When an action happens, navigation will be resolved `onBeforeEnter` + this.container.onBeforeEnter = (ctx, cmd) => this.flowNavigate(ctx, cmd); + // For covering the 'server -> client' use case + this.container.onBeforeLeave = (ctx, cmd) => this.flowLeave(ctx, cmd); + return this.container; + }; + } + // Send a remote call to `JavaScriptBootstrapUI` to check + // whether navigation has to be cancelled. + async flowLeave(ctx, cmd) { + // server -> server, viewing offline stub, or browser is offline + const { connectionState } = $wnd.Vaadin; + if (this.pathname === ctx.pathname || !this.isFlowClientLoaded() || connectionState.offline) { + return Promise.resolve({}); + } + // 'server -> client' + return new Promise((resolve) => { + this.loadingStarted(); + // The callback to run from server side to cancel navigation + this.container.serverConnected = (cancel) => { + var _a; + resolve(cmd && cancel ? cmd.prevent() : (_a = cmd === null || cmd === void 0 ? void 0 : cmd.continue) === null || _a === void 0 ? void 0 : _a.call(cmd)); + this.loadingFinished(); + }; + // Call server side to check whether we can leave the view + sendEvent('ui-leave-navigation', { route: this.getFlowRoutePath(ctx), query: this.getFlowRouteQuery(ctx) }); + }); + } + // Send the remote call to `JavaScriptBootstrapUI` to render the flow + // route specified by the context + async flowNavigate(ctx, cmd) { + if (this.response) { + return new Promise((resolve) => { + this.loadingStarted(); + // The callback to run from server side once the view is ready + this.container.serverConnected = (cancel, redirectContext) => { + var _a; + if (cmd && cancel) { + resolve(cmd.prevent()); + } + else if (cmd && cmd.redirect && redirectContext) { + resolve(cmd.redirect(redirectContext.pathname)); + } + else { + (_a = cmd === null || cmd === void 0 ? void 0 : cmd.continue) === null || _a === void 0 ? void 0 : _a.call(cmd); + this.container.style.display = ''; + resolve(this.container); + } + this.loadingFinished(); + }; + this.container.serverPaused = () => { + this.loadingFinished(); + }; + // Call server side to navigate to the given route + sendEvent('ui-navigate', { + route: this.getFlowRoutePath(ctx), + query: this.getFlowRouteQuery(ctx), + appShellTitle: this.appShellTitle, + historyState: history.state, + trigger: this.navigation + }); + // Default to history navigation trigger. + // Link and client cases are handled by click listener in loadingFinished(). + this.navigation = 'history'; + }); + } + else { + // No server response => offline or erroneous connection + return Promise.resolve(this.container); + } + } + getFlowRoutePath(context) { + return decodeURIComponent(context.pathname).replace(this.baseRegex, ''); + } + getFlowRouteQuery(context) { + return (context.search && context.search.substring(1)) || ''; + } + // import flow client modules and initialize UI in server side. + async flowInit() { + // Do not start flow twice + if (!this.isFlowClientLoaded()) { + $wnd.Vaadin.Flow.nonce = this.findNonce(); + // show flow progress indicator + this.loadingStarted(); + // Initialize server side UI + this.response = await this.flowInitUi(); + const { pushScript, appConfig } = this.response; + if (typeof pushScript === 'string') { + await this.loadScript(pushScript); + } + const { appId } = appConfig; + // we use a custom tag for the flow app container + // This must be created before bootstrapMod.init is called as that call + // can handle a UIDL from the server, which relies on the container being available + const tag = `flow-container-${appId.toLowerCase()}`; + const serverCreatedContainer = document.querySelector(tag); + if (serverCreatedContainer) { + this.container = serverCreatedContainer; + } + else { + this.container = document.createElement(tag); + this.container.id = appId; + } + flowRoot.$[appId] = this.container; + // Load bootstrap script with server side parameters + const bootstrapMod = await import('./FlowBootstrap'); + bootstrapMod.init(this.response); + // Load custom modules defined by user + if (typeof this.config.imports === 'function') { + this.injectAppIdScript(appId); + await this.config.imports(); + } + // Load flow-client module + const clientMod = await import('./FlowClient'); + await this.flowInitClient(clientMod); + // hide flow progress indicator + this.loadingFinished(); + } + // It might be that components created from server expect that their content has been rendered. + // Appending eagerly the container we avoid these kind of errors. + // Note that the client router will move this container to the outlet if the navigation succeed + if (this.container && !this.container.isConnected) { + this.container.style.display = 'none'; + document.body.appendChild(this.container); + } + return this.response; + } + async loadScript(url) { + return new Promise((resolve, reject) => { + const script = document.createElement('script'); + script.onload = () => resolve(); + script.onerror = reject; + script.src = url; + const { nonce } = $wnd.Vaadin.Flow; + if (nonce !== undefined) { + script.setAttribute('nonce', nonce); + } + document.body.appendChild(script); + }); + } + findNonce() { + let nonce; + const scriptTags = document.head.getElementsByTagName('script'); + for (const scriptTag of scriptTags) { + if (scriptTag.nonce) { + nonce = scriptTag.nonce; + break; + } + } + return nonce; + } + injectAppIdScript(appId) { + const appIdWithoutHashCode = appId.substring(0, appId.lastIndexOf('-')); + const scriptAppId = document.createElement('script'); + scriptAppId.type = 'module'; + scriptAppId.setAttribute('data-app-id', appIdWithoutHashCode); + const { nonce } = $wnd.Vaadin.Flow; + if (nonce !== undefined) { + scriptAppId.setAttribute('nonce', nonce); + } + document.body.append(scriptAppId); + } + // After the flow-client javascript module has been loaded, this initializes flow UI + // in the browser. + async flowInitClient(clientMod) { + clientMod.init(); + // client init is async, we need to loop until initialized + return new Promise((resolve) => { + const intervalId = setInterval(() => { + // client `isActive() == true` while initializing or processing + const initializing = getClients().reduce((prev, client) => prev || client.isActive(), false); + if (!initializing) { + clearInterval(intervalId); + resolve(); + } + }, 5); + }); + } + // Returns the `appConfig` object + async flowInitUi() { + // appConfig was sent in the index.html request + const initial = $wnd.Vaadin && $wnd.Vaadin.TypeScript && $wnd.Vaadin.TypeScript.initial; + if (initial) { + $wnd.Vaadin.TypeScript.initial = undefined; + return Promise.resolve(initial); + } + // send a request to the `JavaScriptBootstrapHandler` + return new Promise((resolve, reject) => { + const xhr = new XMLHttpRequest(); + const httpRequest = xhr; + const requestPath = `?v-r=init&location=${encodeURIComponent(this.getFlowRoutePath(location))}&query=${encodeURIComponent(this.getFlowRouteQuery(location))}`; + httpRequest.open('GET', requestPath); + httpRequest.onerror = () => reject(new FlowUiInitializationError(`Invalid server response when initializing Flow UI. + ${httpRequest.status} + ${httpRequest.responseText}`)); + httpRequest.onload = () => { + const contentType = httpRequest.getResponseHeader('content-type'); + if (contentType && contentType.indexOf('application/json') !== -1) { + resolve(JSON.parse(httpRequest.responseText)); + } + else { + httpRequest.onerror(); + } + }; + httpRequest.send(); + }); + } + // Create shared connection state store and connection indicator + addConnectionIndicator() { + // add connection indicator to DOM + ConnectionIndicator.create(); + // Listen to browser online/offline events and update the loading indicator accordingly. + // Note: if flow-client is loaded, it instead handles the state transitions. + $wnd.addEventListener('online', () => { + if (!this.isFlowClientLoaded()) { + // Send an HTTP HEAD request for sw.js to verify server reachability. + // We do not expect sw.js to be cached, so the request goes to the + // server rather than being served from local cache. + // Require network-level failure to revert the state to CONNECTION_LOST + // (HTTP error code is ok since it still verifies server's presence). + $wnd.Vaadin.connectionState.state = ConnectionState.RECONNECTING; + const http = new XMLHttpRequest(); + http.open('HEAD', 'sw.js'); + http.onload = () => { + $wnd.Vaadin.connectionState.state = ConnectionState.CONNECTED; + }; + http.onerror = () => { + $wnd.Vaadin.connectionState.state = ConnectionState.CONNECTION_LOST; + }; + // Postpone request to reduce potential net::ERR_INTERNET_DISCONNECTED + // errors that sometimes occurs even if browser says it is online + setTimeout(() => http.send(), 50); + } + }); + $wnd.addEventListener('offline', () => { + if (!this.isFlowClientLoaded()) { + $wnd.Vaadin.connectionState.state = ConnectionState.CONNECTION_LOST; + } + }); + } + async offlineStubAction() { + const offlineStub = document.createElement('iframe'); + const offlineStubPath = './offline-stub.html'; + offlineStub.setAttribute('src', offlineStubPath); + offlineStub.setAttribute('style', 'width: 100%; height: 100%; border: 0'); + this.response = undefined; + let onlineListener; + const removeOfflineStubAndOnlineListener = () => { + if (onlineListener !== undefined) { + $wnd.Vaadin.connectionState.removeStateChangeListener(onlineListener); + onlineListener = undefined; + } + }; + offlineStub.onBeforeEnter = (ctx, _cmds, router) => { + onlineListener = () => { + if ($wnd.Vaadin.connectionState.online) { + removeOfflineStubAndOnlineListener(); + router.render(ctx, false); + } + }; + $wnd.Vaadin.connectionState.addStateChangeListener(onlineListener); + }; + offlineStub.onBeforeLeave = (_ctx, _cmds, _router) => { + removeOfflineStubAndOnlineListener(); + }; + return offlineStub; + } + isFlowClientLoaded() { + return this.response !== undefined; + } +} +//# sourceMappingURL=Flow.js.map \ No newline at end of file diff --git a/src/main/frontend/generated/jar-resources/Flow.js.map b/src/main/frontend/generated/jar-resources/Flow.js.map new file mode 100644 index 0000000..801aa3c --- /dev/null +++ b/src/main/frontend/generated/jar-resources/Flow.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Flow.js","sourceRoot":"","sources":["../../../../src/main/frontend/Flow.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,eAAe,EAGhB,MAAM,yBAAyB,CAAC;AAMjC,MAAM,yBAA0B,SAAQ,KAAK;CAAG;AAgDhD,wCAAwC;AACxC,MAAM,QAAQ,GAAa,MAAM,CAAC,QAAQ,CAAC,IAAW,CAAC;AACvD,MAAM,IAAI,GAAG,MAOE,CAAC;AAChB,MAAM,YAAY,GAAG,CAAC,CAAC,CAAC,qBAAqB;AAE7C,SAAS,UAAU;IACjB,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;SACzC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,KAAK,YAAY,CAAC;SACrC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,SAAS,CAAC,SAAiB,EAAE,IAAS;IAC7C,UAAU,EAAE,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,gBAAgB,CAAC,YAAY,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC;AAC3F,CAAC;AAED;;GAEG;AACH,MAAM,OAAO,IAAI;IAef,YAAY,MAAmB;QAb/B,aAAQ,GAAqB,SAAS,CAAC;QACvC,aAAQ,GAAG,EAAE,CAAC;QAId,sEAAsE;QAC9D,aAAQ,GAAG,KAAK,CAAC;QAEjB,cAAS,GAAG,KAAK,CAAC;QAGlB,eAAU,GAAW,EAAE,CAAC;QAG9B,QAAQ,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI,EAAE,CAAC;QAE3B,6DAA6D;QAC7D,sDAAsD;QACtD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC;QAChC,IAAI,CAAC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;QAC1C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,GAAG;YACzB,UAAU,EAAE;gBACV,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ;aAC9B;SACF,CAAC;QAEF,oDAAoD;QACpD,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QAChD,IAAI,CAAC,SAAS,GAAG,IAAI,MAAM,CACzB,IAAI;QACF,yCAAyC;QACzC,CAAC,QAAQ,CAAC,OAAO,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CACjF,EAAE,CACH,CAAC;QACF,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC;QACpC,+CAA+C;QAC/C,IAAI,CAAC,sBAAsB,EAAE,CAAC;IAChC,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,gBAAgB;QAClB,OAAO;YACL;gBACE,IAAI,EAAE,MAAM;gBACZ,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB;SACF,CAAC;IACJ,CAAC;IAED,cAAc;QACZ,yDAAyD;QACzD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,cAAc,EAAE,CAAC;IAC/C,CAAC;IAED,eAAe;QACb,uDAAuD;QACvD,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,eAAe,EAAE,CAAC;QAE9C,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;YACxB,+CAA+C;YAC/C,OAAO;SACR;QACD,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,EAAE,CAAC;QAC1B,gEAAgE;QAChE,mDAAmD;QACnD,0DAA0D;QAC1D,QAAQ,CAAC,gBAAgB,CACvB,OAAO,EACP,CAAC,EAAE,EAAE,EAAE;YACL,IAAI,EAAE,CAAC,MAAM,EAAE;gBACb,6DAA6D;gBAC7D,aAAa;gBACb,IAAI,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC,EAAE;oBACzC,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC;oBACzB,6DAA6D;oBAC7D,aAAa;iBACd;qBAAM,IAAI,EAAE,CAAC,YAAY,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,KAAK,GAAG,CAAC,EAAE;oBAClE,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC;iBAC5B;aACF;QACH,CAAC,EACD;YACE,OAAO,EAAE,IAAI;SACd,CACF,CAAC;IACJ,CAAC;IAED,IAAY,MAAM;QAChB,yEAAyE;QACzE,qDAAqD;QACrD,OAAO,KAAK,EAAE,MAA4B,EAAE,EAAE;YAC5C,6DAA6D;YAC7D,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;YAEhC,IAAI,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE;gBACtC,IAAI;oBACF,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;iBACvB;gBAAC,OAAO,KAAK,EAAE;oBACd,IAAI,KAAK,YAAY,yBAAyB,EAAE;wBAC9C,kDAAkD;wBAClD,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,GAAG,eAAe,CAAC,eAAe,CAAC;wBACpE,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC;qBACjC;yBAAM;wBACL,MAAM,KAAK,CAAC;qBACb;iBACF;aACF;iBAAM;gBACL,yBAAyB;gBACzB,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC;aACjC;YAED,sEAAsE;YACtE,IAAI,CAAC,SAAS,CAAC,aAAa,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YACzE,+CAA+C;YAC/C,IAAI,CAAC,SAAS,CAAC,aAAa,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YACtE,OAAO,IAAI,CAAC,SAAS,CAAC;QACxB,CAAC,CAAC;IACJ,CAAC;IAED,yDAAyD;IACzD,0CAA0C;IAClC,KAAK,CAAC,SAAS,CAAC,GAAyB,EAAE,GAAqB;QACtE,gEAAgE;QAChE,MAAM,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC;QACxC,IAAI,IAAI,CAAC,QAAQ,KAAK,GAAG,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,eAAe,CAAC,OAAO,EAAE;YAC3F,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;SAC5B;QACD,qBAAqB;QACrB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC7B,IAAI,CAAC,cAAc,EAAE,CAAC;YACtB,4DAA4D;YAC5D,IAAI,CAAC,SAAS,CAAC,eAAe,GAAG,CAAC,MAAM,EAAE,EAAE;;gBAC1C,OAAO,CAAC,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,QAAQ,+CAAb,GAAG,CAAc,CAAC,CAAC;gBAC3D,IAAI,CAAC,eAAe,EAAE,CAAC;YACzB,CAAC,CAAC;YAEF,0DAA0D;YAC1D,SAAS,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC9G,CAAC,CAAC,CAAC;IACL,CAAC;IAED,qEAAqE;IACrE,iCAAiC;IACzB,KAAK,CAAC,YAAY,CAAC,GAAyB,EAAE,GAAgC;QACpF,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;gBAC7B,IAAI,CAAC,cAAc,EAAE,CAAC;gBACtB,8DAA8D;gBAC9D,IAAI,CAAC,SAAS,CAAC,eAAe,GAAG,CAAC,MAAM,EAAE,eAAsC,EAAE,EAAE;;oBAClF,IAAI,GAAG,IAAI,MAAM,EAAE;wBACjB,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;qBACxB;yBAAM,IAAI,GAAG,IAAI,GAAG,CAAC,QAAQ,IAAI,eAAe,EAAE;wBACjD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC;qBACjD;yBAAM;wBACL,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,QAAQ,+CAAb,GAAG,CAAc,CAAC;wBAClB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC;wBAClC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;qBACzB;oBACD,IAAI,CAAC,eAAe,EAAE,CAAC;gBACzB,CAAC,CAAC;gBAEF,IAAI,CAAC,SAAS,CAAC,YAAY,GAAG,GAAG,EAAE;oBACjC,IAAI,CAAC,eAAe,EAAE,CAAC;gBACzB,CAAC,CAAC;gBAEF,kDAAkD;gBAClD,SAAS,CAAC,aAAa,EAAE;oBACvB,KAAK,EAAE,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC;oBACjC,KAAK,EAAE,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC;oBAClC,aAAa,EAAE,IAAI,CAAC,aAAa;oBACjC,YAAY,EAAE,OAAO,CAAC,KAAK;oBAC3B,OAAO,EAAE,IAAI,CAAC,UAAU;iBACzB,CAAC,CAAC;gBACH,yCAAyC;gBACzC,4EAA4E;gBAC5E,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;YAC9B,CAAC,CAAC,CAAC;SACJ;aAAM;YACL,wDAAwD;YACxD,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SACxC;IACH,CAAC;IAEO,gBAAgB,CAAC,OAAwC;QAC/D,OAAO,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IAC1E,CAAC;IACO,iBAAiB,CAAC,OAAwC;QAChE,OAAO,CAAC,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC/D,CAAC;IAED,+DAA+D;IACvD,KAAK,CAAC,QAAQ;QACpB,0BAA0B;QAC1B,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE;YAC9B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;YAE1C,+BAA+B;YAC/B,IAAI,CAAC,cAAc,EAAE,CAAC;YAEtB,4BAA4B;YAC5B,IAAI,CAAC,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;YAExC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC;YAEhD,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;gBAClC,MAAM,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;aACnC;YACD,MAAM,EAAE,KAAK,EAAE,GAAG,SAAS,CAAC;YAE5B,iDAAiD;YACjD,uEAAuE;YACvE,mFAAmF;YACnF,MAAM,GAAG,GAAG,kBAAkB,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;YACpD,MAAM,sBAAsB,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;YAC3D,IAAI,sBAAsB,EAAE;gBAC1B,IAAI,CAAC,SAAS,GAAG,sBAAqC,CAAC;aACxD;iBAAM;gBACL,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;gBAC7C,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,KAAK,CAAC;aAC3B;YACD,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;YAEnC,oDAAoD;YACpD,MAAM,YAAY,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,CAAC;YACrD,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAEjC,sCAAsC;YACtC,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,KAAK,UAAU,EAAE;gBAC7C,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;gBAC9B,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;aAC7B;YAED,0BAA0B;YAC1B,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,CAAC;YAC/C,MAAM,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;YAErC,+BAA+B;YAC/B,IAAI,CAAC,eAAe,EAAE,CAAC;SACxB;QAED,+FAA+F;QAC/F,iEAAiE;QACjE,+FAA+F;QAC/F,IAAI,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE;YACjD,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;YACtC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SAC3C;QACD,OAAO,IAAI,CAAC,QAAS,CAAC;IACxB,CAAC;IAEO,KAAK,CAAC,UAAU,CAAC,GAAW;QAClC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;YAChD,MAAM,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;YAChC,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC;YACxB,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;YACjB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;YACnC,IAAI,KAAK,KAAK,SAAS,EAAE;gBACvB,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;aACrC;YACD,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,SAAS;QACf,IAAI,KAAK,CAAC;QACV,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC;QAChE,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;YAClC,IAAI,SAAS,CAAC,KAAK,EAAE;gBACnB,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC;gBACxB,MAAM;aACP;SACF;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAEO,iBAAiB,CAAC,KAAa;QACrC,MAAM,oBAAoB,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;QACxE,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QACrD,WAAW,CAAC,IAAI,GAAG,QAAQ,CAAC;QAC5B,WAAW,CAAC,YAAY,CAAC,aAAa,EAAE,oBAAoB,CAAC,CAAC;QAC9D,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;QACnC,IAAI,KAAK,KAAK,SAAS,EAAE;YACvB,WAAW,CAAC,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;SAC1C;QACD,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IACpC,CAAC;IAED,oFAAoF;IACpF,kBAAkB;IACV,KAAK,CAAC,cAAc,CAAC,SAAc;QACzC,SAAS,CAAC,IAAI,EAAE,CAAC;QACjB,0DAA0D;QAC1D,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC7B,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE;gBAClC,+DAA+D;gBAC/D,MAAM,YAAY,GAAG,UAAU,EAAE,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,IAAI,IAAI,MAAM,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,CAAC;gBAC7F,IAAI,CAAC,YAAY,EAAE;oBACjB,aAAa,CAAC,UAAU,CAAC,CAAC;oBAC1B,OAAO,EAAE,CAAC;iBACX;YACH,CAAC,EAAE,CAAC,CAAC,CAAC;QACR,CAAC,CAAC,CAAC;IACL,CAAC;IAED,iCAAiC;IACzB,KAAK,CAAC,UAAU;QACtB,+CAA+C;QAC/C,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC;QACxF,IAAI,OAAO,EAAE;YACX,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,GAAG,SAAS,CAAC;YAC3C,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;SACjC;QAED,qDAAqD;QACrD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,MAAM,GAAG,GAAG,IAAI,cAAc,EAAE,CAAC;YACjC,MAAM,WAAW,GAAG,GAAU,CAAC;YAC/B,MAAM,WAAW,GAAG,sBAAsB,kBAAkB,CAC1D,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAChC,UAAU,kBAAkB,CAAC,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;YAElE,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;YAErC,WAAW,CAAC,OAAO,GAAG,GAAG,EAAE,CACzB,MAAM,CACJ,IAAI,yBAAyB,CAC3B;UACF,WAAW,CAAC,MAAM;UAClB,WAAW,CAAC,YAAY,EAAE,CACzB,CACF,CAAC;YAEJ,WAAW,CAAC,MAAM,GAAG,GAAG,EAAE;gBACxB,MAAM,WAAW,GAAG,WAAW,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;gBAClE,IAAI,WAAW,IAAI,WAAW,CAAC,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,EAAE;oBACjE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC;iBAC/C;qBAAM;oBACL,WAAW,CAAC,OAAO,EAAE,CAAC;iBACvB;YACH,CAAC,CAAC;YACF,WAAW,CAAC,IAAI,EAAE,CAAC;QACrB,CAAC,CAAC,CAAC;IACL,CAAC;IAED,gEAAgE;IACxD,sBAAsB;QAC5B,kCAAkC;QAClC,mBAAmB,CAAC,MAAM,EAAE,CAAC;QAE7B,wFAAwF;QACxF,4EAA4E;QAC5E,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,GAAG,EAAE;YACnC,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE;gBAC9B,qEAAqE;gBACrE,kEAAkE;gBAClE,oDAAoD;gBACpD,uEAAuE;gBACvE,qEAAqE;gBACrE,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,GAAG,eAAe,CAAC,YAAY,CAAC;gBACjE,MAAM,IAAI,GAAG,IAAI,cAAc,EAAE,CAAC;gBAClC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAC3B,IAAI,CAAC,MAAM,GAAG,GAAG,EAAE;oBACjB,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,GAAG,eAAe,CAAC,SAAS,CAAC;gBAChE,CAAC,CAAC;gBACF,IAAI,CAAC,OAAO,GAAG,GAAG,EAAE;oBAClB,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,GAAG,eAAe,CAAC,eAAe,CAAC;gBACtE,CAAC,CAAC;gBACF,sEAAsE;gBACtE,iEAAiE;gBACjE,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;aACnC;QACH,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,GAAG,EAAE;YACpC,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE;gBAC9B,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,GAAG,eAAe,CAAC,eAAe,CAAC;aACrE;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,KAAK,CAAC,iBAAiB;QAC7B,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAwB,CAAC;QAC5E,MAAM,eAAe,GAAG,qBAAqB,CAAC;QAC9C,WAAW,CAAC,YAAY,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;QACjD,WAAW,CAAC,YAAY,CAAC,OAAO,EAAE,sCAAsC,CAAC,CAAC;QAC1E,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;QAE1B,IAAI,cAAyD,CAAC;QAC9D,MAAM,kCAAkC,GAAG,GAAG,EAAE;YAC9C,IAAI,cAAc,KAAK,SAAS,EAAE;gBAChC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,yBAAyB,CAAC,cAAc,CAAC,CAAC;gBACtE,cAAc,GAAG,SAAS,CAAC;aAC5B;QACH,CAAC,CAAC;QAEF,WAAW,CAAC,aAAa,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;YACjD,cAAc,GAAG,GAAG,EAAE;gBACpB,IAAI,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE;oBACtC,kCAAkC,EAAE,CAAC;oBACrC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;iBAC3B;YACH,CAAC,CAAC;YACF,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,sBAAsB,CAAC,cAAc,CAAC,CAAC;QACrE,CAAC,CAAC;QACF,WAAW,CAAC,aAAa,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;YACnD,kCAAkC,EAAE,CAAC;QACvC,CAAC,CAAC;QACF,OAAO,WAAW,CAAC;IACrB,CAAC;IAEO,kBAAkB;QACxB,OAAO,IAAI,CAAC,QAAQ,KAAK,SAAS,CAAC;IACrC,CAAC;CACF","sourcesContent":["import {\n ConnectionIndicator,\n ConnectionState,\n ConnectionStateChangeListener,\n ConnectionStateStore\n} from '@vaadin/common-frontend';\n\nexport interface FlowConfig {\n imports?: () => Promise;\n}\n\nclass FlowUiInitializationError extends Error {}\n\ninterface AppConfig {\n productionMode: boolean;\n appId: string;\n uidl: any;\n}\n\ninterface AppInitResponse {\n appConfig: AppConfig;\n pushScript?: string;\n}\n\ninterface Router {\n render: (ctx: NavigationParameters, shouldUpdateHistory: boolean) => Promise;\n}\n\ninterface HTMLRouterContainer extends HTMLElement {\n onBeforeEnter?: (ctx: NavigationParameters, cmd: PreventAndRedirectCommands, router: Router) => void | Promise;\n onBeforeLeave?: (ctx: NavigationParameters, cmd: PreventCommands, router: Router) => void | Promise;\n serverConnected?: (cancel: boolean, url?: NavigationParameters) => void;\n serverPaused?: () => void;\n}\n\ninterface FlowRoute {\n action: (params: NavigationParameters) => Promise;\n path: string;\n}\n\ninterface FlowRoot {\n $: any;\n $server: any;\n}\n\nexport interface NavigationParameters {\n pathname: string;\n search?: string;\n}\n\nexport interface PreventCommands {\n prevent: () => any;\n continue?: () => any;\n}\n\nexport interface PreventAndRedirectCommands extends PreventCommands {\n redirect: (route: string) => any;\n}\n\n// flow uses body for keeping references\nconst flowRoot: FlowRoot = window.document.body as any;\nconst $wnd = window as any as {\n Vaadin: {\n Flow: any;\n TypeScript: any;\n connectionState: ConnectionStateStore;\n listener: any;\n };\n} & EventTarget;\nconst ROOT_NODE_ID = 1; // See StateTree.java\n\nfunction getClients() {\n return Object.keys($wnd.Vaadin.Flow.clients)\n .filter((key) => key !== 'TypeScript')\n .map((id) => $wnd.Vaadin.Flow.clients[id]);\n}\n\nfunction sendEvent(eventName: string, data: any) {\n getClients().forEach((client) => client.sendEventMessage(ROOT_NODE_ID, eventName, data));\n}\n\n/**\n * Client API for flow UI operations.\n */\nexport class Flow {\n config: FlowConfig;\n response?: AppInitResponse = undefined;\n pathname = '';\n\n container!: HTMLRouterContainer;\n\n // flag used to inform Testbench whether a server route is in progress\n private isActive = false;\n\n private baseRegex = /^\\//;\n private appShellTitle: string;\n\n private navigation: string = '';\n\n constructor(config?: FlowConfig) {\n flowRoot.$ = flowRoot.$ || [];\n this.config = config || {};\n\n // TB checks for the existence of window.Vaadin.Flow in order\n // to consider that TB needs to wait for `initFlow()`.\n $wnd.Vaadin = $wnd.Vaadin || {};\n $wnd.Vaadin.Flow = $wnd.Vaadin.Flow || {};\n $wnd.Vaadin.Flow.clients = {\n TypeScript: {\n isActive: () => this.isActive\n }\n };\n\n // Regular expression used to remove the app-context\n const elm = document.head.querySelector('base');\n this.baseRegex = new RegExp(\n `^${\n // IE11 does not support document.baseURI\n (document.baseURI || (elm && elm.href) || '/').replace(/^https?:\\/\\/[^/]+/i, '')\n }`\n );\n this.appShellTitle = document.title;\n // Put a vaadin-connection-indicator in the dom\n this.addConnectionIndicator();\n }\n\n /**\n * Return a `route` object for vaadin-router in an one-element array.\n *\n * The `FlowRoute` object `path` property handles any route,\n * and the `action` returns the flow container without updating the content,\n * delaying the actual Flow server call to the `onBeforeEnter` phase.\n *\n * This is a specific API for its use with `vaadin-router`.\n */\n get serverSideRoutes(): [FlowRoute] {\n return [\n {\n path: '(.*)',\n action: this.action\n }\n ];\n }\n\n loadingStarted() {\n // Make Testbench know that server request is in progress\n this.isActive = true;\n $wnd.Vaadin.connectionState.loadingStarted();\n }\n\n loadingFinished() {\n // Make Testbench know that server request has finished\n this.isActive = false;\n $wnd.Vaadin.connectionState.loadingFinished();\n\n if ($wnd.Vaadin.listener) {\n // Listeners registered, do not register again.\n return;\n }\n $wnd.Vaadin.listener = {};\n // Listen for click on router-links -> 'link' navigation trigger\n // and on nodes -> 'client' navigation trigger.\n // Use capture phase to detect prevented / stopped events.\n document.addEventListener(\n 'click',\n (_e) => {\n if (_e.target) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n if (_e.target.hasAttribute('router-link')) {\n this.navigation = 'link';\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n } else if (_e.composedPath().some((node) => node.nodeName === 'A')) {\n this.navigation = 'client';\n }\n }\n },\n {\n capture: true\n }\n );\n }\n\n private get action(): (params: NavigationParameters) => Promise {\n // Return a function which is bound to the flow instance, thus we can use\n // the syntax `...serverSideRoutes` in vaadin-router.\n return async (params: NavigationParameters) => {\n // Store last action pathname so as we can check it in events\n this.pathname = params.pathname;\n\n if ($wnd.Vaadin.connectionState.online) {\n try {\n await this.flowInit();\n } catch (error) {\n if (error instanceof FlowUiInitializationError) {\n // error initializing Flow: assume connection lost\n $wnd.Vaadin.connectionState.state = ConnectionState.CONNECTION_LOST;\n return this.offlineStubAction();\n } else {\n throw error;\n }\n }\n } else {\n // insert an offline stub\n return this.offlineStubAction();\n }\n\n // When an action happens, navigation will be resolved `onBeforeEnter`\n this.container.onBeforeEnter = (ctx, cmd) => this.flowNavigate(ctx, cmd);\n // For covering the 'server -> client' use case\n this.container.onBeforeLeave = (ctx, cmd) => this.flowLeave(ctx, cmd);\n return this.container;\n };\n }\n\n // Send a remote call to `JavaScriptBootstrapUI` to check\n // whether navigation has to be cancelled.\n private async flowLeave(ctx: NavigationParameters, cmd?: PreventCommands): Promise {\n // server -> server, viewing offline stub, or browser is offline\n const { connectionState } = $wnd.Vaadin;\n if (this.pathname === ctx.pathname || !this.isFlowClientLoaded() || connectionState.offline) {\n return Promise.resolve({});\n }\n // 'server -> client'\n return new Promise((resolve) => {\n this.loadingStarted();\n // The callback to run from server side to cancel navigation\n this.container.serverConnected = (cancel) => {\n resolve(cmd && cancel ? cmd.prevent() : cmd?.continue?.());\n this.loadingFinished();\n };\n\n // Call server side to check whether we can leave the view\n sendEvent('ui-leave-navigation', { route: this.getFlowRoutePath(ctx), query: this.getFlowRouteQuery(ctx) });\n });\n }\n\n // Send the remote call to `JavaScriptBootstrapUI` to render the flow\n // route specified by the context\n private async flowNavigate(ctx: NavigationParameters, cmd?: PreventAndRedirectCommands): Promise {\n if (this.response) {\n return new Promise((resolve) => {\n this.loadingStarted();\n // The callback to run from server side once the view is ready\n this.container.serverConnected = (cancel, redirectContext?: NavigationParameters) => {\n if (cmd && cancel) {\n resolve(cmd.prevent());\n } else if (cmd && cmd.redirect && redirectContext) {\n resolve(cmd.redirect(redirectContext.pathname));\n } else {\n cmd?.continue?.();\n this.container.style.display = '';\n resolve(this.container);\n }\n this.loadingFinished();\n };\n\n this.container.serverPaused = () => {\n this.loadingFinished();\n };\n\n // Call server side to navigate to the given route\n sendEvent('ui-navigate', {\n route: this.getFlowRoutePath(ctx),\n query: this.getFlowRouteQuery(ctx),\n appShellTitle: this.appShellTitle,\n historyState: history.state,\n trigger: this.navigation\n });\n // Default to history navigation trigger.\n // Link and client cases are handled by click listener in loadingFinished().\n this.navigation = 'history';\n });\n } else {\n // No server response => offline or erroneous connection\n return Promise.resolve(this.container);\n }\n }\n\n private getFlowRoutePath(context: NavigationParameters | Location): string {\n return decodeURIComponent(context.pathname).replace(this.baseRegex, '');\n }\n private getFlowRouteQuery(context: NavigationParameters | Location): string {\n return (context.search && context.search.substring(1)) || '';\n }\n\n // import flow client modules and initialize UI in server side.\n private async flowInit(): Promise {\n // Do not start flow twice\n if (!this.isFlowClientLoaded()) {\n $wnd.Vaadin.Flow.nonce = this.findNonce();\n\n // show flow progress indicator\n this.loadingStarted();\n\n // Initialize server side UI\n this.response = await this.flowInitUi();\n\n const { pushScript, appConfig } = this.response;\n\n if (typeof pushScript === 'string') {\n await this.loadScript(pushScript);\n }\n const { appId } = appConfig;\n\n // we use a custom tag for the flow app container\n // This must be created before bootstrapMod.init is called as that call\n // can handle a UIDL from the server, which relies on the container being available\n const tag = `flow-container-${appId.toLowerCase()}`;\n const serverCreatedContainer = document.querySelector(tag);\n if (serverCreatedContainer) {\n this.container = serverCreatedContainer as HTMLElement;\n } else {\n this.container = document.createElement(tag);\n this.container.id = appId;\n }\n flowRoot.$[appId] = this.container;\n\n // Load bootstrap script with server side parameters\n const bootstrapMod = await import('./FlowBootstrap');\n bootstrapMod.init(this.response);\n\n // Load custom modules defined by user\n if (typeof this.config.imports === 'function') {\n this.injectAppIdScript(appId);\n await this.config.imports();\n }\n\n // Load flow-client module\n const clientMod = await import('./FlowClient');\n await this.flowInitClient(clientMod);\n\n // hide flow progress indicator\n this.loadingFinished();\n }\n\n // It might be that components created from server expect that their content has been rendered.\n // Appending eagerly the container we avoid these kind of errors.\n // Note that the client router will move this container to the outlet if the navigation succeed\n if (this.container && !this.container.isConnected) {\n this.container.style.display = 'none';\n document.body.appendChild(this.container);\n }\n return this.response!;\n }\n\n private async loadScript(url: string): Promise {\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.onload = () => resolve();\n script.onerror = reject;\n script.src = url;\n const { nonce } = $wnd.Vaadin.Flow;\n if (nonce !== undefined) {\n script.setAttribute('nonce', nonce);\n }\n document.body.appendChild(script);\n });\n }\n\n private findNonce(): string | undefined {\n let nonce;\n const scriptTags = document.head.getElementsByTagName('script');\n for (const scriptTag of scriptTags) {\n if (scriptTag.nonce) {\n nonce = scriptTag.nonce;\n break;\n }\n }\n return nonce;\n }\n\n private injectAppIdScript(appId: string) {\n const appIdWithoutHashCode = appId.substring(0, appId.lastIndexOf('-'));\n const scriptAppId = document.createElement('script');\n scriptAppId.type = 'module';\n scriptAppId.setAttribute('data-app-id', appIdWithoutHashCode);\n const { nonce } = $wnd.Vaadin.Flow;\n if (nonce !== undefined) {\n scriptAppId.setAttribute('nonce', nonce);\n }\n document.body.append(scriptAppId);\n }\n\n // After the flow-client javascript module has been loaded, this initializes flow UI\n // in the browser.\n private async flowInitClient(clientMod: any): Promise {\n clientMod.init();\n // client init is async, we need to loop until initialized\n return new Promise((resolve) => {\n const intervalId = setInterval(() => {\n // client `isActive() == true` while initializing or processing\n const initializing = getClients().reduce((prev, client) => prev || client.isActive(), false);\n if (!initializing) {\n clearInterval(intervalId);\n resolve();\n }\n }, 5);\n });\n }\n\n // Returns the `appConfig` object\n private async flowInitUi(): Promise {\n // appConfig was sent in the index.html request\n const initial = $wnd.Vaadin && $wnd.Vaadin.TypeScript && $wnd.Vaadin.TypeScript.initial;\n if (initial) {\n $wnd.Vaadin.TypeScript.initial = undefined;\n return Promise.resolve(initial);\n }\n\n // send a request to the `JavaScriptBootstrapHandler`\n return new Promise((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n const httpRequest = xhr as any;\n const requestPath = `?v-r=init&location=${encodeURIComponent(\n this.getFlowRoutePath(location)\n )}&query=${encodeURIComponent(this.getFlowRouteQuery(location))}`;\n\n httpRequest.open('GET', requestPath);\n\n httpRequest.onerror = () =>\n reject(\n new FlowUiInitializationError(\n `Invalid server response when initializing Flow UI.\n ${httpRequest.status}\n ${httpRequest.responseText}`\n )\n );\n\n httpRequest.onload = () => {\n const contentType = httpRequest.getResponseHeader('content-type');\n if (contentType && contentType.indexOf('application/json') !== -1) {\n resolve(JSON.parse(httpRequest.responseText));\n } else {\n httpRequest.onerror();\n }\n };\n httpRequest.send();\n });\n }\n\n // Create shared connection state store and connection indicator\n private addConnectionIndicator() {\n // add connection indicator to DOM\n ConnectionIndicator.create();\n\n // Listen to browser online/offline events and update the loading indicator accordingly.\n // Note: if flow-client is loaded, it instead handles the state transitions.\n $wnd.addEventListener('online', () => {\n if (!this.isFlowClientLoaded()) {\n // Send an HTTP HEAD request for sw.js to verify server reachability.\n // We do not expect sw.js to be cached, so the request goes to the\n // server rather than being served from local cache.\n // Require network-level failure to revert the state to CONNECTION_LOST\n // (HTTP error code is ok since it still verifies server's presence).\n $wnd.Vaadin.connectionState.state = ConnectionState.RECONNECTING;\n const http = new XMLHttpRequest();\n http.open('HEAD', 'sw.js');\n http.onload = () => {\n $wnd.Vaadin.connectionState.state = ConnectionState.CONNECTED;\n };\n http.onerror = () => {\n $wnd.Vaadin.connectionState.state = ConnectionState.CONNECTION_LOST;\n };\n // Postpone request to reduce potential net::ERR_INTERNET_DISCONNECTED\n // errors that sometimes occurs even if browser says it is online\n setTimeout(() => http.send(), 50);\n }\n });\n $wnd.addEventListener('offline', () => {\n if (!this.isFlowClientLoaded()) {\n $wnd.Vaadin.connectionState.state = ConnectionState.CONNECTION_LOST;\n }\n });\n }\n\n private async offlineStubAction() {\n const offlineStub = document.createElement('iframe') as HTMLRouterContainer;\n const offlineStubPath = './offline-stub.html';\n offlineStub.setAttribute('src', offlineStubPath);\n offlineStub.setAttribute('style', 'width: 100%; height: 100%; border: 0');\n this.response = undefined;\n\n let onlineListener: ConnectionStateChangeListener | undefined;\n const removeOfflineStubAndOnlineListener = () => {\n if (onlineListener !== undefined) {\n $wnd.Vaadin.connectionState.removeStateChangeListener(onlineListener);\n onlineListener = undefined;\n }\n };\n\n offlineStub.onBeforeEnter = (ctx, _cmds, router) => {\n onlineListener = () => {\n if ($wnd.Vaadin.connectionState.online) {\n removeOfflineStubAndOnlineListener();\n router.render(ctx, false);\n }\n };\n $wnd.Vaadin.connectionState.addStateChangeListener(onlineListener);\n };\n offlineStub.onBeforeLeave = (_ctx, _cmds, _router) => {\n removeOfflineStubAndOnlineListener();\n };\n return offlineStub;\n }\n\n private isFlowClientLoaded(): boolean {\n return this.response !== undefined;\n }\n}\n"]} \ No newline at end of file diff --git a/src/main/frontend/generated/jar-resources/FlowBootstrap.d.ts b/src/main/frontend/generated/jar-resources/FlowBootstrap.d.ts new file mode 100644 index 0000000..0398d57 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/FlowBootstrap.d.ts @@ -0,0 +1 @@ +export const init: (appInitResponse: any) => void; diff --git a/src/main/frontend/generated/jar-resources/FlowBootstrap.js b/src/main/frontend/generated/jar-resources/FlowBootstrap.js new file mode 100644 index 0000000..ed20df0 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/FlowBootstrap.js @@ -0,0 +1,291 @@ +/* This is a copy of the regular `BootstrapHandler.js` in the flow-server + module, but with the following modifications: + - The main function is exported as an ES module for lazy initialization. + - Application configuration is passed as a parameter instead of using + replacement placeholders as in the regular bootstrapping. + - It reuses `Vaadin.Flow.clients` if exists. + - Fixed lint errors. + */ +const init = function (appInitResponse) { + window.Vaadin = window.Vaadin || {}; + window.Vaadin.Flow = window.Vaadin.Flow || {}; + + var apps = {}; + var widgetsets = {}; + + var log; + if (typeof window.console === undefined || !window.location.search.match(/[&?]debug(&|$)/)) { + /* If no console.log present, just use a no-op */ + log = function () {}; + } else if (typeof window.console.log === 'function') { + /* If it's a function, use it with apply */ + log = function () { + window.console.log.apply(window.console, arguments); + }; + } else { + /* In IE, its a native function for which apply is not defined, but it works + without a proper 'this' reference */ + log = window.console.log; + } + + var isInitializedInDom = function (appId) { + var appDiv = document.getElementById(appId); + if (!appDiv) { + return false; + } + for (var i = 0; i < appDiv.childElementCount; i++) { + var className = appDiv.childNodes[i].className; + /* If the app div contains a child with the class + 'v-app-loading' we have only received the HTML + but not yet started the widget set + (UIConnector removes the v-app-loading div). */ + if (className && className.indexOf('v-app-loading') != -1) { + return false; + } + } + return true; + }; + + /* + * Needed for Testbench compatibility, but prevents any Vaadin 7 app from + * bootstrapping unless the legacy vaadinBootstrap.js file is loaded before + * this script. + */ + window.Vaadin = window.Vaadin || {}; + window.Vaadin.Flow = window.Vaadin.Flow || {}; + + /* + * Needed for wrapping custom javascript functionality in the components (i.e. connectors) + */ + window.Vaadin.Flow.tryCatchWrapper = function (originalFunction, component) { + return function () { + try { + // eslint-disable-next-line + const result = originalFunction.apply(this, arguments); + return result; + } catch (error) { + console.error( + `There seems to be an error in ${component}: +${error.message} +Please submit an issue to https://github.com/vaadin/flow-components/issues/new/choose` + ); + } + }; + }; + + if (!window.Vaadin.Flow.initApplication) { + window.Vaadin.Flow.clients = window.Vaadin.Flow.clients || {}; + + window.Vaadin.Flow.initApplication = function (appId, config) { + var testbenchId = appId.replace(/-\d+$/, ''); + + if (apps[appId]) { + if ( + window.Vaadin && + window.Vaadin.Flow && + window.Vaadin.Flow.clients && + window.Vaadin.Flow.clients[testbenchId] && + window.Vaadin.Flow.clients[testbenchId].initializing + ) { + throw new Error('Application ' + appId + ' is already being initialized'); + } + if (isInitializedInDom(appId)) { + if (appInitResponse.appConfig.productionMode) { + throw new Error('Application ' + appId + ' already initialized'); + } + + // Remove old contents for Flow + var appDiv = document.getElementById(appId); + for (var i = 0; i < appDiv.childElementCount; i++) { + appDiv.childNodes[i].remove(); + } + + // For devMode reset app config and restart widgetset as client + // is up and running after hrm update. + const getConfig = function (name) { + return config[name]; + }; + + /* Export public data */ + const app = { + getConfig: getConfig + }; + apps[appId] = app; + + if (widgetsets['client'].callback) { + log('Starting from bootstrap', appId); + widgetsets['client'].callback(appId); + } else { + log('Setting pending startup', appId); + widgetsets['client'].pendingApps.push(appId); + } + return apps[appId]; + } + } + + log('init application', appId, config); + + window.Vaadin.Flow.clients[testbenchId] = { + isActive: function () { + return true; + }, + initializing: true, + productionMode: mode + }; + + var getConfig = function (name) { + var value = config[name]; + return value; + }; + + /* Export public data */ + var app = { + getConfig: getConfig + }; + apps[appId] = app; + + if (!window.name) { + window.name = appId + '-' + Math.random(); + } + + var widgetset = 'client'; + widgetsets[widgetset] = { + pendingApps: [] + }; + if (widgetsets[widgetset].callback) { + log('Starting from bootstrap', appId); + widgetsets[widgetset].callback(appId); + } else { + log('Setting pending startup', appId); + widgetsets[widgetset].pendingApps.push(appId); + } + + return app; + }; + window.Vaadin.Flow.getAppIds = function () { + var ids = []; + for (var id in apps) { + if (Object.prototype.hasOwnProperty.call(apps, id)) { + ids.push(id); + } + } + return ids; + }; + window.Vaadin.Flow.getApp = function (appId) { + return apps[appId]; + }; + window.Vaadin.Flow.registerWidgetset = function (widgetset, callback) { + log('Widgetset registered', widgetset); + var ws = widgetsets[widgetset]; + if (ws && ws.pendingApps) { + ws.callback = callback; + for (var i = 0; i < ws.pendingApps.length; i++) { + var appId = ws.pendingApps[i]; + log('Starting from register widgetset', appId); + callback(appId); + } + ws.pendingApps = null; + } + }; + window.Vaadin.Flow.getBrowserDetailsParameters = function () { + var params = {}; + + /* Screen height and width */ + params['v-sh'] = window.screen.height; + params['v-sw'] = window.screen.width; + /* Browser window dimensions */ + params['v-wh'] = window.innerHeight; + params['v-ww'] = window.innerWidth; + /* Body element dimensions */ + params['v-bh'] = document.body.clientHeight; + params['v-bw'] = document.body.clientWidth; + + /* Current time */ + var date = new Date(); + params['v-curdate'] = date.getTime(); + + /* Current timezone offset (including DST shift) */ + var tzo1 = date.getTimezoneOffset(); + + /* Compare the current tz offset with the first offset from the end + of the year that differs --- if less that, we are in DST, otherwise + we are in normal time */ + var dstDiff = 0; + var rawTzo = tzo1; + for (var m = 12; m > 0; m--) { + date.setUTCMonth(m); + var tzo2 = date.getTimezoneOffset(); + if (tzo1 != tzo2) { + dstDiff = tzo1 > tzo2 ? tzo1 - tzo2 : tzo2 - tzo1; + rawTzo = tzo1 > tzo2 ? tzo1 : tzo2; + break; + } + } + + /* Time zone offset */ + params['v-tzo'] = tzo1; + + /* DST difference */ + params['v-dstd'] = dstDiff; + + /* Time zone offset without DST */ + params['v-rtzo'] = rawTzo; + + /* DST in effect? */ + params['v-dston'] = tzo1 != rawTzo; + + /* Time zone id (if available) */ + try { + params['v-tzid'] = Intl.DateTimeFormat().resolvedOptions().timeZone; + } catch (err) { + params['v-tzid'] = ''; + } + + /* Window name */ + if (window.name) { + params['v-wn'] = window.name; + } + + /* Detect touch device support */ + var supportsTouch = false; + try { + document.createEvent('TouchEvent'); + supportsTouch = true; + } catch (e) { + /* Chrome and IE10 touch detection */ + supportsTouch = 'ontouchstart' in window || typeof navigator.msMaxTouchPoints !== 'undefined'; + } + params['v-td'] = supportsTouch; + + /* Device Pixel Ratio */ + params['v-pr'] = window.devicePixelRatio; + + if (navigator.platform) { + params['v-np'] = navigator.platform; + } + + /* Stringify each value (they are parsed on the server side) */ + Object.keys(params).forEach(function (key) { + var value = params[key]; + if (typeof value !== 'undefined') { + params[key] = value.toString(); + } + }); + return params; + }; + } + + log('Flow bootstrap loaded'); + if (appInitResponse.appConfig.productionMode && typeof window.__gwtStatsEvent != 'function') { + window.Vaadin.Flow.gwtStatsEvents = []; + window.__gwtStatsEvent = function (event) { + window.Vaadin.Flow.gwtStatsEvents.push(event); + return true; + }; + } + var config = appInitResponse.appConfig; + var mode = appInitResponse.appConfig.productionMode; + window.Vaadin.Flow.initApplication(config.appId, config); +}; + +export { init }; diff --git a/src/main/frontend/generated/jar-resources/FlowClient.d.ts b/src/main/frontend/generated/jar-resources/FlowClient.d.ts new file mode 100644 index 0000000..7b21f90 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/FlowClient.d.ts @@ -0,0 +1 @@ +export const init: () => void; diff --git a/src/main/frontend/generated/jar-resources/FlowClient.js b/src/main/frontend/generated/jar-resources/FlowClient.js new file mode 100644 index 0000000..9c176dd --- /dev/null +++ b/src/main/frontend/generated/jar-resources/FlowClient.js @@ -0,0 +1,1073 @@ +export function init() { +function client(){var Jb='',Kb=0,Lb='gwt.codesvr=',Mb='gwt.hosted=',Nb='gwt.hybrid',Ob='client',Pb='#',Qb='?',Rb='/',Sb=1,Tb='img',Ub='clear.cache.gif',Vb='baseUrl',Wb='script',Xb='client.nocache.js',Yb='base',Zb='//',$b='meta',_b='name',ac='gwt:property',bc='content',cc='=',dc='gwt:onPropertyErrorFn',ec='Bad handler "',fc='" for "gwt:onPropertyErrorFn"',gc='gwt:onLoadErrorFn',hc='" for "gwt:onLoadErrorFn"',ic='user.agent',jc='webkit',kc='safari',lc='msie',mc=10,nc=11,oc='ie10',pc=9,qc='ie9',rc=8,sc='ie8',tc='gecko',uc='gecko1_8',vc=2,wc=3,xc=4,yc='Single-script hosted mode not yet implemented. See issue ',zc='http://code.google.com/p/google-web-toolkit/issues/detail?id=2079',Ac='17C68BB52CBFCD9B8229B9E49E6E39FE',Bc=':1',Cc=':',Dc='DOMContentLoaded',Ec=50;var l=Jb,m=Kb,n=Lb,o=Mb,p=Nb,q=Ob,r=Pb,s=Qb,t=Rb,u=Sb,v=Tb,w=Ub,A=Vb,B=Wb,C=Xb,D=Yb,F=Zb,G=$b,H=_b,I=ac,J=bc,K=cc,L=dc,M=ec,N=fc,O=gc,P=hc,Q=ic,R=jc,S=kc,T=lc,U=mc,V=nc,W=oc,X=pc,Y=qc,Z=rc,$=sc,_=tc,ab=uc,bb=vc,cb=wc,db=xc,eb=yc,fb=zc,gb=Ac,hb=Bc,ib=Cc,jb=Dc,kb=Ec;var lb=window,mb=document,nb,ob,pb=l,qb={},rb=[],sb=[],tb=[],ub=m,vb,wb;if(!lb.__gwt_stylesLoaded){lb.__gwt_stylesLoaded={}}if(!lb.__gwt_scriptsLoaded){lb.__gwt_scriptsLoaded={}}function xb(){var b=false;try{var c=lb.location.search;return (c.indexOf(n)!=-1||(c.indexOf(o)!=-1||lb.external&&lb.external.gwtOnLoad))&&c.indexOf(p)==-1}catch(a){}xb=function(){return b};return b} +function yb(){if(nb&&ob){nb(vb,q,pb,ub)}} +function zb(){function e(a){var b=a.lastIndexOf(r);if(b==-1){b=a.length}var c=a.indexOf(s);if(c==-1){c=a.length}var d=a.lastIndexOf(t,Math.min(c,b));return d>=m?a.substring(m,d+u):l} +function f(a){if(a.match(/^\w+:\/\//)){}else{var b=mb.createElement(v);b.src=a+w;a=e(b.src)}return a} +function g(){var a=Cb(A);if(a!=null){return a}return l} +function h(){var a=mb.getElementsByTagName(B);for(var b=m;bm){return a[a.length-u].href}return l} +function j(){var a=mb.location;return a.href==a.protocol+F+a.host+a.pathname+a.search+a.hash} +var k=g();if(k==l){k=h()}if(k==l){k=i()}if(k==l&&j()){k=e(mb.location.href)}k=f(k);return k} +function Ab(){var b=document.getElementsByTagName(G);for(var c=m,d=b.length;c=m){f=g.substring(m,i);h=g.substring(i+u)}else{f=g;h=l}qb[f]=h}}else if(f==L){g=e.getAttribute(J);if(g){try{wb=eval(g)}catch(a){alert(M+g+N)}}}else if(f==O){g=e.getAttribute(J);if(g){try{vb=eval(g)}catch(a){alert(M+g+P)}}}}}} +var Bb=function(a,b){return b in rb[a]};var Cb=function(a){var b=qb[a];return b==null?null:b};function Db(a,b){var c=tb;for(var d=m,e=a.length-u;d=U&&b=X&&b=Z&&b=V}())return ab;return S};rb[Q]={'gecko1_8':m,'ie10':u,'ie8':bb,'ie9':cb,'safari':db};client.onScriptLoad=function(a){client=null;nb=a;yb()};if(xb()){alert(eb+fb);return}zb();Ab();try{var Fb;Db([ab],gb);Db([S],gb+hb);Fb=tb[Eb(Q)];var Gb=Fb.indexOf(ib);if(Gb!=-1){ub=Number(Fb.substring(Gb+u))}}catch(a){return}var Hb;function Ib(){if(!ob){ob=true;yb();if(mb.removeEventListener){mb.removeEventListener(jb,Ib,false)}if(Hb){clearInterval(Hb)}}} +if(mb.addEventListener){mb.addEventListener(jb,function(){Ib()},false)}var Hb=setInterval(function(){if(/loaded|complete/.test(mb.readyState)){Ib()}},kb)} +client();(function () {var $gwt_version = "2.9.0";var $wnd = window;var $doc = $wnd.document;var $moduleName, $moduleBase;var $stats = $wnd.__gwtStatsEvent ? function(a) {$wnd.__gwtStatsEvent(a)} : null;var $strongName = '17C68BB52CBFCD9B8229B9E49E6E39FE';function I(){} +function $i(){} +function Wi(){} +function nc(){} +function uc(){} +function ej(){} +function Dj(){} +function Qj(){} +function Uj(){} +function Bk(){} +function Dk(){} +function Fk(){} +function Fm(){} +function Hm(){} +function Jm(){} +function al(){} +function fl(){} +function kl(){} +function ml(){} +function wl(){} +function fn(){} +function hn(){} +function jo(){} +function Ao(){} +function jq(){} +function pr(){} +function rr(){} +function tr(){} +function vr(){} +function Ur(){} +function Yr(){} +function kt(){} +function ot(){} +function rt(){} +function Mt(){} +function vu(){} +function ov(){} +function sv(){} +function Hv(){} +function Qv(){} +function xx(){} +function Zx(){} +function _x(){} +function Uy(){} +function $y(){} +function dA(){} +function NA(){} +function UB(){} +function uC(){} +function LD(){} +function pF(){} +function vG(){} +function GG(){} +function IG(){} +function KG(){} +function _G(){} +function Lz(){Iz()} +function T(a){S=a;Jb()} +function gk(a){throw a} +function tj(a,b){a.c=b} +function uj(a,b){a.d=b} +function vj(a,b){a.e=b} +function xj(a,b){a.g=b} +function yj(a,b){a.h=b} +function zj(a,b){a.i=b} +function Aj(a,b){a.j=b} +function Bj(a,b){a.k=b} +function Cj(a,b){a.l=b} +function Wt(a,b){a.b=b} +function $G(a,b){a.a=b} +function $k(a){this.a=a} +function lk(a){this.a=a} +function nk(a){this.a=a} +function Hk(a){this.a=a} +function bc(a){this.a=a} +function dc(a){this.a=a} +function dl(a){this.a=a} +function il(a){this.a=a} +function ql(a){this.a=a} +function sl(a){this.a=a} +function ul(a){this.a=a} +function yl(a){this.a=a} +function Al(a){this.a=a} +function Sj(a){this.a=a} +function dm(a){this.a=a} +function Lm(a){this.a=a} +function Pm(a){this.a=a} +function _m(a){this.a=a} +function ln(a){this.a=a} +function Kn(a){this.a=a} +function Nn(a){this.a=a} +function On(a){this.a=a} +function Un(a){this.a=a} +function ho(a){this.a=a} +function mo(a){this.a=a} +function po(a){this.a=a} +function ro(a){this.a=a} +function to(a){this.a=a} +function vo(a){this.a=a} +function xo(a){this.a=a} +function Bo(a){this.a=a} +function Ho(a){this.a=a} +function _o(a){this.a=a} +function qp(a){this.a=a} +function Up(a){this.a=a} +function _p(a){this.b=a} +function hq(a){this.a=a} +function lq(a){this.a=a} +function nq(a){this.a=a} +function Wq(a){this.a=a} +function Yq(a){this.a=a} +function $q(a){this.a=a} +function $r(a){this.a=a} +function hr(a){this.a=a} +function kr(a){this.a=a} +function fs(a){this.a=a} +function hs(a){this.a=a} +function js(a){this.a=a} +function Cs(a){this.a=a} +function Ls(a){this.a=a} +function Ts(a){this.a=a} +function Vs(a){this.a=a} +function Xs(a){this.a=a} +function Zs(a){this.a=a} +function _s(a){this.a=a} +function ws(a){this.d=a} +function at(a){this.a=a} +function it(a){this.a=a} +function Bt(a){this.a=a} +function Kt(a){this.a=a} +function Ot(a){this.a=a} +function $t(a){this.a=a} +function $v(a){this.a=a} +function qv(a){this.a=a} +function Wv(a){this.a=a} +function au(a){this.a=a} +function nu(a){this.a=a} +function tu(a){this.a=a} +function Ou(a){this.a=a} +function Su(a){this.a=a} +function cw(a){this.a=a} +function ew(a){this.a=a} +function gw(a){this.a=a} +function lw(a){this.a=a} +function dy(a){this.a=a} +function fy(a){this.a=a} +function sy(a){this.a=a} +function wy(a){this.a=a} +function Ay(a){this.a=a} +function Cy(a){this.a=a} +function Yy(a){this.a=a} +function cy(a){this.b=a} +function cz(a){this.a=a} +function az(a){this.a=a} +function gz(a){this.a=a} +function oz(a){this.a=a} +function qz(a){this.a=a} +function sz(a){this.a=a} +function uz(a){this.a=a} +function wz(a){this.a=a} +function Dz(a){this.a=a} +function Fz(a){this.a=a} +function Wz(a){this.a=a} +function Zz(a){this.a=a} +function fA(a){this.a=a} +function LA(a){this.a=a} +function PA(a){this.a=a} +function RA(a){this.a=a} +function hA(a){this.e=a} +function Xt(a){this.c=a} +function lB(a){this.a=a} +function BB(a){this.a=a} +function DB(a){this.a=a} +function FB(a){this.a=a} +function QB(a){this.a=a} +function SB(a){this.a=a} +function gC(a){this.a=a} +function AC(a){this.a=a} +function HD(a){this.a=a} +function JD(a){this.a=a} +function MD(a){this.a=a} +function BE(a){this.a=a} +function cH(a){this.a=a} +function zF(a){this.b=a} +function MF(a){this.c=a} +function R(){this.a=xb()} +function pj(){this.a=++oj} +function _i(){hp();lp()} +function hp(){hp=Wi;gp=[]} +function Ni(a){return a.e} +function dC(a){EA(a.a,a.b)} +function et(a,b){pC(a.a,b)} +function ax(a,b){tx(b,a)} +function fx(a,b){sx(b,a)} +function kx(a,b){Yw(b,a)} +function vA(a,b){hv(b,a)} +function Lu(a,b){b.ib(a)} +function tD(b,a){b.log(a)} +function uD(b,a){b.warn(a)} +function nD(b,a){b.data=a} +function rD(b,a){b.debug(a)} +function sD(b,a){b.error(a)} +function zp(a,b){a.push(b)} +function zr(a){a.i||Ar(a.a)} +function Yb(a){return a.C()} +function Em(a){return jm(a)} +function hc(a){gc();fc.F(a)} +function ps(a){os(a)&&rs(a)} +function ik(a){S=a;!!a&&Jb()} +function Iz(){Iz=Wi;Hz=Uz()} +function pb(){pb=Wi;ob=new I} +function kb(){ab.call(this)} +function SD(){ab.call(this)} +function QD(){kb.call(this)} +function IE(){kb.call(this)} +function TF(){kb.call(this)} +function Wl(a,b,c){Rl(a,c,b)} +function FA(a,b,c){a.Qb(c,b)} +function Cm(a,b,c){a.set(b,c)} +function Z(a,b){a.e=b;W(a,b)} +function wj(a,b){a.f=b;ck=!b} +function Px(a,b){b.forEach(a)} +function Xl(a,b){a.a.add(b.d)} +function hD(b,a){b.display=a} +function Wk(a){Nk();this.a=a} +function $F(a){XF();this.a=a} +function IA(a){HA.call(this,a)} +function iB(a){HA.call(this,a)} +function yB(a){HA.call(this,a)} +function OD(a){lb.call(this,a)} +function PD(a){OD.call(this,a)} +function zE(a){lb.call(this,a)} +function AE(a){lb.call(this,a)} +function JE(a){nb.call(this,a)} +function KE(a){lb.call(this,a)} +function ME(a){zE.call(this,a)} +function iF(){MD.call(this,'')} +function jF(){MD.call(this,'')} +function lF(a){OD.call(this,a)} +function rF(a){lb.call(this,a)} +function XD(a){return lH(a),a} +function wE(a){return lH(a),a} +function Q(a){return xb()-a.a} +function Wc(a,b){return $c(a,b)} +function FD(b,a){return a in b} +function xc(a,b){return iE(a,b)} +function xn(a,b){a.d?zn(b):Xk()} +function VG(a,b,c){b.gb(oF(c))} +function yu(a,b){a.c.forEach(b)} +function yz(a){mx(a.b,a.a,a.c)} +function aE(a){_D(a);return a.i} +function Tq(a,b){return a.a>b.a} +function oF(a){return Ic(a,5).e} +function ED(a){return Object(a)} +function Qb(){Qb=Wi;Pb=new Ao} +function Ft(){Ft=Wi;Et=new Mt} +function mA(){mA=Wi;lA=new NA} +function nF(){nF=Wi;mF=new LD} +function Db(){Db=Wi;!!(gc(),fc)} +function Qi(){Oi==null&&(Oi=[])} +function oG(a,b,c){b.gb(a.a[c])} +function Jx(a,b,c){OB(zx(a,c,b))} +function dx(a,b){$B(new yy(b,a))} +function ex(a,b){$B(new Ey(b,a))} +function xm(a,b){$B(new Zm(b,a))} +function Uk(a,b){++Mk;b.cb(a,Jk)} +function MB(a,b){a.e||a.c.add(b)} +function PG(a,b){LG(a);a.a.hc(b)} +function FG(a,b){Ic(a,104)._b(b)} +function dG(a,b){while(a.ic(b));} +function Mx(a,b){return Dl(a.b,b)} +function Ox(a,b){return Cl(a.b,b)} +function ry(a,b){return Lx(a.a,b)} +function nA(a,b){return BA(a.a,b)} +function _A(a,b){return BA(a.a,b)} +function nB(a,b){return BA(a.a,b)} +function ix(a,b){return Kw(b.a,a)} +function aj(b,a){return b.exec(a)} +function Ub(a){return !!a.b||!!a.g} +function qA(a){GA(a.a);return a.h} +function uA(a){GA(a.a);return a.c} +function xw(b,a){qw();delete b[a]} +function Ol(a,b){return Nc(a.b[b])} +function ol(a,b){this.a=a;this.b=b} +function Kl(a,b){this.a=a;this.b=b} +function Ml(a,b){this.a=a;this.b=b} +function _l(a,b){this.a=a;this.b=b} +function bm(a,b){this.a=a;this.b=b} +function Rm(a,b){this.a=a;this.b=b} +function Tm(a,b){this.a=a;this.b=b} +function Vm(a,b){this.a=a;this.b=b} +function Xm(a,b){this.a=a;this.b=b} +function Zm(a,b){this.a=a;this.b=b} +function Rn(a,b){this.a=a;this.b=b} +function Wn(a,b){this.b=a;this.a=b} +function Wj(a,b){this.b=a;this.a=b} +function Nm(a,b){this.b=a;this.a=b} +function Yn(a,b){this.b=a;this.a=b} +function xr(a,b){this.b=a;this.a=b} +function Lo(a,b){this.b=a;this.c=b} +function bs(a,b){this.a=a;this.b=b} +function ds(a,b){this.a=a;this.b=b} +function ys(a,b){this.a=a;this.b=b} +function pu(a,b){this.a=a;this.b=b} +function ru(a,b){this.a=a;this.b=b} +function Mu(a,b){this.a=a;this.b=b} +function Qu(a,b){this.a=a;this.b=b} +function Uu(a,b){this.a=a;this.b=b} +function Yv(a,b){this.a=a;this.b=b} +function bu(a,b){this.b=a;this.a=b} +function hy(a,b){this.b=a;this.a=b} +function jy(a,b){this.b=a;this.a=b} +function py(a,b){this.b=a;this.a=b} +function yy(a,b){this.b=a;this.a=b} +function Ey(a,b){this.b=a;this.a=b} +function My(a,b){this.a=a;this.b=b} +function Qy(a,b){this.a=a;this.b=b} +function Sy(a,b){this.a=a;this.b=b} +function iz(a,b){this.b=a;this.a=b} +function kz(a,b){this.a=a;this.b=b} +function Bz(a,b){this.a=a;this.b=b} +function Pz(a,b){this.a=a;this.b=b} +function Rz(a,b){this.b=a;this.a=b} +function Vo(a,b){Lo.call(this,a,b)} +function fq(a,b){Lo.call(this,a,b)} +function sE(){lb.call(this,null)} +function Ob(){yb!=0&&(yb=0);Cb=-1} +function fu(){this.a=new $wnd.Map} +function tC(){this.c=new $wnd.Map} +function eC(a,b){this.a=a;this.b=b} +function hC(a,b){this.a=a;this.b=b} +function TA(a,b){this.a=a;this.b=b} +function HB(a,b){this.a=a;this.b=b} +function EG(a,b){this.a=a;this.b=b} +function YG(a,b){this.a=a;this.b=b} +function $A(a,b){this.d=a;this.e=b} +function dH(a,b){this.b=a;this.a=b} +function SC(a,b){Lo.call(this,a,b)} +function $C(a,b){Lo.call(this,a,b)} +function CG(a,b){Lo.call(this,a,b)} +function Bq(a,b){tq(a,(Sq(),Qq),b)} +function vt(a,b,c,d){ut(a,b.d,c,d)} +function cx(a,b,c){qx(a,b);Tw(c.e)} +function fH(a,b,c){a.splice(b,0,c)} +function $o(a,b){return Yo(b,Zo(a))} +function Yc(a){return typeof a===CH} +function xE(a){return ad((lH(a),a))} +function _E(a,b){return a.substr(b)} +function Kz(a,b){PB(b);Hz.delete(a)} +function wD(b,a){b.clearTimeout(a)} +function Nb(a){$wnd.clearTimeout(a)} +function gj(a){$wnd.clearTimeout(a)} +function vD(b,a){b.clearInterval(a)} +function Tz(a){a.length=0;return a} +function fF(a,b){a.a+=''+b;return a} +function gF(a,b){a.a+=''+b;return a} +function hF(a,b){a.a+=''+b;return a} +function bd(a){oH(a==null);return a} +function TG(a,b,c){FG(b,c);return b} +function Iq(a,b){tq(a,(Sq(),Rq),b.a)} +function Vl(a,b){return a.a.has(b.d)} +function H(a,b){return _c(a)===_c(b)} +function UE(a,b){return a.indexOf(b)} +function CD(a){return a&&a.valueOf()} +function DD(a){return a&&a.valueOf()} +function VF(a){return a!=null?O(a):0} +function _c(a){return a==null?null:a} +function XF(){XF=Wi;WF=new $F(null)} +function Jv(){Jv=Wi;Iv=new $wnd.Map} +function qw(){qw=Wi;pw=new $wnd.Map} +function WD(){WD=Wi;UD=false;VD=true} +function fj(a){$wnd.clearInterval(a)} +function fk(a){ck&&sD($wnd.console,a)} +function dk(a){ck&&rD($wnd.console,a)} +function jk(a){ck&&tD($wnd.console,a)} +function kk(a){ck&&uD($wnd.console,a)} +function $n(a){ck&&sD($wnd.console,a)} +function U(a){a.h=zc(fi,FH,30,0,0,1)} +function UG(a,b,c){$G(a,bH(b,a.a,c))} +function Kx(a,b,c){return zx(a,c.a,b)} +function Du(a,b){return a.h.delete(b)} +function Fu(a,b){return a.b.delete(b)} +function EA(a,b){return a.a.delete(b)} +function bH(a,b,c){return TG(a.a,b,c)} +function Uz(){return new $wnd.WeakMap} +function ht(a){this.a=new tC;this.c=a} +function fr(a){this.a=a;ej.call(this)} +function Wr(a){this.a=a;ej.call(this)} +function Js(a){this.a=a;ej.call(this)} +function ab(){U(this);V(this);this.A()} +function vH(){vH=Wi;sH=new I;uH=new I} +function hx(a,b){var c;c=Kw(b,a);OB(c)} +function Nx(a,b){return pm(a.b.root,b)} +function eF(a){return a==null?IH:Zi(a)} +function Cr(a){return BI in a?a[BI]:-1} +function Kr(a){zo((Qb(),Pb),new js(a))} +function Rk(a){zo((Qb(),Pb),new ul(a))} +function Rx(a){zo((Qb(),Pb),new wz(a))} +function pp(a){zo((Qb(),Pb),new qp(a))} +function Ep(a){zo((Qb(),Pb),new Up(a))} +function xq(a){!!a.b&&Gq(a,(Sq(),Pq))} +function Lq(a){!!a.b&&Gq(a,(Sq(),Rq))} +function kF(a){MD.call(this,(lH(a),a))} +function GF(){this.a=zc(di,FH,1,0,5,1)} +function jD(a,b,c,d){return bD(a,b,c,d)} +function Sc(a,b){return a!=null&&Hc(a,b)} +function ZF(a,b){return a.a!=null?a.a:b} +function rH(a){return a.$H||(a.$H=++qH)} +function dn(a){return ''+en(bn.lb()-a,3)} +function kD(a,b){return a.appendChild(b)} +function lD(b,a){return b.appendChild(a)} +function VE(a,b,c){return a.indexOf(b,c)} +function WE(a,b){return a.lastIndexOf(b)} +function bB(a,b){GA(a.a);a.c.forEach(b)} +function oB(a,b){GA(a.a);a.b.forEach(b)} +function NB(a){if(a.d||a.e){return}LB(a)} +function _D(a){if(a.i!=null){return}mE(a)} +function iH(a){if(!a){throw Ni(new QD)}} +function jH(a){if(!a){throw Ni(new TF)}} +function oH(a){if(!a){throw Ni(new sE)}} +function Gs(a){if(a.a){bj(a.a);a.a=null}} +function Es(a,b){b.a.b==(Uo(),To)&&Gs(a)} +function VA(a,b){hA.call(this,a);this.a=b} +function SG(a,b){NG.call(this,a);this.a=b} +function Yk(a,b,c){Nk();return a.set(c,b)} +function aF(a,b,c){return a.substr(b,c-b)} +function iD(d,a,b,c){d.setProperty(a,b,c)} +function kc(a){gc();return parseInt(a)||-1} +function Uc(a){return typeof a==='number'} +function Xc(a){return typeof a==='string'} +function Tc(a){return typeof a==='boolean'} +function Ko(a){return a.b!=null?a.b:''+a.c} +function tb(a){return a==null?null:a.name} +function oD(b,a){return b.createElement(a)} +function GA(a){var b;b=WB;!!b&&JB(b,a.b)} +function ar(a,b){b.a.b==(Uo(),To)&&dr(a,-1)} +function ao(a,b){bo(a,b,Ic(pk(a.a,td),7).j)} +function YD(a,b){return lH(a),_c(a)===_c(b)} +function Jc(a){oH(a==null||Tc(a));return a} +function Kc(a){oH(a==null||Uc(a));return a} +function Lc(a){oH(a==null||Yc(a));return a} +function Pc(a){oH(a==null||Xc(a));return a} +function $B(a){XB==null&&(XB=[]);XB.push(a)} +function _B(a){ZB==null&&(ZB=[]);ZB.push(a)} +function Zk(a){Nk();Mk==0?a.D():Lk.push(a)} +function sb(a){return a==null?null:a.message} +function $c(a,b){return a&&b&&a instanceof b} +function SE(a,b){return lH(a),_c(a)===_c(b)} +function kj(a,b){return $wnd.setTimeout(a,b)} +function jj(a,b){return $wnd.setInterval(a,b)} +function XE(a,b,c){return a.lastIndexOf(b,c)} +function Eb(a,b,c){return a.apply(b,c);var d} +function Xb(a,b){a.b=Zb(a.b,[b,false]);Vb(a)} +function Jr(a,b){gu(Ic(pk(a.i,Wf),84),b[DI])} +function nr(a,b,c){a.gb(FE(rA(Ic(c.e,16),b)))} +function Ss(a,b,c){a.set(c,(GA(b.a),Pc(b.h)))} +function Uq(a,b,c){Lo.call(this,a,b);this.a=c} +function ly(a,b,c){this.c=a;this.b=b;this.a=c} +function ny(a,b,c){this.b=a;this.c=b;this.a=c} +function nw(a,b,c){this.b=a;this.a=b;this.c=c} +function uy(a,b,c){this.a=a;this.b=b;this.c=c} +function Gy(a,b,c){this.a=a;this.b=b;this.c=c} +function Iy(a,b,c){this.a=a;this.b=b;this.c=c} +function Ky(a,b,c){this.a=a;this.b=b;this.c=c} +function Wy(a,b,c){this.c=a;this.b=b;this.a=c} +function Wp(a,b,c){this.a=a;this.c=b;this.b=c} +function mz(a,b,c){this.b=a;this.c=b;this.a=c} +function ez(a,b,c){this.b=a;this.a=b;this.c=c} +function zz(a,b,c){this.b=a;this.a=b;this.c=c} +function Mv(a,b,c){this.c=a;this.d=b;this.j=c} +function HA(a){this.a=new $wnd.Set;this.b=a} +function Ql(){this.a=new $wnd.Map;this.b=[]} +function Fo(){this.b=(Uo(),Ro);this.a=new tC} +function Nk(){Nk=Wi;Lk=[];Jk=new al;Kk=new fl} +function HE(){HE=Wi;GE=zc($h,FH,26,256,0,1)} +function Sv(a){a.c?vD($wnd,a.d):wD($wnd,a.d)} +function wu(a,b){a.b.add(b);return new Uu(a,b)} +function xu(a,b){a.h.add(b);return new Qu(a,b)} +function xs(a,b){$wnd.navigator.sendBeacon(a,b)} +function mD(c,a,b){return c.insertBefore(a,b)} +function gD(b,a){return b.getPropertyValue(a)} +function hj(a,b){return zH(function(){a.I(b)})} +function iw(a,b){return jw(new lw(a),b,19,true)} +function CF(a,b){a.a[a.a.length]=b;return true} +function DF(a,b){kH(b,a.a.length);return a.a[b]} +function Ic(a,b){oH(a==null||Hc(a,b));return a} +function Oc(a,b){oH(a==null||$c(a,b));return a} +function zD(a){if(a==null){return 0}return +a} +function gE(a,b){var c;c=dE(a,b);c.e=2;return c} +function As(a,b){var c;c=ad(wE(Kc(b.a)));Fs(a,c)} +function tk(a,b,c){sk(a,b,c.bb());a.b.set(b,c)} +function $l(a,b,c){return a.set(c,(GA(b.a),b.h))} +function kp(a){return $wnd.Vaadin.Flow.getApp(a)} +function PB(a){a.e=true;LB(a);a.c.clear();KB(a)} +function xA(a,b){a.d=true;oA(a,b);_B(new PA(a))} +function mC(a,b){a.a==null&&(a.a=[]);a.a.push(b)} +function oC(a,b,c,d){var e;e=qC(a,b,c);e.push(d)} +function eD(a,b,c,d){a.removeEventListener(b,c,d)} +function fD(b,a){return b.getPropertyPriority(a)} +function Bc(a){return Array.isArray(a)&&a.lc===$i} +function Rc(a){return !Array.isArray(a)&&a.lc===$i} +function Vc(a){return a!=null&&Zc(a)&&!(a.lc===$i)} +function RF(a){return new SG(null,QF(a,a.length))} +function Zc(a){return typeof a===AH||typeof a===CH} +function lj(a){a.onreadystatechange=function(){}} +function lb(a){U(this);this.g=a;V(this);this.A()} +function Jt(a){Ft();this.c=[];this.a=Et;this.d=a} +function Ut(a,b){this.a=a;this.b=b;ej.call(this)} +function Nq(a,b){this.a=a;this.b=b;ej.call(this)} +function Yu(a,b){var c;c=b;return Ic(a.a.get(c),6)} +function qk(a,b,c){a.a.delete(c);a.a.set(c,b.bb())} +function zm(a,b,c){return a.push(nA(c,new Xm(c,b)))} +function QF(a,b){return eG(b,a.length),new pG(a,b)} +function Zb(a,b){!a&&(a=[]);a[a.length]=b;return a} +function dE(a,b){var c;c=new bE;c.f=a;c.d=b;return c} +function eE(a,b,c){var d;d=dE(a,b);qE(c,d);return d} +function Tw(a){var b;b=a.a;Gu(a,null);Gu(a,b);Gv(a)} +function Vk(a){++Mk;xn(Ic(pk(a.a,te),58),new ml)} +function bG(a){XF();return a==null?WF:new $F(lH(a))} +function Jb(){Db();if(zb){return}zb=true;Kb(false)} +function yH(){if(tH==256){sH=uH;uH=new I;tH=0}++tH} +function lH(a){if(a==null){throw Ni(new IE)}return a} +function Mc(a){oH(a==null||Array.isArray(a));return a} +function Cc(a,b,c){iH(c==null||wc(a,c));return a[b]=c} +function XA(a,b,c){hA.call(this,a);this.b=b;this.a=c} +function Zl(a){this.a=new $wnd.Set;this.b=[];this.c=a} +function Rw(a){var b;b=new $wnd.Map;a.push(b);return b} +function LG(a){if(!a.b){MG(a);a.c=true}else{LG(a.b)}} +function jG(a,b){lH(b);while(a.c=0){a.a=new Js(a);dj(a.a,b)}} +function fo(a){PG(RF(Ic(pk(a.a,td),7).c),new jo);a.b=false} +function or(a){ak('applyDefaultTheme',(WD(),a?true:false))} +function cA(a){if(!aA){return a}return $wnd.Polymer.dom(a)} +function Wo(){Uo();return Dc(xc(Fe,1),FH,61,0,[Ro,So,To])} +function Vq(){Sq();return Dc(xc(Te,1),FH,64,0,[Pq,Qq,Rq])} +function _C(){ZC();return Dc(xc(Dh,1),FH,44,0,[XC,WC,YC])} +function DG(){BG();return Dc(xc(zi,1),FH,49,0,[yG,zG,AG])} +function OG(a,b){var c;return RG(a,new GF,(c=new cH(b),c))} +function mH(a,b){if(a<0||a>b){throw Ni(new OD(BJ+a+CJ+b))}} +function dD(a,b){Rc(a)?a.U(b):(a.handleEvent(b),undefined)} +function Eu(a,b){_c(b.V(a))===_c((WD(),VD))&&a.b.delete(b)} +function aw(a,b){Yz(b).forEach(Xi(ew.prototype.gb,ew,[a]))} +function Dm(a,b,c,d,e){a.splice.apply(a,[b,c,d].concat(e))} +function Gn(a,b,c){this.a=a;this.c=b;this.b=c;ej.call(this)} +function In(a,b,c){this.a=a;this.c=b;this.b=c;ej.call(this)} +function RD(a,b){U(this);this.f=b;this.g=a;V(this);this.A()} +function yD(c,a,b){return c.setTimeout(zH(a.Ub).bind(a),b)} +function xD(c,a,b){return c.setInterval(zH(a.Ub).bind(a),b)} +function Qc(a){return a.jc||Array.isArray(a)&&xc(ed,1)||ed} +function Jp(a){$wnd.vaadinPush.atmosphere.unsubscribeUrl(a)} +function Ar(a){a&&a.afterServerUpdate&&a.afterServerUpdate()} +function kE(a){if(a.$b()){return null}var b=a.h;return Ti[b]} +function Ht(a){a.a=Et;if(!a.b){return}rs(Ic(pk(a.d,rf),15))} +function gm(a,b){a.updateComplete.then(zH(function(){b.J()}))} +function lx(a,b,c){return a.set(c,pA(pB(Bu(b.e,1),c),b.b[c]))} +function _z(a,b,c,d){return a.splice.apply(a,[b,c].concat(d))} +function Zv(a,b){Yz(b).forEach(Xi(cw.prototype.gb,cw,[a.a]))} +function oA(a,b){if(!a.b&&a.c&&UF(b,a.h)){return}yA(a,b,true)} +function kH(a,b){if(a<0||a>=b){throw Ni(new OD(BJ+a+CJ+b))}} +function nH(a,b){if(a<0||a>=b){throw Ni(new lF(BJ+a+CJ+b))}} +function iE(a,b){var c=a.a=a.a||[];return c[b]||(c[b]=a.Vb(b))} +function cC(a){this.a=a;this.b=[];this.c=new $wnd.Set;LB(this)} +function cp(a){a?($wnd.location=a):$wnd.location.reload(false)} +function Zp(a,b,c){return aF(a.b,b,$wnd.Math.min(a.b.length,c))} +function xC(a,b,c,d){return zC(new $wnd.XMLHttpRequest,a,b,c,d)} +function gq(){eq();return Dc(xc(Me,1),FH,52,0,[bq,aq,dq,cq])} +function TC(){RC();return Dc(xc(Ch,1),FH,45,0,[QC,OC,PC,NC])} +function gc(){gc=Wi;var a,b;b=!mc();a=new uc;fc=b?new nc:a} +function fE(a,b,c,d){var e;e=dE(a,b);qE(c,e);e.e=d?8:0;return e} +function yA(a,b,c){var d;d=a.h;a.c=c;a.h=b;DA(a.a,new XA(a,d,b))} +function sm(a,b,c){var d;d=[];c!=null&&d.push(c);return km(a,b,d)} +function gu(a,b){var c,d;for(c=0;c2){IC(a[0],'OS major',b);IC(a[1],oJ,b)}} +function KB(a){while(a.b.length!=0){Ic(a.b.splice(0,1)[0],46).Fb()}} +function TD(a){RD.call(this,a==null?IH:Zi(a),Sc(a,5)?Ic(a,5):null)} +function bj(a){if(!a.f){return}++a.d;a.e?fj(a.f.a):gj(a.f.a);a.f=null} +function Lp(){return $wnd.vaadinPush&&$wnd.vaadinPush.atmosphere} +function Am(a){return $wnd.customElements&&a.localName.indexOf('-')>-1} +function ad(a){return Math.max(Math.min(a,2147483647),-2147483648)|0} +function sB(a,b,c){GA(b.a);b.c&&(a[c]=ZA((GA(b.a),b.h)),undefined)} +function xB(a,b,c,d){var e;GA(c.a);if(c.c){e=Em((GA(c.a),c.h));b[d]=e}} +function xG(a,b,c,d){lH(a);lH(b);lH(c);lH(d);return new EG(b,new vG)} +function $u(a,b){var c;c=av(b);if(!c||!b.f){return c}return $u(a,b.f)} +function ZE(a,b,c){var d;c=dF(c);d=new RegExp(b);return a.replace(d,c)} +function io(a,b){var c;c=b.keyCode;if(c==27){b.preventDefault();cp(a)}} +function cB(a,b){var c;c=a.c.splice(0,b);DA(a.a,new jA(a,0,c,[],false))} +function sG(a,b){!a.a?(a.a=new kF(a.d)):hF(a.a,a.b);fF(a.a,b);return a} +function Ul(a,b){if(Vl(a,b.e.e)){a.b.push(b);return true}return false} +function ZA(a){var b;if(Sc(a,6)){b=Ic(a,6);return zu(b)}else{return a}} +function bp(a){var b;b=$doc.createElement('a');b.href=a;return b.href} +function op(a){var b=zH(pp);$wnd.Vaadin.Flow.registerWidgetset(a,b)} +function ym(a,b,c){var d;d=c.a;a.push(nA(d,new Tm(d,b)));$B(new Nm(d,b))} +function CA(a,b){if(!b){debugger;throw Ni(new SD)}return BA(a,a.Rb(b))} +function cu(a,b){if(b==null){debugger;throw Ni(new SD)}return a.a.get(b)} +function du(a,b){if(b==null){debugger;throw Ni(new SD)}return a.a.has(b)} +function YE(a,b){b=dF(b);return a.replace(new RegExp('[^0-9].*','g'),b)} +function vq(a,b){fk('Heartbeat exception: '+b.w());tq(a,(Sq(),Pq),null)} +function bx(a,b){var c;c=b.f;Yx(Ic(pk(b.e.e.g.c,td),7),a,c,(GA(b.a),b.h))} +function Bs(a,b){var c,d;c=Bu(a,8);d=pB(c,'pollInterval');nA(d,new Cs(b))} +function Yz(a){var b;b=[];a.forEach(Xi(Zz.prototype.cb,Zz,[b]));return b} +function Gb(b){Db();return function(){return Hb(b,this,arguments);var a}} +function xb(){if(Date.now){return Date.now()}return (new Date).getTime()} +function rB(a,b){if(!a.b.has(b)){return false}return uA(Ic(a.b.get(b),16))} +function kG(a,b){lH(b);if(a.ca||a>b){throw Ni(new PD('fromIndex: 0, toIndex: '+a+', length: '+b))}} +function NE(a,b,c){if(a==null){debugger;throw Ni(new SD)}this.a=OH;this.d=a;this.b=b;this.c=c} +function zA(a,b,c){mA();this.a=new IA(this);this.g=(XF(),XF(),WF);this.f=a;this.e=b;this.b=c} +function Aq(a,b,c){Bp(b)&&dt(Ic(pk(a.c,Df),13));Fq(c)||uq(a,'Invalid JSON from server: '+c,null)} +function px(a,b){var c;c=Ic(b.d.get(a),46);b.d.delete(a);if(!c){debugger;throw Ni(new SD)}c.Fb()} +function Lw(a,b,c,d){var e;e=Bu(d,a);oB(e,Xi(hy.prototype.cb,hy,[b,c]));return nB(e,new jy(b,c))} +function jC(b,c,d){return zH(function(){var a=Array.prototype.slice.call(arguments);d.Bb(b,c,a)})} +function _b(b,c){Qb();function d(){var a=zH(Yb)(b);a&&$wnd.setTimeout(d,c)} +$wnd.setTimeout(d,c)} +function up(c,a){var b=c.getConfig(a);if(b===null||b===undefined){return null}else{return FE(b)}} +function cD(b){var c=b.handler;if(!c){c=zH(function(a){dD(b,a)});c.listener=b;b.handler=c}return c} +function un(a,b){var c,d;c=new Nn(a);d=new $wnd.Function(a);Dn(a,new Un(d),new Wn(b,c),new Yn(b,c))} +function us(a,b){b&&(!a.b||!Ap(a.b))?(a.b=new Ip(a.d)):!b&&!!a.b&&Ap(a.b)&&xp(a.b,new ys(a,true))} +function vs(a,b){b&&(!a.b||!Ap(a.b))?(a.b=new Ip(a.d)):!b&&!!a.b&&Ap(a.b)&&xp(a.b,new ys(a,false))} +function Vb(a){if(!a.i){a.i=true;!a.f&&(a.f=new bc(a));_b(a.f,1);!a.h&&(a.h=new dc(a));_b(a.h,50)}} +function bv(a,b){var c;if(b!=a.e){c=b.a;!!c&&(qw(),!!c[XI])&&ww((qw(),c[XI]));jv(a,b);b.f=null}} +function mv(a,b){var c;if(Sc(a,29)){c=Ic(a,29);ad((lH(b),b))==2?cB(c,(GA(c.a),c.c.length)):aB(c)}} +function Mi(a){var b;if(Sc(a,5)){return a}b=a&&a.__java$exception;if(!b){b=new rb(a);hc(b)}return b} +function Yo(a,b){var c;if(a==null){return null}c=Xo('context://',b,a);c=Xo('base://','',c);return c} +function Hr(a,b){if(b==-1){return true}if(b==a.f+1){return true}if(a.f==-1){return true}return false} +function BD(c){return $wnd.JSON.stringify(c,function(a,b){if(a=='$H'){return undefined}return b},0)} +function ac(b,c){Qb();var d=$wnd.setInterval(function(){var a=zH(Yb)(b);!a&&$wnd.clearInterval(d)},c)} +function dr(a,b){ck&&rD($wnd.console,'Setting heartbeat interval to '+b+'sec.');a.a=b;br(a)} +function Eq(a,b){co(Ic(pk(a.c,Be),22),'',b+' could not be loaded. Push will not work.','',null,null)} +function zq(a){Ic(pk(a.c,_e),27).a>=0&&dr(Ic(pk(a.c,_e),27),Ic(pk(a.c,td),7).d);tq(a,(Sq(),Pq),null)} +function fv(a,b,c,d,e,f){if(!Wu(a,b)){debugger;throw Ni(new SD)}wt(Ic(pk(a.c,Hf),33),b,c,d,e,f)} +function St(a){this.a=a;bD($wnd,'beforeunload',new $t(this),false);ct(Ic(pk(a,Df),13),new au(this))} +function Tk(a,b){var c;c=new $wnd.Map;b.forEach(Xi(ol.prototype.cb,ol,[a,c]));c.size==0||Zk(new sl(c))} +function sj(a,b){var c;c='/'.length;if(!SE(b.substr(b.length-c,c),'/')){debugger;throw Ni(new SD)}a.b=b} +function ku(a,b){var c;c=!!b.a&&!YD((WD(),UD),qA(pB(Bu(b,0),QI)));if(!c||!b.f){return c}return ku(a,b.f)} +function MC(a,b,c){var d,e;b<0?(e=0):(e=b);c<0||c>a.length?(d=a.length):(d=c);return a.substr(e,d-e)} +function ut(a,b,c,d){var e;e={};e[VH]=KI;e[LI]=Object(b);e[KI]=c;!!d&&(e['data']=d,undefined);yt(a,e)} +function Dc(a,b,c,d,e){e.jc=a;e.kc=b;e.lc=$i;e.__elementTypeId$=c;e.__elementTypeCategory$=d;return e} +function Dp(a,b,c){TE(b,'true')||TE(b,'false')?(a.a[c]=TE(b,'true'),undefined):(a.a[c]=b,undefined)} +function Dq(a,b){ck&&($wnd.console.debug('Reopening push connection'),undefined);Bp(b)&&tq(a,(Sq(),Qq),null)} +function Dw(a,b){var c;if(b.d.has(a)){debugger;throw Ni(new SD)}c=jD(b.b,a,new gz(b),false);b.d.set(a,c)} +function rA(a,b){var c;GA(a.a);if(a.c){c=(GA(a.a),a.h);if(c==null){return b}return xE(Kc(c))}else{return b}} +function tp(c,a){var b=c.getConfig(a);if(b===null||b===undefined){return false}else{return WD(),b?true:false}} +function Y(a){var b,c,d,e;for(b=(a.h==null&&(a.h=(gc(),e=fc.G(a),ic(e))),a.h),c=0,d=b.length;c-129&&a<128){b=a+128;c=(HE(),GE)[b];!c&&(c=GE[b]=new BE(a));return c}return new BE(a)} +function Fq(a){var b;b=aj(new RegExp('Vaadin-Refresh(:\\s*(.*?))?(\\s|$)'),a);if(b){cp(b[2]);return true}return false} +function zw(a){var b;b=Lc(pw.get(a));if(b==null){b=Lc(new $wnd.Function(KI,cJ,'return ('+a+')'));pw.set(a,b)}return b} +function Kw(a,b){var c,d;d=a.f;if(b.c.has(d)){debugger;throw Ni(new SD)}c=new cC(new ez(a,b,d));b.c.set(d,c);return c} +function Jw(a){if(!a.b){debugger;throw Ni(new TD('Cannot bind client delegate methods to a Node'))}return iw(a.b,a.e)} +function MG(a){if(a.b){MG(a.b)}else if(a.c){throw Ni(new AE("Stream already terminated, can't be modified or used"))}} +function sA(a){var b;GA(a.a);if(a.c){b=(GA(a.a),a.h);if(b==null){return null}return GA(a.a),Pc(a.h)}else{return null}} +function An(a,b,c){var d;d=Mc(c.get(a));if(d==null){d=[];d.push(b);c.set(a,d);return true}else{d.push(b);return false}} +function GD(c){var a=[];for(var b in c){Object.prototype.hasOwnProperty.call(c,b)&&b!='$H'&&a.push(b)}return a} +function Uo(){Uo=Wi;Ro=new Vo('INITIALIZING',0);So=new Vo('RUNNING',1);To=new Vo('TERMINATED',2)} +function BG(){BG=Wi;yG=new CG('CONCURRENT',0);zG=new CG('IDENTITY_FINISH',1);AG=new CG('UNORDERED',2)} +function jp(a){var b,c,d,e;b=(e=new Dj,e.a=a,np(e,kp(a)),e);c=new Ij(b);gp.push(c);d=kp(a).getConfig('uidl');Hj(c,d)} +function rq(a){a.b=null;Ic(pk(a.c,Df),13).b&&dt(Ic(pk(a.c,Df),13));bk('connection-lost');dr(Ic(pk(a.c,_e),27),0)} +function Jq(a,b){var c;dt(Ic(pk(a.c,Df),13));c=b.b.responseText;Fq(c)||uq(a,'Invalid JSON response from server: '+c,b)} +function Tl(a){var b;if(!Ic(pk(a.c,_f),9).f){b=new $wnd.Map;a.a.forEach(Xi(_l.prototype.gb,_l,[a,b]));_B(new bm(a,b))}} +function yq(a,b){var c;if(b.a.b==(Uo(),To)){if(a.b){rq(a);c=Ic(pk(a.c,Ge),12);c.b!=To&&Eo(c,To)}!!a.d&&!!a.d.f&&bj(a.d)}} +function uq(a,b,c){var d,e;c&&(e=c.b);co(Ic(pk(a.c,Be),22),'',b,'',null,null);d=Ic(pk(a.c,Ge),12);d.b!=(Uo(),To)&&Eo(d,To)} +function Sl(a,b){var c;a.a.clear();while(a.b.length>0){c=Ic(a.b.splice(0,1)[0],16);Yl(c,b)||hv(Ic(pk(a.c,_f),9),c);aC()}} +function sC(a){var b,c;if(a.a!=null){try{for(c=0;c>>0,b.toString(16))}return a.toString()} +function rC(a,b){var c,d;d=Oc(a.c.get(b),$wnd.Map);if(d==null){return []}c=Mc(d.get(null));if(c==null){return []}return c} +function Yl(a,b){var c,d;c=Oc(b.get(a.e.e.d),$wnd.Map);if(c!=null&&c.has(a.f)){d=c.get(a.f);xA(a,d);return true}return false} +function vm(a){while(a.parentNode&&(a=a.parentNode)){if(a.toString()==='[object ShadowRoot]'){return true}}return false} +function uw(a,b){if(typeof a.get===CH){var c=a.get(b);if(typeof c===AH&&typeof c[fI]!==KH){return {nodeId:c[fI]}}}return null} +function Zo(a){var b,c;b=Ic(pk(a.a,td),7).b;c='/'.length;if(!SE(b.substr(b.length-c,c),'/')){debugger;throw Ni(new SD)}return b} +function Iw(a,b){var c,d;c=Au(b,11);for(d=0;d<(GA(c.a),c.c.length);d++){cA(a).classList.add(Pc(c.c[d]))}return _A(c,new qz(a))} +function Dl(b,c){return Array.from(b.querySelectorAll('[name]')).find(function(a){return a.getAttribute('name')==c})} +function ww(c){qw();var b=c['}p'].promises;b!==undefined&&b.forEach(function(a){a[1](Error('Client is resynchronizing'))})} +function gt(a){if(a.b){throw Ni(new AE('Trying to start a new request while another is active'))}a.b=true;et(a,new kt)} +function Xv(a){if(a.a.b){Pv(aJ,a.a.b,a.a.a,null);if(a.b.has(_I)){a.a.g=a.a.b;a.a.h=a.a.a}a.a.b=null;a.a.a=null}else{Lv(a.a)}} +function Vv(a){if(a.a.b){Pv(_I,a.a.b,a.a.a,a.a.i);a.a.b=null;a.a.a=null;a.a.i=null}else !!a.a.g&&Pv(_I,a.a.g,a.a.h,null);Lv(a.a)} +function _j(){return /iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==='MacIntel'&&navigator.maxTouchPoints>1} +function $j(){this.a=new KC($wnd.navigator.userAgent);this.a.c?'ontouchstart' in window:this.a.g?!!navigator.msMaxTouchPoints:Zj()} +function yn(a){this.b=new $wnd.Set;this.a=new $wnd.Map;this.d=!!($wnd.HTMLImports&&$wnd.HTMLImports.whenReady);this.c=a;rn(this)} +function Mq(a){this.c=a;Do(Ic(pk(a,Ge),12),new Wq(this));bD($wnd,'offline',new Yq(this),false);bD($wnd,'online',new $q(this),false)} +function RC(){RC=Wi;QC=new SC('STYLESHEET',0);OC=new SC('JAVASCRIPT',1);PC=new SC('JS_MODULE',2);NC=new SC('DYNAMIC_IMPORT',3)} +function nm(a){var b;if(hm==null){return}b=Oc(hm.get(a),$wnd.Set);if(b!=null){hm.delete(a);b.forEach(Xi(Jm.prototype.gb,Jm,[]))}} +function LB(a){var b;a.d=true;KB(a);a.e||$B(new QB(a));if(a.c.size!=0){b=a.c;a.c=new $wnd.Set;b.forEach(Xi(UB.prototype.gb,UB,[]))}} +function Pv(a,b,c,d){Jv();SE(_I,a)?c.forEach(Xi(gw.prototype.cb,gw,[d])):Yz(c).forEach(Xi(Qv.prototype.gb,Qv,[]));Xx(b.b,b.c,b.a,a)} +function zt(a,b,c,d,e){var f;f={};f[VH]='mSync';f[LI]=ED(b.d);f['feature']=Object(c);f['property']=d;f[cI]=e==null?null:e;yt(a,f)} +function Pj(a,b,c){var d;if(a==c.d){d=new $wnd.Function('callback','callback();');d.call(null,b);return WD(),true}return WD(),false} +function mc(){if(Error.stackTraceLimit>0){$wnd.Error.stackTraceLimit=Error.stackTraceLimit=64;return true}return 'stack' in new Error} +function pB(a,b){var c;c=Ic(a.b.get(b),16);if(!c){c=new zA(b,a,SE('innerHTML',b)&&a.d==1);a.b.set(b,c);DA(a.a,new VA(a,c))}return c} +function pE(a,b){var c=0;while(!b[c]||b[c]==''){c++}var d=b[c++];for(;c3.4028234663852886E38){return Infinity}else if(b<-3.4028234663852886E38){return -Infinity}return b} +function ZD(a){if(a>=48&&a<48+$wnd.Math.min(10,10)){return a-48}if(a>=97&&a<97){return a-97+10}if(a>=65&&a<65){return a-65+10}return -1} +function Qw(a){var b;b=Pc(qA(pB(Bu(a,0),'tag')));if(b==null){debugger;throw Ni(new TD('New child must have a tag'))}return oD($doc,b)} +function Nw(a){var b;if(!a.b){debugger;throw Ni(new TD('Cannot bind shadow root to a Node'))}b=Bu(a.e,20);Fw(a);return nB(b,new Dz(a))} +function Hl(a,b){var c,d;d=Bu(a,1);if(!a.a){um(Pc(qA(pB(Bu(a,0),'tag'))),new Kl(a,b));return}for(c=0;cd&&Cc(b,d,null);return b} +function lo(a){ck&&($wnd.console.debug('Re-establish PUSH connection'),undefined);us(Ic(pk(a.a.a,rf),15),true);zo((Qb(),Pb),new ro(a))} +function Sk(a){ck&&($wnd.console.debug('Finished loading eager dependencies, loading lazy.'),undefined);a.forEach(Xi(wl.prototype.cb,wl,[]))} +function cv(a){bB(Au(a.e,24),Xi(ov.prototype.gb,ov,[]));yu(a.e,Xi(sv.prototype.cb,sv,[]));a.a.forEach(Xi(qv.prototype.cb,qv,[a]));a.d=true} +function TE(a,b){lH(a);if(b==null){return false}if(SE(a,b)){return true}return a.length==b.length&&SE(a.toLowerCase(),b.toLowerCase())} +function eq(){eq=Wi;bq=new fq('CONNECT_PENDING',0);aq=new fq('CONNECTED',1);dq=new fq('DISCONNECT_PENDING',2);cq=new fq('DISCONNECTED',3)} +function xt(a,b,c,d,e){var f;f={};f[VH]='attachExistingElementById';f[LI]=ED(b.d);f[MI]=Object(c);f[NI]=Object(d);f['attachId']=e;yt(a,f)} +function bw(a,b){if(b.e){!!b.b&&Pv(_I,b.b,b.a,null)}else{Pv(aJ,b.b,b.a,null);Uv(b.f,ad(b.j))}if(b.b){CF(a,b.b);b.b=null;b.a=null;b.i=null}} +function xH(a){vH();var b,c,d;c=':'+a;d=uH[c];if(d!=null){return ad((lH(d),d))}d=sH[c];b=d==null?wH(a):ad((lH(d),d));yH();uH[c]=b;return b} +function O(a){return Xc(a)?xH(a):Uc(a)?ad((lH(a),a)):Tc(a)?(lH(a),a)?1231:1237:Rc(a)?a.p():Bc(a)?rH(a):!!a&&!!a.hashCode?a.hashCode():rH(a)} +function sk(a,b,c){if(a.a.has(b)){debugger;throw Ni(new TD((_D(b),'Registry already has a class of type '+b.i+' registered')))}a.a.set(b,c)} +function Ev(a,b){Dv();var c;if(a.g.f){debugger;throw Ni(new TD('Binding state node while processing state tree changes'))}c=Fv(a);c.Ib(a,b,Bv)} +function jA(a,b,c,d,e){this.e=a;if(c==null){debugger;throw Ni(new SD)}if(d==null){debugger;throw Ni(new SD)}this.c=b;this.d=c;this.a=d;this.b=e} +function Gq(a,b){if(a.b!=b){return}a.b=null;a.a=0;bk('connected');ck&&($wnd.console.debug('Re-established connection to server'),undefined)} +function rx(a,b){var c,d;d=pB(b,gJ);GA(d.a);d.c||xA(d,a.getAttribute(gJ));c=pB(b,hJ);vm(a)&&(GA(c.a),!c.c)&&!!a.style&&xA(c,a.style.display)} +function Fl(a,b,c,d){var e,f;if(!d){f=Ic(pk(a.g.c,Wd),60);e=Ic(f.a.get(c),26);if(!e){f.b[b]=c;f.a.set(c,FE(b));return FE(b)}return e}return d} +function Ex(a,b){var c,d;while(b!=null){for(c=a.length-1;c>-1;c--){d=Ic(a[c],6);if(b.isSameNode(d.a)){return d.d}}b=cA(b.parentNode)}return -1} +function Il(a,b,c){var d;if(Gl(a.a,c)){d=Ic(a.e.get(Vg),77);if(!d||!d.a.has(c)){return}pA(pB(b,c),a.a[c]).J()}else{rB(b,c)||xA(pB(b,c),null)}} +function Rl(a,b,c){var d,e;e=Yu(Ic(pk(a.c,_f),9),ad((lH(b),b)));if(e.c.has(1)){d=new $wnd.Map;oB(Bu(e,1),Xi(dm.prototype.cb,dm,[d]));c.set(b,d)}} +function qC(a,b,c){var d,e;e=Oc(a.c.get(b),$wnd.Map);if(e==null){e=new $wnd.Map;a.c.set(b,e)}d=Mc(e.get(c));if(d==null){d=[];e.set(c,d)}return d} +function Dx(a){var b;Bw==null&&(Bw=new $wnd.Map);b=Lc(Bw.get(a));if(b==null){b=Lc(new $wnd.Function(KI,cJ,'return ('+a+')'));Bw.set(a,b)}return b} +function Qr(){if($wnd.performance&&$wnd.performance.timing){return (new Date).getTime()-$wnd.performance.timing.responseStart}else{return -1}} +function kw(a,b,c,d){var e,f,g,h,i;i=Nc(a.bb());h=d.d;for(g=0;g=1&&IC(a[0],'OS major',b);if(a.length>=2){c=UE(a[1],cF(45));if(c>-1){d=a[1].substr(0,c-0);IC(d,oJ,b)}else{IC(a[1],oJ,b)}}} +function lc(a){gc();var b=a.e;if(b&&b.stack){var c=b.stack;var d=b+'\n';c.substring(0,d.length)==d&&(c=c.substring(d.length));return c.split('\n')}return []} +function nC(a,b,c){var d;if(!b){throw Ni(new KE('Cannot add a handler with a null type'))}a.b>0?mC(a,new vC(a,b,c)):(d=qC(a,b,null),d.push(c));return new uC} +function mm(a,b){var c,d,e,f,g;f=a.f;d=a.e.e;g=qm(d);if(!g){kk(gI+d.d+hI);return}c=jm((GA(a.a),a.h));if(wm(g.a)){e=sm(g,d,f);e!=null&&Cm(g.a,e,c);return}b[f]=c} +function br(a){if(a.a>0){dk('Scheduling heartbeat in '+a.a+' seconds');cj(a.c,a.a*1000)}else{ck&&($wnd.console.debug('Disabling heartbeat'),undefined);bj(a.c)}} +function Ns(a){var b,c,d,e;b=pB(Bu(Ic(pk(a.a,_f),9).e,5),'parameters');e=(GA(b.a),Ic(b.h,6));d=Bu(e,6);c=new $wnd.Map;oB(d,Xi(Zs.prototype.cb,Zs,[c]));return c} +function Sw(a,b,c,d,e,f){var g,h;if(!vx(a.e,b,e,f)){return}g=Nc(d.bb());if(wx(g,b,e,f,a)){if(!c){h=Ic(pk(b.g.c,Yd),51);h.a.add(b.d);Tl(h)}Gu(b,g);Gv(b)}c||aC()} +function hv(a,b){var c,d;if(!b){debugger;throw Ni(new SD)}d=b.e;c=d.e;if(Ul(Ic(pk(a.c,Yd),51),b)||!_u(a,c)){return}zt(Ic(pk(a.c,Hf),33),c,d.d,b.f,(GA(b.a),b.h))} +function on(){var a,b,c,d;b=$doc.head.childNodes;c=b.length;for(d=0;d=0;d--){if(SE(a[d].d,b)||SE(a[d].d,c)){a.length>=d+1&&a.splice(0,d+1);break}}return a} +function wt(a,b,c,d,e,f){var g;g={};g[VH]='attachExistingElement';g[LI]=ED(b.d);g[MI]=Object(c);g[NI]=Object(d);g['attachTagName']=e;g['attachIndex']=Object(f);yt(a,g)} +function wm(a){var b=typeof $wnd.Polymer===CH&&$wnd.Polymer.Element&&a instanceof $wnd.Polymer.Element;var c=a.constructor.polymerElementVersion!==undefined;return b||c} +function jw(a,b,c,d){var e,f,g,h;h=Au(b,c);GA(h.a);if(h.c.length>0){f=Nc(a.bb());for(e=0;e<(GA(h.a),h.c.length);e++){g=Pc(h.c[e]);rw(f,g,b,d)}}return _A(h,new nw(a,b,d))} +function Cx(a,b){var c,d,e,f,g;c=cA(b).childNodes;for(e=0;e but none was found. Appending instead."),undefined);mD($doc.head,a,b)} +function FC(a,b){var c,d;c=b.indexOf(' crios/');if(c==-1){c=b.indexOf(' chrome/');c==-1?(c=b.indexOf(pJ)+16):(c+=8);d=LC(b,c);JC(a,MC(b,c,c+d),b)}else{c+=7;d=LC(b,c);JC(a,MC(b,c,c+d),b)}} +function uE(a){tE==null&&(tE=new RegExp('^\\s*[+-]?(NaN|Infinity|((\\d+\\.?\\d*)|(\\.\\d+))([eE][+-]?\\d+)?[dDfF]?)\\s*$'));if(!tE.test(a)){throw Ni(new ME(yJ+a+'"'))}return parseFloat(a)} +function bF(a){var b,c,d;c=a.length;d=0;while(dd&&(nH(b-1,a.length),a.charCodeAt(b-1)<=32)){--b}return d>0||b=65536){b=55296+(a-65536>>10&1023)&65535;c=56320+(a-65536&1023)&65535;return String.fromCharCode(b)+(''+String.fromCharCode(c))}else{return String.fromCharCode(a&65535)}} +function Ib(a){a&&Sb((Qb(),Pb));--yb;if(yb<0){debugger;throw Ni(new TD('Negative entryDepth value at exit '+yb))}if(a){if(yb!=0){debugger;throw Ni(new TD('Depth not 0'+yb))}if(Cb!=-1){Nb(Cb);Cb=-1}}} +function co(a,b,c,d,e,f){var g;if(b==null&&c==null&&d==null){Ic(pk(a.a,td),7).l?go(a):cp(e);return}g=_n(b,c,d,f);if(!Ic(pk(a.a,td),7).l){bD(g,'click',new vo(e),false);bD($doc,'keydown',new xo(e),false)}} +function kC(a,b){var c,d,e,f;if(AD(b)==1){c=b;f=ad(DD(c[0]));switch(f){case 0:{e=ad(DD(c[1]));return d=e,Ic(a.a.get(d),6)}case 1:case 2:return null;default:throw Ni(new zE(mJ+BD(c)));}}else{return null}} +function er(a){this.c=new fr(this);this.b=a;dr(this,Ic(pk(a,td),7).d);this.d=Ic(pk(a,td),7).h;this.d=aD(this.d,'v-r=heartbeat');this.d=aD(this.d,sI+(''+Ic(pk(a,td),7).k));Do(Ic(pk(a,Ge),12),new kr(this))} +function Vx(a,b,c,d,e){var f,g,h,i,j,k,l;f=false;for(i=0;i2000){Bb=a;Cb=$wnd.setTimeout(Ob,10)}}if(yb++==0){Rb((Qb(),Pb));return true}return false} +function $p(a){var b,c,d;if(a.a>=a.b.length){debugger;throw Ni(new SD)}if(a.a==0){c=''+a.b.length+'|';b=4095-c.length;d=c+aF(a.b,0,$wnd.Math.min(a.b.length,b));a.a+=b}else{d=Zp(a,a.a,a.a+4095);a.a+=4095}return d} +function Gr(a){var b,c,d,e;if(a.g.length==0){return false}e=-1;for(b=0;b=f&&(nH(b,a.length),a.charCodeAt(b)!=32)){--b}if(b==f){return}d=a.substr(b+1,c-(b+1));e=$E(d,'\\.');EC(e,a)} +function eu(a,b){var c,d,e,f,g,h;if(!b){debugger;throw Ni(new SD)}for(d=(g=GD(b),g),e=0,f=d.length;e=0;d--){hF((g.a+=i,g),Pc(c[d]));i='.'}return g.a} +function Hp(a,b){var c,d,e,f,g;if(Lp()){Ep(b.a)}else{f=(Ic(pk(a.d,td),7).f?(e='VAADIN/static/push/vaadinPush-min.js'):(e='VAADIN/static/push/vaadinPush.js'),e);ck&&rD($wnd.console,'Loading '+f);d=Ic(pk(a.d,te),58);g=Ic(pk(a.d,td),7).h+f;c=new Wp(a,f,b);vn(d,g,c,false,_H)}} +function lC(a,b){var c,d,e,f,g,h;if(AD(b)==1){c=b;h=ad(DD(c[0]));switch(h){case 0:{g=ad(DD(c[1]));d=(f=g,Ic(a.a.get(f),6)).a;return d}case 1:return e=Mc(c[1]),e;case 2:return jC(ad(DD(c[1])),ad(DD(c[2])),Ic(pk(a.c,Hf),33));default:throw Ni(new zE(mJ+BD(c)));}}else{return b}} +function Dr(a,b){var c,d,e,f,g;ck&&($wnd.console.debug('Handling dependencies'),undefined);c=new $wnd.Map;for(e=(ZC(),Dc(xc(Dh,1),FH,44,0,[XC,WC,YC])),f=0,g=e.length;f0){k=Ww(a,b);d=!k?null:cA(k.a).nextSibling}else{d=null}for(g=0;ga.a){a.a==0?ck&&rD($wnd.console,'Updating client-to-server id to '+b+' based on server'):kk('Server expects next client-to-server id to be '+b+' but we were going to use '+a.a+'. Will use '+b+'.');a.a=b}} +function Pk(a,b,c){var d,e;e=Ic(pk(a.a,te),58);d=c==(ZC(),XC);switch(b.c){case 0:if(d){return new $k(e)}return new dl(e);case 1:if(d){return new il(e)}return new yl(e);case 2:if(d){throw Ni(new zE('Inline load mode is not supported for JsModule.'))}return new Al(e);case 3:return new kl;default:throw Ni(new zE('Unknown dependency type '+b));}} +function Lr(b,c){var d,e,f,g;f=Ic(pk(b.i,_f),9);g=yv(f,c['changes']);if(!Ic(pk(b.i,td),7).f){try{d=zu(f.e);ck&&($wnd.console.debug('StateTree after applying changes:'),undefined);ck&&rD($wnd.console,d)}catch(a){a=Mi(a);if(Sc(a,8)){e=a;ck&&($wnd.console.error('Failed to log state tree'),undefined);ck&&sD($wnd.console,e)}else throw Ni(a)}}_B(new hs(g))} +function rw(n,k,l,m){qw();n[k]=zH(function(c){var d=Object.getPrototypeOf(this);d[k]!==undefined&&d[k].apply(this,arguments);var e=c||$wnd.event;var f=l.Eb();var g=sw(this,e,k,l);g===null&&(g=Array.prototype.slice.call(arguments));var h;var i=-1;if(m){var j=this['}p'].promises;i=j.length;h=new Promise(function(a,b){j[i]=[a,b]})}f.Hb(l,k,g,i);return h})} +function Ok(a,b,c){var d,e,f,g,h;f=new $wnd.Map;for(e=0;e0){e=i.length;while(e>0&&i[e-1]==''){--e}e0&&(nH(0,a.length),a.charCodeAt(0)==45||(nH(0,a.length),a.charCodeAt(0)==43))?1:0;for(b=e;b2147483647){throw Ni(new ME(yJ+a+'"'))}return f} +function vx(a,b,c,d){var e,f,g,h,i;i=Au(a,24);for(f=0;f<(GA(i.a),i.c.length);f++){e=Ic(i.c[f],6);if(e==b){continue}if(SE((h=Bu(b,0),BD(Nc(qA(pB(h,RI))))),(g=Bu(e,0),BD(Nc(qA(pB(g,RI))))))){kk('There is already a request to attach element addressed by the '+d+". The existing request's node id='"+e.d+"'. Cannot attach the same element twice.");gv(b.g,a,b.d,e.d,c);return false}}return true} +function wc(a,b){var c;switch(yc(a)){case 6:return Xc(b);case 7:return Uc(b);case 8:return Tc(b);case 3:return Array.isArray(b)&&(c=yc(b),!(c>=14&&c<=16));case 11:return b!=null&&Yc(b);case 12:return b!=null&&(typeof b===AH||typeof b==CH);case 0:return Hc(b,a.__elementTypeId$);case 2:return Zc(b)&&!(b.lc===$i);case 1:return Zc(b)&&!(b.lc===$i)||Hc(b,a.__elementTypeId$);default:return true;}} +function Cl(b,c){if(document.body.$&&document.body.$.hasOwnProperty&&document.body.$.hasOwnProperty(c)){return document.body.$[c]}else if(b.shadowRoot){return b.shadowRoot.getElementById(c)}else if(b.getElementById){return b.getElementById(c)}else if(c&&c.match('^[a-zA-Z0-9-_]*$')){return b.querySelector('#'+c)}else{return Array.from(b.querySelectorAll('[id]')).find(function(a){return a.id==c})}} +function Gp(a,b){var c,d;if(!Bp(a)){throw Ni(new AE('This server to client push connection should not be used to send client to server messages'))}if(a.f==(eq(),aq)){d=dp(b);dk('Sending push ('+a.g+') message to server: '+d);if(SE(a.g,tI)){c=new _p(d);while(c.a=rA((d=Bu(Ic(pk(Ic(pk(a.c,Bf),37).a,_f),9).e,9),pB(d,'reconnectAttempts')),10000)?rq(a):Hq(a,c)} +function El(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r;j=null;g=cA(a.a).childNodes;o=new $wnd.Map;e=!b;i=-1;for(m=0;m=f){debugger;throw Ni(new SD)}return g.length==0?null:g}else{return a}} +function Fx(a,b,c,d,e){var f,g,h;h=Yu(e,ad(a));if(!h.c.has(1)){return}if(!Ax(h,b)){debugger;throw Ni(new TD('Host element is not a parent of the node whose property has changed. This is an implementation error. Most likely it means that there are several StateTrees on the same page (might be possible with portlets) and the target StateTree should not be passed into the method as an argument but somehow detected from the host element. Another option is that host element is calculated incorrectly.'))}f=Bu(h,1);g=pB(f,c);pA(g,d).J()} +function _n(a,b,c,d){var e,f,g,h,i,j;h=$doc;j=h.createElement('div');j.className='v-system-error';if(a!=null){f=h.createElement('div');f.className='caption';f.textContent=a;j.appendChild(f);ck&&sD($wnd.console,a)}if(b!=null){i=h.createElement('div');i.className='message';i.textContent=b;j.appendChild(i);ck&&sD($wnd.console,b)}if(c!=null){g=h.createElement('div');g.className='details';g.textContent=c;j.appendChild(g);ck&&sD($wnd.console,c)}if(d!=null){e=h.querySelector(d);!!e&&kD(Nc(ZF(bG(e.shadowRoot),e)),j)}else{lD(h.body,j)}return j} +function np(a,b){var c,d,e;c=vp(b,'serviceUrl');Cj(a,tp(b,'webComponentMode'));if(c==null){yj(a,bp('.'));sj(a,bp(vp(b,qI)))}else{a.h=c;sj(a,bp(c+(''+vp(b,qI))))}Bj(a,up(b,'v-uiId').a);uj(a,up(b,'heartbeatInterval').a);vj(a,up(b,'maxMessageSuspendTimeout').a);zj(a,(d=b.getConfig(rI),d?d.vaadinVersion:null));e=b.getConfig(rI);sp();Aj(a,b.getConfig('sessExpMsg'));wj(a,!tp(b,'debug'));xj(a,tp(b,'requestTiming'));tj(a,b.getConfig('webcomponents'));tp(b,'devToolsEnabled');vp(b,'liveReloadUrl');vp(b,'liveReloadBackend');vp(b,'springBootLiveReloadPort')} +function qc(a,b){var c,d,e,f,g,h,i,j,k;j='';if(b.length==0){return a.H(OH,MH,-1,-1)}k=bF(b);SE(k.substr(0,3),'at ')&&(k=k.substr(3));k=k.replace(/\[.*?\]/g,'');g=k.indexOf('(');if(g==-1){g=k.indexOf('@');if(g==-1){j=k;k=''}else{j=bF(k.substr(g+1));k=bF(k.substr(0,g))}}else{c=k.indexOf(')',g);j=k.substr(g+1,c-(g+1));k=bF(k.substr(0,g))}g=UE(k,cF(46));g!=-1&&(k=k.substr(g+1));(k.length==0||SE(k,'Anonymous function'))&&(k=MH);h=WE(j,cF(58));e=XE(j,cF(58),h-1);i=-1;d=-1;f=OH;if(h!=-1&&e!=-1){f=j.substr(0,e);i=kc(j.substr(e+1,h-(e+1)));d=kc(j.substr(h+1))}return a.H(f,k,i,d)} +function Ew(a,b){var c,d,e,f,g,h;g=(e=Bu(b,0),Nc(qA(pB(e,RI))));h=g[VH];if(SE('inMemory',h)){Gv(b);return}if(!a.b){debugger;throw Ni(new TD('Unexpected html node. The node is supposed to be a custom element'))}if(SE('@id',h)){if(fm(a.b)){gm(a.b,new Gy(a,b,g));return}else if(!(typeof a.b.$!=KH)){im(a.b,new Iy(a,b,g));return}Zw(a,b,g,true)}else if(SE(SI,h)){if(!a.b.root){im(a.b,new Ky(a,b,g));return}_w(a,b,g,true)}else if(SE('@name',h)){f=g[RI];c="name='"+f+"'";d=new My(a,f);if(!Mx(d.a,d.b)){kn(a.b,f,new Oy(a,b,d,f,c));return}Sw(a,b,true,d,f,c)}else{debugger;throw Ni(new TD('Unexpected payload type '+h))}} +function Ak(a,b){var c;this.a=new $wnd.Map;this.b=new $wnd.Map;sk(this,yd,a);sk(this,td,b);sk(this,te,new yn(this));sk(this,He,new _o(this));sk(this,Td,new Wk(this));sk(this,Be,new ho(this));tk(this,Ge,new Bk);sk(this,_f,new kv(this));sk(this,Df,new ht(this));sk(this,pf,new Pr(this));sk(this,rf,new ws(this));sk(this,Lf,new Jt(this));sk(this,Hf,new Bt(this));sk(this,Wf,new nu(this));tk(this,Sf,new Dk);tk(this,Wd,new Fk);sk(this,Yd,new Zl(this));c=new Hk(this);sk(this,_e,new er(c.a));this.b.set(_e,c);sk(this,Re,new Mq(this));sk(this,Rf,new St(this));sk(this,zf,new Qs(this));sk(this,Bf,new _s(this));sk(this,vf,new Hs(this))} +function wb(b){var c=function(a){return typeof a!=KH};var d=function(a){return a.replace(/\r\n/g,'')};if(c(b.outerHTML))return d(b.outerHTML);c(b.innerHTML)&&b.cloneNode&&$doc.createElement('div').appendChild(b.cloneNode(true)).innerHTML;if(c(b.nodeType)&&b.nodeType==3){return "'"+b.data.replace(/ /g,'\u25AB').replace(/\u00A0/,'\u25AA')+"'"}if(typeof c(b.htmlText)&&b.collapse){var e=b.htmlText;if(e){return 'IETextRange ['+d(e)+']'}else{var f=b.duplicate();f.pasteHTML('|');var g='IETextRange '+d(b.parentElement().outerHTML);f.moveStart('character',-1);f.pasteHTML('');return g}}return b.toString?b.toString():'[JavaScriptObject]'} +function Bm(a,b,c){var d,e,f;f=[];if(a.c.has(1)){if(!Sc(b,43)){debugger;throw Ni(new TD('Received an inconsistent NodeFeature for a node that has a ELEMENT_PROPERTIES feature. It should be NodeMap, but it is: '+b))}e=Ic(b,43);oB(e,Xi(Vm.prototype.cb,Vm,[f,c]));f.push(nB(e,new Rm(f,c)))}else if(a.c.has(16)){if(!Sc(b,29)){debugger;throw Ni(new TD('Received an inconsistent NodeFeature for a node that has a TEMPLATE_MODELLIST feature. It should be NodeList, but it is: '+b))}d=Ic(b,29);f.push(_A(d,new Lm(c)))}if(f.length==0){debugger;throw Ni(new TD('Node should have ELEMENT_PROPERTIES or TEMPLATE_MODELLIST feature'))}f.push(xu(a,new Pm(f)))} +function wx(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o;l=e.e;o=Pc(qA(pB(Bu(b,0),'tag')));h=false;if(!a){h=true;ck&&uD($wnd.console,iJ+d+" is not found. The requested tag name is '"+o+"'")}else if(!(!!a&&TE(o,a.tagName))){h=true;kk(iJ+d+" has the wrong tag name '"+a.tagName+"', the requested tag name is '"+o+"'")}if(h){gv(l.g,l,b.d,-1,c);return false}if(!l.c.has(20)){return true}k=Bu(l,20);m=Ic(qA(pB(k,dJ)),6);if(!m){return true}j=Au(m,2);g=null;for(i=0;i<(GA(j.a),j.c.length);i++){n=Ic(j.c[i],6);f=n.a;if(K(f,a)){g=FE(n.d);break}}if(g){ck&&uD($wnd.console,iJ+d+" has been already attached previously via the node id='"+g+"'");gv(l.g,l,b.d,g.a,c);return false}return true} +function ju(b,c,d,e){var f,g,h,i,j,k,l,m,n;if(c.length!=d.length+1){debugger;throw Ni(new SD)}try{j=new ($wnd.Function.bind.apply($wnd.Function,[null].concat(c)));j.apply(hu(b,e,new tu(b)),d)}catch(a){a=Mi(a);if(Sc(a,8)){i=a;ek(new lk(i));ck&&($wnd.console.error('Exception is thrown during JavaScript execution. Stacktrace will be dumped separately.'),undefined);if(!Ic(pk(b.a,td),7).f){g=new kF('[');h='';for(l=c,m=0,n=l.length;m0&&SE('window.location.reload();',c[0])){ck&&($wnd.console.warn('Executing forced page reload while a resync request is ongoing.'),undefined);$wnd.location.reload();return}}}ck&&($wnd.console.warn('Ignoring message from the server as a resync request is ongoing.'),undefined);return}Ic(pk(a.i,rf),15).e=0;if(e&&!Hr(a,j)){dk('Received resync message with id '+j+' while waiting for '+(a.f+1));a.f=j-1;Nr(a)}i=a.j.size!=0;if(i||!Hr(a,j)){if(i){ck&&($wnd.console.debug('Postponing UIDL handling due to lock...'),undefined)}else{if(j<=a.f){kk(EI+j+' but have already seen '+a.f+'. Ignoring it');Ir(b)&&dt(Ic(pk(a.i,Df),13));return}dk(EI+j+' but expected '+(a.f+1)+'. Postponing handling until the missing message(s) have been received')}a.g.push(new $r(b));if(!a.c.f){m=Ic(pk(a.i,td),7).e;cj(a.c,m)}return}CI in b&&cv(Ic(pk(a.i,_f),9));l=xb();h=new I;a.j.add(h);ck&&($wnd.console.debug('Handling message from server'),undefined);et(Ic(pk(a.i,Df),13),new rt);if(FI in b){k=b[FI];ts(Ic(pk(a.i,rf),15),k,CI in b)}j!=-1&&(a.f=j);if('redirect' in b){n=b['redirect']['url'];ck&&rD($wnd.console,'redirecting to '+n);cp(n);return}GI in b&&(a.b=b[GI]);HI in b&&(a.h=b[HI]);Dr(a,b);a.d||Vk(Ic(pk(a.i,Td),72));'timings' in b&&(a.k=b['timings']);Zk(new Ur);Zk(new _r(a,b,h,l))} +function KC(b){var c,d,e,f,g,h;b=b.toLowerCase();this.f=b.indexOf('gecko')!=-1&&b.indexOf('webkit')==-1&&b.indexOf(qJ)==-1;b.indexOf(' presto/')!=-1;this.l=b.indexOf(qJ)!=-1;this.m=!this.l&&b.indexOf('applewebkit')!=-1;this.c=(b.indexOf(' chrome/')!=-1||b.indexOf(' crios/')!=-1||b.indexOf(pJ)!=-1)&&b.indexOf(rJ)==-1;this.j=b.indexOf('opera')!=-1||b.indexOf(rJ)!=-1;this.g=b.indexOf('msie')!=-1&&!this.j&&b.indexOf('webtv')==-1;this.g=this.g||this.l;this.k=!this.c&&!this.g&&!this.j&&b.indexOf('safari')!=-1;this.e=b.indexOf(' firefox/')!=-1||b.indexOf('fxios/')!=-1;if(b.indexOf(' edge/')!=-1||b.indexOf(' edg/')!=-1||b.indexOf(sJ)!=-1||b.indexOf(tJ)!=-1){this.d=true;this.c=false;this.j=false;this.g=false;this.k=false;this.e=false;this.m=false;this.f=false}try{if(this.f){g=b.indexOf('rv:');if(g>=0){h=b.substr(g+3);h=ZE(h,uJ,'$1');this.a=yE(h)}}else if(this.m){h=_E(b,b.indexOf('webkit/')+7);h=ZE(h,vJ,'$1');this.a=yE(h)}else if(this.l){h=_E(b,b.indexOf(qJ)+8);h=ZE(h,vJ,'$1');this.a=yE(h);this.a>7&&(this.a=7)}else this.d&&(this.a=0)}catch(a){a=Mi(a);if(Sc(a,8)){c=a;nF();'Browser engine version parsing failed for: '+b+' '+c.w()}else throw Ni(a)}try{if(this.g){if(b.indexOf('msie')!=-1){if(this.l){this.b=4+ad(this.a)}else{f=_E(b,b.indexOf('msie ')+5);f=MC(f,0,UE(f,cF(59)));JC(this,f,b)}}else{g=b.indexOf('rv:');if(g>=0){h=b.substr(g+3);h=ZE(h,uJ,'$1');JC(this,h,b)}}}else if(this.e){e=b.indexOf(' fxios/');e!=-1?(e=b.indexOf(' fxios/')+7):(e=b.indexOf(' firefox/')+9);JC(this,MC(b,e,e+LC(b,e)),b)}else if(this.c){FC(this,b)}else if(this.k){e=b.indexOf(' version/');if(e>=0){e+=9;JC(this,MC(b,e,e+LC(b,e)),b)}else{d=ad(this.a*10);d>=6010&&d<6015?(this.b=9):d>=6015&&d<6018?(this.b=9):d>=6020&&d<6030?(this.b=10):d>=6030&&d<6040?(this.b=10):d>=6040&&d<6050?(this.b=11):d>=6050&&d<6060?(this.b=11):d>=6060&&d<6070?(this.b=12):d>=6070&&(this.b=12)}}else if(this.j){e=b.indexOf(' version/');e!=-1?(e+=9):b.indexOf(rJ)!=-1?(e=b.indexOf(rJ)+5):(e=b.indexOf('opera/')+6);JC(this,MC(b,e,e+LC(b,e)),b)}else if(this.d){e=b.indexOf(' edge/')+6;b.indexOf(' edg/')!=-1?(e=b.indexOf(' edg/')+5):b.indexOf(sJ)!=-1?(e=b.indexOf(sJ)+6):b.indexOf(tJ)!=-1&&(e=b.indexOf(tJ)+8);JC(this,MC(b,e,e+LC(b,e)),b)}}catch(a){a=Mi(a);if(Sc(a,8)){c=a;nF();'Browser version parsing failed for: '+b+' '+c.w()}else throw Ni(a)}if(b.indexOf('windows ')!=-1){b.indexOf('windows phone')!=-1}else if(b.indexOf('android')!=-1){CC(b)}else if(b.indexOf('linux')!=-1);else if(b.indexOf('macintosh')!=-1||b.indexOf('mac osx')!=-1||b.indexOf('mac os x')!=-1){this.h=b.indexOf('ipad')!=-1;this.i=b.indexOf('iphone')!=-1;(this.h||this.i)&&GC(b)}else b.indexOf('; cros ')!=-1&&DC(b)} +var AH='object',BH='[object Array]',CH='function',DH='java.lang',EH='com.google.gwt.core.client',FH={4:1},GH='__noinit__',HH={4:1,8:1,10:1,5:1},IH='null',JH='com.google.gwt.core.client.impl',KH='undefined',LH='Working array length changed ',MH='anonymous',NH='fnStack',OH='Unknown',PH='must be non-negative',QH='must be positive',RH='com.google.web.bindery.event.shared',SH='com.vaadin.client',TH={56:1},UH={25:1},VH='type',WH={48:1},XH={24:1},YH={14:1},ZH={28:1},_H='text/javascript',aI='constructor',bI='properties',cI='value',dI='com.vaadin.client.flow.reactive',eI={17:1},fI='nodeId',gI='Root node for node ',hI=' could not be found',iI=' is not an Element',jI={65:1},kI={81:1},lI={47:1},mI='script',nI='stylesheet',oI='pushMode',pI='com.vaadin.flow.shared',qI='contextRootUrl',rI='versionInfo',sI='v-uiId=',tI='websocket',uI='transport',vI='application/json; charset=UTF-8',wI='VAADIN/push',xI='com.vaadin.client.communication',yI={90:1},zI='dialogText',AI='dialogTextGaveUp',BI='syncId',CI='resynchronize',DI='execute',EI='Received message with server id ',FI='clientId',GI='Vaadin-Security-Key',HI='Vaadin-Push-ID',II='sessionExpired',JI='pushServletMapping',KI='event',LI='node',MI='attachReqId',NI='attachAssignedId',OI='com.vaadin.client.flow',QI='bound',RI='payload',SI='subTemplate',TI={46:1},UI='Node is null',VI='Node is not created for this tree',WI='Node id is not registered with this tree',XI='$server',YI='feat',ZI='remove',$I='com.vaadin.client.flow.binding',_I='trailing',aJ='intermediate',bJ='elemental.util',cJ='element',dJ='shadowRoot',eJ='The HTML node for the StateNode with id=',fJ='An error occurred when Flow tried to find a state node matching the element ',gJ='hidden',hJ='styleDisplay',iJ='Element addressed by the ',jJ='dom-repeat',kJ='dom-change',lJ='com.vaadin.client.flow.nodefeature',mJ='Unsupported complex type in ',nJ='com.vaadin.client.gwt.com.google.web.bindery.event.shared',oJ='OS minor',pJ=' headlesschrome/',qJ='trident/',rJ=' opr/',sJ=' edga/',tJ=' edgios/',uJ='(\\.[0-9]+).+',vJ='([0-9]+\\.[0-9]+).*',wJ='com.vaadin.flow.shared.ui',xJ='java.io',yJ='For input string: "',zJ='java.util',AJ='java.util.stream',BJ='Index: ',CJ=', Size: ',DJ='user.agent';var _,Ti,Oi,Li=-1;$wnd.goog=$wnd.goog||{};$wnd.goog.global=$wnd.goog.global||$wnd;Ui();Vi(1,null,{},I);_.n=function J(a){return H(this,a)};_.o=function L(){return this.jc};_.p=function N(){return rH(this)};_.q=function P(){var a;return aE(M(this))+'@'+(a=O(this)>>>0,a.toString(16))};_.equals=function(a){return this.n(a)};_.hashCode=function(){return this.p()};_.toString=function(){return this.q()};var Ec,Fc,Gc;Vi(67,1,{67:1},bE);_.Vb=function cE(a){var b;b=new bE;b.e=4;a>1?(b.c=iE(this,a-1)):(b.c=this);return b};_.Wb=function hE(){_D(this);return this.b};_.Xb=function jE(){return aE(this)};_.Yb=function lE(){_D(this);return this.g};_.Zb=function nE(){return (this.e&4)!=0};_.$b=function oE(){return (this.e&1)!=0};_.q=function rE(){return ((this.e&2)!=0?'interface ':(this.e&1)!=0?'':'class ')+(_D(this),this.i)};_.e=0;var $D=1;var di=eE(DH,'Object',1);var Sh=eE(DH,'Class',67);Vi(95,1,{},R);_.a=0;var cd=eE(EH,'Duration',95);var S=null;Vi(5,1,{4:1,5:1});_.s=function bb(a){return new Error(a)};_.t=function db(){return this.e};_.u=function eb(){var a;return a=Ic(OG(QG(RF((this.i==null&&(this.i=zc(ki,FH,5,0,0,1)),this.i)),new pF),xG(new IG,new GG,new KG,Dc(xc(zi,1),FH,49,0,[(BG(),zG)]))),91),FF(a,zc(di,FH,1,a.a.length,5,1))};_.v=function fb(){return this.f};_.w=function gb(){return this.g};_.A=function hb(){Z(this,cb(this.s($(this,this.g))));hc(this)};_.q=function jb(){return $(this,this.w())};_.e=GH;_.j=true;var ki=eE(DH,'Throwable',5);Vi(8,5,{4:1,8:1,5:1});var Wh=eE(DH,'Exception',8);Vi(10,8,HH,mb);var ei=eE(DH,'RuntimeException',10);Vi(55,10,HH,nb);var _h=eE(DH,'JsException',55);Vi(120,55,HH);var gd=eE(JH,'JavaScriptExceptionBase',120);Vi(32,120,{32:1,4:1,8:1,10:1,5:1},rb);_.w=function ub(){return qb(this),this.c};_.B=function vb(){return _c(this.b)===_c(ob)?null:this.b};var ob;var dd=eE(EH,'JavaScriptException',32);var ed=eE(EH,'JavaScriptObject$',0);Vi(312,1,{});var fd=eE(EH,'Scheduler',312);var yb=0,zb=false,Ab,Bb=0,Cb=-1;Vi(130,312,{});_.e=false;_.i=false;var Pb;var kd=eE(JH,'SchedulerImpl',130);Vi(131,1,{},bc);_.C=function cc(){this.a.e=true;Tb(this.a);this.a.e=false;return this.a.i=Ub(this.a)};var hd=eE(JH,'SchedulerImpl/Flusher',131);Vi(132,1,{},dc);_.C=function ec(){this.a.e&&_b(this.a.f,1);return this.a.i};var jd=eE(JH,'SchedulerImpl/Rescuer',132);var fc;Vi(322,1,{});var od=eE(JH,'StackTraceCreator/Collector',322);Vi(121,322,{},nc);_.F=function oc(a){var b={},j;var c=[];a[NH]=c;var d=arguments.callee.caller;while(d){var e=(gc(),d.name||(d.name=jc(d.toString())));c.push(e);var f=':'+e;var g=b[f];if(g){var h,i;for(h=0,i=g.length;h0){qn(this.b,this.c);return false}else if(a==0){pn(this.b,this.c);return true}else if(Q(this.a)>60000){pn(this.b,this.c);return false}else{return true}};var ie=eE(SH,'ResourceLoader/1',189);Vi(190,42,{},Gn);_.J=function Hn(){this.a.b.has(this.c)||pn(this.a,this.b)};var je=eE(SH,'ResourceLoader/2',190);Vi(194,42,{},In);_.J=function Jn(){this.a.b.has(this.c)?qn(this.a,this.b):pn(this.a,this.b)};var ke=eE(SH,'ResourceLoader/3',194);Vi(195,1,XH,Kn);_.db=function Ln(a){pn(this.a,a)};_.eb=function Mn(a){qn(this.a,a)};var le=eE(SH,'ResourceLoader/4',195);Vi(63,1,{},Nn);var me=eE(SH,'ResourceLoader/ResourceLoadEvent',63);Vi(100,1,XH,On);_.db=function Pn(a){pn(this.a,a)};_.eb=function Qn(a){qn(this.a,a)};var oe=eE(SH,'ResourceLoader/SimpleLoadListener',100);Vi(188,1,XH,Rn);_.db=function Sn(a){pn(this.a,a)};_.eb=function Tn(a){var b;if((!Yj&&(Yj=new $j),Yj).a.c||(!Yj&&(Yj=new $j),Yj).a.g||(!Yj&&(Yj=new $j),Yj).a.d){b=Cn(this.b);if(b==0){pn(this.a,a);return}}qn(this.a,a)};var pe=eE(SH,'ResourceLoader/StyleSheetLoadListener',188);Vi(191,1,UH,Un);_.bb=function Vn(){return this.a.call(null)};var qe=eE(SH,'ResourceLoader/lambda$0$Type',191);Vi(192,1,YH,Wn);_.J=function Xn(){this.b.eb(this.a)};var re=eE(SH,'ResourceLoader/lambda$1$Type',192);Vi(193,1,YH,Yn);_.J=function Zn(){this.b.db(this.a)};var se=eE(SH,'ResourceLoader/lambda$2$Type',193);Vi(22,1,{22:1},ho);_.b=false;var Be=eE(SH,'SystemErrorHandler',22);Vi(166,1,{},jo);_.gb=function ko(a){eo(Pc(a))};var ue=eE(SH,'SystemErrorHandler/0methodref$recreateNodes$Type',166);Vi(162,1,{},mo);_.mb=function no(a,b){var c;dr(Ic(pk(this.a.a,_e),27),Ic(pk(this.a.a,td),7).d);c=b;$n(c.w())};_.nb=function oo(a){var b,c,d,e;jk('Received xhr HTTP session resynchronization message: '+a.responseText);dr(Ic(pk(this.a.a,_e),27),-1);e=Ic(pk(this.a.a,td),7).k;b=Sr(Tr(a.responseText));c=b['uiId'];if(c!=e){ck&&rD($wnd.console,'UI ID switched from '+e+' to '+c+' after resynchronization');Bj(Ic(pk(this.a.a,td),7),c)}rk(this.a.a);Eo(Ic(pk(this.a.a,Ge),12),(Uo(),So));Fr(Ic(pk(this.a.a,pf),21),b);d=Rs(qA(pB(Bu(Ic(pk(Ic(pk(this.a.a,zf),36).a,_f),9).e,5),oI)));d?zo((Qb(),Pb),new po(this)):zo((Qb(),Pb),new to(this))};var ye=eE(SH,'SystemErrorHandler/1',162);Vi(164,1,{},po);_.D=function qo(){lo(this.a)};var ve=eE(SH,'SystemErrorHandler/1/lambda$0$Type',164);Vi(163,1,{},ro);_.D=function so(){fo(this.a.a)};var we=eE(SH,'SystemErrorHandler/1/lambda$1$Type',163);Vi(165,1,{},to);_.D=function uo(){fo(this.a.a)};var xe=eE(SH,'SystemErrorHandler/1/lambda$2$Type',165);Vi(160,1,{},vo);_.U=function wo(a){cp(this.a)};var ze=eE(SH,'SystemErrorHandler/lambda$0$Type',160);Vi(161,1,{},xo);_.U=function yo(a){io(this.a,a)};var Ae=eE(SH,'SystemErrorHandler/lambda$1$Type',161);Vi(134,130,{},Ao);_.a=0;var De=eE(SH,'TrackingScheduler',134);Vi(135,1,{},Bo);_.D=function Co(){this.a.a--};var Ce=eE(SH,'TrackingScheduler/lambda$0$Type',135);Vi(12,1,{12:1},Fo);var Ge=eE(SH,'UILifecycle',12);Vi(170,329,{},Ho);_.L=function Io(a){Ic(a,90).ob(this)};_.M=function Jo(){return Go};var Go=null;var Ee=eE(SH,'UILifecycle/StateChangeEvent',170);Vi(20,1,{4:1,31:1,20:1});_.n=function No(a){return this===a};_.p=function Oo(){return rH(this)};_.q=function Po(){return this.b!=null?this.b:''+this.c};_.c=0;var Uh=eE(DH,'Enum',20);Vi(61,20,{61:1,4:1,31:1,20:1},Vo);var Ro,So,To;var Fe=fE(SH,'UILifecycle/UIState',61,Wo);Vi(328,1,FH);var Bh=eE(pI,'VaadinUriResolver',328);Vi(50,328,{50:1,4:1},_o);_.pb=function ap(a){return $o(this,a)};var He=eE(SH,'URIResolver',50);var fp=false,gp;Vi(114,1,{},qp);_.D=function rp(){mp(this.a)};var Ie=eE('com.vaadin.client.bootstrap','Bootstrapper/lambda$0$Type',114);Vi(86,1,{},Ip);_.qb=function Kp(){return Ic(pk(this.d,pf),21).f};_.rb=function Mp(a){this.f=(eq(),cq);co(Ic(pk(Ic(pk(this.d,Re),18).c,Be),22),'','Client unexpectedly disconnected. Ensure client timeout is disabled.','',null,null)};_.sb=function Np(a){this.f=(eq(),bq);Ic(pk(this.d,Re),18);ck&&($wnd.console.debug('Push connection closed'),undefined)};_.tb=function Op(a){this.f=(eq(),cq);sq(Ic(pk(this.d,Re),18),'Push connection using '+a[uI]+' failed!')};_.ub=function Pp(a){var b,c;c=a['responseBody'];b=Sr(Tr(c));if(!b){Aq(Ic(pk(this.d,Re),18),this,c);return}else{dk('Received push ('+this.g+') message: '+c);Fr(Ic(pk(this.d,pf),21),b)}};_.vb=function Qp(a){dk('Push connection established using '+a[uI]);Fp(this,a)};_.wb=function Rp(a,b){this.f==(eq(),aq)&&(this.f=bq);Dq(Ic(pk(this.d,Re),18),this)};_.xb=function Sp(a){dk('Push connection re-established using '+a[uI]);Fp(this,a)};_.yb=function Tp(){kk('Push connection using primary method ('+this.a[uI]+') failed. Trying with '+this.a['fallbackTransport'])};var Qe=eE(xI,'AtmospherePushConnection',86);Vi(246,1,{},Up);_.D=function Vp(){wp(this.a)};var Je=eE(xI,'AtmospherePushConnection/0methodref$connect$Type',246);Vi(248,1,XH,Wp);_.db=function Xp(a){Eq(Ic(pk(this.a.d,Re),18),a.a)};_.eb=function Yp(a){if(Lp()){dk(this.c+' loaded');Ep(this.b.a)}else{Eq(Ic(pk(this.a.d,Re),18),a.a)}};var Ke=eE(xI,'AtmospherePushConnection/1',248);Vi(243,1,{},_p);_.a=0;var Le=eE(xI,'AtmospherePushConnection/FragmentedMessage',243);Vi(52,20,{52:1,4:1,31:1,20:1},fq);var aq,bq,cq,dq;var Me=fE(xI,'AtmospherePushConnection/State',52,gq);Vi(245,1,yI,hq);_.ob=function iq(a){Cp(this.a,a)};var Ne=eE(xI,'AtmospherePushConnection/lambda$0$Type',245);Vi(244,1,ZH,jq);_.D=function kq(){};var Oe=eE(xI,'AtmospherePushConnection/lambda$1$Type',244);Vi(360,$wnd.Function,{},lq);_.cb=function mq(a,b){Dp(this.a,Pc(a),Pc(b))};Vi(247,1,ZH,nq);_.D=function oq(){Ep(this.a)};var Pe=eE(xI,'AtmospherePushConnection/lambda$3$Type',247);var Re=gE(xI,'ConnectionStateHandler');Vi(217,1,{18:1},Mq);_.a=0;_.b=null;var Xe=eE(xI,'DefaultConnectionStateHandler',217);Vi(219,42,{},Nq);_.J=function Oq(){this.a.d=null;qq(this.a,this.b)};var Se=eE(xI,'DefaultConnectionStateHandler/1',219);Vi(64,20,{64:1,4:1,31:1,20:1},Uq);_.a=0;var Pq,Qq,Rq;var Te=fE(xI,'DefaultConnectionStateHandler/Type',64,Vq);Vi(218,1,yI,Wq);_.ob=function Xq(a){yq(this.a,a)};var Ue=eE(xI,'DefaultConnectionStateHandler/lambda$0$Type',218);Vi(220,1,{},Yq);_.U=function Zq(a){rq(this.a)};var Ve=eE(xI,'DefaultConnectionStateHandler/lambda$1$Type',220);Vi(221,1,{},$q);_.U=function _q(a){zq(this.a)};var We=eE(xI,'DefaultConnectionStateHandler/lambda$2$Type',221);Vi(27,1,{27:1},er);_.a=-1;var _e=eE(xI,'Heartbeat',27);Vi(214,42,{},fr);_.J=function gr(){cr(this.a)};var Ye=eE(xI,'Heartbeat/1',214);Vi(216,1,{},hr);_.mb=function ir(a,b){!b?this.a.a<0?ck&&($wnd.console.debug('Heartbeat terminated, ignoring failure.'),undefined):wq(Ic(pk(this.a.b,Re),18),a):vq(Ic(pk(this.a.b,Re),18),b);br(this.a)};_.nb=function jr(a){xq(Ic(pk(this.a.b,Re),18));br(this.a)};var Ze=eE(xI,'Heartbeat/2',216);Vi(215,1,yI,kr);_.ob=function lr(a){ar(this.a,a)};var $e=eE(xI,'Heartbeat/lambda$0$Type',215);Vi(172,1,{},pr);_.gb=function qr(a){ak('firstDelay',FE(Ic(a,26).a))};var af=eE(xI,'LoadingIndicatorConfigurator/0methodref$setFirstDelay$Type',172);Vi(173,1,{},rr);_.gb=function sr(a){ak('secondDelay',FE(Ic(a,26).a))};var bf=eE(xI,'LoadingIndicatorConfigurator/1methodref$setSecondDelay$Type',173);Vi(174,1,{},tr);_.gb=function ur(a){ak('thirdDelay',FE(Ic(a,26).a))};var cf=eE(xI,'LoadingIndicatorConfigurator/2methodref$setThirdDelay$Type',174);Vi(175,1,lI,vr);_.kb=function wr(a){or(tA(Ic(a.e,16)))};var df=eE(xI,'LoadingIndicatorConfigurator/lambda$3$Type',175);Vi(176,1,lI,xr);_.kb=function yr(a){nr(this.b,this.a,a)};_.a=0;var ef=eE(xI,'LoadingIndicatorConfigurator/lambda$4$Type',176);Vi(21,1,{21:1},Pr);_.a=0;_.b='init';_.d=false;_.e=0;_.f=-1;_.h=null;_.l=0;var pf=eE(xI,'MessageHandler',21);Vi(180,1,ZH,Ur);_.D=function Vr(){!bA&&$wnd.Polymer!=null&&SE($wnd.Polymer.version.substr(0,'1.'.length),'1.')&&(bA=true,ck&&($wnd.console.debug('Polymer micro is now loaded, using Polymer DOM API'),undefined),aA=new dA,undefined)};var ff=eE(xI,'MessageHandler/0methodref$updateApiImplementation$Type',180);Vi(179,42,{},Wr);_.J=function Xr(){Br(this.a)};var gf=eE(xI,'MessageHandler/1',179);Vi(348,$wnd.Function,{},Yr);_.gb=function Zr(a){zr(Ic(a,6))};Vi(62,1,{62:1},$r);var hf=eE(xI,'MessageHandler/PendingUIDLMessage',62);Vi(181,1,ZH,_r);_.D=function as(){Mr(this.a,this.d,this.b,this.c)};_.c=0;var jf=eE(xI,'MessageHandler/lambda$1$Type',181);Vi(183,1,eI,bs);_.fb=function cs(){_B(new ds(this.a,this.b))};var kf=eE(xI,'MessageHandler/lambda$3$Type',183);Vi(182,1,eI,ds);_.fb=function es(){Jr(this.a,this.b)};var lf=eE(xI,'MessageHandler/lambda$4$Type',182);Vi(184,1,{},fs);_.C=function gs(){return ao(Ic(pk(this.a.i,Be),22),null),false};var mf=eE(xI,'MessageHandler/lambda$5$Type',184);Vi(186,1,eI,hs);_.fb=function is(){Kr(this.a)};var nf=eE(xI,'MessageHandler/lambda$6$Type',186);Vi(185,1,{},js);_.D=function ks(){this.a.forEach(Xi(Yr.prototype.gb,Yr,[]))};var of=eE(xI,'MessageHandler/lambda$7$Type',185);Vi(15,1,{15:1},ws);_.a=0;_.e=0;var rf=eE(xI,'MessageSender',15);Vi(99,1,ZH,ys);_.D=function zs(){ms(this.a,this.b)};_.b=false;var qf=eE(xI,'MessageSender/lambda$0$Type',99);Vi(167,1,lI,Cs);_.kb=function Ds(a){As(this.a,a)};var sf=eE(xI,'PollConfigurator/lambda$0$Type',167);Vi(73,1,{73:1},Hs);_.zb=function Is(){var a;a=Ic(pk(this.b,_f),9);ev(a,a.e,'ui-poll',null)};_.a=null;var vf=eE(xI,'Poller',73);Vi(169,42,{},Js);_.J=function Ks(){var a;a=Ic(pk(this.a.b,_f),9);ev(a,a.e,'ui-poll',null)};var tf=eE(xI,'Poller/1',169);Vi(168,1,yI,Ls);_.ob=function Ms(a){Es(this.a,a)};var uf=eE(xI,'Poller/lambda$0$Type',168);Vi(36,1,{36:1},Qs);var zf=eE(xI,'PushConfiguration',36);Vi(227,1,lI,Ts);_.kb=function Us(a){Ps(this.a,a)};var wf=eE(xI,'PushConfiguration/0methodref$onPushModeChange$Type',227);Vi(228,1,eI,Vs);_.fb=function Ws(){us(Ic(pk(this.a.a,rf),15),true)};var xf=eE(xI,'PushConfiguration/lambda$1$Type',228);Vi(229,1,eI,Xs);_.fb=function Ys(){us(Ic(pk(this.a.a,rf),15),false)};var yf=eE(xI,'PushConfiguration/lambda$2$Type',229);Vi(354,$wnd.Function,{},Zs);_.cb=function $s(a,b){Ss(this.a,Ic(a,16),Pc(b))};Vi(37,1,{37:1},_s);var Bf=eE(xI,'ReconnectConfiguration',37);Vi(171,1,ZH,at);_.D=function bt(){pq(this.a)};var Af=eE(xI,'ReconnectConfiguration/lambda$0$Type',171);Vi(13,1,{13:1},ht);_.b=false;var Df=eE(xI,'RequestResponseTracker',13);Vi(178,1,{},it);_.D=function jt(){ft(this.a)};var Cf=eE(xI,'RequestResponseTracker/lambda$0$Type',178);Vi(242,329,{},kt);_.L=function lt(a){bd(a);null.mc()};_.M=function mt(){return null};var Ef=eE(xI,'RequestStartingEvent',242);Vi(226,329,{},ot);_.L=function pt(a){Ic(a,333).a.b=false};_.M=function qt(){return nt};var nt;var Ff=eE(xI,'ResponseHandlingEndedEvent',226);Vi(286,329,{},rt);_.L=function st(a){bd(a);null.mc()};_.M=function tt(){return null};var Gf=eE(xI,'ResponseHandlingStartedEvent',286);Vi(33,1,{33:1},Bt);_.Ab=function Ct(a,b,c){ut(this,a,b,c)};_.Bb=function Dt(a,b,c){var d;d={};d[VH]='channel';d[LI]=Object(a);d['channel']=Object(b);d['args']=c;yt(this,d)};var Hf=eE(xI,'ServerConnector',33);Vi(35,1,{35:1},Jt);_.b=false;var Et;var Lf=eE(xI,'ServerRpcQueue',35);Vi(208,1,YH,Kt);_.J=function Lt(){Ht(this.a)};var If=eE(xI,'ServerRpcQueue/0methodref$doFlush$Type',208);Vi(207,1,YH,Mt);_.J=function Nt(){Ft()};var Jf=eE(xI,'ServerRpcQueue/lambda$0$Type',207);Vi(209,1,{},Ot);_.D=function Pt(){this.a.a.J()};var Kf=eE(xI,'ServerRpcQueue/lambda$2$Type',209);Vi(71,1,{71:1},St);_.b=false;var Rf=eE(xI,'XhrConnection',71);Vi(225,42,{},Ut);_.J=function Vt(){Tt(this.b)&&this.a.b&&cj(this,250)};var Mf=eE(xI,'XhrConnection/1',225);Vi(222,1,{},Xt);_.mb=function Yt(a,b){var c;c=new bu(a,this.a);if(!b){Kq(Ic(pk(this.c.a,Re),18),c);return}else{Iq(Ic(pk(this.c.a,Re),18),c)}};_.nb=function Zt(a){var b,c;dk('Server visit took '+dn(this.b)+'ms');c=a.responseText;b=Sr(Tr(c));if(!b){Jq(Ic(pk(this.c.a,Re),18),new bu(a,this.a));return}Lq(Ic(pk(this.c.a,Re),18));ck&&rD($wnd.console,'Received xhr message: '+c);Fr(Ic(pk(this.c.a,pf),21),b)};_.b=0;var Nf=eE(xI,'XhrConnection/XhrResponseHandler',222);Vi(223,1,{},$t);_.U=function _t(a){this.a.b=true};var Of=eE(xI,'XhrConnection/lambda$0$Type',223);Vi(224,1,{333:1},au);var Pf=eE(xI,'XhrConnection/lambda$1$Type',224);Vi(103,1,{},bu);var Qf=eE(xI,'XhrConnectionError',103);Vi(59,1,{59:1},fu);var Sf=eE(OI,'ConstantPool',59);Vi(84,1,{84:1},nu);_.Cb=function ou(){return Ic(pk(this.a,td),7).a};var Wf=eE(OI,'ExecuteJavaScriptProcessor',84);Vi(211,1,TH,pu);_.V=function qu(a){var b;return _B(new ru(this.a,(b=this.b,b))),WD(),true};var Tf=eE(OI,'ExecuteJavaScriptProcessor/lambda$0$Type',211);Vi(210,1,eI,ru);_.fb=function su(){iu(this.a,this.b)};var Uf=eE(OI,'ExecuteJavaScriptProcessor/lambda$1$Type',210);Vi(212,1,YH,tu);_.J=function uu(){mu(this.a)};var Vf=eE(OI,'ExecuteJavaScriptProcessor/lambda$2$Type',212);Vi(303,1,{},vu);var Xf=eE(OI,'NodeUnregisterEvent',303);Vi(6,1,{6:1},Iu);_.Db=function Ju(){return zu(this)};_.Eb=function Ku(){return this.g};_.d=0;_.i=false;var $f=eE(OI,'StateNode',6);Vi(341,$wnd.Function,{},Mu);_.cb=function Nu(a,b){Cu(this.a,this.b,Ic(a,34),Kc(b))};Vi(342,$wnd.Function,{},Ou);_.gb=function Pu(a){Lu(this.a,Ic(a,105))};var Eh=gE('elemental.events','EventRemover');Vi(152,1,TI,Qu);_.Fb=function Ru(){Du(this.a,this.b)};var Yf=eE(OI,'StateNode/lambda$2$Type',152);Vi(343,$wnd.Function,{},Su);_.gb=function Tu(a){Eu(this.a,Ic(a,56))};Vi(153,1,TI,Uu);_.Fb=function Vu(){Fu(this.a,this.b)};var Zf=eE(OI,'StateNode/lambda$4$Type',153);Vi(9,1,{9:1},kv);_.Gb=function lv(){return this.e};_.Hb=function nv(a,b,c,d){var e;if(_u(this,a)){e=Nc(c);At(Ic(pk(this.c,Hf),33),a,b,e,d)}};_.d=false;_.f=false;var _f=eE(OI,'StateTree',9);Vi(346,$wnd.Function,{},ov);_.gb=function pv(a){yu(Ic(a,6),Xi(sv.prototype.cb,sv,[]))};Vi(347,$wnd.Function,{},qv);_.cb=function rv(a,b){var c;bv(this.a,(c=Ic(a,6),Kc(b),c))};Vi(332,$wnd.Function,{},sv);_.cb=function tv(a,b){mv(Ic(a,34),Kc(b))};var Bv,Cv;Vi(177,1,{},Hv);var ag=eE($I,'Binder/BinderContextImpl',177);var bg=gE($I,'BindingStrategy');Vi(79,1,{79:1},Mv);_.j=0;var Iv;var eg=eE($I,'Debouncer',79);Vi(377,$wnd.Function,{},Qv);_.gb=function Rv(a){Ic(a,14).J()};Vi(331,1,{});_.c=false;_.d=0;var Ih=eE(bJ,'Timer',331);Vi(306,331,{},Wv);var cg=eE($I,'Debouncer/1',306);Vi(307,331,{},Yv);var dg=eE($I,'Debouncer/2',307);Vi(378,$wnd.Function,{},$v);_.cb=function _v(a,b){var c;Zv(this,(c=Oc(a,$wnd.Map),Nc(b),c))};Vi(379,$wnd.Function,{},cw);_.gb=function dw(a){aw(this.a,Oc(a,$wnd.Map))};Vi(380,$wnd.Function,{},ew);_.gb=function fw(a){bw(this.a,Ic(a,79))};Vi(376,$wnd.Function,{},gw);_.cb=function hw(a,b){Ov(this.a,Ic(a,14),Pc(b))};Vi(301,1,UH,lw);_.bb=function mw(){return yw(this.a)};var fg=eE($I,'ServerEventHandlerBinder/lambda$0$Type',301);Vi(302,1,jI,nw);_.hb=function ow(a){kw(this.b,this.a,this.c,a)};_.c=false;var gg=eE($I,'ServerEventHandlerBinder/lambda$1$Type',302);var pw;Vi(249,1,{310:1},xx);_.Ib=function yx(a,b,c){Gw(this,a,b,c)};_.Jb=function Bx(a){return Qw(a)};_.Lb=function Gx(a,b){var c,d,e;d=Object.keys(a);e=new zz(d,a,b);c=Ic(b.e.get(ig),76);!c?mx(e.b,e.a,e.c):(c.a=e)};_.Mb=function Hx(r,s){var t=this;var u=s._propertiesChanged;u&&(s._propertiesChanged=function(a,b,c){zH(function(){t.Lb(b,r)})();u.apply(this,arguments)});var v=r.Eb();var w=s.ready;s.ready=function(){w.apply(this,arguments);nm(s);var q=function(){var o=s.root.querySelector(jJ);if(o){s.removeEventListener(kJ,q)}else{return}if(!o.constructor.prototype.$propChangedModified){o.constructor.prototype.$propChangedModified=true;var p=o.constructor.prototype._propertiesChanged;o.constructor.prototype._propertiesChanged=function(a,b,c){p.apply(this,arguments);var d=Object.getOwnPropertyNames(b);var e='items.';var f;for(f=0;f0){var i=h.substr(0,g);var j=h.substr(g+1);var k=a.items[i];if(k&&k.nodeId){var l=k.nodeId;var m=k[j];var n=this.__dataHost;while(!n.localName||n.__dataHost){n=n.__dataHost}zH(function(){Fx(l,n,j,m,v)})()}}}}}}};s.root&&s.root.querySelector(jJ)?q():s.addEventListener(kJ,q)}};_.Kb=function Ix(a){if(a.c.has(0)){return true}return !!a.g&&K(a,a.g.e)};var Aw,Bw;var Qg=eE($I,'SimpleElementBindingStrategy',249);Vi(365,$wnd.Function,{},Zx);_.gb=function $x(a){Ic(a,46).Fb()};Vi(369,$wnd.Function,{},_x);_.gb=function ay(a){Ic(a,14).J()};Vi(101,1,{},by);var hg=eE($I,'SimpleElementBindingStrategy/BindingContext',101);Vi(76,1,{76:1},cy);var ig=eE($I,'SimpleElementBindingStrategy/InitialPropertyUpdate',76);Vi(250,1,{},dy);_.Nb=function ey(a){ax(this.a,a)};var jg=eE($I,'SimpleElementBindingStrategy/lambda$0$Type',250);Vi(251,1,{},fy);_.Nb=function gy(a){bx(this.a,a)};var kg=eE($I,'SimpleElementBindingStrategy/lambda$1$Type',251);Vi(361,$wnd.Function,{},hy);_.cb=function iy(a,b){var c;Jx(this.b,this.a,(c=Ic(a,16),Pc(b),c))};Vi(260,1,kI,jy);_.jb=function ky(a){Kx(this.b,this.a,a)};var lg=eE($I,'SimpleElementBindingStrategy/lambda$11$Type',260);Vi(261,1,lI,ly);_.kb=function my(a){ux(this.c,this.b,this.a)};var mg=eE($I,'SimpleElementBindingStrategy/lambda$12$Type',261);Vi(262,1,eI,ny);_.fb=function oy(){cx(this.b,this.c,this.a)};var ng=eE($I,'SimpleElementBindingStrategy/lambda$13$Type',262);Vi(263,1,ZH,py);_.D=function qy(){this.b.Nb(this.a)};var og=eE($I,'SimpleElementBindingStrategy/lambda$14$Type',263);Vi(264,1,TH,sy);_.V=function ty(a){return ry(this,a)};var pg=eE($I,'SimpleElementBindingStrategy/lambda$15$Type',264);Vi(265,1,ZH,uy);_.D=function vy(){this.a[this.b]=jm(this.c)};var qg=eE($I,'SimpleElementBindingStrategy/lambda$16$Type',265);Vi(267,1,jI,wy);_.hb=function xy(a){dx(this.a,a)};var rg=eE($I,'SimpleElementBindingStrategy/lambda$17$Type',267);Vi(266,1,eI,yy);_.fb=function zy(){Xw(this.b,this.a)};var sg=eE($I,'SimpleElementBindingStrategy/lambda$18$Type',266);Vi(269,1,jI,Ay);_.hb=function By(a){ex(this.a,a)};var tg=eE($I,'SimpleElementBindingStrategy/lambda$19$Type',269);Vi(252,1,{},Cy);_.Nb=function Dy(a){fx(this.a,a)};var ug=eE($I,'SimpleElementBindingStrategy/lambda$2$Type',252);Vi(268,1,eI,Ey);_.fb=function Fy(){gx(this.b,this.a)};var vg=eE($I,'SimpleElementBindingStrategy/lambda$20$Type',268);Vi(270,1,YH,Gy);_.J=function Hy(){Zw(this.a,this.b,this.c,false)};var wg=eE($I,'SimpleElementBindingStrategy/lambda$21$Type',270);Vi(271,1,YH,Iy);_.J=function Jy(){Zw(this.a,this.b,this.c,false)};var xg=eE($I,'SimpleElementBindingStrategy/lambda$22$Type',271);Vi(272,1,YH,Ky);_.J=function Ly(){_w(this.a,this.b,this.c,false)};var yg=eE($I,'SimpleElementBindingStrategy/lambda$23$Type',272);Vi(273,1,UH,My);_.bb=function Ny(){return Mx(this.a,this.b)};var zg=eE($I,'SimpleElementBindingStrategy/lambda$24$Type',273);Vi(274,1,YH,Oy);_.J=function Py(){Sw(this.b,this.e,false,this.c,this.d,this.a)};var Ag=eE($I,'SimpleElementBindingStrategy/lambda$25$Type',274);Vi(275,1,UH,Qy);_.bb=function Ry(){return Nx(this.a,this.b)};var Bg=eE($I,'SimpleElementBindingStrategy/lambda$26$Type',275);Vi(276,1,UH,Sy);_.bb=function Ty(){return Ox(this.a,this.b)};var Cg=eE($I,'SimpleElementBindingStrategy/lambda$27$Type',276);Vi(362,$wnd.Function,{},Uy);_.cb=function Vy(a,b){var c;PB((c=Ic(a,74),Pc(b),c))};Vi(253,1,{105:1},Wy);_.ib=function Xy(a){nx(this.c,this.b,this.a)};var Dg=eE($I,'SimpleElementBindingStrategy/lambda$3$Type',253);Vi(363,$wnd.Function,{},Yy);_.gb=function Zy(a){Px(this.a,Oc(a,$wnd.Map))};Vi(364,$wnd.Function,{},$y);_.cb=function _y(a,b){var c;(c=Ic(a,46),Pc(b),c).Fb()};Vi(366,$wnd.Function,{},az);_.cb=function bz(a,b){var c;hx(this.a,(c=Ic(a,16),Pc(b),c))};Vi(277,1,kI,cz);_.jb=function dz(a){ix(this.a,a)};var Eg=eE($I,'SimpleElementBindingStrategy/lambda$34$Type',277);Vi(278,1,ZH,ez);_.D=function fz(){jx(this.b,this.a,this.c)};var Fg=eE($I,'SimpleElementBindingStrategy/lambda$35$Type',278);Vi(279,1,{},gz);_.U=function hz(a){kx(this.a,a)};var Gg=eE($I,'SimpleElementBindingStrategy/lambda$36$Type',279);Vi(367,$wnd.Function,{},iz);_.gb=function jz(a){Qx(this.b,this.a,Pc(a))};Vi(368,$wnd.Function,{},kz);_.gb=function lz(a){lx(this.a,this.b,Pc(a))};Vi(280,1,{},mz);_.gb=function nz(a){Xx(this.b,this.c,this.a,Pc(a))};var Hg=eE($I,'SimpleElementBindingStrategy/lambda$39$Type',280);Vi(255,1,eI,oz);_.fb=function pz(){Rx(this.a)};var Ig=eE($I,'SimpleElementBindingStrategy/lambda$4$Type',255);Vi(281,1,jI,qz);_.hb=function rz(a){Sx(this.a,a)};var Jg=eE($I,'SimpleElementBindingStrategy/lambda$41$Type',281);Vi(282,1,UH,sz);_.bb=function tz(){return this.a.b};var Kg=eE($I,'SimpleElementBindingStrategy/lambda$42$Type',282);Vi(370,$wnd.Function,{},uz);_.gb=function vz(a){this.a.push(Ic(a,6))};Vi(254,1,{},wz);_.D=function xz(){Tx(this.a)};var Lg=eE($I,'SimpleElementBindingStrategy/lambda$5$Type',254);Vi(257,1,YH,zz);_.J=function Az(){yz(this)};var Mg=eE($I,'SimpleElementBindingStrategy/lambda$6$Type',257);Vi(256,1,UH,Bz);_.bb=function Cz(){return this.a[this.b]};var Ng=eE($I,'SimpleElementBindingStrategy/lambda$7$Type',256);Vi(259,1,kI,Dz);_.jb=function Ez(a){$B(new Fz(this.a))};var Og=eE($I,'SimpleElementBindingStrategy/lambda$8$Type',259);Vi(258,1,eI,Fz);_.fb=function Gz(){Fw(this.a)};var Pg=eE($I,'SimpleElementBindingStrategy/lambda$9$Type',258);Vi(283,1,{310:1},Lz);_.Ib=function Mz(a,b,c){Jz(a,b)};_.Jb=function Nz(a){return $doc.createTextNode('')};_.Kb=function Oz(a){return a.c.has(7)};var Hz;var Tg=eE($I,'TextBindingStrategy',283);Vi(284,1,ZH,Pz);_.D=function Qz(){Iz();nD(this.a,Pc(qA(this.b)))};var Rg=eE($I,'TextBindingStrategy/lambda$0$Type',284);Vi(285,1,{105:1},Rz);_.ib=function Sz(a){Kz(this.b,this.a)};var Sg=eE($I,'TextBindingStrategy/lambda$1$Type',285);Vi(340,$wnd.Function,{},Wz);_.gb=function Xz(a){this.a.add(a)};Vi(344,$wnd.Function,{},Zz);_.cb=function $z(a,b){this.a.push(a)};var aA,bA=false;Vi(293,1,{},dA);var Ug=eE('com.vaadin.client.flow.dom','PolymerDomApiImpl',293);Vi(77,1,{77:1},eA);var Vg=eE('com.vaadin.client.flow.model','UpdatableModelProperties',77);Vi(375,$wnd.Function,{},fA);_.gb=function gA(a){this.a.add(Pc(a))};Vi(87,1,{});_.Ob=function iA(){return this.e};var uh=eE(dI,'ReactiveValueChangeEvent',87);Vi(54,87,{54:1},jA);_.Ob=function kA(){return Ic(this.e,29)};_.b=false;_.c=0;var Wg=eE(lJ,'ListSpliceEvent',54);Vi(16,1,{16:1,311:1},zA);_.Pb=function AA(a){return CA(this.a,a)};_.b=false;_.c=false;_.d=false;var lA;var eh=eE(lJ,'MapProperty',16);Vi(85,1,{});var th=eE(dI,'ReactiveEventRouter',85);Vi(235,85,{},IA);_.Qb=function JA(a,b){Ic(a,47).kb(Ic(b,78))};_.Rb=function KA(a){return new LA(a)};var Yg=eE(lJ,'MapProperty/1',235);Vi(236,1,lI,LA);_.kb=function MA(a){NB(this.a)};var Xg=eE(lJ,'MapProperty/1/0methodref$onValueChange$Type',236);Vi(234,1,YH,NA);_.J=function OA(){mA()};var Zg=eE(lJ,'MapProperty/lambda$0$Type',234);Vi(237,1,eI,PA);_.fb=function QA(){this.a.d=false};var $g=eE(lJ,'MapProperty/lambda$1$Type',237);Vi(238,1,eI,RA);_.fb=function SA(){this.a.d=false};var _g=eE(lJ,'MapProperty/lambda$2$Type',238);Vi(239,1,YH,TA);_.J=function UA(){vA(this.a,this.b)};var ah=eE(lJ,'MapProperty/lambda$3$Type',239);Vi(88,87,{88:1},VA);_.Ob=function WA(){return Ic(this.e,43)};var bh=eE(lJ,'MapPropertyAddEvent',88);Vi(78,87,{78:1},XA);_.Ob=function YA(){return Ic(this.e,16)};var dh=eE(lJ,'MapPropertyChangeEvent',78);Vi(34,1,{34:1});_.d=0;var fh=eE(lJ,'NodeFeature',34);Vi(29,34,{34:1,29:1,311:1},eB);_.Pb=function fB(a){return CA(this.a,a)};_.Sb=function gB(a){var b,c,d;c=[];for(b=0;b=0?':'+this.c:'')+')'};_.c=0;var fi=eE(DH,'StackTraceElement',30);Gc={4:1,111:1,31:1,2:1};var ii=eE(DH,'String',2);Vi(68,83,{111:1},iF,jF,kF);var gi=eE(DH,'StringBuilder',68);Vi(124,69,HH,lF);var hi=eE(DH,'StringIndexOutOfBoundsException',124);Vi(484,1,{});var mF;Vi(106,1,TH,pF);_.V=function qF(a){return oF(a)};var ji=eE(DH,'Throwable/lambda$0$Type',106);Vi(94,10,HH,rF);var li=eE(DH,'UnsupportedOperationException',94);Vi(326,1,{104:1});_._b=function sF(a){throw Ni(new rF('Add not supported on this collection'))};_.q=function tF(){var a,b,c;c=new tG;for(b=this.ac();b.dc();){a=b.ec();sG(c,a===this?'(this Collection)':a==null?IH:Zi(a))}return !c.a?c.c:c.e.length==0?c.a.a:c.a.a+(''+c.e)};var mi=eE(zJ,'AbstractCollection',326);Vi(327,326,{104:1,91:1});_.cc=function uF(a,b){throw Ni(new rF('Add not supported on this list'))};_._b=function vF(a){this.cc(this.bc(),a);return true};_.n=function wF(a){var b,c,d,e,f;if(a===this){return true}if(!Sc(a,41)){return false}f=Ic(a,91);if(this.a.length!=f.a.length){return false}e=new MF(f);for(c=new MF(this);c.a; + } + +} + +customElements.define('react-router-outlet', ReactRouterOutletElement); diff --git a/src/main/frontend/generated/jar-resources/comboBoxConnector.js b/src/main/frontend/generated/jar-resources/comboBoxConnector.js new file mode 100644 index 0000000..3af8cea --- /dev/null +++ b/src/main/frontend/generated/jar-resources/comboBoxConnector.js @@ -0,0 +1,277 @@ +import { Debouncer } from '@polymer/polymer/lib/utils/debounce.js'; +import { timeOut } from '@polymer/polymer/lib/utils/async.js'; +import { ComboBoxPlaceholder } from '@vaadin/combo-box/src/vaadin-combo-box-placeholder.js'; + +window.Vaadin.Flow.comboBoxConnector = {} +window.Vaadin.Flow.comboBoxConnector.initLazy = (comboBox) => { + // Check whether the connector was already initialized for the ComboBox + if (comboBox.$connector) { + return; + } + + comboBox.$connector = {}; + + // holds pageIndex -> callback pairs of subsequent indexes (current active range) + const pageCallbacks = {}; + let cache = {}; + let lastFilter = ''; + const placeHolder = new window.Vaadin.ComboBoxPlaceholder(); + + const serverFacade = (() => { + // Private variables + let lastFilterSentToServer = ''; + let dataCommunicatorResetNeeded = false; + + // Public methods + const needsDataCommunicatorReset = () => (dataCommunicatorResetNeeded = true); + const getLastFilterSentToServer = () => lastFilterSentToServer; + const requestData = (startIndex, endIndex, params) => { + const count = endIndex - startIndex; + const filter = params.filter; + + comboBox.$server.setRequestedRange(startIndex, count, filter); + lastFilterSentToServer = filter; + if (dataCommunicatorResetNeeded) { + comboBox.$server.resetDataCommunicator(); + dataCommunicatorResetNeeded = false; + } + }; + + return { + needsDataCommunicatorReset, + getLastFilterSentToServer, + requestData + }; + })(); + + const clearPageCallbacks = (pages = Object.keys(pageCallbacks)) => { + // Flush and empty the existing requests + pages.forEach((page) => { + pageCallbacks[page]([], comboBox.size); + delete pageCallbacks[page]; + + // Empty the comboBox's internal cache without invoking observers by filling + // the filteredItems array with placeholders (comboBox will request for data when it + // encounters a placeholder) + const pageStart = parseInt(page) * comboBox.pageSize; + const pageEnd = pageStart + comboBox.pageSize; + const end = Math.min(pageEnd, comboBox.filteredItems.length); + for (let i = pageStart; i < end; i++) { + comboBox.filteredItems[i] = placeHolder; + } + }); + }; + + comboBox.dataProvider = function (params, callback) { + if (params.pageSize != comboBox.pageSize) { + throw 'Invalid pageSize'; + } + + if (comboBox._clientSideFilter) { + // For clientside filter we first make sure we have all data which we also + // filter based on comboBox.filter. While later we only filter clientside data. + + if (cache[0]) { + performClientSideFilter(cache[0], params.filter, callback); + return; + } else { + // If client side filter is enabled then we need to first ask all data + // and filter it on client side, otherwise next time when user will + // input another filter, eg. continue to type, the local cache will be only + // what was received for the first filter, which may not be the whole + // data from server (keep in mind that client side filter is enabled only + // when the items count does not exceed one page). + params.filter = ''; + } + } + + const filterChanged = params.filter !== lastFilter; + if (filterChanged) { + cache = {}; + lastFilter = params.filter; + this._filterDebouncer = Debouncer.debounce(this._filterDebouncer, timeOut.after(500), () => { + if (serverFacade.getLastFilterSentToServer() === params.filter) { + // Fixes the case when the filter changes + // to something else and back to the original value + // within debounce timeout, and the + // DataCommunicator thinks it doesn't need to send data + serverFacade.needsDataCommunicatorReset(); + } + if (params.filter !== lastFilter) { + throw new Error("Expected params.filter to be '" + lastFilter + "' but was '" + params.filter + "'"); + } + // Remove the debouncer before clearing page callbacks. + // This makes sure that they are executed. + this._filterDebouncer = undefined; + // Call the method again after debounce. + clearPageCallbacks(); + comboBox.dataProvider(params, callback); + }); + return; + } + + // Postpone the execution of new callbacks if there is an active debouncer. + // They will be executed when the page callbacks are cleared within the debouncer. + if (this._filterDebouncer) { + pageCallbacks[params.page] = callback; + return; + } + + if (cache[params.page]) { + // This may happen after skipping pages by scrolling fast + commitPage(params.page, callback); + } else { + pageCallbacks[params.page] = callback; + const maxRangeCount = Math.max(params.pageSize * 2, 500); // Max item count in active range + const activePages = Object.keys(pageCallbacks).map((page) => parseInt(page)); + const rangeMin = Math.min(...activePages); + const rangeMax = Math.max(...activePages); + + if (activePages.length * params.pageSize > maxRangeCount) { + if (params.page === rangeMin) { + clearPageCallbacks([String(rangeMax)]); + } else { + clearPageCallbacks([String(rangeMin)]); + } + comboBox.dataProvider(params, callback); + } else if (rangeMax - rangeMin + 1 !== activePages.length) { + // Wasn't a sequential page index, clear the cache so combo-box will request for new pages + clearPageCallbacks(); + } else { + // The requested page was sequential, extend the requested range + const startIndex = params.pageSize * rangeMin; + const endIndex = params.pageSize * (rangeMax + 1); + + serverFacade.requestData(startIndex, endIndex, params); + } + } + }; + + comboBox.$connector.clear = (start, length) => { + const firstPageToClear = Math.floor(start / comboBox.pageSize); + const numberOfPagesToClear = Math.ceil(length / comboBox.pageSize); + + for (let i = firstPageToClear; i < firstPageToClear + numberOfPagesToClear; i++) { + delete cache[i]; + } + }; + + comboBox.$connector.filter = (item, filter) => { + filter = filter ? filter.toString().toLowerCase() : ''; + return comboBox._getItemLabel(item, comboBox.itemLabelPath).toString().toLowerCase().indexOf(filter) > -1; + }; + + comboBox.$connector.set = (index, items, filter) => { + if (filter != serverFacade.getLastFilterSentToServer()) { + return; + } + + if (index % comboBox.pageSize != 0) { + throw 'Got new data to index ' + index + ' which is not aligned with the page size of ' + comboBox.pageSize; + } + + if (index === 0 && items.length === 0 && pageCallbacks[0]) { + // Makes sure that the dataProvider callback is called even when server + // returns empty data set (no items match the filter). + cache[0] = []; + return; + } + + const firstPageToSet = index / comboBox.pageSize; + const updatedPageCount = Math.ceil(items.length / comboBox.pageSize); + + for (let i = 0; i < updatedPageCount; i++) { + let page = firstPageToSet + i; + let slice = items.slice(i * comboBox.pageSize, (i + 1) * comboBox.pageSize); + + cache[page] = slice; + } + }; + + comboBox.$connector.updateData = (items) => { + const itemsMap = new Map(items.map((item) => [item.key, item])); + + comboBox.filteredItems = comboBox.filteredItems.map((item) => { + return itemsMap.get(item.key) || item; + }); + }; + + comboBox.$connector.updateSize = function (newSize) { + if (!comboBox._clientSideFilter) { + // FIXME: It may be that this size set is unnecessary, since when + // providing data to combobox via callback we may use data's size. + // However, if this size reflect the whole data size, including + // data not fetched yet into client side, and combobox expect it + // to be set as such, the at least, we don't need it in case the + // filter is clientSide only, since it'll increase the height of + // the popup at only at first user filter to this size, while the + // filtered items count are less. + comboBox.size = newSize; + } + }; + + comboBox.$connector.reset = function () { + clearPageCallbacks(); + cache = {}; + comboBox.clearCache(); + }; + + comboBox.$connector.confirm = function (id, filter) { + if (filter != serverFacade.getLastFilterSentToServer()) { + return; + } + + // We're done applying changes from this batch, resolve pending + // callbacks + let activePages = Object.getOwnPropertyNames(pageCallbacks); + for (let i = 0; i < activePages.length; i++) { + let page = activePages[i]; + + if (cache[page]) { + commitPage(page, pageCallbacks[page]); + } + } + + // Let server know we're done + comboBox.$server.confirmUpdate(id); + }; + + const commitPage = function (page, callback) { + let data = cache[page]; + + if (comboBox._clientSideFilter) { + performClientSideFilter(data, comboBox.filter, callback); + } else { + // Remove the data if server-side filtering, but keep it for client-side + // filtering + delete cache[page]; + + // FIXME: It may be that we ought to provide data.length instead of + // comboBox.size and remove updateSize function. + callback(data, comboBox.size); + } + }; + + // Perform filter on client side (here) using the items from specified page + // and submitting the filtered items to specified callback. + // The filter used is the one from combobox, not the lastFilter stored since + // that may not reflect user's input. + const performClientSideFilter = function (page, filter, callback) { + let filteredItems = page; + + if (filter) { + filteredItems = page.filter((item) => comboBox.$connector.filter(item, filter)); + } + + callback(filteredItems, filteredItems.length); + }; + + // Prevent setting the custom value as the 'value'-prop automatically + comboBox.addEventListener('custom-value-set', (e) => e.preventDefault()); + + comboBox.itemClassNameGenerator = function (item) { + return item.className || ''; + }; +} + +window.Vaadin.ComboBoxPlaceholder = ComboBoxPlaceholder; diff --git a/src/main/frontend/generated/jar-resources/contextMenuConnector.js b/src/main/frontend/generated/jar-resources/contextMenuConnector.js new file mode 100644 index 0000000..351c4a6 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/contextMenuConnector.js @@ -0,0 +1,122 @@ +function getContainer(appId, nodeId) { + try { + return window.Vaadin.Flow.clients[appId].getByNodeId(nodeId); + } catch (error) { + console.error('Could not get node %s from app %s', nodeId, appId); + console.error(error); + } +} + +/** + * Initializes the connector for a context menu element. + * + * @param {HTMLElement} contextMenu + * @param {string} appId + */ +function initLazy(contextMenu, appId) { + if (contextMenu.$connector) { + return; + } + + contextMenu.$connector = { + /** + * Generates and assigns the items to the context menu. + * + * @param {number} nodeId + */ + generateItems(nodeId) { + const items = generateItemsTree(appId, nodeId); + + contextMenu.items = items; + } + }; +} + +/** + * Generates an items tree compatible with the context-menu web component + * by traversing the given Flow DOM tree of context menu item nodes + * whose root node is identified by the `nodeId` argument. + * + * The app id is required to access the store of Flow DOM nodes. + * + * @param {string} appId + * @param {number} nodeId + */ +function generateItemsTree(appId, nodeId) { + const container = getContainer(appId, nodeId); + if (!container) { + return; + } + + return Array.from(container.children).map((child) => { + const item = { + component: child, + checked: child._checked, + keepOpen: child._keepOpen, + className: child.className, + theme: child.__theme + }; + // Do not hardcode tag name to allow `vaadin-menu-bar-item` + if (child._hasVaadinItemMixin && child._containerNodeId) { + item.children = generateItemsTree(appId, child._containerNodeId); + } + child._item = item; + return item; + }); +} + +/** + * Sets the checked state for a context menu item. + * + * This method is supposed to be called when the context menu item is closed, + * so there is no need for triggering a re-render eagarly. + * + * @param {HTMLElement} component + * @param {boolean} checked + */ +function setChecked(component, checked) { + if (component._item) { + component._item.checked = checked; + + // Set the attribute in the connector to show the checkmark + // without having to re-render the whole menu while opened. + if (component._item.keepOpen) { + component.toggleAttribute('menu-item-checked', checked); + } + } +} + +/** + * Sets the keep open state for a context menu item. + * + * @param {HTMLElement} component + * @param {boolean} keepOpen + */ +function setKeepOpen(component, keepOpen) { + if (component._item) { + component._item.keepOpen = keepOpen; + } +} + +/** + * Sets the theme for a context menu item. + * + * This method is supposed to be called when the context menu item is closed, + * so there is no need for triggering a re-render eagarly. + * + * @param {HTMLElement} component + * @param {string | undefined | null} theme + */ +function setTheme(component, theme) { + if (component._item) { + component._item.theme = theme; + } +} + +window.Vaadin.Flow.contextMenuConnector = { + initLazy, + generateItemsTree, + setChecked, + setKeepOpen, + setTheme +}; diff --git a/src/main/frontend/generated/jar-resources/contextMenuTargetConnector.js b/src/main/frontend/generated/jar-resources/contextMenuTargetConnector.js new file mode 100644 index 0000000..ded56c4 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/contextMenuTargetConnector.js @@ -0,0 +1,62 @@ +import * as Gestures from '@vaadin/component-base/src/gestures.js'; + +function init(target) { + if (target.$contextMenuTargetConnector) { + return; + } + + target.$contextMenuTargetConnector = { + openOnHandler(e) { + // used by Grid to prevent context menu on selection column click + if (target.preventContextMenu && target.preventContextMenu(e)) { + return; + } + e.preventDefault(); + e.stopPropagation(); + this.$contextMenuTargetConnector.openEvent = e; + let detail = {}; + if (target.getContextMenuBeforeOpenDetail) { + detail = target.getContextMenuBeforeOpenDetail(e); + } + target.dispatchEvent( + new CustomEvent('vaadin-context-menu-before-open', { + detail: detail + }) + ); + }, + + updateOpenOn(eventType) { + this.removeListener(); + this.openOnEventType = eventType; + + customElements.whenDefined('vaadin-context-menu').then(() => { + if (Gestures.gestures[eventType]) { + Gestures.addListener(target, eventType, this.openOnHandler); + } else { + target.addEventListener(eventType, this.openOnHandler); + } + }); + }, + + removeListener() { + if (this.openOnEventType) { + if (Gestures.gestures[this.openOnEventType]) { + Gestures.removeListener(target, this.openOnEventType, this.openOnHandler); + } else { + target.removeEventListener(this.openOnEventType, this.openOnHandler); + } + } + }, + + openMenu(contextMenu) { + contextMenu.open(this.openEvent); + }, + + removeConnector() { + this.removeListener(); + target.$contextMenuTargetConnector = undefined; + }, + }; +} + +window.Vaadin.Flow.contextMenuTargetConnector = { init }; diff --git a/src/main/frontend/generated/jar-resources/copilot.js b/src/main/frontend/generated/jar-resources/copilot.js new file mode 100644 index 0000000..b90361f --- /dev/null +++ b/src/main/frontend/generated/jar-resources/copilot.js @@ -0,0 +1 @@ +import "./copilot/copilot-xjoIJFQc.js"; diff --git a/src/main/frontend/generated/jar-resources/copilot/base-panel-CTLXjjmN.js b/src/main/frontend/generated/jar-resources/copilot/base-panel-CTLXjjmN.js new file mode 100644 index 0000000..02cd5ea --- /dev/null +++ b/src/main/frontend/generated/jar-resources/copilot/base-panel-CTLXjjmN.js @@ -0,0 +1,24 @@ +import { M as t, b as n } from "./copilot-xjoIJFQc.js"; +class o extends t { + constructor() { + super(...arguments), this.eventBusRemovers = [], this.messageHandlers = {}; + } + createRenderRoot() { + return this; + } + onEventBus(e, s) { + this.eventBusRemovers.push(n.on(e, s)); + } + disconnectedCallback() { + super.disconnectedCallback(), this.eventBusRemovers.forEach((e) => e()); + } + onCommand(e, s) { + this.messageHandlers[e] = s; + } + handleMessage(e) { + return this.messageHandlers[e.command] ? (this.messageHandlers[e.command].call(this, e), !0) : !1; + } +} +export { + o as B +}; diff --git a/src/main/frontend/generated/jar-resources/copilot/copilot-features-plugin-DArMO9Mk.js b/src/main/frontend/generated/jar-resources/copilot/copilot-features-plugin-DArMO9Mk.js new file mode 100644 index 0000000..2095474 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/copilot/copilot-features-plugin-DArMO9Mk.js @@ -0,0 +1,70 @@ +import { x as p, U as c, _ as g, $ as f, n as u } from "./copilot-xjoIJFQc.js"; +import { r as h } from "./state-9-chcL5F.js"; +import { B as m } from "./base-panel-CTLXjjmN.js"; +import { i as v } from "./icons-AkLm3oZf.js"; +const b = "copilot-features-panel{padding:var(--space-100);font:var(--font-xsmall);display:grid;grid-template-columns:auto 1fr;gap:var(--space-50);height:auto}copilot-features-panel a{display:flex;align-items:center;gap:var(--space-50);white-space:nowrap}copilot-features-panel a svg{height:12px;width:12px;min-height:12px;min-width:12px}"; +var F = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, d = (e, t, a, o) => { + for (var s = o > 1 ? void 0 : o ? $(t, a) : t, r = e.length - 1, l; r >= 0; r--) + (l = e[r]) && (s = (o ? l(t, a, s) : l(s)) || s); + return o && s && F(t, a, s), s; +}; +const n = window.Vaadin.devTools; +let i = class extends m { + constructor() { + super(...arguments), this.features = [], this.handleFeatureFlags = (e) => { + this.features = e.data.features; + }; + } + connectedCallback() { + super.connectedCallback(), this.onCommand("featureFlags", this.handleFeatureFlags); + } + render() { + return p` + ${this.features.map( + (e) => p` + this.toggleFeatureFlag(t, e)}> + + learn more ${v.linkExternal} + ` + )}`; + } + toggleFeatureFlag(e, t) { + const a = e.target.checked; + c("use-feature", { source: "toggle", enabled: a, id: t.id }), n.frontendConnection ? (n.frontendConnection.send("setFeature", { featureId: t.id, enabled: a }), g({ + type: f.INFORMATION, + message: `“${t.title}” ${a ? "enabled" : "disabled"}`, + details: t.requiresServerRestart ? "This feature requires a server restart" : void 0, + dismissId: `feature${t.id}${a ? "Enabled" : "Disabled"}` + })) : n.log("error", `Unable to toggle feature ${t.title}: No server connection available`); + } +}; +d([ + h() +], i.prototype, "features", 2); +i = d([ + u("copilot-features-panel") +], i); +const w = { + header: "Features", + expanded: !1, + panelOrder: 35, + panel: "right", + floating: !1, + tag: "copilot-features-panel", + helpUrl: "https://vaadin.com/docs/latest/flow/configuration/feature-flags" +}, x = { + init(e) { + e.addPanel(w); + } +}; +window.Vaadin.copilot.plugins.push(x); +export { + i as CopilotFeaturesPanel +}; diff --git a/src/main/frontend/generated/jar-resources/copilot/copilot-feedback-plugin-B550SpdM.js b/src/main/frontend/generated/jar-resources/copilot/copilot-feedback-plugin-B550SpdM.js new file mode 100644 index 0000000..e37c5da --- /dev/null +++ b/src/main/frontend/generated/jar-resources/copilot/copilot-feedback-plugin-B550SpdM.js @@ -0,0 +1,168 @@ +import { x as d, b as c, p as h, U as f, s as v, P as b, y as m, n as g } from "./copilot-xjoIJFQc.js"; +import { r as p } from "./state-9-chcL5F.js"; +import { m as y, e as k } from "./overlay-monkeypatch-CXhp9hXg.js"; +import { B as x } from "./base-panel-CTLXjjmN.js"; +import { i as w } from "./icons-AkLm3oZf.js"; +const $ = "copilot-feedback-panel{display:flex;flex-direction:column;font:var(--font-xsmall);--vaadin-input-field-label-font-size: var(--font-size-1);padding:var(--space-200);gap:var(--space-200);justify-content:space-between}copilot-feedback-panel>p{margin:0}copilot-feedback-panel .dialog-footer{display:flex;gap:var(--space-100)}copilot-feedback-panel vaadin-select,copilot-feedback-panel vaadin-text-area,copilot-feedback-panel vaadin-text-field{padding-top:0;--lumo-text-field-size: 1.75rem;--vaadin-input-field-label-font-size: var(--font-size-2);--vaadin-input-field-background: none;--vaadin-input-field-border-color: transparent;--vaadin-input-field-border-width: 1px;--vaadin-input-field-border-color: var(--border-color-high-contrast);--vaadin-input-field-hover-highlight: var(--gray-100);--vaadin-input-field-hover-highlight-opacity: 1}copilot-feedback-panel vaadin-text-area>textarea{max-height:7em}copilot-feedback-panel vaadin-text-area>textarea{padding:var(--space-100) 0;font:var(--font-xsmall)}copilot-feedback-panel vaadin-text-area:hover::part(input-field){background-color:var(--gray-100)}copilot-feedback-panel vaadin-text-field>input{font:var(--font-xsmall)}copilot-feedback-panel vaadin-select::part(input-field){border-radius:var(--radius-1);flex:1;padding:0 var(--space-50)}copilot-feedback-panel vaadin-select[focus-ring]::part(input-field){box-shadow:none;outline:2px solid var(--selection-color);outline-offset:-2px}copilot-feedback-panel vaadin-select-value-button{padding:0 var(--space-50)}copilot-feedback-panel vaadin-select-item{--_lumo-selected-item-height: 1.75rem;--_lumo-selected-item-padding: 0;font:var(--font-xsmall)}copilot-feedback-panel vaadin-select-item:not([disabled]):hover{background:transparent;color:var(--color-high-contrast)}copilot-feedback-panel vaadin-combo-box-item:not([disabled]):hover{background:transparent;color:var(--color-high-contrast)}"; +var A = Object.defineProperty, P = Object.getOwnPropertyDescriptor, o = (e, t, l, n) => { + for (var a = n > 1 ? void 0 : n ? P(t, l) : t, s = e.length - 1, r; s >= 0; s--) + (r = e[s]) && (a = (n ? r(t, l, a) : r(a)) || a); + return n && a && A(t, l, a), a; +}; +const u = "https://github.com/vaadin/copilot/issues/new", T = "?template=feature_request.md&title=%5BFEATURE%5D", F = "A short, concise description of the bug and why you consider it a bug. Any details like exceptions and logs can be helpful as well.", D = "Please provide as many details as possible, this will help us deliver a fix as soon as possible.%0AThank you!%0A%0A%23%23%23 Description of the Bug%0A%0A{description}%0A%0A%23%23%23 Expected Behavior%0A%0AA description of what you would expect to happen. (Sometimes it is clear what the expected outcome is if something does not work, other times, it is not super clear.)%0A%0A%23%23%23 Minimal Reproducible Example%0A%0AWe would appreciate the minimum code with which we can reproduce the issue.%0A%0A%23%23%23 Versions%0A{versionsInfo}"; +let i = class extends x { + constructor() { + super(), this.description = "", this.items = [ + { + label: "Report a Bug", + value: "bug", + ghTitle: "[BUG]" + }, + { + label: "Ask a Question", + value: "question", + ghTitle: "[QUESTION]" + }, + { + label: "Share an Idea", + value: "idea", + ghTitle: "[FEATURE]" + } + ]; + } + render() { + return d`${this.renderContent()}${this.renderFooter()}`; + } + firstUpdated() { + y(this); + } + renderContent() { + return this.message === void 0 ? d` +

+ Your insights are incredibly valuable to us. Whether you’ve encountered a hiccup, have questions, or ideas + to make our platform better, we're all ears! If you wish, leave your email and we’ll get back to you. You + can even share your code snippet with us for a clearer picture. +

+ { + this.type = e.detail.value; + }}> + + { + this.descriptionField.invalid = !1, this.descriptionField.placeholder = ""; + }} + @value-changed=${(e) => { + this.description = e.detail.value; + }} + label="Tell Us More" + helper-text="Describe what you're experiencing, wondering about, or envisioning. The more you share, the better we can understand and act on your feedback"> + { + this.email = e.detail.value; + }} + id="email" + label="Your Email (Optional)" + helper-text="Leave your email if you’d like us to follow up. Totally optional, but we’d love to keep the conversation going."> + ` : d`

${this.message}

`; + } + renderFooter() { + return this.message === void 0 ? d` + + ` : d` `; + } + close() { + h.updatePanel("copilot-feedback-panel", { + floating: !1 + }); + } + submit() { + if (f("feedback"), this.description.trim() === "") { + this.descriptionField.invalid = !0, this.descriptionField.placeholder = "Please tell us more before sending", this.descriptionField.value = ""; + return; + } + const e = { + description: this.description, + email: this.email, + type: this.type + }; + c.emit("system-info-with-callback", { + callback: (t) => v(`${b}feedback`, { ...e, versions: t }), + notify: !1 + }), this.parentNode?.style.setProperty("--section-height", "150px"), this.message = "Thank you for sharing feedback."; + } + keyDown(e) { + (e.key === "Backspace" || e.key === "Delete") && e.stopPropagation(); + } + openGithub(e, t) { + if (this.type === "idea") { + window.open(`${u}${T}`); + return; + } + const l = e.replace(/\n/g, "%0A"), n = `${t.items.find((r) => r.value === this.type)?.ghTitle}`, a = t.description !== "" ? t.description : F, s = D.replace("{description}", a).replace("{versionsInfo}", l); + window.open(`${u}?title=${n}&body=${s}`, "_blank")?.focus(); + } +}; +o([ + p() +], i.prototype, "description", 2); +o([ + p() +], i.prototype, "type", 2); +o([ + p() +], i.prototype, "email", 2); +o([ + p() +], i.prototype, "message", 2); +o([ + p() +], i.prototype, "items", 2); +o([ + k("vaadin-text-area") +], i.prototype, "descriptionField", 2); +i = o([ + g("copilot-feedback-panel") +], i); +const E = m({ + header: "Help Us Improve!", + tag: "copilot-feedback-panel", + width: 500, + height: 500, + floatingPosition: { + top: 50, + left: 50 + } +}), U = { + init(e) { + e.addPanel(E); + } +}; +window.Vaadin.copilot.plugins.push(U); +export { + i as CopilotFeedbackPanel +}; diff --git a/src/main/frontend/generated/jar-resources/copilot/copilot-global-vars-later-UtaKiaeu.js b/src/main/frontend/generated/jar-resources/copilot/copilot-global-vars-later-UtaKiaeu.js new file mode 100644 index 0000000..a57f8a3 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/copilot/copilot-global-vars-later-UtaKiaeu.js @@ -0,0 +1,159112 @@ +import { g as pft, c as r5e, a as dft, b as $me, d as n5e, e as mft, i as gft, t as hft, s as i5e, f as yft, P as s5e, h as vft, j as Jme, k as bft, l as Sft, m as Tft, C as xft } from "./copilot-xjoIJFQc.js"; +function a5e(Cf) { + throw new Error('Could not dynamically require "' + Cf + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); +} +var zme = { exports: {} }; +const kft = {}, Cft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + default: kft +}, Symbol.toStringTag, { value: "Module" })), zE = /* @__PURE__ */ pft(Cft); +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ +var o5e; +function Eft() { + return o5e || (o5e = 1, function(Cf) { + var hu = {}; + ((bh) => { + var uR = Object.defineProperty, Ec = (e, t) => { + for (var n in t) + uR(e, n, { get: t[n], enumerable: !0 }); + }, FX = (e) => e, Xme = {}; + Ec(Xme, { + ANONYMOUS: () => qV, + AccessFlags: () => RQ, + AssertionLevel: () => GX, + AssignmentDeclarationKind: () => HQ, + AssignmentKind: () => yK, + Associativity: () => EK, + BreakpointResolver: () => Uq, + BuilderFileEmit: () => bie, + BuilderProgramKind: () => wie, + BuilderState: () => Id, + CallHierarchy: () => mk, + CharacterCodes: () => nY, + CheckFlags: () => FQ, + CheckMode: () => _W, + ClassificationType: () => eV, + ClassificationTypeNames: () => Ase, + CommentDirectiveType: () => yQ, + Comparison: () => OX, + CompletionInfoFlags: () => kse, + CompletionTriggerKind: () => ZU, + Completions: () => bk, + ContainerFlags: () => tne, + ContextFlags: () => CQ, + Debug: () => E, + DiagnosticCategory: () => WI, + Diagnostics: () => p, + DocumentHighlights: () => U9, + ElementFlags: () => MQ, + EmitFlags: () => tj, + EmitHint: () => oY, + EmitOnly: () => bQ, + EndOfLineState: () => Dse, + ExitStatus: () => SQ, + ExportKind: () => xae, + Extension: () => iY, + ExternalEmitHelpers: () => aY, + FileIncludeKind: () => qR, + FilePreprocessingDiagnosticsKind: () => vQ, + FileSystemEntryKind: () => gY, + FileWatcherEventKind: () => pY, + FindAllReferences: () => So, + FlattenLevel: () => xne, + FlowFlags: () => zI, + ForegroundColorEscapeSequences: () => _ie, + FunctionFlags: () => kK, + GeneratedIdentifierFlags: () => VR, + GetLiteralTextFlags: () => OZ, + GoToDefinition: () => H6, + HighlightSpanKind: () => Tse, + IdentifierNameMap: () => S6, + ImportKind: () => Tae, + ImportsNotUsedAsValues: () => ZQ, + IndentStyle: () => xse, + IndexFlags: () => jQ, + IndexKind: () => zQ, + InferenceFlags: () => VQ, + InferencePriority: () => UQ, + InlayHintKind: () => Sse, + InlayHints: () => OH, + InternalEmitFlags: () => sY, + InternalNodeBuilderFlags: () => DQ, + InternalSymbolName: () => OQ, + IntersectionFlags: () => kQ, + InvalidatedProjectKind: () => Yie, + JSDocParsingMode: () => fY, + JsDoc: () => Lv, + JsTyping: () => f1, + JsxEmit: () => YQ, + JsxFlags: () => dQ, + JsxReferenceKind: () => BQ, + LanguageFeatureMinimumTarget: () => yl, + LanguageServiceMode: () => vse, + LanguageVariant: () => tY, + LexicalEnvironmentFlags: () => lY, + ListFormat: () => uY, + LogLevel: () => nQ, + MapCode: () => LH, + MemberOverrideStatus: () => TQ, + ModifierFlags: () => WR, + ModuleDetectionKind: () => GQ, + ModuleInstanceState: () => Kre, + ModuleKind: () => uC, + ModuleResolutionKind: () => r4, + ModuleSpecifierEnding: () => See, + NavigateTo: () => Gae, + NavigationBar: () => Xae, + NewLineKind: () => KQ, + NodeBuilderFlags: () => EQ, + NodeCheckFlags: () => $R, + NodeFactoryFlags: () => Xee, + NodeFlags: () => zR, + NodeResolutionFeatures: () => Ure, + ObjectFlags: () => QR, + OperationCanceledException: () => t4, + OperatorPrecedence: () => DK, + OrganizeImports: () => Mv, + OrganizeImportsMode: () => YU, + OuterExpressionKinds: () => cY, + OutliningElementsCollector: () => RH, + OutliningSpanKind: () => Cse, + OutputFileType: () => Ese, + PackageJsonAutoImportPreference: () => yse, + PackageJsonDependencyGroup: () => hse, + PatternMatchKind: () => uq, + PollingInterval: () => rj, + PollingWatchKind: () => QQ, + PragmaKindFlags: () => _Y, + PredicateSemantics: () => mQ, + PreparePasteEdits: () => ZH, + PrivateIdentifierKind: () => ste, + ProcessLevel: () => Dne, + ProgramUpdateLevel: () => aie, + QuotePreference: () => Kse, + RegularExpressionFlags: () => gQ, + RelationComparisonResult: () => UR, + Rename: () => DL, + ScriptElementKind: () => Pse, + ScriptElementKindModifier: () => Nse, + ScriptKind: () => ZR, + ScriptSnapshot: () => t9, + ScriptTarget: () => eY, + SemanticClassificationFormat: () => bse, + SemanticMeaning: () => Ise, + SemicolonPreference: () => KU, + SignatureCheckMode: () => fW, + SignatureFlags: () => YR, + SignatureHelp: () => i8, + SignatureInfo: () => vie, + SignatureKind: () => JQ, + SmartSelectionRange: () => JH, + SnippetKind: () => ej, + StatisticType: () => ase, + StructureIsReused: () => HR, + SymbolAccessibility: () => NQ, + SymbolDisplay: () => q0, + SymbolDisplayPartKind: () => n9, + SymbolFlags: () => GR, + SymbolFormatFlags: () => PQ, + SyntaxKind: () => JR, + Ternary: () => qQ, + ThrottledCancellationToken: () => nce, + TokenClass: () => wse, + TokenFlags: () => hQ, + TransformFlags: () => KR, + TypeFacts: () => uW, + TypeFlags: () => XR, + TypeFormatFlags: () => wQ, + TypeMapKind: () => WQ, + TypePredicateKind: () => AQ, + TypeReferenceSerializationKind: () => IQ, + UnionReduction: () => xQ, + UpToDateStatusType: () => Vie, + VarianceFlags: () => LQ, + Version: () => yd, + VersionRange: () => JI, + WatchDirectoryFlags: () => rY, + WatchDirectoryKind: () => XQ, + WatchFileKind: () => $Q, + WatchLogLevel: () => cie, + WatchType: () => Dl, + accessPrivateIdentifier: () => Tne, + addEmitFlags: () => _m, + addEmitHelper: () => Lx, + addEmitHelpers: () => Qg, + addInternalEmitFlags: () => wS, + addNodeFactoryPatcher: () => jhe, + addObjectAllocatorPatcher: () => xhe, + addRange: () => Nn, + addRelatedInfo: () => Bs, + addSyntheticLeadingComment: () => Gb, + addSyntheticTrailingComment: () => dD, + addToSeen: () => Lp, + advancedAsyncSuperHelper: () => oF, + affectsDeclarationPathOptionDeclarations: () => fre, + affectsEmitOptionDeclarations: () => _re, + allKeysStartWithDot: () => iO, + altDirectorySeparator: () => HI, + and: () => RI, + append: () => Pr, + appendIfUnique: () => Sh, + arrayFrom: () => Ki, + arrayIsEqualTo: () => Ef, + arrayIsHomogeneous: () => Pee, + arrayOf: () => UX, + arrayReverseIterator: () => bR, + arrayToMap: () => aC, + arrayToMultiMap: () => dP, + arrayToNumericMap: () => qX, + assertType: () => ege, + assign: () => eS, + asyncSuperHelper: () => aF, + attachFileToDiagnostics: () => Ex, + base64decode: () => $K, + base64encode: () => GK, + binarySearch: () => Cy, + binarySearchKey: () => HT, + bindSourceFile: () => rne, + breakIntoCharacterSpans: () => Bae, + breakIntoWordSpans: () => Jae, + buildLinkParts: () => oae, + buildOpts: () => AN, + buildOverload: () => Twe, + bundlerModuleNameResolver: () => Vre, + canBeConvertedToAsync: () => gq, + canHaveDecorators: () => n2, + canHaveExportModifier: () => rN, + canHaveFlowNode: () => L4, + canHaveIllegalDecorators: () => vz, + canHaveIllegalModifiers: () => qte, + canHaveIllegalType: () => u0e, + canHaveIllegalTypeParameters: () => Vte, + canHaveJSDoc: () => x3, + canHaveLocals: () => Ym, + canHaveModifiers: () => Jp, + canHaveModuleSpecifier: () => mK, + canHaveSymbol: () => bd, + canIncludeBindAndCheckDiagnostics: () => sD, + canJsonReportNoInputFiles: () => RN, + canProduceDiagnostics: () => HN, + canUsePropertyAccess: () => AJ, + canWatchAffectingLocation: () => Mie, + canWatchAtTypes: () => Lie, + canWatchDirectoryOrFile: () => dU, + canWatchDirectoryOrFilePath: () => oA, + cartesianProduct: () => tQ, + cast: () => Ws, + chainBundle: () => Ad, + chainDiagnosticMessages: () => fs, + changeAnyExtension: () => TP, + changeCompilerHostLikeToUseCache: () => QD, + changeExtension: () => Oh, + changeFullExtension: () => $I, + changesAffectModuleResolution: () => S7, + changesAffectingProgramStructure: () => EZ, + characterCodeToRegularExpressionFlag: () => pj, + childIsDecorated: () => N4, + classElementOrClassElementParameterIsDecorated: () => fB, + classHasClassThisAssignment: () => DW, + classHasDeclaredOrExplicitlyAssignedName: () => wW, + classHasExplicitlyAssignedName: () => yO, + classOrConstructorParameterIsDecorated: () => D0, + classicNameResolver: () => Yre, + classifier: () => oce, + cleanExtendedConfigCache: () => kO, + clear: () => Ep, + clearMap: () => P_, + clearSharedExtendedConfigFileWatcher: () => WW, + climbPastPropertyAccess: () => a9, + clone: () => HX, + cloneCompilerOptions: () => vV, + closeFileWatcher: () => nd, + closeFileWatcherOf: () => _p, + codefix: () => Eu, + collapseTextChangeRangesAcrossMultipleVersions: () => BY, + collectExternalModuleInfo: () => xW, + combine: () => qT, + combinePaths: () => Ln, + commandLineOptionOfCustomType: () => mre, + commentPragmas: () => UI, + commonOptionsWithBuild: () => MF, + compact: () => fP, + compareBooleans: () => $1, + compareDataObjects: () => sJ, + compareDiagnostics: () => Z4, + compareEmitHelpers: () => ote, + compareNumberOfDirectorySeparators: () => K3, + comparePaths: () => xh, + comparePathsCaseInsensitive: () => xge, + comparePathsCaseSensitive: () => Tge, + comparePatternKeys: () => nW, + compareProperties: () => YX, + compareStringsCaseInsensitive: () => gP, + compareStringsCaseInsensitiveEslintCompatible: () => $X, + compareStringsCaseSensitive: () => cu, + compareStringsCaseSensitiveUI: () => hP, + compareTextSpans: () => LI, + compareValues: () => uo, + compilerOptionsAffectDeclarationPath: () => mee, + compilerOptionsAffectEmit: () => dee, + compilerOptionsAffectSemanticDiagnostics: () => pee, + compilerOptionsDidYouMeanDiagnostics: () => JF, + compilerOptionsIndicateEsModules: () => CV, + computeCommonSourceDirectoryOfFilenames: () => lie, + computeLineAndCharacterOfPosition: () => pC, + computeLineOfPosition: () => o4, + computeLineStarts: () => ex, + computePositionOfLineAndCharacter: () => ZI, + computeSignatureWithDiagnostics: () => cU, + computeSuggestionDiagnostics: () => pq, + computedOptions: () => K4, + concatenate: () => Wi, + concatenateDiagnosticMessageChains: () => oee, + consumesNodeCoreModules: () => O9, + contains: () => as, + containsIgnoredPath: () => cD, + containsObjectRestOrSpread: () => DN, + containsParseError: () => lx, + containsPath: () => Zf, + convertCompilerOptionsForTelemetry: () => Are, + convertCompilerOptionsFromJson: () => yye, + convertJsonOption: () => zS, + convertToBase64: () => HK, + convertToJson: () => ON, + convertToObject: () => kre, + convertToOptionsWithAbsolutePaths: () => VF, + convertToRelativePath: () => s4, + convertToTSConfig: () => Jz, + convertTypeAcquisitionFromJson: () => vye, + copyComments: () => QS, + copyEntries: () => T7, + copyLeadingComments: () => j6, + copyProperties: () => ER, + copyTrailingAsLeadingComments: () => PA, + copyTrailingComments: () => fw, + couldStartTrivia: () => CY, + countWhere: () => b0, + createAbstractBuilder: () => Cve, + createAccessorPropertyBackingField: () => Tz, + createAccessorPropertyGetRedirector: () => Kte, + createAccessorPropertySetRedirector: () => ere, + createBaseNodeFactory: () => Vee, + createBinaryExpressionTrampoline: () => AF, + createBuilderProgram: () => lU, + createBuilderProgramUsingIncrementalBuildInfo: () => Iie, + createBuilderStatusReporter: () => GO, + createCacheableExportInfoMap: () => rq, + createCachedDirectoryStructureHost: () => TO, + createClassifier: () => t2e, + createCommentDirectivesMap: () => IZ, + createCompilerDiagnostic: () => Ho, + createCompilerDiagnosticForInvalidCustomType: () => gre, + createCompilerDiagnosticFromMessageChain: () => D5, + createCompilerHost: () => uie, + createCompilerHostFromProgramHost: () => PU, + createCompilerHostWorker: () => CO, + createDetachedDiagnostic: () => Cx, + createDiagnosticCollection: () => F3, + createDiagnosticForFileFromMessageChain: () => oB, + createDiagnosticForNode: () => tn, + createDiagnosticForNodeArray: () => DC, + createDiagnosticForNodeArrayFromMessageChain: () => e3, + createDiagnosticForNodeFromMessageChain: () => Jg, + createDiagnosticForNodeInSourceFile: () => ep, + createDiagnosticForRange: () => HZ, + createDiagnosticMessageChainFromDiagnostic: () => qZ, + createDiagnosticReporter: () => ok, + createDocumentPositionMapper: () => hne, + createDocumentRegistry: () => wae, + createDocumentRegistryInternal: () => oq, + createEmitAndSemanticDiagnosticsBuilderProgram: () => pU, + createEmitHelperFactory: () => ate, + createEmptyExports: () => vN, + createEvaluator: () => Bee, + createExpressionForJsxElement: () => jte, + createExpressionForJsxFragment: () => Bte, + createExpressionForObjectLiteralElementLike: () => Jte, + createExpressionForPropertyName: () => pz, + createExpressionFromEntityName: () => bN, + createExternalHelpersImportDeclarationIfNeeded: () => gz, + createFileDiagnostic: () => ol, + createFileDiagnosticFromMessageChain: () => I7, + createFlowNode: () => ag, + createForOfBindingStatement: () => fz, + createFutureSourceFile: () => J9, + createGetCanonicalFileName: () => Wl, + createGetIsolatedDeclarationErrors: () => Qne, + createGetSourceFile: () => GW, + createGetSymbolAccessibilityDiagnosticForNode: () => kv, + createGetSymbolAccessibilityDiagnosticForNodeName: () => Xne, + createGetSymbolWalker: () => nne, + createIncrementalCompilerHost: () => HO, + createIncrementalProgram: () => Uie, + createJsxFactoryExpression: () => _z, + createLanguageService: () => ice, + createLanguageServiceSourceFile: () => sL, + createMemberAccessForPropertyName: () => BS, + createModeAwareCache: () => g6, + createModeAwareCacheKey: () => MD, + createModeMismatchDetails: () => qj, + createModuleNotFoundChain: () => k7, + createModuleResolutionCache: () => h6, + createModuleResolutionLoader: () => KW, + createModuleResolutionLoaderUsingGlobalCache: () => Jie, + createModuleSpecifierResolutionHost: () => wv, + createMultiMap: () => wp, + createNameResolver: () => MJ, + createNodeConverters: () => Gee, + createNodeFactory: () => aN, + createOptionNameMap: () => jF, + createOverload: () => eG, + createPackageJsonImportFilter: () => B6, + createPackageJsonInfo: () => $V, + createParenthesizerRules: () => qee, + createPatternMatcher: () => Fae, + createPrinter: () => u1, + createPrinterWithDefaults: () => iie, + createPrinterWithRemoveComments: () => o2, + createPrinterWithRemoveCommentsNeverAsciiEscape: () => sie, + createPrinterWithRemoveCommentsOmitTrailingSemicolon: () => zW, + createProgram: () => iA, + createProgramHost: () => NU, + createPropertyNameNodeForIdentifierOrLiteral: () => G5, + createQueue: () => mP, + createRange: () => np, + createRedirectedBuilderProgram: () => fU, + createResolutionCache: () => gU, + createRuntimeTypeSerializer: () => Ine, + createScanner: () => Og, + createSemanticDiagnosticsBuilderProgram: () => kve, + createSet: () => DR, + createSolutionBuilder: () => $ie, + createSolutionBuilderHost: () => Hie, + createSolutionBuilderWithWatch: () => Xie, + createSolutionBuilderWithWatchHost: () => Gie, + createSortedArray: () => vR, + createSourceFile: () => Zx, + createSourceMapGenerator: () => fne, + createSourceMapSource: () => Whe, + createSuperAccessVariableStatement: () => bO, + createSymbolTable: () => Us, + createSymlinkCache: () => mJ, + createSyntacticTypeNodeBuilder: () => dse, + createSystemWatchFunctions: () => hY, + createTextChange: () => SA, + createTextChangeFromStartLength: () => v9, + createTextChangeRange: () => IP, + createTextRangeFromNode: () => TV, + createTextRangeFromSpan: () => y9, + createTextSpan: () => ql, + createTextSpanFromBounds: () => bc, + createTextSpanFromNode: () => e_, + createTextSpanFromRange: () => W0, + createTextSpanFromStringLiteralLikeContent: () => SV, + createTextWriter: () => M3, + createTokenRange: () => eJ, + createTypeChecker: () => une, + createTypeReferenceDirectiveResolutionCache: () => eO, + createTypeReferenceResolutionLoader: () => wO, + createWatchCompilerHost: () => Lve, + createWatchCompilerHostOfConfigFile: () => AU, + createWatchCompilerHostOfFilesAndCompilerOptions: () => IU, + createWatchFactory: () => wU, + createWatchHost: () => DU, + createWatchProgram: () => FU, + createWatchStatusReporter: () => hU, + createWriteFileMeasuringIO: () => $W, + declarationNameToString: () => co, + decodeMappings: () => bW, + decodedTextSpanIntersectsWith: () => AP, + deduplicate: () => hb, + defaultInitCompilerOptions: () => Fz, + defaultMaximumTruncationLength: () => x4, + diagnosticCategoryName: () => rS, + diagnosticToString: () => p2, + diagnosticsEqualityComparer: () => w5, + directoryProbablyExists: () => xd, + directorySeparator: () => jo, + displayPart: () => I_, + displayPartsToString: () => WA, + disposeEmitNodes: () => JJ, + documentSpansEqual: () => IV, + dumpTracingLegend: () => pQ, + elementAt: () => ky, + elideNodes: () => Zte, + emitDetachedComments: () => MK, + emitFiles: () => BW, + emitFilesAndReportErrors: () => WO, + emitFilesAndReportErrorsAndGetExitStatus: () => EU, + emitModuleKindIsNonNodeESM: () => X3, + emitNewLineBeforeLeadingCommentOfPosition: () => LK, + emitResolverSkipsTypeChecking: () => jW, + emitSkippedWithNoDiagnostics: () => nU, + emptyArray: () => He, + emptyFileSystemEntries: () => xJ, + emptyMap: () => _R, + emptyOptions: () => zp, + endsWith: () => Eo, + ensurePathIsNonModuleName: () => iS, + ensureScriptKind: () => j5, + ensureTrailingDirectorySeparator: () => il, + entityNameToString: () => G_, + enumerateInsertsAndDeletes: () => BI, + equalOwnProperties: () => VX, + equateStringsCaseInsensitive: () => Py, + equateStringsCaseSensitive: () => bb, + equateValues: () => wy, + escapeJsxAttributeString: () => MB, + escapeLeadingUnderscores: () => Zo, + escapeNonAsciiString: () => a5, + escapeSnippetText: () => Hb, + escapeString: () => rg, + escapeTemplateSubstitution: () => OB, + evaluatorResult: () => cl, + every: () => Ri, + exclusivelyPrefixedNodeCoreModules: () => eF, + executeCommandLine: () => dbe, + expandPreOrPostfixIncrementOrDecrementExpression: () => EF, + explainFiles: () => SU, + explainIfFileIsRedirectAndImpliedFormat: () => TU, + exportAssignmentIsAlias: () => D3, + expressionResultIsUnused: () => Aee, + extend: () => OI, + extensionFromPath: () => nD, + extensionIsTS: () => U5, + extensionsNotSupportingExtensionlessResolution: () => W5, + externalHelpersModuleNameText: () => Wy, + factory: () => N, + fileExtensionIs: () => Bo, + fileExtensionIsOneOf: () => vc, + fileIncludeReasonToDiagnostics: () => CU, + fileShouldUseJavaScriptRequire: () => tq, + filter: () => kn, + filterMutate: () => dR, + filterSemanticDiagnostics: () => FO, + find: () => Pn, + findAncestor: () => ur, + findBestPatternMatch: () => FR, + findChildOfKind: () => Xa, + findComputedPropertyNameCacheAssignment: () => IF, + findConfigFile: () => qW, + findConstructorDeclaration: () => sN, + findContainingList: () => _9, + findDiagnosticForNode: () => vae, + findFirstNonJsxWhitespaceToken: () => Jse, + findIndex: () => ec, + findLast: () => gb, + findLastIndex: () => AI, + findListItemInfo: () => Bse, + findModifier: () => L6, + findNextToken: () => _2, + findPackageJson: () => yae, + findPackageJsons: () => GV, + findPrecedingMatchingToken: () => g9, + findPrecedingToken: () => tl, + findSuperStatementIndexPath: () => dO, + findTokenOnLeftOfPosition: () => sw, + findUseStrictPrologue: () => mz, + first: () => ya, + firstDefined: () => Dc, + firstDefinedIterator: () => _P, + firstIterator: () => TR, + firstOrOnly: () => YV, + firstOrUndefined: () => Uc, + firstOrUndefinedIterator: () => pP, + fixupCompilerOptions: () => hq, + flatMap: () => na, + flatMapIterator: () => mR, + flatMapToMutable: () => qE, + flatten: () => Dp, + flattenCommaList: () => tre, + flattenDestructuringAssignment: () => qS, + flattenDestructuringBinding: () => a2, + flattenDiagnosticMessageText: () => vm, + forEach: () => lr, + forEachAncestor: () => DZ, + forEachAncestorDirectory: () => a4, + forEachAncestorDirectoryStoppingAtGlobalCache: () => sg, + forEachChild: () => ms, + forEachChildRecursively: () => Yx, + forEachDynamicImportOrRequireCall: () => tF, + forEachEmittedFile: () => OW, + forEachEnclosingBlockScopeContainer: () => WZ, + forEachEntry: () => al, + forEachExternalModuleToImportFrom: () => iq, + forEachImportClauseDeclaration: () => gK, + forEachKey: () => jg, + forEachLeadingCommentRange: () => CP, + forEachNameInAccessChainWalkingLeft: () => ree, + forEachNameOfDefaultExport: () => W9, + forEachPropertyAssignment: () => NC, + forEachResolvedProjectReference: () => eU, + forEachReturnStatement: () => Hy, + forEachRight: () => LX, + forEachTrailingCommentRange: () => EP, + forEachTsConfigPropArray: () => s3, + forEachUnique: () => OV, + forEachYieldExpression: () => QZ, + formatColorAndReset: () => c2, + formatDiagnostic: () => XW, + formatDiagnostics: () => Q1e, + formatDiagnosticsWithColorAndContext: () => die, + formatGeneratedName: () => vv, + formatGeneratedNamePart: () => f6, + formatLocation: () => QW, + formatMessage: () => Dx, + formatStringFromArgs: () => qg, + formatting: () => Qc, + generateDjb2Hash: () => n4, + generateTSConfig: () => Ere, + getAdjustedReferenceLocation: () => pV, + getAdjustedRenameLocation: () => p9, + getAliasDeclarationFromName: () => kB, + getAllAccessorDeclarations: () => zb, + getAllDecoratorsOfClass: () => CW, + getAllDecoratorsOfClassElement: () => gO, + getAllJSDocTags: () => s7, + getAllJSDocTagsOfKind: () => Hge, + getAllKeys: () => Qme, + getAllProjectOutputs: () => SO, + getAllSuperTypeNodes: () => j4, + getAllowImportingTsExtensions: () => lee, + getAllowJSCompilerOption: () => Zy, + getAllowSyntheticDefaultImports: () => wx, + getAncestor: () => sv, + getAnyExtensionFromPath: () => ZT, + getAreDeclarationMapsEnabled: () => P5, + getAssignedExpandoInitializer: () => fx, + getAssignedName: () => r7, + getAssignmentDeclarationKind: () => Sc, + getAssignmentDeclarationPropertyAccessKind: () => h3, + getAssignmentTargetKind: () => Gy, + getAutomaticTypeDirectiveNames: () => ZF, + getBaseFileName: () => Vc, + getBinaryOperatorPrecedence: () => I3, + getBuildInfo: () => JW, + getBuildInfoFileVersionMap: () => _U, + getBuildInfoText: () => rie, + getBuildOrderFromAnyBuildOrder: () => lA, + getBuilderCreationParameters: () => RO, + getBuilderFileEmit: () => _1, + getCanonicalDiagnostic: () => GZ, + getCheckFlags: () => rc, + getClassExtendsHeritageElement: () => Mb, + getClassLikeDeclarationOfSymbol: () => Fh, + getCombinedLocalAndExportSymbolFlags: () => UC, + getCombinedModifierFlags: () => Q1, + getCombinedNodeFlags: () => Ch, + getCombinedNodeFlagsAlwaysIncludeJSDoc: () => vj, + getCommentRange: () => fm, + getCommonSourceDirectory: () => XD, + getCommonSourceDirectoryOfConfig: () => HS, + getCompilerOptionValue: () => I5, + getCompilerOptionsDiffValue: () => Cre, + getConditions: () => o1, + getConfigFileParsingDiagnostics: () => l2, + getConstantValue: () => Zee, + getContainerFlags: () => sW, + getContainerNode: () => XS, + getContainingClass: () => Al, + getContainingClassExcludingClassDecorators: () => J7, + getContainingClassStaticBlock: () => sK, + getContainingFunction: () => ff, + getContainingFunctionDeclaration: () => iK, + getContainingFunctionOrClassStaticBlock: () => B7, + getContainingNodeArray: () => Iee, + getContainingObjectLiteralElement: () => UA, + getContextualTypeFromParent: () => w9, + getContextualTypeFromParentOrAncestorTypeNode: () => f9, + getDeclarationDiagnostics: () => Yne, + getDeclarationEmitExtensionForPath: () => l5, + getDeclarationEmitOutputFilePath: () => AK, + getDeclarationEmitOutputFilePathWorker: () => c5, + getDeclarationFileExtension: () => OF, + getDeclarationFromName: () => R4, + getDeclarationModifierFlagsFromSymbol: () => sp, + getDeclarationOfKind: () => Lo, + getDeclarationsOfKind: () => CZ, + getDeclaredExpandoInitializer: () => F4, + getDecorators: () => Oy, + getDefaultCompilerOptions: () => iL, + getDefaultFormatCodeSettings: () => r9, + getDefaultLibFileName: () => wP, + getDefaultLibFilePath: () => sce, + getDefaultLikeExportInfo: () => z9, + getDefaultLikeExportNameFromDeclaration: () => ZV, + getDefaultResolutionModeForFileWorker: () => IO, + getDiagnosticText: () => g_, + getDiagnosticsWithinSpan: () => bae, + getDirectoryPath: () => Hn, + getDirectoryToWatchFailedLookupLocation: () => mU, + getDirectoryToWatchFailedLookupLocationFromTypeRoot: () => jie, + getDocumentPositionMapper: () => fq, + getDocumentSpansEqualityComparer: () => FV, + getESModuleInterop: () => Hg, + getEditsForFileRename: () => Nae, + getEffectiveBaseTypeNode: () => sm, + getEffectiveConstraintOfTypeParameter: () => hC, + getEffectiveContainerForJSDocTemplateTag: () => K7, + getEffectiveImplementsTypeNodes: () => MC, + getEffectiveInitializer: () => d3, + getEffectiveJSDocHost: () => iv, + getEffectiveModifierFlags: () => Mu, + getEffectiveModifierFlagsAlwaysIncludeJSDoc: () => JK, + getEffectiveModifierFlagsNoCache: () => zK, + getEffectiveReturnTypeNode: () => pf, + getEffectiveSetAccessorTypeAnnotationNode: () => VB, + getEffectiveTypeAnnotationNode: () => qc, + getEffectiveTypeParameterDeclarations: () => My, + getEffectiveTypeRoots: () => LD, + getElementOrPropertyAccessArgumentExpressionOrName: () => Z7, + getElementOrPropertyAccessName: () => wh, + getElementsOfBindingOrAssignmentPattern: () => _6, + getEmitDeclarations: () => N_, + getEmitFlags: () => va, + getEmitHelpers: () => zJ, + getEmitModuleDetectionKind: () => uee, + getEmitModuleFormatOfFileWorker: () => KD, + getEmitModuleKind: () => Ru, + getEmitModuleResolutionKind: () => Su, + getEmitScriptTarget: () => pa, + getEmitStandardClassFields: () => pJ, + getEnclosingBlockScopeContainer: () => Sd, + getEnclosingContainer: () => A7, + getEncodedSemanticClassifications: () => sq, + getEncodedSyntacticClassifications: () => aq, + getEndLinePosition: () => XP, + getEntityNameFromTypeNode: () => c3, + getEntrypointsFromPackageJsonInfo: () => eW, + getErrorCountForSummary: () => JO, + getErrorSpanForNode: () => dS, + getErrorSummaryText: () => vU, + getEscapedTextOfIdentifierOrLiteral: () => z4, + getEscapedTextOfJsxAttributeName: () => _D, + getEscapedTextOfJsxNamespacedName: () => Ix, + getExpandoInitializer: () => rv, + getExportAssignmentExpression: () => CB, + getExportInfoMap: () => LA, + getExportNeedsImportStarHelper: () => yne, + getExpressionAssociativity: () => IB, + getExpressionPrecedence: () => W4, + getExternalHelpersModuleName: () => TN, + getExternalModuleImportEqualsDeclarationExpression: () => A4, + getExternalModuleName: () => dx, + getExternalModuleNameFromDeclaration: () => PK, + getExternalModuleNameFromPath: () => BB, + getExternalModuleNameLiteral: () => Qx, + getExternalModuleRequireArgument: () => dB, + getFallbackOptions: () => tA, + getFileEmitOutput: () => yie, + getFileMatcherPatterns: () => R5, + getFileNamesFromConfigSpecs: () => FD, + getFileWatcherEventKind: () => sj, + getFilesInErrorForSummary: () => zO, + getFirstConstructorWithBody: () => Ug, + getFirstIdentifier: () => w_, + getFirstNonSpaceCharacterPosition: () => uae, + getFirstProjectOutput: () => RW, + getFixableErrorSpanExpression: () => XV, + getFormatCodeSettingsForWriting: () => j9, + getFullWidth: () => GP, + getFunctionFlags: () => Oc, + getHeritageClause: () => w3, + getHostSignatureFromJSDoc: () => nv, + getIdentifierAutoGenerate: () => qhe, + getIdentifierGeneratedImportReference: () => ite, + getIdentifierTypeArguments: () => PS, + getImmediatelyInvokedFunctionExpression: () => Ab, + getImpliedNodeFormatForEmitWorker: () => GS, + getImpliedNodeFormatForFile: () => nA, + getImpliedNodeFormatForFileWorker: () => AO, + getImportNeedsImportDefaultHelper: () => TW, + getImportNeedsImportStarHelper: () => fO, + getIndentString: () => o5, + getInferredLibraryNameResolveFrom: () => NO, + getInitializedVariables: () => X4, + getInitializerOfBinaryExpression: () => yB, + getInitializerOfBindingOrAssignmentElement: () => kN, + getInterfaceBaseTypeNodes: () => B4, + getInternalEmitFlags: () => td, + getInvokedExpression: () => U7, + getIsFileExcluded: () => Cae, + getIsolatedModules: () => Mp, + getJSDocAugmentsTag: () => XY, + getJSDocClassTag: () => Tj, + getJSDocCommentRanges: () => lB, + getJSDocCommentsAndTags: () => vB, + getJSDocDeprecatedTag: () => xj, + getJSDocDeprecatedTagNoCache: () => rZ, + getJSDocEnumTag: () => kj, + getJSDocHost: () => Ob, + getJSDocImplementsTags: () => QY, + getJSDocOverloadTags: () => SB, + getJSDocOverrideTagNoCache: () => tZ, + getJSDocParameterTags: () => gC, + getJSDocParameterTagsNoCache: () => qY, + getJSDocPrivateTag: () => Wge, + getJSDocPrivateTagNoCache: () => ZY, + getJSDocProtectedTag: () => Uge, + getJSDocProtectedTagNoCache: () => KY, + getJSDocPublicTag: () => zge, + getJSDocPublicTagNoCache: () => YY, + getJSDocReadonlyTag: () => Vge, + getJSDocReadonlyTagNoCache: () => eZ, + getJSDocReturnTag: () => nZ, + getJSDocReturnType: () => OP, + getJSDocRoot: () => LC, + getJSDocSatisfiesExpressionType: () => FJ, + getJSDocSatisfiesTag: () => Cj, + getJSDocTags: () => Z1, + getJSDocTemplateTag: () => qge, + getJSDocThisTag: () => n7, + getJSDocType: () => Ly, + getJSDocTypeAliasName: () => yz, + getJSDocTypeAssertionType: () => l6, + getJSDocTypeParameterDeclarations: () => d5, + getJSDocTypeParameterTags: () => HY, + getJSDocTypeParameterTagsNoCache: () => GY, + getJSDocTypeTag: () => Y1, + getJSXImplicitImportBase: () => Q3, + getJSXRuntimeImport: () => O5, + getJSXTransformEnabled: () => F5, + getKeyForCompilerOptions: () => Xz, + getLanguageVariant: () => V3, + getLastChild: () => aJ, + getLeadingCommentRanges: () => Fg, + getLeadingCommentRangesOfNode: () => cB, + getLeftmostAccessExpression: () => VC, + getLeftmostExpression: () => qC, + getLibraryNameFromLibFileName: () => tU, + getLineAndCharacterOfPosition: () => js, + getLineInfo: () => vW, + getLineOfLocalPosition: () => U4, + getLineStartPositionForPosition: () => Wp, + getLineStarts: () => Ag, + getLinesBetweenPositionAndNextNonWhitespaceCharacter: () => KK, + getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter: () => ZK, + getLinesBetweenPositions: () => c4, + getLinesBetweenRangeEndAndRangeStart: () => tJ, + getLinesBetweenRangeEndPositions: () => She, + getLiteralText: () => LZ, + getLocalNameForExternalImport: () => u6, + getLocalSymbolForExportDefault: () => G4, + getLocaleSpecificMessage: () => us, + getLocaleTimeString: () => cA, + getMappedContextSpan: () => LV, + getMappedDocumentSpan: () => C9, + getMappedLocation: () => lw, + getMatchedFileSpec: () => xU, + getMatchedIncludeSpec: () => kU, + getMeaningFromDeclaration: () => i9, + getMeaningFromLocation: () => $S, + getMembersOfDeclaration: () => YZ, + getModeForFileReference: () => mie, + getModeForResolutionAtIndex: () => rve, + getModeForUsageLocation: () => ZW, + getModifiedTime: () => YT, + getModifiers: () => Tb, + getModuleInstanceState: () => jh, + getModuleNameStringLiteralAt: () => sA, + getModuleSpecifierEndingPreference: () => Tee, + getModuleSpecifierResolverHost: () => EV, + getNameForExportedSymbol: () => L9, + getNameFromImportAttribute: () => Y5, + getNameFromIndexInfo: () => UZ, + getNameFromPropertyName: () => xA, + getNameOfAccessExpression: () => cJ, + getNameOfCompilerOptionValue: () => zz, + getNameOfDeclaration: () => is, + getNameOfExpando: () => mB, + getNameOfJSDocTypedef: () => VY, + getNameOfScriptTarget: () => A5, + getNameOrArgument: () => g3, + getNameTable: () => Wq, + getNamespaceDeclarationNode: () => OC, + getNewLineCharacter: () => N0, + getNewLineKind: () => OA, + getNewLineOrDefaultFromHost: () => Jh, + getNewTargetContainer: () => oK, + getNextJSDocCommentLocation: () => bB, + getNodeChildren: () => lz, + getNodeForGeneratedName: () => EN, + getNodeId: () => Aa, + getNodeKind: () => u2, + getNodeModifiers: () => aw, + getNodeModulePathParts: () => $5, + getNonAssignedNameOfDeclaration: () => t7, + getNonAssignmentOperatorForCompoundAssignment: () => UD, + getNonAugmentationDeclaration: () => tB, + getNonDecoratorTokenPosOfNode: () => Xj, + getNonIncrementalBuildInfoRoots: () => Fie, + getNonModifierTokenPosOfNode: () => FZ, + getNormalizedAbsolutePath: () => Xi, + getNormalizedAbsolutePathWithoutRoot: () => lj, + getNormalizedPathComponents: () => SP, + getObjectFlags: () => Cn, + getOperatorAssociativity: () => FB, + getOperatorPrecedence: () => A3, + getOptionFromName: () => Lz, + getOptionsForLibraryResolution: () => Qz, + getOptionsNameMap: () => d6, + getOrCreateEmitNode: () => uu, + getOrUpdate: () => HE, + getOriginalNode: () => Jo, + getOriginalNodeId: () => Ku, + getOutputDeclarationFileName: () => x6, + getOutputDeclarationFileNameWorker: () => LW, + getOutputExtension: () => ZN, + getOutputFileNames: () => $1e, + getOutputJSFileNameWorker: () => MW, + getOutputPathsFor: () => $D, + getOwnEmitOutputFilePath: () => NK, + getOwnKeys: () => Zd, + getOwnValues: () => GT, + getPackageJsonTypesVersionsPaths: () => YF, + getPackageNameFromTypesPackageName: () => BD, + getPackageScopeForPath: () => jD, + getParameterSymbolFromJSDoc: () => k3, + getParentNodeInSpan: () => CA, + getParseTreeNode: () => ls, + getParsedCommandLineOfConfigFile: () => IN, + getPathComponents: () => Ul, + getPathFromPathComponents: () => T0, + getPathUpdater: () => lq, + getPathsBasePath: () => u5, + getPatternFromSpec: () => yJ, + getPendingEmitKindWithSeen: () => MO, + getPositionOfLineAndCharacter: () => xP, + getPossibleGenericSignatures: () => mV, + getPossibleOriginalInputExtensionForExtension: () => JB, + getPossibleOriginalInputPathWithoutChangingExt: () => zB, + getPossibleTypeArgumentsInfo: () => gV, + getPreEmitDiagnostics: () => X1e, + getPrecedingNonSpaceCharacterPosition: () => E9, + getPrivateIdentifier: () => EW, + getProperties: () => kW, + getProperty: () => FI, + getPropertyArrayElementValue: () => nK, + getPropertyAssignmentAliasLikeExpression: () => xK, + getPropertyNameForPropertyNameNode: () => TS, + getPropertyNameFromType: () => op, + getPropertyNameOfBindingOrAssignmentElement: () => hz, + getPropertySymbolFromBindingElement: () => k9, + getPropertySymbolsFromContextualType: () => aL, + getQuoteFromPreference: () => wV, + getQuotePreference: () => tf, + getRangesWhere: () => yR, + getRefactorContextSpan: () => _k, + getReferencedFileLocation: () => ZD, + getRegexFromPattern: () => A0, + getRegularExpressionForWildcard: () => eD, + getRegularExpressionsForWildcards: () => L5, + getRelativePathFromDirectory: () => Df, + getRelativePathFromFile: () => fC, + getRelativePathToDirectoryOrUrl: () => KT, + getRenameLocation: () => wA, + getReplacementSpanForContextToken: () => bV, + getResolutionDiagnostic: () => sU, + getResolutionModeOverride: () => k6, + getResolveJsonModule: () => Ub, + getResolvePackageJsonExports: () => H3, + getResolvePackageJsonImports: () => G3, + getResolvedExternalModuleName: () => jB, + getResolvedModuleFromResolution: () => cx, + getResolvedTypeReferenceDirectiveFromResolution: () => x7, + getRestIndicatorOfBindingOrAssignmentElement: () => PF, + getRestParameterElementType: () => uB, + getRightMostAssignedExpression: () => m3, + getRootDeclaration: () => om, + getRootDirectoryOfResolutionCache: () => Bie, + getRootLength: () => Xm, + getScriptKind: () => BV, + getScriptKindFromFileName: () => B5, + getScriptTargetFeatures: () => Qj, + getSelectedEffectiveModifierFlags: () => bx, + getSelectedSyntacticModifierFlags: () => jK, + getSemanticClassifications: () => Eae, + getSemanticJsxChildren: () => jC, + getSetAccessorTypeAnnotationNode: () => FK, + getSetAccessorValueParameter: () => V4, + getSetExternalModuleIndicator: () => q3, + getShebang: () => KI, + getSingleVariableOfVariableStatement: () => hx, + getSnapshotText: () => uk, + getSnippetElement: () => WJ, + getSourceFileOfModule: () => $P, + getSourceFileOfNode: () => Cr, + getSourceFilePathInNewDir: () => f5, + getSourceFileVersionAsHashFromText: () => UO, + getSourceFilesToEmit: () => _5, + getSourceMapRange: () => F0, + getSourceMapper: () => Wae, + getSourceTextOfNodeFromSourceFile: () => Db, + getSpanOfTokenAtPosition: () => rm, + getSpellingSuggestion: () => Sb, + getStartPositionOfLine: () => Uy, + getStartPositionOfRange: () => $4, + getStartsOnNewLine: () => pD, + getStaticPropertiesAndClassStaticBlock: () => mO, + getStrictOptionValue: () => lu, + getStringComparer: () => cC, + getSubPatternFromSpec: () => M5, + getSuperCallFromStatement: () => pO, + getSuperContainer: () => a3, + getSupportedCodeFixes: () => Jq, + getSupportedExtensions: () => tD, + getSupportedExtensionsWithJsonIfResolveJsonModule: () => Z3, + getSwitchedType: () => VV, + getSymbolId: () => Zs, + getSymbolNameForPrivateIdentifier: () => P3, + getSymbolTarget: () => JV, + getSyntacticClassifications: () => Dae, + getSyntacticModifierFlags: () => w0, + getSyntacticModifierFlagsNoCache: () => GB, + getSynthesizedDeepClone: () => Wa, + getSynthesizedDeepCloneWithReplacements: () => DA, + getSynthesizedDeepClones: () => f2, + getSynthesizedDeepClonesWithReplacements: () => zV, + getSyntheticLeadingComments: () => YC, + getSyntheticTrailingComments: () => uN, + getTargetLabel: () => o9, + getTargetOfBindingOrAssignmentElement: () => s1, + getTemporaryModuleResolutionState: () => RD, + getTextOfConstantValue: () => MZ, + getTextOfIdentifierOrLiteral: () => rp, + getTextOfJSDocComment: () => LP, + getTextOfJsxAttributeName: () => iN, + getTextOfJsxNamespacedName: () => fD, + getTextOfNode: () => qo, + getTextOfNodeFromSourceText: () => C4, + getTextOfPropertyName: () => _x, + getThisContainer: () => Lu, + getThisParameter: () => jb, + getTokenAtPosition: () => Si, + getTokenPosOfNode: () => Vy, + getTokenSourceMapRange: () => Uhe, + getTouchingPropertyName: () => h_, + getTouchingToken: () => F6, + getTrailingCommentRanges: () => Fy, + getTrailingSemicolonDeferringWriter: () => RB, + getTransformers: () => Kne, + getTsBuildInfoEmitOutputFilePath: () => Cv, + getTsConfigObjectLiteralExpression: () => P4, + getTsConfigPropArrayElementValue: () => j7, + getTypeAnnotationNode: () => OK, + getTypeArgumentOrTypeParameterList: () => Gse, + getTypeKeywordOfTypeOnlyImport: () => AV, + getTypeNode: () => rte, + getTypeNodeIfAccessible: () => dw, + getTypeParameterFromJsDoc: () => hK, + getTypeParameterOwner: () => Rge, + getTypesPackageName: () => sO, + getUILocale: () => XX, + getUniqueName: () => YS, + getUniqueSymbolId: () => lae, + getUseDefineForClassFields: () => $3, + getWatchErrorSummaryDiagnosticMessage: () => yU, + getWatchFactory: () => VW, + group: () => oC, + groupBy: () => CR, + guessIndentation: () => xZ, + handleNoEmitOptions: () => iU, + handleWatchOptionsConfigDirTemplateSubstitution: () => qF, + hasAbstractModifier: () => Wb, + hasAccessorModifier: () => cm, + hasAmbientModifier: () => HB, + hasChangesInResolutions: () => Hj, + hasContextSensitiveParameters: () => H5, + hasDecorators: () => Pf, + hasDocComment: () => qse, + hasDynamicName: () => Ph, + hasEffectiveModifier: () => Q_, + hasEffectiveModifiers: () => qB, + hasEffectiveReadonlyModifier: () => kS, + hasExtension: () => _C, + hasImplementationTSFileExtension: () => bee, + hasIndexSignature: () => UV, + hasInferredType: () => K5, + hasInitializer: () => C0, + hasInvalidEscape: () => LB, + hasJSDocNodes: () => uf, + hasJSDocParameterTags: () => $Y, + hasJSFileExtension: () => Gg, + hasJsonModuleEmitEnabled: () => N5, + hasOnlyExpressionInitializer: () => fS, + hasOverrideModifier: () => m5, + hasPossibleExternalModuleReference: () => zZ, + hasProperty: () => ro, + hasPropertyAccessExpressionWithName: () => mA, + hasQuestionToken: () => mx, + hasRecordedExternalHelpers: () => Ute, + hasResolutionModeOverride: () => Ree, + hasRestParameter: () => zj, + hasScopeMarker: () => dZ, + hasStaticModifier: () => Kc, + hasSyntacticModifier: () => $n, + hasSyntacticModifiers: () => RK, + hasTSFileExtension: () => ES, + hasTabstop: () => Oee, + hasTrailingDirectorySeparator: () => Ay, + hasType: () => y7, + hasTypeArguments: () => _he, + hasZeroOrOneAsteriskCharacter: () => dJ, + hostGetCanonicalFileName: () => Nh, + hostUsesCaseSensitiveFileNames: () => xS, + idText: () => An, + identifierIsThisKeyword: () => UB, + identifierToKeywordKind: () => aS, + identity: () => lo, + identitySourceMapConsumer: () => SW, + ignoreSourceNewlines: () => VJ, + ignoredPaths: () => qI, + importFromModuleSpecifier: () => O4, + importSyntaxAffectsModuleResolution: () => fJ, + indexOfAnyCharCode: () => RX, + indexOfNode: () => CC, + indicesOf: () => II, + inferredTypesContainingFile: () => YD, + injectClassNamedEvaluationHelperBlockIfMissing: () => vO, + injectClassThisAssignmentIfMissing: () => Ene, + insertImports: () => NV, + insertSorted: () => xy, + insertStatementAfterCustomPrologue: () => pS, + insertStatementAfterStandardPrologue: () => ihe, + insertStatementsAfterCustomPrologue: () => Gj, + insertStatementsAfterStandardPrologue: () => Bg, + intersperse: () => pR, + intrinsicTagNameToString: () => OJ, + introducesArgumentsExoticObject: () => eK, + inverseJsxOptionMap: () => NN, + isAbstractConstructorSymbol: () => eee, + isAbstractModifier: () => dte, + isAccessExpression: () => vo, + isAccessibilityModifier: () => yV, + isAccessor: () => Jy, + isAccessorModifier: () => gte, + isAliasableExpression: () => e5, + isAmbientModule: () => Ou, + isAmbientPropertyDeclaration: () => nB, + isAnyDirectorySeparator: () => aj, + isAnyImportOrBareOrAccessedRequire: () => BZ, + isAnyImportOrReExport: () => ZP, + isAnyImportOrRequireStatement: () => JZ, + isAnyImportSyntax: () => ux, + isAnySupportedFileExtension: () => Lhe, + isApplicableVersionedTypesKey: () => JN, + isArgumentExpressionOfElementAccess: () => oV, + isArray: () => os, + isArrayBindingElement: () => f7, + isArrayBindingOrAssignmentElement: () => zP, + isArrayBindingOrAssignmentPattern: () => Lj, + isArrayBindingPattern: () => R0, + isArrayLiteralExpression: () => Ql, + isArrayLiteralOrObjectLiteralDestructuringPattern: () => z0, + isArrayTypeNode: () => mN, + isArrowFunction: () => bo, + isAsExpression: () => t6, + isAssertClause: () => xte, + isAssertEntry: () => e0e, + isAssertionExpression: () => Eb, + isAssertsKeyword: () => fte, + isAssignmentDeclaration: () => I4, + isAssignmentExpression: () => Cl, + isAssignmentOperator: () => Ah, + isAssignmentPattern: () => S4, + isAssignmentTarget: () => $y, + isAsteriskToken: () => fN, + isAsyncFunction: () => J4, + isAsyncModifier: () => hD, + isAutoAccessorPropertyDeclaration: () => l_, + isAwaitExpression: () => n1, + isAwaitKeyword: () => XJ, + isBigIntLiteral: () => gD, + isBinaryExpression: () => fn, + isBinaryLogicalOperator: () => R3, + isBinaryOperatorToken: () => Yte, + isBindableObjectDefinePropertyCall: () => yS, + isBindableStaticAccessExpression: () => Fb, + isBindableStaticElementAccessExpression: () => Y7, + isBindableStaticNameExpression: () => vS, + isBindingElement: () => ma, + isBindingElementOfBareOrAccessedRequire: () => uK, + isBindingName: () => uS, + isBindingOrAssignmentElement: () => uZ, + isBindingOrAssignmentPattern: () => BP, + isBindingPattern: () => Ds, + isBlock: () => ks, + isBlockLike: () => fk, + isBlockOrCatchScoped: () => Yj, + isBlockScope: () => iB, + isBlockScopedContainerTopLevel: () => jZ, + isBooleanLiteral: () => b4, + isBreakOrContinueStatement: () => g4, + isBreakStatement: () => Yhe, + isBuildCommand: () => ose, + isBuildInfoFile: () => eie, + isBuilderProgram: () => bU, + isBundle: () => Dte, + isCallChain: () => oS, + isCallExpression: () => Fs, + isCallExpressionTarget: () => tV, + isCallLikeExpression: () => Cb, + isCallLikeOrFunctionLikeExpression: () => Mj, + isCallOrNewExpression: () => tm, + isCallOrNewExpressionTarget: () => rV, + isCallSignatureDeclaration: () => Jx, + isCallToHelper: () => mD, + isCaseBlock: () => kD, + isCaseClause: () => i6, + isCaseKeyword: () => hte, + isCaseOrDefaultClause: () => g7, + isCatchClause: () => t2, + isCatchClauseVariableDeclaration: () => Fee, + isCatchClauseVariableDeclarationOrBindingElement: () => Zj, + isCheckJsEnabledForFile: () => iD, + isCircularBuildOrder: () => ck, + isClassDeclaration: () => $c, + isClassElement: () => sl, + isClassExpression: () => Gc, + isClassInstanceProperty: () => cZ, + isClassLike: () => Zn, + isClassMemberModifier: () => Ij, + isClassNamedEvaluationHelperBlock: () => sk, + isClassOrTypeElement: () => _7, + isClassStaticBlockDeclaration: () => nc, + isClassThisAssignmentBlock: () => qD, + isColonToken: () => ute, + isCommaExpression: () => SN, + isCommaListExpression: () => TD, + isCommaSequence: () => PD, + isCommaToken: () => lte, + isComment: () => h9, + isCommonJsExportPropertyAssignment: () => M7, + isCommonJsExportedExpression: () => ZZ, + isCompoundAssignment: () => WD, + isComputedNonLiteralName: () => KP, + isComputedPropertyName: () => fa, + isConciseBody: () => d7, + isConditionalExpression: () => qx, + isConditionalTypeNode: () => Xb, + isConstAssertion: () => LJ, + isConstTypeReference: () => Kp, + isConstructSignatureDeclaration: () => dN, + isConstructorDeclaration: () => Go, + isConstructorTypeNode: () => ZC, + isContextualKeyword: () => r5, + isContinueStatement: () => Qhe, + isCustomPrologue: () => i3, + isDebuggerStatement: () => Zhe, + isDeclaration: () => bl, + isDeclarationBindingElement: () => jP, + isDeclarationFileName: () => fl, + isDeclarationName: () => tg, + isDeclarationNameOfEnumOrNamespace: () => nJ, + isDeclarationReadonly: () => t3, + isDeclarationStatement: () => yZ, + isDeclarationWithTypeParameterChildren: () => aB, + isDeclarationWithTypeParameters: () => sB, + isDecorator: () => ll, + isDecoratorTarget: () => Ose, + isDefaultClause: () => CD, + isDefaultImport: () => bS, + isDefaultModifier: () => _F, + isDefaultedExpandoInitializer: () => _K, + isDeleteExpression: () => vte, + isDeleteTarget: () => xB, + isDeprecatedDeclaration: () => M9, + isDestructuringAssignment: () => P0, + isDiskPathRoot: () => oj, + isDoStatement: () => Xhe, + isDocumentRegistryEntry: () => MA, + isDotDotDotToken: () => lF, + isDottedName: () => B3, + isDynamicName: () => i5, + isEffectiveExternalModule: () => EC, + isEffectiveStrictModeSourceFile: () => rB, + isElementAccessChain: () => Ej, + isElementAccessExpression: () => fo, + isEmittedFileOfProgram: () => oie, + isEmptyArrayLiteral: () => qK, + isEmptyBindingElement: () => zY, + isEmptyBindingPattern: () => JY, + isEmptyObjectLiteral: () => ZB, + isEmptyStatement: () => ZJ, + isEmptyStringLiteral: () => pB, + isEntityName: () => Hu, + isEntityNameExpression: () => _o, + isEnumConst: () => ev, + isEnumDeclaration: () => Zb, + isEnumMember: () => j0, + isEqualityOperatorKind: () => P9, + isEqualsGreaterThanToken: () => _te, + isExclamationToken: () => pN, + isExcludedFile: () => wre, + isExclusivelyTypeOnlyImportOrExport: () => YW, + isExpandoPropertyDeclaration: () => Fx, + isExportAssignment: () => Io, + isExportDeclaration: () => wc, + isExportModifier: () => jx, + isExportName: () => DF, + isExportNamespaceAsDefaultDeclaration: () => w7, + isExportOrDefaultModifier: () => CN, + isExportSpecifier: () => Tu, + isExportsIdentifier: () => hS, + isExportsOrModuleExportsOrAlias: () => i2, + isExpression: () => ct, + isExpressionNode: () => Td, + isExpressionOfExternalModuleImportEqualsDeclaration: () => Rse, + isExpressionOfOptionalChainRoot: () => o7, + isExpressionStatement: () => El, + isExpressionWithTypeArguments: () => Lh, + isExpressionWithTypeArgumentsInClassExtendsClause: () => h5, + isExternalModule: () => el, + isExternalModuleAugmentation: () => Pb, + isExternalModuleImportEqualsDeclaration: () => tv, + isExternalModuleIndicator: () => UP, + isExternalModuleNameRelative: () => vl, + isExternalModuleReference: () => Mh, + isExternalModuleSymbol: () => ox, + isExternalOrCommonJsModule: () => $_, + isFileLevelReservedGeneratedIdentifier: () => RP, + isFileLevelUniqueName: () => E7, + isFileProbablyExternalModule: () => wN, + isFirstDeclarationOfSymbolParameter: () => MV, + isFixablePromiseHandler: () => mq, + isForInOrOfStatement: () => _S, + isForInStatement: () => yF, + isForInitializer: () => Kf, + isForOfStatement: () => gN, + isForStatement: () => mv, + isFullSourceFile: () => zg, + isFunctionBlock: () => Nb, + isFunctionBody: () => jj, + isFunctionDeclaration: () => Tc, + isFunctionExpression: () => po, + isFunctionExpressionOrArrowFunction: () => Ky, + isFunctionLike: () => vs, + isFunctionLikeDeclaration: () => Ka, + isFunctionLikeKind: () => nx, + isFunctionLikeOrClassStaticBlockDeclaration: () => bC, + isFunctionOrConstructorTypeNode: () => lZ, + isFunctionOrModuleBlock: () => Fj, + isFunctionSymbol: () => dK, + isFunctionTypeNode: () => ng, + isGeneratedIdentifier: () => Fo, + isGeneratedPrivateIdentifier: () => lS, + isGetAccessor: () => k0, + isGetAccessorDeclaration: () => cp, + isGetOrSetAccessorDeclaration: () => MP, + isGlobalScopeAugmentation: () => eg, + isGlobalSourceFile: () => E0, + isGrammarError: () => AZ, + isHeritageClause: () => Z_, + isHoistedFunction: () => O7, + isHoistedVariableStatement: () => L7, + isIdentifier: () => Me, + isIdentifierANonContextualKeyword: () => wB, + isIdentifierName: () => TK, + isIdentifierOrThisTypeNode: () => Gte, + isIdentifierPart: () => kh, + isIdentifierStart: () => Qm, + isIdentifierText: () => E_, + isIdentifierTypePredicate: () => tK, + isIdentifierTypeReference: () => wee, + isIfStatement: () => dv, + isIgnoredFileFromWildCardWatching: () => eA, + isImplicitGlob: () => hJ, + isImportAttribute: () => kte, + isImportAttributeName: () => oZ, + isImportAttributes: () => LS, + isImportCall: () => _f, + isImportClause: () => id, + isImportDeclaration: () => zo, + isImportEqualsDeclaration: () => _l, + isImportKeyword: () => vD, + isImportMeta: () => PC, + isImportOrExportSpecifier: () => jy, + isImportOrExportSpecifierName: () => cae, + isImportSpecifier: () => ju, + isImportTypeAssertionContainer: () => Khe, + isImportTypeNode: () => Ed, + isImportable: () => nq, + isInComment: () => J0, + isInCompoundLikeAssignment: () => TB, + isInExpressionContext: () => V7, + isInJSDoc: () => $7, + isInJSFile: () => an, + isInJSXText: () => Vse, + isInJsonFile: () => H7, + isInNonReferenceComment: () => Qse, + isInReferenceComment: () => Xse, + isInRightSideOfInternalImportEqualsDeclaration: () => s9, + isInString: () => lk, + isInTemplateString: () => dV, + isInTopLevelContext: () => z7, + isInTypeQuery: () => vx, + isIncrementalBuildInfo: () => aA, + isIncrementalBundleEmitBuildInfo: () => Die, + isIncrementalCompilation: () => Vb, + isIndexSignatureDeclaration: () => r1, + isIndexedAccessTypeNode: () => Qb, + isInferTypeNode: () => AS, + isInfinityOrNaNString: () => lD, + isInitializedProperty: () => VN, + isInitializedVariable: () => U3, + isInsideJsxElement: () => m9, + isInsideJsxElementOrAttribute: () => Use, + isInsideNodeModules: () => AA, + isInsideTemplateLiteral: () => bA, + isInstanceOfExpression: () => y5, + isInstantiatedModule: () => dW, + isInterfaceDeclaration: () => Yl, + isInternalDeclaration: () => kZ, + isInternalModuleImportEqualsDeclaration: () => gS, + isInternalName: () => dz, + isIntersectionTypeNode: () => Ux, + isIntrinsicJsxName: () => BC, + isIterationStatement: () => zy, + isJSDoc: () => Pd, + isJSDocAllType: () => Nte, + isJSDocAugmentsTag: () => Xx, + isJSDocAuthorTag: () => i0e, + isJSDocCallbackTag: () => rz, + isJSDocClassTag: () => Ite, + isJSDocCommentContainingNode: () => h7, + isJSDocConstructSignature: () => gx, + isJSDocDeprecatedTag: () => oz, + isJSDocEnumTag: () => yN, + isJSDocFunctionType: () => a6, + isJSDocImplementsTag: () => kF, + isJSDocImportTag: () => ym, + isJSDocIndexSignature: () => X7, + isJSDocLikeText: () => xz, + isJSDocLink: () => wte, + isJSDocLinkCode: () => Pte, + isJSDocLinkLike: () => ax, + isJSDocLinkPlain: () => r0e, + isJSDocMemberName: () => yv, + isJSDocNameReference: () => ED, + isJSDocNamepathType: () => n0e, + isJSDocNamespaceBody: () => Yge, + isJSDocNode: () => SC, + isJSDocNonNullableType: () => bF, + isJSDocNullableType: () => s6, + isJSDocOptionalParameter: () => X5, + isJSDocOptionalType: () => tz, + isJSDocOverloadTag: () => o6, + isJSDocOverrideTag: () => TF, + isJSDocParameterTag: () => Af, + isJSDocPrivateTag: () => iz, + isJSDocPropertyLikeTag: () => h4, + isJSDocPropertyTag: () => Fte, + isJSDocProtectedTag: () => sz, + isJSDocPublicTag: () => nz, + isJSDocReadonlyTag: () => az, + isJSDocReturnTag: () => xF, + isJSDocSatisfiesExpression: () => IJ, + isJSDocSatisfiesTag: () => CF, + isJSDocSeeTag: () => s0e, + isJSDocSignature: () => B0, + isJSDocTag: () => TC, + isJSDocTemplateTag: () => Bp, + isJSDocThisTag: () => cz, + isJSDocThrowsTag: () => o0e, + isJSDocTypeAlias: () => Fp, + isJSDocTypeAssertion: () => r2, + isJSDocTypeExpression: () => hv, + isJSDocTypeLiteral: () => RS, + isJSDocTypeTag: () => DD, + isJSDocTypedefTag: () => jS, + isJSDocUnknownTag: () => a0e, + isJSDocUnknownType: () => Ate, + isJSDocVariadicType: () => SF, + isJSXTagName: () => IC, + isJsonEqual: () => V5, + isJsonSourceFile: () => tp, + isJsxAttribute: () => hm, + isJsxAttributeLike: () => m7, + isJsxAttributeName: () => Mee, + isJsxAttributes: () => e2, + isJsxCallLike: () => TZ, + isJsxChild: () => HP, + isJsxClosingElement: () => Kb, + isJsxClosingFragment: () => Ete, + isJsxElement: () => gm, + isJsxExpression: () => n6, + isJsxFragment: () => gv, + isJsxNamespacedName: () => wd, + isJsxOpeningElement: () => Dd, + isJsxOpeningFragment: () => sd, + isJsxOpeningLikeElement: () => bu, + isJsxOpeningLikeElementTagName: () => Lse, + isJsxSelfClosingElement: () => MS, + isJsxSpreadAttribute: () => $x, + isJsxTagNameExpression: () => T4, + isJsxText: () => Mx, + isJumpStatementTarget: () => gA, + isKeyword: () => f_, + isKeywordOrPunctuation: () => t5, + isKnownSymbol: () => N3, + isLabelName: () => sV, + isLabelOfLabeledStatement: () => iV, + isLabeledStatement: () => i1, + isLateVisibilityPaintedStatement: () => N7, + isLeftHandSideExpression: () => u_, + isLet: () => F7, + isLineBreak: () => yu, + isLiteralComputedPropertyDeclarationName: () => E3, + isLiteralExpression: () => cS, + isLiteralExpressionOfObject: () => Nj, + isLiteralImportTypeNode: () => Dh, + isLiteralKind: () => y4, + isLiteralNameOfPropertyDeclarationOrIndexAccess: () => c9, + isLiteralTypeLiteral: () => pZ, + isLiteralTypeNode: () => M0, + isLocalName: () => Rh, + isLogicalOperator: () => WK, + isLogicalOrCoalescingAssignmentExpression: () => $B, + isLogicalOrCoalescingAssignmentOperator: () => q4, + isLogicalOrCoalescingBinaryExpression: () => j3, + isLogicalOrCoalescingBinaryOperator: () => g5, + isMappedTypeNode: () => FS, + isMemberName: () => Lg, + isMetaProperty: () => SD, + isMethodDeclaration: () => fc, + isMethodOrAccessor: () => ix, + isMethodSignature: () => pm, + isMinusToken: () => $J, + isMissingDeclaration: () => t0e, + isMissingPackageJsonInfo: () => Jre, + isModifier: () => ia, + isModifierKind: () => By, + isModifierLike: () => Oo, + isModuleAugmentationExternal: () => eB, + isModuleBlock: () => dm, + isModuleBody: () => mZ, + isModuleDeclaration: () => Lc, + isModuleExportName: () => vF, + isModuleExportsAccessExpression: () => Wg, + isModuleIdentifier: () => gB, + isModuleName: () => Qte, + isModuleOrEnumDeclaration: () => VP, + isModuleReference: () => bZ, + isModuleSpecifierLike: () => x9, + isModuleWithStringLiteralName: () => P7, + isNameOfFunctionDeclaration: () => lV, + isNameOfModuleDeclaration: () => cV, + isNamedDeclaration: () => Hl, + isNamedEvaluation: () => X_, + isNamedEvaluationSource: () => PB, + isNamedExportBindings: () => wj, + isNamedExports: () => up, + isNamedImportBindings: () => Bj, + isNamedImports: () => mm, + isNamedImportsOrExports: () => C5, + isNamedTupleMember: () => KC, + isNamespaceBody: () => Qge, + isNamespaceExport: () => ig, + isNamespaceExportDeclaration: () => hN, + isNamespaceImport: () => Yg, + isNamespaceReexportDeclaration: () => lK, + isNewExpression: () => Yb, + isNewExpressionTarget: () => nw, + isNewScopeNode: () => Uee, + isNoSubstitutionTemplateLiteral: () => NS, + isNodeArray: () => xb, + isNodeArrayMultiLine: () => YK, + isNodeDescendantOf: () => Lb, + isNodeKind: () => l7, + isNodeLikeSystem: () => MR, + isNodeModulesDirectory: () => XI, + isNodeWithPossibleHoistedDeclaration: () => bK, + isNonContextualKeyword: () => DB, + isNonGlobalAmbientModule: () => Kj, + isNonNullAccess: () => Lee, + isNonNullChain: () => c7, + isNonNullExpression: () => Hx, + isNonStaticMethodOrAccessorWithPrivateName: () => vne, + isNotEmittedStatement: () => Cte, + isNullishCoalesce: () => Dj, + isNumber: () => Ey, + isNumericLiteral: () => d_, + isNumericLiteralName: () => Xg, + isObjectBindingElementWithoutPropertyName: () => kA, + isObjectBindingOrAssignmentElement: () => JP, + isObjectBindingOrAssignmentPattern: () => Oj, + isObjectBindingPattern: () => Nf, + isObjectLiteralElement: () => Jj, + isObjectLiteralElementLike: () => Eh, + isObjectLiteralExpression: () => oa, + isObjectLiteralMethod: () => Ip, + isObjectLiteralOrClassExpressionMethodOrAccessor: () => R7, + isObjectTypeDeclaration: () => kx, + isOmittedExpression: () => ul, + isOptionalChain: () => vu, + isOptionalChainRoot: () => d4, + isOptionalDeclaration: () => Ax, + isOptionalJSDocPropertyLikeTag: () => nN, + isOptionalTypeNode: () => fF, + isOuterExpression: () => wF, + isOutermostOptionalChain: () => m4, + isOverrideModifier: () => mte, + isPackageJsonInfo: () => KF, + isPackedArrayLiteral: () => NJ, + isParameter: () => Ii, + isParameterPropertyDeclaration: () => H_, + isParameterPropertyModifier: () => v4, + isParenthesizedExpression: () => Yu, + isParenthesizedTypeNode: () => IS, + isParseTreeNode: () => p4, + isPartOfParameterDeclaration: () => av, + isPartOfTypeNode: () => im, + isPartOfTypeOnlyImportOrExportDeclaration: () => aZ, + isPartOfTypeQuery: () => q7, + isPartiallyEmittedExpression: () => bte, + isPatternMatch: () => MI, + isPinnedComment: () => D7, + isPlainJsFile: () => k4, + isPlusToken: () => GJ, + isPossiblyTypeArgumentPosition: () => vA, + isPostfixUnaryExpression: () => YJ, + isPrefixUnaryExpression: () => pv, + isPrimitiveLiteralValue: () => Z5, + isPrivateIdentifier: () => Ni, + isPrivateIdentifierClassElementDeclaration: () => Fu, + isPrivateIdentifierPropertyAccessExpression: () => vC, + isPrivateIdentifierSymbol: () => CK, + isProgramUptoDate: () => rU, + isPrologueDirective: () => nm, + isPropertyAccessChain: () => a7, + isPropertyAccessEntityNameExpression: () => J3, + isPropertyAccessExpression: () => Tn, + isPropertyAccessOrQualifiedName: () => WP, + isPropertyAccessOrQualifiedNameOrImportTypeNode: () => _Z, + isPropertyAssignment: () => Xc, + isPropertyDeclaration: () => ss, + isPropertyName: () => Fc, + isPropertyNameLiteral: () => am, + isPropertySignature: () => m_, + isPrototypeAccess: () => Qy, + isPrototypePropertyAssignment: () => y3, + isPunctuation: () => EB, + isPushOrUnshiftIdentifier: () => NB, + isQualifiedName: () => Xu, + isQuestionDotToken: () => uF, + isQuestionOrExclamationToken: () => Hte, + isQuestionOrPlusOrMinusToken: () => Xte, + isQuestionToken: () => t1, + isReadonlyKeyword: () => pte, + isReadonlyKeywordOrPlusOrMinusToken: () => $te, + isRecognizedTripleSlashComment: () => $j, + isReferenceFileLocation: () => C6, + isReferencedFile: () => Ev, + isRegularExpressionLiteral: () => qJ, + isRequireCall: () => __, + isRequireVariableStatement: () => f3, + isRestParameter: () => Zm, + isRestTypeNode: () => pF, + isReturnStatement: () => Rp, + isReturnStatementWithFixablePromiseHandler: () => V9, + isRightSideOfAccessExpression: () => YB, + isRightSideOfInstanceofExpression: () => VK, + isRightSideOfPropertyAccess: () => N6, + isRightSideOfQualifiedName: () => Mse, + isRightSideOfQualifiedNameOrPropertyAccess: () => H4, + isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName: () => UK, + isRootedDiskPath: () => q_, + isSameEntityName: () => FC, + isSatisfiesExpression: () => hF, + isSemicolonClassElement: () => Ste, + isSetAccessor: () => Mg, + isSetAccessorDeclaration: () => A_, + isShiftOperatorOrHigher: () => bz, + isShorthandAmbientModuleSymbol: () => YP, + isShorthandPropertyAssignment: () => _u, + isSideEffectImport: () => RJ, + isSignedNumericLiteral: () => n5, + isSimpleCopiableExpression: () => s2, + isSimpleInlineableExpression: () => og, + isSimpleParameterList: () => qN, + isSingleOrDoubleQuote: () => p3, + isSolutionConfig: () => Vz, + isSourceElement: () => jee, + isSourceFile: () => Ei, + isSourceFileFromLibrary: () => J6, + isSourceFileJS: () => Gu, + isSourceFileNotJson: () => G7, + isSourceMapping: () => gne, + isSpecialPropertyDeclaration: () => pK, + isSpreadAssignment: () => Zg, + isSpreadElement: () => lp, + isStatement: () => xi, + isStatementButNotDeclaration: () => qP, + isStatementOrBlock: () => vZ, + isStatementWithLocals: () => NZ, + isStatic: () => Vs, + isStaticModifier: () => Bx, + isString: () => rs, + isStringANonContextualKeyword: () => yx, + isStringAndEmptyAnonymousObjectIntersection: () => $se, + isStringDoubleQuoted: () => Q7, + isStringLiteral: () => ea, + isStringLiteralLike: () => Na, + isStringLiteralOrJsxExpression: () => SZ, + isStringLiteralOrTemplate: () => dae, + isStringOrNumericLiteralLike: () => wf, + isStringOrRegularExpressionOrTemplateLiteral: () => hV, + isStringTextContainingNode: () => Aj, + isSuperCall: () => mS, + isSuperKeyword: () => yD, + isSuperProperty: () => D_, + isSupportedSourceFileName: () => TJ, + isSwitchStatement: () => xD, + isSyntaxList: () => c6, + isSyntheticExpression: () => $he, + isSyntheticReference: () => Gx, + isTagName: () => aV, + isTaggedTemplateExpression: () => fv, + isTaggedTemplateTag: () => Fse, + isTemplateExpression: () => mF, + isTemplateHead: () => Rx, + isTemplateLiteral: () => sx, + isTemplateLiteralKind: () => Ry, + isTemplateLiteralToken: () => iZ, + isTemplateLiteralTypeNode: () => yte, + isTemplateLiteralTypeSpan: () => QJ, + isTemplateMiddle: () => HJ, + isTemplateMiddleOrTemplateTail: () => u7, + isTemplateSpan: () => r6, + isTemplateTail: () => cF, + isTextWhiteSpaceLike: () => eae, + isThis: () => A6, + isThisContainerOrFunctionBlock: () => aK, + isThisIdentifier: () => Xy, + isThisInTypeQuery: () => Jb, + isThisInitializedDeclaration: () => W7, + isThisInitializedObjectBindingExpression: () => cK, + isThisProperty: () => o3, + isThisTypeNode: () => bD, + isThisTypeParameter: () => uD, + isThisTypePredicate: () => rK, + isThrowStatement: () => ez, + isToken: () => rx, + isTokenKind: () => Pj, + isTraceEnabled: () => a1, + isTransientSymbol: () => Rg, + isTrivia: () => RC, + isTryStatement: () => OS, + isTupleTypeNode: () => Wx, + isTypeAlias: () => T3, + isTypeAliasDeclaration: () => jp, + isTypeAssertionExpression: () => dF, + isTypeDeclaration: () => Nx, + isTypeElement: () => kb, + isTypeKeyword: () => ow, + isTypeKeywordTokenOrIdentifier: () => b9, + isTypeLiteralNode: () => Qu, + isTypeNode: () => fi, + isTypeNodeKind: () => oJ, + isTypeOfExpression: () => e6, + isTypeOnlyExportDeclaration: () => sZ, + isTypeOnlyImportDeclaration: () => yC, + isTypeOnlyImportOrExportDeclaration: () => x0, + isTypeOperatorNode: () => _v, + isTypeParameterDeclaration: () => Ao, + isTypePredicateNode: () => zx, + isTypeQueryNode: () => $b, + isTypeReferenceNode: () => Y_, + isTypeReferenceType: () => v7, + isTypeUsableAsPropertyName: () => ap, + isUMDExportSymbol: () => k5, + isUnaryExpression: () => Rj, + isUnaryExpressionWithWrite: () => fZ, + isUnicodeIdentifierStart: () => YI, + isUnionTypeNode: () => L0, + isUrl: () => vY, + isValidBigIntString: () => q5, + isValidESSymbolDeclaration: () => KZ, + isValidTypeOnlyAliasUseSite: () => cv, + isValueSignatureDeclaration: () => SS, + isVarAwaitUsing: () => r3, + isVarConst: () => wC, + isVarConstLike: () => XZ, + isVarUsing: () => n3, + isVariableDeclaration: () => Kn, + isVariableDeclarationInVariableStatement: () => w4, + isVariableDeclarationInitializedToBareOrAccessedRequire: () => Ib, + isVariableDeclarationInitializedToRequire: () => _3, + isVariableDeclarationList: () => Il, + isVariableLike: () => D4, + isVariableStatement: () => pc, + isVoidExpression: () => Vx, + isWatchSet: () => iJ, + isWhileStatement: () => KJ, + isWhiteSpaceLike: () => Ig, + isWhiteSpaceSingleLine: () => em, + isWithStatement: () => Tte, + isWriteAccess: () => xx, + isWriteOnlyAccess: () => x5, + isYieldExpression: () => gF, + jsxModeNeedsExplicitImport: () => eq, + keywordPart: () => rf, + last: () => _a, + lastOrUndefined: () => Co, + length: () => Ir, + libMap: () => wz, + libs: () => LF, + lineBreakPart: () => R6, + loadModuleFromGlobalCache: () => Zre, + loadWithModeAwareCache: () => rA, + makeIdentifierFromModuleName: () => RZ, + makeImport: () => p1, + makeStringLiteral: () => cw, + mangleScopedPackageName: () => v6, + map: () => gr, + mapAllOrFail: () => gR, + mapDefined: () => Li, + mapDefinedIterator: () => Ty, + mapEntries: () => JX, + mapIterator: () => VE, + mapOneOrMany: () => QV, + mapToDisplayParts: () => Pv, + matchFiles: () => vJ, + matchPatternOrExact: () => kJ, + matchedText: () => eQ, + matchesExclude: () => $F, + matchesExcludeWorker: () => XF, + maxBy: () => wR, + maybeBind: () => Is, + maybeSetLocalizedDiagnosticMessages: () => aee, + memoize: () => Iu, + memoizeOne: () => Kd, + min: () => PR, + minAndMax: () => Cee, + missingFileModifiedTime: () => V_, + modifierToFlag: () => Sx, + modifiersToFlags: () => lm, + moduleExportNameIsDefault: () => Km, + moduleExportNameTextEscaped: () => wb, + moduleExportNameTextUnescaped: () => qy, + moduleOptionDeclaration: () => cre, + moduleResolutionIsEqualTo: () => wZ, + moduleResolutionNameAndModeGetter: () => DO, + moduleResolutionOptionDeclarations: () => Nz, + moduleResolutionSupportsPackageJsonExportsAndImports: () => HC, + moduleResolutionUsesNodeModules: () => S9, + moduleSpecifierToValidIdentifier: () => FA, + moduleSpecifiers: () => Bh, + moduleSymbolToValidIdentifier: () => IA, + moveEmitHelpers: () => ete, + moveRangeEnd: () => S5, + moveRangePastDecorators: () => Ih, + moveRangePastModifiers: () => um, + moveRangePos: () => ov, + moveSyntheticComments: () => Yee, + mutateMap: () => Y4, + mutateMapSkippingNewValues: () => Vg, + needsParentheses: () => D9, + needsScopeMarker: () => p7, + newCaseClauseTracker: () => B9, + newPrivateEnvironment: () => Sne, + noEmitNotification: () => XN, + noEmitSubstitution: () => GD, + noTransformers: () => Zne, + noTruncationMaximumTruncationLength: () => Uj, + nodeCanBeDecorated: () => l3, + nodeCoreModules: () => QC, + nodeHasName: () => FP, + nodeIsDecorated: () => AC, + nodeIsMissing: () => tc, + nodeIsPresent: () => Ap, + nodeIsSynthesized: () => no, + nodeModuleNameResolver: () => qre, + nodeModulesPathPart: () => Kg, + nodeNextJsonConfigResolver: () => Hre, + nodeOrChildIsDecorated: () => u3, + nodeOverlapsWithStartEnd: () => l9, + nodePosToString: () => ehe, + nodeSeenTracker: () => O6, + nodeStartsNewLexicalEnvironment: () => AB, + noop: () => Ja, + noopFileWatcher: () => w6, + normalizePath: () => Hs, + normalizeSlashes: () => Vl, + normalizeSpans: () => yj, + not: () => jI, + notImplemented: () => qs, + notImplementedResolver: () => nie, + nullNodeConverters: () => $ee, + nullParenthesizerRules: () => Hee, + nullTransformationContext: () => YN, + objectAllocator: () => $l, + operatorPart: () => uw, + optionDeclarations: () => Nd, + optionMapToObject: () => WF, + optionsAffectingProgramStructure: () => pre, + optionsForBuild: () => Iz, + optionsForWatch: () => ek, + optionsHaveChanges: () => xC, + or: () => U_, + orderedRemoveItem: () => $E, + orderedRemoveItemAt: () => Ny, + packageIdToPackageName: () => C7, + packageIdToString: () => K1, + parameterIsThisKeyword: () => Bb, + parameterNamePart: () => rae, + parseBaseNodeFactory: () => rre, + parseBigInt: () => Dee, + parseBuildCommand: () => Sre, + parseCommandLine: () => vre, + parseCommandLineWorker: () => Oz, + parseConfigFileTextToJson: () => Mz, + parseConfigFileWithSystem: () => zie, + parseConfigHostFromCompilerHostLike: () => OO, + parseCustomTypeOption: () => BF, + parseIsolatedEntityName: () => Kx, + parseIsolatedJSDocComment: () => ire, + parseJSDocTypeExpressionForTests: () => A0e, + parseJsonConfigFileContent: () => aye, + parseJsonSourceFileConfigFileContent: () => LN, + parseJsonText: () => PN, + parseListTypeOption: () => hre, + parseNodeFactory: () => bv, + parseNodeModuleFromPath: () => BN, + parsePackageName: () => nO, + parsePseudoBigInt: () => aD, + parseValidBigInt: () => wJ, + pasteEdits: () => KH, + patchWriteFileEnsuringDirectory: () => yY, + pathContainsNodeModules: () => c1, + pathIsAbsolute: () => i4, + pathIsBareSpecifier: () => cj, + pathIsRelative: () => lf, + patternText: () => KX, + performIncrementalCompilation: () => Wie, + performance: () => cQ, + positionBelongsToNode: () => uV, + positionIsASICandidate: () => N9, + positionIsSynthesized: () => kd, + positionsAreOnSameLine: () => ip, + preProcessFile: () => m2e, + probablyUsesSemicolons: () => NA, + processCommentPragmas: () => Ez, + processPragmasIntoFields: () => Dz, + processTaggedTemplateExpression: () => PW, + programContainsEsModules: () => Zse, + programContainsModules: () => Yse, + projectReferenceIsEqualTo: () => Vj, + propertyNamePart: () => nae, + pseudoBigIntToString: () => qb, + punctuationPart: () => Cu, + pushIfUnique: () => Qf, + quote: () => pw, + quotePreferenceFromString: () => DV, + rangeContainsPosition: () => I6, + rangeContainsPositionExclusive: () => hA, + rangeContainsRange: () => p_, + rangeContainsRangeExclusive: () => jse, + rangeContainsStartEnd: () => yA, + rangeEndIsOnSameLineAsRangeStart: () => W3, + rangeEndPositionsAreOnSameLine: () => XK, + rangeEquals: () => SR, + rangeIsOnSingleLine: () => CS, + rangeOfNode: () => EJ, + rangeOfTypeParameters: () => DJ, + rangeOverlapsWithStartEnd: () => iw, + rangeStartIsOnSameLineAsRangeEnd: () => QK, + rangeStartPositionsAreOnSameLine: () => T5, + readBuilderProgram: () => qO, + readConfigFile: () => FN, + readJson: () => WC, + readJsonConfigFile: () => Tre, + readJsonOrUndefined: () => KB, + reduceEachLeadingCommentRange: () => DY, + reduceEachTrailingCommentRange: () => wY, + reduceLeft: () => qu, + reduceLeftIterator: () => MX, + reducePathComponents: () => nS, + refactor: () => dk, + regExpEscape: () => Phe, + regularExpressionFlagToCharacterCode: () => wge, + relativeComplement: () => zX, + removeAllComments: () => cN, + removeEmitHelper: () => Vhe, + removeExtension: () => eN, + removeFileExtension: () => $u, + removeIgnoredPath: () => jO, + removeMinAndVersionNumbers: () => IR, + removePrefix: () => XE, + removeSuffix: () => lC, + removeTrailingDirectorySeparator: () => X1, + repeatString: () => TA, + replaceElement: () => kR, + replaceFirstStar: () => DS, + resolutionExtensionIsTSOrJson: () => rD, + resolveConfigFileProjectName: () => OU, + resolveJSModule: () => Wre, + resolveLibrary: () => tO, + resolveModuleName: () => WS, + resolveModuleNameFromCache: () => Lye, + resolvePackageNameToPackageJson: () => $z, + resolvePath: () => Iy, + resolveProjectReferencePath: () => ak, + resolveTripleslashReference: () => HW, + resolveTypeReferenceDirective: () => jre, + resolvingEmptyArray: () => Wj, + returnFalse: () => Th, + returnNoopFileWatcher: () => ew, + returnTrue: () => yb, + returnUndefined: () => vb, + returnsPromise: () => dq, + rewriteModuleSpecifier: () => nk, + sameFlatMap: () => jX, + sameMap: () => Wc, + sameMapping: () => k1e, + scanTokenAtPosition: () => $Z, + scanner: () => Fl, + semanticDiagnosticsOptionDeclarations: () => ure, + serializeCompilerOptions: () => UF, + server: () => gPe, + servicesVersion: () => iTe, + setCommentRange: () => Hc, + setConfigFileInOptions: () => Wz, + setConstantValue: () => Kee, + setEmitFlags: () => on, + setGetSourceFileAsHashVersioned: () => VO, + setIdentifierAutoGenerate: () => _N, + setIdentifierGeneratedImportReference: () => nte, + setIdentifierTypeArguments: () => O0, + setInternalEmitFlags: () => lN, + setLocalizedDiagnosticMessages: () => see, + setNodeChildren: () => Ote, + setNodeFlags: () => Nee, + setObjectAllocator: () => iee, + setOriginalNode: () => Sn, + setParent: () => Fa, + setParentRecursive: () => lv, + setPrivateIdentifier: () => VS, + setSnippetElement: () => UJ, + setSourceMapRange: () => da, + setStackTraceLimit: () => fge, + setStartsOnNewLine: () => iF, + setSyntheticLeadingComments: () => uv, + setSyntheticTrailingComments: () => Ox, + setSys: () => yge, + setSysLog: () => mY, + setTextRange: () => ot, + setTextRangeEnd: () => XC, + setTextRangePos: () => oD, + setTextRangePosEnd: () => Cd, + setTextRangePosWidth: () => PJ, + setTokenSourceMapRange: () => Qee, + setTypeNode: () => tte, + setUILocale: () => QX, + setValueDeclaration: () => v3, + shouldAllowImportingTsExtension: () => b6, + shouldPreserveConstEnums: () => Yy, + shouldRewriteModuleSpecifier: () => S3, + shouldUseUriStyleNodeCoreModules: () => R9, + showModuleSpecifier: () => tee, + signatureHasRestParameter: () => ku, + signatureToDisplayParts: () => jV, + single: () => xR, + singleElementArray: () => QT, + singleIterator: () => BX, + singleOrMany: () => Gm, + singleOrUndefined: () => Hm, + skipAlias: () => Gl, + skipConstraint: () => kV, + skipOuterExpressions: () => xc, + skipParentheses: () => za, + skipPartiallyEmittedExpressions: () => ed, + skipTrivia: () => aa, + skipTypeChecking: () => $C, + skipTypeCheckingIgnoringNoCheck: () => Eee, + skipTypeParentheses: () => M4, + skipWhile: () => rQ, + sliceAfter: () => CJ, + some: () => at, + sortAndDeduplicate: () => GE, + sortAndDeduplicateDiagnostics: () => mC, + sourceFileAffectingCompilerOptions: () => Az, + sourceFileMayBeEmitted: () => Rb, + sourceMapCommentRegExp: () => hW, + sourceMapCommentRegExpDontCareLineStart: () => pne, + spacePart: () => cc, + spanMap: () => hR, + startEndContainsRange: () => rJ, + startEndOverlapsWithStartEnd: () => u9, + startOnNewLine: () => xu, + startTracing: () => fQ, + startsWith: () => Vi, + startsWithDirectory: () => _j, + startsWithUnderscore: () => KV, + startsWithUseStrict: () => zte, + stringContainsAt: () => Sae, + stringToToken: () => sS, + stripQuotes: () => Op, + supportedDeclarationExtensions: () => z5, + supportedJSExtensionsFlat: () => GC, + supportedLocaleDirectories: () => UY, + supportedTSExtensionsFlat: () => bJ, + supportedTSImplementationExtensions: () => Y3, + suppressLeadingAndTrailingTrivia: () => nf, + suppressLeadingTrivia: () => WV, + suppressTrailingTrivia: () => _ae, + symbolEscapedNameNoDefault: () => T9, + symbolName: () => _c, + symbolNameNoDefault: () => PV, + symbolToDisplayParts: () => _w, + sys: () => nl, + sysLog: () => bP, + tagNamesAreEquivalent: () => Tv, + takeWhile: () => LR, + targetOptionDeclaration: () => Pz, + targetToLibMap: () => PY, + testFormatSettings: () => Mbe, + textChangeRangeIsUnchanged: () => jY, + textChangeRangeNewSpan: () => f4, + textChanges: () => sn, + textOrKeywordPart: () => RV, + textPart: () => Lf, + textRangeContainsPositionInclusive: () => PP, + textRangeContainsTextSpan: () => IY, + textRangeIntersectsWithTextSpan: () => MY, + textSpanContainsPosition: () => gj, + textSpanContainsTextRange: () => hj, + textSpanContainsTextSpan: () => AY, + textSpanEnd: () => Yo, + textSpanIntersection: () => RY, + textSpanIntersectsWith: () => NP, + textSpanIntersectsWithPosition: () => LY, + textSpanIntersectsWithTextSpan: () => OY, + textSpanIsEmpty: () => NY, + textSpanOverlap: () => FY, + textSpanOverlapsWith: () => Mge, + textSpansEqual: () => M6, + textToKeywordObj: () => QI, + timestamp: () => ao, + toArray: () => $T, + toBuilderFileEmit: () => Nie, + toBuilderStateFileInfoForMultiEmit: () => Pie, + toEditorSettings: () => zA, + toFileNameLowerCase: () => Dy, + toPath: () => oo, + toProgramEmitPending: () => Aie, + toSorted: () => W_, + tokenIsIdentifierOrKeyword: () => c_, + tokenIsIdentifierOrKeywordOrGreaterThan: () => SY, + tokenToString: () => Xs, + trace: () => Yi, + tracing: () => nn, + tracingEnabled: () => vP, + transferSourceFileChildren: () => Lte, + transform: () => dTe, + transformClassFields: () => Ane, + transformDeclarations: () => FW, + transformECMAScriptModule: () => IW, + transformES2015: () => qne, + transformES2016: () => Vne, + transformES2017: () => Lne, + transformES2018: () => Mne, + transformES2019: () => Rne, + transformES2020: () => jne, + transformES2021: () => Bne, + transformESDecorators: () => One, + transformESNext: () => Jne, + transformGenerators: () => Hne, + transformImpliedNodeFormatDependentModule: () => $ne, + transformJsx: () => Une, + transformLegacyDecorators: () => Fne, + transformModule: () => AW, + transformNamedEvaluation: () => K_, + transformNodes: () => QN, + transformSystemModule: () => Gne, + transformTypeScript: () => Nne, + transpile: () => k2e, + transpileDeclaration: () => T2e, + transpileModule: () => Vae, + transpileOptionValueCompilerOptions: () => dre, + tryAddToSet: () => S0, + tryAndIgnoreErrors: () => F9, + tryCast: () => jn, + tryDirectoryExists: () => I9, + tryExtractTSExtension: () => v5, + tryFileExists: () => mw, + tryGetClassExtendingExpressionWithTypeArguments: () => XB, + tryGetClassImplementingOrExtendingExpressionWithTypeArguments: () => QB, + tryGetDirectories: () => A9, + tryGetExtensionFromPath: () => $g, + tryGetImportFromModuleSpecifier: () => b3, + tryGetJSDocSatisfiesTypeNode: () => Q5, + tryGetModuleNameFromFile: () => xN, + tryGetModuleSpecifierFromDeclaration: () => px, + tryGetNativePerformanceHooks: () => oQ, + tryGetPropertyAccessOrIdentifierToString: () => z3, + tryGetPropertyNameOfBindingOrAssignmentElement: () => NF, + tryGetSourceMappingURL: () => dne, + tryGetTextOfPropertyName: () => E4, + tryParseJson: () => b5, + tryParsePattern: () => Px, + tryParsePatterns: () => tN, + tryParseRawSourceMap: () => mne, + tryReadDirectory: () => HV, + tryReadFile: () => ID, + tryRemoveDirectoryPrefix: () => gJ, + tryRemoveExtension: () => kee, + tryRemovePrefix: () => OR, + tryRemoveSuffix: () => ZX, + tscBuildOption: () => JS, + typeAcquisitionDeclarations: () => RF, + typeAliasNamePart: () => iae, + typeDirectiveIsEqualTo: () => PZ, + typeKeywords: () => xV, + typeParameterNamePart: () => sae, + typeToDisplayParts: () => EA, + unchangedPollThresholds: () => VI, + unchangedTextChangeRange: () => e7, + unescapeLeadingUnderscores: () => Pi, + unmangleScopedPackageName: () => zN, + unorderedRemoveItem: () => XT, + unprefixedNodeCoreModules: () => Wee, + unreachableCodeIsError: () => _ee, + unsetNodeChildren: () => uz, + unusedLabelIsError: () => fee, + unwrapInnermostStatementOfLabel: () => _B, + unwrapParenthesizedExpression: () => Jee, + updateErrorForNoInputFiles: () => GF, + updateLanguageServiceSourceFile: () => zq, + updateMissingFilePathsWatch: () => UW, + updateResolutionField: () => m6, + updateSharedExtendedConfigFileWatcher: () => xO, + updateSourceFile: () => kz, + updateWatchingWildcardDirectories: () => KN, + usingSingleLineStringWriter: () => kC, + utf16EncodeAsString: () => _4, + validateLocaleAndSetLanguage: () => bj, + version: () => Xf, + versionMajorMinor: () => UE, + visitArray: () => JD, + visitCommaListElements: () => _O, + visitEachChild: () => kr, + visitFunctionBody: () => Of, + visitIterationBody: () => Zu, + visitLexicalEnvironment: () => gW, + visitNode: () => Xe, + visitNodes: () => Or, + visitParameterList: () => ic, + walkUpBindingElementsAndPatterns: () => tx, + walkUpOuterExpressions: () => Wte, + walkUpParenthesizedExpressions: () => rd, + walkUpParenthesizedTypes: () => C3, + walkUpParenthesizedTypesAndGetParentAndChild: () => SK, + whitespaceOrMapCommentRegExp: () => yW, + writeCommentRange: () => zC, + writeFile: () => p5, + writeFileEnsuringDirectories: () => WB, + zipWith: () => fR + }), bh.exports = FX(Xme); + var UE = "5.7", Xf = "5.7.2", OX = /* @__PURE__ */ ((e) => (e[e.LessThan = -1] = "LessThan", e[e.EqualTo = 0] = "EqualTo", e[e.GreaterThan = 1] = "GreaterThan", e))(OX || {}), He = [], _R = /* @__PURE__ */ new Map(); + function Ir(e) { + return e !== void 0 ? e.length : 0; + } + function lr(e, t) { + if (e !== void 0) + for (let n = 0; n < e.length; n++) { + const i = t(e[n], n); + if (i) + return i; + } + } + function LX(e, t) { + if (e !== void 0) + for (let n = e.length - 1; n >= 0; n--) { + const i = t(e[n], n); + if (i) + return i; + } + } + function Dc(e, t) { + if (e !== void 0) + for (let n = 0; n < e.length; n++) { + const i = t(e[n], n); + if (i !== void 0) + return i; + } + } + function _P(e, t) { + for (const n of e) { + const i = t(n); + if (i !== void 0) + return i; + } + } + function MX(e, t, n) { + let i = n; + if (e) { + let s = 0; + for (const o of e) + i = t(i, o, s), s++; + } + return i; + } + function fR(e, t, n) { + const i = []; + E.assertEqual(e.length, t.length); + for (let s = 0; s < e.length; s++) + i.push(n(e[s], t[s], s)); + return i; + } + function pR(e, t) { + if (e.length <= 1) + return e; + const n = []; + for (let i = 0, s = e.length; i < s; i++) + i !== 0 && n.push(t), n.push(e[i]); + return n; + } + function Ri(e, t) { + if (e !== void 0) { + for (let n = 0; n < e.length; n++) + if (!t(e[n], n)) + return !1; + } + return !0; + } + function Pn(e, t, n) { + if (e !== void 0) + for (let i = n ?? 0; i < e.length; i++) { + const s = e[i]; + if (t(s, i)) + return s; + } + } + function gb(e, t, n) { + if (e !== void 0) + for (let i = n ?? e.length - 1; i >= 0; i--) { + const s = e[i]; + if (t(s, i)) + return s; + } + } + function ec(e, t, n) { + if (e === void 0) return -1; + for (let i = n ?? 0; i < e.length; i++) + if (t(e[i], i)) + return i; + return -1; + } + function AI(e, t, n) { + if (e === void 0) return -1; + for (let i = n ?? e.length - 1; i >= 0; i--) + if (t(e[i], i)) + return i; + return -1; + } + function as(e, t, n = wy) { + if (e !== void 0) { + for (let i = 0; i < e.length; i++) + if (n(e[i], t)) + return !0; + } + return !1; + } + function RX(e, t, n) { + for (let i = n ?? 0; i < e.length; i++) + if (as(t, e.charCodeAt(i))) + return i; + return -1; + } + function b0(e, t) { + let n = 0; + if (e !== void 0) + for (let i = 0; i < e.length; i++) { + const s = e[i]; + t(s, i) && n++; + } + return n; + } + function kn(e, t) { + if (e !== void 0) { + const n = e.length; + let i = 0; + for (; i < n && t(e[i]); ) i++; + if (i < n) { + const s = e.slice(0, i); + for (i++; i < n; ) { + const o = e[i]; + t(o) && s.push(o), i++; + } + return s; + } + } + return e; + } + function dR(e, t) { + let n = 0; + for (let i = 0; i < e.length; i++) + t(e[i], i, e) && (e[n] = e[i], n++); + e.length = n; + } + function Ep(e) { + e.length = 0; + } + function gr(e, t) { + let n; + if (e !== void 0) { + n = []; + for (let i = 0; i < e.length; i++) + n.push(t(e[i], i)); + } + return n; + } + function* VE(e, t) { + for (const n of e) + yield t(n); + } + function Wc(e, t) { + if (e !== void 0) + for (let n = 0; n < e.length; n++) { + const i = e[n], s = t(i, n); + if (i !== s) { + const o = e.slice(0, n); + for (o.push(s), n++; n < e.length; n++) + o.push(t(e[n], n)); + return o; + } + } + return e; + } + function Dp(e) { + const t = []; + for (let n = 0; n < e.length; n++) { + const i = e[n]; + i && (os(i) ? Nn(t, i) : t.push(i)); + } + return t; + } + function na(e, t) { + let n; + if (e !== void 0) + for (let i = 0; i < e.length; i++) { + const s = t(e[i], i); + s && (os(s) ? n = Nn(n, s) : n = Pr(n, s)); + } + return n ?? He; + } + function qE(e, t) { + const n = []; + if (e !== void 0) + for (let i = 0; i < e.length; i++) { + const s = t(e[i], i); + s && (os(s) ? Nn(n, s) : n.push(s)); + } + return n; + } + function* mR(e, t) { + for (const n of e) { + const i = t(n); + i && (yield* i); + } + } + function jX(e, t) { + let n; + if (e !== void 0) + for (let i = 0; i < e.length; i++) { + const s = e[i], o = t(s, i); + (n || s !== o || os(o)) && (n || (n = e.slice(0, i)), os(o) ? Nn(n, o) : n.push(o)); + } + return n ?? e; + } + function gR(e, t) { + const n = []; + for (let i = 0; i < e.length; i++) { + const s = t(e[i], i); + if (s === void 0) + return; + n.push(s); + } + return n; + } + function Li(e, t) { + const n = []; + if (e !== void 0) + for (let i = 0; i < e.length; i++) { + const s = t(e[i], i); + s !== void 0 && n.push(s); + } + return n; + } + function* Ty(e, t) { + for (const n of e) { + const i = t(n); + i !== void 0 && (yield i); + } + } + function HE(e, t, n) { + if (e.has(t)) + return e.get(t); + const i = n(); + return e.set(t, i), i; + } + function S0(e, t) { + return e.has(t) ? !1 : (e.add(t), !0); + } + function* BX(e) { + yield e; + } + function hR(e, t, n) { + let i; + if (e !== void 0) { + i = []; + const s = e.length; + let o, c, _ = 0, u = 0; + for (; _ < s; ) { + for (; u < s; ) { + const m = e[u]; + if (c = t(m, u), u === 0) + o = c; + else if (c !== o) + break; + u++; + } + if (_ < u) { + const m = n(e.slice(_, u), o, _, u); + m && i.push(m), _ = u; + } + o = c, u++; + } + } + return i; + } + function JX(e, t) { + if (e === void 0) + return; + const n = /* @__PURE__ */ new Map(); + return e.forEach((i, s) => { + const [o, c] = t(s, i); + n.set(o, c); + }), n; + } + function at(e, t) { + if (e !== void 0) + if (t !== void 0) { + for (let n = 0; n < e.length; n++) + if (t(e[n])) + return !0; + } else + return e.length > 0; + return !1; + } + function yR(e, t, n) { + let i; + for (let s = 0; s < e.length; s++) + t(e[s]) ? i = i === void 0 ? s : i : i !== void 0 && (n(i, s), i = void 0); + i !== void 0 && n(i, e.length); + } + function Wi(e, t) { + return t === void 0 || t.length === 0 ? e : e === void 0 || e.length === 0 ? t : [...e, ...t]; + } + function g5e(e, t) { + return t; + } + function II(e) { + return e.map(g5e); + } + function h5e(e, t, n) { + const i = II(e); + b5e(e, i, n); + let s = e[i[0]]; + const o = [i[0]]; + for (let c = 1; c < i.length; c++) { + const _ = i[c], u = e[_]; + t(s, u) || (o.push(_), s = u); + } + return o.sort(), o.map((c) => e[c]); + } + function y5e(e, t) { + const n = []; + for (let i = 0; i < e.length; i++) + Qf(n, e[i], t); + return n; + } + function hb(e, t, n) { + return e.length === 0 ? [] : e.length === 1 ? e.slice() : n ? h5e(e, t, n) : y5e(e, t); + } + function v5e(e, t) { + if (e.length === 0) return He; + let n = e[0]; + const i = [n]; + for (let s = 1; s < e.length; s++) { + const o = e[s]; + switch (t(o, n)) { + // equality comparison + case !0: + // relational comparison + // falls through + case 0: + continue; + case -1: + return E.fail("Array is unsorted."); + } + i.push(n = o); + } + return i; + } + function vR() { + return []; + } + function xy(e, t, n, i, s) { + if (e.length === 0) + return e.push(t), !0; + const o = Cy(e, t, lo, n); + if (o < 0) { + if (i && !s) { + const c = ~o; + if (c > 0 && i(t, e[c - 1])) + return !1; + if (c < e.length && i(t, e[c])) + return e.splice(c, 1, t), !0; + } + return e.splice(~o, 0, t), !0; + } + return s ? (e.splice(o, 0, t), !0) : !1; + } + function GE(e, t, n) { + return v5e(W_(e, t), n ?? t ?? cu); + } + function Ef(e, t, n = wy) { + if (e === void 0 || t === void 0) + return e === t; + if (e.length !== t.length) + return !1; + for (let i = 0; i < e.length; i++) + if (!n(e[i], t[i], i)) + return !1; + return !0; + } + function fP(e) { + let t; + if (e !== void 0) + for (let n = 0; n < e.length; n++) { + const i = e[n]; + (t ?? !i) && (t ?? (t = e.slice(0, n)), i && t.push(i)); + } + return t ?? e; + } + function zX(e, t, n) { + if (!t || !e || t.length === 0 || e.length === 0) return t; + const i = []; + e: + for (let s = 0, o = 0; o < t.length; o++) { + o > 0 && E.assertGreaterThanOrEqual( + n(t[o], t[o - 1]), + 0 + /* EqualTo */ + ); + t: + for (const c = s; s < e.length; s++) + switch (s > c && E.assertGreaterThanOrEqual( + n(e[s], e[s - 1]), + 0 + /* EqualTo */ + ), n(t[o], e[s])) { + case -1: + i.push(t[o]); + continue e; + case 0: + continue e; + case 1: + continue t; + } + } + return i; + } + function Pr(e, t) { + return t === void 0 ? e : e === void 0 ? [t] : (e.push(t), e); + } + function qT(e, t) { + return e === void 0 ? t : t === void 0 ? e : os(e) ? os(t) ? Wi(e, t) : Pr(e, t) : os(t) ? Pr(t, e) : [e, t]; + } + function WX(e, t) { + return t < 0 ? e.length + t : t; + } + function Nn(e, t, n, i) { + if (t === void 0 || t.length === 0) return e; + if (e === void 0) return t.slice(n, i); + n = n === void 0 ? 0 : WX(t, n), i = i === void 0 ? t.length : WX(t, i); + for (let s = n; s < i && s < t.length; s++) + t[s] !== void 0 && e.push(t[s]); + return e; + } + function Qf(e, t, n) { + return as(e, t, n) ? !1 : (e.push(t), !0); + } + function Sh(e, t, n) { + return e !== void 0 ? (Qf(e, t, n), e) : [t]; + } + function b5e(e, t, n) { + t.sort((i, s) => n(e[i], e[s]) || uo(i, s)); + } + function W_(e, t) { + return e.length === 0 ? He : e.slice().sort(t); + } + function* bR(e) { + for (let t = e.length - 1; t >= 0; t--) + yield e[t]; + } + function SR(e, t, n, i) { + for (; n < i; ) { + if (e[n] !== t[n]) + return !1; + n++; + } + return !0; + } + var ky = Array.prototype.at ? (e, t) => e?.at(t) : (e, t) => { + if (e !== void 0 && (t = WX(e, t), t < e.length)) + return e[t]; + }; + function Uc(e) { + return e === void 0 || e.length === 0 ? void 0 : e[0]; + } + function pP(e) { + if (e !== void 0) + for (const t of e) + return t; + } + function ya(e) { + return E.assert(e.length !== 0), e[0]; + } + function TR(e) { + for (const t of e) + return t; + E.fail("iterator is empty"); + } + function Co(e) { + return e === void 0 || e.length === 0 ? void 0 : e[e.length - 1]; + } + function _a(e) { + return E.assert(e.length !== 0), e[e.length - 1]; + } + function Hm(e) { + return e !== void 0 && e.length === 1 ? e[0] : void 0; + } + function xR(e) { + return E.checkDefined(Hm(e)); + } + function Gm(e) { + return e !== void 0 && e.length === 1 ? e[0] : e; + } + function kR(e, t, n) { + const i = e.slice(0); + return i[t] = n, i; + } + function Cy(e, t, n, i, s) { + return HT(e, n(t), n, i, s); + } + function HT(e, t, n, i, s) { + if (!at(e)) + return -1; + let o = s ?? 0, c = e.length - 1; + for (; o <= c; ) { + const _ = o + (c - o >> 1), u = n(e[_], _); + switch (i(u, t)) { + case -1: + o = _ + 1; + break; + case 0: + return _; + case 1: + c = _ - 1; + break; + } + } + return ~o; + } + function qu(e, t, n, i, s) { + if (e && e.length > 0) { + const o = e.length; + if (o > 0) { + let c = i === void 0 || i < 0 ? 0 : i; + const _ = s === void 0 || c + s > o - 1 ? o - 1 : c + s; + let u; + for (arguments.length <= 2 ? (u = e[c], c++) : u = n; c <= _; ) + u = t(u, e[c], c), c++; + return u; + } + } + return n; + } + var G1 = Object.prototype.hasOwnProperty; + function ro(e, t) { + return G1.call(e, t); + } + function FI(e, t) { + return G1.call(e, t) ? e[t] : void 0; + } + function Zd(e) { + const t = []; + for (const n in e) + G1.call(e, n) && t.push(n); + return t; + } + function Qme(e) { + const t = []; + do { + const n = Object.getOwnPropertyNames(e); + for (const i of n) + Qf(t, i); + } while (e = Object.getPrototypeOf(e)); + return t; + } + function GT(e) { + const t = []; + for (const n in e) + G1.call(e, n) && t.push(e[n]); + return t; + } + function UX(e, t) { + const n = new Array(e); + for (let i = 0; i < e; i++) + n[i] = t(i); + return n; + } + function Ki(e, t) { + const n = []; + for (const i of e) + n.push(t ? t(i) : i); + return n; + } + function eS(e, ...t) { + for (const n of t) + if (n !== void 0) + for (const i in n) + ro(n, i) && (e[i] = n[i]); + return e; + } + function VX(e, t, n = wy) { + if (e === t) return !0; + if (!e || !t) return !1; + for (const i in e) + if (G1.call(e, i) && (!G1.call(t, i) || !n(e[i], t[i]))) + return !1; + for (const i in t) + if (G1.call(t, i) && !G1.call(e, i)) + return !1; + return !0; + } + function aC(e, t, n = lo) { + const i = /* @__PURE__ */ new Map(); + for (let s = 0; s < e.length; s++) { + const o = e[s], c = t(o); + c !== void 0 && i.set(c, n(o)); + } + return i; + } + function qX(e, t, n = lo) { + const i = []; + for (let s = 0; s < e.length; s++) { + const o = e[s]; + i[t(o)] = n(o); + } + return i; + } + function dP(e, t, n = lo) { + const i = wp(); + for (let s = 0; s < e.length; s++) { + const o = e[s]; + i.add(t(o), n(o)); + } + return i; + } + function oC(e, t, n = lo) { + return Ki(dP(e, t).values(), n); + } + function CR(e, t) { + const n = {}; + if (e !== void 0) + for (let i = 0; i < e.length; i++) { + const s = e[i], o = `${t(s)}`; + (n[o] ?? (n[o] = [])).push(s); + } + return n; + } + function HX(e) { + const t = {}; + for (const n in e) + G1.call(e, n) && (t[n] = e[n]); + return t; + } + function OI(e, t) { + const n = {}; + for (const i in t) + G1.call(t, i) && (n[i] = t[i]); + for (const i in e) + G1.call(e, i) && (n[i] = e[i]); + return n; + } + function ER(e, t) { + for (const n in t) + G1.call(t, n) && (e[n] = t[n]); + } + function Is(e, t) { + return t?.bind(e); + } + function wp() { + const e = /* @__PURE__ */ new Map(); + return e.add = S5e, e.remove = T5e, e; + } + function S5e(e, t) { + let n = this.get(e); + return n !== void 0 ? n.push(t) : this.set(e, n = [t]), n; + } + function T5e(e, t) { + const n = this.get(e); + n !== void 0 && (XT(n, t), n.length || this.delete(e)); + } + function mP(e) { + const t = e?.slice() ?? []; + let n = 0; + function i() { + return n === t.length; + } + function s(...c) { + t.push(...c); + } + function o() { + if (i()) + throw new Error("Queue is empty"); + const c = t[n]; + if (t[n] = void 0, n++, n > 100 && n > t.length >> 1) { + const _ = t.length - n; + t.copyWithin( + /*target*/ + 0, + /*start*/ + n + ), t.length = _, n = 0; + } + return c; + } + return { + enqueue: s, + dequeue: o, + isEmpty: i + }; + } + function DR(e, t) { + const n = /* @__PURE__ */ new Map(); + let i = 0; + function* s() { + for (const c of n.values()) + os(c) ? yield* c : yield c; + } + const o = { + has(c) { + const _ = e(c); + if (!n.has(_)) return !1; + const u = n.get(_); + return os(u) ? as(u, c, t) : t(u, c); + }, + add(c) { + const _ = e(c); + if (n.has(_)) { + const u = n.get(_); + if (os(u)) + as(u, c, t) || (u.push(c), i++); + else { + const m = u; + t(m, c) || (n.set(_, [m, c]), i++); + } + } else + n.set(_, c), i++; + return this; + }, + delete(c) { + const _ = e(c); + if (!n.has(_)) return !1; + const u = n.get(_); + if (os(u)) { + for (let m = 0; m < u.length; m++) + if (t(u[m], c)) + return u.length === 1 ? n.delete(_) : u.length === 2 ? n.set(_, u[1 - m]) : Kme(u, m), i--, !0; + } else if (t(u, c)) + return n.delete(_), i--, !0; + return !1; + }, + clear() { + n.clear(), i = 0; + }, + get size() { + return i; + }, + forEach(c) { + for (const _ of Ki(n.values())) + if (os(_)) + for (const u of _) + c(u, u, o); + else { + const u = _; + c(u, u, o); + } + }, + keys() { + return s(); + }, + values() { + return s(); + }, + *entries() { + for (const c of s()) + yield [c, c]; + }, + [Symbol.iterator]: () => s(), + [Symbol.toStringTag]: n[Symbol.toStringTag] + }; + return o; + } + function os(e) { + return Array.isArray(e); + } + function $T(e) { + return os(e) ? e : [e]; + } + function rs(e) { + return typeof e == "string"; + } + function Ey(e) { + return typeof e == "number"; + } + function jn(e, t) { + return e !== void 0 && t(e) ? e : void 0; + } + function Ws(e, t) { + return e !== void 0 && t(e) ? e : E.fail(`Invalid cast. The supplied value ${e} did not pass the test '${E.getFunctionName(t)}'.`); + } + function Ja(e) { + } + function Th() { + return !1; + } + function yb() { + return !0; + } + function vb() { + } + function lo(e) { + return e; + } + function x5e(e) { + return e.toLowerCase(); + } + var Yme = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_. ]+/g; + function Dy(e) { + return Yme.test(e) ? e.replace(Yme, x5e) : e; + } + function qs() { + throw new Error("Not implemented"); + } + function Iu(e) { + let t; + return () => (e && (t = e(), e = void 0), t); + } + function Kd(e) { + const t = /* @__PURE__ */ new Map(); + return (n) => { + const i = `${typeof n}:${n}`; + let s = t.get(i); + return s === void 0 && !t.has(i) && (s = e(n), t.set(i, s)), s; + }; + } + var GX = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Normal = 1] = "Normal", e[e.Aggressive = 2] = "Aggressive", e[e.VeryAggressive = 3] = "VeryAggressive", e))(GX || {}); + function wy(e, t) { + return e === t; + } + function Py(e, t) { + return e === t || e !== void 0 && t !== void 0 && e.toUpperCase() === t.toUpperCase(); + } + function bb(e, t) { + return wy(e, t); + } + function Zme(e, t) { + return e === t ? 0 : e === void 0 ? -1 : t === void 0 ? 1 : e < t ? -1 : 1; + } + function uo(e, t) { + return Zme(e, t); + } + function LI(e, t) { + return uo(e?.start, t?.start) || uo(e?.length, t?.length); + } + function wR(e, t, n) { + for (let i = 0; i < e.length; i++) + t = Math.max(t, n(e[i])); + return t; + } + function PR(e, t) { + return qu(e, (n, i) => t(n, i) === -1 ? n : i); + } + function gP(e, t) { + return e === t ? 0 : e === void 0 ? -1 : t === void 0 ? 1 : (e = e.toUpperCase(), t = t.toUpperCase(), e < t ? -1 : e > t ? 1 : 0); + } + function $X(e, t) { + return e === t ? 0 : e === void 0 ? -1 : t === void 0 ? 1 : (e = e.toLowerCase(), t = t.toLowerCase(), e < t ? -1 : e > t ? 1 : 0); + } + function cu(e, t) { + return Zme(e, t); + } + function cC(e) { + return e ? gP : cu; + } + var k5e = /* @__PURE__ */ (() => { + return t; + function e(n, i, s) { + if (n === i) return 0; + if (n === void 0) return -1; + if (i === void 0) return 1; + const o = s(n, i); + return o < 0 ? -1 : o > 0 ? 1 : 0; + } + function t(n) { + const i = new Intl.Collator(n, { usage: "sort", sensitivity: "variant", numeric: !0 }).compare; + return (s, o) => e(s, o, i); + } + })(), NR, AR; + function XX() { + return AR; + } + function QX(e) { + AR !== e && (AR = e, NR = void 0); + } + function hP(e, t) { + return NR ?? (NR = k5e(AR)), NR(e, t); + } + function YX(e, t, n, i) { + return e === t ? 0 : e === void 0 ? -1 : t === void 0 ? 1 : i(e[n], t[n]); + } + function $1(e, t) { + return uo(e ? 1 : 0, t ? 1 : 0); + } + function Sb(e, t, n) { + const i = Math.max(2, Math.floor(e.length * 0.34)); + let s = Math.floor(e.length * 0.4) + 1, o; + for (const c of t) { + const _ = n(c); + if (_ !== void 0 && Math.abs(_.length - e.length) <= i) { + if (_ === e || _.length < 3 && _.toLowerCase() !== e.toLowerCase()) + continue; + const u = C5e(e, _, s - 0.1); + if (u === void 0) + continue; + E.assert(u < s), s = u, o = c; + } + } + return o; + } + function C5e(e, t, n) { + let i = new Array(t.length + 1), s = new Array(t.length + 1); + const o = n + 0.01; + for (let _ = 0; _ <= t.length; _++) + i[_] = _; + for (let _ = 1; _ <= e.length; _++) { + const u = e.charCodeAt(_ - 1), m = Math.ceil(_ > n ? _ - n : 1), g = Math.floor(t.length > n + _ ? n + _ : t.length); + s[0] = _; + let h = _; + for (let T = 1; T < m; T++) + s[T] = o; + for (let T = m; T <= g; T++) { + const C = e[_ - 1].toLowerCase() === t[T - 1].toLowerCase() ? i[T - 1] + 0.1 : i[T - 1] + 2, D = u === t.charCodeAt(T - 1) ? i[T - 1] : Math.min( + /*delete*/ + i[T] + 1, + /*insert*/ + s[T - 1] + 1, + /*substitute*/ + C + ); + s[T] = D, h = Math.min(h, D); + } + for (let T = g + 1; T <= t.length; T++) + s[T] = o; + if (h > n) + return; + const S = i; + i = s, s = S; + } + const c = i[t.length]; + return c > n ? void 0 : c; + } + function Eo(e, t, n) { + const i = e.length - t.length; + return i >= 0 && (n ? Py(e.slice(i), t) : e.indexOf(t, i) === i); + } + function lC(e, t) { + return Eo(e, t) ? e.slice(0, e.length - t.length) : e; + } + function ZX(e, t) { + return Eo(e, t) ? e.slice(0, e.length - t.length) : void 0; + } + function IR(e) { + let t = e.length; + for (let n = t - 1; n > 0; n--) { + let i = e.charCodeAt(n); + if (i >= 48 && i <= 57) + do + --n, i = e.charCodeAt(n); + while (n > 0 && i >= 48 && i <= 57); + else if (n > 4 && (i === 110 || i === 78)) { + if (--n, i = e.charCodeAt(n), i !== 105 && i !== 73 || (--n, i = e.charCodeAt(n), i !== 109 && i !== 77)) + break; + --n, i = e.charCodeAt(n); + } else + break; + if (i !== 45 && i !== 46) + break; + t = n; + } + return t === e.length ? e : e.slice(0, t); + } + function $E(e, t) { + for (let n = 0; n < e.length; n++) + if (e[n] === t) + return Ny(e, n), !0; + return !1; + } + function Ny(e, t) { + for (let n = t; n < e.length - 1; n++) + e[n] = e[n + 1]; + e.pop(); + } + function Kme(e, t) { + e[t] = e[e.length - 1], e.pop(); + } + function XT(e, t) { + return E5e(e, (n) => n === t); + } + function E5e(e, t) { + for (let n = 0; n < e.length; n++) + if (t(e[n])) + return Kme(e, n), !0; + return !1; + } + function Wl(e) { + return e ? lo : Dy; + } + function KX({ prefix: e, suffix: t }) { + return `${e}*${t}`; + } + function eQ(e, t) { + return E.assert(MI(e, t)), t.substring(e.prefix.length, t.length - e.suffix.length); + } + function FR(e, t, n) { + let i, s = -1; + for (let o = 0; o < e.length; o++) { + const c = e[o], _ = t(c); + _.prefix.length > s && MI(_, n) && (s = _.prefix.length, i = c); + } + return i; + } + function Vi(e, t, n) { + return n ? Py(e.slice(0, t.length), t) : e.lastIndexOf(t, 0) === 0; + } + function XE(e, t) { + return Vi(e, t) ? e.substr(t.length) : e; + } + function OR(e, t, n = lo) { + return Vi(n(e), n(t)) ? e.substring(t.length) : void 0; + } + function MI({ prefix: e, suffix: t }, n) { + return n.length >= e.length + t.length && Vi(n, e) && Eo(n, t); + } + function RI(e, t) { + return (n) => e(n) && t(n); + } + function U_(...e) { + return (...t) => { + let n; + for (const i of e) + if (n = i(...t), n) + return n; + return n; + }; + } + function jI(e) { + return (...t) => !e(...t); + } + function ege(e) { + } + function QT(e) { + return e === void 0 ? void 0 : [e]; + } + function BI(e, t, n, i, s, o) { + o ?? (o = Ja); + let c = 0, _ = 0; + const u = e.length, m = t.length; + let g = !1; + for (; c < u && _ < m; ) { + const h = e[c], S = t[_], T = n(h, S); + T === -1 ? (i(h), c++, g = !0) : T === 1 ? (s(S), _++, g = !0) : (o(S, h), c++, _++); + } + for (; c < u; ) + i(e[c++]), g = !0; + for (; _ < m; ) + s(t[_++]), g = !0; + return g; + } + function tQ(e) { + const t = []; + return tge( + e, + t, + /*outer*/ + void 0, + 0 + ), t; + } + function tge(e, t, n, i) { + for (const s of e[i]) { + let o; + n ? (o = n.slice(), o.push(s)) : o = [s], i === e.length - 1 ? t.push(o) : tge(e, t, o, i + 1); + } + } + function LR(e, t) { + if (e !== void 0) { + const n = e.length; + let i = 0; + for (; i < n && t(e[i]); ) + i++; + return e.slice(0, i); + } + } + function rQ(e, t) { + if (e !== void 0) { + const n = e.length; + let i = 0; + for (; i < n && t(e[i]); ) + i++; + return e.slice(i); + } + } + function MR() { + return typeof process < "u" && !!process.nextTick && !process.browser && typeof a5e < "u"; + } + var nQ = /* @__PURE__ */ ((e) => (e[e.Off = 0] = "Off", e[e.Error = 1] = "Error", e[e.Warning = 2] = "Warning", e[e.Info = 3] = "Info", e[e.Verbose = 4] = "Verbose", e))(nQ || {}), E; + ((e) => { + let t = 0; + e.currentLogLevel = 2, e.isDebugging = !1; + function n(Re) { + return e.currentLogLevel <= Re; + } + e.shouldLog = n; + function i(Re, gt) { + e.loggingHost && n(Re) && e.loggingHost.log(Re, gt); + } + function s(Re) { + i(3, Re); + } + e.log = s, ((Re) => { + function gt(wn) { + i(1, wn); + } + Re.error = gt; + function tr(wn) { + i(2, wn); + } + Re.warn = tr; + function qr(wn) { + i(3, wn); + } + Re.log = qr; + function Bn(wn) { + i(4, wn); + } + Re.trace = Bn; + })(s = e.log || (e.log = {})); + const o = {}; + function c() { + return t; + } + e.getAssertionLevel = c; + function _(Re) { + const gt = t; + if (t = Re, Re > gt) + for (const tr of Zd(o)) { + const qr = o[tr]; + qr !== void 0 && e[tr] !== qr.assertion && Re >= qr.level && (e[tr] = qr, o[tr] = void 0); + } + } + e.setAssertionLevel = _; + function u(Re) { + return t >= Re; + } + e.shouldAssert = u; + function m(Re, gt) { + return u(Re) ? !0 : (o[gt] = { level: Re, assertion: e[gt] }, e[gt] = Ja, !1); + } + function g(Re, gt) { + debugger; + const tr = new Error(Re ? `Debug Failure. ${Re}` : "Debug Failure."); + throw Error.captureStackTrace && Error.captureStackTrace(tr, gt || g), tr; + } + e.fail = g; + function h(Re, gt, tr) { + return g( + `${gt || "Unexpected node."}\r +Node ${me(Re.kind)} was unexpected.`, + tr || h + ); + } + e.failBadSyntaxKind = h; + function S(Re, gt, tr, qr) { + Re || (gt = gt ? `False expression: ${gt}` : "False expression.", tr && (gt += `\r +Verbose Debug Information: ` + (typeof tr == "string" ? tr : tr())), g(gt, qr || S)); + } + e.assert = S; + function T(Re, gt, tr, qr, Bn) { + if (Re !== gt) { + const wn = tr ? qr ? `${tr} ${qr}` : tr : ""; + g(`Expected ${Re} === ${gt}. ${wn}`, Bn || T); + } + } + e.assertEqual = T; + function C(Re, gt, tr, qr) { + Re >= gt && g(`Expected ${Re} < ${gt}. ${tr || ""}`, qr || C); + } + e.assertLessThan = C; + function D(Re, gt, tr) { + Re > gt && g(`Expected ${Re} <= ${gt}`, tr || D); + } + e.assertLessThanOrEqual = D; + function w(Re, gt, tr) { + Re < gt && g(`Expected ${Re} >= ${gt}`, tr || w); + } + e.assertGreaterThanOrEqual = w; + function A(Re, gt, tr) { + Re == null && g(gt, tr || A); + } + e.assertIsDefined = A; + function O(Re, gt, tr) { + return A(Re, gt, tr || O), Re; + } + e.checkDefined = O; + function F(Re, gt, tr) { + for (const qr of Re) + A(qr, gt, tr || F); + } + e.assertEachIsDefined = F; + function R(Re, gt, tr) { + return F(Re, gt, tr || R), Re; + } + e.checkEachDefined = R; + function W(Re, gt = "Illegal value:", tr) { + const qr = typeof Re == "object" && ro(Re, "kind") && ro(Re, "pos") ? "SyntaxKind: " + me(Re.kind) : JSON.stringify(Re); + return g(`${gt} ${qr}`, tr || W); + } + e.assertNever = W; + function V(Re, gt, tr, qr) { + m(1, "assertEachNode") && S( + gt === void 0 || Ri(Re, gt), + tr || "Unexpected node.", + () => `Node array did not pass test '${te(gt)}'.`, + qr || V + ); + } + e.assertEachNode = V; + function $(Re, gt, tr, qr) { + m(1, "assertNode") && S( + Re !== void 0 && (gt === void 0 || gt(Re)), + tr || "Unexpected node.", + () => `Node ${me(Re?.kind)} did not pass test '${te(gt)}'.`, + qr || $ + ); + } + e.assertNode = $; + function U(Re, gt, tr, qr) { + m(1, "assertNotNode") && S( + Re === void 0 || gt === void 0 || !gt(Re), + tr || "Unexpected node.", + () => `Node ${me(Re.kind)} should not have passed test '${te(gt)}'.`, + qr || U + ); + } + e.assertNotNode = U; + function _e(Re, gt, tr, qr) { + m(1, "assertOptionalNode") && S( + gt === void 0 || Re === void 0 || gt(Re), + tr || "Unexpected node.", + () => `Node ${me(Re?.kind)} did not pass test '${te(gt)}'.`, + qr || _e + ); + } + e.assertOptionalNode = _e; + function Z(Re, gt, tr, qr) { + m(1, "assertOptionalToken") && S( + gt === void 0 || Re === void 0 || Re.kind === gt, + tr || "Unexpected node.", + () => `Node ${me(Re?.kind)} was not a '${me(gt)}' token.`, + qr || Z + ); + } + e.assertOptionalToken = Z; + function J(Re, gt, tr) { + m(1, "assertMissingNode") && S( + Re === void 0, + gt || "Unexpected node.", + () => `Node ${me(Re.kind)} was unexpected'.`, + tr || J + ); + } + e.assertMissingNode = J; + function re(Re) { + } + e.type = re; + function te(Re) { + if (typeof Re != "function") + return ""; + if (ro(Re, "name")) + return Re.name; + { + const gt = Function.prototype.toString.call(Re), tr = /^function\s+([\w$]+)\s*\(/.exec(gt); + return tr ? tr[1] : ""; + } + } + e.getFunctionName = te; + function ie(Re) { + return `{ name: ${Pi(Re.escapedName)}; flags: ${xe(Re.flags)}; declarations: ${gr(Re.declarations, (gt) => me(gt.kind))} }`; + } + e.formatSymbol = ie; + function le(Re = 0, gt, tr) { + const qr = q(gt); + if (Re === 0) + return qr.length > 0 && qr[0][0] === 0 ? qr[0][1] : "0"; + if (tr) { + const Bn = []; + let wn = Re; + for (const [ki, Cs] of qr) { + if (ki > Re) + break; + ki !== 0 && ki & Re && (Bn.push(Cs), wn &= ~ki); + } + if (wn === 0) + return Bn.join("|"); + } else + for (const [Bn, wn] of qr) + if (Bn === Re) + return wn; + return Re.toString(); + } + e.formatEnum = le; + const Te = /* @__PURE__ */ new Map(); + function q(Re) { + const gt = Te.get(Re); + if (gt) + return gt; + const tr = []; + for (const Bn in Re) { + const wn = Re[Bn]; + typeof wn == "number" && tr.push([wn, Bn]); + } + const qr = W_(tr, (Bn, wn) => uo(Bn[0], wn[0])); + return Te.set(Re, qr), qr; + } + function me(Re) { + return le( + Re, + JR, + /*isFlags*/ + !1 + ); + } + e.formatSyntaxKind = me; + function Ce(Re) { + return le( + Re, + ej, + /*isFlags*/ + !1 + ); + } + e.formatSnippetKind = Ce; + function Ee(Re) { + return le( + Re, + ZR, + /*isFlags*/ + !1 + ); + } + e.formatScriptKind = Ee; + function oe(Re) { + return le( + Re, + zR, + /*isFlags*/ + !0 + ); + } + e.formatNodeFlags = oe; + function ke(Re) { + return le( + Re, + $R, + /*isFlags*/ + !0 + ); + } + e.formatNodeCheckFlags = ke; + function ue(Re) { + return le( + Re, + WR, + /*isFlags*/ + !0 + ); + } + e.formatModifierFlags = ue; + function it(Re) { + return le( + Re, + KR, + /*isFlags*/ + !0 + ); + } + e.formatTransformFlags = it; + function Oe(Re) { + return le( + Re, + tj, + /*isFlags*/ + !0 + ); + } + e.formatEmitFlags = Oe; + function xe(Re) { + return le( + Re, + GR, + /*isFlags*/ + !0 + ); + } + e.formatSymbolFlags = xe; + function he(Re) { + return le( + Re, + XR, + /*isFlags*/ + !0 + ); + } + e.formatTypeFlags = he; + function ne(Re) { + return le( + Re, + YR, + /*isFlags*/ + !0 + ); + } + e.formatSignatureFlags = ne; + function Ae(Re) { + return le( + Re, + QR, + /*isFlags*/ + !0 + ); + } + e.formatObjectFlags = Ae; + function De(Re) { + return le( + Re, + zI, + /*isFlags*/ + !0 + ); + } + e.formatFlowFlags = De; + function we(Re) { + return le( + Re, + UR, + /*isFlags*/ + !0 + ); + } + e.formatRelationComparisonResult = we; + function Ue(Re) { + return le( + Re, + _W, + /*isFlags*/ + !0 + ); + } + e.formatCheckMode = Ue; + function bt(Re) { + return le( + Re, + fW, + /*isFlags*/ + !0 + ); + } + e.formatSignatureCheckMode = bt; + function Lt(Re) { + return le( + Re, + uW, + /*isFlags*/ + !0 + ); + } + e.formatTypeFacts = Lt; + let er = !1, Nr; + function Dt(Re) { + "__debugFlowFlags" in Re || Object.defineProperties(Re, { + // for use with vscode-js-debug's new customDescriptionGenerator in launch.json + __tsDebuggerDisplay: { + value() { + const gt = this.flags & 2 ? "FlowStart" : this.flags & 4 ? "FlowBranchLabel" : this.flags & 8 ? "FlowLoopLabel" : this.flags & 16 ? "FlowAssignment" : this.flags & 32 ? "FlowTrueCondition" : this.flags & 64 ? "FlowFalseCondition" : this.flags & 128 ? "FlowSwitchClause" : this.flags & 256 ? "FlowArrayMutation" : this.flags & 512 ? "FlowCall" : this.flags & 1024 ? "FlowReduceLabel" : this.flags & 1 ? "FlowUnreachable" : "UnknownFlow", tr = this.flags & -2048; + return `${gt}${tr ? ` (${De(tr)})` : ""}`; + } + }, + __debugFlowFlags: { + get() { + return le( + this.flags, + zI, + /*isFlags*/ + !0 + ); + } + }, + __debugToString: { + value() { + return di(this); + } + } + }); + } + function Qt(Re) { + return er && (typeof Object.setPrototypeOf == "function" ? (Nr || (Nr = Object.create(Object.prototype), Dt(Nr)), Object.setPrototypeOf(Re, Nr)) : Dt(Re)), Re; + } + e.attachFlowNodeDebugInfo = Qt; + let Wr; + function yr(Re) { + "__tsDebuggerDisplay" in Re || Object.defineProperties(Re, { + __tsDebuggerDisplay: { + value(gt) { + return gt = String(gt).replace(/(?:,[\s\w]+:[^,]+)+\]$/, "]"), `NodeArray ${gt}`; + } + } + }); + } + function qn(Re) { + er && (typeof Object.setPrototypeOf == "function" ? (Wr || (Wr = Object.create(Array.prototype), yr(Wr)), Object.setPrototypeOf(Re, Wr)) : yr(Re)); + } + e.attachNodeArrayDebugInfo = qn; + function Bt() { + if (er) return; + const Re = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new WeakMap(); + Object.defineProperties($l.getSymbolConstructor().prototype, { + // for use with vscode-js-debug's new customDescriptionGenerator in launch.json + __tsDebuggerDisplay: { + value() { + const qr = this.flags & 33554432 ? "TransientSymbol" : "Symbol", Bn = this.flags & -33554433; + return `${qr} '${_c(this)}'${Bn ? ` (${xe(Bn)})` : ""}`; + } + }, + __debugFlags: { + get() { + return xe(this.flags); + } + } + }), Object.defineProperties($l.getTypeConstructor().prototype, { + // for use with vscode-js-debug's new customDescriptionGenerator in launch.json + __tsDebuggerDisplay: { + value() { + const qr = this.flags & 67359327 ? `IntrinsicType ${this.intrinsicName}${this.debugIntrinsicName ? ` (${this.debugIntrinsicName})` : ""}` : this.flags & 98304 ? "NullableType" : this.flags & 384 ? `LiteralType ${JSON.stringify(this.value)}` : this.flags & 2048 ? `LiteralType ${this.value.negative ? "-" : ""}${this.value.base10Value}n` : this.flags & 8192 ? "UniqueESSymbolType" : this.flags & 32 ? "EnumType" : this.flags & 1048576 ? "UnionType" : this.flags & 2097152 ? "IntersectionType" : this.flags & 4194304 ? "IndexType" : this.flags & 8388608 ? "IndexedAccessType" : this.flags & 16777216 ? "ConditionalType" : this.flags & 33554432 ? "SubstitutionType" : this.flags & 262144 ? "TypeParameter" : this.flags & 524288 ? this.objectFlags & 3 ? "InterfaceType" : this.objectFlags & 4 ? "TypeReference" : this.objectFlags & 8 ? "TupleType" : this.objectFlags & 16 ? "AnonymousType" : this.objectFlags & 32 ? "MappedType" : this.objectFlags & 1024 ? "ReverseMappedType" : this.objectFlags & 256 ? "EvolvingArrayType" : "ObjectType" : "Type", Bn = this.flags & 524288 ? this.objectFlags & -1344 : 0; + return `${qr}${this.symbol ? ` '${_c(this.symbol)}'` : ""}${Bn ? ` (${Ae(Bn)})` : ""}`; + } + }, + __debugFlags: { + get() { + return he(this.flags); + } + }, + __debugObjectFlags: { + get() { + return this.flags & 524288 ? Ae(this.objectFlags) : ""; + } + }, + __debugTypeToString: { + value() { + let qr = Re.get(this); + return qr === void 0 && (qr = this.checker.typeToString(this), Re.set(this, qr)), qr; + } + } + }), Object.defineProperties($l.getSignatureConstructor().prototype, { + __debugFlags: { + get() { + return ne(this.flags); + } + }, + __debugSignatureToString: { + value() { + var qr; + return (qr = this.checker) == null ? void 0 : qr.signatureToString(this); + } + } + }); + const tr = [ + $l.getNodeConstructor(), + $l.getIdentifierConstructor(), + $l.getTokenConstructor(), + $l.getSourceFileConstructor() + ]; + for (const qr of tr) + ro(qr.prototype, "__debugKind") || Object.defineProperties(qr.prototype, { + // for use with vscode-js-debug's new customDescriptionGenerator in launch.json + __tsDebuggerDisplay: { + value() { + return `${Fo(this) ? "GeneratedIdentifier" : Me(this) ? `Identifier '${An(this)}'` : Ni(this) ? `PrivateIdentifier '${An(this)}'` : ea(this) ? `StringLiteral ${JSON.stringify(this.text.length < 10 ? this.text : this.text.slice(10) + "...")}` : d_(this) ? `NumericLiteral ${this.text}` : gD(this) ? `BigIntLiteral ${this.text}n` : Ao(this) ? "TypeParameterDeclaration" : Ii(this) ? "ParameterDeclaration" : Go(this) ? "ConstructorDeclaration" : cp(this) ? "GetAccessorDeclaration" : A_(this) ? "SetAccessorDeclaration" : Jx(this) ? "CallSignatureDeclaration" : dN(this) ? "ConstructSignatureDeclaration" : r1(this) ? "IndexSignatureDeclaration" : zx(this) ? "TypePredicateNode" : Y_(this) ? "TypeReferenceNode" : ng(this) ? "FunctionTypeNode" : ZC(this) ? "ConstructorTypeNode" : $b(this) ? "TypeQueryNode" : Qu(this) ? "TypeLiteralNode" : mN(this) ? "ArrayTypeNode" : Wx(this) ? "TupleTypeNode" : fF(this) ? "OptionalTypeNode" : pF(this) ? "RestTypeNode" : L0(this) ? "UnionTypeNode" : Ux(this) ? "IntersectionTypeNode" : Xb(this) ? "ConditionalTypeNode" : AS(this) ? "InferTypeNode" : IS(this) ? "ParenthesizedTypeNode" : bD(this) ? "ThisTypeNode" : _v(this) ? "TypeOperatorNode" : Qb(this) ? "IndexedAccessTypeNode" : FS(this) ? "MappedTypeNode" : M0(this) ? "LiteralTypeNode" : KC(this) ? "NamedTupleMember" : Ed(this) ? "ImportTypeNode" : me(this.kind)}${this.flags ? ` (${oe(this.flags)})` : ""}`; + } + }, + __debugKind: { + get() { + return me(this.kind); + } + }, + __debugNodeFlags: { + get() { + return oe(this.flags); + } + }, + __debugModifierFlags: { + get() { + return ue(zK(this)); + } + }, + __debugTransformFlags: { + get() { + return it(this.transformFlags); + } + }, + __debugIsParseTreeNode: { + get() { + return p4(this); + } + }, + __debugEmitFlags: { + get() { + return Oe(va(this)); + } + }, + __debugGetText: { + value(Bn) { + if (no(this)) return ""; + let wn = gt.get(this); + if (wn === void 0) { + const ki = ls(this), Cs = ki && Cr(ki); + wn = Cs ? Db(Cs, ki, Bn) : "", gt.set(this, wn); + } + return wn; + } + } + }); + er = !0; + } + e.enableDebugInfo = Bt; + function bi(Re) { + const gt = Re & 7; + let tr = gt === 0 ? "in out" : gt === 3 ? "[bivariant]" : gt === 2 ? "in" : gt === 1 ? "out" : gt === 4 ? "[independent]" : ""; + return Re & 8 ? tr += " (unmeasurable)" : Re & 16 && (tr += " (unreliable)"), tr; + } + e.formatVariance = bi; + class pi { + __debugToString() { + var gt; + switch (this.kind) { + case 3: + return ((gt = this.debugInfo) == null ? void 0 : gt.call(this)) || "(function mapper)"; + case 0: + return `${this.source.__debugTypeToString()} -> ${this.target.__debugTypeToString()}`; + case 1: + return fR( + this.sources, + this.targets || gr(this.sources, () => "any"), + (tr, qr) => `${tr.__debugTypeToString()} -> ${typeof qr == "string" ? qr : qr.__debugTypeToString()}` + ).join(", "); + case 2: + return fR( + this.sources, + this.targets, + (tr, qr) => `${tr.__debugTypeToString()} -> ${qr().__debugTypeToString()}` + ).join(", "); + case 5: + case 4: + return `m1: ${this.mapper1.__debugToString().split(` +`).join(` + `)} +m2: ${this.mapper2.__debugToString().split(` +`).join(` + `)}`; + default: + return W(this); + } + } + } + e.DebugTypeMapper = pi; + function Xn(Re) { + return e.isDebugging ? Object.setPrototypeOf(Re, pi.prototype) : Re; + } + e.attachDebugPrototypeIfDebug = Xn; + function jr(Re) { + return console.log(di(Re)); + } + e.printControlFlowGraph = jr; + function di(Re) { + let gt = -1; + function tr(ve) { + return ve.id || (ve.id = gt, gt--), ve.id; + } + let qr; + ((ve) => { + ve.lr = "─", ve.ud = "│", ve.dr = "╭", ve.dl = "╮", ve.ul = "╯", ve.ur = "╰", ve.udr = "├", ve.udl = "┤", ve.dlr = "┬", ve.ulr = "┴", ve.udlr = "╫"; + })(qr || (qr = {})); + let Bn; + ((ve) => { + ve[ve.None = 0] = "None", ve[ve.Up = 1] = "Up", ve[ve.Down = 2] = "Down", ve[ve.Left = 4] = "Left", ve[ve.Right = 8] = "Right", ve[ve.UpDown = 3] = "UpDown", ve[ve.LeftRight = 12] = "LeftRight", ve[ve.UpLeft = 5] = "UpLeft", ve[ve.UpRight = 9] = "UpRight", ve[ve.DownLeft = 6] = "DownLeft", ve[ve.DownRight = 10] = "DownRight", ve[ve.UpDownLeft = 7] = "UpDownLeft", ve[ve.UpDownRight = 11] = "UpDownRight", ve[ve.UpLeftRight = 13] = "UpLeftRight", ve[ve.DownLeftRight = 14] = "DownLeftRight", ve[ve.UpDownLeftRight = 15] = "UpDownLeftRight", ve[ve.NoChildren = 16] = "NoChildren"; + })(Bn || (Bn = {})); + const wn = 2032, ki = 882, Cs = /* @__PURE__ */ Object.create( + /*o*/ + null + ), Ks = [], xr = Ke(Re, /* @__PURE__ */ new Set()); + for (const ve of Ks) + ve.text = rn(ve.flowNode, ve.circular), Ye(ve); + const gs = _t(xr), Qe = yt(gs); + return We(xr, 0), ye(); + function Ct(ve) { + return !!(ve.flags & 128); + } + function ee(ve) { + return !!(ve.flags & 12) && !!ve.antecedent; + } + function Ve(ve) { + return !!(ve.flags & wn); + } + function K(ve) { + return !!(ve.flags & ki); + } + function Ie(ve) { + const X = []; + for (const lt of ve.edges) + lt.source === ve && X.push(lt.target); + return X; + } + function $e(ve) { + const X = []; + for (const lt of ve.edges) + lt.target === ve && X.push(lt.source); + return X; + } + function Ke(ve, X) { + const lt = tr(ve); + let zt = Cs[lt]; + if (zt && X.has(ve)) + return zt.circular = !0, zt = { + id: -1, + flowNode: ve, + edges: [], + text: "", + lane: -1, + endLane: -1, + level: -1, + circular: "circularity" + }, Ks.push(zt), zt; + if (X.add(ve), !zt) + if (Cs[lt] = zt = { id: lt, flowNode: ve, edges: [], text: "", lane: -1, endLane: -1, level: -1, circular: !1 }, Ks.push(zt), ee(ve)) + for (const de of ve.antecedent) + Je(zt, de, X); + else Ve(ve) && Je(zt, ve.antecedent, X); + return X.delete(ve), zt; + } + function Je(ve, X, lt) { + const zt = Ke(X, lt), de = { source: ve, target: zt }; + ve.edges.push(de), zt.edges.push(de); + } + function Ye(ve) { + if (ve.level !== -1) + return ve.level; + let X = 0; + for (const lt of $e(ve)) + X = Math.max(X, Ye(lt) + 1); + return ve.level = X; + } + function _t(ve) { + let X = 0; + for (const lt of Ie(ve)) + X = Math.max(X, _t(lt)); + return X + 1; + } + function yt(ve) { + const X = fe(Array(ve), 0); + for (const lt of Ks) + X[lt.level] = Math.max(X[lt.level], lt.text.length); + return X; + } + function We(ve, X) { + if (ve.lane === -1) { + ve.lane = X, ve.endLane = X; + const lt = Ie(ve); + for (let zt = 0; zt < lt.length; zt++) { + zt > 0 && X++; + const de = lt[zt]; + We(de, X), de.endLane > ve.endLane && (X = de.endLane); + } + ve.endLane = X; + } + } + function Et(ve) { + if (ve & 2) return "Start"; + if (ve & 4) return "Branch"; + if (ve & 8) return "Loop"; + if (ve & 16) return "Assignment"; + if (ve & 32) return "True"; + if (ve & 64) return "False"; + if (ve & 128) return "SwitchClause"; + if (ve & 256) return "ArrayMutation"; + if (ve & 512) return "Call"; + if (ve & 1024) return "ReduceLabel"; + if (ve & 1) return "Unreachable"; + throw new Error(); + } + function Xt(ve) { + const X = Cr(ve); + return Db( + X, + ve, + /*includeTrivia*/ + !1 + ); + } + function rn(ve, X) { + let lt = Et(ve.flags); + if (X && (lt = `${lt}#${tr(ve)}`), Ct(ve)) { + const zt = [], { switchStatement: de, clauseStart: st, clauseEnd: Gt } = ve.node; + for (let Xr = st; Xr < Gt; Xr++) { + const Rr = de.caseBlock.clauses[Xr]; + CD(Rr) ? zt.push("default") : zt.push(Xt(Rr.expression)); + } + lt += ` (${zt.join(", ")})`; + } else K(ve) && ve.node && (lt += ` (${Xt(ve.node)})`); + return X === "circularity" ? `Circular(${lt})` : lt; + } + function ye() { + const ve = Qe.length, X = wR(Ks, 0, (Gt) => Gt.lane) + 1, lt = fe(Array(X), ""), zt = Qe.map(() => Array(X)), de = Qe.map(() => fe(Array(X), 0)); + for (const Gt of Ks) { + zt[Gt.level][Gt.lane] = Gt; + const Xr = Ie(Gt); + for (let Jr = 0; Jr < Xr.length; Jr++) { + const tt = Xr[Jr]; + let ut = 8; + tt.lane === Gt.lane && (ut |= 4), Jr > 0 && (ut |= 1), Jr < Xr.length - 1 && (ut |= 2), de[Gt.level][tt.lane] |= ut; + } + Xr.length === 0 && (de[Gt.level][Gt.lane] |= 16); + const Rr = $e(Gt); + for (let Jr = 0; Jr < Rr.length; Jr++) { + const tt = Rr[Jr]; + let ut = 4; + Jr > 0 && (ut |= 1), Jr < Rr.length - 1 && (ut |= 2), de[Gt.level - 1][tt.lane] |= ut; + } + } + for (let Gt = 0; Gt < ve; Gt++) + for (let Xr = 0; Xr < X; Xr++) { + const Rr = Gt > 0 ? de[Gt - 1][Xr] : 0, Jr = Xr > 0 ? de[Gt][Xr - 1] : 0; + let tt = de[Gt][Xr]; + tt || (Rr & 8 && (tt |= 12), Jr & 2 && (tt |= 3), de[Gt][Xr] = tt); + } + for (let Gt = 0; Gt < ve; Gt++) + for (let Xr = 0; Xr < lt.length; Xr++) { + const Rr = de[Gt][Xr], Jr = Rr & 4 ? "─" : " ", tt = zt[Gt][Xr]; + tt ? (st(Xr, tt.text), Gt < ve - 1 && (st(Xr, " "), st(Xr, L(Jr, Qe[Gt] - tt.text.length)))) : Gt < ve - 1 && st(Xr, L(Jr, Qe[Gt] + 1)), st(Xr, ft(Rr)), st(Xr, Rr & 8 && Gt < ve - 1 && !zt[Gt + 1][Xr] ? "─" : " "); + } + return ` +${lt.join(` +`)} +`; + function st(Gt, Xr) { + lt[Gt] += Xr; + } + } + function ft(ve) { + switch (ve) { + case 3: + return "│"; + case 12: + return "─"; + case 5: + return "╯"; + case 9: + return "╰"; + case 6: + return "╮"; + case 10: + return "╭"; + case 7: + return "┤"; + case 11: + return "├"; + case 13: + return "┴"; + case 14: + return "┬"; + case 15: + return "╫"; + } + return " "; + } + function fe(ve, X) { + if (ve.fill) + ve.fill(X); + else + for (let lt = 0; lt < ve.length; lt++) + ve[lt] = X; + return ve; + } + function L(ve, X) { + if (ve.repeat) + return X > 0 ? ve.repeat(X) : ""; + let lt = ""; + for (; lt.length < X; ) + lt += ve; + return lt; + } + } + e.formatControlFlowGraph = di; + })(E || (E = {})); + var D5e = /^(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i, w5e = /^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)(?:\.(?:0|[1-9]\d*|[a-z-][a-z0-9-]*))*$/i, P5e = /^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)$/i, N5e = /^[a-z0-9-]+(?:\.[a-z0-9-]+)*$/i, A5e = /^[a-z0-9-]+$/i, rge = /^(?:0|[1-9]\d*)$/, iQ = class NI { + constructor(t, n = 0, i = 0, s = "", o = "") { + typeof t == "string" && ({ major: t, minor: n, patch: i, prerelease: s, build: o } = E.checkDefined(nge(t), "Invalid version")), E.assert(t >= 0, "Invalid argument: major"), E.assert(n >= 0, "Invalid argument: minor"), E.assert(i >= 0, "Invalid argument: patch"); + const c = s ? os(s) ? s : s.split(".") : He, _ = o ? os(o) ? o : o.split(".") : He; + E.assert(Ri(c, (u) => P5e.test(u)), "Invalid argument: prerelease"), E.assert(Ri(_, (u) => A5e.test(u)), "Invalid argument: build"), this.major = t, this.minor = n, this.patch = i, this.prerelease = c, this.build = _; + } + static tryParse(t) { + const n = nge(t); + if (!n) return; + const { major: i, minor: s, patch: o, prerelease: c, build: _ } = n; + return new NI(i, s, o, c, _); + } + compareTo(t) { + return this === t ? 0 : t === void 0 ? 1 : uo(this.major, t.major) || uo(this.minor, t.minor) || uo(this.patch, t.patch) || I5e(this.prerelease, t.prerelease); + } + increment(t) { + switch (t) { + case "major": + return new NI(this.major + 1, 0, 0); + case "minor": + return new NI(this.major, this.minor + 1, 0); + case "patch": + return new NI(this.major, this.minor, this.patch + 1); + default: + return E.assertNever(t); + } + } + with(t) { + const { + major: n = this.major, + minor: i = this.minor, + patch: s = this.patch, + prerelease: o = this.prerelease, + build: c = this.build + } = t; + return new NI(n, i, s, o, c); + } + toString() { + let t = `${this.major}.${this.minor}.${this.patch}`; + return at(this.prerelease) && (t += `-${this.prerelease.join(".")}`), at(this.build) && (t += `+${this.build.join(".")}`), t; + } + }; + iQ.zero = new iQ(0, 0, 0, ["0"]); + var yd = iQ; + function nge(e) { + const t = D5e.exec(e); + if (!t) return; + const [, n, i = "0", s = "0", o = "", c = ""] = t; + if (!(o && !w5e.test(o)) && !(c && !N5e.test(c))) + return { + major: parseInt(n, 10), + minor: parseInt(i, 10), + patch: parseInt(s, 10), + prerelease: o, + build: c + }; + } + function I5e(e, t) { + if (e === t) return 0; + if (e.length === 0) return t.length === 0 ? 0 : 1; + if (t.length === 0) return -1; + const n = Math.min(e.length, t.length); + for (let i = 0; i < n; i++) { + const s = e[i], o = t[i]; + if (s === o) continue; + const c = rge.test(s), _ = rge.test(o); + if (c || _) { + if (c !== _) return c ? -1 : 1; + const u = uo(+s, +o); + if (u) return u; + } else { + const u = cu(s, o); + if (u) return u; + } + } + return uo(e.length, t.length); + } + var JI = class c5e { + constructor(t) { + this._alternatives = t ? E.checkDefined(ige(t), "Invalid range spec.") : He; + } + static tryParse(t) { + const n = ige(t); + if (n) { + const i = new c5e(""); + return i._alternatives = n, i; + } + } + /** + * Tests whether a version matches the range. This is equivalent to `satisfies(version, range, { includePrerelease: true })`. + * in `node-semver`. + */ + test(t) { + return typeof t == "string" && (t = new yd(t)), J5e(t, this._alternatives); + } + toString() { + return U5e(this._alternatives); + } + }, F5e = /\|\|/, O5e = /\s+/, L5e = /^([x*0]|[1-9]\d*)(?:\.([x*0]|[1-9]\d*)(?:\.([x*0]|[1-9]\d*)(?:-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i, M5e = /^\s*([a-z0-9-+.*]+)\s+-\s+([a-z0-9-+.*]+)\s*$/i, R5e = /^([~^<>=]|<=|>=)?\s*([a-z0-9-+.*]+)$/i; + function ige(e) { + const t = []; + for (let n of e.trim().split(F5e)) { + if (!n) continue; + const i = []; + n = n.trim(); + const s = M5e.exec(n); + if (s) { + if (!j5e(s[1], s[2], i)) return; + } else + for (const o of n.split(O5e)) { + const c = R5e.exec(o.trim()); + if (!c || !B5e(c[1], c[2], i)) return; + } + t.push(i); + } + return t; + } + function sQ(e) { + const t = L5e.exec(e); + if (!t) return; + const [, n, i = "*", s = "*", o, c] = t; + return { version: new yd( + Pp(n) ? 0 : parseInt(n, 10), + Pp(n) || Pp(i) ? 0 : parseInt(i, 10), + Pp(n) || Pp(i) || Pp(s) ? 0 : parseInt(s, 10), + o, + c + ), major: n, minor: i, patch: s }; + } + function j5e(e, t, n) { + const i = sQ(e); + if (!i) return !1; + const s = sQ(t); + return s ? (Pp(i.major) || n.push($m(">=", i.version)), Pp(s.major) || n.push( + Pp(s.minor) ? $m("<", s.version.increment("major")) : Pp(s.patch) ? $m("<", s.version.increment("minor")) : $m("<=", s.version) + ), !0) : !1; + } + function B5e(e, t, n) { + const i = sQ(t); + if (!i) return !1; + const { version: s, major: o, minor: c, patch: _ } = i; + if (Pp(o)) + (e === "<" || e === ">") && n.push($m("<", yd.zero)); + else switch (e) { + case "~": + n.push($m(">=", s)), n.push($m( + "<", + s.increment( + Pp(c) ? "major" : "minor" + ) + )); + break; + case "^": + n.push($m(">=", s)), n.push($m( + "<", + s.increment( + s.major > 0 || Pp(c) ? "major" : s.minor > 0 || Pp(_) ? "minor" : "patch" + ) + )); + break; + case "<": + case ">=": + n.push( + Pp(c) || Pp(_) ? $m(e, s.with({ prerelease: "0" })) : $m(e, s) + ); + break; + case "<=": + case ">": + n.push( + Pp(c) ? $m(e === "<=" ? "<" : ">=", s.increment("major").with({ prerelease: "0" })) : Pp(_) ? $m(e === "<=" ? "<" : ">=", s.increment("minor").with({ prerelease: "0" })) : $m(e, s) + ); + break; + case "=": + case void 0: + Pp(c) || Pp(_) ? (n.push($m(">=", s.with({ prerelease: "0" }))), n.push($m("<", s.increment(Pp(c) ? "major" : "minor").with({ prerelease: "0" })))) : n.push($m("=", s)); + break; + default: + return !1; + } + return !0; + } + function Pp(e) { + return e === "*" || e === "x" || e === "X"; + } + function $m(e, t) { + return { operator: e, operand: t }; + } + function J5e(e, t) { + if (t.length === 0) return !0; + for (const n of t) + if (z5e(e, n)) return !0; + return !1; + } + function z5e(e, t) { + for (const n of t) + if (!W5e(e, n.operator, n.operand)) return !1; + return !0; + } + function W5e(e, t, n) { + const i = e.compareTo(n); + switch (t) { + case "<": + return i < 0; + case "<=": + return i <= 0; + case ">": + return i > 0; + case ">=": + return i >= 0; + case "=": + return i === 0; + default: + return E.assertNever(t); + } + } + function U5e(e) { + return gr(e, V5e).join(" || ") || "*"; + } + function V5e(e) { + return gr(e, q5e).join(" "); + } + function q5e(e) { + return `${e.operator}${e.operand}`; + } + function H5e() { + if (MR()) + try { + const { performance: e } = zE; + if (e) + return { + shouldWriteNativeEvents: !1, + performance: e + }; + } catch { + } + if (typeof performance == "object") + return { + shouldWriteNativeEvents: !0, + performance + }; + } + function G5e() { + const e = H5e(); + if (!e) return; + const { shouldWriteNativeEvents: t, performance: n } = e, i = { + shouldWriteNativeEvents: t, + performance: void 0, + performanceTime: void 0 + }; + return typeof n.timeOrigin == "number" && typeof n.now == "function" && (i.performanceTime = n), i.performanceTime && typeof n.mark == "function" && typeof n.measure == "function" && typeof n.clearMarks == "function" && typeof n.clearMeasures == "function" && (i.performance = n), i; + } + var aQ = G5e(), sge = aQ?.performanceTime; + function oQ() { + return aQ; + } + var ao = sge ? () => sge.now() : Date.now, cQ = {}; + Ec(cQ, { + clearMarks: () => _ge, + clearMeasures: () => uge, + createTimer: () => RR, + createTimerIf: () => age, + disable: () => _Q, + enable: () => BR, + forEachMark: () => lge, + forEachMeasure: () => jR, + getCount: () => cge, + getDuration: () => e4, + isEnabled: () => uQ, + mark: () => Qo, + measure: () => Yf, + nullTimer: () => lQ + }); + var QE, tS; + function age(e, t, n, i) { + return e ? RR(t, n, i) : lQ; + } + function RR(e, t, n) { + let i = 0; + return { + enter: s, + exit: o + }; + function s() { + ++i === 1 && Qo(t); + } + function o() { + --i === 0 ? (Qo(n), Yf(e, t, n)) : i < 0 && E.fail("enter/exit count does not match."); + } + } + var lQ = { enter: Ja, exit: Ja }, YE = !1, oge = ao(), ZE = /* @__PURE__ */ new Map(), yP = /* @__PURE__ */ new Map(), KE = /* @__PURE__ */ new Map(); + function Qo(e) { + if (YE) { + const t = yP.get(e) ?? 0; + yP.set(e, t + 1), ZE.set(e, ao()), tS?.mark(e), typeof onProfilerEvent == "function" && onProfilerEvent(e); + } + } + function Yf(e, t, n) { + if (YE) { + const i = (n !== void 0 ? ZE.get(n) : void 0) ?? ao(), s = (t !== void 0 ? ZE.get(t) : void 0) ?? oge, o = KE.get(e) || 0; + KE.set(e, o + (i - s)), tS?.measure(e, t, n); + } + } + function cge(e) { + return yP.get(e) || 0; + } + function e4(e) { + return KE.get(e) || 0; + } + function jR(e) { + KE.forEach((t, n) => e(n, t)); + } + function lge(e) { + ZE.forEach((t, n) => e(n)); + } + function uge(e) { + e !== void 0 ? KE.delete(e) : KE.clear(), tS?.clearMeasures(e); + } + function _ge(e) { + e !== void 0 ? (yP.delete(e), ZE.delete(e)) : (yP.clear(), ZE.clear()), tS?.clearMarks(e); + } + function uQ() { + return YE; + } + function BR(e = nl) { + var t; + return YE || (YE = !0, QE || (QE = oQ()), QE?.performance && (oge = QE.performance.timeOrigin, (QE.shouldWriteNativeEvents || (t = e?.cpuProfilingEnabled) != null && t.call(e) || e?.debugMode) && (tS = QE.performance))), !0; + } + function _Q() { + YE && (ZE.clear(), yP.clear(), KE.clear(), tS = void 0, YE = !1); + } + var nn, vP; + ((e) => { + let t, n = 0, i = 0, s; + const o = []; + let c; + const _ = []; + function u(V, $, U) { + if (E.assert(!nn, "Tracing already started"), t === void 0) + try { + t = zE; + } catch (te) { + throw new Error(`tracing requires having fs +(original error: ${te.message || te})`); + } + s = V, o.length = 0, c === void 0 && (c = Ln($, "legend.json")), t.existsSync($) || t.mkdirSync($, { recursive: !0 }); + const _e = s === "build" ? `.${process.pid}-${++n}` : s === "server" ? `.${process.pid}` : "", Z = Ln($, `trace${_e}.json`), J = Ln($, `types${_e}.json`); + _.push({ + configFilePath: U, + tracePath: Z, + typesPath: J + }), i = t.openSync(Z, "w"), nn = e; + const re = { cat: "__metadata", ph: "M", ts: 1e3 * ao(), pid: 1, tid: 1 }; + t.writeSync( + i, + `[ +` + [{ name: "process_name", args: { name: "tsc" }, ...re }, { name: "thread_name", args: { name: "Main" }, ...re }, { name: "TracingStartedInBrowser", ...re, cat: "disabled-by-default-devtools.timeline" }].map((te) => JSON.stringify(te)).join(`, +`) + ); + } + e.startTracing = u; + function m() { + E.assert(nn, "Tracing is not in progress"), E.assert(!!o.length == (s !== "server")), t.writeSync(i, ` +] +`), t.closeSync(i), nn = void 0, o.length ? R(o) : _[_.length - 1].typesPath = void 0; + } + e.stopTracing = m; + function g(V) { + s !== "server" && o.push(V); + } + e.recordType = g, ((V) => { + V.Parse = "parse", V.Program = "program", V.Bind = "bind", V.Check = "check", V.CheckTypes = "checkTypes", V.Emit = "emit", V.Session = "session"; + })(e.Phase || (e.Phase = {})); + function h(V, $, U) { + O("I", V, $, U, '"s":"g"'); + } + e.instant = h; + const S = []; + function T(V, $, U, _e = !1) { + _e && O("B", V, $, U), S.push({ phase: V, name: $, args: U, time: 1e3 * ao(), separateBeginAndEnd: _e }); + } + e.push = T; + function C(V) { + E.assert(S.length > 0), A(S.length - 1, 1e3 * ao(), V), S.length--; + } + e.pop = C; + function D() { + const V = 1e3 * ao(); + for (let $ = S.length - 1; $ >= 0; $--) + A($, V); + S.length = 0; + } + e.popAll = D; + const w = 1e3 * 10; + function A(V, $, U) { + const { phase: _e, name: Z, args: J, time: re, separateBeginAndEnd: te } = S[V]; + te ? (E.assert(!U, "`results` are not supported for events with `separateBeginAndEnd`"), O( + "E", + _e, + Z, + J, + /*extras*/ + void 0, + $ + )) : w - re % w <= $ - re && O("X", _e, Z, { ...J, results: U }, `"dur":${$ - re}`, re); + } + function O(V, $, U, _e, Z, J = 1e3 * ao()) { + s === "server" && $ === "checkTypes" || (Qo("beginTracing"), t.writeSync(i, `, +{"pid":1,"tid":1,"ph":"${V}","cat":"${$}","ts":${J},"name":"${U}"`), Z && t.writeSync(i, `,${Z}`), _e && t.writeSync(i, `,"args":${JSON.stringify(_e)}`), t.writeSync(i, "}"), Qo("endTracing"), Yf("Tracing", "beginTracing", "endTracing")); + } + function F(V) { + const $ = Cr(V); + return $ ? { + path: $.path, + start: U(js($, V.pos)), + end: U(js($, V.end)) + } : void 0; + function U(_e) { + return { + line: _e.line + 1, + character: _e.character + 1 + }; + } + } + function R(V) { + var $, U, _e, Z, J, re, te, ie, le, Te, q, me, Ce, Ee, oe, ke, ue, it, Oe; + Qo("beginDumpTypes"); + const xe = _[_.length - 1].typesPath, he = t.openSync(xe, "w"), ne = /* @__PURE__ */ new Map(); + t.writeSync(he, "["); + const Ae = V.length; + for (let De = 0; De < Ae; De++) { + const we = V[De], Ue = we.objectFlags, bt = we.aliasSymbol ?? we.symbol; + let Lt; + if (Ue & 16 | we.flags & 2944) + try { + Lt = ($ = we.checker) == null ? void 0 : $.typeToString(we); + } catch { + Lt = void 0; + } + let er = {}; + if (we.flags & 8388608) { + const pi = we; + er = { + indexedAccessObjectType: (U = pi.objectType) == null ? void 0 : U.id, + indexedAccessIndexType: (_e = pi.indexType) == null ? void 0 : _e.id + }; + } + let Nr = {}; + if (Ue & 4) { + const pi = we; + Nr = { + instantiatedType: (Z = pi.target) == null ? void 0 : Z.id, + typeArguments: (J = pi.resolvedTypeArguments) == null ? void 0 : J.map((Xn) => Xn.id), + referenceLocation: F(pi.node) + }; + } + let Dt = {}; + if (we.flags & 16777216) { + const pi = we; + Dt = { + conditionalCheckType: (re = pi.checkType) == null ? void 0 : re.id, + conditionalExtendsType: (te = pi.extendsType) == null ? void 0 : te.id, + conditionalTrueType: ((ie = pi.resolvedTrueType) == null ? void 0 : ie.id) ?? -1, + conditionalFalseType: ((le = pi.resolvedFalseType) == null ? void 0 : le.id) ?? -1 + }; + } + let Qt = {}; + if (we.flags & 33554432) { + const pi = we; + Qt = { + substitutionBaseType: (Te = pi.baseType) == null ? void 0 : Te.id, + constraintType: (q = pi.constraint) == null ? void 0 : q.id + }; + } + let Wr = {}; + if (Ue & 1024) { + const pi = we; + Wr = { + reverseMappedSourceType: (me = pi.source) == null ? void 0 : me.id, + reverseMappedMappedType: (Ce = pi.mappedType) == null ? void 0 : Ce.id, + reverseMappedConstraintType: (Ee = pi.constraintType) == null ? void 0 : Ee.id + }; + } + let yr = {}; + if (Ue & 256) { + const pi = we; + yr = { + evolvingArrayElementType: pi.elementType.id, + evolvingArrayFinalType: (oe = pi.finalArrayType) == null ? void 0 : oe.id + }; + } + let qn; + const Bt = we.checker.getRecursionIdentity(we); + Bt && (qn = ne.get(Bt), qn || (qn = ne.size, ne.set(Bt, qn))); + const bi = { + id: we.id, + intrinsicName: we.intrinsicName, + symbolName: bt?.escapedName && Pi(bt.escapedName), + recursionId: qn, + isTuple: Ue & 8 ? !0 : void 0, + unionTypes: we.flags & 1048576 ? (ke = we.types) == null ? void 0 : ke.map((pi) => pi.id) : void 0, + intersectionTypes: we.flags & 2097152 ? we.types.map((pi) => pi.id) : void 0, + aliasTypeArguments: (ue = we.aliasTypeArguments) == null ? void 0 : ue.map((pi) => pi.id), + keyofType: we.flags & 4194304 ? (it = we.type) == null ? void 0 : it.id : void 0, + ...er, + ...Nr, + ...Dt, + ...Qt, + ...Wr, + ...yr, + destructuringPattern: F(we.pattern), + firstDeclaration: F((Oe = bt?.declarations) == null ? void 0 : Oe[0]), + flags: E.formatTypeFlags(we.flags).split("|"), + display: Lt + }; + t.writeSync(he, JSON.stringify(bi)), De < Ae - 1 && t.writeSync(he, `, +`); + } + t.writeSync(he, `] +`), t.closeSync(he), Qo("endDumpTypes"), Yf("Dump types", "beginDumpTypes", "endDumpTypes"); + } + function W() { + c && t.writeFileSync(c, JSON.stringify(_)); + } + e.dumpLegend = W; + })(vP || (vP = {})); + var fQ = vP.startTracing, pQ = vP.dumpLegend, JR = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.EndOfFileToken = 1] = "EndOfFileToken", e[e.SingleLineCommentTrivia = 2] = "SingleLineCommentTrivia", e[e.MultiLineCommentTrivia = 3] = "MultiLineCommentTrivia", e[e.NewLineTrivia = 4] = "NewLineTrivia", e[e.WhitespaceTrivia = 5] = "WhitespaceTrivia", e[e.ShebangTrivia = 6] = "ShebangTrivia", e[e.ConflictMarkerTrivia = 7] = "ConflictMarkerTrivia", e[e.NonTextFileMarkerTrivia = 8] = "NonTextFileMarkerTrivia", e[e.NumericLiteral = 9] = "NumericLiteral", e[e.BigIntLiteral = 10] = "BigIntLiteral", e[e.StringLiteral = 11] = "StringLiteral", e[e.JsxText = 12] = "JsxText", e[e.JsxTextAllWhiteSpaces = 13] = "JsxTextAllWhiteSpaces", e[e.RegularExpressionLiteral = 14] = "RegularExpressionLiteral", e[e.NoSubstitutionTemplateLiteral = 15] = "NoSubstitutionTemplateLiteral", e[e.TemplateHead = 16] = "TemplateHead", e[e.TemplateMiddle = 17] = "TemplateMiddle", e[e.TemplateTail = 18] = "TemplateTail", e[e.OpenBraceToken = 19] = "OpenBraceToken", e[e.CloseBraceToken = 20] = "CloseBraceToken", e[e.OpenParenToken = 21] = "OpenParenToken", e[e.CloseParenToken = 22] = "CloseParenToken", e[e.OpenBracketToken = 23] = "OpenBracketToken", e[e.CloseBracketToken = 24] = "CloseBracketToken", e[e.DotToken = 25] = "DotToken", e[e.DotDotDotToken = 26] = "DotDotDotToken", e[e.SemicolonToken = 27] = "SemicolonToken", e[e.CommaToken = 28] = "CommaToken", e[e.QuestionDotToken = 29] = "QuestionDotToken", e[e.LessThanToken = 30] = "LessThanToken", e[e.LessThanSlashToken = 31] = "LessThanSlashToken", e[e.GreaterThanToken = 32] = "GreaterThanToken", e[e.LessThanEqualsToken = 33] = "LessThanEqualsToken", e[e.GreaterThanEqualsToken = 34] = "GreaterThanEqualsToken", e[e.EqualsEqualsToken = 35] = "EqualsEqualsToken", e[e.ExclamationEqualsToken = 36] = "ExclamationEqualsToken", e[e.EqualsEqualsEqualsToken = 37] = "EqualsEqualsEqualsToken", e[e.ExclamationEqualsEqualsToken = 38] = "ExclamationEqualsEqualsToken", e[e.EqualsGreaterThanToken = 39] = "EqualsGreaterThanToken", e[e.PlusToken = 40] = "PlusToken", e[e.MinusToken = 41] = "MinusToken", e[e.AsteriskToken = 42] = "AsteriskToken", e[e.AsteriskAsteriskToken = 43] = "AsteriskAsteriskToken", e[e.SlashToken = 44] = "SlashToken", e[e.PercentToken = 45] = "PercentToken", e[e.PlusPlusToken = 46] = "PlusPlusToken", e[e.MinusMinusToken = 47] = "MinusMinusToken", e[e.LessThanLessThanToken = 48] = "LessThanLessThanToken", e[e.GreaterThanGreaterThanToken = 49] = "GreaterThanGreaterThanToken", e[e.GreaterThanGreaterThanGreaterThanToken = 50] = "GreaterThanGreaterThanGreaterThanToken", e[e.AmpersandToken = 51] = "AmpersandToken", e[e.BarToken = 52] = "BarToken", e[e.CaretToken = 53] = "CaretToken", e[e.ExclamationToken = 54] = "ExclamationToken", e[e.TildeToken = 55] = "TildeToken", e[e.AmpersandAmpersandToken = 56] = "AmpersandAmpersandToken", e[e.BarBarToken = 57] = "BarBarToken", e[e.QuestionToken = 58] = "QuestionToken", e[e.ColonToken = 59] = "ColonToken", e[e.AtToken = 60] = "AtToken", e[e.QuestionQuestionToken = 61] = "QuestionQuestionToken", e[e.BacktickToken = 62] = "BacktickToken", e[e.HashToken = 63] = "HashToken", e[e.EqualsToken = 64] = "EqualsToken", e[e.PlusEqualsToken = 65] = "PlusEqualsToken", e[e.MinusEqualsToken = 66] = "MinusEqualsToken", e[e.AsteriskEqualsToken = 67] = "AsteriskEqualsToken", e[e.AsteriskAsteriskEqualsToken = 68] = "AsteriskAsteriskEqualsToken", e[e.SlashEqualsToken = 69] = "SlashEqualsToken", e[e.PercentEqualsToken = 70] = "PercentEqualsToken", e[e.LessThanLessThanEqualsToken = 71] = "LessThanLessThanEqualsToken", e[e.GreaterThanGreaterThanEqualsToken = 72] = "GreaterThanGreaterThanEqualsToken", e[e.GreaterThanGreaterThanGreaterThanEqualsToken = 73] = "GreaterThanGreaterThanGreaterThanEqualsToken", e[e.AmpersandEqualsToken = 74] = "AmpersandEqualsToken", e[e.BarEqualsToken = 75] = "BarEqualsToken", e[e.BarBarEqualsToken = 76] = "BarBarEqualsToken", e[e.AmpersandAmpersandEqualsToken = 77] = "AmpersandAmpersandEqualsToken", e[e.QuestionQuestionEqualsToken = 78] = "QuestionQuestionEqualsToken", e[e.CaretEqualsToken = 79] = "CaretEqualsToken", e[e.Identifier = 80] = "Identifier", e[e.PrivateIdentifier = 81] = "PrivateIdentifier", e[e.JSDocCommentTextToken = 82] = "JSDocCommentTextToken", e[e.BreakKeyword = 83] = "BreakKeyword", e[e.CaseKeyword = 84] = "CaseKeyword", e[e.CatchKeyword = 85] = "CatchKeyword", e[e.ClassKeyword = 86] = "ClassKeyword", e[e.ConstKeyword = 87] = "ConstKeyword", e[e.ContinueKeyword = 88] = "ContinueKeyword", e[e.DebuggerKeyword = 89] = "DebuggerKeyword", e[e.DefaultKeyword = 90] = "DefaultKeyword", e[e.DeleteKeyword = 91] = "DeleteKeyword", e[e.DoKeyword = 92] = "DoKeyword", e[e.ElseKeyword = 93] = "ElseKeyword", e[e.EnumKeyword = 94] = "EnumKeyword", e[e.ExportKeyword = 95] = "ExportKeyword", e[e.ExtendsKeyword = 96] = "ExtendsKeyword", e[e.FalseKeyword = 97] = "FalseKeyword", e[e.FinallyKeyword = 98] = "FinallyKeyword", e[e.ForKeyword = 99] = "ForKeyword", e[e.FunctionKeyword = 100] = "FunctionKeyword", e[e.IfKeyword = 101] = "IfKeyword", e[e.ImportKeyword = 102] = "ImportKeyword", e[e.InKeyword = 103] = "InKeyword", e[e.InstanceOfKeyword = 104] = "InstanceOfKeyword", e[e.NewKeyword = 105] = "NewKeyword", e[e.NullKeyword = 106] = "NullKeyword", e[e.ReturnKeyword = 107] = "ReturnKeyword", e[e.SuperKeyword = 108] = "SuperKeyword", e[e.SwitchKeyword = 109] = "SwitchKeyword", e[e.ThisKeyword = 110] = "ThisKeyword", e[e.ThrowKeyword = 111] = "ThrowKeyword", e[e.TrueKeyword = 112] = "TrueKeyword", e[e.TryKeyword = 113] = "TryKeyword", e[e.TypeOfKeyword = 114] = "TypeOfKeyword", e[e.VarKeyword = 115] = "VarKeyword", e[e.VoidKeyword = 116] = "VoidKeyword", e[e.WhileKeyword = 117] = "WhileKeyword", e[e.WithKeyword = 118] = "WithKeyword", e[e.ImplementsKeyword = 119] = "ImplementsKeyword", e[e.InterfaceKeyword = 120] = "InterfaceKeyword", e[e.LetKeyword = 121] = "LetKeyword", e[e.PackageKeyword = 122] = "PackageKeyword", e[e.PrivateKeyword = 123] = "PrivateKeyword", e[e.ProtectedKeyword = 124] = "ProtectedKeyword", e[e.PublicKeyword = 125] = "PublicKeyword", e[e.StaticKeyword = 126] = "StaticKeyword", e[e.YieldKeyword = 127] = "YieldKeyword", e[e.AbstractKeyword = 128] = "AbstractKeyword", e[e.AccessorKeyword = 129] = "AccessorKeyword", e[e.AsKeyword = 130] = "AsKeyword", e[e.AssertsKeyword = 131] = "AssertsKeyword", e[e.AssertKeyword = 132] = "AssertKeyword", e[e.AnyKeyword = 133] = "AnyKeyword", e[e.AsyncKeyword = 134] = "AsyncKeyword", e[e.AwaitKeyword = 135] = "AwaitKeyword", e[e.BooleanKeyword = 136] = "BooleanKeyword", e[e.ConstructorKeyword = 137] = "ConstructorKeyword", e[e.DeclareKeyword = 138] = "DeclareKeyword", e[e.GetKeyword = 139] = "GetKeyword", e[e.InferKeyword = 140] = "InferKeyword", e[e.IntrinsicKeyword = 141] = "IntrinsicKeyword", e[e.IsKeyword = 142] = "IsKeyword", e[e.KeyOfKeyword = 143] = "KeyOfKeyword", e[e.ModuleKeyword = 144] = "ModuleKeyword", e[e.NamespaceKeyword = 145] = "NamespaceKeyword", e[e.NeverKeyword = 146] = "NeverKeyword", e[e.OutKeyword = 147] = "OutKeyword", e[e.ReadonlyKeyword = 148] = "ReadonlyKeyword", e[e.RequireKeyword = 149] = "RequireKeyword", e[e.NumberKeyword = 150] = "NumberKeyword", e[e.ObjectKeyword = 151] = "ObjectKeyword", e[e.SatisfiesKeyword = 152] = "SatisfiesKeyword", e[e.SetKeyword = 153] = "SetKeyword", e[e.StringKeyword = 154] = "StringKeyword", e[e.SymbolKeyword = 155] = "SymbolKeyword", e[e.TypeKeyword = 156] = "TypeKeyword", e[e.UndefinedKeyword = 157] = "UndefinedKeyword", e[e.UniqueKeyword = 158] = "UniqueKeyword", e[e.UnknownKeyword = 159] = "UnknownKeyword", e[e.UsingKeyword = 160] = "UsingKeyword", e[e.FromKeyword = 161] = "FromKeyword", e[e.GlobalKeyword = 162] = "GlobalKeyword", e[e.BigIntKeyword = 163] = "BigIntKeyword", e[e.OverrideKeyword = 164] = "OverrideKeyword", e[e.OfKeyword = 165] = "OfKeyword", e[e.QualifiedName = 166] = "QualifiedName", e[e.ComputedPropertyName = 167] = "ComputedPropertyName", e[e.TypeParameter = 168] = "TypeParameter", e[e.Parameter = 169] = "Parameter", e[e.Decorator = 170] = "Decorator", e[e.PropertySignature = 171] = "PropertySignature", e[e.PropertyDeclaration = 172] = "PropertyDeclaration", e[e.MethodSignature = 173] = "MethodSignature", e[e.MethodDeclaration = 174] = "MethodDeclaration", e[e.ClassStaticBlockDeclaration = 175] = "ClassStaticBlockDeclaration", e[e.Constructor = 176] = "Constructor", e[e.GetAccessor = 177] = "GetAccessor", e[e.SetAccessor = 178] = "SetAccessor", e[e.CallSignature = 179] = "CallSignature", e[e.ConstructSignature = 180] = "ConstructSignature", e[e.IndexSignature = 181] = "IndexSignature", e[e.TypePredicate = 182] = "TypePredicate", e[e.TypeReference = 183] = "TypeReference", e[e.FunctionType = 184] = "FunctionType", e[e.ConstructorType = 185] = "ConstructorType", e[e.TypeQuery = 186] = "TypeQuery", e[e.TypeLiteral = 187] = "TypeLiteral", e[e.ArrayType = 188] = "ArrayType", e[e.TupleType = 189] = "TupleType", e[e.OptionalType = 190] = "OptionalType", e[e.RestType = 191] = "RestType", e[e.UnionType = 192] = "UnionType", e[e.IntersectionType = 193] = "IntersectionType", e[e.ConditionalType = 194] = "ConditionalType", e[e.InferType = 195] = "InferType", e[e.ParenthesizedType = 196] = "ParenthesizedType", e[e.ThisType = 197] = "ThisType", e[e.TypeOperator = 198] = "TypeOperator", e[e.IndexedAccessType = 199] = "IndexedAccessType", e[e.MappedType = 200] = "MappedType", e[e.LiteralType = 201] = "LiteralType", e[e.NamedTupleMember = 202] = "NamedTupleMember", e[e.TemplateLiteralType = 203] = "TemplateLiteralType", e[e.TemplateLiteralTypeSpan = 204] = "TemplateLiteralTypeSpan", e[e.ImportType = 205] = "ImportType", e[e.ObjectBindingPattern = 206] = "ObjectBindingPattern", e[e.ArrayBindingPattern = 207] = "ArrayBindingPattern", e[e.BindingElement = 208] = "BindingElement", e[e.ArrayLiteralExpression = 209] = "ArrayLiteralExpression", e[e.ObjectLiteralExpression = 210] = "ObjectLiteralExpression", e[e.PropertyAccessExpression = 211] = "PropertyAccessExpression", e[e.ElementAccessExpression = 212] = "ElementAccessExpression", e[e.CallExpression = 213] = "CallExpression", e[e.NewExpression = 214] = "NewExpression", e[e.TaggedTemplateExpression = 215] = "TaggedTemplateExpression", e[e.TypeAssertionExpression = 216] = "TypeAssertionExpression", e[e.ParenthesizedExpression = 217] = "ParenthesizedExpression", e[e.FunctionExpression = 218] = "FunctionExpression", e[e.ArrowFunction = 219] = "ArrowFunction", e[e.DeleteExpression = 220] = "DeleteExpression", e[e.TypeOfExpression = 221] = "TypeOfExpression", e[e.VoidExpression = 222] = "VoidExpression", e[e.AwaitExpression = 223] = "AwaitExpression", e[e.PrefixUnaryExpression = 224] = "PrefixUnaryExpression", e[e.PostfixUnaryExpression = 225] = "PostfixUnaryExpression", e[e.BinaryExpression = 226] = "BinaryExpression", e[e.ConditionalExpression = 227] = "ConditionalExpression", e[e.TemplateExpression = 228] = "TemplateExpression", e[e.YieldExpression = 229] = "YieldExpression", e[e.SpreadElement = 230] = "SpreadElement", e[e.ClassExpression = 231] = "ClassExpression", e[e.OmittedExpression = 232] = "OmittedExpression", e[e.ExpressionWithTypeArguments = 233] = "ExpressionWithTypeArguments", e[e.AsExpression = 234] = "AsExpression", e[e.NonNullExpression = 235] = "NonNullExpression", e[e.MetaProperty = 236] = "MetaProperty", e[e.SyntheticExpression = 237] = "SyntheticExpression", e[e.SatisfiesExpression = 238] = "SatisfiesExpression", e[e.TemplateSpan = 239] = "TemplateSpan", e[e.SemicolonClassElement = 240] = "SemicolonClassElement", e[e.Block = 241] = "Block", e[e.EmptyStatement = 242] = "EmptyStatement", e[e.VariableStatement = 243] = "VariableStatement", e[e.ExpressionStatement = 244] = "ExpressionStatement", e[e.IfStatement = 245] = "IfStatement", e[e.DoStatement = 246] = "DoStatement", e[e.WhileStatement = 247] = "WhileStatement", e[e.ForStatement = 248] = "ForStatement", e[e.ForInStatement = 249] = "ForInStatement", e[e.ForOfStatement = 250] = "ForOfStatement", e[e.ContinueStatement = 251] = "ContinueStatement", e[e.BreakStatement = 252] = "BreakStatement", e[e.ReturnStatement = 253] = "ReturnStatement", e[e.WithStatement = 254] = "WithStatement", e[e.SwitchStatement = 255] = "SwitchStatement", e[e.LabeledStatement = 256] = "LabeledStatement", e[e.ThrowStatement = 257] = "ThrowStatement", e[e.TryStatement = 258] = "TryStatement", e[e.DebuggerStatement = 259] = "DebuggerStatement", e[e.VariableDeclaration = 260] = "VariableDeclaration", e[e.VariableDeclarationList = 261] = "VariableDeclarationList", e[e.FunctionDeclaration = 262] = "FunctionDeclaration", e[e.ClassDeclaration = 263] = "ClassDeclaration", e[e.InterfaceDeclaration = 264] = "InterfaceDeclaration", e[e.TypeAliasDeclaration = 265] = "TypeAliasDeclaration", e[e.EnumDeclaration = 266] = "EnumDeclaration", e[e.ModuleDeclaration = 267] = "ModuleDeclaration", e[e.ModuleBlock = 268] = "ModuleBlock", e[e.CaseBlock = 269] = "CaseBlock", e[e.NamespaceExportDeclaration = 270] = "NamespaceExportDeclaration", e[e.ImportEqualsDeclaration = 271] = "ImportEqualsDeclaration", e[e.ImportDeclaration = 272] = "ImportDeclaration", e[e.ImportClause = 273] = "ImportClause", e[e.NamespaceImport = 274] = "NamespaceImport", e[e.NamedImports = 275] = "NamedImports", e[e.ImportSpecifier = 276] = "ImportSpecifier", e[e.ExportAssignment = 277] = "ExportAssignment", e[e.ExportDeclaration = 278] = "ExportDeclaration", e[e.NamedExports = 279] = "NamedExports", e[e.NamespaceExport = 280] = "NamespaceExport", e[e.ExportSpecifier = 281] = "ExportSpecifier", e[e.MissingDeclaration = 282] = "MissingDeclaration", e[e.ExternalModuleReference = 283] = "ExternalModuleReference", e[e.JsxElement = 284] = "JsxElement", e[e.JsxSelfClosingElement = 285] = "JsxSelfClosingElement", e[e.JsxOpeningElement = 286] = "JsxOpeningElement", e[e.JsxClosingElement = 287] = "JsxClosingElement", e[e.JsxFragment = 288] = "JsxFragment", e[e.JsxOpeningFragment = 289] = "JsxOpeningFragment", e[e.JsxClosingFragment = 290] = "JsxClosingFragment", e[e.JsxAttribute = 291] = "JsxAttribute", e[e.JsxAttributes = 292] = "JsxAttributes", e[e.JsxSpreadAttribute = 293] = "JsxSpreadAttribute", e[e.JsxExpression = 294] = "JsxExpression", e[e.JsxNamespacedName = 295] = "JsxNamespacedName", e[e.CaseClause = 296] = "CaseClause", e[e.DefaultClause = 297] = "DefaultClause", e[e.HeritageClause = 298] = "HeritageClause", e[e.CatchClause = 299] = "CatchClause", e[e.ImportAttributes = 300] = "ImportAttributes", e[e.ImportAttribute = 301] = "ImportAttribute", e[ + e.AssertClause = 300 + /* ImportAttributes */ + ] = "AssertClause", e[ + e.AssertEntry = 301 + /* ImportAttribute */ + ] = "AssertEntry", e[e.ImportTypeAssertionContainer = 302] = "ImportTypeAssertionContainer", e[e.PropertyAssignment = 303] = "PropertyAssignment", e[e.ShorthandPropertyAssignment = 304] = "ShorthandPropertyAssignment", e[e.SpreadAssignment = 305] = "SpreadAssignment", e[e.EnumMember = 306] = "EnumMember", e[e.SourceFile = 307] = "SourceFile", e[e.Bundle = 308] = "Bundle", e[e.JSDocTypeExpression = 309] = "JSDocTypeExpression", e[e.JSDocNameReference = 310] = "JSDocNameReference", e[e.JSDocMemberName = 311] = "JSDocMemberName", e[e.JSDocAllType = 312] = "JSDocAllType", e[e.JSDocUnknownType = 313] = "JSDocUnknownType", e[e.JSDocNullableType = 314] = "JSDocNullableType", e[e.JSDocNonNullableType = 315] = "JSDocNonNullableType", e[e.JSDocOptionalType = 316] = "JSDocOptionalType", e[e.JSDocFunctionType = 317] = "JSDocFunctionType", e[e.JSDocVariadicType = 318] = "JSDocVariadicType", e[e.JSDocNamepathType = 319] = "JSDocNamepathType", e[e.JSDoc = 320] = "JSDoc", e[ + e.JSDocComment = 320 + /* JSDoc */ + ] = "JSDocComment", e[e.JSDocText = 321] = "JSDocText", e[e.JSDocTypeLiteral = 322] = "JSDocTypeLiteral", e[e.JSDocSignature = 323] = "JSDocSignature", e[e.JSDocLink = 324] = "JSDocLink", e[e.JSDocLinkCode = 325] = "JSDocLinkCode", e[e.JSDocLinkPlain = 326] = "JSDocLinkPlain", e[e.JSDocTag = 327] = "JSDocTag", e[e.JSDocAugmentsTag = 328] = "JSDocAugmentsTag", e[e.JSDocImplementsTag = 329] = "JSDocImplementsTag", e[e.JSDocAuthorTag = 330] = "JSDocAuthorTag", e[e.JSDocDeprecatedTag = 331] = "JSDocDeprecatedTag", e[e.JSDocClassTag = 332] = "JSDocClassTag", e[e.JSDocPublicTag = 333] = "JSDocPublicTag", e[e.JSDocPrivateTag = 334] = "JSDocPrivateTag", e[e.JSDocProtectedTag = 335] = "JSDocProtectedTag", e[e.JSDocReadonlyTag = 336] = "JSDocReadonlyTag", e[e.JSDocOverrideTag = 337] = "JSDocOverrideTag", e[e.JSDocCallbackTag = 338] = "JSDocCallbackTag", e[e.JSDocOverloadTag = 339] = "JSDocOverloadTag", e[e.JSDocEnumTag = 340] = "JSDocEnumTag", e[e.JSDocParameterTag = 341] = "JSDocParameterTag", e[e.JSDocReturnTag = 342] = "JSDocReturnTag", e[e.JSDocThisTag = 343] = "JSDocThisTag", e[e.JSDocTypeTag = 344] = "JSDocTypeTag", e[e.JSDocTemplateTag = 345] = "JSDocTemplateTag", e[e.JSDocTypedefTag = 346] = "JSDocTypedefTag", e[e.JSDocSeeTag = 347] = "JSDocSeeTag", e[e.JSDocPropertyTag = 348] = "JSDocPropertyTag", e[e.JSDocThrowsTag = 349] = "JSDocThrowsTag", e[e.JSDocSatisfiesTag = 350] = "JSDocSatisfiesTag", e[e.JSDocImportTag = 351] = "JSDocImportTag", e[e.SyntaxList = 352] = "SyntaxList", e[e.NotEmittedStatement = 353] = "NotEmittedStatement", e[e.NotEmittedTypeElement = 354] = "NotEmittedTypeElement", e[e.PartiallyEmittedExpression = 355] = "PartiallyEmittedExpression", e[e.CommaListExpression = 356] = "CommaListExpression", e[e.SyntheticReferenceExpression = 357] = "SyntheticReferenceExpression", e[e.Count = 358] = "Count", e[ + e.FirstAssignment = 64 + /* EqualsToken */ + ] = "FirstAssignment", e[ + e.LastAssignment = 79 + /* CaretEqualsToken */ + ] = "LastAssignment", e[ + e.FirstCompoundAssignment = 65 + /* PlusEqualsToken */ + ] = "FirstCompoundAssignment", e[ + e.LastCompoundAssignment = 79 + /* CaretEqualsToken */ + ] = "LastCompoundAssignment", e[ + e.FirstReservedWord = 83 + /* BreakKeyword */ + ] = "FirstReservedWord", e[ + e.LastReservedWord = 118 + /* WithKeyword */ + ] = "LastReservedWord", e[ + e.FirstKeyword = 83 + /* BreakKeyword */ + ] = "FirstKeyword", e[ + e.LastKeyword = 165 + /* OfKeyword */ + ] = "LastKeyword", e[ + e.FirstFutureReservedWord = 119 + /* ImplementsKeyword */ + ] = "FirstFutureReservedWord", e[ + e.LastFutureReservedWord = 127 + /* YieldKeyword */ + ] = "LastFutureReservedWord", e[ + e.FirstTypeNode = 182 + /* TypePredicate */ + ] = "FirstTypeNode", e[ + e.LastTypeNode = 205 + /* ImportType */ + ] = "LastTypeNode", e[ + e.FirstPunctuation = 19 + /* OpenBraceToken */ + ] = "FirstPunctuation", e[ + e.LastPunctuation = 79 + /* CaretEqualsToken */ + ] = "LastPunctuation", e[ + e.FirstToken = 0 + /* Unknown */ + ] = "FirstToken", e[ + e.LastToken = 165 + /* LastKeyword */ + ] = "LastToken", e[ + e.FirstTriviaToken = 2 + /* SingleLineCommentTrivia */ + ] = "FirstTriviaToken", e[ + e.LastTriviaToken = 7 + /* ConflictMarkerTrivia */ + ] = "LastTriviaToken", e[ + e.FirstLiteralToken = 9 + /* NumericLiteral */ + ] = "FirstLiteralToken", e[ + e.LastLiteralToken = 15 + /* NoSubstitutionTemplateLiteral */ + ] = "LastLiteralToken", e[ + e.FirstTemplateToken = 15 + /* NoSubstitutionTemplateLiteral */ + ] = "FirstTemplateToken", e[ + e.LastTemplateToken = 18 + /* TemplateTail */ + ] = "LastTemplateToken", e[ + e.FirstBinaryOperator = 30 + /* LessThanToken */ + ] = "FirstBinaryOperator", e[ + e.LastBinaryOperator = 79 + /* CaretEqualsToken */ + ] = "LastBinaryOperator", e[ + e.FirstStatement = 243 + /* VariableStatement */ + ] = "FirstStatement", e[ + e.LastStatement = 259 + /* DebuggerStatement */ + ] = "LastStatement", e[ + e.FirstNode = 166 + /* QualifiedName */ + ] = "FirstNode", e[ + e.FirstJSDocNode = 309 + /* JSDocTypeExpression */ + ] = "FirstJSDocNode", e[ + e.LastJSDocNode = 351 + /* JSDocImportTag */ + ] = "LastJSDocNode", e[ + e.FirstJSDocTagNode = 327 + /* JSDocTag */ + ] = "FirstJSDocTagNode", e[ + e.LastJSDocTagNode = 351 + /* JSDocImportTag */ + ] = "LastJSDocTagNode", e[ + e.FirstContextualKeyword = 128 + /* AbstractKeyword */ + ] = "FirstContextualKeyword", e[ + e.LastContextualKeyword = 165 + /* OfKeyword */ + ] = "LastContextualKeyword", e))(JR || {}), zR = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Let = 1] = "Let", e[e.Const = 2] = "Const", e[e.Using = 4] = "Using", e[e.AwaitUsing = 6] = "AwaitUsing", e[e.NestedNamespace = 8] = "NestedNamespace", e[e.Synthesized = 16] = "Synthesized", e[e.Namespace = 32] = "Namespace", e[e.OptionalChain = 64] = "OptionalChain", e[e.ExportContext = 128] = "ExportContext", e[e.ContainsThis = 256] = "ContainsThis", e[e.HasImplicitReturn = 512] = "HasImplicitReturn", e[e.HasExplicitReturn = 1024] = "HasExplicitReturn", e[e.GlobalAugmentation = 2048] = "GlobalAugmentation", e[e.HasAsyncFunctions = 4096] = "HasAsyncFunctions", e[e.DisallowInContext = 8192] = "DisallowInContext", e[e.YieldContext = 16384] = "YieldContext", e[e.DecoratorContext = 32768] = "DecoratorContext", e[e.AwaitContext = 65536] = "AwaitContext", e[e.DisallowConditionalTypesContext = 131072] = "DisallowConditionalTypesContext", e[e.ThisNodeHasError = 262144] = "ThisNodeHasError", e[e.JavaScriptFile = 524288] = "JavaScriptFile", e[e.ThisNodeOrAnySubNodesHasError = 1048576] = "ThisNodeOrAnySubNodesHasError", e[e.HasAggregatedChildData = 2097152] = "HasAggregatedChildData", e[e.PossiblyContainsDynamicImport = 4194304] = "PossiblyContainsDynamicImport", e[e.PossiblyContainsImportMeta = 8388608] = "PossiblyContainsImportMeta", e[e.JSDoc = 16777216] = "JSDoc", e[e.Ambient = 33554432] = "Ambient", e[e.InWithStatement = 67108864] = "InWithStatement", e[e.JsonFile = 134217728] = "JsonFile", e[e.TypeCached = 268435456] = "TypeCached", e[e.Deprecated = 536870912] = "Deprecated", e[e.BlockScoped = 7] = "BlockScoped", e[e.Constant = 6] = "Constant", e[e.ReachabilityCheckFlags = 1536] = "ReachabilityCheckFlags", e[e.ReachabilityAndEmitFlags = 5632] = "ReachabilityAndEmitFlags", e[e.ContextFlags = 101441536] = "ContextFlags", e[e.TypeExcludesFlags = 81920] = "TypeExcludesFlags", e[e.PermanentlySetIncrementalFlags = 12582912] = "PermanentlySetIncrementalFlags", e[ + e.IdentifierHasExtendedUnicodeEscape = 256 + /* ContainsThis */ + ] = "IdentifierHasExtendedUnicodeEscape", e[ + e.IdentifierIsInJSDocNamespace = 4096 + /* HasAsyncFunctions */ + ] = "IdentifierIsInJSDocNamespace", e))(zR || {}), WR = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Public = 1] = "Public", e[e.Private = 2] = "Private", e[e.Protected = 4] = "Protected", e[e.Readonly = 8] = "Readonly", e[e.Override = 16] = "Override", e[e.Export = 32] = "Export", e[e.Abstract = 64] = "Abstract", e[e.Ambient = 128] = "Ambient", e[e.Static = 256] = "Static", e[e.Accessor = 512] = "Accessor", e[e.Async = 1024] = "Async", e[e.Default = 2048] = "Default", e[e.Const = 4096] = "Const", e[e.In = 8192] = "In", e[e.Out = 16384] = "Out", e[e.Decorator = 32768] = "Decorator", e[e.Deprecated = 65536] = "Deprecated", e[e.JSDocPublic = 8388608] = "JSDocPublic", e[e.JSDocPrivate = 16777216] = "JSDocPrivate", e[e.JSDocProtected = 33554432] = "JSDocProtected", e[e.JSDocReadonly = 67108864] = "JSDocReadonly", e[e.JSDocOverride = 134217728] = "JSDocOverride", e[e.SyntacticOrJSDocModifiers = 31] = "SyntacticOrJSDocModifiers", e[e.SyntacticOnlyModifiers = 65504] = "SyntacticOnlyModifiers", e[e.SyntacticModifiers = 65535] = "SyntacticModifiers", e[e.JSDocCacheOnlyModifiers = 260046848] = "JSDocCacheOnlyModifiers", e[ + e.JSDocOnlyModifiers = 65536 + /* Deprecated */ + ] = "JSDocOnlyModifiers", e[e.NonCacheOnlyModifiers = 131071] = "NonCacheOnlyModifiers", e[e.HasComputedJSDocModifiers = 268435456] = "HasComputedJSDocModifiers", e[e.HasComputedFlags = 536870912] = "HasComputedFlags", e[e.AccessibilityModifier = 7] = "AccessibilityModifier", e[e.ParameterPropertyModifier = 31] = "ParameterPropertyModifier", e[e.NonPublicAccessibilityModifier = 6] = "NonPublicAccessibilityModifier", e[e.TypeScriptModifier = 28895] = "TypeScriptModifier", e[e.ExportDefault = 2080] = "ExportDefault", e[e.All = 131071] = "All", e[e.Modifier = 98303] = "Modifier", e))(WR || {}), dQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.IntrinsicNamedElement = 1] = "IntrinsicNamedElement", e[e.IntrinsicIndexedElement = 2] = "IntrinsicIndexedElement", e[e.IntrinsicElement = 3] = "IntrinsicElement", e))(dQ || {}), UR = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Succeeded = 1] = "Succeeded", e[e.Failed = 2] = "Failed", e[e.ReportsUnmeasurable = 8] = "ReportsUnmeasurable", e[e.ReportsUnreliable = 16] = "ReportsUnreliable", e[e.ReportsMask = 24] = "ReportsMask", e[e.ComplexityOverflow = 32] = "ComplexityOverflow", e[e.StackDepthOverflow = 64] = "StackDepthOverflow", e[e.Overflow = 96] = "Overflow", e))(UR || {}), mQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Always = 1] = "Always", e[e.Never = 2] = "Never", e[e.Sometimes = 3] = "Sometimes", e))(mQ || {}), VR = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Auto = 1] = "Auto", e[e.Loop = 2] = "Loop", e[e.Unique = 3] = "Unique", e[e.Node = 4] = "Node", e[e.KindMask = 7] = "KindMask", e[e.ReservedInNestedScopes = 8] = "ReservedInNestedScopes", e[e.Optimistic = 16] = "Optimistic", e[e.FileLevel = 32] = "FileLevel", e[e.AllowNameSubstitution = 64] = "AllowNameSubstitution", e))(VR || {}), gQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.HasIndices = 1] = "HasIndices", e[e.Global = 2] = "Global", e[e.IgnoreCase = 4] = "IgnoreCase", e[e.Multiline = 8] = "Multiline", e[e.DotAll = 16] = "DotAll", e[e.Unicode = 32] = "Unicode", e[e.UnicodeSets = 64] = "UnicodeSets", e[e.Sticky = 128] = "Sticky", e[e.AnyUnicodeMode = 96] = "AnyUnicodeMode", e[e.Modifiers = 28] = "Modifiers", e))(gQ || {}), hQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.PrecedingLineBreak = 1] = "PrecedingLineBreak", e[e.PrecedingJSDocComment = 2] = "PrecedingJSDocComment", e[e.Unterminated = 4] = "Unterminated", e[e.ExtendedUnicodeEscape = 8] = "ExtendedUnicodeEscape", e[e.Scientific = 16] = "Scientific", e[e.Octal = 32] = "Octal", e[e.HexSpecifier = 64] = "HexSpecifier", e[e.BinarySpecifier = 128] = "BinarySpecifier", e[e.OctalSpecifier = 256] = "OctalSpecifier", e[e.ContainsSeparator = 512] = "ContainsSeparator", e[e.UnicodeEscape = 1024] = "UnicodeEscape", e[e.ContainsInvalidEscape = 2048] = "ContainsInvalidEscape", e[e.HexEscape = 4096] = "HexEscape", e[e.ContainsLeadingZero = 8192] = "ContainsLeadingZero", e[e.ContainsInvalidSeparator = 16384] = "ContainsInvalidSeparator", e[e.PrecedingJSDocLeadingAsterisks = 32768] = "PrecedingJSDocLeadingAsterisks", e[e.BinaryOrOctalSpecifier = 384] = "BinaryOrOctalSpecifier", e[e.WithSpecifier = 448] = "WithSpecifier", e[e.StringLiteralFlags = 7176] = "StringLiteralFlags", e[e.NumericLiteralFlags = 25584] = "NumericLiteralFlags", e[e.TemplateLiteralLikeFlags = 7176] = "TemplateLiteralLikeFlags", e[e.IsInvalid = 26656] = "IsInvalid", e))(hQ || {}), zI = /* @__PURE__ */ ((e) => (e[e.Unreachable = 1] = "Unreachable", e[e.Start = 2] = "Start", e[e.BranchLabel = 4] = "BranchLabel", e[e.LoopLabel = 8] = "LoopLabel", e[e.Assignment = 16] = "Assignment", e[e.TrueCondition = 32] = "TrueCondition", e[e.FalseCondition = 64] = "FalseCondition", e[e.SwitchClause = 128] = "SwitchClause", e[e.ArrayMutation = 256] = "ArrayMutation", e[e.Call = 512] = "Call", e[e.ReduceLabel = 1024] = "ReduceLabel", e[e.Referenced = 2048] = "Referenced", e[e.Shared = 4096] = "Shared", e[e.Label = 12] = "Label", e[e.Condition = 96] = "Condition", e))(zI || {}), yQ = /* @__PURE__ */ ((e) => (e[e.ExpectError = 0] = "ExpectError", e[e.Ignore = 1] = "Ignore", e))(yQ || {}), t4 = class { + }, qR = /* @__PURE__ */ ((e) => (e[e.RootFile = 0] = "RootFile", e[e.SourceFromProjectReference = 1] = "SourceFromProjectReference", e[e.OutputFromProjectReference = 2] = "OutputFromProjectReference", e[e.Import = 3] = "Import", e[e.ReferenceFile = 4] = "ReferenceFile", e[e.TypeReferenceDirective = 5] = "TypeReferenceDirective", e[e.LibFile = 6] = "LibFile", e[e.LibReferenceDirective = 7] = "LibReferenceDirective", e[e.AutomaticTypeDirectiveFile = 8] = "AutomaticTypeDirectiveFile", e))(qR || {}), vQ = /* @__PURE__ */ ((e) => (e[e.FilePreprocessingLibReferenceDiagnostic = 0] = "FilePreprocessingLibReferenceDiagnostic", e[e.FilePreprocessingFileExplainingDiagnostic = 1] = "FilePreprocessingFileExplainingDiagnostic", e[e.ResolutionDiagnostics = 2] = "ResolutionDiagnostics", e))(vQ || {}), bQ = /* @__PURE__ */ ((e) => (e[e.Js = 0] = "Js", e[e.Dts = 1] = "Dts", e[e.BuilderSignature = 2] = "BuilderSignature", e))(bQ || {}), HR = /* @__PURE__ */ ((e) => (e[e.Not = 0] = "Not", e[e.SafeModules = 1] = "SafeModules", e[e.Completely = 2] = "Completely", e))(HR || {}), SQ = /* @__PURE__ */ ((e) => (e[e.Success = 0] = "Success", e[e.DiagnosticsPresent_OutputsSkipped = 1] = "DiagnosticsPresent_OutputsSkipped", e[e.DiagnosticsPresent_OutputsGenerated = 2] = "DiagnosticsPresent_OutputsGenerated", e[e.InvalidProject_OutputsSkipped = 3] = "InvalidProject_OutputsSkipped", e[e.ProjectReferenceCycle_OutputsSkipped = 4] = "ProjectReferenceCycle_OutputsSkipped", e))(SQ || {}), TQ = /* @__PURE__ */ ((e) => (e[e.Ok = 0] = "Ok", e[e.NeedsOverride = 1] = "NeedsOverride", e[e.HasInvalidOverride = 2] = "HasInvalidOverride", e))(TQ || {}), xQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Literal = 1] = "Literal", e[e.Subtype = 2] = "Subtype", e))(xQ || {}), kQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.NoSupertypeReduction = 1] = "NoSupertypeReduction", e[e.NoConstraintReduction = 2] = "NoConstraintReduction", e))(kQ || {}), CQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Signature = 1] = "Signature", e[e.NoConstraints = 2] = "NoConstraints", e[e.Completions = 4] = "Completions", e[e.SkipBindingPatterns = 8] = "SkipBindingPatterns", e))(CQ || {}), EQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.NoTruncation = 1] = "NoTruncation", e[e.WriteArrayAsGenericType = 2] = "WriteArrayAsGenericType", e[e.GenerateNamesForShadowedTypeParams = 4] = "GenerateNamesForShadowedTypeParams", e[e.UseStructuralFallback = 8] = "UseStructuralFallback", e[e.ForbidIndexedAccessSymbolReferences = 16] = "ForbidIndexedAccessSymbolReferences", e[e.WriteTypeArgumentsOfSignature = 32] = "WriteTypeArgumentsOfSignature", e[e.UseFullyQualifiedType = 64] = "UseFullyQualifiedType", e[e.UseOnlyExternalAliasing = 128] = "UseOnlyExternalAliasing", e[e.SuppressAnyReturnType = 256] = "SuppressAnyReturnType", e[e.WriteTypeParametersInQualifiedName = 512] = "WriteTypeParametersInQualifiedName", e[e.MultilineObjectLiterals = 1024] = "MultilineObjectLiterals", e[e.WriteClassExpressionAsTypeLiteral = 2048] = "WriteClassExpressionAsTypeLiteral", e[e.UseTypeOfFunction = 4096] = "UseTypeOfFunction", e[e.OmitParameterModifiers = 8192] = "OmitParameterModifiers", e[e.UseAliasDefinedOutsideCurrentScope = 16384] = "UseAliasDefinedOutsideCurrentScope", e[e.UseSingleQuotesForStringLiteralType = 268435456] = "UseSingleQuotesForStringLiteralType", e[e.NoTypeReduction = 536870912] = "NoTypeReduction", e[e.OmitThisParameter = 33554432] = "OmitThisParameter", e[e.AllowThisInObjectLiteral = 32768] = "AllowThisInObjectLiteral", e[e.AllowQualifiedNameInPlaceOfIdentifier = 65536] = "AllowQualifiedNameInPlaceOfIdentifier", e[e.AllowAnonymousIdentifier = 131072] = "AllowAnonymousIdentifier", e[e.AllowEmptyUnionOrIntersection = 262144] = "AllowEmptyUnionOrIntersection", e[e.AllowEmptyTuple = 524288] = "AllowEmptyTuple", e[e.AllowUniqueESSymbolType = 1048576] = "AllowUniqueESSymbolType", e[e.AllowEmptyIndexInfoType = 2097152] = "AllowEmptyIndexInfoType", e[e.AllowNodeModulesRelativePaths = 67108864] = "AllowNodeModulesRelativePaths", e[e.IgnoreErrors = 70221824] = "IgnoreErrors", e[e.InObjectTypeLiteral = 4194304] = "InObjectTypeLiteral", e[e.InTypeAlias = 8388608] = "InTypeAlias", e[e.InInitialEntityName = 16777216] = "InInitialEntityName", e))(EQ || {}), DQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.WriteComputedProps = 1] = "WriteComputedProps", e[e.NoSyntacticPrinter = 2] = "NoSyntacticPrinter", e[e.DoNotIncludeSymbolChain = 4] = "DoNotIncludeSymbolChain", e[e.AllowUnresolvedNames = 8] = "AllowUnresolvedNames", e))(DQ || {}), wQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.NoTruncation = 1] = "NoTruncation", e[e.WriteArrayAsGenericType = 2] = "WriteArrayAsGenericType", e[e.GenerateNamesForShadowedTypeParams = 4] = "GenerateNamesForShadowedTypeParams", e[e.UseStructuralFallback = 8] = "UseStructuralFallback", e[e.WriteTypeArgumentsOfSignature = 32] = "WriteTypeArgumentsOfSignature", e[e.UseFullyQualifiedType = 64] = "UseFullyQualifiedType", e[e.SuppressAnyReturnType = 256] = "SuppressAnyReturnType", e[e.MultilineObjectLiterals = 1024] = "MultilineObjectLiterals", e[e.WriteClassExpressionAsTypeLiteral = 2048] = "WriteClassExpressionAsTypeLiteral", e[e.UseTypeOfFunction = 4096] = "UseTypeOfFunction", e[e.OmitParameterModifiers = 8192] = "OmitParameterModifiers", e[e.UseAliasDefinedOutsideCurrentScope = 16384] = "UseAliasDefinedOutsideCurrentScope", e[e.UseSingleQuotesForStringLiteralType = 268435456] = "UseSingleQuotesForStringLiteralType", e[e.NoTypeReduction = 536870912] = "NoTypeReduction", e[e.OmitThisParameter = 33554432] = "OmitThisParameter", e[e.AllowUniqueESSymbolType = 1048576] = "AllowUniqueESSymbolType", e[e.AddUndefined = 131072] = "AddUndefined", e[e.WriteArrowStyleSignature = 262144] = "WriteArrowStyleSignature", e[e.InArrayType = 524288] = "InArrayType", e[e.InElementType = 2097152] = "InElementType", e[e.InFirstTypeArgument = 4194304] = "InFirstTypeArgument", e[e.InTypeAlias = 8388608] = "InTypeAlias", e[e.NodeBuilderFlagsMask = 848330095] = "NodeBuilderFlagsMask", e))(wQ || {}), PQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.WriteTypeParametersOrArguments = 1] = "WriteTypeParametersOrArguments", e[e.UseOnlyExternalAliasing = 2] = "UseOnlyExternalAliasing", e[e.AllowAnyNodeKind = 4] = "AllowAnyNodeKind", e[e.UseAliasDefinedOutsideCurrentScope = 8] = "UseAliasDefinedOutsideCurrentScope", e[e.WriteComputedProps = 16] = "WriteComputedProps", e[e.DoNotIncludeSymbolChain = 32] = "DoNotIncludeSymbolChain", e))(PQ || {}), NQ = /* @__PURE__ */ ((e) => (e[e.Accessible = 0] = "Accessible", e[e.NotAccessible = 1] = "NotAccessible", e[e.CannotBeNamed = 2] = "CannotBeNamed", e[e.NotResolved = 3] = "NotResolved", e))(NQ || {}), AQ = /* @__PURE__ */ ((e) => (e[e.This = 0] = "This", e[e.Identifier = 1] = "Identifier", e[e.AssertsThis = 2] = "AssertsThis", e[e.AssertsIdentifier = 3] = "AssertsIdentifier", e))(AQ || {}), IQ = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.TypeWithConstructSignatureAndValue = 1] = "TypeWithConstructSignatureAndValue", e[e.VoidNullableOrNeverType = 2] = "VoidNullableOrNeverType", e[e.NumberLikeType = 3] = "NumberLikeType", e[e.BigIntLikeType = 4] = "BigIntLikeType", e[e.StringLikeType = 5] = "StringLikeType", e[e.BooleanType = 6] = "BooleanType", e[e.ArrayLikeType = 7] = "ArrayLikeType", e[e.ESSymbolType = 8] = "ESSymbolType", e[e.Promise = 9] = "Promise", e[e.TypeWithCallSignature = 10] = "TypeWithCallSignature", e[e.ObjectType = 11] = "ObjectType", e))(IQ || {}), GR = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.FunctionScopedVariable = 1] = "FunctionScopedVariable", e[e.BlockScopedVariable = 2] = "BlockScopedVariable", e[e.Property = 4] = "Property", e[e.EnumMember = 8] = "EnumMember", e[e.Function = 16] = "Function", e[e.Class = 32] = "Class", e[e.Interface = 64] = "Interface", e[e.ConstEnum = 128] = "ConstEnum", e[e.RegularEnum = 256] = "RegularEnum", e[e.ValueModule = 512] = "ValueModule", e[e.NamespaceModule = 1024] = "NamespaceModule", e[e.TypeLiteral = 2048] = "TypeLiteral", e[e.ObjectLiteral = 4096] = "ObjectLiteral", e[e.Method = 8192] = "Method", e[e.Constructor = 16384] = "Constructor", e[e.GetAccessor = 32768] = "GetAccessor", e[e.SetAccessor = 65536] = "SetAccessor", e[e.Signature = 131072] = "Signature", e[e.TypeParameter = 262144] = "TypeParameter", e[e.TypeAlias = 524288] = "TypeAlias", e[e.ExportValue = 1048576] = "ExportValue", e[e.Alias = 2097152] = "Alias", e[e.Prototype = 4194304] = "Prototype", e[e.ExportStar = 8388608] = "ExportStar", e[e.Optional = 16777216] = "Optional", e[e.Transient = 33554432] = "Transient", e[e.Assignment = 67108864] = "Assignment", e[e.ModuleExports = 134217728] = "ModuleExports", e[e.All = -1] = "All", e[e.Enum = 384] = "Enum", e[e.Variable = 3] = "Variable", e[e.Value = 111551] = "Value", e[e.Type = 788968] = "Type", e[e.Namespace = 1920] = "Namespace", e[e.Module = 1536] = "Module", e[e.Accessor = 98304] = "Accessor", e[e.FunctionScopedVariableExcludes = 111550] = "FunctionScopedVariableExcludes", e[ + e.BlockScopedVariableExcludes = 111551 + /* Value */ + ] = "BlockScopedVariableExcludes", e[ + e.ParameterExcludes = 111551 + /* Value */ + ] = "ParameterExcludes", e[ + e.PropertyExcludes = 0 + /* None */ + ] = "PropertyExcludes", e[e.EnumMemberExcludes = 900095] = "EnumMemberExcludes", e[e.FunctionExcludes = 110991] = "FunctionExcludes", e[e.ClassExcludes = 899503] = "ClassExcludes", e[e.InterfaceExcludes = 788872] = "InterfaceExcludes", e[e.RegularEnumExcludes = 899327] = "RegularEnumExcludes", e[e.ConstEnumExcludes = 899967] = "ConstEnumExcludes", e[e.ValueModuleExcludes = 110735] = "ValueModuleExcludes", e[e.NamespaceModuleExcludes = 0] = "NamespaceModuleExcludes", e[e.MethodExcludes = 103359] = "MethodExcludes", e[e.GetAccessorExcludes = 46015] = "GetAccessorExcludes", e[e.SetAccessorExcludes = 78783] = "SetAccessorExcludes", e[e.AccessorExcludes = 13247] = "AccessorExcludes", e[e.TypeParameterExcludes = 526824] = "TypeParameterExcludes", e[ + e.TypeAliasExcludes = 788968 + /* Type */ + ] = "TypeAliasExcludes", e[ + e.AliasExcludes = 2097152 + /* Alias */ + ] = "AliasExcludes", e[e.ModuleMember = 2623475] = "ModuleMember", e[e.ExportHasLocal = 944] = "ExportHasLocal", e[e.BlockScoped = 418] = "BlockScoped", e[e.PropertyOrAccessor = 98308] = "PropertyOrAccessor", e[e.ClassMember = 106500] = "ClassMember", e[e.ExportSupportsDefaultModifier = 112] = "ExportSupportsDefaultModifier", e[e.ExportDoesNotSupportDefaultModifier = -113] = "ExportDoesNotSupportDefaultModifier", e[e.Classifiable = 2885600] = "Classifiable", e[e.LateBindingContainer = 6256] = "LateBindingContainer", e))(GR || {}), FQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Instantiated = 1] = "Instantiated", e[e.SyntheticProperty = 2] = "SyntheticProperty", e[e.SyntheticMethod = 4] = "SyntheticMethod", e[e.Readonly = 8] = "Readonly", e[e.ReadPartial = 16] = "ReadPartial", e[e.WritePartial = 32] = "WritePartial", e[e.HasNonUniformType = 64] = "HasNonUniformType", e[e.HasLiteralType = 128] = "HasLiteralType", e[e.ContainsPublic = 256] = "ContainsPublic", e[e.ContainsProtected = 512] = "ContainsProtected", e[e.ContainsPrivate = 1024] = "ContainsPrivate", e[e.ContainsStatic = 2048] = "ContainsStatic", e[e.Late = 4096] = "Late", e[e.ReverseMapped = 8192] = "ReverseMapped", e[e.OptionalParameter = 16384] = "OptionalParameter", e[e.RestParameter = 32768] = "RestParameter", e[e.DeferredType = 65536] = "DeferredType", e[e.HasNeverType = 131072] = "HasNeverType", e[e.Mapped = 262144] = "Mapped", e[e.StripOptional = 524288] = "StripOptional", e[e.Unresolved = 1048576] = "Unresolved", e[e.Synthetic = 6] = "Synthetic", e[e.Discriminant = 192] = "Discriminant", e[e.Partial = 48] = "Partial", e))(FQ || {}), OQ = /* @__PURE__ */ ((e) => (e.Call = "__call", e.Constructor = "__constructor", e.New = "__new", e.Index = "__index", e.ExportStar = "__export", e.Global = "__global", e.Missing = "__missing", e.Type = "__type", e.Object = "__object", e.JSXAttributes = "__jsxAttributes", e.Class = "__class", e.Function = "__function", e.Computed = "__computed", e.Resolving = "__resolving__", e.ExportEquals = "export=", e.Default = "default", e.This = "this", e.InstantiationExpression = "__instantiationExpression", e.ImportAttributes = "__importAttributes", e))(OQ || {}), $R = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.TypeChecked = 1] = "TypeChecked", e[e.LexicalThis = 2] = "LexicalThis", e[e.CaptureThis = 4] = "CaptureThis", e[e.CaptureNewTarget = 8] = "CaptureNewTarget", e[e.SuperInstance = 16] = "SuperInstance", e[e.SuperStatic = 32] = "SuperStatic", e[e.ContextChecked = 64] = "ContextChecked", e[e.MethodWithSuperPropertyAccessInAsync = 128] = "MethodWithSuperPropertyAccessInAsync", e[e.MethodWithSuperPropertyAssignmentInAsync = 256] = "MethodWithSuperPropertyAssignmentInAsync", e[e.CaptureArguments = 512] = "CaptureArguments", e[e.EnumValuesComputed = 1024] = "EnumValuesComputed", e[e.LexicalModuleMergesWithClass = 2048] = "LexicalModuleMergesWithClass", e[e.LoopWithCapturedBlockScopedBinding = 4096] = "LoopWithCapturedBlockScopedBinding", e[e.ContainsCapturedBlockScopeBinding = 8192] = "ContainsCapturedBlockScopeBinding", e[e.CapturedBlockScopedBinding = 16384] = "CapturedBlockScopedBinding", e[e.BlockScopedBindingInLoop = 32768] = "BlockScopedBindingInLoop", e[e.NeedsLoopOutParameter = 65536] = "NeedsLoopOutParameter", e[e.AssignmentsMarked = 131072] = "AssignmentsMarked", e[e.ContainsConstructorReference = 262144] = "ContainsConstructorReference", e[e.ConstructorReference = 536870912] = "ConstructorReference", e[e.ContainsClassWithPrivateIdentifiers = 1048576] = "ContainsClassWithPrivateIdentifiers", e[e.ContainsSuperPropertyInStaticInitializer = 2097152] = "ContainsSuperPropertyInStaticInitializer", e[e.InCheckIdentifier = 4194304] = "InCheckIdentifier", e[e.PartiallyTypeChecked = 8388608] = "PartiallyTypeChecked", e[e.LazyFlags = 539358128] = "LazyFlags", e))($R || {}), XR = /* @__PURE__ */ ((e) => (e[e.Any = 1] = "Any", e[e.Unknown = 2] = "Unknown", e[e.String = 4] = "String", e[e.Number = 8] = "Number", e[e.Boolean = 16] = "Boolean", e[e.Enum = 32] = "Enum", e[e.BigInt = 64] = "BigInt", e[e.StringLiteral = 128] = "StringLiteral", e[e.NumberLiteral = 256] = "NumberLiteral", e[e.BooleanLiteral = 512] = "BooleanLiteral", e[e.EnumLiteral = 1024] = "EnumLiteral", e[e.BigIntLiteral = 2048] = "BigIntLiteral", e[e.ESSymbol = 4096] = "ESSymbol", e[e.UniqueESSymbol = 8192] = "UniqueESSymbol", e[e.Void = 16384] = "Void", e[e.Undefined = 32768] = "Undefined", e[e.Null = 65536] = "Null", e[e.Never = 131072] = "Never", e[e.TypeParameter = 262144] = "TypeParameter", e[e.Object = 524288] = "Object", e[e.Union = 1048576] = "Union", e[e.Intersection = 2097152] = "Intersection", e[e.Index = 4194304] = "Index", e[e.IndexedAccess = 8388608] = "IndexedAccess", e[e.Conditional = 16777216] = "Conditional", e[e.Substitution = 33554432] = "Substitution", e[e.NonPrimitive = 67108864] = "NonPrimitive", e[e.TemplateLiteral = 134217728] = "TemplateLiteral", e[e.StringMapping = 268435456] = "StringMapping", e[e.Reserved1 = 536870912] = "Reserved1", e[e.Reserved2 = 1073741824] = "Reserved2", e[e.AnyOrUnknown = 3] = "AnyOrUnknown", e[e.Nullable = 98304] = "Nullable", e[e.Literal = 2944] = "Literal", e[e.Unit = 109472] = "Unit", e[e.Freshable = 2976] = "Freshable", e[e.StringOrNumberLiteral = 384] = "StringOrNumberLiteral", e[e.StringOrNumberLiteralOrUnique = 8576] = "StringOrNumberLiteralOrUnique", e[e.DefinitelyFalsy = 117632] = "DefinitelyFalsy", e[e.PossiblyFalsy = 117724] = "PossiblyFalsy", e[e.Intrinsic = 67359327] = "Intrinsic", e[e.StringLike = 402653316] = "StringLike", e[e.NumberLike = 296] = "NumberLike", e[e.BigIntLike = 2112] = "BigIntLike", e[e.BooleanLike = 528] = "BooleanLike", e[e.EnumLike = 1056] = "EnumLike", e[e.ESSymbolLike = 12288] = "ESSymbolLike", e[e.VoidLike = 49152] = "VoidLike", e[e.Primitive = 402784252] = "Primitive", e[e.DefinitelyNonNullable = 470302716] = "DefinitelyNonNullable", e[e.DisjointDomains = 469892092] = "DisjointDomains", e[e.UnionOrIntersection = 3145728] = "UnionOrIntersection", e[e.StructuredType = 3670016] = "StructuredType", e[e.TypeVariable = 8650752] = "TypeVariable", e[e.InstantiableNonPrimitive = 58982400] = "InstantiableNonPrimitive", e[e.InstantiablePrimitive = 406847488] = "InstantiablePrimitive", e[e.Instantiable = 465829888] = "Instantiable", e[e.StructuredOrInstantiable = 469499904] = "StructuredOrInstantiable", e[e.ObjectFlagsType = 3899393] = "ObjectFlagsType", e[e.Simplifiable = 25165824] = "Simplifiable", e[e.Singleton = 67358815] = "Singleton", e[e.Narrowable = 536624127] = "Narrowable", e[e.IncludesMask = 473694207] = "IncludesMask", e[ + e.IncludesMissingType = 262144 + /* TypeParameter */ + ] = "IncludesMissingType", e[ + e.IncludesNonWideningType = 4194304 + /* Index */ + ] = "IncludesNonWideningType", e[ + e.IncludesWildcard = 8388608 + /* IndexedAccess */ + ] = "IncludesWildcard", e[ + e.IncludesEmptyObject = 16777216 + /* Conditional */ + ] = "IncludesEmptyObject", e[ + e.IncludesInstantiable = 33554432 + /* Substitution */ + ] = "IncludesInstantiable", e[ + e.IncludesConstrainedTypeVariable = 536870912 + /* Reserved1 */ + ] = "IncludesConstrainedTypeVariable", e[ + e.IncludesError = 1073741824 + /* Reserved2 */ + ] = "IncludesError", e[e.NotPrimitiveUnion = 36323331] = "NotPrimitiveUnion", e))(XR || {}), QR = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Class = 1] = "Class", e[e.Interface = 2] = "Interface", e[e.Reference = 4] = "Reference", e[e.Tuple = 8] = "Tuple", e[e.Anonymous = 16] = "Anonymous", e[e.Mapped = 32] = "Mapped", e[e.Instantiated = 64] = "Instantiated", e[e.ObjectLiteral = 128] = "ObjectLiteral", e[e.EvolvingArray = 256] = "EvolvingArray", e[e.ObjectLiteralPatternWithComputedProperties = 512] = "ObjectLiteralPatternWithComputedProperties", e[e.ReverseMapped = 1024] = "ReverseMapped", e[e.JsxAttributes = 2048] = "JsxAttributes", e[e.JSLiteral = 4096] = "JSLiteral", e[e.FreshLiteral = 8192] = "FreshLiteral", e[e.ArrayLiteral = 16384] = "ArrayLiteral", e[e.PrimitiveUnion = 32768] = "PrimitiveUnion", e[e.ContainsWideningType = 65536] = "ContainsWideningType", e[e.ContainsObjectOrArrayLiteral = 131072] = "ContainsObjectOrArrayLiteral", e[e.NonInferrableType = 262144] = "NonInferrableType", e[e.CouldContainTypeVariablesComputed = 524288] = "CouldContainTypeVariablesComputed", e[e.CouldContainTypeVariables = 1048576] = "CouldContainTypeVariables", e[e.ClassOrInterface = 3] = "ClassOrInterface", e[e.RequiresWidening = 196608] = "RequiresWidening", e[e.PropagatingFlags = 458752] = "PropagatingFlags", e[e.InstantiatedMapped = 96] = "InstantiatedMapped", e[e.ObjectTypeKindMask = 1343] = "ObjectTypeKindMask", e[e.ContainsSpread = 2097152] = "ContainsSpread", e[e.ObjectRestType = 4194304] = "ObjectRestType", e[e.InstantiationExpressionType = 8388608] = "InstantiationExpressionType", e[e.SingleSignatureType = 134217728] = "SingleSignatureType", e[e.IsClassInstanceClone = 16777216] = "IsClassInstanceClone", e[e.IdenticalBaseTypeCalculated = 33554432] = "IdenticalBaseTypeCalculated", e[e.IdenticalBaseTypeExists = 67108864] = "IdenticalBaseTypeExists", e[e.IsGenericTypeComputed = 2097152] = "IsGenericTypeComputed", e[e.IsGenericObjectType = 4194304] = "IsGenericObjectType", e[e.IsGenericIndexType = 8388608] = "IsGenericIndexType", e[e.IsGenericType = 12582912] = "IsGenericType", e[e.ContainsIntersections = 16777216] = "ContainsIntersections", e[e.IsUnknownLikeUnionComputed = 33554432] = "IsUnknownLikeUnionComputed", e[e.IsUnknownLikeUnion = 67108864] = "IsUnknownLikeUnion", e[e.IsNeverIntersectionComputed = 16777216] = "IsNeverIntersectionComputed", e[e.IsNeverIntersection = 33554432] = "IsNeverIntersection", e[e.IsConstrainedTypeVariable = 67108864] = "IsConstrainedTypeVariable", e))(QR || {}), LQ = /* @__PURE__ */ ((e) => (e[e.Invariant = 0] = "Invariant", e[e.Covariant = 1] = "Covariant", e[e.Contravariant = 2] = "Contravariant", e[e.Bivariant = 3] = "Bivariant", e[e.Independent = 4] = "Independent", e[e.VarianceMask = 7] = "VarianceMask", e[e.Unmeasurable = 8] = "Unmeasurable", e[e.Unreliable = 16] = "Unreliable", e[e.AllowsStructuralFallback = 24] = "AllowsStructuralFallback", e))(LQ || {}), MQ = /* @__PURE__ */ ((e) => (e[e.Required = 1] = "Required", e[e.Optional = 2] = "Optional", e[e.Rest = 4] = "Rest", e[e.Variadic = 8] = "Variadic", e[e.Fixed = 3] = "Fixed", e[e.Variable = 12] = "Variable", e[e.NonRequired = 14] = "NonRequired", e[e.NonRest = 11] = "NonRest", e))(MQ || {}), RQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.IncludeUndefined = 1] = "IncludeUndefined", e[e.NoIndexSignatures = 2] = "NoIndexSignatures", e[e.Writing = 4] = "Writing", e[e.CacheSymbol = 8] = "CacheSymbol", e[e.AllowMissing = 16] = "AllowMissing", e[e.ExpressionPosition = 32] = "ExpressionPosition", e[e.ReportDeprecated = 64] = "ReportDeprecated", e[e.SuppressNoImplicitAnyError = 128] = "SuppressNoImplicitAnyError", e[e.Contextual = 256] = "Contextual", e[ + e.Persistent = 1 + /* IncludeUndefined */ + ] = "Persistent", e))(RQ || {}), jQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.StringsOnly = 1] = "StringsOnly", e[e.NoIndexSignatures = 2] = "NoIndexSignatures", e[e.NoReducibleCheck = 4] = "NoReducibleCheck", e))(jQ || {}), BQ = /* @__PURE__ */ ((e) => (e[e.Component = 0] = "Component", e[e.Function = 1] = "Function", e[e.Mixed = 2] = "Mixed", e))(BQ || {}), JQ = /* @__PURE__ */ ((e) => (e[e.Call = 0] = "Call", e[e.Construct = 1] = "Construct", e))(JQ || {}), YR = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.HasRestParameter = 1] = "HasRestParameter", e[e.HasLiteralTypes = 2] = "HasLiteralTypes", e[e.Abstract = 4] = "Abstract", e[e.IsInnerCallChain = 8] = "IsInnerCallChain", e[e.IsOuterCallChain = 16] = "IsOuterCallChain", e[e.IsUntypedSignatureInJSFile = 32] = "IsUntypedSignatureInJSFile", e[e.IsNonInferrable = 64] = "IsNonInferrable", e[e.IsSignatureCandidateForOverloadFailure = 128] = "IsSignatureCandidateForOverloadFailure", e[e.PropagatingFlags = 167] = "PropagatingFlags", e[e.CallChainFlags = 24] = "CallChainFlags", e))(YR || {}), zQ = /* @__PURE__ */ ((e) => (e[e.String = 0] = "String", e[e.Number = 1] = "Number", e))(zQ || {}), WQ = /* @__PURE__ */ ((e) => (e[e.Simple = 0] = "Simple", e[e.Array = 1] = "Array", e[e.Deferred = 2] = "Deferred", e[e.Function = 3] = "Function", e[e.Composite = 4] = "Composite", e[e.Merged = 5] = "Merged", e))(WQ || {}), UQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.NakedTypeVariable = 1] = "NakedTypeVariable", e[e.SpeculativeTuple = 2] = "SpeculativeTuple", e[e.SubstituteSource = 4] = "SubstituteSource", e[e.HomomorphicMappedType = 8] = "HomomorphicMappedType", e[e.PartialHomomorphicMappedType = 16] = "PartialHomomorphicMappedType", e[e.MappedTypeConstraint = 32] = "MappedTypeConstraint", e[e.ContravariantConditional = 64] = "ContravariantConditional", e[e.ReturnType = 128] = "ReturnType", e[e.LiteralKeyof = 256] = "LiteralKeyof", e[e.NoConstraints = 512] = "NoConstraints", e[e.AlwaysStrict = 1024] = "AlwaysStrict", e[e.MaxValue = 2048] = "MaxValue", e[e.PriorityImpliesCombination = 416] = "PriorityImpliesCombination", e[e.Circularity = -1] = "Circularity", e))(UQ || {}), VQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.NoDefault = 1] = "NoDefault", e[e.AnyDefault = 2] = "AnyDefault", e[e.SkippedGenericFunction = 4] = "SkippedGenericFunction", e))(VQ || {}), qQ = /* @__PURE__ */ ((e) => (e[e.False = 0] = "False", e[e.Unknown = 1] = "Unknown", e[e.Maybe = 3] = "Maybe", e[e.True = -1] = "True", e))(qQ || {}), HQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.ExportsProperty = 1] = "ExportsProperty", e[e.ModuleExports = 2] = "ModuleExports", e[e.PrototypeProperty = 3] = "PrototypeProperty", e[e.ThisProperty = 4] = "ThisProperty", e[e.Property = 5] = "Property", e[e.Prototype = 6] = "Prototype", e[e.ObjectDefinePropertyValue = 7] = "ObjectDefinePropertyValue", e[e.ObjectDefinePropertyExports = 8] = "ObjectDefinePropertyExports", e[e.ObjectDefinePrototypeProperty = 9] = "ObjectDefinePrototypeProperty", e))(HQ || {}), WI = /* @__PURE__ */ ((e) => (e[e.Warning = 0] = "Warning", e[e.Error = 1] = "Error", e[e.Suggestion = 2] = "Suggestion", e[e.Message = 3] = "Message", e))(WI || {}); + function rS(e, t = !0) { + const n = WI[e.category]; + return t ? n.toLowerCase() : n; + } + var r4 = /* @__PURE__ */ ((e) => (e[e.Classic = 1] = "Classic", e[e.NodeJs = 2] = "NodeJs", e[e.Node10 = 2] = "Node10", e[e.Node16 = 3] = "Node16", e[e.NodeNext = 99] = "NodeNext", e[e.Bundler = 100] = "Bundler", e))(r4 || {}), GQ = /* @__PURE__ */ ((e) => (e[e.Legacy = 1] = "Legacy", e[e.Auto = 2] = "Auto", e[e.Force = 3] = "Force", e))(GQ || {}), $Q = /* @__PURE__ */ ((e) => (e[e.FixedPollingInterval = 0] = "FixedPollingInterval", e[e.PriorityPollingInterval = 1] = "PriorityPollingInterval", e[e.DynamicPriorityPolling = 2] = "DynamicPriorityPolling", e[e.FixedChunkSizePolling = 3] = "FixedChunkSizePolling", e[e.UseFsEvents = 4] = "UseFsEvents", e[e.UseFsEventsOnParentDirectory = 5] = "UseFsEventsOnParentDirectory", e))($Q || {}), XQ = /* @__PURE__ */ ((e) => (e[e.UseFsEvents = 0] = "UseFsEvents", e[e.FixedPollingInterval = 1] = "FixedPollingInterval", e[e.DynamicPriorityPolling = 2] = "DynamicPriorityPolling", e[e.FixedChunkSizePolling = 3] = "FixedChunkSizePolling", e))(XQ || {}), QQ = /* @__PURE__ */ ((e) => (e[e.FixedInterval = 0] = "FixedInterval", e[e.PriorityInterval = 1] = "PriorityInterval", e[e.DynamicPriority = 2] = "DynamicPriority", e[e.FixedChunkSize = 3] = "FixedChunkSize", e))(QQ || {}), uC = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.CommonJS = 1] = "CommonJS", e[e.AMD = 2] = "AMD", e[e.UMD = 3] = "UMD", e[e.System = 4] = "System", e[e.ES2015 = 5] = "ES2015", e[e.ES2020 = 6] = "ES2020", e[e.ES2022 = 7] = "ES2022", e[e.ESNext = 99] = "ESNext", e[e.Node16 = 100] = "Node16", e[e.NodeNext = 199] = "NodeNext", e[e.Preserve = 200] = "Preserve", e))(uC || {}), YQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Preserve = 1] = "Preserve", e[e.React = 2] = "React", e[e.ReactNative = 3] = "ReactNative", e[e.ReactJSX = 4] = "ReactJSX", e[e.ReactJSXDev = 5] = "ReactJSXDev", e))(YQ || {}), ZQ = /* @__PURE__ */ ((e) => (e[e.Remove = 0] = "Remove", e[e.Preserve = 1] = "Preserve", e[e.Error = 2] = "Error", e))(ZQ || {}), KQ = /* @__PURE__ */ ((e) => (e[e.CarriageReturnLineFeed = 0] = "CarriageReturnLineFeed", e[e.LineFeed = 1] = "LineFeed", e))(KQ || {}), ZR = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.JS = 1] = "JS", e[e.JSX = 2] = "JSX", e[e.TS = 3] = "TS", e[e.TSX = 4] = "TSX", e[e.External = 5] = "External", e[e.JSON = 6] = "JSON", e[e.Deferred = 7] = "Deferred", e))(ZR || {}), eY = /* @__PURE__ */ ((e) => (e[e.ES3 = 0] = "ES3", e[e.ES5 = 1] = "ES5", e[e.ES2015 = 2] = "ES2015", e[e.ES2016 = 3] = "ES2016", e[e.ES2017 = 4] = "ES2017", e[e.ES2018 = 5] = "ES2018", e[e.ES2019 = 6] = "ES2019", e[e.ES2020 = 7] = "ES2020", e[e.ES2021 = 8] = "ES2021", e[e.ES2022 = 9] = "ES2022", e[e.ES2023 = 10] = "ES2023", e[e.ES2024 = 11] = "ES2024", e[e.ESNext = 99] = "ESNext", e[e.JSON = 100] = "JSON", e[ + e.Latest = 99 + /* ESNext */ + ] = "Latest", e))(eY || {}), tY = /* @__PURE__ */ ((e) => (e[e.Standard = 0] = "Standard", e[e.JSX = 1] = "JSX", e))(tY || {}), rY = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Recursive = 1] = "Recursive", e))(rY || {}), nY = /* @__PURE__ */ ((e) => (e[e.EOF = -1] = "EOF", e[e.nullCharacter = 0] = "nullCharacter", e[e.maxAsciiCharacter = 127] = "maxAsciiCharacter", e[e.lineFeed = 10] = "lineFeed", e[e.carriageReturn = 13] = "carriageReturn", e[e.lineSeparator = 8232] = "lineSeparator", e[e.paragraphSeparator = 8233] = "paragraphSeparator", e[e.nextLine = 133] = "nextLine", e[e.space = 32] = "space", e[e.nonBreakingSpace = 160] = "nonBreakingSpace", e[e.enQuad = 8192] = "enQuad", e[e.emQuad = 8193] = "emQuad", e[e.enSpace = 8194] = "enSpace", e[e.emSpace = 8195] = "emSpace", e[e.threePerEmSpace = 8196] = "threePerEmSpace", e[e.fourPerEmSpace = 8197] = "fourPerEmSpace", e[e.sixPerEmSpace = 8198] = "sixPerEmSpace", e[e.figureSpace = 8199] = "figureSpace", e[e.punctuationSpace = 8200] = "punctuationSpace", e[e.thinSpace = 8201] = "thinSpace", e[e.hairSpace = 8202] = "hairSpace", e[e.zeroWidthSpace = 8203] = "zeroWidthSpace", e[e.narrowNoBreakSpace = 8239] = "narrowNoBreakSpace", e[e.ideographicSpace = 12288] = "ideographicSpace", e[e.mathematicalSpace = 8287] = "mathematicalSpace", e[e.ogham = 5760] = "ogham", e[e.replacementCharacter = 65533] = "replacementCharacter", e[e._ = 95] = "_", e[e.$ = 36] = "$", e[e._0 = 48] = "_0", e[e._1 = 49] = "_1", e[e._2 = 50] = "_2", e[e._3 = 51] = "_3", e[e._4 = 52] = "_4", e[e._5 = 53] = "_5", e[e._6 = 54] = "_6", e[e._7 = 55] = "_7", e[e._8 = 56] = "_8", e[e._9 = 57] = "_9", e[e.a = 97] = "a", e[e.b = 98] = "b", e[e.c = 99] = "c", e[e.d = 100] = "d", e[e.e = 101] = "e", e[e.f = 102] = "f", e[e.g = 103] = "g", e[e.h = 104] = "h", e[e.i = 105] = "i", e[e.j = 106] = "j", e[e.k = 107] = "k", e[e.l = 108] = "l", e[e.m = 109] = "m", e[e.n = 110] = "n", e[e.o = 111] = "o", e[e.p = 112] = "p", e[e.q = 113] = "q", e[e.r = 114] = "r", e[e.s = 115] = "s", e[e.t = 116] = "t", e[e.u = 117] = "u", e[e.v = 118] = "v", e[e.w = 119] = "w", e[e.x = 120] = "x", e[e.y = 121] = "y", e[e.z = 122] = "z", e[e.A = 65] = "A", e[e.B = 66] = "B", e[e.C = 67] = "C", e[e.D = 68] = "D", e[e.E = 69] = "E", e[e.F = 70] = "F", e[e.G = 71] = "G", e[e.H = 72] = "H", e[e.I = 73] = "I", e[e.J = 74] = "J", e[e.K = 75] = "K", e[e.L = 76] = "L", e[e.M = 77] = "M", e[e.N = 78] = "N", e[e.O = 79] = "O", e[e.P = 80] = "P", e[e.Q = 81] = "Q", e[e.R = 82] = "R", e[e.S = 83] = "S", e[e.T = 84] = "T", e[e.U = 85] = "U", e[e.V = 86] = "V", e[e.W = 87] = "W", e[e.X = 88] = "X", e[e.Y = 89] = "Y", e[e.Z = 90] = "Z", e[e.ampersand = 38] = "ampersand", e[e.asterisk = 42] = "asterisk", e[e.at = 64] = "at", e[e.backslash = 92] = "backslash", e[e.backtick = 96] = "backtick", e[e.bar = 124] = "bar", e[e.caret = 94] = "caret", e[e.closeBrace = 125] = "closeBrace", e[e.closeBracket = 93] = "closeBracket", e[e.closeParen = 41] = "closeParen", e[e.colon = 58] = "colon", e[e.comma = 44] = "comma", e[e.dot = 46] = "dot", e[e.doubleQuote = 34] = "doubleQuote", e[e.equals = 61] = "equals", e[e.exclamation = 33] = "exclamation", e[e.greaterThan = 62] = "greaterThan", e[e.hash = 35] = "hash", e[e.lessThan = 60] = "lessThan", e[e.minus = 45] = "minus", e[e.openBrace = 123] = "openBrace", e[e.openBracket = 91] = "openBracket", e[e.openParen = 40] = "openParen", e[e.percent = 37] = "percent", e[e.plus = 43] = "plus", e[e.question = 63] = "question", e[e.semicolon = 59] = "semicolon", e[e.singleQuote = 39] = "singleQuote", e[e.slash = 47] = "slash", e[e.tilde = 126] = "tilde", e[e.backspace = 8] = "backspace", e[e.formFeed = 12] = "formFeed", e[e.byteOrderMark = 65279] = "byteOrderMark", e[e.tab = 9] = "tab", e[e.verticalTab = 11] = "verticalTab", e))(nY || {}), iY = /* @__PURE__ */ ((e) => (e.Ts = ".ts", e.Tsx = ".tsx", e.Dts = ".d.ts", e.Js = ".js", e.Jsx = ".jsx", e.Json = ".json", e.TsBuildInfo = ".tsbuildinfo", e.Mjs = ".mjs", e.Mts = ".mts", e.Dmts = ".d.mts", e.Cjs = ".cjs", e.Cts = ".cts", e.Dcts = ".d.cts", e))(iY || {}), KR = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.ContainsTypeScript = 1] = "ContainsTypeScript", e[e.ContainsJsx = 2] = "ContainsJsx", e[e.ContainsESNext = 4] = "ContainsESNext", e[e.ContainsES2022 = 8] = "ContainsES2022", e[e.ContainsES2021 = 16] = "ContainsES2021", e[e.ContainsES2020 = 32] = "ContainsES2020", e[e.ContainsES2019 = 64] = "ContainsES2019", e[e.ContainsES2018 = 128] = "ContainsES2018", e[e.ContainsES2017 = 256] = "ContainsES2017", e[e.ContainsES2016 = 512] = "ContainsES2016", e[e.ContainsES2015 = 1024] = "ContainsES2015", e[e.ContainsGenerator = 2048] = "ContainsGenerator", e[e.ContainsDestructuringAssignment = 4096] = "ContainsDestructuringAssignment", e[e.ContainsTypeScriptClassSyntax = 8192] = "ContainsTypeScriptClassSyntax", e[e.ContainsLexicalThis = 16384] = "ContainsLexicalThis", e[e.ContainsRestOrSpread = 32768] = "ContainsRestOrSpread", e[e.ContainsObjectRestOrSpread = 65536] = "ContainsObjectRestOrSpread", e[e.ContainsComputedPropertyName = 131072] = "ContainsComputedPropertyName", e[e.ContainsBlockScopedBinding = 262144] = "ContainsBlockScopedBinding", e[e.ContainsBindingPattern = 524288] = "ContainsBindingPattern", e[e.ContainsYield = 1048576] = "ContainsYield", e[e.ContainsAwait = 2097152] = "ContainsAwait", e[e.ContainsHoistedDeclarationOrCompletion = 4194304] = "ContainsHoistedDeclarationOrCompletion", e[e.ContainsDynamicImport = 8388608] = "ContainsDynamicImport", e[e.ContainsClassFields = 16777216] = "ContainsClassFields", e[e.ContainsDecorators = 33554432] = "ContainsDecorators", e[e.ContainsPossibleTopLevelAwait = 67108864] = "ContainsPossibleTopLevelAwait", e[e.ContainsLexicalSuper = 134217728] = "ContainsLexicalSuper", e[e.ContainsUpdateExpressionForIdentifier = 268435456] = "ContainsUpdateExpressionForIdentifier", e[e.ContainsPrivateIdentifierInExpression = 536870912] = "ContainsPrivateIdentifierInExpression", e[e.HasComputedFlags = -2147483648] = "HasComputedFlags", e[ + e.AssertTypeScript = 1 + /* ContainsTypeScript */ + ] = "AssertTypeScript", e[ + e.AssertJsx = 2 + /* ContainsJsx */ + ] = "AssertJsx", e[ + e.AssertESNext = 4 + /* ContainsESNext */ + ] = "AssertESNext", e[ + e.AssertES2022 = 8 + /* ContainsES2022 */ + ] = "AssertES2022", e[ + e.AssertES2021 = 16 + /* ContainsES2021 */ + ] = "AssertES2021", e[ + e.AssertES2020 = 32 + /* ContainsES2020 */ + ] = "AssertES2020", e[ + e.AssertES2019 = 64 + /* ContainsES2019 */ + ] = "AssertES2019", e[ + e.AssertES2018 = 128 + /* ContainsES2018 */ + ] = "AssertES2018", e[ + e.AssertES2017 = 256 + /* ContainsES2017 */ + ] = "AssertES2017", e[ + e.AssertES2016 = 512 + /* ContainsES2016 */ + ] = "AssertES2016", e[ + e.AssertES2015 = 1024 + /* ContainsES2015 */ + ] = "AssertES2015", e[ + e.AssertGenerator = 2048 + /* ContainsGenerator */ + ] = "AssertGenerator", e[ + e.AssertDestructuringAssignment = 4096 + /* ContainsDestructuringAssignment */ + ] = "AssertDestructuringAssignment", e[ + e.OuterExpressionExcludes = -2147483648 + /* HasComputedFlags */ + ] = "OuterExpressionExcludes", e[ + e.PropertyAccessExcludes = -2147483648 + /* OuterExpressionExcludes */ + ] = "PropertyAccessExcludes", e[ + e.NodeExcludes = -2147483648 + /* PropertyAccessExcludes */ + ] = "NodeExcludes", e[e.ArrowFunctionExcludes = -2072174592] = "ArrowFunctionExcludes", e[e.FunctionExcludes = -1937940480] = "FunctionExcludes", e[e.ConstructorExcludes = -1937948672] = "ConstructorExcludes", e[e.MethodOrAccessorExcludes = -2005057536] = "MethodOrAccessorExcludes", e[e.PropertyExcludes = -2013249536] = "PropertyExcludes", e[e.ClassExcludes = -2147344384] = "ClassExcludes", e[e.ModuleExcludes = -1941676032] = "ModuleExcludes", e[e.TypeExcludes = -2] = "TypeExcludes", e[e.ObjectLiteralExcludes = -2147278848] = "ObjectLiteralExcludes", e[e.ArrayLiteralOrCallOrNewExcludes = -2147450880] = "ArrayLiteralOrCallOrNewExcludes", e[e.VariableDeclarationListExcludes = -2146893824] = "VariableDeclarationListExcludes", e[ + e.ParameterExcludes = -2147483648 + /* NodeExcludes */ + ] = "ParameterExcludes", e[e.CatchClauseExcludes = -2147418112] = "CatchClauseExcludes", e[e.BindingPatternExcludes = -2147450880] = "BindingPatternExcludes", e[e.ContainsLexicalThisOrSuper = 134234112] = "ContainsLexicalThisOrSuper", e[e.PropertyNamePropagatingFlags = 134234112] = "PropertyNamePropagatingFlags", e))(KR || {}), ej = /* @__PURE__ */ ((e) => (e[e.TabStop = 0] = "TabStop", e[e.Placeholder = 1] = "Placeholder", e[e.Choice = 2] = "Choice", e[e.Variable = 3] = "Variable", e))(ej || {}), tj = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.SingleLine = 1] = "SingleLine", e[e.MultiLine = 2] = "MultiLine", e[e.AdviseOnEmitNode = 4] = "AdviseOnEmitNode", e[e.NoSubstitution = 8] = "NoSubstitution", e[e.CapturesThis = 16] = "CapturesThis", e[e.NoLeadingSourceMap = 32] = "NoLeadingSourceMap", e[e.NoTrailingSourceMap = 64] = "NoTrailingSourceMap", e[e.NoSourceMap = 96] = "NoSourceMap", e[e.NoNestedSourceMaps = 128] = "NoNestedSourceMaps", e[e.NoTokenLeadingSourceMaps = 256] = "NoTokenLeadingSourceMaps", e[e.NoTokenTrailingSourceMaps = 512] = "NoTokenTrailingSourceMaps", e[e.NoTokenSourceMaps = 768] = "NoTokenSourceMaps", e[e.NoLeadingComments = 1024] = "NoLeadingComments", e[e.NoTrailingComments = 2048] = "NoTrailingComments", e[e.NoComments = 3072] = "NoComments", e[e.NoNestedComments = 4096] = "NoNestedComments", e[e.HelperName = 8192] = "HelperName", e[e.ExportName = 16384] = "ExportName", e[e.LocalName = 32768] = "LocalName", e[e.InternalName = 65536] = "InternalName", e[e.Indented = 131072] = "Indented", e[e.NoIndentation = 262144] = "NoIndentation", e[e.AsyncFunctionBody = 524288] = "AsyncFunctionBody", e[e.ReuseTempVariableScope = 1048576] = "ReuseTempVariableScope", e[e.CustomPrologue = 2097152] = "CustomPrologue", e[e.NoHoisting = 4194304] = "NoHoisting", e[e.Iterator = 8388608] = "Iterator", e[e.NoAsciiEscaping = 16777216] = "NoAsciiEscaping", e))(tj || {}), sY = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.TypeScriptClassWrapper = 1] = "TypeScriptClassWrapper", e[e.NeverApplyImportHelper = 2] = "NeverApplyImportHelper", e[e.IgnoreSourceNewlines = 4] = "IgnoreSourceNewlines", e[e.Immutable = 8] = "Immutable", e[e.IndirectCall = 16] = "IndirectCall", e[e.TransformPrivateStaticElements = 32] = "TransformPrivateStaticElements", e))(sY || {}), yl = { + Classes: 2, + ForOf: 2, + Generators: 2, + Iteration: 2, + SpreadElements: 2, + RestElements: 2, + TaggedTemplates: 2, + DestructuringAssignment: 2, + BindingPatterns: 2, + ArrowFunctions: 2, + BlockScopedVariables: 2, + ObjectAssign: 2, + RegularExpressionFlagsUnicode: 2, + RegularExpressionFlagsSticky: 2, + Exponentiation: 3, + AsyncFunctions: 4, + ForAwaitOf: 5, + AsyncGenerators: 5, + AsyncIteration: 5, + ObjectSpreadRest: 5, + RegularExpressionFlagsDotAll: 5, + BindinglessCatch: 6, + BigInt: 7, + NullishCoalesce: 7, + OptionalChaining: 7, + LogicalAssignment: 8, + TopLevelAwait: 9, + ClassFields: 9, + PrivateNamesAndClassStaticBlocks: 9, + RegularExpressionFlagsHasIndices: 9, + ShebangComments: 10, + RegularExpressionFlagsUnicodeSets: 11, + UsingAndAwaitUsing: 99, + ClassAndClassElementDecorators: 99 + /* ESNext */ + }, aY = /* @__PURE__ */ ((e) => (e[e.Extends = 1] = "Extends", e[e.Assign = 2] = "Assign", e[e.Rest = 4] = "Rest", e[e.Decorate = 8] = "Decorate", e[ + e.ESDecorateAndRunInitializers = 8 + /* Decorate */ + ] = "ESDecorateAndRunInitializers", e[e.Metadata = 16] = "Metadata", e[e.Param = 32] = "Param", e[e.Awaiter = 64] = "Awaiter", e[e.Generator = 128] = "Generator", e[e.Values = 256] = "Values", e[e.Read = 512] = "Read", e[e.SpreadArray = 1024] = "SpreadArray", e[e.Await = 2048] = "Await", e[e.AsyncGenerator = 4096] = "AsyncGenerator", e[e.AsyncDelegator = 8192] = "AsyncDelegator", e[e.AsyncValues = 16384] = "AsyncValues", e[e.ExportStar = 32768] = "ExportStar", e[e.ImportStar = 65536] = "ImportStar", e[e.ImportDefault = 131072] = "ImportDefault", e[e.MakeTemplateObject = 262144] = "MakeTemplateObject", e[e.ClassPrivateFieldGet = 524288] = "ClassPrivateFieldGet", e[e.ClassPrivateFieldSet = 1048576] = "ClassPrivateFieldSet", e[e.ClassPrivateFieldIn = 2097152] = "ClassPrivateFieldIn", e[e.SetFunctionName = 4194304] = "SetFunctionName", e[e.PropKey = 8388608] = "PropKey", e[e.AddDisposableResourceAndDisposeResources = 16777216] = "AddDisposableResourceAndDisposeResources", e[e.RewriteRelativeImportExtension = 33554432] = "RewriteRelativeImportExtension", e[ + e.FirstEmitHelper = 1 + /* Extends */ + ] = "FirstEmitHelper", e[ + e.LastEmitHelper = 16777216 + /* AddDisposableResourceAndDisposeResources */ + ] = "LastEmitHelper", e[ + e.ForOfIncludes = 256 + /* Values */ + ] = "ForOfIncludes", e[ + e.ForAwaitOfIncludes = 16384 + /* AsyncValues */ + ] = "ForAwaitOfIncludes", e[e.AsyncGeneratorIncludes = 6144] = "AsyncGeneratorIncludes", e[e.AsyncDelegatorIncludes = 26624] = "AsyncDelegatorIncludes", e[e.SpreadIncludes = 1536] = "SpreadIncludes", e))(aY || {}), oY = /* @__PURE__ */ ((e) => (e[e.SourceFile = 0] = "SourceFile", e[e.Expression = 1] = "Expression", e[e.IdentifierName = 2] = "IdentifierName", e[e.MappedTypeParameter = 3] = "MappedTypeParameter", e[e.Unspecified = 4] = "Unspecified", e[e.EmbeddedStatement = 5] = "EmbeddedStatement", e[e.JsxAttributeValue = 6] = "JsxAttributeValue", e[e.ImportTypeNodeAttributes = 7] = "ImportTypeNodeAttributes", e))(oY || {}), cY = /* @__PURE__ */ ((e) => (e[e.Parentheses = 1] = "Parentheses", e[e.TypeAssertions = 2] = "TypeAssertions", e[e.NonNullAssertions = 4] = "NonNullAssertions", e[e.PartiallyEmittedExpressions = 8] = "PartiallyEmittedExpressions", e[e.ExpressionsWithTypeArguments = 16] = "ExpressionsWithTypeArguments", e[e.Assertions = 6] = "Assertions", e[e.All = 31] = "All", e[e.ExcludeJSDocTypeAssertion = -2147483648] = "ExcludeJSDocTypeAssertion", e))(cY || {}), lY = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.InParameters = 1] = "InParameters", e[e.VariablesHoistedInParameters = 2] = "VariablesHoistedInParameters", e))(lY || {}), uY = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.SingleLine = 0] = "SingleLine", e[e.MultiLine = 1] = "MultiLine", e[e.PreserveLines = 2] = "PreserveLines", e[e.LinesMask = 3] = "LinesMask", e[e.NotDelimited = 0] = "NotDelimited", e[e.BarDelimited = 4] = "BarDelimited", e[e.AmpersandDelimited = 8] = "AmpersandDelimited", e[e.CommaDelimited = 16] = "CommaDelimited", e[e.AsteriskDelimited = 32] = "AsteriskDelimited", e[e.DelimitersMask = 60] = "DelimitersMask", e[e.AllowTrailingComma = 64] = "AllowTrailingComma", e[e.Indented = 128] = "Indented", e[e.SpaceBetweenBraces = 256] = "SpaceBetweenBraces", e[e.SpaceBetweenSiblings = 512] = "SpaceBetweenSiblings", e[e.Braces = 1024] = "Braces", e[e.Parenthesis = 2048] = "Parenthesis", e[e.AngleBrackets = 4096] = "AngleBrackets", e[e.SquareBrackets = 8192] = "SquareBrackets", e[e.BracketsMask = 15360] = "BracketsMask", e[e.OptionalIfUndefined = 16384] = "OptionalIfUndefined", e[e.OptionalIfEmpty = 32768] = "OptionalIfEmpty", e[e.Optional = 49152] = "Optional", e[e.PreferNewLine = 65536] = "PreferNewLine", e[e.NoTrailingNewLine = 131072] = "NoTrailingNewLine", e[e.NoInterveningComments = 262144] = "NoInterveningComments", e[e.NoSpaceIfEmpty = 524288] = "NoSpaceIfEmpty", e[e.SingleElement = 1048576] = "SingleElement", e[e.SpaceAfterList = 2097152] = "SpaceAfterList", e[e.Modifiers = 2359808] = "Modifiers", e[e.HeritageClauses = 512] = "HeritageClauses", e[e.SingleLineTypeLiteralMembers = 768] = "SingleLineTypeLiteralMembers", e[e.MultiLineTypeLiteralMembers = 32897] = "MultiLineTypeLiteralMembers", e[e.SingleLineTupleTypeElements = 528] = "SingleLineTupleTypeElements", e[e.MultiLineTupleTypeElements = 657] = "MultiLineTupleTypeElements", e[e.UnionTypeConstituents = 516] = "UnionTypeConstituents", e[e.IntersectionTypeConstituents = 520] = "IntersectionTypeConstituents", e[e.ObjectBindingPatternElements = 525136] = "ObjectBindingPatternElements", e[e.ArrayBindingPatternElements = 524880] = "ArrayBindingPatternElements", e[e.ObjectLiteralExpressionProperties = 526226] = "ObjectLiteralExpressionProperties", e[e.ImportAttributes = 526226] = "ImportAttributes", e[ + e.ImportClauseEntries = 526226 + /* ImportAttributes */ + ] = "ImportClauseEntries", e[e.ArrayLiteralExpressionElements = 8914] = "ArrayLiteralExpressionElements", e[e.CommaListElements = 528] = "CommaListElements", e[e.CallExpressionArguments = 2576] = "CallExpressionArguments", e[e.NewExpressionArguments = 18960] = "NewExpressionArguments", e[e.TemplateExpressionSpans = 262144] = "TemplateExpressionSpans", e[e.SingleLineBlockStatements = 768] = "SingleLineBlockStatements", e[e.MultiLineBlockStatements = 129] = "MultiLineBlockStatements", e[e.VariableDeclarationList = 528] = "VariableDeclarationList", e[e.SingleLineFunctionBodyStatements = 768] = "SingleLineFunctionBodyStatements", e[ + e.MultiLineFunctionBodyStatements = 1 + /* MultiLine */ + ] = "MultiLineFunctionBodyStatements", e[ + e.ClassHeritageClauses = 0 + /* SingleLine */ + ] = "ClassHeritageClauses", e[e.ClassMembers = 129] = "ClassMembers", e[e.InterfaceMembers = 129] = "InterfaceMembers", e[e.EnumMembers = 145] = "EnumMembers", e[e.CaseBlockClauses = 129] = "CaseBlockClauses", e[e.NamedImportsOrExportsElements = 525136] = "NamedImportsOrExportsElements", e[e.JsxElementOrFragmentChildren = 262144] = "JsxElementOrFragmentChildren", e[e.JsxElementAttributes = 262656] = "JsxElementAttributes", e[e.CaseOrDefaultClauseStatements = 163969] = "CaseOrDefaultClauseStatements", e[e.HeritageClauseTypes = 528] = "HeritageClauseTypes", e[e.SourceFileStatements = 131073] = "SourceFileStatements", e[e.Decorators = 2146305] = "Decorators", e[e.TypeArguments = 53776] = "TypeArguments", e[e.TypeParameters = 53776] = "TypeParameters", e[e.Parameters = 2576] = "Parameters", e[e.IndexSignatureParameters = 8848] = "IndexSignatureParameters", e[e.JSDocComment = 33] = "JSDocComment", e))(uY || {}), _Y = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.TripleSlashXML = 1] = "TripleSlashXML", e[e.SingleLine = 2] = "SingleLine", e[e.MultiLine = 4] = "MultiLine", e[e.All = 7] = "All", e[ + e.Default = 7 + /* All */ + ] = "Default", e))(_Y || {}), UI = { + reference: { + args: [ + { name: "types", optional: !0, captureSpan: !0 }, + { name: "lib", optional: !0, captureSpan: !0 }, + { name: "path", optional: !0, captureSpan: !0 }, + { name: "no-default-lib", optional: !0 }, + { name: "resolution-mode", optional: !0 }, + { name: "preserve", optional: !0 } + ], + kind: 1 + /* TripleSlashXML */ + }, + "amd-dependency": { + args: [{ name: "path" }, { name: "name", optional: !0 }], + kind: 1 + /* TripleSlashXML */ + }, + "amd-module": { + args: [{ name: "name" }], + kind: 1 + /* TripleSlashXML */ + }, + "ts-check": { + kind: 2 + /* SingleLine */ + }, + "ts-nocheck": { + kind: 2 + /* SingleLine */ + }, + jsx: { + args: [{ name: "factory" }], + kind: 4 + /* MultiLine */ + }, + jsxfrag: { + args: [{ name: "factory" }], + kind: 4 + /* MultiLine */ + }, + jsximportsource: { + args: [{ name: "factory" }], + kind: 4 + /* MultiLine */ + }, + jsxruntime: { + args: [{ name: "factory" }], + kind: 4 + /* MultiLine */ + } + }, fY = /* @__PURE__ */ ((e) => (e[e.ParseAll = 0] = "ParseAll", e[e.ParseNone = 1] = "ParseNone", e[e.ParseForTypeErrors = 2] = "ParseForTypeErrors", e[e.ParseForTypeInfo = 3] = "ParseForTypeInfo", e))(fY || {}); + function n4(e) { + let t = 5381; + for (let n = 0; n < e.length; n++) + t = (t << 5) + t + e.charCodeAt(n); + return t.toString(); + } + function fge() { + Error.stackTraceLimit < 100 && (Error.stackTraceLimit = 100); + } + var pY = /* @__PURE__ */ ((e) => (e[e.Created = 0] = "Created", e[e.Changed = 1] = "Changed", e[e.Deleted = 2] = "Deleted", e))(pY || {}), rj = /* @__PURE__ */ ((e) => (e[e.High = 2e3] = "High", e[e.Medium = 500] = "Medium", e[e.Low = 250] = "Low", e))(rj || {}), V_ = /* @__PURE__ */ new Date(0); + function YT(e, t) { + return e.getModifiedTime(t) || V_; + } + function dY(e) { + return { + 250: e.Low, + 500: e.Medium, + 2e3: e.High + }; + } + var nj = { Low: 32, Medium: 64, High: 256 }, ij = dY(nj), VI = dY(nj); + function $5e(e) { + if (!e.getEnvironmentVariable) + return; + const t = s("TSC_WATCH_POLLINGINTERVAL", rj); + ij = o("TSC_WATCH_POLLINGCHUNKSIZE", nj) || ij, VI = o("TSC_WATCH_UNCHANGEDPOLLTHRESHOLDS", nj) || VI; + function n(c, _) { + return e.getEnvironmentVariable(`${c}_${_.toUpperCase()}`); + } + function i(c) { + let _; + return u("Low"), u("Medium"), u("High"), _; + function u(m) { + const g = n(c, m); + g && ((_ || (_ = {}))[m] = Number(g)); + } + } + function s(c, _) { + const u = i(c); + if (u) + return m("Low"), m("Medium"), m("High"), !0; + return !1; + function m(g) { + _[g] = u[g] || _[g]; + } + } + function o(c, _) { + const u = i(c); + return (t || u) && dY(u ? { ..._, ...u } : _); + } + } + function pge(e, t, n, i, s) { + let o = n; + for (let _ = t.length; i && _; c(), _--) { + const u = t[n]; + if (u) { + if (u.isClosed) { + t[n] = void 0; + continue; + } + } else continue; + i--; + const m = Z5e(u, YT(e, u.fileName)); + if (u.isClosed) { + t[n] = void 0; + continue; + } + s?.(u, n, m), t[n] && (o < n && (t[o] = u, t[n] = void 0), o++); + } + return n; + function c() { + n++, n === t.length && (o < n && (t.length = o), n = 0, o = 0); + } + } + function X5e(e) { + const t = [], n = [], i = _( + 250 + /* Low */ + ), s = _( + 500 + /* Medium */ + ), o = _( + 2e3 + /* High */ + ); + return c; + function c(w, A, O) { + const F = { + fileName: w, + callback: A, + unchangedPolls: 0, + mtime: YT(e, w) + }; + return t.push(F), S(F, O), { + close: () => { + F.isClosed = !0, XT(t, F); + } + }; + } + function _(w) { + const A = []; + return A.pollingInterval = w, A.pollIndex = 0, A.pollScheduled = !1, A; + } + function u(w, A) { + A.pollIndex = g(A, A.pollingInterval, A.pollIndex, ij[A.pollingInterval]), A.length ? D(A.pollingInterval) : (E.assert(A.pollIndex === 0), A.pollScheduled = !1); + } + function m(w, A) { + g( + n, + 250, + /*pollIndex*/ + 0, + n.length + ), u(w, A), !A.pollScheduled && n.length && D( + 250 + /* Low */ + ); + } + function g(w, A, O, F) { + return pge( + e, + w, + O, + F, + R + ); + function R(W, V, $) { + $ ? (W.unchangedPolls = 0, w !== n && (w[V] = void 0, T(W))) : W.unchangedPolls !== VI[A] ? W.unchangedPolls++ : w === n ? (W.unchangedPolls = 1, w[V] = void 0, S( + W, + 250 + /* Low */ + )) : A !== 2e3 && (W.unchangedPolls++, w[V] = void 0, S( + W, + A === 250 ? 500 : 2e3 + /* High */ + )); + } + } + function h(w) { + switch (w) { + case 250: + return i; + case 500: + return s; + case 2e3: + return o; + } + } + function S(w, A) { + h(A).push(w), C(A); + } + function T(w) { + n.push(w), C( + 250 + /* Low */ + ); + } + function C(w) { + h(w).pollScheduled || D(w); + } + function D(w) { + h(w).pollScheduled = e.setTimeout(w === 250 ? m : u, w, w === 250 ? "pollLowPollingIntervalQueue" : "pollPollingIntervalQueue", h(w)); + } + } + function Q5e(e, t, n, i) { + const s = wp(), o = i ? /* @__PURE__ */ new Map() : void 0, c = /* @__PURE__ */ new Map(), _ = Wl(t); + return u; + function u(g, h, S, T) { + const C = _(g); + s.add(C, h).length === 1 && o && o.set(C, n(g) || V_); + const D = Hn(C) || ".", w = c.get(D) || m(Hn(g) || ".", D, T); + return w.referenceCount++, { + close: () => { + w.referenceCount === 1 ? (w.close(), c.delete(D)) : w.referenceCount--, s.remove(C, h); + } + }; + } + function m(g, h, S) { + const T = e( + g, + 1, + (C, D) => { + if (!rs(D)) return; + const w = Xi(D, g), A = _(w), O = w && s.get(A); + if (O) { + let F, R = 1; + if (o) { + const W = o.get(A); + if (C === "change" && (F = n(w) || V_, F.getTime() === W.getTime())) + return; + F || (F = n(w) || V_), o.set(A, F), W === V_ ? R = 0 : F === V_ && (R = 2); + } + for (const W of O) + W(w, R, F); + } + }, + /*recursive*/ + !1, + 500, + S + ); + return T.referenceCount = 0, c.set(h, T), T; + } + } + function Y5e(e) { + const t = []; + let n = 0, i; + return s; + function s(_, u) { + const m = { + fileName: _, + callback: u, + mtime: YT(e, _) + }; + return t.push(m), c(), { + close: () => { + m.isClosed = !0, XT(t, m); + } + }; + } + function o() { + i = void 0, n = pge(e, t, n, ij[ + 250 + /* Low */ + ]), c(); + } + function c() { + !t.length || i || (i = e.setTimeout(o, 2e3, "pollQueue")); + } + } + function dge(e, t, n, i, s) { + const c = Wl(t)(n), _ = e.get(c); + return _ ? _.callbacks.push(i) : e.set(c, { + watcher: s( + // Cant infer types correctly so lets satisfy checker + (u, m, g) => { + var h; + return (h = e.get(c)) == null ? void 0 : h.callbacks.slice().forEach((S) => S(u, m, g)); + } + ), + callbacks: [i] + }), { + close: () => { + const u = e.get(c); + u && (!$E(u.callbacks, i) || u.callbacks.length || (e.delete(c), _p(u))); + } + }; + } + function Z5e(e, t) { + const n = e.mtime.getTime(), i = t.getTime(); + return n !== i ? (e.mtime = t, e.callback(e.fileName, sj(n, i), t), !0) : !1; + } + function sj(e, t) { + return e === 0 ? 0 : t === 0 ? 2 : 1; + } + var qI = ["/node_modules/.", "/.git", "/.#"], mge = Ja; + function bP(e) { + return mge(e); + } + function mY(e) { + mge = e; + } + function K5e({ + watchDirectory: e, + useCaseSensitiveFileNames: t, + getCurrentDirectory: n, + getAccessibleSortedChildDirectories: i, + fileSystemEntryExists: s, + realpath: o, + setTimeout: c, + clearTimeout: _ + }) { + const u = /* @__PURE__ */ new Map(), m = wp(), g = /* @__PURE__ */ new Map(); + let h; + const S = cC(!t), T = Wl(t); + return (U, _e, Z, J) => Z ? C(U, J, _e) : e(U, _e, Z, J); + function C(U, _e, Z, J) { + const re = T(U); + let te = u.get(re); + te ? te.refCount++ : (te = { + watcher: e( + U, + (le) => { + var Te; + V(le, _e) || (_e?.synchronousWatchDirectory ? ((Te = u.get(re)) != null && Te.targetWatcher || D(U, re, le), W(U, re, _e)) : w(U, re, le, _e)); + }, + /*recursive*/ + !1, + _e + ), + refCount: 1, + childWatches: He, + targetWatcher: void 0, + links: void 0 + }, u.set(re, te), W(U, re, _e)), J && (te.links ?? (te.links = /* @__PURE__ */ new Set())).add(J); + const ie = Z && { dirName: U, callback: Z }; + return ie && m.add(re, ie), { + dirName: U, + close: () => { + var le; + const Te = E.checkDefined(u.get(re)); + ie && m.remove(re, ie), J && ((le = Te.links) == null || le.delete(J)), Te.refCount--, !Te.refCount && (u.delete(re), Te.links = void 0, _p(Te), R(Te), Te.childWatches.forEach(nd)); + } + }; + } + function D(U, _e, Z, J) { + var re, te; + let ie, le; + rs(Z) ? ie = Z : le = Z, m.forEach((Te, q) => { + if (!(le && le.get(q) === !0) && (q === _e || Vi(_e, q) && _e[q.length] === jo)) + if (le) + if (J) { + const me = le.get(q); + me ? me.push(...J) : le.set(q, J.slice()); + } else + le.set(q, !0); + else + Te.forEach(({ callback: me }) => me(ie)); + }), (te = (re = u.get(_e)) == null ? void 0 : re.links) == null || te.forEach((Te) => { + const q = (me) => Ln(Te, Df(U, me, T)); + le ? D(Te, T(Te), le, J?.map(q)) : D(Te, T(Te), q(ie)); + }); + } + function w(U, _e, Z, J) { + const re = u.get(_e); + if (re && s( + U, + 1 + /* Directory */ + )) { + A(U, _e, Z, J); + return; + } + D(U, _e, Z), R(re), F(re); + } + function A(U, _e, Z, J) { + const re = g.get(_e); + re ? re.fileNames.push(Z) : g.set(_e, { dirName: U, options: J, fileNames: [Z] }), h && (_(h), h = void 0), h = c(O, 1e3, "timerToUpdateChildWatches"); + } + function O() { + var U; + h = void 0, bP(`sysLog:: onTimerToUpdateChildWatches:: ${g.size}`); + const _e = ao(), Z = /* @__PURE__ */ new Map(); + for (; !h && g.size; ) { + const re = g.entries().next(); + E.assert(!re.done); + const { value: [te, { dirName: ie, options: le, fileNames: Te }] } = re; + g.delete(te); + const q = W(ie, te, le); + (U = u.get(te)) != null && U.targetWatcher || D(ie, te, Z, q ? void 0 : Te); + } + bP(`sysLog:: invokingWatchers:: Elapsed:: ${ao() - _e}ms:: ${g.size}`), m.forEach((re, te) => { + const ie = Z.get(te); + ie && re.forEach(({ callback: le, dirName: Te }) => { + os(ie) ? ie.forEach(le) : le(Te); + }); + }); + const J = ao() - _e; + bP(`sysLog:: Elapsed:: ${J}ms:: onTimerToUpdateChildWatches:: ${g.size} ${h}`); + } + function F(U) { + if (!U) return; + const _e = U.childWatches; + U.childWatches = He; + for (const Z of _e) + Z.close(), F(u.get(T(Z.dirName))); + } + function R(U) { + U?.targetWatcher && (U.targetWatcher.close(), U.targetWatcher = void 0); + } + function W(U, _e, Z) { + const J = u.get(_e); + if (!J) return !1; + const re = Hs(o(U)); + let te, ie; + return S(re, U) === 0 ? te = BI( + s( + U, + 1 + /* Directory */ + ) ? Li(i(U), (q) => { + const me = Xi(q, U); + return !V(me, Z) && S(me, Hs(o(me))) === 0 ? me : void 0; + }) : He, + J.childWatches, + (q, me) => S(q, me.dirName), + le, + nd, + Te + ) : J.targetWatcher && S(re, J.targetWatcher.dirName) === 0 ? (te = !1, E.assert(J.childWatches === He)) : (R(J), J.targetWatcher = C( + re, + Z, + /*callback*/ + void 0, + U + ), J.childWatches.forEach(nd), te = !0), J.childWatches = ie || He, te; + function le(q) { + const me = C(q, Z); + Te(me); + } + function Te(q) { + (ie || (ie = [])).push(q); + } + } + function V(U, _e) { + return at(qI, (Z) => $(U, Z)) || gge(U, _e, t, n); + } + function $(U, _e) { + return U.includes(_e) ? !0 : t ? !1 : T(U).includes(_e); + } + } + var gY = /* @__PURE__ */ ((e) => (e[e.File = 0] = "File", e[e.Directory = 1] = "Directory", e))(gY || {}); + function eFe(e) { + return (t, n, i) => e(n === 1 ? "change" : "rename", "", i); + } + function tFe(e, t, n) { + return (i, s, o) => { + i === "rename" ? (o || (o = n(e) || V_), t(e, o !== V_ ? 0 : 2, o)) : t(e, 1, o); + }; + } + function gge(e, t, n, i) { + return (t?.excludeDirectories || t?.excludeFiles) && ($F(e, t?.excludeFiles, n, i()) || $F(e, t?.excludeDirectories, n, i())); + } + function hge(e, t, n, i, s) { + return (o, c) => { + if (o === "rename") { + const _ = c ? Hs(Ln(e, c)) : e; + (!c || !gge(_, n, i, s)) && t(_); + } + }; + } + function hY({ + pollingWatchFileWorker: e, + getModifiedTime: t, + setTimeout: n, + clearTimeout: i, + fsWatchWorker: s, + fileSystemEntryExists: o, + useCaseSensitiveFileNames: c, + getCurrentDirectory: _, + fsSupportsRecursiveFsWatch: u, + getAccessibleSortedChildDirectories: m, + realpath: g, + tscWatchFile: h, + useNonPollingWatchers: S, + tscWatchDirectory: T, + inodeWatching: C, + fsWatchWithTimestamp: D, + sysLog: w + }) { + const A = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new Map(), F = /* @__PURE__ */ new Map(); + let R, W, V, $, U = !1; + return { + watchFile: _e, + watchDirectory: ie + }; + function _e(oe, ke, ue, it) { + it = re(it, S); + const Oe = E.checkDefined(it.watchFile); + switch (Oe) { + case 0: + return q( + oe, + ke, + 250, + /*options*/ + void 0 + ); + case 1: + return q( + oe, + ke, + ue, + /*options*/ + void 0 + ); + case 2: + return Z()( + oe, + ke, + ue, + /*options*/ + void 0 + ); + case 3: + return J()( + oe, + ke, + /* pollingInterval */ + void 0, + /*options*/ + void 0 + ); + case 4: + return me( + oe, + 0, + tFe(oe, ke, t), + /*recursive*/ + !1, + ue, + tA(it) + ); + case 5: + return V || (V = Q5e(me, c, t, D)), V(oe, ke, ue, tA(it)); + default: + E.assertNever(Oe); + } + } + function Z() { + return R || (R = X5e({ getModifiedTime: t, setTimeout: n })); + } + function J() { + return W || (W = Y5e({ getModifiedTime: t, setTimeout: n })); + } + function re(oe, ke) { + if (oe && oe.watchFile !== void 0) return oe; + switch (h) { + case "PriorityPollingInterval": + return { + watchFile: 1 + /* PriorityPollingInterval */ + }; + case "DynamicPriorityPolling": + return { + watchFile: 2 + /* DynamicPriorityPolling */ + }; + case "UseFsEvents": + return te(4, 1, oe); + case "UseFsEventsWithFallbackDynamicPolling": + return te(4, 2, oe); + case "UseFsEventsOnParentDirectory": + ke = !0; + // fall through + default: + return ke ? ( + // Use notifications from FS to watch with falling back to fs.watchFile + te(5, 1, oe) + ) : ( + // Default to using fs events + { + watchFile: 4 + /* UseFsEvents */ + } + ); + } + } + function te(oe, ke, ue) { + const it = ue?.fallbackPolling; + return { + watchFile: oe, + fallbackPolling: it === void 0 ? ke : it + }; + } + function ie(oe, ke, ue, it) { + return u ? me( + oe, + 1, + hge(oe, ke, it, c, _), + ue, + 500, + tA(it) + ) : ($ || ($ = K5e({ + useCaseSensitiveFileNames: c, + getCurrentDirectory: _, + fileSystemEntryExists: o, + getAccessibleSortedChildDirectories: m, + watchDirectory: le, + realpath: g, + setTimeout: n, + clearTimeout: i + })), $(oe, ke, ue, it)); + } + function le(oe, ke, ue, it) { + E.assert(!ue); + const Oe = Te(it), xe = E.checkDefined(Oe.watchDirectory); + switch (xe) { + case 1: + return q( + oe, + () => ke(oe), + 500, + /*options*/ + void 0 + ); + case 2: + return Z()( + oe, + () => ke(oe), + 500, + /*options*/ + void 0 + ); + case 3: + return J()( + oe, + () => ke(oe), + /* pollingInterval */ + void 0, + /*options*/ + void 0 + ); + case 0: + return me( + oe, + 1, + hge(oe, ke, it, c, _), + ue, + 500, + tA(Oe) + ); + default: + E.assertNever(xe); + } + } + function Te(oe) { + if (oe && oe.watchDirectory !== void 0) return oe; + switch (T) { + case "RecursiveDirectoryUsingFsWatchFile": + return { + watchDirectory: 1 + /* FixedPollingInterval */ + }; + case "RecursiveDirectoryUsingDynamicPriorityPolling": + return { + watchDirectory: 2 + /* DynamicPriorityPolling */ + }; + default: + const ke = oe?.fallbackPolling; + return { + watchDirectory: 0, + fallbackPolling: ke !== void 0 ? ke : void 0 + }; + } + } + function q(oe, ke, ue, it) { + return dge( + A, + c, + oe, + ke, + (Oe) => e(oe, Oe, ue, it) + ); + } + function me(oe, ke, ue, it, Oe, xe) { + return dge( + it ? F : O, + c, + oe, + ue, + (he) => Ce(oe, ke, he, it, Oe, xe) + ); + } + function Ce(oe, ke, ue, it, Oe, xe) { + let he, ne; + C && (he = oe.substring(oe.lastIndexOf(jo)), ne = he.slice(jo.length)); + let Ae = o(oe, ke) ? we() : Lt(); + return { + close: () => { + Ae && (Ae.close(), Ae = void 0); + } + }; + function De(er) { + Ae && (w(`sysLog:: ${oe}:: Changing watcher to ${er === we ? "Present" : "Missing"}FileSystemEntryWatcher`), Ae.close(), Ae = er()); + } + function we() { + if (U) + return w(`sysLog:: ${oe}:: Defaulting to watchFile`), bt(); + try { + const er = (ke === 1 || !D ? s : Ee)( + oe, + it, + C ? Ue : ue + ); + return er.on("error", () => { + ue("rename", ""), De(Lt); + }), er; + } catch (er) { + return U || (U = er.code === "ENOSPC"), w(`sysLog:: ${oe}:: Changing to watchFile`), bt(); + } + } + function Ue(er, Nr) { + let Dt; + if (Nr && Eo(Nr, "~") && (Dt = Nr, Nr = Nr.slice(0, Nr.length - 1)), er === "rename" && (!Nr || Nr === ne || Eo(Nr, he))) { + const Qt = t(oe) || V_; + Dt && ue(er, Dt, Qt), ue(er, Nr, Qt), C ? De(Qt === V_ ? Lt : we) : Qt === V_ && De(Lt); + } else + Dt && ue(er, Dt), ue(er, Nr); + } + function bt() { + return _e( + oe, + eFe(ue), + Oe, + xe + ); + } + function Lt() { + return _e( + oe, + (er, Nr, Dt) => { + Nr === 0 && (Dt || (Dt = t(oe) || V_), Dt !== V_ && (ue("rename", "", Dt), De(we))); + }, + Oe, + xe + ); + } + } + function Ee(oe, ke, ue) { + let it = t(oe) || V_; + return s(oe, ke, (Oe, xe, he) => { + Oe === "change" && (he || (he = t(oe) || V_), he.getTime() === it.getTime()) || (it = he || t(oe) || V_, ue(Oe, xe, it)); + }); + } + } + function yY(e) { + const t = e.writeFile; + e.writeFile = (n, i, s) => WB( + n, + i, + !!s, + (o, c, _) => t.call(e, o, c, _), + (o) => e.createDirectory(o), + (o) => e.directoryExists(o) + ); + } + var nl = (() => { + const e = "\uFEFF"; + function t() { + const i = /^native |^\([^)]+\)$|^(?:internal[\\/]|[\w\s]+(?:\.js)?$)/, s = zE, o = zE, c = zE; + let _; + try { + _ = zE; + } catch { + _ = void 0; + } + let u, m = "./profile.cpuprofile"; + const g = process.platform === "darwin", h = process.platform === "linux" || g, S = { throwIfNoEntry: !1 }, T = c.platform(), C = Z(), D = s.realpathSync.native ? process.platform === "win32" ? ke : s.realpathSync.native : s.realpathSync, w = __filename.endsWith("sys.js") ? o.join(o.dirname(__dirname), "__fake__.js") : __filename, A = process.platform === "win32" || g, O = Iu(() => process.cwd()), { watchFile: F, watchDirectory: R } = hY({ + pollingWatchFileWorker: re, + getModifiedTime: it, + setTimeout, + clearTimeout, + fsWatchWorker: te, + useCaseSensitiveFileNames: C, + getCurrentDirectory: O, + fileSystemEntryExists: me, + // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows + // (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643) + fsSupportsRecursiveFsWatch: A, + getAccessibleSortedChildDirectories: (ne) => Te(ne).directories, + realpath: ue, + tscWatchFile: process.env.TSC_WATCHFILE, + useNonPollingWatchers: !!process.env.TSC_NONPOLLING_WATCHER, + tscWatchDirectory: process.env.TSC_WATCHDIRECTORY, + inodeWatching: h, + fsWatchWithTimestamp: g, + sysLog: bP + }), W = { + args: process.argv.slice(2), + newLine: c.EOL, + useCaseSensitiveFileNames: C, + write(ne) { + process.stdout.write(ne); + }, + getWidthOfTerminal() { + return process.stdout.columns; + }, + writeOutputIsTTY() { + return process.stdout.isTTY; + }, + readFile: ie, + writeFile: le, + watchFile: F, + watchDirectory: R, + preferNonRecursiveWatch: !A, + resolvePath: (ne) => o.resolve(ne), + fileExists: Ce, + directoryExists: Ee, + getAccessibleFileSystemEntries: Te, + createDirectory(ne) { + if (!W.directoryExists(ne)) + try { + s.mkdirSync(ne); + } catch (Ae) { + if (Ae.code !== "EEXIST") + throw Ae; + } + }, + getExecutingFilePath() { + return w; + }, + getCurrentDirectory: O, + getDirectories: oe, + getEnvironmentVariable(ne) { + return process.env[ne] || ""; + }, + readDirectory: q, + getModifiedTime: it, + setModifiedTime: Oe, + deleteFile: xe, + createHash: _ ? he : n4, + createSHA256Hash: _ ? he : void 0, + getMemoryUsage() { + return r5e.gc && r5e.gc(), process.memoryUsage().heapUsed; + }, + getFileSize(ne) { + const Ae = V(ne); + return Ae?.isFile() ? Ae.size : 0; + }, + exit(ne) { + _e(() => process.exit(ne)); + }, + enableCPUProfiler: $, + disableCPUProfiler: _e, + cpuProfilingEnabled: () => !!u || as(process.execArgv, "--cpu-prof") || as(process.execArgv, "--prof"), + realpath: ue, + debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || at(process.execArgv, (ne) => /^--(?:inspect|debug)(?:-brk)?(?:=\d+)?$/i.test(ne)) || !!process.recordreplay, + tryEnableSourceMapsForHost() { + try { + zE.install(); + } catch { + } + }, + setTimeout, + clearTimeout, + clearScreen: () => { + process.stdout.write("\x1B[2J\x1B[3J\x1B[H"); + }, + setBlocking: () => { + var ne; + const Ae = (ne = process.stdout) == null ? void 0 : ne._handle; + Ae && Ae.setBlocking && Ae.setBlocking(!0); + }, + base64decode: (ne) => Buffer.from(ne, "base64").toString("utf8"), + base64encode: (ne) => Buffer.from(ne).toString("base64"), + require: (ne, Ae) => { + try { + const De = Wre(Ae, ne, W); + return { module: a5e(De), modulePath: De, error: void 0 }; + } catch (De) { + return { module: void 0, modulePath: void 0, error: De }; + } + } + }; + return W; + function V(ne) { + try { + return s.statSync(ne, S); + } catch { + return; + } + } + function $(ne, Ae) { + if (u) + return Ae(), !1; + const De = zE; + if (!De || !De.Session) + return Ae(), !1; + const we = new De.Session(); + return we.connect(), we.post("Profiler.enable", () => { + we.post("Profiler.start", () => { + u = we, m = ne, Ae(); + }); + }), !0; + } + function U(ne) { + let Ae = 0; + const De = /* @__PURE__ */ new Map(), we = Vl(o.dirname(w)), Ue = `file://${Xm(we) === 1 ? "" : "/"}${we}`; + for (const bt of ne.nodes) + if (bt.callFrame.url) { + const Lt = Vl(bt.callFrame.url); + Zf(Ue, Lt, C) ? bt.callFrame.url = KT( + Ue, + Lt, + Ue, + Wl(C), + /*isAbsolutePathAnUrl*/ + !0 + ) : i.test(Lt) || (bt.callFrame.url = (De.has(Lt) ? De : De.set(Lt, `external${Ae}.js`)).get(Lt), Ae++); + } + return ne; + } + function _e(ne) { + if (u && u !== "stopping") { + const Ae = u; + return u.post("Profiler.stop", (De, { profile: we }) => { + var Ue; + if (!De) { + (Ue = V(m)) != null && Ue.isDirectory() && (m = o.join(m, `${(/* @__PURE__ */ new Date()).toISOString().replace(/:/g, "-")}+P${process.pid}.cpuprofile`)); + try { + s.mkdirSync(o.dirname(m), { recursive: !0 }); + } catch { + } + s.writeFileSync(m, JSON.stringify(U(we))); + } + u = void 0, Ae.disconnect(), ne(); + }), u = "stopping", !0; + } else + return ne(), !1; + } + function Z() { + return T === "win32" || T === "win64" ? !1 : !Ce(J(__filename)); + } + function J(ne) { + return ne.replace(/\w/g, (Ae) => { + const De = Ae.toUpperCase(); + return Ae === De ? Ae.toLowerCase() : De; + }); + } + function re(ne, Ae, De) { + s.watchFile(ne, { persistent: !0, interval: De }, Ue); + let we; + return { + close: () => s.unwatchFile(ne, Ue) + }; + function Ue(bt, Lt) { + const er = +Lt.mtime == 0 || we === 2; + if (+bt.mtime == 0) { + if (er) + return; + we = 2; + } else if (er) + we = 0; + else { + if (+bt.mtime == +Lt.mtime) + return; + we = 1; + } + Ae(ne, we, bt.mtime); + } + } + function te(ne, Ae, De) { + return s.watch( + ne, + A ? { persistent: !0, recursive: !!Ae } : { persistent: !0 }, + De + ); + } + function ie(ne, Ae) { + let De; + try { + De = s.readFileSync(ne); + } catch { + return; + } + let we = De.length; + if (we >= 2 && De[0] === 254 && De[1] === 255) { + we &= -2; + for (let Ue = 0; Ue < we; Ue += 2) { + const bt = De[Ue]; + De[Ue] = De[Ue + 1], De[Ue + 1] = bt; + } + return De.toString("utf16le", 2); + } + return we >= 2 && De[0] === 255 && De[1] === 254 ? De.toString("utf16le", 2) : we >= 3 && De[0] === 239 && De[1] === 187 && De[2] === 191 ? De.toString("utf8", 3) : De.toString("utf8"); + } + function le(ne, Ae, De) { + De && (Ae = e + Ae); + let we; + try { + we = s.openSync(ne, "w"), s.writeSync( + we, + Ae, + /*position*/ + void 0, + "utf8" + ); + } finally { + we !== void 0 && s.closeSync(we); + } + } + function Te(ne) { + try { + const Ae = s.readdirSync(ne || ".", { withFileTypes: !0 }), De = [], we = []; + for (const Ue of Ae) { + const bt = typeof Ue == "string" ? Ue : Ue.name; + if (bt === "." || bt === "..") + continue; + let Lt; + if (typeof Ue == "string" || Ue.isSymbolicLink()) { + const er = Ln(ne, bt); + if (Lt = V(er), !Lt) + continue; + } else + Lt = Ue; + Lt.isFile() ? De.push(bt) : Lt.isDirectory() && we.push(bt); + } + return De.sort(), we.sort(), { files: De, directories: we }; + } catch { + return xJ; + } + } + function q(ne, Ae, De, we, Ue) { + return vJ(ne, Ae, De, we, C, process.cwd(), Ue, Te, ue); + } + function me(ne, Ae) { + const De = V(ne); + if (!De) + return !1; + switch (Ae) { + case 0: + return De.isFile(); + case 1: + return De.isDirectory(); + default: + return !1; + } + } + function Ce(ne) { + return me( + ne, + 0 + /* File */ + ); + } + function Ee(ne) { + return me( + ne, + 1 + /* Directory */ + ); + } + function oe(ne) { + return Te(ne).directories.slice(); + } + function ke(ne) { + return ne.length < 260 ? s.realpathSync.native(ne) : s.realpathSync(ne); + } + function ue(ne) { + try { + return D(ne); + } catch { + return ne; + } + } + function it(ne) { + var Ae; + return (Ae = V(ne)) == null ? void 0 : Ae.mtime; + } + function Oe(ne, Ae) { + try { + s.utimesSync(ne, Ae, Ae); + } catch { + return; + } + } + function xe(ne) { + try { + return s.unlinkSync(ne); + } catch { + return; + } + } + function he(ne) { + const Ae = _.createHash("sha256"); + return Ae.update(ne), Ae.digest("hex"); + } + } + let n; + return MR() && (n = t()), n && yY(n), n; + })(); + function yge(e) { + nl = e; + } + nl && nl.getEnvironmentVariable && ($5e(nl), E.setAssertionLevel( + /^development$/i.test(nl.getEnvironmentVariable("NODE_ENV")) ? 1 : 0 + /* None */ + )), nl && nl.debugMode && (E.isDebugging = !0); + var jo = "/", HI = "\\", vge = "://", rFe = /\\/g; + function aj(e) { + return e === 47 || e === 92; + } + function vY(e) { + return GI(e) < 0; + } + function q_(e) { + return GI(e) > 0; + } + function oj(e) { + const t = GI(e); + return t > 0 && t === e.length; + } + function i4(e) { + return GI(e) !== 0; + } + function lf(e) { + return /^\.\.?(?:$|[\\/])/.test(e); + } + function cj(e) { + return !i4(e) && !lf(e); + } + function _C(e) { + return Vc(e).includes("."); + } + function Bo(e, t) { + return e.length > t.length && Eo(e, t); + } + function vc(e, t) { + for (const n of t) + if (Bo(e, n)) + return !0; + return !1; + } + function Ay(e) { + return e.length > 0 && aj(e.charCodeAt(e.length - 1)); + } + function bge(e) { + return e >= 97 && e <= 122 || e >= 65 && e <= 90; + } + function nFe(e, t) { + const n = e.charCodeAt(t); + if (n === 58) return t + 1; + if (n === 37 && e.charCodeAt(t + 1) === 51) { + const i = e.charCodeAt(t + 2); + if (i === 97 || i === 65) return t + 3; + } + return -1; + } + function GI(e) { + if (!e) return 0; + const t = e.charCodeAt(0); + if (t === 47 || t === 92) { + if (e.charCodeAt(1) !== t) return 1; + const i = e.indexOf(t === 47 ? jo : HI, 2); + return i < 0 ? e.length : i + 1; + } + if (bge(t) && e.charCodeAt(1) === 58) { + const i = e.charCodeAt(2); + if (i === 47 || i === 92) return 3; + if (e.length === 2) return 2; + } + const n = e.indexOf(vge); + if (n !== -1) { + const i = n + vge.length, s = e.indexOf(jo, i); + if (s !== -1) { + const o = e.slice(0, n), c = e.slice(i, s); + if (o === "file" && (c === "" || c === "localhost") && bge(e.charCodeAt(s + 1))) { + const _ = nFe(e, s + 2); + if (_ !== -1) { + if (e.charCodeAt(_) === 47) + return ~(_ + 1); + if (_ === e.length) + return ~_; + } + } + return ~(s + 1); + } + return ~e.length; + } + return 0; + } + function Xm(e) { + const t = GI(e); + return t < 0 ? ~t : t; + } + function Hn(e) { + e = Vl(e); + const t = Xm(e); + return t === e.length ? e : (e = X1(e), e.slice(0, Math.max(t, e.lastIndexOf(jo)))); + } + function Vc(e, t, n) { + if (e = Vl(e), Xm(e) === e.length) return ""; + e = X1(e); + const s = e.slice(Math.max(Xm(e), e.lastIndexOf(jo) + 1)), o = t !== void 0 && n !== void 0 ? ZT(s, t, n) : void 0; + return o ? s.slice(0, s.length - o.length) : s; + } + function Sge(e, t, n) { + if (Vi(t, ".") || (t = "." + t), e.length >= t.length && e.charCodeAt(e.length - t.length) === 46) { + const i = e.slice(e.length - t.length); + if (n(i, t)) + return i; + } + } + function iFe(e, t, n) { + if (typeof t == "string") + return Sge(e, t, n) || ""; + for (const i of t) { + const s = Sge(e, i, n); + if (s) return s; + } + return ""; + } + function ZT(e, t, n) { + if (t) + return iFe(X1(e), t, n ? Py : bb); + const i = Vc(e), s = i.lastIndexOf("."); + return s >= 0 ? i.substring(s) : ""; + } + function sFe(e, t) { + const n = e.substring(0, t), i = e.substring(t).split(jo); + return i.length && !Co(i) && i.pop(), [n, ...i]; + } + function Ul(e, t = "") { + return e = Ln(t, e), sFe(e, Xm(e)); + } + function T0(e, t) { + return e.length === 0 ? "" : (e[0] && il(e[0])) + e.slice(1, t).join(jo); + } + function Vl(e) { + return e.includes("\\") ? e.replace(rFe, jo) : e; + } + function nS(e) { + if (!at(e)) return []; + const t = [e[0]]; + for (let n = 1; n < e.length; n++) { + const i = e[n]; + if (i && i !== ".") { + if (i === "..") { + if (t.length > 1) { + if (t[t.length - 1] !== "..") { + t.pop(); + continue; + } + } else if (t[0]) continue; + } + t.push(i); + } + } + return t; + } + function Ln(e, ...t) { + e && (e = Vl(e)); + for (let n of t) + n && (n = Vl(n), !e || Xm(n) !== 0 ? e = n : e = il(e) + n); + return e; + } + function Iy(e, ...t) { + return Hs(at(t) ? Ln(e, ...t) : Vl(e)); + } + function SP(e, t) { + return nS(Ul(e, t)); + } + function Xi(e, t) { + return T0(SP(e, t)); + } + function Hs(e) { + if (e = Vl(e), !uj.test(e)) + return e; + const t = e.replace(/\/\.\//g, "/").replace(/^\.\//, ""); + if (t !== e && (e = t, !uj.test(e))) + return e; + const n = T0(nS(Ul(e))); + return n && Ay(e) ? il(n) : n; + } + function aFe(e) { + return e.length === 0 ? "" : e.slice(1).join(jo); + } + function lj(e, t) { + return aFe(SP(e, t)); + } + function oo(e, t, n) { + const i = q_(e) ? Hs(e) : Xi(e, t); + return n(i); + } + function X1(e) { + return Ay(e) ? e.substr(0, e.length - 1) : e; + } + function il(e) { + return Ay(e) ? e : e + jo; + } + function iS(e) { + return !i4(e) && !lf(e) ? "./" + e : e; + } + function TP(e, t, n, i) { + const s = n !== void 0 && i !== void 0 ? ZT(e, n, i) : ZT(e); + return s ? e.slice(0, e.length - s.length) + (Vi(t, ".") ? t : "." + t) : e; + } + function $I(e, t) { + const n = OF(e); + return n ? e.slice(0, e.length - n.length) + (Vi(t, ".") ? t : "." + t) : TP(e, t); + } + var uj = /\/\/|(?:^|\/)\.\.?(?:$|\/)/; + function bY(e, t, n) { + if (e === t) return 0; + if (e === void 0) return -1; + if (t === void 0) return 1; + const i = e.substring(0, Xm(e)), s = t.substring(0, Xm(t)), o = gP(i, s); + if (o !== 0) + return o; + const c = e.substring(i.length), _ = t.substring(s.length); + if (!uj.test(c) && !uj.test(_)) + return n(c, _); + const u = nS(Ul(e)), m = nS(Ul(t)), g = Math.min(u.length, m.length); + for (let h = 1; h < g; h++) { + const S = n(u[h], m[h]); + if (S !== 0) + return S; + } + return uo(u.length, m.length); + } + function Tge(e, t) { + return bY(e, t, cu); + } + function xge(e, t) { + return bY(e, t, gP); + } + function xh(e, t, n, i) { + return typeof n == "string" ? (e = Ln(n, e), t = Ln(n, t)) : typeof n == "boolean" && (i = n), bY(e, t, cC(i)); + } + function Zf(e, t, n, i) { + if (typeof n == "string" ? (e = Ln(n, e), t = Ln(n, t)) : typeof n == "boolean" && (i = n), e === void 0 || t === void 0) return !1; + if (e === t) return !0; + const s = nS(Ul(e)), o = nS(Ul(t)); + if (o.length < s.length) + return !1; + const c = i ? Py : bb; + for (let _ = 0; _ < s.length; _++) + if (!(_ === 0 ? Py : c)(s[_], o[_])) + return !1; + return !0; + } + function _j(e, t, n) { + const i = n(e), s = n(t); + return Vi(i, s + "/") || Vi(i, s + "\\"); + } + function kge(e, t, n, i) { + const s = nS(Ul(e)), o = nS(Ul(t)); + let c; + for (c = 0; c < s.length && c < o.length; c++) { + const m = i(s[c]), g = i(o[c]); + if (!(c === 0 ? Py : n)(m, g)) break; + } + if (c === 0) + return o; + const _ = o.slice(c), u = []; + for (; c < s.length; c++) + u.push(".."); + return ["", ...u, ..._]; + } + function Df(e, t, n) { + E.assert(Xm(e) > 0 == Xm(t) > 0, "Paths must either both be absolute or both be relative"); + const o = kge(e, t, (typeof n == "boolean" ? n : !1) ? Py : bb, typeof n == "function" ? n : lo); + return T0(o); + } + function s4(e, t, n) { + return q_(e) ? KT( + t, + e, + t, + n, + /*isAbsolutePathAnUrl*/ + !1 + ) : e; + } + function fC(e, t, n) { + return iS(Df(Hn(e), t, n)); + } + function KT(e, t, n, i, s) { + const o = kge( + Iy(n, e), + Iy(n, t), + bb, + i + ), c = o[0]; + if (s && q_(c)) { + const _ = c.charAt(0) === jo ? "file://" : "file:///"; + o[0] = _ + c; + } + return T0(o); + } + function a4(e, t) { + for (; ; ) { + const n = t(e); + if (n !== void 0) + return n; + const i = Hn(e); + if (i === e) + return; + e = i; + } + } + function XI(e) { + return Eo(e, "/node_modules"); + } + function b(e, t, n, i, s, o, c) { + return { code: e, category: t, key: n, message: i, reportsUnnecessary: s, elidedInCompatabilityPyramid: o, reportsDeprecated: c }; + } + var p = { + Unterminated_string_literal: b(1002, 1, "Unterminated_string_literal_1002", "Unterminated string literal."), + Identifier_expected: b(1003, 1, "Identifier_expected_1003", "Identifier expected."), + _0_expected: b(1005, 1, "_0_expected_1005", "'{0}' expected."), + A_file_cannot_have_a_reference_to_itself: b(1006, 1, "A_file_cannot_have_a_reference_to_itself_1006", "A file cannot have a reference to itself."), + The_parser_expected_to_find_a_1_to_match_the_0_token_here: b(1007, 1, "The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007", "The parser expected to find a '{1}' to match the '{0}' token here."), + Trailing_comma_not_allowed: b(1009, 1, "Trailing_comma_not_allowed_1009", "Trailing comma not allowed."), + Asterisk_Slash_expected: b(1010, 1, "Asterisk_Slash_expected_1010", "'*/' expected."), + An_element_access_expression_should_take_an_argument: b(1011, 1, "An_element_access_expression_should_take_an_argument_1011", "An element access expression should take an argument."), + Unexpected_token: b(1012, 1, "Unexpected_token_1012", "Unexpected token."), + A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma: b(1013, 1, "A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013", "A rest parameter or binding pattern may not have a trailing comma."), + A_rest_parameter_must_be_last_in_a_parameter_list: b(1014, 1, "A_rest_parameter_must_be_last_in_a_parameter_list_1014", "A rest parameter must be last in a parameter list."), + Parameter_cannot_have_question_mark_and_initializer: b(1015, 1, "Parameter_cannot_have_question_mark_and_initializer_1015", "Parameter cannot have question mark and initializer."), + A_required_parameter_cannot_follow_an_optional_parameter: b(1016, 1, "A_required_parameter_cannot_follow_an_optional_parameter_1016", "A required parameter cannot follow an optional parameter."), + An_index_signature_cannot_have_a_rest_parameter: b(1017, 1, "An_index_signature_cannot_have_a_rest_parameter_1017", "An index signature cannot have a rest parameter."), + An_index_signature_parameter_cannot_have_an_accessibility_modifier: b(1018, 1, "An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018", "An index signature parameter cannot have an accessibility modifier."), + An_index_signature_parameter_cannot_have_a_question_mark: b(1019, 1, "An_index_signature_parameter_cannot_have_a_question_mark_1019", "An index signature parameter cannot have a question mark."), + An_index_signature_parameter_cannot_have_an_initializer: b(1020, 1, "An_index_signature_parameter_cannot_have_an_initializer_1020", "An index signature parameter cannot have an initializer."), + An_index_signature_must_have_a_type_annotation: b(1021, 1, "An_index_signature_must_have_a_type_annotation_1021", "An index signature must have a type annotation."), + An_index_signature_parameter_must_have_a_type_annotation: b(1022, 1, "An_index_signature_parameter_must_have_a_type_annotation_1022", "An index signature parameter must have a type annotation."), + readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature: b(1024, 1, "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024", "'readonly' modifier can only appear on a property declaration or index signature."), + An_index_signature_cannot_have_a_trailing_comma: b(1025, 1, "An_index_signature_cannot_have_a_trailing_comma_1025", "An index signature cannot have a trailing comma."), + Accessibility_modifier_already_seen: b(1028, 1, "Accessibility_modifier_already_seen_1028", "Accessibility modifier already seen."), + _0_modifier_must_precede_1_modifier: b(1029, 1, "_0_modifier_must_precede_1_modifier_1029", "'{0}' modifier must precede '{1}' modifier."), + _0_modifier_already_seen: b(1030, 1, "_0_modifier_already_seen_1030", "'{0}' modifier already seen."), + _0_modifier_cannot_appear_on_class_elements_of_this_kind: b(1031, 1, "_0_modifier_cannot_appear_on_class_elements_of_this_kind_1031", "'{0}' modifier cannot appear on class elements of this kind."), + super_must_be_followed_by_an_argument_list_or_member_access: b(1034, 1, "super_must_be_followed_by_an_argument_list_or_member_access_1034", "'super' must be followed by an argument list or member access."), + Only_ambient_modules_can_use_quoted_names: b(1035, 1, "Only_ambient_modules_can_use_quoted_names_1035", "Only ambient modules can use quoted names."), + Statements_are_not_allowed_in_ambient_contexts: b(1036, 1, "Statements_are_not_allowed_in_ambient_contexts_1036", "Statements are not allowed in ambient contexts."), + A_declare_modifier_cannot_be_used_in_an_already_ambient_context: b(1038, 1, "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038", "A 'declare' modifier cannot be used in an already ambient context."), + Initializers_are_not_allowed_in_ambient_contexts: b(1039, 1, "Initializers_are_not_allowed_in_ambient_contexts_1039", "Initializers are not allowed in ambient contexts."), + _0_modifier_cannot_be_used_in_an_ambient_context: b(1040, 1, "_0_modifier_cannot_be_used_in_an_ambient_context_1040", "'{0}' modifier cannot be used in an ambient context."), + _0_modifier_cannot_be_used_here: b(1042, 1, "_0_modifier_cannot_be_used_here_1042", "'{0}' modifier cannot be used here."), + _0_modifier_cannot_appear_on_a_module_or_namespace_element: b(1044, 1, "_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044", "'{0}' modifier cannot appear on a module or namespace element."), + Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier: b(1046, 1, "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046", "Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier."), + A_rest_parameter_cannot_be_optional: b(1047, 1, "A_rest_parameter_cannot_be_optional_1047", "A rest parameter cannot be optional."), + A_rest_parameter_cannot_have_an_initializer: b(1048, 1, "A_rest_parameter_cannot_have_an_initializer_1048", "A rest parameter cannot have an initializer."), + A_set_accessor_must_have_exactly_one_parameter: b(1049, 1, "A_set_accessor_must_have_exactly_one_parameter_1049", "A 'set' accessor must have exactly one parameter."), + A_set_accessor_cannot_have_an_optional_parameter: b(1051, 1, "A_set_accessor_cannot_have_an_optional_parameter_1051", "A 'set' accessor cannot have an optional parameter."), + A_set_accessor_parameter_cannot_have_an_initializer: b(1052, 1, "A_set_accessor_parameter_cannot_have_an_initializer_1052", "A 'set' accessor parameter cannot have an initializer."), + A_set_accessor_cannot_have_rest_parameter: b(1053, 1, "A_set_accessor_cannot_have_rest_parameter_1053", "A 'set' accessor cannot have rest parameter."), + A_get_accessor_cannot_have_parameters: b(1054, 1, "A_get_accessor_cannot_have_parameters_1054", "A 'get' accessor cannot have parameters."), + Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value: b(1055, 1, "Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compa_1055", "Type '{0}' is not a valid async function return type in ES5 because it does not refer to a Promise-compatible constructor value."), + Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: b(1056, 1, "Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056", "Accessors are only available when targeting ECMAScript 5 and higher."), + The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: b(1058, 1, "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058", "The return type of an async function must either be a valid promise or must not contain a callable 'then' member."), + A_promise_must_have_a_then_method: b(1059, 1, "A_promise_must_have_a_then_method_1059", "A promise must have a 'then' method."), + The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback: b(1060, 1, "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060", "The first parameter of the 'then' method of a promise must be a callback."), + Enum_member_must_have_initializer: b(1061, 1, "Enum_member_must_have_initializer_1061", "Enum member must have initializer."), + Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: b(1062, 1, "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", "Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."), + An_export_assignment_cannot_be_used_in_a_namespace: b(1063, 1, "An_export_assignment_cannot_be_used_in_a_namespace_1063", "An export assignment cannot be used in a namespace."), + The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0: b(1064, 1, "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064", "The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{0}>'?"), + The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type: b(1065, 1, "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1065", "The return type of an async function or method must be the global Promise type."), + In_ambient_enum_declarations_member_initializer_must_be_constant_expression: b(1066, 1, "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066", "In ambient enum declarations member initializer must be constant expression."), + Unexpected_token_A_constructor_method_accessor_or_property_was_expected: b(1068, 1, "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068", "Unexpected token. A constructor, method, accessor, or property was expected."), + Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces: b(1069, 1, "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069", "Unexpected token. A type parameter name was expected without curly braces."), + _0_modifier_cannot_appear_on_a_type_member: b(1070, 1, "_0_modifier_cannot_appear_on_a_type_member_1070", "'{0}' modifier cannot appear on a type member."), + _0_modifier_cannot_appear_on_an_index_signature: b(1071, 1, "_0_modifier_cannot_appear_on_an_index_signature_1071", "'{0}' modifier cannot appear on an index signature."), + A_0_modifier_cannot_be_used_with_an_import_declaration: b(1079, 1, "A_0_modifier_cannot_be_used_with_an_import_declaration_1079", "A '{0}' modifier cannot be used with an import declaration."), + Invalid_reference_directive_syntax: b(1084, 1, "Invalid_reference_directive_syntax_1084", "Invalid 'reference' directive syntax."), + _0_modifier_cannot_appear_on_a_constructor_declaration: b(1089, 1, "_0_modifier_cannot_appear_on_a_constructor_declaration_1089", "'{0}' modifier cannot appear on a constructor declaration."), + _0_modifier_cannot_appear_on_a_parameter: b(1090, 1, "_0_modifier_cannot_appear_on_a_parameter_1090", "'{0}' modifier cannot appear on a parameter."), + Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement: b(1091, 1, "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091", "Only a single variable declaration is allowed in a 'for...in' statement."), + Type_parameters_cannot_appear_on_a_constructor_declaration: b(1092, 1, "Type_parameters_cannot_appear_on_a_constructor_declaration_1092", "Type parameters cannot appear on a constructor declaration."), + Type_annotation_cannot_appear_on_a_constructor_declaration: b(1093, 1, "Type_annotation_cannot_appear_on_a_constructor_declaration_1093", "Type annotation cannot appear on a constructor declaration."), + An_accessor_cannot_have_type_parameters: b(1094, 1, "An_accessor_cannot_have_type_parameters_1094", "An accessor cannot have type parameters."), + A_set_accessor_cannot_have_a_return_type_annotation: b(1095, 1, "A_set_accessor_cannot_have_a_return_type_annotation_1095", "A 'set' accessor cannot have a return type annotation."), + An_index_signature_must_have_exactly_one_parameter: b(1096, 1, "An_index_signature_must_have_exactly_one_parameter_1096", "An index signature must have exactly one parameter."), + _0_list_cannot_be_empty: b(1097, 1, "_0_list_cannot_be_empty_1097", "'{0}' list cannot be empty."), + Type_parameter_list_cannot_be_empty: b(1098, 1, "Type_parameter_list_cannot_be_empty_1098", "Type parameter list cannot be empty."), + Type_argument_list_cannot_be_empty: b(1099, 1, "Type_argument_list_cannot_be_empty_1099", "Type argument list cannot be empty."), + Invalid_use_of_0_in_strict_mode: b(1100, 1, "Invalid_use_of_0_in_strict_mode_1100", "Invalid use of '{0}' in strict mode."), + with_statements_are_not_allowed_in_strict_mode: b(1101, 1, "with_statements_are_not_allowed_in_strict_mode_1101", "'with' statements are not allowed in strict mode."), + delete_cannot_be_called_on_an_identifier_in_strict_mode: b(1102, 1, "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102", "'delete' cannot be called on an identifier in strict mode."), + for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: b(1103, 1, "for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1103", "'for await' loops are only allowed within async functions and at the top levels of modules."), + A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: b(1104, 1, "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104", "A 'continue' statement can only be used within an enclosing iteration statement."), + A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: b(1105, 1, "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105", "A 'break' statement can only be used within an enclosing iteration or switch statement."), + The_left_hand_side_of_a_for_of_statement_may_not_be_async: b(1106, 1, "The_left_hand_side_of_a_for_of_statement_may_not_be_async_1106", "The left-hand side of a 'for...of' statement may not be 'async'."), + Jump_target_cannot_cross_function_boundary: b(1107, 1, "Jump_target_cannot_cross_function_boundary_1107", "Jump target cannot cross function boundary."), + A_return_statement_can_only_be_used_within_a_function_body: b(1108, 1, "A_return_statement_can_only_be_used_within_a_function_body_1108", "A 'return' statement can only be used within a function body."), + Expression_expected: b(1109, 1, "Expression_expected_1109", "Expression expected."), + Type_expected: b(1110, 1, "Type_expected_1110", "Type expected."), + Private_field_0_must_be_declared_in_an_enclosing_class: b(1111, 1, "Private_field_0_must_be_declared_in_an_enclosing_class_1111", "Private field '{0}' must be declared in an enclosing class."), + A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: b(1113, 1, "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113", "A 'default' clause cannot appear more than once in a 'switch' statement."), + Duplicate_label_0: b(1114, 1, "Duplicate_label_0_1114", "Duplicate label '{0}'."), + A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: b(1115, 1, "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115", "A 'continue' statement can only jump to a label of an enclosing iteration statement."), + A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement: b(1116, 1, "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116", "A 'break' statement can only jump to a label of an enclosing statement."), + An_object_literal_cannot_have_multiple_properties_with_the_same_name: b(1117, 1, "An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117", "An object literal cannot have multiple properties with the same name."), + An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name: b(1118, 1, "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118", "An object literal cannot have multiple get/set accessors with the same name."), + An_object_literal_cannot_have_property_and_accessor_with_the_same_name: b(1119, 1, "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119", "An object literal cannot have property and accessor with the same name."), + An_export_assignment_cannot_have_modifiers: b(1120, 1, "An_export_assignment_cannot_have_modifiers_1120", "An export assignment cannot have modifiers."), + Octal_literals_are_not_allowed_Use_the_syntax_0: b(1121, 1, "Octal_literals_are_not_allowed_Use_the_syntax_0_1121", "Octal literals are not allowed. Use the syntax '{0}'."), + Variable_declaration_list_cannot_be_empty: b(1123, 1, "Variable_declaration_list_cannot_be_empty_1123", "Variable declaration list cannot be empty."), + Digit_expected: b(1124, 1, "Digit_expected_1124", "Digit expected."), + Hexadecimal_digit_expected: b(1125, 1, "Hexadecimal_digit_expected_1125", "Hexadecimal digit expected."), + Unexpected_end_of_text: b(1126, 1, "Unexpected_end_of_text_1126", "Unexpected end of text."), + Invalid_character: b(1127, 1, "Invalid_character_1127", "Invalid character."), + Declaration_or_statement_expected: b(1128, 1, "Declaration_or_statement_expected_1128", "Declaration or statement expected."), + Statement_expected: b(1129, 1, "Statement_expected_1129", "Statement expected."), + case_or_default_expected: b(1130, 1, "case_or_default_expected_1130", "'case' or 'default' expected."), + Property_or_signature_expected: b(1131, 1, "Property_or_signature_expected_1131", "Property or signature expected."), + Enum_member_expected: b(1132, 1, "Enum_member_expected_1132", "Enum member expected."), + Variable_declaration_expected: b(1134, 1, "Variable_declaration_expected_1134", "Variable declaration expected."), + Argument_expression_expected: b(1135, 1, "Argument_expression_expected_1135", "Argument expression expected."), + Property_assignment_expected: b(1136, 1, "Property_assignment_expected_1136", "Property assignment expected."), + Expression_or_comma_expected: b(1137, 1, "Expression_or_comma_expected_1137", "Expression or comma expected."), + Parameter_declaration_expected: b(1138, 1, "Parameter_declaration_expected_1138", "Parameter declaration expected."), + Type_parameter_declaration_expected: b(1139, 1, "Type_parameter_declaration_expected_1139", "Type parameter declaration expected."), + Type_argument_expected: b(1140, 1, "Type_argument_expected_1140", "Type argument expected."), + String_literal_expected: b(1141, 1, "String_literal_expected_1141", "String literal expected."), + Line_break_not_permitted_here: b(1142, 1, "Line_break_not_permitted_here_1142", "Line break not permitted here."), + or_expected: b(1144, 1, "or_expected_1144", "'{' or ';' expected."), + or_JSX_element_expected: b(1145, 1, "or_JSX_element_expected_1145", "'{' or JSX element expected."), + Declaration_expected: b(1146, 1, "Declaration_expected_1146", "Declaration expected."), + Import_declarations_in_a_namespace_cannot_reference_a_module: b(1147, 1, "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", "Import declarations in a namespace cannot reference a module."), + Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: b(1148, 1, "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", "Cannot use imports, exports, or module augmentations when '--module' is 'none'."), + File_name_0_differs_from_already_included_file_name_1_only_in_casing: b(1149, 1, "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", "File name '{0}' differs from already included file name '{1}' only in casing."), + _0_declarations_must_be_initialized: b(1155, 1, "_0_declarations_must_be_initialized_1155", "'{0}' declarations must be initialized."), + _0_declarations_can_only_be_declared_inside_a_block: b(1156, 1, "_0_declarations_can_only_be_declared_inside_a_block_1156", "'{0}' declarations can only be declared inside a block."), + Unterminated_template_literal: b(1160, 1, "Unterminated_template_literal_1160", "Unterminated template literal."), + Unterminated_regular_expression_literal: b(1161, 1, "Unterminated_regular_expression_literal_1161", "Unterminated regular expression literal."), + An_object_member_cannot_be_declared_optional: b(1162, 1, "An_object_member_cannot_be_declared_optional_1162", "An object member cannot be declared optional."), + A_yield_expression_is_only_allowed_in_a_generator_body: b(1163, 1, "A_yield_expression_is_only_allowed_in_a_generator_body_1163", "A 'yield' expression is only allowed in a generator body."), + Computed_property_names_are_not_allowed_in_enums: b(1164, 1, "Computed_property_names_are_not_allowed_in_enums_1164", "Computed property names are not allowed in enums."), + A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: b(1165, 1, "A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165", "A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type."), + A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type: b(1166, 1, "A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_1166", "A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type."), + A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: b(1168, 1, "A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_ty_1168", "A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type."), + A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: b(1169, 1, "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169", "A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type."), + A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: b(1170, 1, "A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type__1170", "A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type."), + A_comma_expression_is_not_allowed_in_a_computed_property_name: b(1171, 1, "A_comma_expression_is_not_allowed_in_a_computed_property_name_1171", "A comma expression is not allowed in a computed property name."), + extends_clause_already_seen: b(1172, 1, "extends_clause_already_seen_1172", "'extends' clause already seen."), + extends_clause_must_precede_implements_clause: b(1173, 1, "extends_clause_must_precede_implements_clause_1173", "'extends' clause must precede 'implements' clause."), + Classes_can_only_extend_a_single_class: b(1174, 1, "Classes_can_only_extend_a_single_class_1174", "Classes can only extend a single class."), + implements_clause_already_seen: b(1175, 1, "implements_clause_already_seen_1175", "'implements' clause already seen."), + Interface_declaration_cannot_have_implements_clause: b(1176, 1, "Interface_declaration_cannot_have_implements_clause_1176", "Interface declaration cannot have 'implements' clause."), + Binary_digit_expected: b(1177, 1, "Binary_digit_expected_1177", "Binary digit expected."), + Octal_digit_expected: b(1178, 1, "Octal_digit_expected_1178", "Octal digit expected."), + Unexpected_token_expected: b(1179, 1, "Unexpected_token_expected_1179", "Unexpected token. '{' expected."), + Property_destructuring_pattern_expected: b(1180, 1, "Property_destructuring_pattern_expected_1180", "Property destructuring pattern expected."), + Array_element_destructuring_pattern_expected: b(1181, 1, "Array_element_destructuring_pattern_expected_1181", "Array element destructuring pattern expected."), + A_destructuring_declaration_must_have_an_initializer: b(1182, 1, "A_destructuring_declaration_must_have_an_initializer_1182", "A destructuring declaration must have an initializer."), + An_implementation_cannot_be_declared_in_ambient_contexts: b(1183, 1, "An_implementation_cannot_be_declared_in_ambient_contexts_1183", "An implementation cannot be declared in ambient contexts."), + Modifiers_cannot_appear_here: b(1184, 1, "Modifiers_cannot_appear_here_1184", "Modifiers cannot appear here."), + Merge_conflict_marker_encountered: b(1185, 1, "Merge_conflict_marker_encountered_1185", "Merge conflict marker encountered."), + A_rest_element_cannot_have_an_initializer: b(1186, 1, "A_rest_element_cannot_have_an_initializer_1186", "A rest element cannot have an initializer."), + A_parameter_property_may_not_be_declared_using_a_binding_pattern: b(1187, 1, "A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187", "A parameter property may not be declared using a binding pattern."), + Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement: b(1188, 1, "Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188", "Only a single variable declaration is allowed in a 'for...of' statement."), + The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer: b(1189, 1, "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189", "The variable declaration of a 'for...in' statement cannot have an initializer."), + The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer: b(1190, 1, "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190", "The variable declaration of a 'for...of' statement cannot have an initializer."), + An_import_declaration_cannot_have_modifiers: b(1191, 1, "An_import_declaration_cannot_have_modifiers_1191", "An import declaration cannot have modifiers."), + Module_0_has_no_default_export: b(1192, 1, "Module_0_has_no_default_export_1192", "Module '{0}' has no default export."), + An_export_declaration_cannot_have_modifiers: b(1193, 1, "An_export_declaration_cannot_have_modifiers_1193", "An export declaration cannot have modifiers."), + Export_declarations_are_not_permitted_in_a_namespace: b(1194, 1, "Export_declarations_are_not_permitted_in_a_namespace_1194", "Export declarations are not permitted in a namespace."), + export_Asterisk_does_not_re_export_a_default: b(1195, 1, "export_Asterisk_does_not_re_export_a_default_1195", "'export *' does not re-export a default."), + Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified: b(1196, 1, "Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified_1196", "Catch clause variable type annotation must be 'any' or 'unknown' if specified."), + Catch_clause_variable_cannot_have_an_initializer: b(1197, 1, "Catch_clause_variable_cannot_have_an_initializer_1197", "Catch clause variable cannot have an initializer."), + An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive: b(1198, 1, "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198", "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."), + Unterminated_Unicode_escape_sequence: b(1199, 1, "Unterminated_Unicode_escape_sequence_1199", "Unterminated Unicode escape sequence."), + Line_terminator_not_permitted_before_arrow: b(1200, 1, "Line_terminator_not_permitted_before_arrow_1200", "Line terminator not permitted before arrow."), + Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead: b(1202, 1, "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202", `Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.`), + Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead: b(1203, 1, "Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203", "Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead."), + Re_exporting_a_type_when_0_is_enabled_requires_using_export_type: b(1205, 1, "Re_exporting_a_type_when_0_is_enabled_requires_using_export_type_1205", "Re-exporting a type when '{0}' is enabled requires using 'export type'."), + Decorators_are_not_valid_here: b(1206, 1, "Decorators_are_not_valid_here_1206", "Decorators are not valid here."), + Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: b(1207, 1, "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207", "Decorators cannot be applied to multiple get/set accessors of the same name."), + Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0: b(1209, 1, "Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0_1209", "Invalid optional chain from new expression. Did you mean to call '{0}()'?"), + Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode: b(1210, 1, "Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210", "Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode."), + A_class_declaration_without_the_default_modifier_must_have_a_name: b(1211, 1, "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", "A class declaration without the 'default' modifier must have a name."), + Identifier_expected_0_is_a_reserved_word_in_strict_mode: b(1212, 1, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", "Identifier expected. '{0}' is a reserved word in strict mode."), + Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: b(1213, 1, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213", "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode."), + Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode: b(1214, 1, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214", "Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode."), + Invalid_use_of_0_Modules_are_automatically_in_strict_mode: b(1215, 1, "Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215", "Invalid use of '{0}'. Modules are automatically in strict mode."), + Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules: b(1216, 1, "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216", "Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules."), + Export_assignment_is_not_supported_when_module_flag_is_system: b(1218, 1, "Export_assignment_is_not_supported_when_module_flag_is_system_1218", "Export assignment is not supported when '--module' flag is 'system'."), + Generators_are_not_allowed_in_an_ambient_context: b(1221, 1, "Generators_are_not_allowed_in_an_ambient_context_1221", "Generators are not allowed in an ambient context."), + An_overload_signature_cannot_be_declared_as_a_generator: b(1222, 1, "An_overload_signature_cannot_be_declared_as_a_generator_1222", "An overload signature cannot be declared as a generator."), + _0_tag_already_specified: b(1223, 1, "_0_tag_already_specified_1223", "'{0}' tag already specified."), + Signature_0_must_be_a_type_predicate: b(1224, 1, "Signature_0_must_be_a_type_predicate_1224", "Signature '{0}' must be a type predicate."), + Cannot_find_parameter_0: b(1225, 1, "Cannot_find_parameter_0_1225", "Cannot find parameter '{0}'."), + Type_predicate_0_is_not_assignable_to_1: b(1226, 1, "Type_predicate_0_is_not_assignable_to_1_1226", "Type predicate '{0}' is not assignable to '{1}'."), + Parameter_0_is_not_in_the_same_position_as_parameter_1: b(1227, 1, "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227", "Parameter '{0}' is not in the same position as parameter '{1}'."), + A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods: b(1228, 1, "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228", "A type predicate is only allowed in return type position for functions and methods."), + A_type_predicate_cannot_reference_a_rest_parameter: b(1229, 1, "A_type_predicate_cannot_reference_a_rest_parameter_1229", "A type predicate cannot reference a rest parameter."), + A_type_predicate_cannot_reference_element_0_in_a_binding_pattern: b(1230, 1, "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230", "A type predicate cannot reference element '{0}' in a binding pattern."), + An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration: b(1231, 1, "An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration_1231", "An export assignment must be at the top level of a file or module declaration."), + An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module: b(1232, 1, "An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1232", "An import declaration can only be used at the top level of a namespace or module."), + An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module: b(1233, 1, "An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1233", "An export declaration can only be used at the top level of a namespace or module."), + An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file: b(1234, 1, "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234", "An ambient module declaration is only allowed at the top level in a file."), + A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module: b(1235, 1, "A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235", "A namespace declaration is only allowed at the top level of a namespace or module."), + The_return_type_of_a_property_decorator_function_must_be_either_void_or_any: b(1236, 1, "The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236", "The return type of a property decorator function must be either 'void' or 'any'."), + The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any: b(1237, 1, "The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237", "The return type of a parameter decorator function must be either 'void' or 'any'."), + Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression: b(1238, 1, "Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238", "Unable to resolve signature of class decorator when called as an expression."), + Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression: b(1239, 1, "Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239", "Unable to resolve signature of parameter decorator when called as an expression."), + Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression: b(1240, 1, "Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240", "Unable to resolve signature of property decorator when called as an expression."), + Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression: b(1241, 1, "Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241", "Unable to resolve signature of method decorator when called as an expression."), + abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration: b(1242, 1, "abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242", "'abstract' modifier can only appear on a class, method, or property declaration."), + _0_modifier_cannot_be_used_with_1_modifier: b(1243, 1, "_0_modifier_cannot_be_used_with_1_modifier_1243", "'{0}' modifier cannot be used with '{1}' modifier."), + Abstract_methods_can_only_appear_within_an_abstract_class: b(1244, 1, "Abstract_methods_can_only_appear_within_an_abstract_class_1244", "Abstract methods can only appear within an abstract class."), + Method_0_cannot_have_an_implementation_because_it_is_marked_abstract: b(1245, 1, "Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245", "Method '{0}' cannot have an implementation because it is marked abstract."), + An_interface_property_cannot_have_an_initializer: b(1246, 1, "An_interface_property_cannot_have_an_initializer_1246", "An interface property cannot have an initializer."), + A_type_literal_property_cannot_have_an_initializer: b(1247, 1, "A_type_literal_property_cannot_have_an_initializer_1247", "A type literal property cannot have an initializer."), + A_class_member_cannot_have_the_0_keyword: b(1248, 1, "A_class_member_cannot_have_the_0_keyword_1248", "A class member cannot have the '{0}' keyword."), + A_decorator_can_only_decorate_a_method_implementation_not_an_overload: b(1249, 1, "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249", "A decorator can only decorate a method implementation, not an overload."), + Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5: b(1250, 1, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_1250", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'."), + Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definitions_are_automatically_in_strict_mode: b(1251, 1, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definiti_1251", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Class definitions are automatically in strict mode."), + Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_automatically_in_strict_mode: b(1252, 1, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_au_1252", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Modules are automatically in strict mode."), + Abstract_properties_can_only_appear_within_an_abstract_class: b(1253, 1, "Abstract_properties_can_only_appear_within_an_abstract_class_1253", "Abstract properties can only appear within an abstract class."), + A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference: b(1254, 1, "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254", "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference."), + A_definite_assignment_assertion_is_not_permitted_in_this_context: b(1255, 1, "A_definite_assignment_assertion_is_not_permitted_in_this_context_1255", "A definite assignment assertion '!' is not permitted in this context."), + A_required_element_cannot_follow_an_optional_element: b(1257, 1, "A_required_element_cannot_follow_an_optional_element_1257", "A required element cannot follow an optional element."), + A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration: b(1258, 1, "A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration_1258", "A default export must be at the top level of a file or module declaration."), + Module_0_can_only_be_default_imported_using_the_1_flag: b(1259, 1, "Module_0_can_only_be_default_imported_using_the_1_flag_1259", "Module '{0}' can only be default-imported using the '{1}' flag"), + Keywords_cannot_contain_escape_characters: b(1260, 1, "Keywords_cannot_contain_escape_characters_1260", "Keywords cannot contain escape characters."), + Already_included_file_name_0_differs_from_file_name_1_only_in_casing: b(1261, 1, "Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261", "Already included file name '{0}' differs from file name '{1}' only in casing."), + Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module: b(1262, 1, "Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module_1262", "Identifier expected. '{0}' is a reserved word at the top-level of a module."), + Declarations_with_initializers_cannot_also_have_definite_assignment_assertions: b(1263, 1, "Declarations_with_initializers_cannot_also_have_definite_assignment_assertions_1263", "Declarations with initializers cannot also have definite assignment assertions."), + Declarations_with_definite_assignment_assertions_must_also_have_type_annotations: b(1264, 1, "Declarations_with_definite_assignment_assertions_must_also_have_type_annotations_1264", "Declarations with definite assignment assertions must also have type annotations."), + A_rest_element_cannot_follow_another_rest_element: b(1265, 1, "A_rest_element_cannot_follow_another_rest_element_1265", "A rest element cannot follow another rest element."), + An_optional_element_cannot_follow_a_rest_element: b(1266, 1, "An_optional_element_cannot_follow_a_rest_element_1266", "An optional element cannot follow a rest element."), + Property_0_cannot_have_an_initializer_because_it_is_marked_abstract: b(1267, 1, "Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267", "Property '{0}' cannot have an initializer because it is marked abstract."), + An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type: b(1268, 1, "An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268", "An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type."), + Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled: b(1269, 1, "Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled_1269", "Cannot use 'export import' on a type or type-only namespace when '{0}' is enabled."), + Decorator_function_return_type_0_is_not_assignable_to_type_1: b(1270, 1, "Decorator_function_return_type_0_is_not_assignable_to_type_1_1270", "Decorator function return type '{0}' is not assignable to type '{1}'."), + Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any: b(1271, 1, "Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any_1271", "Decorator function return type is '{0}' but is expected to be 'void' or 'any'."), + A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled: b(1272, 1, "A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_w_1272", "A type referenced in a decorated signature must be imported with 'import type' or a namespace import when 'isolatedModules' and 'emitDecoratorMetadata' are enabled."), + _0_modifier_cannot_appear_on_a_type_parameter: b(1273, 1, "_0_modifier_cannot_appear_on_a_type_parameter_1273", "'{0}' modifier cannot appear on a type parameter"), + _0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias: b(1274, 1, "_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias_1274", "'{0}' modifier can only appear on a type parameter of a class, interface or type alias"), + accessor_modifier_can_only_appear_on_a_property_declaration: b(1275, 1, "accessor_modifier_can_only_appear_on_a_property_declaration_1275", "'accessor' modifier can only appear on a property declaration."), + An_accessor_property_cannot_be_declared_optional: b(1276, 1, "An_accessor_property_cannot_be_declared_optional_1276", "An 'accessor' property cannot be declared optional."), + _0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class: b(1277, 1, "_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class_1277", "'{0}' modifier can only appear on a type parameter of a function, method or class"), + The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0: b(1278, 1, "The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0_1278", "The runtime will invoke the decorator with {1} arguments, but the decorator expects {0}."), + The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0: b(1279, 1, "The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0_1279", "The runtime will invoke the decorator with {1} arguments, but the decorator expects at least {0}."), + Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement: b(1280, 1, "Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to__1280", "Namespaces are not allowed in global script files when '{0}' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement."), + Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead: b(1281, 1, "Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead_1281", "Cannot access '{0}' from another file without qualification when '{1}' is enabled. Use '{2}' instead."), + An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type: b(1282, 1, "An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers__1282", "An 'export =' declaration must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."), + An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration: b(1283, 1, "An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolve_1283", "An 'export =' declaration must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."), + An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type: b(1284, 1, "An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_1284", "An 'export default' must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."), + An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration: b(1285, 1, "An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_1285", "An 'export default' must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."), + ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled: b(1286, 1, "ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled_1286", "ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled."), + A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled: b(1287, 1, "A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimM_1287", "A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled."), + An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled: b(1288, 1, "An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabl_1288", "An import alias cannot resolve to a type or type-only declaration when 'verbatimModuleSyntax' is enabled."), + _0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported: b(1289, 1, "_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1289", "'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."), + _0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default: b(1290, 1, "_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1290", "'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."), + _0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported: b(1291, 1, "_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1291", "'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."), + _0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default: b(1292, 1, "_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1292", "'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."), + ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve: b(1293, 1, "ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve_1293", "ESM syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'."), + with_statements_are_not_allowed_in_an_async_function_block: b(1300, 1, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."), + await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: b(1308, 1, "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308", "'await' expressions are only allowed within async functions and at the top levels of modules."), + The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level: b(1309, 1, "The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309", "The current file is a CommonJS module and cannot use 'await' at the top level."), + Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern: b(1312, 1, "Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_1312", "Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern."), + The_body_of_an_if_statement_cannot_be_the_empty_statement: b(1313, 1, "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313", "The body of an 'if' statement cannot be the empty statement."), + Global_module_exports_may_only_appear_in_module_files: b(1314, 1, "Global_module_exports_may_only_appear_in_module_files_1314", "Global module exports may only appear in module files."), + Global_module_exports_may_only_appear_in_declaration_files: b(1315, 1, "Global_module_exports_may_only_appear_in_declaration_files_1315", "Global module exports may only appear in declaration files."), + Global_module_exports_may_only_appear_at_top_level: b(1316, 1, "Global_module_exports_may_only_appear_at_top_level_1316", "Global module exports may only appear at top level."), + A_parameter_property_cannot_be_declared_using_a_rest_parameter: b(1317, 1, "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317", "A parameter property cannot be declared using a rest parameter."), + An_abstract_accessor_cannot_have_an_implementation: b(1318, 1, "An_abstract_accessor_cannot_have_an_implementation_1318", "An abstract accessor cannot have an implementation."), + A_default_export_can_only_be_used_in_an_ECMAScript_style_module: b(1319, 1, "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319", "A default export can only be used in an ECMAScript-style module."), + Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: b(1320, 1, "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."), + Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: b(1321, 1, "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."), + Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: b(1322, 1, "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."), + Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext: b(1323, 1, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323", "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'."), + Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_nodenext_or_preserve: b(1324, 1, "Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_nodene_1324", "Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'nodenext', or 'preserve'."), + Argument_of_dynamic_import_cannot_be_spread_element: b(1325, 1, "Argument_of_dynamic_import_cannot_be_spread_element_1325", "Argument of dynamic import cannot be spread element."), + This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments: b(1326, 1, "This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326", "This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments."), + String_literal_with_double_quotes_expected: b(1327, 1, "String_literal_with_double_quotes_expected_1327", "String literal with double quotes expected."), + Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal: b(1328, 1, "Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328", "Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal."), + _0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0: b(1329, 1, "_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329", "'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?"), + A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly: b(1330, 1, "A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330", "A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'."), + A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly: b(1331, 1, "A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331", "A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'."), + A_variable_whose_type_is_a_unique_symbol_type_must_be_const: b(1332, 1, "A_variable_whose_type_is_a_unique_symbol_type_must_be_const_1332", "A variable whose type is a 'unique symbol' type must be 'const'."), + unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name: b(1333, 1, "unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333", "'unique symbol' types may not be used on a variable declaration with a binding name."), + unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement: b(1334, 1, "unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334", "'unique symbol' types are only allowed on variables in a variable statement."), + unique_symbol_types_are_not_allowed_here: b(1335, 1, "unique_symbol_types_are_not_allowed_here_1335", "'unique symbol' types are not allowed here."), + An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead: b(1337, 1, "An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_o_1337", "An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead."), + infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type: b(1338, 1, "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338", "'infer' declarations are only permitted in the 'extends' clause of a conditional type."), + Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here: b(1339, 1, "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339", "Module '{0}' does not refer to a value, but is used as a value here."), + Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0: b(1340, 1, "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340", "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"), + Class_constructor_may_not_be_an_accessor: b(1341, 1, "Class_constructor_may_not_be_an_accessor_1341", "Class constructor may not be an accessor."), + The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext: b(1343, 1, "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343", "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'."), + A_label_is_not_allowed_here: b(1344, 1, "A_label_is_not_allowed_here_1344", "'A label is not allowed here."), + An_expression_of_type_void_cannot_be_tested_for_truthiness: b(1345, 1, "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345", "An expression of type 'void' cannot be tested for truthiness."), + This_parameter_is_not_allowed_with_use_strict_directive: b(1346, 1, "This_parameter_is_not_allowed_with_use_strict_directive_1346", "This parameter is not allowed with 'use strict' directive."), + use_strict_directive_cannot_be_used_with_non_simple_parameter_list: b(1347, 1, "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347", "'use strict' directive cannot be used with non-simple parameter list."), + Non_simple_parameter_declared_here: b(1348, 1, "Non_simple_parameter_declared_here_1348", "Non-simple parameter declared here."), + use_strict_directive_used_here: b(1349, 1, "use_strict_directive_used_here_1349", "'use strict' directive used here."), + Print_the_final_configuration_instead_of_building: b(1350, 3, "Print_the_final_configuration_instead_of_building_1350", "Print the final configuration instead of building."), + An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal: b(1351, 1, "An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351", "An identifier or keyword cannot immediately follow a numeric literal."), + A_bigint_literal_cannot_use_exponential_notation: b(1352, 1, "A_bigint_literal_cannot_use_exponential_notation_1352", "A bigint literal cannot use exponential notation."), + A_bigint_literal_must_be_an_integer: b(1353, 1, "A_bigint_literal_must_be_an_integer_1353", "A bigint literal must be an integer."), + readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types: b(1354, 1, "readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354", "'readonly' type modifier is only permitted on array and tuple literal types."), + A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals: b(1355, 1, "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355", "A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals."), + Did_you_mean_to_mark_this_function_as_async: b(1356, 1, "Did_you_mean_to_mark_this_function_as_async_1356", "Did you mean to mark this function as 'async'?"), + An_enum_member_name_must_be_followed_by_a_or: b(1357, 1, "An_enum_member_name_must_be_followed_by_a_or_1357", "An enum member name must be followed by a ',', '=', or '}'."), + Tagged_template_expressions_are_not_permitted_in_an_optional_chain: b(1358, 1, "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358", "Tagged template expressions are not permitted in an optional chain."), + Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here: b(1359, 1, "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359", "Identifier expected. '{0}' is a reserved word that cannot be used here."), + Type_0_does_not_satisfy_the_expected_type_1: b(1360, 1, "Type_0_does_not_satisfy_the_expected_type_1_1360", "Type '{0}' does not satisfy the expected type '{1}'."), + _0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type: b(1361, 1, "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361", "'{0}' cannot be used as a value because it was imported using 'import type'."), + _0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type: b(1362, 1, "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362", "'{0}' cannot be used as a value because it was exported using 'export type'."), + A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both: b(1363, 1, "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363", "A type-only import can specify a default import or named bindings, but not both."), + Convert_to_type_only_export: b(1364, 3, "Convert_to_type_only_export_1364", "Convert to type-only export"), + Convert_all_re_exported_types_to_type_only_exports: b(1365, 3, "Convert_all_re_exported_types_to_type_only_exports_1365", "Convert all re-exported types to type-only exports"), + Split_into_two_separate_import_declarations: b(1366, 3, "Split_into_two_separate_import_declarations_1366", "Split into two separate import declarations"), + Split_all_invalid_type_only_imports: b(1367, 3, "Split_all_invalid_type_only_imports_1367", "Split all invalid type-only imports"), + Class_constructor_may_not_be_a_generator: b(1368, 1, "Class_constructor_may_not_be_a_generator_1368", "Class constructor may not be a generator."), + Did_you_mean_0: b(1369, 3, "Did_you_mean_0_1369", "Did you mean '{0}'?"), + await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: b(1375, 1, "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375", "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."), + _0_was_imported_here: b(1376, 3, "_0_was_imported_here_1376", "'{0}' was imported here."), + _0_was_exported_here: b(1377, 3, "_0_was_exported_here_1377", "'{0}' was exported here."), + Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher: b(1378, 1, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."), + An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type: b(1379, 1, "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379", "An import alias cannot reference a declaration that was exported using 'export type'."), + An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type: b(1380, 1, "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380", "An import alias cannot reference a declaration that was imported using 'import type'."), + Unexpected_token_Did_you_mean_or_rbrace: b(1381, 1, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `}`?"), + Unexpected_token_Did_you_mean_or_gt: b(1382, 1, "Unexpected_token_Did_you_mean_or_gt_1382", "Unexpected token. Did you mean `{'>'}` or `>`?"), + Function_type_notation_must_be_parenthesized_when_used_in_a_union_type: b(1385, 1, "Function_type_notation_must_be_parenthesized_when_used_in_a_union_type_1385", "Function type notation must be parenthesized when used in a union type."), + Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type: b(1386, 1, "Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type_1386", "Constructor type notation must be parenthesized when used in a union type."), + Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type: b(1387, 1, "Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1387", "Function type notation must be parenthesized when used in an intersection type."), + Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type: b(1388, 1, "Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1388", "Constructor type notation must be parenthesized when used in an intersection type."), + _0_is_not_allowed_as_a_variable_declaration_name: b(1389, 1, "_0_is_not_allowed_as_a_variable_declaration_name_1389", "'{0}' is not allowed as a variable declaration name."), + _0_is_not_allowed_as_a_parameter_name: b(1390, 1, "_0_is_not_allowed_as_a_parameter_name_1390", "'{0}' is not allowed as a parameter name."), + An_import_alias_cannot_use_import_type: b(1392, 1, "An_import_alias_cannot_use_import_type_1392", "An import alias cannot use 'import type'"), + Imported_via_0_from_file_1: b(1393, 3, "Imported_via_0_from_file_1_1393", "Imported via {0} from file '{1}'"), + Imported_via_0_from_file_1_with_packageId_2: b(1394, 3, "Imported_via_0_from_file_1_with_packageId_2_1394", "Imported via {0} from file '{1}' with packageId '{2}'"), + Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions: b(1395, 3, "Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions_1395", "Imported via {0} from file '{1}' to import 'importHelpers' as specified in compilerOptions"), + Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions: b(1396, 3, "Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions_1396", "Imported via {0} from file '{1}' with packageId '{2}' to import 'importHelpers' as specified in compilerOptions"), + Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions: b(1397, 3, "Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions_1397", "Imported via {0} from file '{1}' to import 'jsx' and 'jsxs' factory functions"), + Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions: b(1398, 3, "Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions_1398", "Imported via {0} from file '{1}' with packageId '{2}' to import 'jsx' and 'jsxs' factory functions"), + File_is_included_via_import_here: b(1399, 3, "File_is_included_via_import_here_1399", "File is included via import here."), + Referenced_via_0_from_file_1: b(1400, 3, "Referenced_via_0_from_file_1_1400", "Referenced via '{0}' from file '{1}'"), + File_is_included_via_reference_here: b(1401, 3, "File_is_included_via_reference_here_1401", "File is included via reference here."), + Type_library_referenced_via_0_from_file_1: b(1402, 3, "Type_library_referenced_via_0_from_file_1_1402", "Type library referenced via '{0}' from file '{1}'"), + Type_library_referenced_via_0_from_file_1_with_packageId_2: b(1403, 3, "Type_library_referenced_via_0_from_file_1_with_packageId_2_1403", "Type library referenced via '{0}' from file '{1}' with packageId '{2}'"), + File_is_included_via_type_library_reference_here: b(1404, 3, "File_is_included_via_type_library_reference_here_1404", "File is included via type library reference here."), + Library_referenced_via_0_from_file_1: b(1405, 3, "Library_referenced_via_0_from_file_1_1405", "Library referenced via '{0}' from file '{1}'"), + File_is_included_via_library_reference_here: b(1406, 3, "File_is_included_via_library_reference_here_1406", "File is included via library reference here."), + Matched_by_include_pattern_0_in_1: b(1407, 3, "Matched_by_include_pattern_0_in_1_1407", "Matched by include pattern '{0}' in '{1}'"), + File_is_matched_by_include_pattern_specified_here: b(1408, 3, "File_is_matched_by_include_pattern_specified_here_1408", "File is matched by include pattern specified here."), + Part_of_files_list_in_tsconfig_json: b(1409, 3, "Part_of_files_list_in_tsconfig_json_1409", "Part of 'files' list in tsconfig.json"), + File_is_matched_by_files_list_specified_here: b(1410, 3, "File_is_matched_by_files_list_specified_here_1410", "File is matched by 'files' list specified here."), + Output_from_referenced_project_0_included_because_1_specified: b(1411, 3, "Output_from_referenced_project_0_included_because_1_specified_1411", "Output from referenced project '{0}' included because '{1}' specified"), + Output_from_referenced_project_0_included_because_module_is_specified_as_none: b(1412, 3, "Output_from_referenced_project_0_included_because_module_is_specified_as_none_1412", "Output from referenced project '{0}' included because '--module' is specified as 'none'"), + File_is_output_from_referenced_project_specified_here: b(1413, 3, "File_is_output_from_referenced_project_specified_here_1413", "File is output from referenced project specified here."), + Source_from_referenced_project_0_included_because_1_specified: b(1414, 3, "Source_from_referenced_project_0_included_because_1_specified_1414", "Source from referenced project '{0}' included because '{1}' specified"), + Source_from_referenced_project_0_included_because_module_is_specified_as_none: b(1415, 3, "Source_from_referenced_project_0_included_because_module_is_specified_as_none_1415", "Source from referenced project '{0}' included because '--module' is specified as 'none'"), + File_is_source_from_referenced_project_specified_here: b(1416, 3, "File_is_source_from_referenced_project_specified_here_1416", "File is source from referenced project specified here."), + Entry_point_of_type_library_0_specified_in_compilerOptions: b(1417, 3, "Entry_point_of_type_library_0_specified_in_compilerOptions_1417", "Entry point of type library '{0}' specified in compilerOptions"), + Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1: b(1418, 3, "Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1_1418", "Entry point of type library '{0}' specified in compilerOptions with packageId '{1}'"), + File_is_entry_point_of_type_library_specified_here: b(1419, 3, "File_is_entry_point_of_type_library_specified_here_1419", "File is entry point of type library specified here."), + Entry_point_for_implicit_type_library_0: b(1420, 3, "Entry_point_for_implicit_type_library_0_1420", "Entry point for implicit type library '{0}'"), + Entry_point_for_implicit_type_library_0_with_packageId_1: b(1421, 3, "Entry_point_for_implicit_type_library_0_with_packageId_1_1421", "Entry point for implicit type library '{0}' with packageId '{1}'"), + Library_0_specified_in_compilerOptions: b(1422, 3, "Library_0_specified_in_compilerOptions_1422", "Library '{0}' specified in compilerOptions"), + File_is_library_specified_here: b(1423, 3, "File_is_library_specified_here_1423", "File is library specified here."), + Default_library: b(1424, 3, "Default_library_1424", "Default library"), + Default_library_for_target_0: b(1425, 3, "Default_library_for_target_0_1425", "Default library for target '{0}'"), + File_is_default_library_for_target_specified_here: b(1426, 3, "File_is_default_library_for_target_specified_here_1426", "File is default library for target specified here."), + Root_file_specified_for_compilation: b(1427, 3, "Root_file_specified_for_compilation_1427", "Root file specified for compilation"), + File_is_output_of_project_reference_source_0: b(1428, 3, "File_is_output_of_project_reference_source_0_1428", "File is output of project reference source '{0}'"), + File_redirects_to_file_0: b(1429, 3, "File_redirects_to_file_0_1429", "File redirects to file '{0}'"), + The_file_is_in_the_program_because_Colon: b(1430, 3, "The_file_is_in_the_program_because_Colon_1430", "The file is in the program because:"), + for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: b(1431, 1, "for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431", "'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."), + Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher: b(1432, 1, "Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432", "Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."), + Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters: b(1433, 1, "Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters_1433", "Neither decorators nor modifiers may be applied to 'this' parameters."), + Unexpected_keyword_or_identifier: b(1434, 1, "Unexpected_keyword_or_identifier_1434", "Unexpected keyword or identifier."), + Unknown_keyword_or_identifier_Did_you_mean_0: b(1435, 1, "Unknown_keyword_or_identifier_Did_you_mean_0_1435", "Unknown keyword or identifier. Did you mean '{0}'?"), + Decorators_must_precede_the_name_and_all_keywords_of_property_declarations: b(1436, 1, "Decorators_must_precede_the_name_and_all_keywords_of_property_declarations_1436", "Decorators must precede the name and all keywords of property declarations."), + Namespace_must_be_given_a_name: b(1437, 1, "Namespace_must_be_given_a_name_1437", "Namespace must be given a name."), + Interface_must_be_given_a_name: b(1438, 1, "Interface_must_be_given_a_name_1438", "Interface must be given a name."), + Type_alias_must_be_given_a_name: b(1439, 1, "Type_alias_must_be_given_a_name_1439", "Type alias must be given a name."), + Variable_declaration_not_allowed_at_this_location: b(1440, 1, "Variable_declaration_not_allowed_at_this_location_1440", "Variable declaration not allowed at this location."), + Cannot_start_a_function_call_in_a_type_annotation: b(1441, 1, "Cannot_start_a_function_call_in_a_type_annotation_1441", "Cannot start a function call in a type annotation."), + Expected_for_property_initializer: b(1442, 1, "Expected_for_property_initializer_1442", "Expected '=' for property initializer."), + Module_declaration_names_may_only_use_or_quoted_strings: b(1443, 1, "Module_declaration_names_may_only_use_or_quoted_strings_1443", `Module declaration names may only use ' or " quoted strings.`), + _0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled: b(1448, 1, "_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_1448", "'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when '{1}' is enabled."), + Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed: b(1449, 3, "Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449", "Preserve unused imported values in the JavaScript output that would otherwise be removed."), + Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments: b(1450, 3, "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments_1450", "Dynamic imports can only accept a module specifier and an optional set of attributes as arguments"), + Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression: b(1451, 1, "Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451", "Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"), + resolution_mode_should_be_either_require_or_import: b(1453, 1, "resolution_mode_should_be_either_require_or_import_1453", "`resolution-mode` should be either `require` or `import`."), + resolution_mode_can_only_be_set_for_type_only_imports: b(1454, 1, "resolution_mode_can_only_be_set_for_type_only_imports_1454", "`resolution-mode` can only be set for type-only imports."), + resolution_mode_is_the_only_valid_key_for_type_import_assertions: b(1455, 1, "resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455", "`resolution-mode` is the only valid key for type import assertions."), + Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require: b(1456, 1, "Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456", "Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`."), + Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk: b(1457, 3, "Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457", "Matched by default include pattern '**/*'"), + File_is_ECMAScript_module_because_0_has_field_type_with_value_module: b(1458, 3, "File_is_ECMAScript_module_because_0_has_field_type_with_value_module_1458", `File is ECMAScript module because '{0}' has field "type" with value "module"`), + File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module: b(1459, 3, "File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module_1459", `File is CommonJS module because '{0}' has field "type" whose value is not "module"`), + File_is_CommonJS_module_because_0_does_not_have_field_type: b(1460, 3, "File_is_CommonJS_module_because_0_does_not_have_field_type_1460", `File is CommonJS module because '{0}' does not have field "type"`), + File_is_CommonJS_module_because_package_json_was_not_found: b(1461, 3, "File_is_CommonJS_module_because_package_json_was_not_found_1461", "File is CommonJS module because 'package.json' was not found"), + resolution_mode_is_the_only_valid_key_for_type_import_attributes: b(1463, 1, "resolution_mode_is_the_only_valid_key_for_type_import_attributes_1463", "'resolution-mode' is the only valid key for type import attributes."), + Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require: b(1464, 1, "Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1464", "Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'."), + The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output: b(1470, 1, "The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470", "The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."), + Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead: b(1471, 1, "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471", "Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead."), + catch_or_finally_expected: b(1472, 1, "catch_or_finally_expected_1472", "'catch' or 'finally' expected."), + An_import_declaration_can_only_be_used_at_the_top_level_of_a_module: b(1473, 1, "An_import_declaration_can_only_be_used_at_the_top_level_of_a_module_1473", "An import declaration can only be used at the top level of a module."), + An_export_declaration_can_only_be_used_at_the_top_level_of_a_module: b(1474, 1, "An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474", "An export declaration can only be used at the top level of a module."), + Control_what_method_is_used_to_detect_module_format_JS_files: b(1475, 3, "Control_what_method_is_used_to_detect_module_format_JS_files_1475", "Control what method is used to detect module-format JS files."), + auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules: b(1476, 3, "auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476", '"auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.'), + An_instantiation_expression_cannot_be_followed_by_a_property_access: b(1477, 1, "An_instantiation_expression_cannot_be_followed_by_a_property_access_1477", "An instantiation expression cannot be followed by a property access."), + Identifier_or_string_literal_expected: b(1478, 1, "Identifier_or_string_literal_expected_1478", "Identifier or string literal expected."), + The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead: b(1479, 1, "The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_reference_1479", `The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("{0}")' call instead.`), + To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module: b(1480, 3, "To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_packag_1480", 'To convert this file to an ECMAScript module, change its file extension to \'{0}\' or create a local package.json file with `{ "type": "module" }`.'), + To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1: b(1481, 3, "To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Co_1481", `To convert this file to an ECMAScript module, change its file extension to '{0}', or add the field \`"type": "module"\` to '{1}'.`), + To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0: b(1482, 3, "To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0_1482", 'To convert this file to an ECMAScript module, add the field `"type": "module"` to \'{0}\'.'), + To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module: b(1483, 3, "To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module_1483", 'To convert this file to an ECMAScript module, create a local package.json file with `{ "type": "module" }`.'), + _0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled: b(1484, 1, "_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled_1484", "'{0}' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."), + _0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled: b(1485, 1, "_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimMo_1485", "'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."), + Decorator_used_before_export_here: b(1486, 1, "Decorator_used_before_export_here_1486", "Decorator used before 'export' here."), + Octal_escape_sequences_are_not_allowed_Use_the_syntax_0: b(1487, 1, "Octal_escape_sequences_are_not_allowed_Use_the_syntax_0_1487", "Octal escape sequences are not allowed. Use the syntax '{0}'."), + Escape_sequence_0_is_not_allowed: b(1488, 1, "Escape_sequence_0_is_not_allowed_1488", "Escape sequence '{0}' is not allowed."), + Decimals_with_leading_zeros_are_not_allowed: b(1489, 1, "Decimals_with_leading_zeros_are_not_allowed_1489", "Decimals with leading zeros are not allowed."), + File_appears_to_be_binary: b(1490, 1, "File_appears_to_be_binary_1490", "File appears to be binary."), + _0_modifier_cannot_appear_on_a_using_declaration: b(1491, 1, "_0_modifier_cannot_appear_on_a_using_declaration_1491", "'{0}' modifier cannot appear on a 'using' declaration."), + _0_declarations_may_not_have_binding_patterns: b(1492, 1, "_0_declarations_may_not_have_binding_patterns_1492", "'{0}' declarations may not have binding patterns."), + The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration: b(1493, 1, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493", "The left-hand side of a 'for...in' statement cannot be a 'using' declaration."), + The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration: b(1494, 1, "The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494", "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."), + _0_modifier_cannot_appear_on_an_await_using_declaration: b(1495, 1, "_0_modifier_cannot_appear_on_an_await_using_declaration_1495", "'{0}' modifier cannot appear on an 'await using' declaration."), + Identifier_string_literal_or_number_literal_expected: b(1496, 1, "Identifier_string_literal_or_number_literal_expected_1496", "Identifier, string literal, or number literal expected."), + Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator: b(1497, 1, "Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator_1497", "Expression must be enclosed in parentheses to be used as a decorator."), + Invalid_syntax_in_decorator: b(1498, 1, "Invalid_syntax_in_decorator_1498", "Invalid syntax in decorator."), + Unknown_regular_expression_flag: b(1499, 1, "Unknown_regular_expression_flag_1499", "Unknown regular expression flag."), + Duplicate_regular_expression_flag: b(1500, 1, "Duplicate_regular_expression_flag_1500", "Duplicate regular expression flag."), + This_regular_expression_flag_is_only_available_when_targeting_0_or_later: b(1501, 1, "This_regular_expression_flag_is_only_available_when_targeting_0_or_later_1501", "This regular expression flag is only available when targeting '{0}' or later."), + The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously: b(1502, 1, "The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously_1502", "The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously."), + Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later: b(1503, 1, "Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later_1503", "Named capturing groups are only available when targeting 'ES2018' or later."), + Subpattern_flags_must_be_present_when_there_is_a_minus_sign: b(1504, 1, "Subpattern_flags_must_be_present_when_there_is_a_minus_sign_1504", "Subpattern flags must be present when there is a minus sign."), + Incomplete_quantifier_Digit_expected: b(1505, 1, "Incomplete_quantifier_Digit_expected_1505", "Incomplete quantifier. Digit expected."), + Numbers_out_of_order_in_quantifier: b(1506, 1, "Numbers_out_of_order_in_quantifier_1506", "Numbers out of order in quantifier."), + There_is_nothing_available_for_repetition: b(1507, 1, "There_is_nothing_available_for_repetition_1507", "There is nothing available for repetition."), + Unexpected_0_Did_you_mean_to_escape_it_with_backslash: b(1508, 1, "Unexpected_0_Did_you_mean_to_escape_it_with_backslash_1508", "Unexpected '{0}'. Did you mean to escape it with backslash?"), + This_regular_expression_flag_cannot_be_toggled_within_a_subpattern: b(1509, 1, "This_regular_expression_flag_cannot_be_toggled_within_a_subpattern_1509", "This regular expression flag cannot be toggled within a subpattern."), + k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets: b(1510, 1, "k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets_1510", "'\\k' must be followed by a capturing group name enclosed in angle brackets."), + q_is_only_available_inside_character_class: b(1511, 1, "q_is_only_available_inside_character_class_1511", "'\\q' is only available inside character class."), + c_must_be_followed_by_an_ASCII_letter: b(1512, 1, "c_must_be_followed_by_an_ASCII_letter_1512", "'\\c' must be followed by an ASCII letter."), + Undetermined_character_escape: b(1513, 1, "Undetermined_character_escape_1513", "Undetermined character escape."), + Expected_a_capturing_group_name: b(1514, 1, "Expected_a_capturing_group_name_1514", "Expected a capturing group name."), + Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other: b(1515, 1, "Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other_1515", "Named capturing groups with the same name must be mutually exclusive to each other."), + A_character_class_range_must_not_be_bounded_by_another_character_class: b(1516, 1, "A_character_class_range_must_not_be_bounded_by_another_character_class_1516", "A character class range must not be bounded by another character class."), + Range_out_of_order_in_character_class: b(1517, 1, "Range_out_of_order_in_character_class_1517", "Range out of order in character class."), + Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class: b(1518, 1, "Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_characte_1518", "Anything that would possibly match more than a single character is invalid inside a negated character class."), + Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead: b(1519, 1, "Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead_1519", "Operators must not be mixed within a character class. Wrap it in a nested class instead."), + Expected_a_class_set_operand: b(1520, 1, "Expected_a_class_set_operand_1520", "Expected a class set operand."), + q_must_be_followed_by_string_alternatives_enclosed_in_braces: b(1521, 1, "q_must_be_followed_by_string_alternatives_enclosed_in_braces_1521", "'\\q' must be followed by string alternatives enclosed in braces."), + A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backslash: b(1522, 1, "A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backs_1522", "A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash?"), + Expected_a_Unicode_property_name: b(1523, 1, "Expected_a_Unicode_property_name_1523", "Expected a Unicode property name."), + Unknown_Unicode_property_name: b(1524, 1, "Unknown_Unicode_property_name_1524", "Unknown Unicode property name."), + Expected_a_Unicode_property_value: b(1525, 1, "Expected_a_Unicode_property_value_1525", "Expected a Unicode property value."), + Unknown_Unicode_property_value: b(1526, 1, "Unknown_Unicode_property_value_1526", "Unknown Unicode property value."), + Expected_a_Unicode_property_name_or_value: b(1527, 1, "Expected_a_Unicode_property_name_or_value_1527", "Expected a Unicode property name or value."), + Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_the_Unicode_Sets_v_flag_is_set: b(1528, 1, "Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_t_1528", "Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set."), + Unknown_Unicode_property_name_or_value: b(1529, 1, "Unknown_Unicode_property_name_or_value_1529", "Unknown Unicode property name or value."), + Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set: b(1530, 1, "Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v__1530", "Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set."), + _0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces: b(1531, 1, "_0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces_1531", "'\\{0}' must be followed by a Unicode property value expression enclosed in braces."), + There_is_no_capturing_group_named_0_in_this_regular_expression: b(1532, 1, "There_is_no_capturing_group_named_0_in_this_regular_expression_1532", "There is no capturing group named '{0}' in this regular expression."), + This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_regular_expression: b(1533, 1, "This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_r_1533", "This backreference refers to a group that does not exist. There are only {0} capturing groups in this regular expression."), + This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regular_expression: b(1534, 1, "This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regul_1534", "This backreference refers to a group that does not exist. There are no capturing groups in this regular expression."), + This_character_cannot_be_escaped_in_a_regular_expression: b(1535, 1, "This_character_cannot_be_escaped_in_a_regular_expression_1535", "This character cannot be escaped in a regular expression."), + Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead: b(1536, 1, "Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended__1536", "Octal escape sequences and backreferences are not allowed in a character class. If this was intended as an escape sequence, use the syntax '{0}' instead."), + Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class: b(1537, 1, "Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_1537", "Decimal escape sequences and backreferences are not allowed in a character class."), + Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set: b(1538, 1, "Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_se_1538", "Unicode escape sequences are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set."), + A_bigint_literal_cannot_be_used_as_a_property_name: b(1539, 1, "A_bigint_literal_cannot_be_used_as_a_property_name_1539", "A 'bigint' literal cannot be used as a property name."), + A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead: b( + 1540, + 2, + "A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_key_1540", + "A 'namespace' declaration should not be declared using the 'module' keyword. Please use the 'namespace' keyword instead.", + /*reportsUnnecessary*/ + void 0, + /*elidedInCompatabilityPyramid*/ + void 0, + /*reportsDeprecated*/ + !0 + ), + Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute: b(1541, 1, "Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribut_1541", "Type-only import of an ECMAScript module from a CommonJS module must have a 'resolution-mode' attribute."), + Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute: b(1542, 1, "Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute_1542", "Type import of an ECMAScript module from a CommonJS module must have a 'resolution-mode' attribute."), + Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_module_is_set_to_0: b(1543, 1, "Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_mod_1543", `Importing a JSON file into an ECMAScript module requires a 'type: "json"' import attribute when 'module' is set to '{0}'.`), + Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0: b(1544, 1, "Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0_1544", "Named imports from a JSON file into an ECMAScript module are not allowed when 'module' is set to '{0}'."), + The_types_of_0_are_incompatible_between_these_types: b(2200, 1, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."), + The_types_returned_by_0_are_incompatible_between_these_types: b(2201, 1, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."), + Call_signature_return_types_0_and_1_are_incompatible: b( + 2202, + 1, + "Call_signature_return_types_0_and_1_are_incompatible_2202", + "Call signature return types '{0}' and '{1}' are incompatible.", + /*reportsUnnecessary*/ + void 0, + /*elidedInCompatabilityPyramid*/ + !0 + ), + Construct_signature_return_types_0_and_1_are_incompatible: b( + 2203, + 1, + "Construct_signature_return_types_0_and_1_are_incompatible_2203", + "Construct signature return types '{0}' and '{1}' are incompatible.", + /*reportsUnnecessary*/ + void 0, + /*elidedInCompatabilityPyramid*/ + !0 + ), + Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1: b( + 2204, + 1, + "Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204", + "Call signatures with no arguments have incompatible return types '{0}' and '{1}'.", + /*reportsUnnecessary*/ + void 0, + /*elidedInCompatabilityPyramid*/ + !0 + ), + Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1: b( + 2205, + 1, + "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205", + "Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.", + /*reportsUnnecessary*/ + void 0, + /*elidedInCompatabilityPyramid*/ + !0 + ), + The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement: b(2206, 1, "The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206", "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."), + The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement: b(2207, 1, "The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207", "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."), + This_type_parameter_might_need_an_extends_0_constraint: b(2208, 1, "This_type_parameter_might_need_an_extends_0_constraint_2208", "This type parameter might need an `extends {0}` constraint."), + The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: b(2209, 1, "The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209", "The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."), + The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: b(2210, 1, "The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210", "The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."), + Add_extends_constraint: b(2211, 3, "Add_extends_constraint_2211", "Add `extends` constraint."), + Add_extends_constraint_to_all_type_parameters: b(2212, 3, "Add_extends_constraint_to_all_type_parameters_2212", "Add `extends` constraint to all type parameters"), + Duplicate_identifier_0: b(2300, 1, "Duplicate_identifier_0_2300", "Duplicate identifier '{0}'."), + Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: b(2301, 1, "Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301", "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."), + Static_members_cannot_reference_class_type_parameters: b(2302, 1, "Static_members_cannot_reference_class_type_parameters_2302", "Static members cannot reference class type parameters."), + Circular_definition_of_import_alias_0: b(2303, 1, "Circular_definition_of_import_alias_0_2303", "Circular definition of import alias '{0}'."), + Cannot_find_name_0: b(2304, 1, "Cannot_find_name_0_2304", "Cannot find name '{0}'."), + Module_0_has_no_exported_member_1: b(2305, 1, "Module_0_has_no_exported_member_1_2305", "Module '{0}' has no exported member '{1}'."), + File_0_is_not_a_module: b(2306, 1, "File_0_is_not_a_module_2306", "File '{0}' is not a module."), + Cannot_find_module_0_or_its_corresponding_type_declarations: b(2307, 1, "Cannot_find_module_0_or_its_corresponding_type_declarations_2307", "Cannot find module '{0}' or its corresponding type declarations."), + Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity: b(2308, 1, "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308", "Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."), + An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements: b(2309, 1, "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309", "An export assignment cannot be used in a module with other exported elements."), + Type_0_recursively_references_itself_as_a_base_type: b(2310, 1, "Type_0_recursively_references_itself_as_a_base_type_2310", "Type '{0}' recursively references itself as a base type."), + Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function: b(2311, 1, "Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311", "Cannot find name '{0}'. Did you mean to write this in an async function?"), + An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members: b(2312, 1, "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312", "An interface can only extend an object type or intersection of object types with statically known members."), + Type_parameter_0_has_a_circular_constraint: b(2313, 1, "Type_parameter_0_has_a_circular_constraint_2313", "Type parameter '{0}' has a circular constraint."), + Generic_type_0_requires_1_type_argument_s: b(2314, 1, "Generic_type_0_requires_1_type_argument_s_2314", "Generic type '{0}' requires {1} type argument(s)."), + Type_0_is_not_generic: b(2315, 1, "Type_0_is_not_generic_2315", "Type '{0}' is not generic."), + Global_type_0_must_be_a_class_or_interface_type: b(2316, 1, "Global_type_0_must_be_a_class_or_interface_type_2316", "Global type '{0}' must be a class or interface type."), + Global_type_0_must_have_1_type_parameter_s: b(2317, 1, "Global_type_0_must_have_1_type_parameter_s_2317", "Global type '{0}' must have {1} type parameter(s)."), + Cannot_find_global_type_0: b(2318, 1, "Cannot_find_global_type_0_2318", "Cannot find global type '{0}'."), + Named_property_0_of_types_1_and_2_are_not_identical: b(2319, 1, "Named_property_0_of_types_1_and_2_are_not_identical_2319", "Named property '{0}' of types '{1}' and '{2}' are not identical."), + Interface_0_cannot_simultaneously_extend_types_1_and_2: b(2320, 1, "Interface_0_cannot_simultaneously_extend_types_1_and_2_2320", "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'."), + Excessive_stack_depth_comparing_types_0_and_1: b(2321, 1, "Excessive_stack_depth_comparing_types_0_and_1_2321", "Excessive stack depth comparing types '{0}' and '{1}'."), + Type_0_is_not_assignable_to_type_1: b(2322, 1, "Type_0_is_not_assignable_to_type_1_2322", "Type '{0}' is not assignable to type '{1}'."), + Cannot_redeclare_exported_variable_0: b(2323, 1, "Cannot_redeclare_exported_variable_0_2323", "Cannot redeclare exported variable '{0}'."), + Property_0_is_missing_in_type_1: b(2324, 1, "Property_0_is_missing_in_type_1_2324", "Property '{0}' is missing in type '{1}'."), + Property_0_is_private_in_type_1_but_not_in_type_2: b(2325, 1, "Property_0_is_private_in_type_1_but_not_in_type_2_2325", "Property '{0}' is private in type '{1}' but not in type '{2}'."), + Types_of_property_0_are_incompatible: b(2326, 1, "Types_of_property_0_are_incompatible_2326", "Types of property '{0}' are incompatible."), + Property_0_is_optional_in_type_1_but_required_in_type_2: b(2327, 1, "Property_0_is_optional_in_type_1_but_required_in_type_2_2327", "Property '{0}' is optional in type '{1}' but required in type '{2}'."), + Types_of_parameters_0_and_1_are_incompatible: b(2328, 1, "Types_of_parameters_0_and_1_are_incompatible_2328", "Types of parameters '{0}' and '{1}' are incompatible."), + Index_signature_for_type_0_is_missing_in_type_1: b(2329, 1, "Index_signature_for_type_0_is_missing_in_type_1_2329", "Index signature for type '{0}' is missing in type '{1}'."), + _0_and_1_index_signatures_are_incompatible: b(2330, 1, "_0_and_1_index_signatures_are_incompatible_2330", "'{0}' and '{1}' index signatures are incompatible."), + this_cannot_be_referenced_in_a_module_or_namespace_body: b(2331, 1, "this_cannot_be_referenced_in_a_module_or_namespace_body_2331", "'this' cannot be referenced in a module or namespace body."), + this_cannot_be_referenced_in_current_location: b(2332, 1, "this_cannot_be_referenced_in_current_location_2332", "'this' cannot be referenced in current location."), + this_cannot_be_referenced_in_a_static_property_initializer: b(2334, 1, "this_cannot_be_referenced_in_a_static_property_initializer_2334", "'this' cannot be referenced in a static property initializer."), + super_can_only_be_referenced_in_a_derived_class: b(2335, 1, "super_can_only_be_referenced_in_a_derived_class_2335", "'super' can only be referenced in a derived class."), + super_cannot_be_referenced_in_constructor_arguments: b(2336, 1, "super_cannot_be_referenced_in_constructor_arguments_2336", "'super' cannot be referenced in constructor arguments."), + Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors: b(2337, 1, "Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337", "Super calls are not permitted outside constructors or in nested functions inside constructors."), + super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class: b(2338, 1, "super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_der_2338", "'super' property access is permitted only in a constructor, member function, or member accessor of a derived class."), + Property_0_does_not_exist_on_type_1: b(2339, 1, "Property_0_does_not_exist_on_type_1_2339", "Property '{0}' does not exist on type '{1}'."), + Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: b(2340, 1, "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340", "Only public and protected methods of the base class are accessible via the 'super' keyword."), + Property_0_is_private_and_only_accessible_within_class_1: b(2341, 1, "Property_0_is_private_and_only_accessible_within_class_1_2341", "Property '{0}' is private and only accessible within class '{1}'."), + This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0: b(2343, 1, "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343", "This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'."), + Type_0_does_not_satisfy_the_constraint_1: b(2344, 1, "Type_0_does_not_satisfy_the_constraint_1_2344", "Type '{0}' does not satisfy the constraint '{1}'."), + Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: b(2345, 1, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345", "Argument of type '{0}' is not assignable to parameter of type '{1}'."), + Untyped_function_calls_may_not_accept_type_arguments: b(2347, 1, "Untyped_function_calls_may_not_accept_type_arguments_2347", "Untyped function calls may not accept type arguments."), + Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: b(2348, 1, "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348", "Value of type '{0}' is not callable. Did you mean to include 'new'?"), + This_expression_is_not_callable: b(2349, 1, "This_expression_is_not_callable_2349", "This expression is not callable."), + Only_a_void_function_can_be_called_with_the_new_keyword: b(2350, 1, "Only_a_void_function_can_be_called_with_the_new_keyword_2350", "Only a void function can be called with the 'new' keyword."), + This_expression_is_not_constructable: b(2351, 1, "This_expression_is_not_constructable_2351", "This expression is not constructable."), + Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first: b(2352, 1, "Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352", "Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first."), + Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1: b(2353, 1, "Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353", "Object literal may only specify known properties, and '{0}' does not exist in type '{1}'."), + This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found: b(2354, 1, "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354", "This syntax requires an imported helper but module '{0}' cannot be found."), + A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value: b(2355, 1, "A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value_2355", "A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value."), + An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type: b(2356, 1, "An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356", "An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type."), + The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access: b(2357, 1, "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357", "The operand of an increment or decrement operator must be a variable or a property access."), + The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: b(2358, 1, "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358", "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter."), + The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method: b(2359, 1, "The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_2359", "The right-hand side of an 'instanceof' expression must be either of type 'any', a class, function, or other type assignable to the 'Function' interface type, or an object type with a 'Symbol.hasInstance' method."), + The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: b(2362, 1, "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362", "The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."), + The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: b(2363, 1, "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363", "The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."), + The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access: b(2364, 1, "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364", "The left-hand side of an assignment expression must be a variable or a property access."), + Operator_0_cannot_be_applied_to_types_1_and_2: b(2365, 1, "Operator_0_cannot_be_applied_to_types_1_and_2_2365", "Operator '{0}' cannot be applied to types '{1}' and '{2}'."), + Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined: b(2366, 1, "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366", "Function lacks ending return statement and return type does not include 'undefined'."), + This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap: b(2367, 1, "This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap_2367", "This comparison appears to be unintentional because the types '{0}' and '{1}' have no overlap."), + Type_parameter_name_cannot_be_0: b(2368, 1, "Type_parameter_name_cannot_be_0_2368", "Type parameter name cannot be '{0}'."), + A_parameter_property_is_only_allowed_in_a_constructor_implementation: b(2369, 1, "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369", "A parameter property is only allowed in a constructor implementation."), + A_rest_parameter_must_be_of_an_array_type: b(2370, 1, "A_rest_parameter_must_be_of_an_array_type_2370", "A rest parameter must be of an array type."), + A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: b(2371, 1, "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371", "A parameter initializer is only allowed in a function or constructor implementation."), + Parameter_0_cannot_reference_itself: b(2372, 1, "Parameter_0_cannot_reference_itself_2372", "Parameter '{0}' cannot reference itself."), + Parameter_0_cannot_reference_identifier_1_declared_after_it: b(2373, 1, "Parameter_0_cannot_reference_identifier_1_declared_after_it_2373", "Parameter '{0}' cannot reference identifier '{1}' declared after it."), + Duplicate_index_signature_for_type_0: b(2374, 1, "Duplicate_index_signature_for_type_0_2374", "Duplicate index signature for type '{0}'."), + Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties: b(2375, 1, "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375", "Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."), + A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers: b(2376, 1, "A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376", "A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers."), + Constructors_for_derived_classes_must_contain_a_super_call: b(2377, 1, "Constructors_for_derived_classes_must_contain_a_super_call_2377", "Constructors for derived classes must contain a 'super' call."), + A_get_accessor_must_return_a_value: b(2378, 1, "A_get_accessor_must_return_a_value_2378", "A 'get' accessor must return a value."), + Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties: b(2379, 1, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_tr_2379", "Argument of type '{0}' is not assignable to parameter of type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."), + Overload_signatures_must_all_be_exported_or_non_exported: b(2383, 1, "Overload_signatures_must_all_be_exported_or_non_exported_2383", "Overload signatures must all be exported or non-exported."), + Overload_signatures_must_all_be_ambient_or_non_ambient: b(2384, 1, "Overload_signatures_must_all_be_ambient_or_non_ambient_2384", "Overload signatures must all be ambient or non-ambient."), + Overload_signatures_must_all_be_public_private_or_protected: b(2385, 1, "Overload_signatures_must_all_be_public_private_or_protected_2385", "Overload signatures must all be public, private or protected."), + Overload_signatures_must_all_be_optional_or_required: b(2386, 1, "Overload_signatures_must_all_be_optional_or_required_2386", "Overload signatures must all be optional or required."), + Function_overload_must_be_static: b(2387, 1, "Function_overload_must_be_static_2387", "Function overload must be static."), + Function_overload_must_not_be_static: b(2388, 1, "Function_overload_must_not_be_static_2388", "Function overload must not be static."), + Function_implementation_name_must_be_0: b(2389, 1, "Function_implementation_name_must_be_0_2389", "Function implementation name must be '{0}'."), + Constructor_implementation_is_missing: b(2390, 1, "Constructor_implementation_is_missing_2390", "Constructor implementation is missing."), + Function_implementation_is_missing_or_not_immediately_following_the_declaration: b(2391, 1, "Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391", "Function implementation is missing or not immediately following the declaration."), + Multiple_constructor_implementations_are_not_allowed: b(2392, 1, "Multiple_constructor_implementations_are_not_allowed_2392", "Multiple constructor implementations are not allowed."), + Duplicate_function_implementation: b(2393, 1, "Duplicate_function_implementation_2393", "Duplicate function implementation."), + This_overload_signature_is_not_compatible_with_its_implementation_signature: b(2394, 1, "This_overload_signature_is_not_compatible_with_its_implementation_signature_2394", "This overload signature is not compatible with its implementation signature."), + Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local: b(2395, 1, "Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395", "Individual declarations in merged declaration '{0}' must be all exported or all local."), + Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters: b(2396, 1, "Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters_2396", "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters."), + Declaration_name_conflicts_with_built_in_global_identifier_0: b(2397, 1, "Declaration_name_conflicts_with_built_in_global_identifier_0_2397", "Declaration name conflicts with built-in global identifier '{0}'."), + constructor_cannot_be_used_as_a_parameter_property_name: b(2398, 1, "constructor_cannot_be_used_as_a_parameter_property_name_2398", "'constructor' cannot be used as a parameter property name."), + Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference: b(2399, 1, "Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399", "Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference."), + Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference: b(2400, 1, "Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400", "Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference."), + A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers: b(2401, 1, "A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401", "A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers."), + Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference: b(2402, 1, "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402", "Expression resolves to '_super' that compiler uses to capture base class reference."), + Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2: b(2403, 1, "Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403", "Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'."), + The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation: b(2404, 1, "The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404", "The left-hand side of a 'for...in' statement cannot use a type annotation."), + The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any: b(2405, 1, "The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405", "The left-hand side of a 'for...in' statement must be of type 'string' or 'any'."), + The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access: b(2406, 1, "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406", "The left-hand side of a 'for...in' statement must be a variable or a property access."), + The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0: b(2407, 1, "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407", "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'."), + Setters_cannot_return_a_value: b(2408, 1, "Setters_cannot_return_a_value_2408", "Setters cannot return a value."), + Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: b(2409, 1, "Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409", "Return type of constructor signature must be assignable to the instance type of the class."), + The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any: b(2410, 1, "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410", "The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'."), + Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target: b(2412, 1, "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412", "Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target."), + Property_0_of_type_1_is_not_assignable_to_2_index_type_3: b(2411, 1, "Property_0_of_type_1_is_not_assignable_to_2_index_type_3_2411", "Property '{0}' of type '{1}' is not assignable to '{2}' index type '{3}'."), + _0_index_type_1_is_not_assignable_to_2_index_type_3: b(2413, 1, "_0_index_type_1_is_not_assignable_to_2_index_type_3_2413", "'{0}' index type '{1}' is not assignable to '{2}' index type '{3}'."), + Class_name_cannot_be_0: b(2414, 1, "Class_name_cannot_be_0_2414", "Class name cannot be '{0}'."), + Class_0_incorrectly_extends_base_class_1: b(2415, 1, "Class_0_incorrectly_extends_base_class_1_2415", "Class '{0}' incorrectly extends base class '{1}'."), + Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2: b(2416, 1, "Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416", "Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'."), + Class_static_side_0_incorrectly_extends_base_class_static_side_1: b(2417, 1, "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417", "Class static side '{0}' incorrectly extends base class static side '{1}'."), + Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1: b(2418, 1, "Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418", "Type of computed property's value is '{0}', which is not assignable to type '{1}'."), + Types_of_construct_signatures_are_incompatible: b(2419, 1, "Types_of_construct_signatures_are_incompatible_2419", "Types of construct signatures are incompatible."), + Class_0_incorrectly_implements_interface_1: b(2420, 1, "Class_0_incorrectly_implements_interface_1_2420", "Class '{0}' incorrectly implements interface '{1}'."), + A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members: b(2422, 1, "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422", "A class can only implement an object type or intersection of object types with statically known members."), + Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: b(2423, 1, "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423", "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."), + Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: b(2425, 1, "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425", "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."), + Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: b(2426, 1, "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426", "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."), + Interface_name_cannot_be_0: b(2427, 1, "Interface_name_cannot_be_0_2427", "Interface name cannot be '{0}'."), + All_declarations_of_0_must_have_identical_type_parameters: b(2428, 1, "All_declarations_of_0_must_have_identical_type_parameters_2428", "All declarations of '{0}' must have identical type parameters."), + Interface_0_incorrectly_extends_interface_1: b(2430, 1, "Interface_0_incorrectly_extends_interface_1_2430", "Interface '{0}' incorrectly extends interface '{1}'."), + Enum_name_cannot_be_0: b(2431, 1, "Enum_name_cannot_be_0_2431", "Enum name cannot be '{0}'."), + In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: b(2432, 1, "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432", "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element."), + A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: b(2433, 1, "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433", "A namespace declaration cannot be in a different file from a class or function with which it is merged."), + A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: b(2434, 1, "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434", "A namespace declaration cannot be located prior to a class or function with which it is merged."), + Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces: b(2435, 1, "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435", "Ambient modules cannot be nested in other modules or namespaces."), + Ambient_module_declaration_cannot_specify_relative_module_name: b(2436, 1, "Ambient_module_declaration_cannot_specify_relative_module_name_2436", "Ambient module declaration cannot specify relative module name."), + Module_0_is_hidden_by_a_local_declaration_with_the_same_name: b(2437, 1, "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437", "Module '{0}' is hidden by a local declaration with the same name."), + Import_name_cannot_be_0: b(2438, 1, "Import_name_cannot_be_0_2438", "Import name cannot be '{0}'."), + Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name: b(2439, 1, "Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439", "Import or export declaration in an ambient module declaration cannot reference module through relative module name."), + Import_declaration_conflicts_with_local_declaration_of_0: b(2440, 1, "Import_declaration_conflicts_with_local_declaration_of_0_2440", "Import declaration conflicts with local declaration of '{0}'."), + Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module: b(2441, 1, "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441", "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module."), + Types_have_separate_declarations_of_a_private_property_0: b(2442, 1, "Types_have_separate_declarations_of_a_private_property_0_2442", "Types have separate declarations of a private property '{0}'."), + Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: b(2443, 1, "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443", "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'."), + Property_0_is_protected_in_type_1_but_public_in_type_2: b(2444, 1, "Property_0_is_protected_in_type_1_but_public_in_type_2_2444", "Property '{0}' is protected in type '{1}' but public in type '{2}'."), + Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses: b(2445, 1, "Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445", "Property '{0}' is protected and only accessible within class '{1}' and its subclasses."), + Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2: b(2446, 1, "Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_cl_2446", "Property '{0}' is protected and only accessible through an instance of class '{1}'. This is an instance of class '{2}'."), + The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: b(2447, 1, "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447", "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead."), + Block_scoped_variable_0_used_before_its_declaration: b(2448, 1, "Block_scoped_variable_0_used_before_its_declaration_2448", "Block-scoped variable '{0}' used before its declaration."), + Class_0_used_before_its_declaration: b(2449, 1, "Class_0_used_before_its_declaration_2449", "Class '{0}' used before its declaration."), + Enum_0_used_before_its_declaration: b(2450, 1, "Enum_0_used_before_its_declaration_2450", "Enum '{0}' used before its declaration."), + Cannot_redeclare_block_scoped_variable_0: b(2451, 1, "Cannot_redeclare_block_scoped_variable_0_2451", "Cannot redeclare block-scoped variable '{0}'."), + An_enum_member_cannot_have_a_numeric_name: b(2452, 1, "An_enum_member_cannot_have_a_numeric_name_2452", "An enum member cannot have a numeric name."), + Variable_0_is_used_before_being_assigned: b(2454, 1, "Variable_0_is_used_before_being_assigned_2454", "Variable '{0}' is used before being assigned."), + Type_alias_0_circularly_references_itself: b(2456, 1, "Type_alias_0_circularly_references_itself_2456", "Type alias '{0}' circularly references itself."), + Type_alias_name_cannot_be_0: b(2457, 1, "Type_alias_name_cannot_be_0_2457", "Type alias name cannot be '{0}'."), + An_AMD_module_cannot_have_multiple_name_assignments: b(2458, 1, "An_AMD_module_cannot_have_multiple_name_assignments_2458", "An AMD module cannot have multiple name assignments."), + Module_0_declares_1_locally_but_it_is_not_exported: b(2459, 1, "Module_0_declares_1_locally_but_it_is_not_exported_2459", "Module '{0}' declares '{1}' locally, but it is not exported."), + Module_0_declares_1_locally_but_it_is_exported_as_2: b(2460, 1, "Module_0_declares_1_locally_but_it_is_exported_as_2_2460", "Module '{0}' declares '{1}' locally, but it is exported as '{2}'."), + Type_0_is_not_an_array_type: b(2461, 1, "Type_0_is_not_an_array_type_2461", "Type '{0}' is not an array type."), + A_rest_element_must_be_last_in_a_destructuring_pattern: b(2462, 1, "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", "A rest element must be last in a destructuring pattern."), + A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: b(2463, 1, "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463", "A binding pattern parameter cannot be optional in an implementation signature."), + A_computed_property_name_must_be_of_type_string_number_symbol_or_any: b(2464, 1, "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464", "A computed property name must be of type 'string', 'number', 'symbol', or 'any'."), + this_cannot_be_referenced_in_a_computed_property_name: b(2465, 1, "this_cannot_be_referenced_in_a_computed_property_name_2465", "'this' cannot be referenced in a computed property name."), + super_cannot_be_referenced_in_a_computed_property_name: b(2466, 1, "super_cannot_be_referenced_in_a_computed_property_name_2466", "'super' cannot be referenced in a computed property name."), + A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type: b(2467, 1, "A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467", "A computed property name cannot reference a type parameter from its containing type."), + Cannot_find_global_value_0: b(2468, 1, "Cannot_find_global_value_0_2468", "Cannot find global value '{0}'."), + The_0_operator_cannot_be_applied_to_type_symbol: b(2469, 1, "The_0_operator_cannot_be_applied_to_type_symbol_2469", "The '{0}' operator cannot be applied to type 'symbol'."), + Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher: b(2472, 1, "Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472", "Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher."), + Enum_declarations_must_all_be_const_or_non_const: b(2473, 1, "Enum_declarations_must_all_be_const_or_non_const_2473", "Enum declarations must all be const or non-const."), + const_enum_member_initializers_must_be_constant_expressions: b(2474, 1, "const_enum_member_initializers_must_be_constant_expressions_2474", "const enum member initializers must be constant expressions."), + const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query: b(2475, 1, "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475", "'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query."), + A_const_enum_member_can_only_be_accessed_using_a_string_literal: b(2476, 1, "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476", "A const enum member can only be accessed using a string literal."), + const_enum_member_initializer_was_evaluated_to_a_non_finite_value: b(2477, 1, "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477", "'const' enum member initializer was evaluated to a non-finite value."), + const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN: b(2478, 1, "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478", "'const' enum member initializer was evaluated to disallowed value 'NaN'."), + let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: b(2480, 1, "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480", "'let' is not allowed to be used as a name in 'let' or 'const' declarations."), + Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: b(2481, 1, "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481", "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'."), + The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: b(2483, 1, "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483", "The left-hand side of a 'for...of' statement cannot use a type annotation."), + Export_declaration_conflicts_with_exported_declaration_of_0: b(2484, 1, "Export_declaration_conflicts_with_exported_declaration_of_0_2484", "Export declaration conflicts with exported declaration of '{0}'."), + The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access: b(2487, 1, "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487", "The left-hand side of a 'for...of' statement must be a variable or a property access."), + Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator: b(2488, 1, "Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488", "Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator."), + An_iterator_must_have_a_next_method: b(2489, 1, "An_iterator_must_have_a_next_method_2489", "An iterator must have a 'next()' method."), + The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property: b(2490, 1, "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490", "The type returned by the '{0}()' method of an iterator must have a 'value' property."), + The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern: b(2491, 1, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491", "The left-hand side of a 'for...in' statement cannot be a destructuring pattern."), + Cannot_redeclare_identifier_0_in_catch_clause: b(2492, 1, "Cannot_redeclare_identifier_0_in_catch_clause_2492", "Cannot redeclare identifier '{0}' in catch clause."), + Tuple_type_0_of_length_1_has_no_element_at_index_2: b(2493, 1, "Tuple_type_0_of_length_1_has_no_element_at_index_2_2493", "Tuple type '{0}' of length '{1}' has no element at index '{2}'."), + Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: b(2494, 1, "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494", "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher."), + Type_0_is_not_an_array_type_or_a_string_type: b(2495, 1, "Type_0_is_not_an_array_type_or_a_string_type_2495", "Type '{0}' is not an array type or a string type."), + The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_function_expression: b(2496, 1, "The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_func_2496", "The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression."), + This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export: b(2497, 1, "This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497", "This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export."), + Module_0_uses_export_and_cannot_be_used_with_export_Asterisk: b(2498, 1, "Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498", "Module '{0}' uses 'export =' and cannot be used with 'export *'."), + An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments: b(2499, 1, "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499", "An interface can only extend an identifier/qualified-name with optional type arguments."), + A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments: b(2500, 1, "A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500", "A class can only implement an identifier/qualified-name with optional type arguments."), + A_rest_element_cannot_contain_a_binding_pattern: b(2501, 1, "A_rest_element_cannot_contain_a_binding_pattern_2501", "A rest element cannot contain a binding pattern."), + _0_is_referenced_directly_or_indirectly_in_its_own_type_annotation: b(2502, 1, "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502", "'{0}' is referenced directly or indirectly in its own type annotation."), + Cannot_find_namespace_0: b(2503, 1, "Cannot_find_namespace_0_2503", "Cannot find namespace '{0}'."), + Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator: b(2504, 1, "Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504", "Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator."), + A_generator_cannot_have_a_void_type_annotation: b(2505, 1, "A_generator_cannot_have_a_void_type_annotation_2505", "A generator cannot have a 'void' type annotation."), + _0_is_referenced_directly_or_indirectly_in_its_own_base_expression: b(2506, 1, "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506", "'{0}' is referenced directly or indirectly in its own base expression."), + Type_0_is_not_a_constructor_function_type: b(2507, 1, "Type_0_is_not_a_constructor_function_type_2507", "Type '{0}' is not a constructor function type."), + No_base_constructor_has_the_specified_number_of_type_arguments: b(2508, 1, "No_base_constructor_has_the_specified_number_of_type_arguments_2508", "No base constructor has the specified number of type arguments."), + Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members: b(2509, 1, "Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509", "Base constructor return type '{0}' is not an object type or intersection of object types with statically known members."), + Base_constructors_must_all_have_the_same_return_type: b(2510, 1, "Base_constructors_must_all_have_the_same_return_type_2510", "Base constructors must all have the same return type."), + Cannot_create_an_instance_of_an_abstract_class: b(2511, 1, "Cannot_create_an_instance_of_an_abstract_class_2511", "Cannot create an instance of an abstract class."), + Overload_signatures_must_all_be_abstract_or_non_abstract: b(2512, 1, "Overload_signatures_must_all_be_abstract_or_non_abstract_2512", "Overload signatures must all be abstract or non-abstract."), + Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression: b(2513, 1, "Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513", "Abstract method '{0}' in class '{1}' cannot be accessed via super expression."), + A_tuple_type_cannot_be_indexed_with_a_negative_value: b(2514, 1, "A_tuple_type_cannot_be_indexed_with_a_negative_value_2514", "A tuple type cannot be indexed with a negative value."), + Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2: b(2515, 1, "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515", "Non-abstract class '{0}' does not implement inherited abstract member {1} from class '{2}'."), + All_declarations_of_an_abstract_method_must_be_consecutive: b(2516, 1, "All_declarations_of_an_abstract_method_must_be_consecutive_2516", "All declarations of an abstract method must be consecutive."), + Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type: b(2517, 1, "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517", "Cannot assign an abstract constructor type to a non-abstract constructor type."), + A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard: b(2518, 1, "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518", "A 'this'-based type guard is not compatible with a parameter-based type guard."), + An_async_iterator_must_have_a_next_method: b(2519, 1, "An_async_iterator_must_have_a_next_method_2519", "An async iterator must have a 'next()' method."), + Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: b(2520, 1, "Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520", "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions."), + The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_standard_function_or_method: b(2522, 1, "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_sta_2522", "The 'arguments' object cannot be referenced in an async function or method in ES5. Consider using a standard function or method."), + yield_expressions_cannot_be_used_in_a_parameter_initializer: b(2523, 1, "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523", "'yield' expressions cannot be used in a parameter initializer."), + await_expressions_cannot_be_used_in_a_parameter_initializer: b(2524, 1, "await_expressions_cannot_be_used_in_a_parameter_initializer_2524", "'await' expressions cannot be used in a parameter initializer."), + A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface: b(2526, 1, "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526", "A 'this' type is available only in a non-static member of a class or interface."), + The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary: b(2527, 1, "The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527", "The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary."), + A_module_cannot_have_multiple_default_exports: b(2528, 1, "A_module_cannot_have_multiple_default_exports_2528", "A module cannot have multiple default exports."), + Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions: b(2529, 1, "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529", "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions."), + Property_0_is_incompatible_with_index_signature: b(2530, 1, "Property_0_is_incompatible_with_index_signature_2530", "Property '{0}' is incompatible with index signature."), + Object_is_possibly_null: b(2531, 1, "Object_is_possibly_null_2531", "Object is possibly 'null'."), + Object_is_possibly_undefined: b(2532, 1, "Object_is_possibly_undefined_2532", "Object is possibly 'undefined'."), + Object_is_possibly_null_or_undefined: b(2533, 1, "Object_is_possibly_null_or_undefined_2533", "Object is possibly 'null' or 'undefined'."), + A_function_returning_never_cannot_have_a_reachable_end_point: b(2534, 1, "A_function_returning_never_cannot_have_a_reachable_end_point_2534", "A function returning 'never' cannot have a reachable end point."), + Type_0_cannot_be_used_to_index_type_1: b(2536, 1, "Type_0_cannot_be_used_to_index_type_1_2536", "Type '{0}' cannot be used to index type '{1}'."), + Type_0_has_no_matching_index_signature_for_type_1: b(2537, 1, "Type_0_has_no_matching_index_signature_for_type_1_2537", "Type '{0}' has no matching index signature for type '{1}'."), + Type_0_cannot_be_used_as_an_index_type: b(2538, 1, "Type_0_cannot_be_used_as_an_index_type_2538", "Type '{0}' cannot be used as an index type."), + Cannot_assign_to_0_because_it_is_not_a_variable: b(2539, 1, "Cannot_assign_to_0_because_it_is_not_a_variable_2539", "Cannot assign to '{0}' because it is not a variable."), + Cannot_assign_to_0_because_it_is_a_read_only_property: b(2540, 1, "Cannot_assign_to_0_because_it_is_a_read_only_property_2540", "Cannot assign to '{0}' because it is a read-only property."), + Index_signature_in_type_0_only_permits_reading: b(2542, 1, "Index_signature_in_type_0_only_permits_reading_2542", "Index signature in type '{0}' only permits reading."), + Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference: b(2543, 1, "Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543", "Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference."), + Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference: b(2544, 1, "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544", "Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference."), + A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any: b(2545, 1, "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545", "A mixin class must have a constructor with a single rest parameter of type 'any[]'."), + The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property: b(2547, 1, "The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547", "The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property."), + Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: b(2548, 1, "Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548", "Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator."), + Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: b(2549, 1, "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549", "Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator."), + Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later: b(2550, 1, "Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_c_2550", "Property '{0}' does not exist on type '{1}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{2}' or later."), + Property_0_does_not_exist_on_type_1_Did_you_mean_2: b(2551, 1, "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551", "Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?"), + Cannot_find_name_0_Did_you_mean_1: b(2552, 1, "Cannot_find_name_0_Did_you_mean_1_2552", "Cannot find name '{0}'. Did you mean '{1}'?"), + Computed_values_are_not_permitted_in_an_enum_with_string_valued_members: b(2553, 1, "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553", "Computed values are not permitted in an enum with string valued members."), + Expected_0_arguments_but_got_1: b(2554, 1, "Expected_0_arguments_but_got_1_2554", "Expected {0} arguments, but got {1}."), + Expected_at_least_0_arguments_but_got_1: b(2555, 1, "Expected_at_least_0_arguments_but_got_1_2555", "Expected at least {0} arguments, but got {1}."), + A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter: b(2556, 1, "A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter_2556", "A spread argument must either have a tuple type or be passed to a rest parameter."), + Expected_0_type_arguments_but_got_1: b(2558, 1, "Expected_0_type_arguments_but_got_1_2558", "Expected {0} type arguments, but got {1}."), + Type_0_has_no_properties_in_common_with_type_1: b(2559, 1, "Type_0_has_no_properties_in_common_with_type_1_2559", "Type '{0}' has no properties in common with type '{1}'."), + Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it: b(2560, 1, "Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560", "Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?"), + Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2: b(2561, 1, "Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_writ_2561", "Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?"), + Base_class_expressions_cannot_reference_class_type_parameters: b(2562, 1, "Base_class_expressions_cannot_reference_class_type_parameters_2562", "Base class expressions cannot reference class type parameters."), + The_containing_function_or_module_body_is_too_large_for_control_flow_analysis: b(2563, 1, "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563", "The containing function or module body is too large for control flow analysis."), + Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor: b(2564, 1, "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564", "Property '{0}' has no initializer and is not definitely assigned in the constructor."), + Property_0_is_used_before_being_assigned: b(2565, 1, "Property_0_is_used_before_being_assigned_2565", "Property '{0}' is used before being assigned."), + A_rest_element_cannot_have_a_property_name: b(2566, 1, "A_rest_element_cannot_have_a_property_name_2566", "A rest element cannot have a property name."), + Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations: b(2567, 1, "Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567", "Enum declarations can only merge with namespace or other enum declarations."), + Property_0_may_not_exist_on_type_1_Did_you_mean_2: b(2568, 1, "Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568", "Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?"), + Could_not_find_name_0_Did_you_mean_1: b(2570, 1, "Could_not_find_name_0_Did_you_mean_1_2570", "Could not find name '{0}'. Did you mean '{1}'?"), + Object_is_of_type_unknown: b(2571, 1, "Object_is_of_type_unknown_2571", "Object is of type 'unknown'."), + A_rest_element_type_must_be_an_array_type: b(2574, 1, "A_rest_element_type_must_be_an_array_type_2574", "A rest element type must be an array type."), + No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments: b(2575, 1, "No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575", "No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments."), + Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead: b(2576, 1, "Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead_2576", "Property '{0}' does not exist on type '{1}'. Did you mean to access the static member '{2}' instead?"), + Return_type_annotation_circularly_references_itself: b(2577, 1, "Return_type_annotation_circularly_references_itself_2577", "Return type annotation circularly references itself."), + Unused_ts_expect_error_directive: b(2578, 1, "Unused_ts_expect_error_directive_2578", "Unused '@ts-expect-error' directive."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode: b(2580, 1, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2580", "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery: b(2581, 1, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2581", "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha: b(2582, 1, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2582", "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`."), + Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later: b(2583, 1, "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583", "Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later."), + Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom: b(2584, 1, "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584", "Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'."), + _0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later: b(2585, 1, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585", "'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later."), + Cannot_assign_to_0_because_it_is_a_constant: b(2588, 1, "Cannot_assign_to_0_because_it_is_a_constant_2588", "Cannot assign to '{0}' because it is a constant."), + Type_instantiation_is_excessively_deep_and_possibly_infinite: b(2589, 1, "Type_instantiation_is_excessively_deep_and_possibly_infinite_2589", "Type instantiation is excessively deep and possibly infinite."), + Expression_produces_a_union_type_that_is_too_complex_to_represent: b(2590, 1, "Expression_produces_a_union_type_that_is_too_complex_to_represent_2590", "Expression produces a union type that is too complex to represent."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig: b(2591, 1, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2591", "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig: b(2592, 1, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2592", "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig: b(2593, 1, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2593", "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig."), + This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag: b(2594, 1, "This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag_2594", "This module is declared with 'export =', and can only be used with a default import when using the '{0}' flag."), + _0_can_only_be_imported_by_using_a_default_import: b(2595, 1, "_0_can_only_be_imported_by_using_a_default_import_2595", "'{0}' can only be imported by using a default import."), + _0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: b(2596, 1, "_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import_2596", "'{0}' can only be imported by turning on the 'esModuleInterop' flag and using a default import."), + _0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import: b(2597, 1, "_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import_2597", "'{0}' can only be imported by using a 'require' call or by using a default import."), + _0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: b(2598, 1, "_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using__2598", "'{0}' can only be imported by using a 'require' call or by turning on the 'esModuleInterop' flag and using a default import."), + JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist: b(2602, 1, "JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602", "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist."), + Property_0_in_type_1_is_not_assignable_to_type_2: b(2603, 1, "Property_0_in_type_1_is_not_assignable_to_type_2_2603", "Property '{0}' in type '{1}' is not assignable to type '{2}'."), + JSX_element_type_0_does_not_have_any_construct_or_call_signatures: b(2604, 1, "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604", "JSX element type '{0}' does not have any construct or call signatures."), + Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property: b(2606, 1, "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606", "Property '{0}' of JSX spread attribute is not assignable to target property."), + JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: b(2607, 1, "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", "JSX element class does not support attributes because it does not have a '{0}' property."), + The_global_type_JSX_0_may_not_have_more_than_one_property: b(2608, 1, "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", "The global type 'JSX.{0}' may not have more than one property."), + JSX_spread_child_must_be_an_array_type: b(2609, 1, "JSX_spread_child_must_be_an_array_type_2609", "JSX spread child must be an array type."), + _0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property: b(2610, 1, "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610", "'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property."), + _0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor: b(2611, 1, "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611", "'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor."), + Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration: b(2612, 1, "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612", "Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration."), + Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead: b(2613, 1, "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613", "Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?"), + Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead: b(2614, 1, "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614", "Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?"), + Type_of_property_0_circularly_references_itself_in_mapped_type_1: b(2615, 1, "Type_of_property_0_circularly_references_itself_in_mapped_type_1_2615", "Type of property '{0}' circularly references itself in mapped type '{1}'."), + _0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import: b(2616, 1, "_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import_2616", "'{0}' can only be imported by using 'import {1} = require({2})' or a default import."), + _0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: b(2617, 1, "_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_us_2617", "'{0}' can only be imported by using 'import {1} = require({2})' or by turning on the 'esModuleInterop' flag and using a default import."), + Source_has_0_element_s_but_target_requires_1: b(2618, 1, "Source_has_0_element_s_but_target_requires_1_2618", "Source has {0} element(s) but target requires {1}."), + Source_has_0_element_s_but_target_allows_only_1: b(2619, 1, "Source_has_0_element_s_but_target_allows_only_1_2619", "Source has {0} element(s) but target allows only {1}."), + Target_requires_0_element_s_but_source_may_have_fewer: b(2620, 1, "Target_requires_0_element_s_but_source_may_have_fewer_2620", "Target requires {0} element(s) but source may have fewer."), + Target_allows_only_0_element_s_but_source_may_have_more: b(2621, 1, "Target_allows_only_0_element_s_but_source_may_have_more_2621", "Target allows only {0} element(s) but source may have more."), + Source_provides_no_match_for_required_element_at_position_0_in_target: b(2623, 1, "Source_provides_no_match_for_required_element_at_position_0_in_target_2623", "Source provides no match for required element at position {0} in target."), + Source_provides_no_match_for_variadic_element_at_position_0_in_target: b(2624, 1, "Source_provides_no_match_for_variadic_element_at_position_0_in_target_2624", "Source provides no match for variadic element at position {0} in target."), + Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target: b(2625, 1, "Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target_2625", "Variadic element at position {0} in source does not match element at position {1} in target."), + Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target: b(2626, 1, "Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target_2626", "Type at position {0} in source is not compatible with type at position {1} in target."), + Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target: b(2627, 1, "Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target_2627", "Type at positions {0} through {1} in source is not compatible with type at position {2} in target."), + Cannot_assign_to_0_because_it_is_an_enum: b(2628, 1, "Cannot_assign_to_0_because_it_is_an_enum_2628", "Cannot assign to '{0}' because it is an enum."), + Cannot_assign_to_0_because_it_is_a_class: b(2629, 1, "Cannot_assign_to_0_because_it_is_a_class_2629", "Cannot assign to '{0}' because it is a class."), + Cannot_assign_to_0_because_it_is_a_function: b(2630, 1, "Cannot_assign_to_0_because_it_is_a_function_2630", "Cannot assign to '{0}' because it is a function."), + Cannot_assign_to_0_because_it_is_a_namespace: b(2631, 1, "Cannot_assign_to_0_because_it_is_a_namespace_2631", "Cannot assign to '{0}' because it is a namespace."), + Cannot_assign_to_0_because_it_is_an_import: b(2632, 1, "Cannot_assign_to_0_because_it_is_an_import_2632", "Cannot assign to '{0}' because it is an import."), + JSX_property_access_expressions_cannot_include_JSX_namespace_names: b(2633, 1, "JSX_property_access_expressions_cannot_include_JSX_namespace_names_2633", "JSX property access expressions cannot include JSX namespace names"), + _0_index_signatures_are_incompatible: b(2634, 1, "_0_index_signatures_are_incompatible_2634", "'{0}' index signatures are incompatible."), + Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable: b(2635, 1, "Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable_2635", "Type '{0}' has no signatures for which the type argument list is applicable."), + Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation: b(2636, 1, "Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation_2636", "Type '{0}' is not assignable to type '{1}' as implied by variance annotation."), + Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types: b(2637, 1, "Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_t_2637", "Variance annotations are only supported in type aliases for object, function, constructor, and mapped types."), + Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator: b(2638, 1, "Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638", "Type '{0}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator."), + React_components_cannot_include_JSX_namespace_names: b(2639, 1, "React_components_cannot_include_JSX_namespace_names_2639", "React components cannot include JSX namespace names"), + Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity: b(2649, 1, "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649", "Cannot augment module '{0}' with value exports because it resolves to a non-module entity."), + Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more: b(2650, 1, "Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and__2650", "Non-abstract class expression is missing implementations for the following members of '{0}': {1} and {2} more."), + A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums: b(2651, 1, "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651", "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."), + Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead: b(2652, 1, "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652", "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."), + Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1: b(2653, 1, "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653", "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."), + Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2: b(2654, 1, "Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_2654", "Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2}."), + Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more: b(2655, 1, "Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more_2655", "Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2} and {3} more."), + Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1: b(2656, 1, "Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_2656", "Non-abstract class expression is missing implementations for the following members of '{0}': {1}."), + JSX_expressions_must_have_one_parent_element: b(2657, 1, "JSX_expressions_must_have_one_parent_element_2657", "JSX expressions must have one parent element."), + Type_0_provides_no_match_for_the_signature_1: b(2658, 1, "Type_0_provides_no_match_for_the_signature_1_2658", "Type '{0}' provides no match for the signature '{1}'."), + super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher: b(2659, 1, "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."), + super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions: b(2660, 1, "super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660", "'super' can only be referenced in members of derived classes or object literal expressions."), + Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module: b(2661, 1, "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661", "Cannot export '{0}'. Only local declarations can be exported from a module."), + Cannot_find_name_0_Did_you_mean_the_static_member_1_0: b(2662, 1, "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662", "Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?"), + Cannot_find_name_0_Did_you_mean_the_instance_member_this_0: b(2663, 1, "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663", "Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?"), + Invalid_module_name_in_augmentation_module_0_cannot_be_found: b(2664, 1, "Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664", "Invalid module name in augmentation, module '{0}' cannot be found."), + Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented: b(2665, 1, "Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665", "Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented."), + Exports_and_export_assignments_are_not_permitted_in_module_augmentations: b(2666, 1, "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666", "Exports and export assignments are not permitted in module augmentations."), + Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module: b(2667, 1, "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667", "Imports are not permitted in module augmentations. Consider moving them to the enclosing external module."), + export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible: b(2668, 1, "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668", "'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible."), + Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations: b(2669, 1, "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669", "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."), + Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context: b(2670, 1, "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670", "Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context."), + Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity: b(2671, 1, "Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671", "Cannot augment module '{0}' because it resolves to a non-module entity."), + Cannot_assign_a_0_constructor_type_to_a_1_constructor_type: b(2672, 1, "Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672", "Cannot assign a '{0}' constructor type to a '{1}' constructor type."), + Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration: b(2673, 1, "Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673", "Constructor of class '{0}' is private and only accessible within the class declaration."), + Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration: b(2674, 1, "Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674", "Constructor of class '{0}' is protected and only accessible within the class declaration."), + Cannot_extend_a_class_0_Class_constructor_is_marked_as_private: b(2675, 1, "Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675", "Cannot extend a class '{0}'. Class constructor is marked as private."), + Accessors_must_both_be_abstract_or_non_abstract: b(2676, 1, "Accessors_must_both_be_abstract_or_non_abstract_2676", "Accessors must both be abstract or non-abstract."), + A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type: b(2677, 1, "A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677", "A type predicate's type must be assignable to its parameter's type."), + Type_0_is_not_comparable_to_type_1: b(2678, 1, "Type_0_is_not_comparable_to_type_1_2678", "Type '{0}' is not comparable to type '{1}'."), + A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void: b(2679, 1, "A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679", "A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'."), + A_0_parameter_must_be_the_first_parameter: b(2680, 1, "A_0_parameter_must_be_the_first_parameter_2680", "A '{0}' parameter must be the first parameter."), + A_constructor_cannot_have_a_this_parameter: b(2681, 1, "A_constructor_cannot_have_a_this_parameter_2681", "A constructor cannot have a 'this' parameter."), + this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation: b(2683, 1, "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683", "'this' implicitly has type 'any' because it does not have a type annotation."), + The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1: b(2684, 1, "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684", "The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'."), + The_this_types_of_each_signature_are_incompatible: b(2685, 1, "The_this_types_of_each_signature_are_incompatible_2685", "The 'this' types of each signature are incompatible."), + _0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead: b(2686, 1, "_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686", "'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead."), + All_declarations_of_0_must_have_identical_modifiers: b(2687, 1, "All_declarations_of_0_must_have_identical_modifiers_2687", "All declarations of '{0}' must have identical modifiers."), + Cannot_find_type_definition_file_for_0: b(2688, 1, "Cannot_find_type_definition_file_for_0_2688", "Cannot find type definition file for '{0}'."), + Cannot_extend_an_interface_0_Did_you_mean_implements: b(2689, 1, "Cannot_extend_an_interface_0_Did_you_mean_implements_2689", "Cannot extend an interface '{0}'. Did you mean 'implements'?"), + _0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0: b(2690, 1, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0_2690", "'{0}' only refers to a type, but is being used as a value here. Did you mean to use '{1} in {0}'?"), + _0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible: b(2692, 1, "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692", "'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible."), + _0_only_refers_to_a_type_but_is_being_used_as_a_value_here: b(2693, 1, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693", "'{0}' only refers to a type, but is being used as a value here."), + Namespace_0_has_no_exported_member_1: b(2694, 1, "Namespace_0_has_no_exported_member_1_2694", "Namespace '{0}' has no exported member '{1}'."), + Left_side_of_comma_operator_is_unused_and_has_no_side_effects: b( + 2695, + 1, + "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695", + "Left side of comma operator is unused and has no side effects.", + /*reportsUnnecessary*/ + !0 + ), + The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead: b(2696, 1, "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696", "The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?"), + An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: b(2697, 1, "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697", "An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."), + Spread_types_may_only_be_created_from_object_types: b(2698, 1, "Spread_types_may_only_be_created_from_object_types_2698", "Spread types may only be created from object types."), + Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1: b(2699, 1, "Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699", "Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'."), + Rest_types_may_only_be_created_from_object_types: b(2700, 1, "Rest_types_may_only_be_created_from_object_types_2700", "Rest types may only be created from object types."), + The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access: b(2701, 1, "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701", "The target of an object rest assignment must be a variable or a property access."), + _0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: b(2702, 1, "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", "'{0}' only refers to a type, but is being used as a namespace here."), + The_operand_of_a_delete_operator_must_be_a_property_reference: b(2703, 1, "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", "The operand of a 'delete' operator must be a property reference."), + The_operand_of_a_delete_operator_cannot_be_a_read_only_property: b(2704, 1, "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704", "The operand of a 'delete' operator cannot be a read-only property."), + An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: b(2705, 1, "An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_2705", "An async function or method in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."), + Required_type_parameters_may_not_follow_optional_type_parameters: b(2706, 1, "Required_type_parameters_may_not_follow_optional_type_parameters_2706", "Required type parameters may not follow optional type parameters."), + Generic_type_0_requires_between_1_and_2_type_arguments: b(2707, 1, "Generic_type_0_requires_between_1_and_2_type_arguments_2707", "Generic type '{0}' requires between {1} and {2} type arguments."), + Cannot_use_namespace_0_as_a_value: b(2708, 1, "Cannot_use_namespace_0_as_a_value_2708", "Cannot use namespace '{0}' as a value."), + Cannot_use_namespace_0_as_a_type: b(2709, 1, "Cannot_use_namespace_0_as_a_type_2709", "Cannot use namespace '{0}' as a type."), + _0_are_specified_twice_The_attribute_named_0_will_be_overwritten: b(2710, 1, "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710", "'{0}' are specified twice. The attribute named '{0}' will be overwritten."), + A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: b(2711, 1, "A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711", "A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."), + A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: b(2712, 1, "A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_t_2712", "A dynamic import call in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."), + Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1: b(2713, 1, "Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713", `Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}["{1}"]'?`), + The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context: b(2714, 1, "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714", "The expression of an export assignment must be an identifier or qualified name in an ambient context."), + Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor: b(2715, 1, "Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor_2715", "Abstract property '{0}' in class '{1}' cannot be accessed in the constructor."), + Type_parameter_0_has_a_circular_default: b(2716, 1, "Type_parameter_0_has_a_circular_default_2716", "Type parameter '{0}' has a circular default."), + Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2: b(2717, 1, "Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717", "Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'."), + Duplicate_property_0: b(2718, 1, "Duplicate_property_0_2718", "Duplicate property '{0}'."), + Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated: b(2719, 1, "Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719", "Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated."), + Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass: b(2720, 1, "Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720", "Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?"), + Cannot_invoke_an_object_which_is_possibly_null: b(2721, 1, "Cannot_invoke_an_object_which_is_possibly_null_2721", "Cannot invoke an object which is possibly 'null'."), + Cannot_invoke_an_object_which_is_possibly_undefined: b(2722, 1, "Cannot_invoke_an_object_which_is_possibly_undefined_2722", "Cannot invoke an object which is possibly 'undefined'."), + Cannot_invoke_an_object_which_is_possibly_null_or_undefined: b(2723, 1, "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723", "Cannot invoke an object which is possibly 'null' or 'undefined'."), + _0_has_no_exported_member_named_1_Did_you_mean_2: b(2724, 1, "_0_has_no_exported_member_named_1_Did_you_mean_2_2724", "'{0}' has no exported member named '{1}'. Did you mean '{2}'?"), + Class_name_cannot_be_Object_when_targeting_ES5_with_module_0: b(2725, 1, "Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725", "Class name cannot be 'Object' when targeting ES5 with module {0}."), + Cannot_find_lib_definition_for_0: b(2726, 1, "Cannot_find_lib_definition_for_0_2726", "Cannot find lib definition for '{0}'."), + Cannot_find_lib_definition_for_0_Did_you_mean_1: b(2727, 1, "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727", "Cannot find lib definition for '{0}'. Did you mean '{1}'?"), + _0_is_declared_here: b(2728, 3, "_0_is_declared_here_2728", "'{0}' is declared here."), + Property_0_is_used_before_its_initialization: b(2729, 1, "Property_0_is_used_before_its_initialization_2729", "Property '{0}' is used before its initialization."), + An_arrow_function_cannot_have_a_this_parameter: b(2730, 1, "An_arrow_function_cannot_have_a_this_parameter_2730", "An arrow function cannot have a 'this' parameter."), + Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String: b(2731, 1, "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731", "Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."), + Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension: b(2732, 1, "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732", "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension."), + Property_0_was_also_declared_here: b(2733, 1, "Property_0_was_also_declared_here_2733", "Property '{0}' was also declared here."), + Are_you_missing_a_semicolon: b(2734, 1, "Are_you_missing_a_semicolon_2734", "Are you missing a semicolon?"), + Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1: b(2735, 1, "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735", "Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"), + Operator_0_cannot_be_applied_to_type_1: b(2736, 1, "Operator_0_cannot_be_applied_to_type_1_2736", "Operator '{0}' cannot be applied to type '{1}'."), + BigInt_literals_are_not_available_when_targeting_lower_than_ES2020: b(2737, 1, "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737", "BigInt literals are not available when targeting lower than ES2020."), + An_outer_value_of_this_is_shadowed_by_this_container: b(2738, 3, "An_outer_value_of_this_is_shadowed_by_this_container_2738", "An outer value of 'this' is shadowed by this container."), + Type_0_is_missing_the_following_properties_from_type_1_Colon_2: b(2739, 1, "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739", "Type '{0}' is missing the following properties from type '{1}': {2}"), + Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more: b(2740, 1, "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740", "Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more."), + Property_0_is_missing_in_type_1_but_required_in_type_2: b(2741, 1, "Property_0_is_missing_in_type_1_but_required_in_type_2_2741", "Property '{0}' is missing in type '{1}' but required in type '{2}'."), + The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary: b(2742, 1, "The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742", "The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary."), + No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments: b(2743, 1, "No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743", "No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments."), + Type_parameter_defaults_can_only_reference_previously_declared_type_parameters: b(2744, 1, "Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744", "Type parameter defaults can only reference previously declared type parameters."), + This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided: b(2745, 1, "This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745", "This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided."), + This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided: b(2746, 1, "This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746", "This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided."), + _0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2: b(2747, 1, "_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747", "'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'."), + Cannot_access_ambient_const_enums_when_0_is_enabled: b(2748, 1, "Cannot_access_ambient_const_enums_when_0_is_enabled_2748", "Cannot access ambient const enums when '{0}' is enabled."), + _0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0: b(2749, 1, "_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0_2749", "'{0}' refers to a value, but is being used as a type here. Did you mean 'typeof {0}'?"), + The_implementation_signature_is_declared_here: b(2750, 1, "The_implementation_signature_is_declared_here_2750", "The implementation signature is declared here."), + Circularity_originates_in_type_at_this_location: b(2751, 1, "Circularity_originates_in_type_at_this_location_2751", "Circularity originates in type at this location."), + The_first_export_default_is_here: b(2752, 1, "The_first_export_default_is_here_2752", "The first export default is here."), + Another_export_default_is_here: b(2753, 1, "Another_export_default_is_here_2753", "Another export default is here."), + super_may_not_use_type_arguments: b(2754, 1, "super_may_not_use_type_arguments_2754", "'super' may not use type arguments."), + No_constituent_of_type_0_is_callable: b(2755, 1, "No_constituent_of_type_0_is_callable_2755", "No constituent of type '{0}' is callable."), + Not_all_constituents_of_type_0_are_callable: b(2756, 1, "Not_all_constituents_of_type_0_are_callable_2756", "Not all constituents of type '{0}' are callable."), + Type_0_has_no_call_signatures: b(2757, 1, "Type_0_has_no_call_signatures_2757", "Type '{0}' has no call signatures."), + Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other: b(2758, 1, "Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758", "Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other."), + No_constituent_of_type_0_is_constructable: b(2759, 1, "No_constituent_of_type_0_is_constructable_2759", "No constituent of type '{0}' is constructable."), + Not_all_constituents_of_type_0_are_constructable: b(2760, 1, "Not_all_constituents_of_type_0_are_constructable_2760", "Not all constituents of type '{0}' are constructable."), + Type_0_has_no_construct_signatures: b(2761, 1, "Type_0_has_no_construct_signatures_2761", "Type '{0}' has no construct signatures."), + Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other: b(2762, 1, "Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762", "Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other."), + Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0: b(2763, 1, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'."), + Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0: b(2764, 1, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'."), + Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0: b(2765, 1, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'."), + Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0: b(2766, 1, "Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766", "Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'."), + The_0_property_of_an_iterator_must_be_a_method: b(2767, 1, "The_0_property_of_an_iterator_must_be_a_method_2767", "The '{0}' property of an iterator must be a method."), + The_0_property_of_an_async_iterator_must_be_a_method: b(2768, 1, "The_0_property_of_an_async_iterator_must_be_a_method_2768", "The '{0}' property of an async iterator must be a method."), + No_overload_matches_this_call: b(2769, 1, "No_overload_matches_this_call_2769", "No overload matches this call."), + The_last_overload_gave_the_following_error: b(2770, 1, "The_last_overload_gave_the_following_error_2770", "The last overload gave the following error."), + The_last_overload_is_declared_here: b(2771, 1, "The_last_overload_is_declared_here_2771", "The last overload is declared here."), + Overload_0_of_1_2_gave_the_following_error: b(2772, 1, "Overload_0_of_1_2_gave_the_following_error_2772", "Overload {0} of {1}, '{2}', gave the following error."), + Did_you_forget_to_use_await: b(2773, 1, "Did_you_forget_to_use_await_2773", "Did you forget to use 'await'?"), + This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead: b(2774, 1, "This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774", "This condition will always return true since this function is always defined. Did you mean to call it instead?"), + Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation: b(2775, 1, "Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775", "Assertions require every name in the call target to be declared with an explicit type annotation."), + Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name: b(2776, 1, "Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776", "Assertions require the call target to be an identifier or qualified name."), + The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access: b(2777, 1, "The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777", "The operand of an increment or decrement operator may not be an optional property access."), + The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access: b(2778, 1, "The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778", "The target of an object rest assignment may not be an optional property access."), + The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access: b(2779, 1, "The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779", "The left-hand side of an assignment expression may not be an optional property access."), + The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access: b(2780, 1, "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780", "The left-hand side of a 'for...in' statement may not be an optional property access."), + The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access: b(2781, 1, "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781", "The left-hand side of a 'for...of' statement may not be an optional property access."), + _0_needs_an_explicit_type_annotation: b(2782, 3, "_0_needs_an_explicit_type_annotation_2782", "'{0}' needs an explicit type annotation."), + _0_is_specified_more_than_once_so_this_usage_will_be_overwritten: b(2783, 1, "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783", "'{0}' is specified more than once, so this usage will be overwritten."), + get_and_set_accessors_cannot_declare_this_parameters: b(2784, 1, "get_and_set_accessors_cannot_declare_this_parameters_2784", "'get' and 'set' accessors cannot declare 'this' parameters."), + This_spread_always_overwrites_this_property: b(2785, 1, "This_spread_always_overwrites_this_property_2785", "This spread always overwrites this property."), + _0_cannot_be_used_as_a_JSX_component: b(2786, 1, "_0_cannot_be_used_as_a_JSX_component_2786", "'{0}' cannot be used as a JSX component."), + Its_return_type_0_is_not_a_valid_JSX_element: b(2787, 1, "Its_return_type_0_is_not_a_valid_JSX_element_2787", "Its return type '{0}' is not a valid JSX element."), + Its_instance_type_0_is_not_a_valid_JSX_element: b(2788, 1, "Its_instance_type_0_is_not_a_valid_JSX_element_2788", "Its instance type '{0}' is not a valid JSX element."), + Its_element_type_0_is_not_a_valid_JSX_element: b(2789, 1, "Its_element_type_0_is_not_a_valid_JSX_element_2789", "Its element type '{0}' is not a valid JSX element."), + The_operand_of_a_delete_operator_must_be_optional: b(2790, 1, "The_operand_of_a_delete_operator_must_be_optional_2790", "The operand of a 'delete' operator must be optional."), + Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later: b(2791, 1, "Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_lat_2791", "Exponentiation cannot be performed on 'bigint' values unless the 'target' option is set to 'es2016' or later."), + Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option: b(2792, 1, "Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_t_2792", "Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?"), + The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible: b(2793, 1, "The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_2793", "The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible."), + Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise: b(2794, 1, "Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise_2794", "Expected {0} arguments, but got {1}. Did you forget to include 'void' in your type argument to 'Promise'?"), + The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types: b(2795, 1, "The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types_2795", "The 'intrinsic' keyword can only be used to declare compiler provided intrinsic types."), + It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked: b(2796, 1, "It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tag_2796", "It is likely that you are missing a comma to separate these two template expressions. They form a tagged template expression which cannot be invoked."), + A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract: b(2797, 1, "A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797", "A mixin class that extends from a type variable containing an abstract construct signature must also be declared 'abstract'."), + The_declaration_was_marked_as_deprecated_here: b(2798, 1, "The_declaration_was_marked_as_deprecated_here_2798", "The declaration was marked as deprecated here."), + Type_produces_a_tuple_type_that_is_too_large_to_represent: b(2799, 1, "Type_produces_a_tuple_type_that_is_too_large_to_represent_2799", "Type produces a tuple type that is too large to represent."), + Expression_produces_a_tuple_type_that_is_too_large_to_represent: b(2800, 1, "Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800", "Expression produces a tuple type that is too large to represent."), + This_condition_will_always_return_true_since_this_0_is_always_defined: b(2801, 1, "This_condition_will_always_return_true_since_this_0_is_always_defined_2801", "This condition will always return true since this '{0}' is always defined."), + Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher: b(2802, 1, "Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es201_2802", "Type '{0}' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher."), + Cannot_assign_to_private_method_0_Private_methods_are_not_writable: b(2803, 1, "Cannot_assign_to_private_method_0_Private_methods_are_not_writable_2803", "Cannot assign to private method '{0}'. Private methods are not writable."), + Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name: b(2804, 1, "Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name_2804", "Duplicate identifier '{0}'. Static and instance elements cannot share the same private name."), + Private_accessor_was_defined_without_a_getter: b(2806, 1, "Private_accessor_was_defined_without_a_getter_2806", "Private accessor was defined without a getter."), + This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0: b(2807, 1, "This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807", "This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."), + A_get_accessor_must_be_at_least_as_accessible_as_the_setter: b(2808, 1, "A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808", "A get accessor must be at least as accessible as the setter"), + Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses: b(2809, 1, "Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809", "Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses."), + Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments: b(2810, 1, "Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810", "Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."), + Initializer_for_property_0: b(2811, 1, "Initializer_for_property_0_2811", "Initializer for property '{0}'"), + Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom: b(2812, 1, "Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812", "Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."), + Class_declaration_cannot_implement_overload_list_for_0: b(2813, 1, "Class_declaration_cannot_implement_overload_list_for_0_2813", "Class declaration cannot implement overload list for '{0}'."), + Function_with_bodies_can_only_merge_with_classes_that_are_ambient: b(2814, 1, "Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814", "Function with bodies can only merge with classes that are ambient."), + arguments_cannot_be_referenced_in_property_initializers: b(2815, 1, "arguments_cannot_be_referenced_in_property_initializers_2815", "'arguments' cannot be referenced in property initializers."), + Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class: b(2816, 1, "Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class_2816", "Cannot use 'this' in a static property initializer of a decorated class."), + Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block: b(2817, 1, "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817", "Property '{0}' has no initializer and is not definitely assigned in a class static block."), + Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers: b(2818, 1, "Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818", "Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."), + Namespace_name_cannot_be_0: b(2819, 1, "Namespace_name_cannot_be_0_2819", "Namespace name cannot be '{0}'."), + Type_0_is_not_assignable_to_type_1_Did_you_mean_2: b(2820, 1, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"), + Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve: b(2821, 1, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve_2821", "Import assertions are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'."), + Import_assertions_cannot_be_used_with_type_only_imports_or_exports: b(2822, 1, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."), + Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve: b(2823, 1, "Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve_2823", "Import attributes are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'."), + Cannot_find_namespace_0_Did_you_mean_1: b(2833, 1, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"), + Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path: b(2834, 1, "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."), + Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0: b(2835, 1, "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"), + Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls: b(2836, 1, "Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2836", "Import assertions are not allowed on statements that compile to CommonJS 'require' calls."), + Import_assertion_values_must_be_string_literal_expressions: b(2837, 1, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."), + All_declarations_of_0_must_have_identical_constraints: b(2838, 1, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."), + This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: b(2839, 1, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."), + An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types: b(2840, 1, "An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types_2840", "An interface cannot extend a primitive type like '{0}'. It can only extend other named object types."), + _0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation: b(2842, 1, "_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842", "'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"), + We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here: b(2843, 1, "We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843", "We can only write a type for '{0}' by adding a type for the entire parameter here."), + Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: b(2844, 1, "Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844", "Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."), + This_condition_will_always_return_0: b(2845, 1, "This_condition_will_always_return_0_2845", "This condition will always return '{0}'."), + A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead: b(2846, 1, "A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_f_2846", "A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file '{0}' instead?"), + The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression: b(2848, 1, "The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression_2848", "The right-hand side of an 'instanceof' expression must not be an instantiation expression."), + Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1: b(2849, 1, "Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1_2849", "Target signature provides too few arguments. Expected {0} or more, but got {1}."), + The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined: b(2850, 1, "The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_n_2850", "The initializer of a 'using' declaration must be either an object with a '[Symbol.dispose]()' method, or be 'null' or 'undefined'."), + The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined: b(2851, 1, "The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_2851", "The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'."), + await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: b(2852, 1, "await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852", "'await using' statements are only allowed within async functions and at the top levels of modules."), + await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: b(2853, 1, "await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853", "'await using' statements are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."), + Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher: b(2854, 1, "Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854", "Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."), + Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super: b(2855, 1, "Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super_2855", "Class field '{0}' defined by the parent class is not accessible in the child class via super."), + Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls: b(2856, 1, "Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2856", "Import attributes are not allowed on statements that compile to CommonJS 'require' calls."), + Import_attributes_cannot_be_used_with_type_only_imports_or_exports: b(2857, 1, "Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2857", "Import attributes cannot be used with type-only imports or exports."), + Import_attribute_values_must_be_string_literal_expressions: b(2858, 1, "Import_attribute_values_must_be_string_literal_expressions_2858", "Import attribute values must be string literal expressions."), + Excessive_complexity_comparing_types_0_and_1: b(2859, 1, "Excessive_complexity_comparing_types_0_and_1_2859", "Excessive complexity comparing types '{0}' and '{1}'."), + The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method: b(2860, 1, "The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_2860", "The left-hand side of an 'instanceof' expression must be assignable to the first argument of the right-hand side's '[Symbol.hasInstance]' method."), + An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression: b(2861, 1, "An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_han_2861", "An object's '[Symbol.hasInstance]' method must return a boolean value for it to be used on the right-hand side of an 'instanceof' expression."), + Type_0_is_generic_and_can_only_be_indexed_for_reading: b(2862, 1, "Type_0_is_generic_and_can_only_be_indexed_for_reading_2862", "Type '{0}' is generic and can only be indexed for reading."), + A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values: b(2863, 1, "A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values_2863", "A class cannot extend a primitive type like '{0}'. Classes can only extend constructable values."), + A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types: b(2864, 1, "A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types_2864", "A class cannot implement a primitive type like '{0}'. It can only implement other named object types."), + Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled: b(2865, 1, "Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_2865", "Import '{0}' conflicts with local value, so must be declared with a type-only import when 'isolatedModules' is enabled."), + Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled: b(2866, 1, "Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_w_2866", "Import '{0}' conflicts with global value used in this file, so must be declared with a type-only import when 'isolatedModules' is enabled."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun: b(2867, 1, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2867", "Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun`."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_and_then_add_bun_to_the_types_field_in_your_tsconfig: b(2868, 1, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2868", "Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun` and then add 'bun' to the types field in your tsconfig."), + Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish: b(2869, 1, "Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish_2869", "Right operand of ?? is unreachable because the left operand is never nullish."), + This_binary_expression_is_never_nullish_Are_you_missing_parentheses: b(2870, 1, "This_binary_expression_is_never_nullish_Are_you_missing_parentheses_2870", "This binary expression is never nullish. Are you missing parentheses?"), + This_expression_is_always_nullish: b(2871, 1, "This_expression_is_always_nullish_2871", "This expression is always nullish."), + This_kind_of_expression_is_always_truthy: b(2872, 1, "This_kind_of_expression_is_always_truthy_2872", "This kind of expression is always truthy."), + This_kind_of_expression_is_always_falsy: b(2873, 1, "This_kind_of_expression_is_always_falsy_2873", "This kind of expression is always falsy."), + This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found: b(2874, 1, "This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found_2874", "This JSX tag requires '{0}' to be in scope, but it could not be found."), + This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_for_the_appropriate_package_installed: b(2875, 1, "This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_fo_2875", "This JSX tag requires the module path '{0}' to exist, but none could be found. Make sure you have types for the appropriate package installed."), + This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolves_to_0: b(2876, 1, "This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolv_2876", 'This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "{0}".'), + This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_during_emit_because_it_is_not_a_relative_path: b(2877, 1, "This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_duri_2877", "This import uses a '{0}' extension to resolve to an input TypeScript file, but will not be rewritten during emit because it is not a relative path."), + This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_between_the_projects_output_files_is_not_the_same_as_the_relative_path_between_its_input_files: b(2878, 1, "This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_b_2878", "This import path is unsafe to rewrite because it resolves to another project, and the relative path between the projects' output files is not the same as the relative path between its input files."), + Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found: b(2879, 1, "Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found_2879", "Using JSX fragments requires fragment factory '{0}' to be in scope, but it could not be found."), + Import_declaration_0_is_using_private_name_1: b(4e3, 1, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."), + Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: b(4002, 1, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."), + Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: b(4004, 1, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."), + Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: b(4006, 1, "Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4006", "Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."), + Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: b(4008, 1, "Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008", "Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'."), + Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: b(4010, 1, "Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010", "Type parameter '{0}' of public static method from exported class has or is using private name '{1}'."), + Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: b(4012, 1, "Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012", "Type parameter '{0}' of public method from exported class has or is using private name '{1}'."), + Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: b(4014, 1, "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014", "Type parameter '{0}' of method from exported interface has or is using private name '{1}'."), + Type_parameter_0_of_exported_function_has_or_is_using_private_name_1: b(4016, 1, "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016", "Type parameter '{0}' of exported function has or is using private name '{1}'."), + Implements_clause_of_exported_class_0_has_or_is_using_private_name_1: b(4019, 1, "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019", "Implements clause of exported class '{0}' has or is using private name '{1}'."), + extends_clause_of_exported_class_0_has_or_is_using_private_name_1: b(4020, 1, "extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020", "'extends' clause of exported class '{0}' has or is using private name '{1}'."), + extends_clause_of_exported_class_has_or_is_using_private_name_0: b(4021, 1, "extends_clause_of_exported_class_has_or_is_using_private_name_0_4021", "'extends' clause of exported class has or is using private name '{0}'."), + extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: b(4022, 1, "extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022", "'extends' clause of exported interface '{0}' has or is using private name '{1}'."), + Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: b(4023, 1, "Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023", "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named."), + Exported_variable_0_has_or_is_using_name_1_from_private_module_2: b(4024, 1, "Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024", "Exported variable '{0}' has or is using name '{1}' from private module '{2}'."), + Exported_variable_0_has_or_is_using_private_name_1: b(4025, 1, "Exported_variable_0_has_or_is_using_private_name_1_4025", "Exported variable '{0}' has or is using private name '{1}'."), + Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: b(4026, 1, "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026", "Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), + Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: b(4027, 1, "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027", "Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'."), + Public_static_property_0_of_exported_class_has_or_is_using_private_name_1: b(4028, 1, "Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028", "Public static property '{0}' of exported class has or is using private name '{1}'."), + Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: b(4029, 1, "Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_name_4029", "Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), + Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: b(4030, 1, "Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4030", "Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'."), + Public_property_0_of_exported_class_has_or_is_using_private_name_1: b(4031, 1, "Public_property_0_of_exported_class_has_or_is_using_private_name_1_4031", "Public property '{0}' of exported class has or is using private name '{1}'."), + Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: b(4032, 1, "Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032", "Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'."), + Property_0_of_exported_interface_has_or_is_using_private_name_1: b(4033, 1, "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033", "Property '{0}' of exported interface has or is using private name '{1}'."), + Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: b(4034, 1, "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034", "Parameter type of public static setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1: b(4035, 1, "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1_4035", "Parameter type of public static setter '{0}' from exported class has or is using private name '{1}'."), + Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: b(4036, 1, "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036", "Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1: b(4037, 1, "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037", "Parameter type of public setter '{0}' from exported class has or is using private name '{1}'."), + Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: b(4038, 1, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_modul_4038", "Return type of public static getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: b(4039, 1, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_4039", "Return type of public static getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), + Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1: b(4040, 1, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1_4040", "Return type of public static getter '{0}' from exported class has or is using private name '{1}'."), + Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: b(4041, 1, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_4041", "Return type of public getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: b(4042, 1, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4042", "Return type of public getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), + Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1: b(4043, 1, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1_4043", "Return type of public getter '{0}' from exported class has or is using private name '{1}'."), + Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: b(4044, 1, "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044", "Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'."), + Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0: b(4045, 1, "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0_4045", "Return type of constructor signature from exported interface has or is using private name '{0}'."), + Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: b(4046, 1, "Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046", "Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'."), + Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0: b(4047, 1, "Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047", "Return type of call signature from exported interface has or is using private name '{0}'."), + Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: b(4048, 1, "Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4048", "Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'."), + Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0: b(4049, 1, "Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0_4049", "Return type of index signature from exported interface has or is using private name '{0}'."), + Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: b(4050, 1, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module__4050", "Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named."), + Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: b(4051, 1, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4051", "Return type of public static method from exported class has or is using name '{0}' from private module '{1}'."), + Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0: b(4052, 1, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0_4052", "Return type of public static method from exported class has or is using private name '{0}'."), + Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: b(4053, 1, "Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_c_4053", "Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named."), + Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: b(4054, 1, "Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4054", "Return type of public method from exported class has or is using name '{0}' from private module '{1}'."), + Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0: b(4055, 1, "Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0_4055", "Return type of public method from exported class has or is using private name '{0}'."), + Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1: b(4056, 1, "Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4056", "Return type of method from exported interface has or is using name '{0}' from private module '{1}'."), + Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0: b(4057, 1, "Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0_4057", "Return type of method from exported interface has or is using private name '{0}'."), + Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: b(4058, 1, "Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named_4058", "Return type of exported function has or is using name '{0}' from external module {1} but cannot be named."), + Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1: b(4059, 1, "Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1_4059", "Return type of exported function has or is using name '{0}' from private module '{1}'."), + Return_type_of_exported_function_has_or_is_using_private_name_0: b(4060, 1, "Return_type_of_exported_function_has_or_is_using_private_name_0_4060", "Return type of exported function has or is using private name '{0}'."), + Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: b(4061, 1, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061", "Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2: b(4062, 1, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2_4062", "Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1: b(4063, 1, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1_4063", "Parameter '{0}' of constructor from exported class has or is using private name '{1}'."), + Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: b(4064, 1, "Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_mod_4064", "Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: b(4065, 1, "Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4065", "Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."), + Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: b(4066, 1, "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066", "Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: b(4067, 1, "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067", "Parameter '{0}' of call signature from exported interface has or is using private name '{1}'."), + Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: b(4068, 1, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module__4068", "Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: b(4069, 1, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4069", "Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: b(4070, 1, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070", "Parameter '{0}' of public static method from exported class has or is using private name '{1}'."), + Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: b(4071, 1, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_c_4071", "Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: b(4072, 1, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4072", "Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: b(4073, 1, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4073", "Parameter '{0}' of public method from exported class has or is using private name '{1}'."), + Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2: b(4074, 1, "Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4074", "Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: b(4075, 1, "Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4075", "Parameter '{0}' of method from exported interface has or is using private name '{1}'."), + Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: b(4076, 1, "Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4076", "Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named."), + Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: b(4077, 1, "Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2_4077", "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_exported_function_has_or_is_using_private_name_1: b(4078, 1, "Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078", "Parameter '{0}' of exported function has or is using private name '{1}'."), + Exported_type_alias_0_has_or_is_using_private_name_1: b(4081, 1, "Exported_type_alias_0_has_or_is_using_private_name_1_4081", "Exported type alias '{0}' has or is using private name '{1}'."), + Default_export_of_the_module_has_or_is_using_private_name_0: b(4082, 1, "Default_export_of_the_module_has_or_is_using_private_name_0_4082", "Default export of the module has or is using private name '{0}'."), + Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1: b(4083, 1, "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083", "Type parameter '{0}' of exported type alias has or is using private name '{1}'."), + Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2: b(4084, 1, "Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2_4084", "Exported type alias '{0}' has or is using private name '{1}' from module {2}."), + Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1: b(4085, 1, "Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1_4085", "Extends clause for inferred type '{0}' has or is using private name '{1}'."), + Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: b(4091, 1, "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091", "Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1: b(4092, 1, "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092", "Parameter '{0}' of index signature from exported interface has or is using private name '{1}'."), + Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected: b(4094, 1, "Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected_4094", "Property '{0}' of exported anonymous class type may not be private or protected."), + Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: b(4095, 1, "Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_4095", "Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), + Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: b(4096, 1, "Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4096", "Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'."), + Public_static_method_0_of_exported_class_has_or_is_using_private_name_1: b(4097, 1, "Public_static_method_0_of_exported_class_has_or_is_using_private_name_1_4097", "Public static method '{0}' of exported class has or is using private name '{1}'."), + Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: b(4098, 1, "Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4098", "Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), + Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: b(4099, 1, "Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4099", "Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'."), + Public_method_0_of_exported_class_has_or_is_using_private_name_1: b(4100, 1, "Public_method_0_of_exported_class_has_or_is_using_private_name_1_4100", "Public method '{0}' of exported class has or is using private name '{1}'."), + Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: b(4101, 1, "Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101", "Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'."), + Method_0_of_exported_interface_has_or_is_using_private_name_1: b(4102, 1, "Method_0_of_exported_interface_has_or_is_using_private_name_1_4102", "Method '{0}' of exported interface has or is using private name '{1}'."), + Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1: b(4103, 1, "Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103", "Type parameter '{0}' of exported mapped object type is using private name '{1}'."), + The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1: b(4104, 1, "The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104", "The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'."), + Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter: b(4105, 1, "Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105", "Private or protected member '{0}' cannot be accessed on a type parameter."), + Parameter_0_of_accessor_has_or_is_using_private_name_1: b(4106, 1, "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106", "Parameter '{0}' of accessor has or is using private name '{1}'."), + Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2: b(4107, 1, "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107", "Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: b(4108, 1, "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108", "Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named."), + Type_arguments_for_0_circularly_reference_themselves: b(4109, 1, "Type_arguments_for_0_circularly_reference_themselves_4109", "Type arguments for '{0}' circularly reference themselves."), + Tuple_type_arguments_circularly_reference_themselves: b(4110, 1, "Tuple_type_arguments_circularly_reference_themselves_4110", "Tuple type arguments circularly reference themselves."), + Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0: b(4111, 1, "Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0_4111", "Property '{0}' comes from an index signature, so it must be accessed with ['{0}']."), + This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class: b(4112, 1, "This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112", "This member cannot have an 'override' modifier because its containing class '{0}' does not extend another class."), + This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0: b(4113, 1, "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113", "This member cannot have an 'override' modifier because it is not declared in the base class '{0}'."), + This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0: b(4114, 1, "This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114", "This member must have an 'override' modifier because it overrides a member in the base class '{0}'."), + This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0: b(4115, 1, "This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115", "This parameter property must have an 'override' modifier because it overrides a member in base class '{0}'."), + This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0: b(4116, 1, "This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116", "This member must have an 'override' modifier because it overrides an abstract method that is declared in the base class '{0}'."), + This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: b(4117, 1, "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117", "This member cannot have an 'override' modifier because it is not declared in the base class '{0}'. Did you mean '{1}'?"), + The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized: b(4118, 1, "The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118", "The type of this node cannot be serialized because its property '{0}' cannot be serialized."), + This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0: b(4119, 1, "This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119", "This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."), + This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0: b(4120, 1, "This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120", "This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."), + This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class: b(4121, 1, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121", "This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class."), + This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0: b(4122, 1, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."), + This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: b(4123, 1, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"), + Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: b(4124, 1, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), + Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given: b(4125, 1, "Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given_4125", "Each declaration of '{0}.{1}' differs in its value, where '{2}' was expected but '{3}' was given."), + One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value: b(4126, 1, "One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value_4126", "One value of '{0}.{1}' is the string '{2}', and the other is assumed to be an unknown numeric value."), + The_current_host_does_not_support_the_0_option: b(5001, 1, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."), + Cannot_find_the_common_subdirectory_path_for_the_input_files: b(5009, 1, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."), + File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: b(5010, 1, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."), + Cannot_read_file_0_Colon_1: b(5012, 1, "Cannot_read_file_0_Colon_1_5012", "Cannot read file '{0}': {1}."), + Unknown_compiler_option_0: b(5023, 1, "Unknown_compiler_option_0_5023", "Unknown compiler option '{0}'."), + Compiler_option_0_requires_a_value_of_type_1: b(5024, 1, "Compiler_option_0_requires_a_value_of_type_1_5024", "Compiler option '{0}' requires a value of type {1}."), + Unknown_compiler_option_0_Did_you_mean_1: b(5025, 1, "Unknown_compiler_option_0_Did_you_mean_1_5025", "Unknown compiler option '{0}'. Did you mean '{1}'?"), + Could_not_write_file_0_Colon_1: b(5033, 1, "Could_not_write_file_0_Colon_1_5033", "Could not write file '{0}': {1}."), + Option_project_cannot_be_mixed_with_source_files_on_a_command_line: b(5042, 1, "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042", "Option 'project' cannot be mixed with source files on a command line."), + Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher: b(5047, 1, "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047", "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."), + Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided: b(5051, 1, "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051", "Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided."), + Option_0_cannot_be_specified_without_specifying_option_1: b(5052, 1, "Option_0_cannot_be_specified_without_specifying_option_1_5052", "Option '{0}' cannot be specified without specifying option '{1}'."), + Option_0_cannot_be_specified_with_option_1: b(5053, 1, "Option_0_cannot_be_specified_with_option_1_5053", "Option '{0}' cannot be specified with option '{1}'."), + A_tsconfig_json_file_is_already_defined_at_Colon_0: b(5054, 1, "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054", "A 'tsconfig.json' file is already defined at: '{0}'."), + Cannot_write_file_0_because_it_would_overwrite_input_file: b(5055, 1, "Cannot_write_file_0_because_it_would_overwrite_input_file_5055", "Cannot write file '{0}' because it would overwrite input file."), + Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files: b(5056, 1, "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056", "Cannot write file '{0}' because it would be overwritten by multiple input files."), + Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0: b(5057, 1, "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057", "Cannot find a tsconfig.json file at the specified directory: '{0}'."), + The_specified_path_does_not_exist_Colon_0: b(5058, 1, "The_specified_path_does_not_exist_Colon_0_5058", "The specified path does not exist: '{0}'."), + Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier: b(5059, 1, "Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059", "Invalid value for '--reactNamespace'. '{0}' is not a valid identifier."), + Pattern_0_can_have_at_most_one_Asterisk_character: b(5061, 1, "Pattern_0_can_have_at_most_one_Asterisk_character_5061", "Pattern '{0}' can have at most one '*' character."), + Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character: b(5062, 1, "Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062", "Substitution '{0}' in pattern '{1}' can have at most one '*' character."), + Substitutions_for_pattern_0_should_be_an_array: b(5063, 1, "Substitutions_for_pattern_0_should_be_an_array_5063", "Substitutions for pattern '{0}' should be an array."), + Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2: b(5064, 1, "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064", "Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'."), + File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: b(5065, 1, "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065", "File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'."), + Substitutions_for_pattern_0_shouldn_t_be_an_empty_array: b(5066, 1, "Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066", "Substitutions for pattern '{0}' shouldn't be an empty array."), + Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name: b(5067, 1, "Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067", "Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name."), + Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: b(5068, 1, "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068", "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig."), + Option_0_cannot_be_specified_without_specifying_option_1_or_option_2: b(5069, 1, "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069", "Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'."), + Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic: b(5070, 1, "Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic_5070", "Option '--resolveJsonModule' cannot be specified when 'moduleResolution' is set to 'classic'."), + Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd: b(5071, 1, "Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd_5071", "Option '--resolveJsonModule' cannot be specified when 'module' is set to 'none', 'system', or 'umd'."), + Unknown_build_option_0: b(5072, 1, "Unknown_build_option_0_5072", "Unknown build option '{0}'."), + Build_option_0_requires_a_value_of_type_1: b(5073, 1, "Build_option_0_requires_a_value_of_type_1_5073", "Build option '{0}' requires a value of type {1}."), + Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified: b(5074, 1, "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074", "Option '--incremental' can only be specified using tsconfig, emitting to single file or when option '--tsBuildInfoFile' is specified."), + _0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2: b(5075, 1, "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075", "'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."), + _0_and_1_operations_cannot_be_mixed_without_parentheses: b(5076, 1, "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076", "'{0}' and '{1}' operations cannot be mixed without parentheses."), + Unknown_build_option_0_Did_you_mean_1: b(5077, 1, "Unknown_build_option_0_Did_you_mean_1_5077", "Unknown build option '{0}'. Did you mean '{1}'?"), + Unknown_watch_option_0: b(5078, 1, "Unknown_watch_option_0_5078", "Unknown watch option '{0}'."), + Unknown_watch_option_0_Did_you_mean_1: b(5079, 1, "Unknown_watch_option_0_Did_you_mean_1_5079", "Unknown watch option '{0}'. Did you mean '{1}'?"), + Watch_option_0_requires_a_value_of_type_1: b(5080, 1, "Watch_option_0_requires_a_value_of_type_1_5080", "Watch option '{0}' requires a value of type {1}."), + Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0: b(5081, 1, "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081", "Cannot find a tsconfig.json file at the current directory: {0}."), + _0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1: b(5082, 1, "_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1_5082", "'{0}' could be instantiated with an arbitrary type which could be unrelated to '{1}'."), + Cannot_read_file_0: b(5083, 1, "Cannot_read_file_0_5083", "Cannot read file '{0}'."), + A_tuple_member_cannot_be_both_optional_and_rest: b(5085, 1, "A_tuple_member_cannot_be_both_optional_and_rest_5085", "A tuple member cannot be both optional and rest."), + A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type: b(5086, 1, "A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086", "A labeled tuple element is declared as optional with a question mark after the name and before the colon, rather than after the type."), + A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type: b(5087, 1, "A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087", "A labeled tuple element is declared as rest with a '...' before the name, rather than before the type."), + The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary: b(5088, 1, "The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialize_5088", "The inferred type of '{0}' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary."), + Option_0_cannot_be_specified_when_option_jsx_is_1: b(5089, 1, "Option_0_cannot_be_specified_when_option_jsx_is_1_5089", "Option '{0}' cannot be specified when option 'jsx' is '{1}'."), + Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash: b(5090, 1, "Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash_5090", "Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?"), + Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled: b(5091, 1, "Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled_5091", "Option 'preserveConstEnums' cannot be disabled when '{0}' is enabled."), + The_root_value_of_a_0_file_must_be_an_object: b(5092, 1, "The_root_value_of_a_0_file_must_be_an_object_5092", "The root value of a '{0}' file must be an object."), + Compiler_option_0_may_only_be_used_with_build: b(5093, 1, "Compiler_option_0_may_only_be_used_with_build_5093", "Compiler option '--{0}' may only be used with '--build'."), + Compiler_option_0_may_not_be_used_with_build: b(5094, 1, "Compiler_option_0_may_not_be_used_with_build_5094", "Compiler option '--{0}' may not be used with '--build'."), + Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later: b(5095, 1, "Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later_5095", "Option '{0}' can only be used when 'module' is set to 'preserve' or to 'es2015' or later."), + Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set: b(5096, 1, "Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096", "Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."), + An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled: b(5097, 1, "An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097", "An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."), + Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler: b(5098, 1, "Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098", "Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."), + Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error: b(5101, 1, "Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprec_5101", `Option '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`), + Option_0_has_been_removed_Please_remove_it_from_your_configuration: b(5102, 1, "Option_0_has_been_removed_Please_remove_it_from_your_configuration_5102", "Option '{0}' has been removed. Please remove it from your configuration."), + Invalid_value_for_ignoreDeprecations: b(5103, 1, "Invalid_value_for_ignoreDeprecations_5103", "Invalid value for '--ignoreDeprecations'."), + Option_0_is_redundant_and_cannot_be_specified_with_option_1: b(5104, 1, "Option_0_is_redundant_and_cannot_be_specified_with_option_1_5104", "Option '{0}' is redundant and cannot be specified with option '{1}'."), + Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System: b(5105, 1, "Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105", "Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'."), + Use_0_instead: b(5106, 3, "Use_0_instead_5106", "Use '{0}' instead."), + Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error: b(5107, 1, "Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107", `Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '"ignoreDeprecations": "{3}"' to silence this error.`), + Option_0_1_has_been_removed_Please_remove_it_from_your_configuration: b(5108, 1, "Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108", "Option '{0}={1}' has been removed. Please remove it from your configuration."), + Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1: b(5109, 1, "Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109", "Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."), + Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1: b(5110, 1, "Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110", "Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."), + Generates_a_sourcemap_for_each_corresponding_d_ts_file: b(6e3, 3, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."), + Concatenate_and_emit_output_to_single_file: b(6001, 3, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."), + Generates_corresponding_d_ts_file: b(6002, 3, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."), + Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: b(6004, 3, "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004", "Specify the location where debugger should locate TypeScript files instead of source locations."), + Watch_input_files: b(6005, 3, "Watch_input_files_6005", "Watch input files."), + Redirect_output_structure_to_the_directory: b(6006, 3, "Redirect_output_structure_to_the_directory_6006", "Redirect output structure to the directory."), + Do_not_erase_const_enum_declarations_in_generated_code: b(6007, 3, "Do_not_erase_const_enum_declarations_in_generated_code_6007", "Do not erase const enum declarations in generated code."), + Do_not_emit_outputs_if_any_errors_were_reported: b(6008, 3, "Do_not_emit_outputs_if_any_errors_were_reported_6008", "Do not emit outputs if any errors were reported."), + Do_not_emit_comments_to_output: b(6009, 3, "Do_not_emit_comments_to_output_6009", "Do not emit comments to output."), + Do_not_emit_outputs: b(6010, 3, "Do_not_emit_outputs_6010", "Do not emit outputs."), + Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking: b(6011, 3, "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011", "Allow default imports from modules with no default export. This does not affect code emit, just typechecking."), + Skip_type_checking_of_declaration_files: b(6012, 3, "Skip_type_checking_of_declaration_files_6012", "Skip type checking of declaration files."), + Do_not_resolve_the_real_path_of_symlinks: b(6013, 3, "Do_not_resolve_the_real_path_of_symlinks_6013", "Do not resolve the real path of symlinks."), + Only_emit_d_ts_declaration_files: b(6014, 3, "Only_emit_d_ts_declaration_files_6014", "Only emit '.d.ts' declaration files."), + Specify_ECMAScript_target_version: b(6015, 3, "Specify_ECMAScript_target_version_6015", "Specify ECMAScript target version."), + Specify_module_code_generation: b(6016, 3, "Specify_module_code_generation_6016", "Specify module code generation."), + Print_this_message: b(6017, 3, "Print_this_message_6017", "Print this message."), + Print_the_compiler_s_version: b(6019, 3, "Print_the_compiler_s_version_6019", "Print the compiler's version."), + Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json: b(6020, 3, "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020", "Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'."), + Syntax_Colon_0: b(6023, 3, "Syntax_Colon_0_6023", "Syntax: {0}"), + options: b(6024, 3, "options_6024", "options"), + file: b(6025, 3, "file_6025", "file"), + Examples_Colon_0: b(6026, 3, "Examples_Colon_0_6026", "Examples: {0}"), + Options_Colon: b(6027, 3, "Options_Colon_6027", "Options:"), + Version_0: b(6029, 3, "Version_0_6029", "Version {0}"), + Insert_command_line_options_and_files_from_a_file: b(6030, 3, "Insert_command_line_options_and_files_from_a_file_6030", "Insert command line options and files from a file."), + Starting_compilation_in_watch_mode: b(6031, 3, "Starting_compilation_in_watch_mode_6031", "Starting compilation in watch mode..."), + File_change_detected_Starting_incremental_compilation: b(6032, 3, "File_change_detected_Starting_incremental_compilation_6032", "File change detected. Starting incremental compilation..."), + KIND: b(6034, 3, "KIND_6034", "KIND"), + FILE: b(6035, 3, "FILE_6035", "FILE"), + VERSION: b(6036, 3, "VERSION_6036", "VERSION"), + LOCATION: b(6037, 3, "LOCATION_6037", "LOCATION"), + DIRECTORY: b(6038, 3, "DIRECTORY_6038", "DIRECTORY"), + STRATEGY: b(6039, 3, "STRATEGY_6039", "STRATEGY"), + FILE_OR_DIRECTORY: b(6040, 3, "FILE_OR_DIRECTORY_6040", "FILE OR DIRECTORY"), + Errors_Files: b(6041, 3, "Errors_Files_6041", "Errors Files"), + Generates_corresponding_map_file: b(6043, 3, "Generates_corresponding_map_file_6043", "Generates corresponding '.map' file."), + Compiler_option_0_expects_an_argument: b(6044, 1, "Compiler_option_0_expects_an_argument_6044", "Compiler option '{0}' expects an argument."), + Unterminated_quoted_string_in_response_file_0: b(6045, 1, "Unterminated_quoted_string_in_response_file_0_6045", "Unterminated quoted string in response file '{0}'."), + Argument_for_0_option_must_be_Colon_1: b(6046, 1, "Argument_for_0_option_must_be_Colon_1_6046", "Argument for '{0}' option must be: {1}."), + Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: b(6048, 1, "Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048", "Locale must be of the form or -. For example '{0}' or '{1}'."), + Unable_to_open_file_0: b(6050, 1, "Unable_to_open_file_0_6050", "Unable to open file '{0}'."), + Corrupted_locale_file_0: b(6051, 1, "Corrupted_locale_file_0_6051", "Corrupted locale file {0}."), + Raise_error_on_expressions_and_declarations_with_an_implied_any_type: b(6052, 3, "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052", "Raise error on expressions and declarations with an implied 'any' type."), + File_0_not_found: b(6053, 1, "File_0_not_found_6053", "File '{0}' not found."), + File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1: b(6054, 1, "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054", "File '{0}' has an unsupported extension. The only supported extensions are {1}."), + Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: b(6055, 3, "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055", "Suppress noImplicitAny errors for indexing objects lacking index signatures."), + Do_not_emit_declarations_for_code_that_has_an_internal_annotation: b(6056, 3, "Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056", "Do not emit declarations for code that has an '@internal' annotation."), + Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: b(6058, 3, "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058", "Specify the root directory of input files. Use to control the output directory structure with --outDir."), + File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: b(6059, 1, "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059", "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."), + Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: b(6060, 3, "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060", "Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."), + NEWLINE: b(6061, 3, "NEWLINE_6061", "NEWLINE"), + Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line: b(6064, 1, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line_6064", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line."), + Enables_experimental_support_for_ES7_decorators: b(6065, 3, "Enables_experimental_support_for_ES7_decorators_6065", "Enables experimental support for ES7 decorators."), + Enables_experimental_support_for_emitting_type_metadata_for_decorators: b(6066, 3, "Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066", "Enables experimental support for emitting type metadata for decorators."), + Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file: b(6070, 3, "Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070", "Initializes a TypeScript project and creates a tsconfig.json file."), + Successfully_created_a_tsconfig_json_file: b(6071, 3, "Successfully_created_a_tsconfig_json_file_6071", "Successfully created a tsconfig.json file."), + Suppress_excess_property_checks_for_object_literals: b(6072, 3, "Suppress_excess_property_checks_for_object_literals_6072", "Suppress excess property checks for object literals."), + Stylize_errors_and_messages_using_color_and_context_experimental: b(6073, 3, "Stylize_errors_and_messages_using_color_and_context_experimental_6073", "Stylize errors and messages using color and context (experimental)."), + Do_not_report_errors_on_unused_labels: b(6074, 3, "Do_not_report_errors_on_unused_labels_6074", "Do not report errors on unused labels."), + Report_error_when_not_all_code_paths_in_function_return_a_value: b(6075, 3, "Report_error_when_not_all_code_paths_in_function_return_a_value_6075", "Report error when not all code paths in function return a value."), + Report_errors_for_fallthrough_cases_in_switch_statement: b(6076, 3, "Report_errors_for_fallthrough_cases_in_switch_statement_6076", "Report errors for fallthrough cases in switch statement."), + Do_not_report_errors_on_unreachable_code: b(6077, 3, "Do_not_report_errors_on_unreachable_code_6077", "Do not report errors on unreachable code."), + Disallow_inconsistently_cased_references_to_the_same_file: b(6078, 3, "Disallow_inconsistently_cased_references_to_the_same_file_6078", "Disallow inconsistently-cased references to the same file."), + Specify_library_files_to_be_included_in_the_compilation: b(6079, 3, "Specify_library_files_to_be_included_in_the_compilation_6079", "Specify library files to be included in the compilation."), + Specify_JSX_code_generation: b(6080, 3, "Specify_JSX_code_generation_6080", "Specify JSX code generation."), + Only_amd_and_system_modules_are_supported_alongside_0: b(6082, 1, "Only_amd_and_system_modules_are_supported_alongside_0_6082", "Only 'amd' and 'system' modules are supported alongside --{0}."), + Base_directory_to_resolve_non_absolute_module_names: b(6083, 3, "Base_directory_to_resolve_non_absolute_module_names_6083", "Base directory to resolve non-absolute module names."), + Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit: b(6084, 3, "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084", "[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"), + Enable_tracing_of_the_name_resolution_process: b(6085, 3, "Enable_tracing_of_the_name_resolution_process_6085", "Enable tracing of the name resolution process."), + Resolving_module_0_from_1: b(6086, 3, "Resolving_module_0_from_1_6086", "======== Resolving module '{0}' from '{1}'. ========"), + Explicitly_specified_module_resolution_kind_Colon_0: b(6087, 3, "Explicitly_specified_module_resolution_kind_Colon_0_6087", "Explicitly specified module resolution kind: '{0}'."), + Module_resolution_kind_is_not_specified_using_0: b(6088, 3, "Module_resolution_kind_is_not_specified_using_0_6088", "Module resolution kind is not specified, using '{0}'."), + Module_name_0_was_successfully_resolved_to_1: b(6089, 3, "Module_name_0_was_successfully_resolved_to_1_6089", "======== Module name '{0}' was successfully resolved to '{1}'. ========"), + Module_name_0_was_not_resolved: b(6090, 3, "Module_name_0_was_not_resolved_6090", "======== Module name '{0}' was not resolved. ========"), + paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0: b(6091, 3, "paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091", "'paths' option is specified, looking for a pattern to match module name '{0}'."), + Module_name_0_matched_pattern_1: b(6092, 3, "Module_name_0_matched_pattern_1_6092", "Module name '{0}', matched pattern '{1}'."), + Trying_substitution_0_candidate_module_location_Colon_1: b(6093, 3, "Trying_substitution_0_candidate_module_location_Colon_1_6093", "Trying substitution '{0}', candidate module location: '{1}'."), + Resolving_module_name_0_relative_to_base_url_1_2: b(6094, 3, "Resolving_module_name_0_relative_to_base_url_1_2_6094", "Resolving module name '{0}' relative to base url '{1}' - '{2}'."), + Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1: b(6095, 3, "Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1_6095", "Loading module as file / folder, candidate module location '{0}', target file types: {1}."), + File_0_does_not_exist: b(6096, 3, "File_0_does_not_exist_6096", "File '{0}' does not exist."), + File_0_exists_use_it_as_a_name_resolution_result: b(6097, 3, "File_0_exists_use_it_as_a_name_resolution_result_6097", "File '{0}' exists - use it as a name resolution result."), + Loading_module_0_from_node_modules_folder_target_file_types_Colon_1: b(6098, 3, "Loading_module_0_from_node_modules_folder_target_file_types_Colon_1_6098", "Loading module '{0}' from 'node_modules' folder, target file types: {1}."), + Found_package_json_at_0: b(6099, 3, "Found_package_json_at_0_6099", "Found 'package.json' at '{0}'."), + package_json_does_not_have_a_0_field: b(6100, 3, "package_json_does_not_have_a_0_field_6100", "'package.json' does not have a '{0}' field."), + package_json_has_0_field_1_that_references_2: b(6101, 3, "package_json_has_0_field_1_that_references_2_6101", "'package.json' has '{0}' field '{1}' that references '{2}'."), + Allow_javascript_files_to_be_compiled: b(6102, 3, "Allow_javascript_files_to_be_compiled_6102", "Allow javascript files to be compiled."), + Checking_if_0_is_the_longest_matching_prefix_for_1_2: b(6104, 3, "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104", "Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'."), + Expected_type_of_0_field_in_package_json_to_be_1_got_2: b(6105, 3, "Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105", "Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'."), + baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1: b(6106, 3, "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106", "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'."), + rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0: b(6107, 3, "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107", "'rootDirs' option is set, using it to resolve relative module name '{0}'."), + Longest_matching_prefix_for_0_is_1: b(6108, 3, "Longest_matching_prefix_for_0_is_1_6108", "Longest matching prefix for '{0}' is '{1}'."), + Loading_0_from_the_root_dir_1_candidate_location_2: b(6109, 3, "Loading_0_from_the_root_dir_1_candidate_location_2_6109", "Loading '{0}' from the root dir '{1}', candidate location '{2}'."), + Trying_other_entries_in_rootDirs: b(6110, 3, "Trying_other_entries_in_rootDirs_6110", "Trying other entries in 'rootDirs'."), + Module_resolution_using_rootDirs_has_failed: b(6111, 3, "Module_resolution_using_rootDirs_has_failed_6111", "Module resolution using 'rootDirs' has failed."), + Do_not_emit_use_strict_directives_in_module_output: b(6112, 3, "Do_not_emit_use_strict_directives_in_module_output_6112", "Do not emit 'use strict' directives in module output."), + Enable_strict_null_checks: b(6113, 3, "Enable_strict_null_checks_6113", "Enable strict null checks."), + Unknown_option_excludes_Did_you_mean_exclude: b(6114, 1, "Unknown_option_excludes_Did_you_mean_exclude_6114", "Unknown option 'excludes'. Did you mean 'exclude'?"), + Raise_error_on_this_expressions_with_an_implied_any_type: b(6115, 3, "Raise_error_on_this_expressions_with_an_implied_any_type_6115", "Raise error on 'this' expressions with an implied 'any' type."), + Resolving_type_reference_directive_0_containing_file_1_root_directory_2: b(6116, 3, "Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116", "======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"), + Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2: b(6119, 3, "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119", "======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========"), + Type_reference_directive_0_was_not_resolved: b(6120, 3, "Type_reference_directive_0_was_not_resolved_6120", "======== Type reference directive '{0}' was not resolved. ========"), + Resolving_with_primary_search_path_0: b(6121, 3, "Resolving_with_primary_search_path_0_6121", "Resolving with primary search path '{0}'."), + Root_directory_cannot_be_determined_skipping_primary_search_paths: b(6122, 3, "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122", "Root directory cannot be determined, skipping primary search paths."), + Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set: b(6123, 3, "Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123", "======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========"), + Type_declaration_files_to_be_included_in_compilation: b(6124, 3, "Type_declaration_files_to_be_included_in_compilation_6124", "Type declaration files to be included in compilation."), + Looking_up_in_node_modules_folder_initial_location_0: b(6125, 3, "Looking_up_in_node_modules_folder_initial_location_0_6125", "Looking up in 'node_modules' folder, initial location '{0}'."), + Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder: b(6126, 3, "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126", "Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder."), + Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1: b(6127, 3, "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127", "======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========"), + Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set: b(6128, 3, "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128", "======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========"), + Resolving_real_path_for_0_result_1: b(6130, 3, "Resolving_real_path_for_0_result_1_6130", "Resolving real path for '{0}', result '{1}'."), + Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system: b(6131, 1, "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131", "Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'."), + File_name_0_has_a_1_extension_stripping_it: b(6132, 3, "File_name_0_has_a_1_extension_stripping_it_6132", "File name '{0}' has a '{1}' extension - stripping it."), + _0_is_declared_but_its_value_is_never_read: b( + 6133, + 1, + "_0_is_declared_but_its_value_is_never_read_6133", + "'{0}' is declared but its value is never read.", + /*reportsUnnecessary*/ + !0 + ), + Report_errors_on_unused_locals: b(6134, 3, "Report_errors_on_unused_locals_6134", "Report errors on unused locals."), + Report_errors_on_unused_parameters: b(6135, 3, "Report_errors_on_unused_parameters_6135", "Report errors on unused parameters."), + The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files: b(6136, 3, "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136", "The maximum dependency depth to search under node_modules and load JavaScript files."), + Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1: b(6137, 1, "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137", "Cannot import type declaration files. Consider importing '{0}' instead of '{1}'."), + Property_0_is_declared_but_its_value_is_never_read: b( + 6138, + 1, + "Property_0_is_declared_but_its_value_is_never_read_6138", + "Property '{0}' is declared but its value is never read.", + /*reportsUnnecessary*/ + !0 + ), + Import_emit_helpers_from_tslib: b(6139, 3, "Import_emit_helpers_from_tslib_6139", "Import emit helpers from 'tslib'."), + Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2: b(6140, 1, "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140", "Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'."), + Parse_in_strict_mode_and_emit_use_strict_for_each_source_file: b(6141, 3, "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141", 'Parse in strict mode and emit "use strict" for each source file.'), + Module_0_was_resolved_to_1_but_jsx_is_not_set: b(6142, 1, "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142", "Module '{0}' was resolved to '{1}', but '--jsx' is not set."), + Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1: b(6144, 3, "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144", "Module '{0}' was resolved as locally declared ambient module in file '{1}'."), + Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h: b(6146, 3, "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146", "Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'."), + Resolution_for_module_0_was_found_in_cache_from_location_1: b(6147, 3, "Resolution_for_module_0_was_found_in_cache_from_location_1_6147", "Resolution for module '{0}' was found in cache from location '{1}'."), + Directory_0_does_not_exist_skipping_all_lookups_in_it: b(6148, 3, "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148", "Directory '{0}' does not exist, skipping all lookups in it."), + Show_diagnostic_information: b(6149, 3, "Show_diagnostic_information_6149", "Show diagnostic information."), + Show_verbose_diagnostic_information: b(6150, 3, "Show_verbose_diagnostic_information_6150", "Show verbose diagnostic information."), + Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file: b(6151, 3, "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151", "Emit a single file with source maps instead of having a separate file."), + Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set: b(6152, 3, "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152", "Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set."), + Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule: b(6153, 3, "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153", "Transpile each file as a separate module (similar to 'ts.transpileModule')."), + Print_names_of_generated_files_part_of_the_compilation: b(6154, 3, "Print_names_of_generated_files_part_of_the_compilation_6154", "Print names of generated files part of the compilation."), + Print_names_of_files_part_of_the_compilation: b(6155, 3, "Print_names_of_files_part_of_the_compilation_6155", "Print names of files part of the compilation."), + The_locale_used_when_displaying_messages_to_the_user_e_g_en_us: b(6156, 3, "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156", "The locale used when displaying messages to the user (e.g. 'en-us')"), + Do_not_generate_custom_helper_functions_like_extends_in_compiled_output: b(6157, 3, "Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157", "Do not generate custom helper functions like '__extends' in compiled output."), + Do_not_include_the_default_library_file_lib_d_ts: b(6158, 3, "Do_not_include_the_default_library_file_lib_d_ts_6158", "Do not include the default library file (lib.d.ts)."), + Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files: b(6159, 3, "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159", "Do not add triple-slash references or imported modules to the list of compiled files."), + Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files: b(6160, 3, "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160", "[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files."), + List_of_folders_to_include_type_definitions_from: b(6161, 3, "List_of_folders_to_include_type_definitions_from_6161", "List of folders to include type definitions from."), + Disable_size_limitations_on_JavaScript_projects: b(6162, 3, "Disable_size_limitations_on_JavaScript_projects_6162", "Disable size limitations on JavaScript projects."), + The_character_set_of_the_input_files: b(6163, 3, "The_character_set_of_the_input_files_6163", "The character set of the input files."), + Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1: b(6164, 3, "Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1_6164", "Skipping module '{0}' that looks like an absolute URI, target file types: {1}."), + Do_not_truncate_error_messages: b(6165, 3, "Do_not_truncate_error_messages_6165", "Do not truncate error messages."), + Output_directory_for_generated_declaration_files: b(6166, 3, "Output_directory_for_generated_declaration_files_6166", "Output directory for generated declaration files."), + A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl: b(6167, 3, "A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167", "A series of entries which re-map imports to lookup locations relative to the 'baseUrl'."), + List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime: b(6168, 3, "List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168", "List of root folders whose combined content represents the structure of the project at runtime."), + Show_all_compiler_options: b(6169, 3, "Show_all_compiler_options_6169", "Show all compiler options."), + Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file: b(6170, 3, "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170", "[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file"), + Command_line_Options: b(6171, 3, "Command_line_Options_6171", "Command-line Options"), + Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5: b(6179, 3, "Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_6179", "Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5'."), + Enable_all_strict_type_checking_options: b(6180, 3, "Enable_all_strict_type_checking_options_6180", "Enable all strict type-checking options."), + Scoped_package_detected_looking_in_0: b(6182, 3, "Scoped_package_detected_looking_in_0_6182", "Scoped package detected, looking in '{0}'"), + Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2: b(6183, 3, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_6183", "Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."), + Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3: b(6184, 3, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package__6184", "Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."), + Enable_strict_checking_of_function_types: b(6186, 3, "Enable_strict_checking_of_function_types_6186", "Enable strict checking of function types."), + Enable_strict_checking_of_property_initialization_in_classes: b(6187, 3, "Enable_strict_checking_of_property_initialization_in_classes_6187", "Enable strict checking of property initialization in classes."), + Numeric_separators_are_not_allowed_here: b(6188, 1, "Numeric_separators_are_not_allowed_here_6188", "Numeric separators are not allowed here."), + Multiple_consecutive_numeric_separators_are_not_permitted: b(6189, 1, "Multiple_consecutive_numeric_separators_are_not_permitted_6189", "Multiple consecutive numeric separators are not permitted."), + Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen: b(6191, 3, "Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191", "Whether to keep outdated console output in watch mode instead of clearing the screen."), + All_imports_in_import_declaration_are_unused: b( + 6192, + 1, + "All_imports_in_import_declaration_are_unused_6192", + "All imports in import declaration are unused.", + /*reportsUnnecessary*/ + !0 + ), + Found_1_error_Watching_for_file_changes: b(6193, 3, "Found_1_error_Watching_for_file_changes_6193", "Found 1 error. Watching for file changes."), + Found_0_errors_Watching_for_file_changes: b(6194, 3, "Found_0_errors_Watching_for_file_changes_6194", "Found {0} errors. Watching for file changes."), + Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols: b(6195, 3, "Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195", "Resolve 'keyof' to string valued property names only (no numbers or symbols)."), + _0_is_declared_but_never_used: b( + 6196, + 1, + "_0_is_declared_but_never_used_6196", + "'{0}' is declared but never used.", + /*reportsUnnecessary*/ + !0 + ), + Include_modules_imported_with_json_extension: b(6197, 3, "Include_modules_imported_with_json_extension_6197", "Include modules imported with '.json' extension"), + All_destructured_elements_are_unused: b( + 6198, + 1, + "All_destructured_elements_are_unused_6198", + "All destructured elements are unused.", + /*reportsUnnecessary*/ + !0 + ), + All_variables_are_unused: b( + 6199, + 1, + "All_variables_are_unused_6199", + "All variables are unused.", + /*reportsUnnecessary*/ + !0 + ), + Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0: b(6200, 1, "Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200", "Definitions of the following identifiers conflict with those in another file: {0}"), + Conflicts_are_in_this_file: b(6201, 3, "Conflicts_are_in_this_file_6201", "Conflicts are in this file."), + Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0: b(6202, 1, "Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202", "Project references may not form a circular graph. Cycle detected: {0}"), + _0_was_also_declared_here: b(6203, 3, "_0_was_also_declared_here_6203", "'{0}' was also declared here."), + and_here: b(6204, 3, "and_here_6204", "and here."), + All_type_parameters_are_unused: b(6205, 1, "All_type_parameters_are_unused_6205", "All type parameters are unused."), + package_json_has_a_typesVersions_field_with_version_specific_path_mappings: b(6206, 3, "package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206", "'package.json' has a 'typesVersions' field with version-specific path mappings."), + package_json_does_not_have_a_typesVersions_entry_that_matches_version_0: b(6207, 3, "package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207", "'package.json' does not have a 'typesVersions' entry that matches version '{0}'."), + package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2: b(6208, 3, "package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208", "'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'."), + package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range: b(6209, 3, "package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209", "'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range."), + An_argument_for_0_was_not_provided: b(6210, 3, "An_argument_for_0_was_not_provided_6210", "An argument for '{0}' was not provided."), + An_argument_matching_this_binding_pattern_was_not_provided: b(6211, 3, "An_argument_matching_this_binding_pattern_was_not_provided_6211", "An argument matching this binding pattern was not provided."), + Did_you_mean_to_call_this_expression: b(6212, 3, "Did_you_mean_to_call_this_expression_6212", "Did you mean to call this expression?"), + Did_you_mean_to_use_new_with_this_expression: b(6213, 3, "Did_you_mean_to_use_new_with_this_expression_6213", "Did you mean to use 'new' with this expression?"), + Enable_strict_bind_call_and_apply_methods_on_functions: b(6214, 3, "Enable_strict_bind_call_and_apply_methods_on_functions_6214", "Enable strict 'bind', 'call', and 'apply' methods on functions."), + Using_compiler_options_of_project_reference_redirect_0: b(6215, 3, "Using_compiler_options_of_project_reference_redirect_0_6215", "Using compiler options of project reference redirect '{0}'."), + Found_1_error: b(6216, 3, "Found_1_error_6216", "Found 1 error."), + Found_0_errors: b(6217, 3, "Found_0_errors_6217", "Found {0} errors."), + Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2: b(6218, 3, "Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218", "======== Module name '{0}' was successfully resolved to '{1}' with Package ID '{2}'. ========"), + Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3: b(6219, 3, "Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219", "======== Type reference directive '{0}' was successfully resolved to '{1}' with Package ID '{2}', primary: {3}. ========"), + package_json_had_a_falsy_0_field: b(6220, 3, "package_json_had_a_falsy_0_field_6220", "'package.json' had a falsy '{0}' field."), + Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects: b(6221, 3, "Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221", "Disable use of source files instead of declaration files from referenced projects."), + Emit_class_fields_with_Define_instead_of_Set: b(6222, 3, "Emit_class_fields_with_Define_instead_of_Set_6222", "Emit class fields with Define instead of Set."), + Generates_a_CPU_profile: b(6223, 3, "Generates_a_CPU_profile_6223", "Generates a CPU profile."), + Disable_solution_searching_for_this_project: b(6224, 3, "Disable_solution_searching_for_this_project_6224", "Disable solution searching for this project."), + Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling_UseFsEvents_UseFsEventsOnParentDirectory: b(6225, 3, "Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225", "Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'."), + Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling: b(6226, 3, "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226", "Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling'."), + Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority_FixedChunkSize: b(6227, 3, "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227", "Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority', 'FixedChunkSize'."), + Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3: b(6229, 1, "Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229", "Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'."), + Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line: b(6230, 1, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line_6230", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line."), + Could_not_resolve_the_path_0_with_the_extensions_Colon_1: b(6231, 1, "Could_not_resolve_the_path_0_with_the_extensions_Colon_1_6231", "Could not resolve the path '{0}' with the extensions: {1}."), + Declaration_augments_declaration_in_another_file_This_cannot_be_serialized: b(6232, 1, "Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232", "Declaration augments declaration in another file. This cannot be serialized."), + This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file: b(6233, 1, "This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233", "This is the declaration being augmented. Consider moving the augmenting declaration into the same file."), + This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without: b(6234, 1, "This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without_6234", "This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?"), + Disable_loading_referenced_projects: b(6235, 3, "Disable_loading_referenced_projects_6235", "Disable loading referenced projects."), + Arguments_for_the_rest_parameter_0_were_not_provided: b(6236, 1, "Arguments_for_the_rest_parameter_0_were_not_provided_6236", "Arguments for the rest parameter '{0}' were not provided."), + Generates_an_event_trace_and_a_list_of_types: b(6237, 3, "Generates_an_event_trace_and_a_list_of_types_6237", "Generates an event trace and a list of types."), + Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react: b(6238, 1, "Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react_6238", "Specify the module specifier to be used to import the 'jsx' and 'jsxs' factory functions from. eg, react"), + File_0_exists_according_to_earlier_cached_lookups: b(6239, 3, "File_0_exists_according_to_earlier_cached_lookups_6239", "File '{0}' exists according to earlier cached lookups."), + File_0_does_not_exist_according_to_earlier_cached_lookups: b(6240, 3, "File_0_does_not_exist_according_to_earlier_cached_lookups_6240", "File '{0}' does not exist according to earlier cached lookups."), + Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1: b(6241, 3, "Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241", "Resolution for type reference directive '{0}' was found in cache from location '{1}'."), + Resolving_type_reference_directive_0_containing_file_1: b(6242, 3, "Resolving_type_reference_directive_0_containing_file_1_6242", "======== Resolving type reference directive '{0}', containing file '{1}'. ========"), + Interpret_optional_property_types_as_written_rather_than_adding_undefined: b(6243, 3, "Interpret_optional_property_types_as_written_rather_than_adding_undefined_6243", "Interpret optional property types as written, rather than adding 'undefined'."), + Modules: b(6244, 3, "Modules_6244", "Modules"), + File_Management: b(6245, 3, "File_Management_6245", "File Management"), + Emit: b(6246, 3, "Emit_6246", "Emit"), + JavaScript_Support: b(6247, 3, "JavaScript_Support_6247", "JavaScript Support"), + Type_Checking: b(6248, 3, "Type_Checking_6248", "Type Checking"), + Editor_Support: b(6249, 3, "Editor_Support_6249", "Editor Support"), + Watch_and_Build_Modes: b(6250, 3, "Watch_and_Build_Modes_6250", "Watch and Build Modes"), + Compiler_Diagnostics: b(6251, 3, "Compiler_Diagnostics_6251", "Compiler Diagnostics"), + Interop_Constraints: b(6252, 3, "Interop_Constraints_6252", "Interop Constraints"), + Backwards_Compatibility: b(6253, 3, "Backwards_Compatibility_6253", "Backwards Compatibility"), + Language_and_Environment: b(6254, 3, "Language_and_Environment_6254", "Language and Environment"), + Projects: b(6255, 3, "Projects_6255", "Projects"), + Output_Formatting: b(6256, 3, "Output_Formatting_6256", "Output Formatting"), + Completeness: b(6257, 3, "Completeness_6257", "Completeness"), + _0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file: b(6258, 1, "_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file_6258", "'{0}' should be set inside the 'compilerOptions' object of the config json file"), + Found_1_error_in_0: b(6259, 3, "Found_1_error_in_0_6259", "Found 1 error in {0}"), + Found_0_errors_in_the_same_file_starting_at_Colon_1: b(6260, 3, "Found_0_errors_in_the_same_file_starting_at_Colon_1_6260", "Found {0} errors in the same file, starting at: {1}"), + Found_0_errors_in_1_files: b(6261, 3, "Found_0_errors_in_1_files_6261", "Found {0} errors in {1} files."), + File_name_0_has_a_1_extension_looking_up_2_instead: b(6262, 3, "File_name_0_has_a_1_extension_looking_up_2_instead_6262", "File name '{0}' has a '{1}' extension - looking up '{2}' instead."), + Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set: b(6263, 1, "Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set_6263", "Module '{0}' was resolved to '{1}', but '--allowArbitraryExtensions' is not set."), + Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present: b(6264, 3, "Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present_6264", "Enable importing files with any extension, provided a declaration file is present."), + Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_node_modules_folder: b(6265, 3, "Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_no_6265", "Resolving type reference directive for program that specifies custom typeRoots, skipping lookup in 'node_modules' folder."), + Option_0_can_only_be_specified_on_command_line: b(6266, 1, "Option_0_can_only_be_specified_on_command_line_6266", "Option '{0}' can only be specified on command line."), + Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve: b(6270, 3, "Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve_6270", "Directory '{0}' has no containing package.json scope. Imports will not resolve."), + Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1: b(6271, 3, "Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6271", "Import specifier '{0}' does not exist in package.json scope at path '{1}'."), + Invalid_import_specifier_0_has_no_possible_resolutions: b(6272, 3, "Invalid_import_specifier_0_has_no_possible_resolutions_6272", "Invalid import specifier '{0}' has no possible resolutions."), + package_json_scope_0_has_no_imports_defined: b(6273, 3, "package_json_scope_0_has_no_imports_defined_6273", "package.json scope '{0}' has no imports defined."), + package_json_scope_0_explicitly_maps_specifier_1_to_null: b(6274, 3, "package_json_scope_0_explicitly_maps_specifier_1_to_null_6274", "package.json scope '{0}' explicitly maps specifier '{1}' to null."), + package_json_scope_0_has_invalid_type_for_target_of_specifier_1: b(6275, 3, "package_json_scope_0_has_invalid_type_for_target_of_specifier_1_6275", "package.json scope '{0}' has invalid type for target of specifier '{1}'"), + Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1: b(6276, 3, "Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276", "Export specifier '{0}' does not exist in package.json scope at path '{1}'."), + Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update: b(6277, 3, "Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_i_6277", "Resolution of non-relative name failed; trying with modern Node resolution features disabled to see if npm library needs configuration update."), + There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings: b(6278, 3, "There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The__6278", `There are types at '{0}', but this result could not be resolved when respecting package.json "exports". The '{1}' library may need to update its package.json or typings.`), + Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_need_configuration_update: b(6279, 3, "Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_ne_6279", "Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update."), + There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setting_Consider_updating_to_node16_nodenext_or_bundler: b(6280, 3, "There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setti_6280", "There are types at '{0}', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'."), + package_json_has_a_peerDependencies_field: b(6281, 3, "package_json_has_a_peerDependencies_field_6281", "'package.json' has a 'peerDependencies' field."), + Found_peerDependency_0_with_1_version: b(6282, 3, "Found_peerDependency_0_with_1_version_6282", "Found peerDependency '{0}' with '{1}' version."), + Failed_to_find_peerDependency_0: b(6283, 3, "Failed_to_find_peerDependency_0_6283", "Failed to find peerDependency '{0}'."), + Enable_project_compilation: b(6302, 3, "Enable_project_compilation_6302", "Enable project compilation"), + Composite_projects_may_not_disable_declaration_emit: b(6304, 1, "Composite_projects_may_not_disable_declaration_emit_6304", "Composite projects may not disable declaration emit."), + Output_file_0_has_not_been_built_from_source_file_1: b(6305, 1, "Output_file_0_has_not_been_built_from_source_file_1_6305", "Output file '{0}' has not been built from source file '{1}'."), + Referenced_project_0_must_have_setting_composite_Colon_true: b(6306, 1, "Referenced_project_0_must_have_setting_composite_Colon_true_6306", `Referenced project '{0}' must have setting "composite": true.`), + File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern: b(6307, 1, "File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307", "File '{0}' is not listed within the file list of project '{1}'. Projects must list all files or use an 'include' pattern."), + Referenced_project_0_may_not_disable_emit: b(6310, 1, "Referenced_project_0_may_not_disable_emit_6310", "Referenced project '{0}' may not disable emit."), + Project_0_is_out_of_date_because_output_1_is_older_than_input_2: b(6350, 3, "Project_0_is_out_of_date_because_output_1_is_older_than_input_2_6350", "Project '{0}' is out of date because output '{1}' is older than input '{2}'"), + Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2: b(6351, 3, "Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2_6351", "Project '{0}' is up to date because newest input '{1}' is older than output '{2}'"), + Project_0_is_out_of_date_because_output_file_1_does_not_exist: b(6352, 3, "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352", "Project '{0}' is out of date because output file '{1}' does not exist"), + Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date: b(6353, 3, "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353", "Project '{0}' is out of date because its dependency '{1}' is out of date"), + Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies: b(6354, 3, "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354", "Project '{0}' is up to date with .d.ts files from its dependencies"), + Projects_in_this_build_Colon_0: b(6355, 3, "Projects_in_this_build_Colon_0_6355", "Projects in this build: {0}"), + A_non_dry_build_would_delete_the_following_files_Colon_0: b(6356, 3, "A_non_dry_build_would_delete_the_following_files_Colon_0_6356", "A non-dry build would delete the following files: {0}"), + A_non_dry_build_would_build_project_0: b(6357, 3, "A_non_dry_build_would_build_project_0_6357", "A non-dry build would build project '{0}'"), + Building_project_0: b(6358, 3, "Building_project_0_6358", "Building project '{0}'..."), + Updating_output_timestamps_of_project_0: b(6359, 3, "Updating_output_timestamps_of_project_0_6359", "Updating output timestamps of project '{0}'..."), + Project_0_is_up_to_date: b(6361, 3, "Project_0_is_up_to_date_6361", "Project '{0}' is up to date"), + Skipping_build_of_project_0_because_its_dependency_1_has_errors: b(6362, 3, "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362", "Skipping build of project '{0}' because its dependency '{1}' has errors"), + Project_0_can_t_be_built_because_its_dependency_1_has_errors: b(6363, 3, "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363", "Project '{0}' can't be built because its dependency '{1}' has errors"), + Build_one_or_more_projects_and_their_dependencies_if_out_of_date: b(6364, 3, "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364", "Build one or more projects and their dependencies, if out of date"), + Delete_the_outputs_of_all_projects: b(6365, 3, "Delete_the_outputs_of_all_projects_6365", "Delete the outputs of all projects."), + Show_what_would_be_built_or_deleted_if_specified_with_clean: b(6367, 3, "Show_what_would_be_built_or_deleted_if_specified_with_clean_6367", "Show what would be built (or deleted, if specified with '--clean')"), + Option_build_must_be_the_first_command_line_argument: b(6369, 1, "Option_build_must_be_the_first_command_line_argument_6369", "Option '--build' must be the first command line argument."), + Options_0_and_1_cannot_be_combined: b(6370, 1, "Options_0_and_1_cannot_be_combined_6370", "Options '{0}' and '{1}' cannot be combined."), + Updating_unchanged_output_timestamps_of_project_0: b(6371, 3, "Updating_unchanged_output_timestamps_of_project_0_6371", "Updating unchanged output timestamps of project '{0}'..."), + A_non_dry_build_would_update_timestamps_for_output_of_project_0: b(6374, 3, "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374", "A non-dry build would update timestamps for output of project '{0}'"), + Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1: b(6377, 1, "Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377", "Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'"), + Composite_projects_may_not_disable_incremental_compilation: b(6379, 1, "Composite_projects_may_not_disable_incremental_compilation_6379", "Composite projects may not disable incremental compilation."), + Specify_file_to_store_incremental_compilation_information: b(6380, 3, "Specify_file_to_store_incremental_compilation_information_6380", "Specify file to store incremental compilation information"), + Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2: b(6381, 3, "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381", "Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'"), + Skipping_build_of_project_0_because_its_dependency_1_was_not_built: b(6382, 3, "Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382", "Skipping build of project '{0}' because its dependency '{1}' was not built"), + Project_0_can_t_be_built_because_its_dependency_1_was_not_built: b(6383, 3, "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383", "Project '{0}' can't be built because its dependency '{1}' was not built"), + Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it: b(6384, 3, "Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384", "Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it."), + _0_is_deprecated: b( + 6385, + 2, + "_0_is_deprecated_6385", + "'{0}' is deprecated.", + /*reportsUnnecessary*/ + void 0, + /*elidedInCompatabilityPyramid*/ + void 0, + /*reportsDeprecated*/ + !0 + ), + Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found: b(6386, 3, "Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_nativ_6386", "Performance timings for '--diagnostics' or '--extendedDiagnostics' are not available in this session. A native implementation of the Web Performance API could not be found."), + The_signature_0_of_1_is_deprecated: b( + 6387, + 2, + "The_signature_0_of_1_is_deprecated_6387", + "The signature '{0}' of '{1}' is deprecated.", + /*reportsUnnecessary*/ + void 0, + /*elidedInCompatabilityPyramid*/ + void 0, + /*reportsDeprecated*/ + !0 + ), + Project_0_is_being_forcibly_rebuilt: b(6388, 3, "Project_0_is_being_forcibly_rebuilt_6388", "Project '{0}' is being forcibly rebuilt"), + Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved: b(6389, 3, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved_6389", "Reusing resolution of module '{0}' from '{1}' of old program, it was not resolved."), + Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2: b(6390, 3, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6390", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."), + Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3: b(6391, 3, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6391", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."), + Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved: b(6392, 3, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved_6392", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was not resolved."), + Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3: b(6393, 3, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6393", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."), + Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4: b(6394, 3, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6394", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."), + Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved: b(6395, 3, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved_6395", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was not resolved."), + Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3: b(6396, 3, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6396", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."), + Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4: b(6397, 3, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."), + Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved: b(6398, 3, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."), + Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted: b(6399, 3, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitte_6399", "Project '{0}' is out of date because buildinfo file '{1}' indicates that some of the changes were not emitted"), + Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files: b(6400, 3, "Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_fil_6400", "Project '{0}' is up to date but needs to update timestamps of output files that are older than input files"), + Project_0_is_out_of_date_because_there_was_error_reading_file_1: b(6401, 3, "Project_0_is_out_of_date_because_there_was_error_reading_file_1_6401", "Project '{0}' is out of date because there was error reading file '{1}'"), + Resolving_in_0_mode_with_conditions_1: b(6402, 3, "Resolving_in_0_mode_with_conditions_1_6402", "Resolving in {0} mode with conditions {1}."), + Matched_0_condition_1: b(6403, 3, "Matched_0_condition_1_6403", "Matched '{0}' condition '{1}'."), + Using_0_subpath_1_with_target_2: b(6404, 3, "Using_0_subpath_1_with_target_2_6404", "Using '{0}' subpath '{1}' with target '{2}'."), + Saw_non_matching_condition_0: b(6405, 3, "Saw_non_matching_condition_0_6405", "Saw non-matching condition '{0}'."), + Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions: b(6406, 3, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions_6406", "Project '{0}' is out of date because buildinfo file '{1}' indicates there is change in compilerOptions"), + Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set: b(6407, 3, "Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noE_6407", "Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set."), + Use_the_package_json_exports_field_when_resolving_package_imports: b(6408, 3, "Use_the_package_json_exports_field_when_resolving_package_imports_6408", "Use the package.json 'exports' field when resolving package imports."), + Use_the_package_json_imports_field_when_resolving_imports: b(6409, 3, "Use_the_package_json_imports_field_when_resolving_imports_6409", "Use the package.json 'imports' field when resolving imports."), + Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports: b(6410, 3, "Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports_6410", "Conditions to set in addition to the resolver-specific defaults when resolving imports."), + true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false: b(6411, 3, "true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false_6411", "`true` when 'moduleResolution' is 'node16', 'nodenext', or 'bundler'; otherwise `false`."), + Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more: b(6412, 3, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_6412", "Project '{0}' is out of date because buildinfo file '{1}' indicates that file '{2}' was root file of compilation but not any more."), + Entering_conditional_exports: b(6413, 3, "Entering_conditional_exports_6413", "Entering conditional exports."), + Resolved_under_condition_0: b(6414, 3, "Resolved_under_condition_0_6414", "Resolved under condition '{0}'."), + Failed_to_resolve_under_condition_0: b(6415, 3, "Failed_to_resolve_under_condition_0_6415", "Failed to resolve under condition '{0}'."), + Exiting_conditional_exports: b(6416, 3, "Exiting_conditional_exports_6416", "Exiting conditional exports."), + Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0: b(6417, 3, "Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0_6417", "Searching all ancestor node_modules directories for preferred extensions: {0}."), + Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0: b(6418, 3, "Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0_6418", "Searching all ancestor node_modules directories for fallback extensions: {0}."), + Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors: b(6419, 3, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors_6419", "Project '{0}' is out of date because buildinfo file '{1}' indicates that program needs to report errors."), + Project_0_is_out_of_date_because_1: b(6420, 3, "Project_0_is_out_of_date_because_1_6420", "Project '{0}' is out of date because {1}."), + Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_in_output_files: b(6421, 3, "Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_i_6421", "Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files."), + The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: b(6500, 3, "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500", "The expected type comes from property '{0}' which is declared here on type '{1}'"), + The_expected_type_comes_from_this_index_signature: b(6501, 3, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."), + The_expected_type_comes_from_the_return_type_of_this_signature: b(6502, 3, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."), + Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing: b(6503, 3, "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503", "Print names of files that are part of the compilation and then stop processing."), + File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option: b(6504, 1, "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504", "File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"), + Print_names_of_files_and_the_reason_they_are_part_of_the_compilation: b(6505, 3, "Print_names_of_files_and_the_reason_they_are_part_of_the_compilation_6505", "Print names of files and the reason they are part of the compilation."), + Consider_adding_a_declare_modifier_to_this_class: b(6506, 3, "Consider_adding_a_declare_modifier_to_this_class_6506", "Consider adding a 'declare' modifier to this class."), + Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files: b(6600, 3, "Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these__6600", "Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files."), + Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export: b(6601, 3, "Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601", "Allow 'import x from y' when a module doesn't have a default export."), + Allow_accessing_UMD_globals_from_modules: b(6602, 3, "Allow_accessing_UMD_globals_from_modules_6602", "Allow accessing UMD globals from modules."), + Disable_error_reporting_for_unreachable_code: b(6603, 3, "Disable_error_reporting_for_unreachable_code_6603", "Disable error reporting for unreachable code."), + Disable_error_reporting_for_unused_labels: b(6604, 3, "Disable_error_reporting_for_unused_labels_6604", "Disable error reporting for unused labels."), + Ensure_use_strict_is_always_emitted: b(6605, 3, "Ensure_use_strict_is_always_emitted_6605", "Ensure 'use strict' is always emitted."), + Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it: b(6606, 3, "Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606", "Have recompiles in projects that use 'incremental' and 'watch' mode assume that changes within a file will only affect files directly depending on it."), + Specify_the_base_directory_to_resolve_non_relative_module_names: b(6607, 3, "Specify_the_base_directory_to_resolve_non_relative_module_names_6607", "Specify the base directory to resolve non-relative module names."), + No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files: b(6608, 3, "No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files_6608", "No longer supported. In early versions, manually set the text encoding for reading files."), + Enable_error_reporting_in_type_checked_JavaScript_files: b(6609, 3, "Enable_error_reporting_in_type_checked_JavaScript_files_6609", "Enable error reporting in type-checked JavaScript files."), + Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references: b(6611, 3, "Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references_6611", "Enable constraints that allow a TypeScript project to be used with project references."), + Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project: b(6612, 3, "Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project_6612", "Generate .d.ts files from TypeScript and JavaScript files in your project."), + Specify_the_output_directory_for_generated_declaration_files: b(6613, 3, "Specify_the_output_directory_for_generated_declaration_files_6613", "Specify the output directory for generated declaration files."), + Create_sourcemaps_for_d_ts_files: b(6614, 3, "Create_sourcemaps_for_d_ts_files_6614", "Create sourcemaps for d.ts files."), + Output_compiler_performance_information_after_building: b(6615, 3, "Output_compiler_performance_information_after_building_6615", "Output compiler performance information after building."), + Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project: b(6616, 3, "Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project_6616", "Disables inference for type acquisition by looking at filenames in a project."), + Reduce_the_number_of_projects_loaded_automatically_by_TypeScript: b(6617, 3, "Reduce_the_number_of_projects_loaded_automatically_by_TypeScript_6617", "Reduce the number of projects loaded automatically by TypeScript."), + Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server: b(6618, 3, "Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server_6618", "Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server."), + Opt_a_project_out_of_multi_project_reference_checking_when_editing: b(6619, 3, "Opt_a_project_out_of_multi_project_reference_checking_when_editing_6619", "Opt a project out of multi-project reference checking when editing."), + Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects: b(6620, 3, "Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620", "Disable preferring source files instead of declaration files when referencing composite projects."), + Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration: b(6621, 3, "Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration_6621", "Emit more compliant, but verbose and less performant JavaScript for iteration."), + Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files: b(6622, 3, "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6622", "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."), + Only_output_d_ts_files_and_not_JavaScript_files: b(6623, 3, "Only_output_d_ts_files_and_not_JavaScript_files_6623", "Only output d.ts files and not JavaScript files."), + Emit_design_type_metadata_for_decorated_declarations_in_source_files: b(6624, 3, "Emit_design_type_metadata_for_decorated_declarations_in_source_files_6624", "Emit design-type metadata for decorated declarations in source files."), + Disable_the_type_acquisition_for_JavaScript_projects: b(6625, 3, "Disable_the_type_acquisition_for_JavaScript_projects_6625", "Disable the type acquisition for JavaScript projects"), + Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility: b(6626, 3, "Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626", "Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility."), + Filters_results_from_the_include_option: b(6627, 3, "Filters_results_from_the_include_option_6627", "Filters results from the `include` option."), + Remove_a_list_of_directories_from_the_watch_process: b(6628, 3, "Remove_a_list_of_directories_from_the_watch_process_6628", "Remove a list of directories from the watch process."), + Remove_a_list_of_files_from_the_watch_mode_s_processing: b(6629, 3, "Remove_a_list_of_files_from_the_watch_mode_s_processing_6629", "Remove a list of files from the watch mode's processing."), + Enable_experimental_support_for_legacy_experimental_decorators: b(6630, 3, "Enable_experimental_support_for_legacy_experimental_decorators_6630", "Enable experimental support for legacy experimental decorators."), + Print_files_read_during_the_compilation_including_why_it_was_included: b(6631, 3, "Print_files_read_during_the_compilation_including_why_it_was_included_6631", "Print files read during the compilation including why it was included."), + Output_more_detailed_compiler_performance_information_after_building: b(6632, 3, "Output_more_detailed_compiler_performance_information_after_building_6632", "Output more detailed compiler performance information after building."), + Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_are_inherited: b(6633, 3, "Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_a_6633", "Specify one or more path or node module references to base configuration files from which settings are inherited."), + Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers: b(6634, 3, "Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers_6634", "Specify what approach the watcher should use if the system runs out of native file watchers."), + Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include: b(6635, 3, "Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include_6635", "Include a list of files. This does not support glob patterns, as opposed to `include`."), + Build_all_projects_including_those_that_appear_to_be_up_to_date: b(6636, 3, "Build_all_projects_including_those_that_appear_to_be_up_to_date_6636", "Build all projects, including those that appear to be up to date."), + Ensure_that_casing_is_correct_in_imports: b(6637, 3, "Ensure_that_casing_is_correct_in_imports_6637", "Ensure that casing is correct in imports."), + Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging: b(6638, 3, "Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638", "Emit a v8 CPU profile of the compiler run for debugging."), + Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file: b(6639, 3, "Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639", "Allow importing helper functions from tslib once per project, instead of including them per-file."), + Skip_building_downstream_projects_on_error_in_upstream_project: b(6640, 3, "Skip_building_downstream_projects_on_error_in_upstream_project_6640", "Skip building downstream projects on error in upstream project."), + Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation: b(6641, 3, "Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation_6641", "Specify a list of glob patterns that match files to be included in compilation."), + Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects: b(6642, 3, "Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642", "Save .tsbuildinfo files to allow for incremental compilation of projects."), + Include_sourcemap_files_inside_the_emitted_JavaScript: b(6643, 3, "Include_sourcemap_files_inside_the_emitted_JavaScript_6643", "Include sourcemap files inside the emitted JavaScript."), + Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript: b(6644, 3, "Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript_6644", "Include source code in the sourcemaps inside the emitted JavaScript."), + Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports: b(6645, 3, "Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports_6645", "Ensure that each file can be safely transpiled without relying on other imports."), + Specify_what_JSX_code_is_generated: b(6646, 3, "Specify_what_JSX_code_is_generated_6646", "Specify what JSX code is generated."), + Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h: b(6647, 3, "Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647", "Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'."), + Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment: b(6648, 3, "Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragme_6648", "Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'."), + Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk: b(6649, 3, "Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Ast_6649", "Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'."), + Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option: b(6650, 3, "Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650", "Make keyof only return strings instead of string, numbers or symbols. Legacy option."), + Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment: b(6651, 3, "Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment_6651", "Specify a set of bundled library declaration files that describe the target runtime environment."), + Print_the_names_of_emitted_files_after_a_compilation: b(6652, 3, "Print_the_names_of_emitted_files_after_a_compilation_6652", "Print the names of emitted files after a compilation."), + Print_all_of_the_files_read_during_the_compilation: b(6653, 3, "Print_all_of_the_files_read_during_the_compilation_6653", "Print all of the files read during the compilation."), + Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit: b(6654, 3, "Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit_6654", "Set the language of the messaging from TypeScript. This does not affect emit."), + Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: b(6655, 3, "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6655", "Specify the location where debugger should locate map files instead of generated locations."), + Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs: b(6656, 3, "Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicabl_6656", "Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'."), + Specify_what_module_code_is_generated: b(6657, 3, "Specify_what_module_code_is_generated_6657", "Specify what module code is generated."), + Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier: b(6658, 3, "Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier_6658", "Specify how TypeScript looks up a file from a given module specifier."), + Set_the_newline_character_for_emitting_files: b(6659, 3, "Set_the_newline_character_for_emitting_files_6659", "Set the newline character for emitting files."), + Disable_emitting_files_from_a_compilation: b(6660, 3, "Disable_emitting_files_from_a_compilation_6660", "Disable emitting files from a compilation."), + Disable_generating_custom_helper_functions_like_extends_in_compiled_output: b(6661, 3, "Disable_generating_custom_helper_functions_like_extends_in_compiled_output_6661", "Disable generating custom helper functions like '__extends' in compiled output."), + Disable_emitting_files_if_any_type_checking_errors_are_reported: b(6662, 3, "Disable_emitting_files_if_any_type_checking_errors_are_reported_6662", "Disable emitting files if any type checking errors are reported."), + Disable_truncating_types_in_error_messages: b(6663, 3, "Disable_truncating_types_in_error_messages_6663", "Disable truncating types in error messages."), + Enable_error_reporting_for_fallthrough_cases_in_switch_statements: b(6664, 3, "Enable_error_reporting_for_fallthrough_cases_in_switch_statements_6664", "Enable error reporting for fallthrough cases in switch statements."), + Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type: b(6665, 3, "Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665", "Enable error reporting for expressions and declarations with an implied 'any' type."), + Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier: b(6666, 3, "Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier_6666", "Ensure overriding members in derived classes are marked with an override modifier."), + Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function: b(6667, 3, "Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function_6667", "Enable error reporting for codepaths that do not explicitly return in a function."), + Enable_error_reporting_when_this_is_given_the_type_any: b(6668, 3, "Enable_error_reporting_when_this_is_given_the_type_any_6668", "Enable error reporting when 'this' is given the type 'any'."), + Disable_adding_use_strict_directives_in_emitted_JavaScript_files: b(6669, 3, "Disable_adding_use_strict_directives_in_emitted_JavaScript_files_6669", "Disable adding 'use strict' directives in emitted JavaScript files."), + Disable_including_any_library_files_including_the_default_lib_d_ts: b(6670, 3, "Disable_including_any_library_files_including_the_default_lib_d_ts_6670", "Disable including any library files, including the default lib.d.ts."), + Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type: b(6671, 3, "Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671", "Enforces using indexed accessors for keys declared using an indexed type."), + Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project: b(6672, 3, "Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672", "Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project."), + Disable_strict_checking_of_generic_signatures_in_function_types: b(6673, 3, "Disable_strict_checking_of_generic_signatures_in_function_types_6673", "Disable strict checking of generic signatures in function types."), + Add_undefined_to_a_type_when_accessed_using_an_index: b(6674, 3, "Add_undefined_to_a_type_when_accessed_using_an_index_6674", "Add 'undefined' to a type when accessed using an index."), + Enable_error_reporting_when_local_variables_aren_t_read: b(6675, 3, "Enable_error_reporting_when_local_variables_aren_t_read_6675", "Enable error reporting when local variables aren't read."), + Raise_an_error_when_a_function_parameter_isn_t_read: b(6676, 3, "Raise_an_error_when_a_function_parameter_isn_t_read_6676", "Raise an error when a function parameter isn't read."), + Deprecated_setting_Use_outFile_instead: b(6677, 3, "Deprecated_setting_Use_outFile_instead_6677", "Deprecated setting. Use 'outFile' instead."), + Specify_an_output_folder_for_all_emitted_files: b(6678, 3, "Specify_an_output_folder_for_all_emitted_files_6678", "Specify an output folder for all emitted files."), + Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output: b(6679, 3, "Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designa_6679", "Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output."), + Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations: b(6680, 3, "Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations_6680", "Specify a set of entries that re-map imports to additional lookup locations."), + Specify_a_list_of_language_service_plugins_to_include: b(6681, 3, "Specify_a_list_of_language_service_plugins_to_include_6681", "Specify a list of language service plugins to include."), + Disable_erasing_const_enum_declarations_in_generated_code: b(6682, 3, "Disable_erasing_const_enum_declarations_in_generated_code_6682", "Disable erasing 'const enum' declarations in generated code."), + Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node: b(6683, 3, "Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node_6683", "Disable resolving symlinks to their realpath. This correlates to the same flag in node."), + Disable_wiping_the_console_in_watch_mode: b(6684, 3, "Disable_wiping_the_console_in_watch_mode_6684", "Disable wiping the console in watch mode."), + Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read: b(6685, 3, "Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685", "Enable color and formatting in TypeScript's output to make compiler errors easier to read."), + Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit: b(6686, 3, "Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686", "Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit."), + Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references: b(6687, 3, "Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references_6687", "Specify an array of objects that specify paths for projects. Used in project references."), + Disable_emitting_comments: b(6688, 3, "Disable_emitting_comments_6688", "Disable emitting comments."), + Enable_importing_json_files: b(6689, 3, "Enable_importing_json_files_6689", "Enable importing .json files."), + Specify_the_root_folder_within_your_source_files: b(6690, 3, "Specify_the_root_folder_within_your_source_files_6690", "Specify the root folder within your source files."), + Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules: b(6691, 3, "Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules_6691", "Allow multiple folders to be treated as one when resolving modules."), + Skip_type_checking_d_ts_files_that_are_included_with_TypeScript: b(6692, 3, "Skip_type_checking_d_ts_files_that_are_included_with_TypeScript_6692", "Skip type checking .d.ts files that are included with TypeScript."), + Skip_type_checking_all_d_ts_files: b(6693, 3, "Skip_type_checking_all_d_ts_files_6693", "Skip type checking all .d.ts files."), + Create_source_map_files_for_emitted_JavaScript_files: b(6694, 3, "Create_source_map_files_for_emitted_JavaScript_files_6694", "Create source map files for emitted JavaScript files."), + Specify_the_root_path_for_debuggers_to_find_the_reference_source_code: b(6695, 3, "Specify_the_root_path_for_debuggers_to_find_the_reference_source_code_6695", "Specify the root path for debuggers to find the reference source code."), + Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function: b(6697, 3, "Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function_6697", "Check that the arguments for 'bind', 'call', and 'apply' methods match the original function."), + When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible: b(6698, 3, "When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698", "When assigning functions, check to ensure parameters and the return values are subtype-compatible."), + When_type_checking_take_into_account_null_and_undefined: b(6699, 3, "When_type_checking_take_into_account_null_and_undefined_6699", "When type checking, take into account 'null' and 'undefined'."), + Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor: b(6700, 3, "Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor_6700", "Check for class properties that are declared but not set in the constructor."), + Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments: b(6701, 3, "Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701", "Disable emitting declarations that have '@internal' in their JSDoc comments."), + Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals: b(6702, 3, "Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals_6702", "Disable reporting of excess property errors during the creation of object literals."), + Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures: b(6703, 3, "Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703", "Suppress 'noImplicitAny' errors when indexing objects that lack index signatures."), + Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively: b(6704, 3, "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6704", "Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively."), + Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations: b(6705, 3, "Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declaratio_6705", "Set the JavaScript language version for emitted JavaScript and include compatible library declarations."), + Log_paths_used_during_the_moduleResolution_process: b(6706, 3, "Log_paths_used_during_the_moduleResolution_process_6706", "Log paths used during the 'moduleResolution' process."), + Specify_the_path_to_tsbuildinfo_incremental_compilation_file: b(6707, 3, "Specify_the_path_to_tsbuildinfo_incremental_compilation_file_6707", "Specify the path to .tsbuildinfo incremental compilation file."), + Specify_options_for_automatic_acquisition_of_declaration_files: b(6709, 3, "Specify_options_for_automatic_acquisition_of_declaration_files_6709", "Specify options for automatic acquisition of declaration files."), + Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types: b(6710, 3, "Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710", "Specify multiple folders that act like './node_modules/@types'."), + Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file: b(6711, 3, "Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file_6711", "Specify type package names to be included without being referenced in a source file."), + Emit_ECMAScript_standard_compliant_class_fields: b(6712, 3, "Emit_ECMAScript_standard_compliant_class_fields_6712", "Emit ECMAScript-standard-compliant class fields."), + Enable_verbose_logging: b(6713, 3, "Enable_verbose_logging_6713", "Enable verbose logging."), + Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality: b(6714, 3, "Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality_6714", "Specify how directories are watched on systems that lack recursive file-watching functionality."), + Specify_how_the_TypeScript_watch_mode_works: b(6715, 3, "Specify_how_the_TypeScript_watch_mode_works_6715", "Specify how the TypeScript watch mode works."), + Require_undeclared_properties_from_index_signatures_to_use_element_accesses: b(6717, 3, "Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717", "Require undeclared properties from index signatures to use element accesses."), + Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types: b(6718, 3, "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718", "Specify emit/checking behavior for imports that are only used for types."), + Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files: b(6719, 3, "Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files_6719", "Require sufficient annotation on exports so other tools can trivially generate declaration files."), + Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any: b(6720, 3, "Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any_6720", "Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'."), + Default_catch_clause_variables_as_unknown_instead_of_any: b(6803, 3, "Default_catch_clause_variables_as_unknown_instead_of_any_6803", "Default catch clause variables as 'unknown' instead of 'any'."), + Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting: b(6804, 3, "Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_i_6804", "Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting."), + Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported: b(6805, 3, "Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported_6805", "Disable full type checking (only critical parse and emit errors will be reported)."), + Check_side_effect_imports: b(6806, 3, "Check_side_effect_imports_6806", "Check side effect imports."), + This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2: b(6807, 1, "This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2_6807", "This operation can be simplified. This shift is identical to `{0} {1} {2}`."), + one_of_Colon: b(6900, 3, "one_of_Colon_6900", "one of:"), + one_or_more_Colon: b(6901, 3, "one_or_more_Colon_6901", "one or more:"), + type_Colon: b(6902, 3, "type_Colon_6902", "type:"), + default_Colon: b(6903, 3, "default_Colon_6903", "default:"), + module_system_or_esModuleInterop: b(6904, 3, "module_system_or_esModuleInterop_6904", 'module === "system" or esModuleInterop'), + false_unless_strict_is_set: b(6905, 3, "false_unless_strict_is_set_6905", "`false`, unless `strict` is set"), + false_unless_composite_is_set: b(6906, 3, "false_unless_composite_is_set_6906", "`false`, unless `composite` is set"), + node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified: b(6907, 3, "node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907", '`["node_modules", "bower_components", "jspm_packages"]`, plus the value of `outDir` if one is specified.'), + if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk: b(6908, 3, "if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk_6908", '`[]` if `files` is specified, otherwise `["**/*"]`'), + true_if_composite_false_otherwise: b(6909, 3, "true_if_composite_false_otherwise_6909", "`true` if `composite`, `false` otherwise"), + module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node: b(69010, 3, "module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node_69010", "module === `AMD` or `UMD` or `System` or `ES6`, then `Classic`, Otherwise `Node`"), + Computed_from_the_list_of_input_files: b(6911, 3, "Computed_from_the_list_of_input_files_6911", "Computed from the list of input files"), + Platform_specific: b(6912, 3, "Platform_specific_6912", "Platform specific"), + You_can_learn_about_all_of_the_compiler_options_at_0: b(6913, 3, "You_can_learn_about_all_of_the_compiler_options_at_0_6913", "You can learn about all of the compiler options at {0}"), + Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon: b(6914, 3, "Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914", "Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:"), + Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0: b(6915, 3, "Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_tr_6915", "Using --build, -b will make tsc behave more like a build orchestrator than a compiler. This is used to trigger building composite projects which you can learn more about at {0}"), + COMMON_COMMANDS: b(6916, 3, "COMMON_COMMANDS_6916", "COMMON COMMANDS"), + ALL_COMPILER_OPTIONS: b(6917, 3, "ALL_COMPILER_OPTIONS_6917", "ALL COMPILER OPTIONS"), + WATCH_OPTIONS: b(6918, 3, "WATCH_OPTIONS_6918", "WATCH OPTIONS"), + BUILD_OPTIONS: b(6919, 3, "BUILD_OPTIONS_6919", "BUILD OPTIONS"), + COMMON_COMPILER_OPTIONS: b(6920, 3, "COMMON_COMPILER_OPTIONS_6920", "COMMON COMPILER OPTIONS"), + COMMAND_LINE_FLAGS: b(6921, 3, "COMMAND_LINE_FLAGS_6921", "COMMAND LINE FLAGS"), + tsc_Colon_The_TypeScript_Compiler: b(6922, 3, "tsc_Colon_The_TypeScript_Compiler_6922", "tsc: The TypeScript Compiler"), + Compiles_the_current_project_tsconfig_json_in_the_working_directory: b(6923, 3, "Compiles_the_current_project_tsconfig_json_in_the_working_directory_6923", "Compiles the current project (tsconfig.json in the working directory.)"), + Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options: b(6924, 3, "Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options_6924", "Ignoring tsconfig.json, compiles the specified files with default compiler options."), + Build_a_composite_project_in_the_working_directory: b(6925, 3, "Build_a_composite_project_in_the_working_directory_6925", "Build a composite project in the working directory."), + Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory: b(6926, 3, "Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory_6926", "Creates a tsconfig.json with the recommended settings in the working directory."), + Compiles_the_TypeScript_project_located_at_the_specified_path: b(6927, 3, "Compiles_the_TypeScript_project_located_at_the_specified_path_6927", "Compiles the TypeScript project located at the specified path."), + An_expanded_version_of_this_information_showing_all_possible_compiler_options: b(6928, 3, "An_expanded_version_of_this_information_showing_all_possible_compiler_options_6928", "An expanded version of this information, showing all possible compiler options"), + Compiles_the_current_project_with_additional_settings: b(6929, 3, "Compiles_the_current_project_with_additional_settings_6929", "Compiles the current project, with additional settings."), + true_for_ES2022_and_above_including_ESNext: b(6930, 3, "true_for_ES2022_and_above_including_ESNext_6930", "`true` for ES2022 and above, including ESNext."), + List_of_file_name_suffixes_to_search_when_resolving_a_module: b(6931, 1, "List_of_file_name_suffixes_to_search_when_resolving_a_module_6931", "List of file name suffixes to search when resolving a module."), + Variable_0_implicitly_has_an_1_type: b(7005, 1, "Variable_0_implicitly_has_an_1_type_7005", "Variable '{0}' implicitly has an '{1}' type."), + Parameter_0_implicitly_has_an_1_type: b(7006, 1, "Parameter_0_implicitly_has_an_1_type_7006", "Parameter '{0}' implicitly has an '{1}' type."), + Member_0_implicitly_has_an_1_type: b(7008, 1, "Member_0_implicitly_has_an_1_type_7008", "Member '{0}' implicitly has an '{1}' type."), + new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type: b(7009, 1, "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009", "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."), + _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: b(7010, 1, "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010", "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."), + Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: b(7011, 1, "Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011", "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."), + This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation: b(7012, 1, "This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation_7012", "This overload implicitly returns the type '{0}' because it lacks a return type annotation."), + Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: b(7013, 1, "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013", "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."), + Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: b(7014, 1, "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014", "Function type, which lacks return-type annotation, implicitly has an '{0}' return type."), + Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number: b(7015, 1, "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015", "Element implicitly has an 'any' type because index expression is not of type 'number'."), + Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type: b(7016, 1, "Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016", "Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type."), + Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature: b(7017, 1, "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017", "Element implicitly has an 'any' type because type '{0}' has no index signature."), + Object_literal_s_property_0_implicitly_has_an_1_type: b(7018, 1, "Object_literal_s_property_0_implicitly_has_an_1_type_7018", "Object literal's property '{0}' implicitly has an '{1}' type."), + Rest_parameter_0_implicitly_has_an_any_type: b(7019, 1, "Rest_parameter_0_implicitly_has_an_any_type_7019", "Rest parameter '{0}' implicitly has an 'any[]' type."), + Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: b(7020, 1, "Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020", "Call signature, which lacks return-type annotation, implicitly has an 'any' return type."), + _0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer: b(7022, 1, "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022", "'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer."), + _0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: b(7023, 1, "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023", "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."), + Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: b(7024, 1, "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024", "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."), + Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation: b(7025, 1, "Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation_7025", "Generator implicitly has yield type '{0}'. Consider supplying a return type annotation."), + JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists: b(7026, 1, "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists."), + Unreachable_code_detected: b( + 7027, + 1, + "Unreachable_code_detected_7027", + "Unreachable code detected.", + /*reportsUnnecessary*/ + !0 + ), + Unused_label: b( + 7028, + 1, + "Unused_label_7028", + "Unused label.", + /*reportsUnnecessary*/ + !0 + ), + Fallthrough_case_in_switch: b(7029, 1, "Fallthrough_case_in_switch_7029", "Fallthrough case in switch."), + Not_all_code_paths_return_a_value: b(7030, 1, "Not_all_code_paths_return_a_value_7030", "Not all code paths return a value."), + Binding_element_0_implicitly_has_an_1_type: b(7031, 1, "Binding_element_0_implicitly_has_an_1_type_7031", "Binding element '{0}' implicitly has an '{1}' type."), + Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation: b(7032, 1, "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032", "Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation."), + Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation: b(7033, 1, "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033", "Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation."), + Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined: b(7034, 1, "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034", "Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined."), + Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0: b(7035, 1, "Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare__7035", "Try `npm i --save-dev @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`"), + Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0: b(7036, 1, "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036", "Dynamic import's specifier must be of type 'string', but here has type '{0}'."), + Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports: b(7037, 3, "Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037", "Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'."), + Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead: b(7038, 3, "Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038", "Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead."), + Mapped_object_type_implicitly_has_an_any_template_type: b(7039, 1, "Mapped_object_type_implicitly_has_an_any_template_type_7039", "Mapped object type implicitly has an 'any' template type."), + If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1: b(7040, 1, "If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040", "If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}'"), + The_containing_arrow_function_captures_the_global_value_of_this: b(7041, 1, "The_containing_arrow_function_captures_the_global_value_of_this_7041", "The containing arrow function captures the global value of 'this'."), + Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used: b(7042, 1, "Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042", "Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used."), + Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage: b(7043, 2, "Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043", "Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."), + Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage: b(7044, 2, "Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044", "Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."), + Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage: b(7045, 2, "Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045", "Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."), + Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage: b(7046, 2, "Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046", "Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage."), + Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage: b(7047, 2, "Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047", "Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage."), + Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage: b(7048, 2, "Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048", "Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage."), + Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage: b(7049, 2, "Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049", "Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage."), + _0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage: b(7050, 2, "_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050", "'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage."), + Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1: b(7051, 1, "Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051", "Parameter has a name but no type. Did you mean '{0}: {1}'?"), + Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1: b(7052, 1, "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052", "Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}'?"), + Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1: b(7053, 1, "Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053", "Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'."), + No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1: b(7054, 1, "No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054", "No index signature with a parameter of type '{0}' was found on type '{1}'."), + _0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type: b(7055, 1, "_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055", "'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type."), + The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed: b(7056, 1, "The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_ty_7056", "The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed."), + yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation: b(7057, 1, "yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057", "'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation."), + If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1: b(7058, 1, "If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058", "If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`"), + This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead: b(7059, 1, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059", "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."), + This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint: b(7060, 1, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060", "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."), + A_mapped_type_may_not_declare_properties_or_methods: b(7061, 1, "A_mapped_type_may_not_declare_properties_or_methods_7061", "A mapped type may not declare properties or methods."), + You_cannot_rename_this_element: b(8e3, 1, "You_cannot_rename_this_element_8000", "You cannot rename this element."), + You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: b(8001, 1, "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", "You cannot rename elements that are defined in the standard TypeScript library."), + import_can_only_be_used_in_TypeScript_files: b(8002, 1, "import_can_only_be_used_in_TypeScript_files_8002", "'import ... =' can only be used in TypeScript files."), + export_can_only_be_used_in_TypeScript_files: b(8003, 1, "export_can_only_be_used_in_TypeScript_files_8003", "'export =' can only be used in TypeScript files."), + Type_parameter_declarations_can_only_be_used_in_TypeScript_files: b(8004, 1, "Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004", "Type parameter declarations can only be used in TypeScript files."), + implements_clauses_can_only_be_used_in_TypeScript_files: b(8005, 1, "implements_clauses_can_only_be_used_in_TypeScript_files_8005", "'implements' clauses can only be used in TypeScript files."), + _0_declarations_can_only_be_used_in_TypeScript_files: b(8006, 1, "_0_declarations_can_only_be_used_in_TypeScript_files_8006", "'{0}' declarations can only be used in TypeScript files."), + Type_aliases_can_only_be_used_in_TypeScript_files: b(8008, 1, "Type_aliases_can_only_be_used_in_TypeScript_files_8008", "Type aliases can only be used in TypeScript files."), + The_0_modifier_can_only_be_used_in_TypeScript_files: b(8009, 1, "The_0_modifier_can_only_be_used_in_TypeScript_files_8009", "The '{0}' modifier can only be used in TypeScript files."), + Type_annotations_can_only_be_used_in_TypeScript_files: b(8010, 1, "Type_annotations_can_only_be_used_in_TypeScript_files_8010", "Type annotations can only be used in TypeScript files."), + Type_arguments_can_only_be_used_in_TypeScript_files: b(8011, 1, "Type_arguments_can_only_be_used_in_TypeScript_files_8011", "Type arguments can only be used in TypeScript files."), + Parameter_modifiers_can_only_be_used_in_TypeScript_files: b(8012, 1, "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012", "Parameter modifiers can only be used in TypeScript files."), + Non_null_assertions_can_only_be_used_in_TypeScript_files: b(8013, 1, "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013", "Non-null assertions can only be used in TypeScript files."), + Type_assertion_expressions_can_only_be_used_in_TypeScript_files: b(8016, 1, "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016", "Type assertion expressions can only be used in TypeScript files."), + Signature_declarations_can_only_be_used_in_TypeScript_files: b(8017, 1, "Signature_declarations_can_only_be_used_in_TypeScript_files_8017", "Signature declarations can only be used in TypeScript files."), + Report_errors_in_js_files: b(8019, 3, "Report_errors_in_js_files_8019", "Report errors in .js files."), + JSDoc_types_can_only_be_used_inside_documentation_comments: b(8020, 1, "JSDoc_types_can_only_be_used_inside_documentation_comments_8020", "JSDoc types can only be used inside documentation comments."), + JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags: b(8021, 1, "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021", "JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."), + JSDoc_0_is_not_attached_to_a_class: b(8022, 1, "JSDoc_0_is_not_attached_to_a_class_8022", "JSDoc '@{0}' is not attached to a class."), + JSDoc_0_1_does_not_match_the_extends_2_clause: b(8023, 1, "JSDoc_0_1_does_not_match_the_extends_2_clause_8023", "JSDoc '@{0} {1}' does not match the 'extends {2}' clause."), + JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name: b(8024, 1, "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024", "JSDoc '@param' tag has name '{0}', but there is no parameter with that name."), + Class_declarations_cannot_have_more_than_one_augments_or_extends_tag: b(8025, 1, "Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025", "Class declarations cannot have more than one '@augments' or '@extends' tag."), + Expected_0_type_arguments_provide_these_with_an_extends_tag: b(8026, 1, "Expected_0_type_arguments_provide_these_with_an_extends_tag_8026", "Expected {0} type arguments; provide these with an '@extends' tag."), + Expected_0_1_type_arguments_provide_these_with_an_extends_tag: b(8027, 1, "Expected_0_1_type_arguments_provide_these_with_an_extends_tag_8027", "Expected {0}-{1} type arguments; provide these with an '@extends' tag."), + JSDoc_may_only_appear_in_the_last_parameter_of_a_signature: b(8028, 1, "JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028", "JSDoc '...' may only appear in the last parameter of a signature."), + JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type: b(8029, 1, "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029", "JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type."), + The_type_of_a_function_declaration_must_match_the_function_s_signature: b(8030, 1, "The_type_of_a_function_declaration_must_match_the_function_s_signature_8030", "The type of a function declaration must match the function's signature."), + You_cannot_rename_a_module_via_a_global_import: b(8031, 1, "You_cannot_rename_a_module_via_a_global_import_8031", "You cannot rename a module via a global import."), + Qualified_name_0_is_not_allowed_without_a_leading_param_object_1: b(8032, 1, "Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032", "Qualified name '{0}' is not allowed without a leading '@param {object} {1}'."), + A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags: b(8033, 1, "A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags_8033", "A JSDoc '@typedef' comment may not contain multiple '@type' tags."), + The_tag_was_first_specified_here: b(8034, 1, "The_tag_was_first_specified_here_8034", "The tag was first specified here."), + You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder: b(8035, 1, "You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder_8035", "You cannot rename elements that are defined in a 'node_modules' folder."), + You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder: b(8036, 1, "You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder_8036", "You cannot rename elements that are defined in another 'node_modules' folder."), + Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files: b(8037, 1, "Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files_8037", "Type satisfaction expressions can only be used in TypeScript files."), + Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export: b(8038, 1, "Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export_8038", "Decorators may not appear after 'export' or 'export default' if they also appear before 'export'."), + A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag: b(8039, 1, "A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag_8039", "A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag"), + Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit: b(9005, 1, "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005", "Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit."), + Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit: b(9006, 1, "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006", "Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit."), + Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations: b(9007, 1, "Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9007", "Function must have an explicit return type annotation with --isolatedDeclarations."), + Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations: b(9008, 1, "Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9008", "Method must have an explicit return type annotation with --isolatedDeclarations."), + At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations: b(9009, 1, "At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9009", "At least one accessor must have an explicit type annotation with --isolatedDeclarations."), + Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations: b(9010, 1, "Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9010", "Variable must have an explicit type annotation with --isolatedDeclarations."), + Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations: b(9011, 1, "Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9011", "Parameter must have an explicit type annotation with --isolatedDeclarations."), + Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations: b(9012, 1, "Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9012", "Property must have an explicit type annotation with --isolatedDeclarations."), + Expression_type_can_t_be_inferred_with_isolatedDeclarations: b(9013, 1, "Expression_type_can_t_be_inferred_with_isolatedDeclarations_9013", "Expression type can't be inferred with --isolatedDeclarations."), + Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations: b(9014, 1, "Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedD_9014", "Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations."), + Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations: b(9015, 1, "Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations_9015", "Objects that contain spread assignments can't be inferred with --isolatedDeclarations."), + Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations: b(9016, 1, "Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations_9016", "Objects that contain shorthand properties can't be inferred with --isolatedDeclarations."), + Only_const_arrays_can_be_inferred_with_isolatedDeclarations: b(9017, 1, "Only_const_arrays_can_be_inferred_with_isolatedDeclarations_9017", "Only const arrays can be inferred with --isolatedDeclarations."), + Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations: b(9018, 1, "Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations_9018", "Arrays with spread elements can't inferred with --isolatedDeclarations."), + Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations: b(9019, 1, "Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations_9019", "Binding elements can't be exported directly with --isolatedDeclarations."), + Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations: b(9020, 1, "Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDecl_9020", "Enum member initializers must be computable without references to external symbols with --isolatedDeclarations."), + Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations: b(9021, 1, "Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations_9021", "Extends clause can't contain an expression with --isolatedDeclarations."), + Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations: b(9022, 1, "Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations_9022", "Inference from class expressions is not supported with --isolatedDeclarations."), + Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function: b(9023, 1, "Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations__9023", "Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function."), + Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_supported_with_isolatedDeclarations: b(9025, 1, "Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_sup_9025", "Declaration emit for this parameter requires implicitly adding undefined to its type. This is not supported with --isolatedDeclarations."), + Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_supported_with_isolatedDeclarations: b(9026, 1, "Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_support_9026", "Declaration emit for this file requires preserving this import for augmentations. This is not supported with --isolatedDeclarations."), + Add_a_type_annotation_to_the_variable_0: b(9027, 1, "Add_a_type_annotation_to_the_variable_0_9027", "Add a type annotation to the variable {0}."), + Add_a_type_annotation_to_the_parameter_0: b(9028, 1, "Add_a_type_annotation_to_the_parameter_0_9028", "Add a type annotation to the parameter {0}."), + Add_a_type_annotation_to_the_property_0: b(9029, 1, "Add_a_type_annotation_to_the_property_0_9029", "Add a type annotation to the property {0}."), + Add_a_return_type_to_the_function_expression: b(9030, 1, "Add_a_return_type_to_the_function_expression_9030", "Add a return type to the function expression."), + Add_a_return_type_to_the_function_declaration: b(9031, 1, "Add_a_return_type_to_the_function_declaration_9031", "Add a return type to the function declaration."), + Add_a_return_type_to_the_get_accessor_declaration: b(9032, 1, "Add_a_return_type_to_the_get_accessor_declaration_9032", "Add a return type to the get accessor declaration."), + Add_a_type_to_parameter_of_the_set_accessor_declaration: b(9033, 1, "Add_a_type_to_parameter_of_the_set_accessor_declaration_9033", "Add a type to parameter of the set accessor declaration."), + Add_a_return_type_to_the_method: b(9034, 1, "Add_a_return_type_to_the_method_9034", "Add a return type to the method"), + Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit: b(9035, 1, "Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit_9035", "Add satisfies and a type assertion to this expression (satisfies T as T) to make the type explicit."), + Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it: b(9036, 1, "Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it_9036", "Move the expression in default export to a variable and add a type annotation to it."), + Default_exports_can_t_be_inferred_with_isolatedDeclarations: b(9037, 1, "Default_exports_can_t_be_inferred_with_isolatedDeclarations_9037", "Default exports can't be inferred with --isolatedDeclarations."), + Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations: b(9038, 1, "Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations_9038", "Computed property names on class or object literals cannot be inferred with --isolatedDeclarations."), + Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations: b(9039, 1, "Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations_9039", "Type containing private name '{0}' can't be used with --isolatedDeclarations."), + JSX_attributes_must_only_be_assigned_a_non_empty_expression: b(17e3, 1, "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000", "JSX attributes must only be assigned a non-empty 'expression'."), + JSX_elements_cannot_have_multiple_attributes_with_the_same_name: b(17001, 1, "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001", "JSX elements cannot have multiple attributes with the same name."), + Expected_corresponding_JSX_closing_tag_for_0: b(17002, 1, "Expected_corresponding_JSX_closing_tag_for_0_17002", "Expected corresponding JSX closing tag for '{0}'."), + Cannot_use_JSX_unless_the_jsx_flag_is_provided: b(17004, 1, "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004", "Cannot use JSX unless the '--jsx' flag is provided."), + A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: b(17005, 1, "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005", "A constructor cannot contain a 'super' call when its class extends 'null'."), + An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: b(17006, 1, "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006", "An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."), + A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: b(17007, 1, "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007", "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."), + JSX_element_0_has_no_corresponding_closing_tag: b(17008, 1, "JSX_element_0_has_no_corresponding_closing_tag_17008", "JSX element '{0}' has no corresponding closing tag."), + super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class: b(17009, 1, "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009", "'super' must be called before accessing 'this' in the constructor of a derived class."), + Unknown_type_acquisition_option_0: b(17010, 1, "Unknown_type_acquisition_option_0_17010", "Unknown type acquisition option '{0}'."), + super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class: b(17011, 1, "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011", "'super' must be called before accessing a property of 'super' in the constructor of a derived class."), + _0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2: b(17012, 1, "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012", "'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?"), + Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor: b(17013, 1, "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013", "Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor."), + JSX_fragment_has_no_corresponding_closing_tag: b(17014, 1, "JSX_fragment_has_no_corresponding_closing_tag_17014", "JSX fragment has no corresponding closing tag."), + Expected_corresponding_closing_tag_for_JSX_fragment: b(17015, 1, "Expected_corresponding_closing_tag_for_JSX_fragment_17015", "Expected corresponding closing tag for JSX fragment."), + The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option: b(17016, 1, "The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_com_17016", "The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option."), + An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments: b(17017, 1, "An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments_17017", "An @jsxFrag pragma is required when using an @jsx pragma with JSX fragments."), + Unknown_type_acquisition_option_0_Did_you_mean_1: b(17018, 1, "Unknown_type_acquisition_option_0_Did_you_mean_1_17018", "Unknown type acquisition option '{0}'. Did you mean '{1}'?"), + _0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1: b(17019, 1, "_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17019", "'{0}' at the end of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"), + _0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1: b(17020, 1, "_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17020", "'{0}' at the start of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"), + Unicode_escape_sequence_cannot_appear_here: b(17021, 1, "Unicode_escape_sequence_cannot_appear_here_17021", "Unicode escape sequence cannot appear here."), + Circularity_detected_while_resolving_configuration_Colon_0: b(18e3, 1, "Circularity_detected_while_resolving_configuration_Colon_0_18000", "Circularity detected while resolving configuration: {0}"), + The_files_list_in_config_file_0_is_empty: b(18002, 1, "The_files_list_in_config_file_0_is_empty_18002", "The 'files' list in config file '{0}' is empty."), + No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2: b(18003, 1, "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003", "No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'."), + File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module: b(80001, 2, "File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001", "File is a CommonJS module; it may be converted to an ES module."), + This_constructor_function_may_be_converted_to_a_class_declaration: b(80002, 2, "This_constructor_function_may_be_converted_to_a_class_declaration_80002", "This constructor function may be converted to a class declaration."), + Import_may_be_converted_to_a_default_import: b(80003, 2, "Import_may_be_converted_to_a_default_import_80003", "Import may be converted to a default import."), + JSDoc_types_may_be_moved_to_TypeScript_types: b(80004, 2, "JSDoc_types_may_be_moved_to_TypeScript_types_80004", "JSDoc types may be moved to TypeScript types."), + require_call_may_be_converted_to_an_import: b(80005, 2, "require_call_may_be_converted_to_an_import_80005", "'require' call may be converted to an import."), + This_may_be_converted_to_an_async_function: b(80006, 2, "This_may_be_converted_to_an_async_function_80006", "This may be converted to an async function."), + await_has_no_effect_on_the_type_of_this_expression: b(80007, 2, "await_has_no_effect_on_the_type_of_this_expression_80007", "'await' has no effect on the type of this expression."), + Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers: b(80008, 2, "Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008", "Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers."), + JSDoc_typedef_may_be_converted_to_TypeScript_type: b(80009, 2, "JSDoc_typedef_may_be_converted_to_TypeScript_type_80009", "JSDoc typedef may be converted to TypeScript type."), + JSDoc_typedefs_may_be_converted_to_TypeScript_types: b(80010, 2, "JSDoc_typedefs_may_be_converted_to_TypeScript_types_80010", "JSDoc typedefs may be converted to TypeScript types."), + Add_missing_super_call: b(90001, 3, "Add_missing_super_call_90001", "Add missing 'super()' call"), + Make_super_call_the_first_statement_in_the_constructor: b(90002, 3, "Make_super_call_the_first_statement_in_the_constructor_90002", "Make 'super()' call the first statement in the constructor"), + Change_extends_to_implements: b(90003, 3, "Change_extends_to_implements_90003", "Change 'extends' to 'implements'"), + Remove_unused_declaration_for_Colon_0: b(90004, 3, "Remove_unused_declaration_for_Colon_0_90004", "Remove unused declaration for: '{0}'"), + Remove_import_from_0: b(90005, 3, "Remove_import_from_0_90005", "Remove import from '{0}'"), + Implement_interface_0: b(90006, 3, "Implement_interface_0_90006", "Implement interface '{0}'"), + Implement_inherited_abstract_class: b(90007, 3, "Implement_inherited_abstract_class_90007", "Implement inherited abstract class"), + Add_0_to_unresolved_variable: b(90008, 3, "Add_0_to_unresolved_variable_90008", "Add '{0}.' to unresolved variable"), + Remove_variable_statement: b(90010, 3, "Remove_variable_statement_90010", "Remove variable statement"), + Remove_template_tag: b(90011, 3, "Remove_template_tag_90011", "Remove template tag"), + Remove_type_parameters: b(90012, 3, "Remove_type_parameters_90012", "Remove type parameters"), + Import_0_from_1: b(90013, 3, "Import_0_from_1_90013", `Import '{0}' from "{1}"`), + Change_0_to_1: b(90014, 3, "Change_0_to_1_90014", "Change '{0}' to '{1}'"), + Declare_property_0: b(90016, 3, "Declare_property_0_90016", "Declare property '{0}'"), + Add_index_signature_for_property_0: b(90017, 3, "Add_index_signature_for_property_0_90017", "Add index signature for property '{0}'"), + Disable_checking_for_this_file: b(90018, 3, "Disable_checking_for_this_file_90018", "Disable checking for this file"), + Ignore_this_error_message: b(90019, 3, "Ignore_this_error_message_90019", "Ignore this error message"), + Initialize_property_0_in_the_constructor: b(90020, 3, "Initialize_property_0_in_the_constructor_90020", "Initialize property '{0}' in the constructor"), + Initialize_static_property_0: b(90021, 3, "Initialize_static_property_0_90021", "Initialize static property '{0}'"), + Change_spelling_to_0: b(90022, 3, "Change_spelling_to_0_90022", "Change spelling to '{0}'"), + Declare_method_0: b(90023, 3, "Declare_method_0_90023", "Declare method '{0}'"), + Declare_static_method_0: b(90024, 3, "Declare_static_method_0_90024", "Declare static method '{0}'"), + Prefix_0_with_an_underscore: b(90025, 3, "Prefix_0_with_an_underscore_90025", "Prefix '{0}' with an underscore"), + Rewrite_as_the_indexed_access_type_0: b(90026, 3, "Rewrite_as_the_indexed_access_type_0_90026", "Rewrite as the indexed access type '{0}'"), + Declare_static_property_0: b(90027, 3, "Declare_static_property_0_90027", "Declare static property '{0}'"), + Call_decorator_expression: b(90028, 3, "Call_decorator_expression_90028", "Call decorator expression"), + Add_async_modifier_to_containing_function: b(90029, 3, "Add_async_modifier_to_containing_function_90029", "Add async modifier to containing function"), + Replace_infer_0_with_unknown: b(90030, 3, "Replace_infer_0_with_unknown_90030", "Replace 'infer {0}' with 'unknown'"), + Replace_all_unused_infer_with_unknown: b(90031, 3, "Replace_all_unused_infer_with_unknown_90031", "Replace all unused 'infer' with 'unknown'"), + Add_parameter_name: b(90034, 3, "Add_parameter_name_90034", "Add parameter name"), + Declare_private_property_0: b(90035, 3, "Declare_private_property_0_90035", "Declare private property '{0}'"), + Replace_0_with_Promise_1: b(90036, 3, "Replace_0_with_Promise_1_90036", "Replace '{0}' with 'Promise<{1}>'"), + Fix_all_incorrect_return_type_of_an_async_functions: b(90037, 3, "Fix_all_incorrect_return_type_of_an_async_functions_90037", "Fix all incorrect return type of an async functions"), + Declare_private_method_0: b(90038, 3, "Declare_private_method_0_90038", "Declare private method '{0}'"), + Remove_unused_destructuring_declaration: b(90039, 3, "Remove_unused_destructuring_declaration_90039", "Remove unused destructuring declaration"), + Remove_unused_declarations_for_Colon_0: b(90041, 3, "Remove_unused_declarations_for_Colon_0_90041", "Remove unused declarations for: '{0}'"), + Declare_a_private_field_named_0: b(90053, 3, "Declare_a_private_field_named_0_90053", "Declare a private field named '{0}'."), + Includes_imports_of_types_referenced_by_0: b(90054, 3, "Includes_imports_of_types_referenced_by_0_90054", "Includes imports of types referenced by '{0}'"), + Remove_type_from_import_declaration_from_0: b(90055, 3, "Remove_type_from_import_declaration_from_0_90055", `Remove 'type' from import declaration from "{0}"`), + Remove_type_from_import_of_0_from_1: b(90056, 3, "Remove_type_from_import_of_0_from_1_90056", `Remove 'type' from import of '{0}' from "{1}"`), + Add_import_from_0: b(90057, 3, "Add_import_from_0_90057", 'Add import from "{0}"'), + Update_import_from_0: b(90058, 3, "Update_import_from_0_90058", 'Update import from "{0}"'), + Export_0_from_module_1: b(90059, 3, "Export_0_from_module_1_90059", "Export '{0}' from module '{1}'"), + Export_all_referenced_locals: b(90060, 3, "Export_all_referenced_locals_90060", "Export all referenced locals"), + Update_modifiers_of_0: b(90061, 3, "Update_modifiers_of_0_90061", "Update modifiers of '{0}'"), + Add_annotation_of_type_0: b(90062, 3, "Add_annotation_of_type_0_90062", "Add annotation of type '{0}'"), + Add_return_type_0: b(90063, 3, "Add_return_type_0_90063", "Add return type '{0}'"), + Extract_base_class_to_variable: b(90064, 3, "Extract_base_class_to_variable_90064", "Extract base class to variable"), + Extract_default_export_to_variable: b(90065, 3, "Extract_default_export_to_variable_90065", "Extract default export to variable"), + Extract_binding_expressions_to_variable: b(90066, 3, "Extract_binding_expressions_to_variable_90066", "Extract binding expressions to variable"), + Add_all_missing_type_annotations: b(90067, 3, "Add_all_missing_type_annotations_90067", "Add all missing type annotations"), + Add_satisfies_and_an_inline_type_assertion_with_0: b(90068, 3, "Add_satisfies_and_an_inline_type_assertion_with_0_90068", "Add satisfies and an inline type assertion with '{0}'"), + Extract_to_variable_and_replace_with_0_as_typeof_0: b(90069, 3, "Extract_to_variable_and_replace_with_0_as_typeof_0_90069", "Extract to variable and replace with '{0} as typeof {0}'"), + Mark_array_literal_as_const: b(90070, 3, "Mark_array_literal_as_const_90070", "Mark array literal as const"), + Annotate_types_of_properties_expando_function_in_a_namespace: b(90071, 3, "Annotate_types_of_properties_expando_function_in_a_namespace_90071", "Annotate types of properties expando function in a namespace"), + Convert_function_to_an_ES2015_class: b(95001, 3, "Convert_function_to_an_ES2015_class_95001", "Convert function to an ES2015 class"), + Convert_0_to_1_in_0: b(95003, 3, "Convert_0_to_1_in_0_95003", "Convert '{0}' to '{1} in {0}'"), + Extract_to_0_in_1: b(95004, 3, "Extract_to_0_in_1_95004", "Extract to {0} in {1}"), + Extract_function: b(95005, 3, "Extract_function_95005", "Extract function"), + Extract_constant: b(95006, 3, "Extract_constant_95006", "Extract constant"), + Extract_to_0_in_enclosing_scope: b(95007, 3, "Extract_to_0_in_enclosing_scope_95007", "Extract to {0} in enclosing scope"), + Extract_to_0_in_1_scope: b(95008, 3, "Extract_to_0_in_1_scope_95008", "Extract to {0} in {1} scope"), + Annotate_with_type_from_JSDoc: b(95009, 3, "Annotate_with_type_from_JSDoc_95009", "Annotate with type from JSDoc"), + Infer_type_of_0_from_usage: b(95011, 3, "Infer_type_of_0_from_usage_95011", "Infer type of '{0}' from usage"), + Infer_parameter_types_from_usage: b(95012, 3, "Infer_parameter_types_from_usage_95012", "Infer parameter types from usage"), + Convert_to_default_import: b(95013, 3, "Convert_to_default_import_95013", "Convert to default import"), + Install_0: b(95014, 3, "Install_0_95014", "Install '{0}'"), + Replace_import_with_0: b(95015, 3, "Replace_import_with_0_95015", "Replace import with '{0}'."), + Use_synthetic_default_member: b(95016, 3, "Use_synthetic_default_member_95016", "Use synthetic 'default' member."), + Convert_to_ES_module: b(95017, 3, "Convert_to_ES_module_95017", "Convert to ES module"), + Add_undefined_type_to_property_0: b(95018, 3, "Add_undefined_type_to_property_0_95018", "Add 'undefined' type to property '{0}'"), + Add_initializer_to_property_0: b(95019, 3, "Add_initializer_to_property_0_95019", "Add initializer to property '{0}'"), + Add_definite_assignment_assertion_to_property_0: b(95020, 3, "Add_definite_assignment_assertion_to_property_0_95020", "Add definite assignment assertion to property '{0}'"), + Convert_all_type_literals_to_mapped_type: b(95021, 3, "Convert_all_type_literals_to_mapped_type_95021", "Convert all type literals to mapped type"), + Add_all_missing_members: b(95022, 3, "Add_all_missing_members_95022", "Add all missing members"), + Infer_all_types_from_usage: b(95023, 3, "Infer_all_types_from_usage_95023", "Infer all types from usage"), + Delete_all_unused_declarations: b(95024, 3, "Delete_all_unused_declarations_95024", "Delete all unused declarations"), + Prefix_all_unused_declarations_with_where_possible: b(95025, 3, "Prefix_all_unused_declarations_with_where_possible_95025", "Prefix all unused declarations with '_' where possible"), + Fix_all_detected_spelling_errors: b(95026, 3, "Fix_all_detected_spelling_errors_95026", "Fix all detected spelling errors"), + Add_initializers_to_all_uninitialized_properties: b(95027, 3, "Add_initializers_to_all_uninitialized_properties_95027", "Add initializers to all uninitialized properties"), + Add_definite_assignment_assertions_to_all_uninitialized_properties: b(95028, 3, "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028", "Add definite assignment assertions to all uninitialized properties"), + Add_undefined_type_to_all_uninitialized_properties: b(95029, 3, "Add_undefined_type_to_all_uninitialized_properties_95029", "Add undefined type to all uninitialized properties"), + Change_all_jsdoc_style_types_to_TypeScript: b(95030, 3, "Change_all_jsdoc_style_types_to_TypeScript_95030", "Change all jsdoc-style types to TypeScript"), + Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types: b(95031, 3, "Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types_95031", "Change all jsdoc-style types to TypeScript (and add '| undefined' to nullable types)"), + Implement_all_unimplemented_interfaces: b(95032, 3, "Implement_all_unimplemented_interfaces_95032", "Implement all unimplemented interfaces"), + Install_all_missing_types_packages: b(95033, 3, "Install_all_missing_types_packages_95033", "Install all missing types packages"), + Rewrite_all_as_indexed_access_types: b(95034, 3, "Rewrite_all_as_indexed_access_types_95034", "Rewrite all as indexed access types"), + Convert_all_to_default_imports: b(95035, 3, "Convert_all_to_default_imports_95035", "Convert all to default imports"), + Make_all_super_calls_the_first_statement_in_their_constructor: b(95036, 3, "Make_all_super_calls_the_first_statement_in_their_constructor_95036", "Make all 'super()' calls the first statement in their constructor"), + Add_qualifier_to_all_unresolved_variables_matching_a_member_name: b(95037, 3, "Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037", "Add qualifier to all unresolved variables matching a member name"), + Change_all_extended_interfaces_to_implements: b(95038, 3, "Change_all_extended_interfaces_to_implements_95038", "Change all extended interfaces to 'implements'"), + Add_all_missing_super_calls: b(95039, 3, "Add_all_missing_super_calls_95039", "Add all missing super calls"), + Implement_all_inherited_abstract_classes: b(95040, 3, "Implement_all_inherited_abstract_classes_95040", "Implement all inherited abstract classes"), + Add_all_missing_async_modifiers: b(95041, 3, "Add_all_missing_async_modifiers_95041", "Add all missing 'async' modifiers"), + Add_ts_ignore_to_all_error_messages: b(95042, 3, "Add_ts_ignore_to_all_error_messages_95042", "Add '@ts-ignore' to all error messages"), + Annotate_everything_with_types_from_JSDoc: b(95043, 3, "Annotate_everything_with_types_from_JSDoc_95043", "Annotate everything with types from JSDoc"), + Add_to_all_uncalled_decorators: b(95044, 3, "Add_to_all_uncalled_decorators_95044", "Add '()' to all uncalled decorators"), + Convert_all_constructor_functions_to_classes: b(95045, 3, "Convert_all_constructor_functions_to_classes_95045", "Convert all constructor functions to classes"), + Generate_get_and_set_accessors: b(95046, 3, "Generate_get_and_set_accessors_95046", "Generate 'get' and 'set' accessors"), + Convert_require_to_import: b(95047, 3, "Convert_require_to_import_95047", "Convert 'require' to 'import'"), + Convert_all_require_to_import: b(95048, 3, "Convert_all_require_to_import_95048", "Convert all 'require' to 'import'"), + Move_to_a_new_file: b(95049, 3, "Move_to_a_new_file_95049", "Move to a new file"), + Remove_unreachable_code: b(95050, 3, "Remove_unreachable_code_95050", "Remove unreachable code"), + Remove_all_unreachable_code: b(95051, 3, "Remove_all_unreachable_code_95051", "Remove all unreachable code"), + Add_missing_typeof: b(95052, 3, "Add_missing_typeof_95052", "Add missing 'typeof'"), + Remove_unused_label: b(95053, 3, "Remove_unused_label_95053", "Remove unused label"), + Remove_all_unused_labels: b(95054, 3, "Remove_all_unused_labels_95054", "Remove all unused labels"), + Convert_0_to_mapped_object_type: b(95055, 3, "Convert_0_to_mapped_object_type_95055", "Convert '{0}' to mapped object type"), + Convert_namespace_import_to_named_imports: b(95056, 3, "Convert_namespace_import_to_named_imports_95056", "Convert namespace import to named imports"), + Convert_named_imports_to_namespace_import: b(95057, 3, "Convert_named_imports_to_namespace_import_95057", "Convert named imports to namespace import"), + Add_or_remove_braces_in_an_arrow_function: b(95058, 3, "Add_or_remove_braces_in_an_arrow_function_95058", "Add or remove braces in an arrow function"), + Add_braces_to_arrow_function: b(95059, 3, "Add_braces_to_arrow_function_95059", "Add braces to arrow function"), + Remove_braces_from_arrow_function: b(95060, 3, "Remove_braces_from_arrow_function_95060", "Remove braces from arrow function"), + Convert_default_export_to_named_export: b(95061, 3, "Convert_default_export_to_named_export_95061", "Convert default export to named export"), + Convert_named_export_to_default_export: b(95062, 3, "Convert_named_export_to_default_export_95062", "Convert named export to default export"), + Add_missing_enum_member_0: b(95063, 3, "Add_missing_enum_member_0_95063", "Add missing enum member '{0}'"), + Add_all_missing_imports: b(95064, 3, "Add_all_missing_imports_95064", "Add all missing imports"), + Convert_to_async_function: b(95065, 3, "Convert_to_async_function_95065", "Convert to async function"), + Convert_all_to_async_functions: b(95066, 3, "Convert_all_to_async_functions_95066", "Convert all to async functions"), + Add_missing_call_parentheses: b(95067, 3, "Add_missing_call_parentheses_95067", "Add missing call parentheses"), + Add_all_missing_call_parentheses: b(95068, 3, "Add_all_missing_call_parentheses_95068", "Add all missing call parentheses"), + Add_unknown_conversion_for_non_overlapping_types: b(95069, 3, "Add_unknown_conversion_for_non_overlapping_types_95069", "Add 'unknown' conversion for non-overlapping types"), + Add_unknown_to_all_conversions_of_non_overlapping_types: b(95070, 3, "Add_unknown_to_all_conversions_of_non_overlapping_types_95070", "Add 'unknown' to all conversions of non-overlapping types"), + Add_missing_new_operator_to_call: b(95071, 3, "Add_missing_new_operator_to_call_95071", "Add missing 'new' operator to call"), + Add_missing_new_operator_to_all_calls: b(95072, 3, "Add_missing_new_operator_to_all_calls_95072", "Add missing 'new' operator to all calls"), + Add_names_to_all_parameters_without_names: b(95073, 3, "Add_names_to_all_parameters_without_names_95073", "Add names to all parameters without names"), + Enable_the_experimentalDecorators_option_in_your_configuration_file: b(95074, 3, "Enable_the_experimentalDecorators_option_in_your_configuration_file_95074", "Enable the 'experimentalDecorators' option in your configuration file"), + Convert_parameters_to_destructured_object: b(95075, 3, "Convert_parameters_to_destructured_object_95075", "Convert parameters to destructured object"), + Extract_type: b(95077, 3, "Extract_type_95077", "Extract type"), + Extract_to_type_alias: b(95078, 3, "Extract_to_type_alias_95078", "Extract to type alias"), + Extract_to_typedef: b(95079, 3, "Extract_to_typedef_95079", "Extract to typedef"), + Infer_this_type_of_0_from_usage: b(95080, 3, "Infer_this_type_of_0_from_usage_95080", "Infer 'this' type of '{0}' from usage"), + Add_const_to_unresolved_variable: b(95081, 3, "Add_const_to_unresolved_variable_95081", "Add 'const' to unresolved variable"), + Add_const_to_all_unresolved_variables: b(95082, 3, "Add_const_to_all_unresolved_variables_95082", "Add 'const' to all unresolved variables"), + Add_await: b(95083, 3, "Add_await_95083", "Add 'await'"), + Add_await_to_initializer_for_0: b(95084, 3, "Add_await_to_initializer_for_0_95084", "Add 'await' to initializer for '{0}'"), + Fix_all_expressions_possibly_missing_await: b(95085, 3, "Fix_all_expressions_possibly_missing_await_95085", "Fix all expressions possibly missing 'await'"), + Remove_unnecessary_await: b(95086, 3, "Remove_unnecessary_await_95086", "Remove unnecessary 'await'"), + Remove_all_unnecessary_uses_of_await: b(95087, 3, "Remove_all_unnecessary_uses_of_await_95087", "Remove all unnecessary uses of 'await'"), + Enable_the_jsx_flag_in_your_configuration_file: b(95088, 3, "Enable_the_jsx_flag_in_your_configuration_file_95088", "Enable the '--jsx' flag in your configuration file"), + Add_await_to_initializers: b(95089, 3, "Add_await_to_initializers_95089", "Add 'await' to initializers"), + Extract_to_interface: b(95090, 3, "Extract_to_interface_95090", "Extract to interface"), + Convert_to_a_bigint_numeric_literal: b(95091, 3, "Convert_to_a_bigint_numeric_literal_95091", "Convert to a bigint numeric literal"), + Convert_all_to_bigint_numeric_literals: b(95092, 3, "Convert_all_to_bigint_numeric_literals_95092", "Convert all to bigint numeric literals"), + Convert_const_to_let: b(95093, 3, "Convert_const_to_let_95093", "Convert 'const' to 'let'"), + Prefix_with_declare: b(95094, 3, "Prefix_with_declare_95094", "Prefix with 'declare'"), + Prefix_all_incorrect_property_declarations_with_declare: b(95095, 3, "Prefix_all_incorrect_property_declarations_with_declare_95095", "Prefix all incorrect property declarations with 'declare'"), + Convert_to_template_string: b(95096, 3, "Convert_to_template_string_95096", "Convert to template string"), + Add_export_to_make_this_file_into_a_module: b(95097, 3, "Add_export_to_make_this_file_into_a_module_95097", "Add 'export {}' to make this file into a module"), + Set_the_target_option_in_your_configuration_file_to_0: b(95098, 3, "Set_the_target_option_in_your_configuration_file_to_0_95098", "Set the 'target' option in your configuration file to '{0}'"), + Set_the_module_option_in_your_configuration_file_to_0: b(95099, 3, "Set_the_module_option_in_your_configuration_file_to_0_95099", "Set the 'module' option in your configuration file to '{0}'"), + Convert_invalid_character_to_its_html_entity_code: b(95100, 3, "Convert_invalid_character_to_its_html_entity_code_95100", "Convert invalid character to its html entity code"), + Convert_all_invalid_characters_to_HTML_entity_code: b(95101, 3, "Convert_all_invalid_characters_to_HTML_entity_code_95101", "Convert all invalid characters to HTML entity code"), + Convert_all_const_to_let: b(95102, 3, "Convert_all_const_to_let_95102", "Convert all 'const' to 'let'"), + Convert_function_expression_0_to_arrow_function: b(95105, 3, "Convert_function_expression_0_to_arrow_function_95105", "Convert function expression '{0}' to arrow function"), + Convert_function_declaration_0_to_arrow_function: b(95106, 3, "Convert_function_declaration_0_to_arrow_function_95106", "Convert function declaration '{0}' to arrow function"), + Fix_all_implicit_this_errors: b(95107, 3, "Fix_all_implicit_this_errors_95107", "Fix all implicit-'this' errors"), + Wrap_invalid_character_in_an_expression_container: b(95108, 3, "Wrap_invalid_character_in_an_expression_container_95108", "Wrap invalid character in an expression container"), + Wrap_all_invalid_characters_in_an_expression_container: b(95109, 3, "Wrap_all_invalid_characters_in_an_expression_container_95109", "Wrap all invalid characters in an expression container"), + Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file: b(95110, 3, "Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file_95110", "Visit https://aka.ms/tsconfig to read more about this file"), + Add_a_return_statement: b(95111, 3, "Add_a_return_statement_95111", "Add a return statement"), + Remove_braces_from_arrow_function_body: b(95112, 3, "Remove_braces_from_arrow_function_body_95112", "Remove braces from arrow function body"), + Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal: b(95113, 3, "Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113", "Wrap the following body with parentheses which should be an object literal"), + Add_all_missing_return_statement: b(95114, 3, "Add_all_missing_return_statement_95114", "Add all missing return statement"), + Remove_braces_from_all_arrow_function_bodies_with_relevant_issues: b(95115, 3, "Remove_braces_from_all_arrow_function_bodies_with_relevant_issues_95115", "Remove braces from all arrow function bodies with relevant issues"), + Wrap_all_object_literal_with_parentheses: b(95116, 3, "Wrap_all_object_literal_with_parentheses_95116", "Wrap all object literal with parentheses"), + Move_labeled_tuple_element_modifiers_to_labels: b(95117, 3, "Move_labeled_tuple_element_modifiers_to_labels_95117", "Move labeled tuple element modifiers to labels"), + Convert_overload_list_to_single_signature: b(95118, 3, "Convert_overload_list_to_single_signature_95118", "Convert overload list to single signature"), + Generate_get_and_set_accessors_for_all_overriding_properties: b(95119, 3, "Generate_get_and_set_accessors_for_all_overriding_properties_95119", "Generate 'get' and 'set' accessors for all overriding properties"), + Wrap_in_JSX_fragment: b(95120, 3, "Wrap_in_JSX_fragment_95120", "Wrap in JSX fragment"), + Wrap_all_unparented_JSX_in_JSX_fragment: b(95121, 3, "Wrap_all_unparented_JSX_in_JSX_fragment_95121", "Wrap all unparented JSX in JSX fragment"), + Convert_arrow_function_or_function_expression: b(95122, 3, "Convert_arrow_function_or_function_expression_95122", "Convert arrow function or function expression"), + Convert_to_anonymous_function: b(95123, 3, "Convert_to_anonymous_function_95123", "Convert to anonymous function"), + Convert_to_named_function: b(95124, 3, "Convert_to_named_function_95124", "Convert to named function"), + Convert_to_arrow_function: b(95125, 3, "Convert_to_arrow_function_95125", "Convert to arrow function"), + Remove_parentheses: b(95126, 3, "Remove_parentheses_95126", "Remove parentheses"), + Could_not_find_a_containing_arrow_function: b(95127, 3, "Could_not_find_a_containing_arrow_function_95127", "Could not find a containing arrow function"), + Containing_function_is_not_an_arrow_function: b(95128, 3, "Containing_function_is_not_an_arrow_function_95128", "Containing function is not an arrow function"), + Could_not_find_export_statement: b(95129, 3, "Could_not_find_export_statement_95129", "Could not find export statement"), + This_file_already_has_a_default_export: b(95130, 3, "This_file_already_has_a_default_export_95130", "This file already has a default export"), + Could_not_find_import_clause: b(95131, 3, "Could_not_find_import_clause_95131", "Could not find import clause"), + Could_not_find_namespace_import_or_named_imports: b(95132, 3, "Could_not_find_namespace_import_or_named_imports_95132", "Could not find namespace import or named imports"), + Selection_is_not_a_valid_type_node: b(95133, 3, "Selection_is_not_a_valid_type_node_95133", "Selection is not a valid type node"), + No_type_could_be_extracted_from_this_type_node: b(95134, 3, "No_type_could_be_extracted_from_this_type_node_95134", "No type could be extracted from this type node"), + Could_not_find_property_for_which_to_generate_accessor: b(95135, 3, "Could_not_find_property_for_which_to_generate_accessor_95135", "Could not find property for which to generate accessor"), + Name_is_not_valid: b(95136, 3, "Name_is_not_valid_95136", "Name is not valid"), + Can_only_convert_property_with_modifier: b(95137, 3, "Can_only_convert_property_with_modifier_95137", "Can only convert property with modifier"), + Switch_each_misused_0_to_1: b(95138, 3, "Switch_each_misused_0_to_1_95138", "Switch each misused '{0}' to '{1}'"), + Convert_to_optional_chain_expression: b(95139, 3, "Convert_to_optional_chain_expression_95139", "Convert to optional chain expression"), + Could_not_find_convertible_access_expression: b(95140, 3, "Could_not_find_convertible_access_expression_95140", "Could not find convertible access expression"), + Could_not_find_matching_access_expressions: b(95141, 3, "Could_not_find_matching_access_expressions_95141", "Could not find matching access expressions"), + Can_only_convert_logical_AND_access_chains: b(95142, 3, "Can_only_convert_logical_AND_access_chains_95142", "Can only convert logical AND access chains"), + Add_void_to_Promise_resolved_without_a_value: b(95143, 3, "Add_void_to_Promise_resolved_without_a_value_95143", "Add 'void' to Promise resolved without a value"), + Add_void_to_all_Promises_resolved_without_a_value: b(95144, 3, "Add_void_to_all_Promises_resolved_without_a_value_95144", "Add 'void' to all Promises resolved without a value"), + Use_element_access_for_0: b(95145, 3, "Use_element_access_for_0_95145", "Use element access for '{0}'"), + Use_element_access_for_all_undeclared_properties: b(95146, 3, "Use_element_access_for_all_undeclared_properties_95146", "Use element access for all undeclared properties."), + Delete_all_unused_imports: b(95147, 3, "Delete_all_unused_imports_95147", "Delete all unused imports"), + Infer_function_return_type: b(95148, 3, "Infer_function_return_type_95148", "Infer function return type"), + Return_type_must_be_inferred_from_a_function: b(95149, 3, "Return_type_must_be_inferred_from_a_function_95149", "Return type must be inferred from a function"), + Could_not_determine_function_return_type: b(95150, 3, "Could_not_determine_function_return_type_95150", "Could not determine function return type"), + Could_not_convert_to_arrow_function: b(95151, 3, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"), + Could_not_convert_to_named_function: b(95152, 3, "Could_not_convert_to_named_function_95152", "Could not convert to named function"), + Could_not_convert_to_anonymous_function: b(95153, 3, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"), + Can_only_convert_string_concatenations_and_string_literals: b(95154, 3, "Can_only_convert_string_concatenations_and_string_literals_95154", "Can only convert string concatenations and string literals"), + Selection_is_not_a_valid_statement_or_statements: b(95155, 3, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"), + Add_missing_function_declaration_0: b(95156, 3, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"), + Add_all_missing_function_declarations: b(95157, 3, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"), + Method_not_implemented: b(95158, 3, "Method_not_implemented_95158", "Method not implemented."), + Function_not_implemented: b(95159, 3, "Function_not_implemented_95159", "Function not implemented."), + Add_override_modifier: b(95160, 3, "Add_override_modifier_95160", "Add 'override' modifier"), + Remove_override_modifier: b(95161, 3, "Remove_override_modifier_95161", "Remove 'override' modifier"), + Add_all_missing_override_modifiers: b(95162, 3, "Add_all_missing_override_modifiers_95162", "Add all missing 'override' modifiers"), + Remove_all_unnecessary_override_modifiers: b(95163, 3, "Remove_all_unnecessary_override_modifiers_95163", "Remove all unnecessary 'override' modifiers"), + Can_only_convert_named_export: b(95164, 3, "Can_only_convert_named_export_95164", "Can only convert named export"), + Add_missing_properties: b(95165, 3, "Add_missing_properties_95165", "Add missing properties"), + Add_all_missing_properties: b(95166, 3, "Add_all_missing_properties_95166", "Add all missing properties"), + Add_missing_attributes: b(95167, 3, "Add_missing_attributes_95167", "Add missing attributes"), + Add_all_missing_attributes: b(95168, 3, "Add_all_missing_attributes_95168", "Add all missing attributes"), + Add_undefined_to_optional_property_type: b(95169, 3, "Add_undefined_to_optional_property_type_95169", "Add 'undefined' to optional property type"), + Convert_named_imports_to_default_import: b(95170, 3, "Convert_named_imports_to_default_import_95170", "Convert named imports to default import"), + Delete_unused_param_tag_0: b(95171, 3, "Delete_unused_param_tag_0_95171", "Delete unused '@param' tag '{0}'"), + Delete_all_unused_param_tags: b(95172, 3, "Delete_all_unused_param_tags_95172", "Delete all unused '@param' tags"), + Rename_param_tag_name_0_to_1: b(95173, 3, "Rename_param_tag_name_0_to_1_95173", "Rename '@param' tag name '{0}' to '{1}'"), + Use_0: b(95174, 3, "Use_0_95174", "Use `{0}`."), + Use_Number_isNaN_in_all_conditions: b(95175, 3, "Use_Number_isNaN_in_all_conditions_95175", "Use `Number.isNaN` in all conditions."), + Convert_typedef_to_TypeScript_type: b(95176, 3, "Convert_typedef_to_TypeScript_type_95176", "Convert typedef to TypeScript type."), + Convert_all_typedef_to_TypeScript_types: b(95177, 3, "Convert_all_typedef_to_TypeScript_types_95177", "Convert all typedef to TypeScript types."), + Move_to_file: b(95178, 3, "Move_to_file_95178", "Move to file"), + Cannot_move_to_file_selected_file_is_invalid: b(95179, 3, "Cannot_move_to_file_selected_file_is_invalid_95179", "Cannot move to file, selected file is invalid"), + Use_import_type: b(95180, 3, "Use_import_type_95180", "Use 'import type'"), + Use_type_0: b(95181, 3, "Use_type_0_95181", "Use 'type {0}'"), + Fix_all_with_type_only_imports: b(95182, 3, "Fix_all_with_type_only_imports_95182", "Fix all with type-only imports"), + Cannot_move_statements_to_the_selected_file: b(95183, 3, "Cannot_move_statements_to_the_selected_file_95183", "Cannot move statements to the selected file"), + Inline_variable: b(95184, 3, "Inline_variable_95184", "Inline variable"), + Could_not_find_variable_to_inline: b(95185, 3, "Could_not_find_variable_to_inline_95185", "Could not find variable to inline."), + Variables_with_multiple_declarations_cannot_be_inlined: b(95186, 3, "Variables_with_multiple_declarations_cannot_be_inlined_95186", "Variables with multiple declarations cannot be inlined."), + Add_missing_comma_for_object_member_completion_0: b(95187, 3, "Add_missing_comma_for_object_member_completion_0_95187", "Add missing comma for object member completion '{0}'."), + Add_missing_parameter_to_0: b(95188, 3, "Add_missing_parameter_to_0_95188", "Add missing parameter to '{0}'"), + Add_missing_parameters_to_0: b(95189, 3, "Add_missing_parameters_to_0_95189", "Add missing parameters to '{0}'"), + Add_all_missing_parameters: b(95190, 3, "Add_all_missing_parameters_95190", "Add all missing parameters"), + Add_optional_parameter_to_0: b(95191, 3, "Add_optional_parameter_to_0_95191", "Add optional parameter to '{0}'"), + Add_optional_parameters_to_0: b(95192, 3, "Add_optional_parameters_to_0_95192", "Add optional parameters to '{0}'"), + Add_all_optional_parameters: b(95193, 3, "Add_all_optional_parameters_95193", "Add all optional parameters"), + Wrap_in_parentheses: b(95194, 3, "Wrap_in_parentheses_95194", "Wrap in parentheses"), + Wrap_all_invalid_decorator_expressions_in_parentheses: b(95195, 3, "Wrap_all_invalid_decorator_expressions_in_parentheses_95195", "Wrap all invalid decorator expressions in parentheses"), + Add_resolution_mode_import_attribute: b(95196, 3, "Add_resolution_mode_import_attribute_95196", "Add 'resolution-mode' import attribute"), + Add_resolution_mode_import_attribute_to_all_type_only_imports_that_need_it: b(95197, 3, "Add_resolution_mode_import_attribute_to_all_type_only_imports_that_need_it_95197", "Add 'resolution-mode' import attribute to all type-only imports that need it"), + No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: b(18004, 1, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."), + Classes_may_not_have_a_field_named_constructor: b(18006, 1, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."), + JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: b(18007, 1, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"), + Private_identifiers_cannot_be_used_as_parameters: b(18009, 1, "Private_identifiers_cannot_be_used_as_parameters_18009", "Private identifiers cannot be used as parameters."), + An_accessibility_modifier_cannot_be_used_with_a_private_identifier: b(18010, 1, "An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010", "An accessibility modifier cannot be used with a private identifier."), + The_operand_of_a_delete_operator_cannot_be_a_private_identifier: b(18011, 1, "The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011", "The operand of a 'delete' operator cannot be a private identifier."), + constructor_is_a_reserved_word: b(18012, 1, "constructor_is_a_reserved_word_18012", "'#constructor' is a reserved word."), + Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier: b(18013, 1, "Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013", "Property '{0}' is not accessible outside class '{1}' because it has a private identifier."), + The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling: b(18014, 1, "The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014", "The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling."), + Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2: b(18015, 1, "Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015", "Property '{0}' in type '{1}' refers to a different member that cannot be accessed from within type '{2}'."), + Private_identifiers_are_not_allowed_outside_class_bodies: b(18016, 1, "Private_identifiers_are_not_allowed_outside_class_bodies_18016", "Private identifiers are not allowed outside class bodies."), + The_shadowing_declaration_of_0_is_defined_here: b(18017, 1, "The_shadowing_declaration_of_0_is_defined_here_18017", "The shadowing declaration of '{0}' is defined here"), + The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here: b(18018, 1, "The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018", "The declaration of '{0}' that you probably intended to use is defined here"), + _0_modifier_cannot_be_used_with_a_private_identifier: b(18019, 1, "_0_modifier_cannot_be_used_with_a_private_identifier_18019", "'{0}' modifier cannot be used with a private identifier."), + An_enum_member_cannot_be_named_with_a_private_identifier: b(18024, 1, "An_enum_member_cannot_be_named_with_a_private_identifier_18024", "An enum member cannot be named with a private identifier."), + can_only_be_used_at_the_start_of_a_file: b(18026, 1, "can_only_be_used_at_the_start_of_a_file_18026", "'#!' can only be used at the start of a file."), + Compiler_reserves_name_0_when_emitting_private_identifier_downlevel: b(18027, 1, "Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027", "Compiler reserves name '{0}' when emitting private identifier downlevel."), + Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher: b(18028, 1, "Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028", "Private identifiers are only available when targeting ECMAScript 2015 and higher."), + Private_identifiers_are_not_allowed_in_variable_declarations: b(18029, 1, "Private_identifiers_are_not_allowed_in_variable_declarations_18029", "Private identifiers are not allowed in variable declarations."), + An_optional_chain_cannot_contain_private_identifiers: b(18030, 1, "An_optional_chain_cannot_contain_private_identifiers_18030", "An optional chain cannot contain private identifiers."), + The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents: b(18031, 1, "The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031", "The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents."), + The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some: b(18032, 1, "The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032", "The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some."), + Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values: b(18033, 1, "Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values_18033", "Type '{0}' is not assignable to type '{1}' as required for computed enum member values."), + Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment: b(18034, 3, "Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compi_18034", "Specify the JSX fragment factory function to use when targeting 'react' JSX emit with 'jsxFactory' compiler option is specified, e.g. 'Fragment'."), + Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name: b(18035, 1, "Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name_18035", "Invalid value for 'jsxFragmentFactory'. '{0}' is not a valid identifier or qualified-name."), + Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator: b(18036, 1, "Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036", "Class decorators can't be used with static private identifier. Consider removing the experimental decorator."), + await_expression_cannot_be_used_inside_a_class_static_block: b(18037, 1, "await_expression_cannot_be_used_inside_a_class_static_block_18037", "'await' expression cannot be used inside a class static block."), + for_await_loops_cannot_be_used_inside_a_class_static_block: b(18038, 1, "for_await_loops_cannot_be_used_inside_a_class_static_block_18038", "'for await' loops cannot be used inside a class static block."), + Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block: b(18039, 1, "Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039", "Invalid use of '{0}'. It cannot be used inside a class static block."), + A_return_statement_cannot_be_used_inside_a_class_static_block: b(18041, 1, "A_return_statement_cannot_be_used_inside_a_class_static_block_18041", "A 'return' statement cannot be used inside a class static block."), + _0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation: b(18042, 1, "_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation_18042", "'{0}' is a type and cannot be imported in JavaScript files. Use '{1}' in a JSDoc type annotation."), + Types_cannot_appear_in_export_declarations_in_JavaScript_files: b(18043, 1, "Types_cannot_appear_in_export_declarations_in_JavaScript_files_18043", "Types cannot appear in export declarations in JavaScript files."), + _0_is_automatically_exported_here: b(18044, 3, "_0_is_automatically_exported_here_18044", "'{0}' is automatically exported here."), + Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher: b(18045, 1, "Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045", "Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher."), + _0_is_of_type_unknown: b(18046, 1, "_0_is_of_type_unknown_18046", "'{0}' is of type 'unknown'."), + _0_is_possibly_null: b(18047, 1, "_0_is_possibly_null_18047", "'{0}' is possibly 'null'."), + _0_is_possibly_undefined: b(18048, 1, "_0_is_possibly_undefined_18048", "'{0}' is possibly 'undefined'."), + _0_is_possibly_null_or_undefined: b(18049, 1, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."), + The_value_0_cannot_be_used_here: b(18050, 1, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."), + Compiler_option_0_cannot_be_given_an_empty_string: b(18051, 1, "Compiler_option_0_cannot_be_given_an_empty_string_18051", "Compiler option '{0}' cannot be given an empty string."), + Its_type_0_is_not_a_valid_JSX_element_type: b(18053, 1, "Its_type_0_is_not_a_valid_JSX_element_type_18053", "Its type '{0}' is not a valid JSX element type."), + await_using_statements_cannot_be_used_inside_a_class_static_block: b(18054, 1, "await_using_statements_cannot_be_used_inside_a_class_static_block_18054", "'await using' statements cannot be used inside a class static block."), + _0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is_enabled: b(18055, 1, "_0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is__18055", "'{0}' has a string type, but must have syntactically recognizable string syntax when 'isolatedModules' is enabled."), + Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is_enabled: b(18056, 1, "Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is__18056", "Enum member following a non-literal numeric member must have an initializer when 'isolatedModules' is enabled."), + String_literal_import_and_export_names_are_not_supported_when_the_module_flag_is_set_to_es2015_or_es2020: b(18057, 1, "String_literal_import_and_export_names_are_not_supported_when_the_module_flag_is_set_to_es2015_or_es_18057", "String literal import and export names are not supported when the '--module' flag is set to 'es2015' or 'es2020'.") + }; + function c_(e) { + return e >= 80; + } + function SY(e) { + return e === 32 || c_(e); + } + var QI = { + abstract: 128, + accessor: 129, + any: 133, + as: 130, + asserts: 131, + assert: 132, + bigint: 163, + boolean: 136, + break: 83, + case: 84, + catch: 85, + class: 86, + continue: 88, + const: 87, + constructor: 137, + debugger: 89, + declare: 138, + default: 90, + delete: 91, + do: 92, + else: 93, + enum: 94, + export: 95, + extends: 96, + false: 97, + finally: 98, + for: 99, + from: 161, + function: 100, + get: 139, + if: 101, + implements: 119, + import: 102, + in: 103, + infer: 140, + instanceof: 104, + interface: 120, + intrinsic: 141, + is: 142, + keyof: 143, + let: 121, + module: 144, + namespace: 145, + never: 146, + new: 105, + null: 106, + number: 150, + object: 151, + package: 122, + private: 123, + protected: 124, + public: 125, + override: 164, + out: 147, + readonly: 148, + require: 149, + global: 162, + return: 107, + satisfies: 152, + set: 153, + static: 126, + string: 154, + super: 108, + switch: 109, + symbol: 155, + this: 110, + throw: 111, + true: 112, + try: 113, + type: 156, + typeof: 114, + undefined: 157, + unique: 158, + unknown: 159, + using: 160, + var: 115, + void: 116, + while: 117, + with: 118, + yield: 127, + async: 134, + await: 135, + of: 165 + /* OfKeyword */ + }, oFe = new Map(Object.entries(QI)), Cge = new Map(Object.entries({ + ...QI, + "{": 19, + "}": 20, + "(": 21, + ")": 22, + "[": 23, + "]": 24, + ".": 25, + "...": 26, + ";": 27, + ",": 28, + "<": 30, + ">": 32, + "<=": 33, + ">=": 34, + "==": 35, + "!=": 36, + "===": 37, + "!==": 38, + "=>": 39, + "+": 40, + "-": 41, + "**": 43, + "*": 42, + "/": 44, + "%": 45, + "++": 46, + "--": 47, + "<<": 48, + ">": 49, + ">>>": 50, + "&": 51, + "|": 52, + "^": 53, + "!": 54, + "~": 55, + "&&": 56, + "||": 57, + "?": 58, + "??": 61, + "?.": 29, + ":": 59, + "=": 64, + "+=": 65, + "-=": 66, + "*=": 67, + "**=": 68, + "/=": 69, + "%=": 70, + "<<=": 71, + ">>=": 72, + ">>>=": 73, + "&=": 74, + "|=": 75, + "^=": 79, + "||=": 76, + "&&=": 77, + "??=": 78, + "@": 60, + "#": 63, + "`": 62 + /* BacktickToken */ + })), Ege = /* @__PURE__ */ new Map([ + [ + 100, + 1 + /* HasIndices */ + ], + [ + 103, + 2 + /* Global */ + ], + [ + 105, + 4 + /* IgnoreCase */ + ], + [ + 109, + 8 + /* Multiline */ + ], + [ + 115, + 16 + /* DotAll */ + ], + [ + 117, + 32 + /* Unicode */ + ], + [ + 118, + 64 + /* UnicodeSets */ + ], + [ + 121, + 128 + /* Sticky */ + ] + ]), cFe = /* @__PURE__ */ new Map([ + [1, yl.RegularExpressionFlagsHasIndices], + [16, yl.RegularExpressionFlagsDotAll], + [32, yl.RegularExpressionFlagsUnicode], + [64, yl.RegularExpressionFlagsUnicodeSets], + [128, yl.RegularExpressionFlagsSticky] + ]), lFe = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2208, 2208, 2210, 2220, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6e3, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516, 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409, 7413, 7414, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43e3, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500], uFe = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1520, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2048, 2093, 2112, 2139, 2208, 2208, 2210, 2220, 2276, 2302, 2304, 2403, 2406, 2415, 2417, 2423, 2425, 2431, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3161, 3168, 3171, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3396, 3398, 3400, 3402, 3406, 3415, 3415, 3424, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6e3, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6263, 6272, 6314, 6320, 6389, 6400, 6428, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6617, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7376, 7378, 7380, 7414, 7424, 7654, 7676, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 11823, 11823, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12442, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42647, 42655, 42737, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43e3, 43047, 43072, 43123, 43136, 43204, 43216, 43225, 43232, 43255, 43259, 43259, 43264, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43643, 43648, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65062, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500], _Fe = [65, 90, 97, 122, 170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 895, 895, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1488, 1514, 1519, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2144, 2154, 2160, 2183, 2185, 2190, 2208, 2249, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2432, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2556, 2556, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2809, 2809, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3133, 3133, 3160, 3162, 3165, 3165, 3168, 3169, 3200, 3200, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3293, 3294, 3296, 3297, 3313, 3314, 3332, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3412, 3414, 3423, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5905, 5919, 5937, 5952, 5969, 5984, 5996, 5998, 6e3, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6264, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6430, 6480, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6988, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7401, 7404, 7406, 7411, 7413, 7414, 7418, 7418, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8472, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12443, 12447, 12449, 12538, 12540, 12543, 12549, 12591, 12593, 12686, 12704, 12735, 12784, 12799, 13312, 19903, 19968, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42653, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42954, 42960, 42961, 42963, 42963, 42965, 42969, 42994, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43261, 43262, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43488, 43492, 43494, 43503, 43514, 43518, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43646, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43881, 43888, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66176, 66204, 66208, 66256, 66304, 66335, 66349, 66378, 66384, 66421, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 66928, 66938, 66940, 66954, 66956, 66962, 66964, 66965, 66967, 66977, 66979, 66993, 66995, 67001, 67003, 67004, 67072, 67382, 67392, 67413, 67424, 67431, 67456, 67461, 67463, 67504, 67506, 67514, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68096, 68112, 68115, 68117, 68119, 68121, 68149, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68324, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 68864, 68899, 69248, 69289, 69296, 69297, 69376, 69404, 69415, 69415, 69424, 69445, 69488, 69505, 69552, 69572, 69600, 69622, 69635, 69687, 69745, 69746, 69749, 69749, 69763, 69807, 69840, 69864, 69891, 69926, 69956, 69956, 69959, 69959, 69968, 70002, 70006, 70006, 70019, 70066, 70081, 70084, 70106, 70106, 70108, 70108, 70144, 70161, 70163, 70187, 70207, 70208, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70366, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70461, 70461, 70480, 70480, 70493, 70497, 70656, 70708, 70727, 70730, 70751, 70753, 70784, 70831, 70852, 70853, 70855, 70855, 71040, 71086, 71128, 71131, 71168, 71215, 71236, 71236, 71296, 71338, 71352, 71352, 71424, 71450, 71488, 71494, 71680, 71723, 71840, 71903, 71935, 71942, 71945, 71945, 71948, 71955, 71957, 71958, 71960, 71983, 71999, 71999, 72001, 72001, 72096, 72103, 72106, 72144, 72161, 72161, 72163, 72163, 72192, 72192, 72203, 72242, 72250, 72250, 72272, 72272, 72284, 72329, 72349, 72349, 72368, 72440, 72704, 72712, 72714, 72750, 72768, 72768, 72818, 72847, 72960, 72966, 72968, 72969, 72971, 73008, 73030, 73030, 73056, 73061, 73063, 73064, 73066, 73097, 73112, 73112, 73440, 73458, 73474, 73474, 73476, 73488, 73490, 73523, 73648, 73648, 73728, 74649, 74752, 74862, 74880, 75075, 77712, 77808, 77824, 78895, 78913, 78918, 82944, 83526, 92160, 92728, 92736, 92766, 92784, 92862, 92880, 92909, 92928, 92975, 92992, 92995, 93027, 93047, 93053, 93071, 93760, 93823, 93952, 94026, 94032, 94032, 94099, 94111, 94176, 94177, 94179, 94179, 94208, 100343, 100352, 101589, 101632, 101640, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 122624, 122654, 122661, 122666, 122928, 122989, 123136, 123180, 123191, 123197, 123214, 123214, 123536, 123565, 123584, 123627, 124112, 124139, 124896, 124902, 124904, 124907, 124909, 124910, 124912, 124926, 124928, 125124, 125184, 125251, 125259, 125259, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 131072, 173791, 173824, 177977, 177984, 178205, 178208, 183969, 183984, 191456, 191472, 192093, 194560, 195101, 196608, 201546, 201552, 205743], fFe = [48, 57, 65, 90, 95, 95, 97, 122, 170, 170, 181, 181, 183, 183, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 895, 895, 902, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1519, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2045, 2045, 2048, 2093, 2112, 2139, 2144, 2154, 2160, 2183, 2185, 2190, 2200, 2273, 2275, 2403, 2406, 2415, 2417, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2556, 2556, 2558, 2558, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2809, 2815, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2901, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3072, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3132, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3162, 3165, 3165, 3168, 3171, 3174, 3183, 3200, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3293, 3294, 3296, 3299, 3302, 3311, 3313, 3315, 3328, 3340, 3342, 3344, 3346, 3396, 3398, 3400, 3402, 3406, 3412, 3415, 3423, 3427, 3430, 3439, 3450, 3455, 3457, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3558, 3567, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3773, 3776, 3780, 3782, 3782, 3784, 3790, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4969, 4977, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5909, 5919, 5940, 5952, 5971, 5984, 5996, 5998, 6e3, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6159, 6169, 6176, 6264, 6272, 6314, 6320, 6389, 6400, 6430, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6618, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6832, 6845, 6847, 6862, 6912, 6988, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7376, 7378, 7380, 7418, 7424, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8472, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12447, 12449, 12543, 12549, 12591, 12593, 12686, 12704, 12735, 12784, 12799, 13312, 19903, 19968, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42737, 42775, 42783, 42786, 42888, 42891, 42954, 42960, 42961, 42963, 42963, 42965, 42969, 42994, 43047, 43052, 43052, 43072, 43123, 43136, 43205, 43216, 43225, 43232, 43255, 43259, 43259, 43261, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43488, 43518, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43881, 43888, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65071, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65381, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66045, 66045, 66176, 66204, 66208, 66256, 66272, 66272, 66304, 66335, 66349, 66378, 66384, 66426, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66720, 66729, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 66928, 66938, 66940, 66954, 66956, 66962, 66964, 66965, 66967, 66977, 66979, 66993, 66995, 67001, 67003, 67004, 67072, 67382, 67392, 67413, 67424, 67431, 67456, 67461, 67463, 67504, 67506, 67514, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68099, 68101, 68102, 68108, 68115, 68117, 68119, 68121, 68149, 68152, 68154, 68159, 68159, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68326, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 68864, 68903, 68912, 68921, 69248, 69289, 69291, 69292, 69296, 69297, 69373, 69404, 69415, 69415, 69424, 69456, 69488, 69509, 69552, 69572, 69600, 69622, 69632, 69702, 69734, 69749, 69759, 69818, 69826, 69826, 69840, 69864, 69872, 69881, 69888, 69940, 69942, 69951, 69956, 69959, 69968, 70003, 70006, 70006, 70016, 70084, 70089, 70092, 70094, 70106, 70108, 70108, 70144, 70161, 70163, 70199, 70206, 70209, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70378, 70384, 70393, 70400, 70403, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70459, 70468, 70471, 70472, 70475, 70477, 70480, 70480, 70487, 70487, 70493, 70499, 70502, 70508, 70512, 70516, 70656, 70730, 70736, 70745, 70750, 70753, 70784, 70853, 70855, 70855, 70864, 70873, 71040, 71093, 71096, 71104, 71128, 71133, 71168, 71232, 71236, 71236, 71248, 71257, 71296, 71352, 71360, 71369, 71424, 71450, 71453, 71467, 71472, 71481, 71488, 71494, 71680, 71738, 71840, 71913, 71935, 71942, 71945, 71945, 71948, 71955, 71957, 71958, 71960, 71989, 71991, 71992, 71995, 72003, 72016, 72025, 72096, 72103, 72106, 72151, 72154, 72161, 72163, 72164, 72192, 72254, 72263, 72263, 72272, 72345, 72349, 72349, 72368, 72440, 72704, 72712, 72714, 72758, 72760, 72768, 72784, 72793, 72818, 72847, 72850, 72871, 72873, 72886, 72960, 72966, 72968, 72969, 72971, 73014, 73018, 73018, 73020, 73021, 73023, 73031, 73040, 73049, 73056, 73061, 73063, 73064, 73066, 73102, 73104, 73105, 73107, 73112, 73120, 73129, 73440, 73462, 73472, 73488, 73490, 73530, 73534, 73538, 73552, 73561, 73648, 73648, 73728, 74649, 74752, 74862, 74880, 75075, 77712, 77808, 77824, 78895, 78912, 78933, 82944, 83526, 92160, 92728, 92736, 92766, 92768, 92777, 92784, 92862, 92864, 92873, 92880, 92909, 92912, 92916, 92928, 92982, 92992, 92995, 93008, 93017, 93027, 93047, 93053, 93071, 93760, 93823, 93952, 94026, 94031, 94087, 94095, 94111, 94176, 94177, 94179, 94180, 94192, 94193, 94208, 100343, 100352, 101589, 101632, 101640, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113821, 113822, 118528, 118573, 118576, 118598, 119141, 119145, 119149, 119154, 119163, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 120782, 120831, 121344, 121398, 121403, 121452, 121461, 121461, 121476, 121476, 121499, 121503, 121505, 121519, 122624, 122654, 122661, 122666, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 122928, 122989, 123023, 123023, 123136, 123180, 123184, 123197, 123200, 123209, 123214, 123214, 123536, 123566, 123584, 123641, 124112, 124153, 124896, 124902, 124904, 124907, 124909, 124910, 124912, 124926, 124928, 125124, 125136, 125142, 125184, 125259, 125264, 125273, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 130032, 130041, 131072, 173791, 173824, 177977, 177984, 178205, 178208, 183969, 183984, 191456, 191472, 192093, 194560, 195101, 196608, 201546, 201552, 205743, 917760, 917999], pFe = /^\/\/\/?\s*@(ts-expect-error|ts-ignore)/, dFe = /^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/, mFe = /@(?:see|link)/i; + function fj(e, t) { + if (e < t[0]) + return !1; + let n = 0, i = t.length, s; + for (; n + 1 < i; ) { + if (s = n + (i - n) / 2, s -= s % 2, t[s] <= e && e <= t[s + 1]) + return !0; + e < t[s] ? i = s : n = s + 2; + } + return !1; + } + function YI(e, t) { + return t >= 2 ? fj(e, _Fe) : fj(e, lFe); + } + function gFe(e, t) { + return t >= 2 ? fj(e, fFe) : fj(e, uFe); + } + function Dge(e) { + const t = []; + return e.forEach((n, i) => { + t[n] = i; + }), t; + } + var hFe = Dge(Cge); + function Xs(e) { + return hFe[e]; + } + function sS(e) { + return Cge.get(e); + } + var yFe = Dge(Ege); + function wge(e) { + return yFe[e]; + } + function pj(e) { + return Ege.get(e); + } + function ex(e) { + const t = []; + let n = 0, i = 0; + for (; n < e.length; ) { + const s = e.charCodeAt(n); + switch (n++, s) { + case 13: + e.charCodeAt(n) === 10 && n++; + // falls through + case 10: + t.push(i), i = n; + break; + default: + s > 127 && yu(s) && (t.push(i), i = n); + break; + } + } + return t.push(i), t; + } + function xP(e, t, n, i) { + return e.getPositionOfLineAndCharacter ? e.getPositionOfLineAndCharacter(t, n, i) : ZI(Ag(e), t, n, e.text, i); + } + function ZI(e, t, n, i, s) { + (t < 0 || t >= e.length) && (s ? t = t < 0 ? 0 : t >= e.length ? e.length - 1 : t : E.fail(`Bad line number. Line: ${t}, lineStarts.length: ${e.length} , line map is correct? ${i !== void 0 ? Ef(e, ex(i)) : "unknown"}`)); + const o = e[t] + n; + return s ? o > e[t + 1] ? e[t + 1] : typeof i == "string" && o > i.length ? i.length : o : (t < e.length - 1 ? E.assert(o < e[t + 1]) : i !== void 0 && E.assert(o <= i.length), o); + } + function Ag(e) { + return e.lineMap || (e.lineMap = ex(e.text)); + } + function pC(e, t) { + const n = o4(e, t); + return { + line: n, + character: t - e[n] + }; + } + function o4(e, t, n) { + let i = Cy(e, t, lo, uo, n); + return i < 0 && (i = ~i - 1, E.assert(i !== -1, "position cannot precede the beginning of the file")), i; + } + function c4(e, t, n) { + if (t === n) return 0; + const i = Ag(e), s = Math.min(t, n), o = s === n, c = o ? t : n, _ = o4(i, s), u = o4(i, c, _); + return o ? _ - u : u - _; + } + function js(e, t) { + return pC(Ag(e), t); + } + function Ig(e) { + return em(e) || yu(e); + } + function em(e) { + return e === 32 || e === 9 || e === 11 || e === 12 || e === 160 || e === 133 || e === 5760 || e >= 8192 && e <= 8203 || e === 8239 || e === 8287 || e === 12288 || e === 65279; + } + function yu(e) { + return e === 10 || e === 13 || e === 8232 || e === 8233; + } + function dC(e) { + return e >= 48 && e <= 57; + } + function TY(e) { + return dC(e) || e >= 65 && e <= 70 || e >= 97 && e <= 102; + } + function xY(e) { + return e >= 65 && e <= 90 || e >= 97 && e <= 122; + } + function Pge(e) { + return xY(e) || dC(e) || e === 95; + } + function kY(e) { + return e >= 48 && e <= 55; + } + function CY(e, t) { + const n = e.charCodeAt(t); + switch (n) { + case 13: + case 10: + case 9: + case 11: + case 12: + case 32: + case 47: + // starts of normal trivia + // falls through + case 60: + case 124: + case 61: + case 62: + return !0; + case 35: + return t === 0; + default: + return n > 127; + } + } + function aa(e, t, n, i, s) { + if (kd(t)) + return t; + let o = !1; + for (; ; ) { + const c = e.charCodeAt(t); + switch (c) { + case 13: + e.charCodeAt(t + 1) === 10 && t++; + // falls through + case 10: + if (t++, n) + return t; + o = !!s; + continue; + case 9: + case 11: + case 12: + case 32: + t++; + continue; + case 47: + if (i) + break; + if (e.charCodeAt(t + 1) === 47) { + for (t += 2; t < e.length && !yu(e.charCodeAt(t)); ) + t++; + o = !1; + continue; + } + if (e.charCodeAt(t + 1) === 42) { + for (t += 2; t < e.length; ) { + if (e.charCodeAt(t) === 42 && e.charCodeAt(t + 1) === 47) { + t += 2; + break; + } + t++; + } + o = !1; + continue; + } + break; + case 60: + case 124: + case 61: + case 62: + if (l4(e, t)) { + t = kP(e, t), o = !1; + continue; + } + break; + case 35: + if (t === 0 && Nge(e, t)) { + t = Age(e, t), o = !1; + continue; + } + break; + case 42: + if (o) { + t++, o = !1; + continue; + } + break; + default: + if (c > 127 && Ig(c)) { + t++; + continue; + } + break; + } + return t; + } + } + var dj = 7; + function l4(e, t) { + if (E.assert(t >= 0), t === 0 || yu(e.charCodeAt(t - 1))) { + const n = e.charCodeAt(t); + if (t + dj < e.length) { + for (let i = 0; i < dj; i++) + if (e.charCodeAt(t + i) !== n) + return !1; + return n === 61 || e.charCodeAt(t + dj) === 32; + } + } + return !1; + } + function kP(e, t, n) { + n && n(p.Merge_conflict_marker_encountered, t, dj); + const i = e.charCodeAt(t), s = e.length; + if (i === 60 || i === 62) + for (; t < s && !yu(e.charCodeAt(t)); ) + t++; + else + for (E.assert( + i === 124 || i === 61 + /* equals */ + ); t < s; ) { + const o = e.charCodeAt(t); + if ((o === 61 || o === 62) && o !== i && l4(e, t)) + break; + t++; + } + return t; + } + var EY = /^#!.*/; + function Nge(e, t) { + return E.assert(t === 0), EY.test(e); + } + function Age(e, t) { + const n = EY.exec(e)[0]; + return t = t + n.length, t; + } + function mj(e, t, n, i, s, o, c) { + let _, u, m, g, h = !1, S = i, T = c; + if (n === 0) { + S = !0; + const C = KI(t); + C && (n = C.length); + } + e: + for (; n >= 0 && n < t.length; ) { + const C = t.charCodeAt(n); + switch (C) { + case 13: + t.charCodeAt(n + 1) === 10 && n++; + // falls through + case 10: + if (n++, i) + break e; + S = !0, h && (g = !0); + continue; + case 9: + case 11: + case 12: + case 32: + n++; + continue; + case 47: + const D = t.charCodeAt(n + 1); + let w = !1; + if (D === 47 || D === 42) { + const A = D === 47 ? 2 : 3, O = n; + if (n += 2, D === 47) + for (; n < t.length; ) { + if (yu(t.charCodeAt(n))) { + w = !0; + break; + } + n++; + } + else + for (; n < t.length; ) { + if (t.charCodeAt(n) === 42 && t.charCodeAt(n + 1) === 47) { + n += 2; + break; + } + n++; + } + if (S) { + if (h && (T = s(_, u, m, g, o, T), !e && T)) + return T; + _ = O, u = n, m = A, g = w, h = !0; + } + continue; + } + break e; + default: + if (C > 127 && Ig(C)) { + h && yu(C) && (g = !0), n++; + continue; + } + break e; + } + } + return h && (T = s(_, u, m, g, o, T)), T; + } + function CP(e, t, n, i) { + return mj( + /*reduce*/ + !1, + e, + t, + /*trailing*/ + !1, + n, + i + ); + } + function EP(e, t, n, i) { + return mj( + /*reduce*/ + !1, + e, + t, + /*trailing*/ + !0, + n, + i + ); + } + function DY(e, t, n, i, s) { + return mj( + /*reduce*/ + !0, + e, + t, + /*trailing*/ + !1, + n, + i, + s + ); + } + function wY(e, t, n, i, s) { + return mj( + /*reduce*/ + !0, + e, + t, + /*trailing*/ + !0, + n, + i, + s + ); + } + function Ige(e, t, n, i, s, o = []) { + return o.push({ kind: n, pos: e, end: t, hasTrailingNewLine: i }), o; + } + function Fg(e, t) { + return DY( + e, + t, + Ige, + /*state*/ + void 0, + /*initial*/ + void 0 + ); + } + function Fy(e, t) { + return wY( + e, + t, + Ige, + /*state*/ + void 0, + /*initial*/ + void 0 + ); + } + function KI(e) { + const t = EY.exec(e); + if (t) + return t[0]; + } + function Qm(e, t) { + return xY(e) || e === 36 || e === 95 || e > 127 && YI(e, t); + } + function kh(e, t, n) { + return Pge(e) || e === 36 || // "-" and ":" are valid in JSX Identifiers + (n === 1 ? e === 45 || e === 58 : !1) || e > 127 && gFe(e, t); + } + function E_(e, t, n) { + let i = u4(e, 0); + if (!Qm(i, t)) + return !1; + for (let s = vd(i); s < e.length; s += vd(i)) + if (!kh(i = u4(e, s), t, n)) + return !1; + return !0; + } + function Og(e, t, n = 0, i, s, o, c) { + var _ = i, u, m, g, h, S, T, C, D, w = 0, A = 0, O = 0; + Cs(_, o, c); + var F = { + getTokenFullStart: () => g, + getStartPos: () => g, + getTokenEnd: () => u, + getTextPos: () => u, + getToken: () => S, + getTokenStart: () => h, + getTokenPos: () => h, + getTokenText: () => _.substring(h, u), + getTokenValue: () => T, + hasUnicodeEscape: () => (C & 1024) !== 0, + hasExtendedUnicodeEscape: () => (C & 8) !== 0, + hasPrecedingLineBreak: () => (C & 1) !== 0, + hasPrecedingJSDocComment: () => (C & 2) !== 0, + hasPrecedingJSDocLeadingAsterisks: () => (C & 32768) !== 0, + isIdentifier: () => S === 80 || S > 118, + isReservedWord: () => S >= 83 && S <= 118, + isUnterminated: () => (C & 4) !== 0, + getCommentDirectives: () => D, + getNumericLiteralFlags: () => C & 25584, + getTokenFlags: () => C, + reScanGreaterToken: De, + reScanAsteriskEqualsToken: we, + reScanSlashToken: Ue, + reScanTemplateToken: Dt, + reScanTemplateHeadOrNoSubstitutionTemplate: Qt, + scanJsxIdentifier: pi, + scanJsxAttributeValue: Xn, + reScanJsxAttributeValue: jr, + reScanJsxToken: Wr, + reScanLessThanToken: yr, + reScanHashToken: qn, + reScanQuestionToken: Bt, + reScanInvalidIdentifier: ne, + scanJsxToken: bi, + scanJsDocToken: Re, + scanJSDocCommentTextToken: di, + scan: xe, + getText: wn, + clearCommentDirectives: ki, + setText: Cs, + setScriptTarget: xr, + setLanguageVariant: gs, + setScriptKind: Qe, + setJSDocParsingMode: Ct, + setOnError: Ks, + resetTokenState: ee, + setTextPos: ee, + setSkipJsDocLeadingAsterisks: Ve, + tryScan: Bn, + lookAhead: qr, + scanRange: tr + }; + return E.isDebugging && Object.defineProperty(F, "__debugShowCurrentPositionInText", { + get: () => { + const K = F.getText(); + return K.slice(0, F.getTokenFullStart()) + "║" + K.slice(F.getTokenFullStart()); + } + }), F; + function R(K) { + return u4(_, K); + } + function W(K) { + return K >= 0 && K < m ? R(K) : -1; + } + function V(K) { + return _.charCodeAt(K); + } + function $(K) { + return K >= 0 && K < m ? V(K) : -1; + } + function U(K, Ie = u, $e, Ke) { + if (s) { + const Je = u; + u = Ie, s(K, $e || 0, Ke), u = Je; + } + } + function _e() { + let K = u, Ie = !1, $e = !1, Ke = ""; + for (; ; ) { + const Je = V(u); + if (Je === 95) { + C |= 512, Ie ? (Ie = !1, $e = !0, Ke += _.substring(K, u)) : (C |= 16384, U($e ? p.Multiple_consecutive_numeric_separators_are_not_permitted : p.Numeric_separators_are_not_allowed_here, u, 1)), u++, K = u; + continue; + } + if (dC(Je)) { + Ie = !0, $e = !1, u++; + continue; + } + break; + } + return V(u - 1) === 95 && (C |= 16384, U(p.Numeric_separators_are_not_allowed_here, u - 1, 1)), Ke + _.substring(K, u); + } + function Z() { + let K = u, Ie; + if (V(u) === 48) + if (u++, V(u) === 95) + C |= 16896, U(p.Numeric_separators_are_not_allowed_here, u, 1), u--, Ie = _e(); + else if (!re()) + C |= 8192, Ie = "" + +T; + else if (!T) + Ie = "0"; + else { + T = "" + parseInt(T, 8), C |= 32; + const _t = S === 41, yt = (_t ? "-" : "") + "0o" + (+T).toString(8); + return _t && K--, U(p.Octal_literals_are_not_allowed_Use_the_syntax_0, K, u - K, yt), 9; + } + else + Ie = _e(); + let $e, Ke; + V(u) === 46 && (u++, $e = _e()); + let Je = u; + if (V(u) === 69 || V(u) === 101) { + u++, C |= 16, (V(u) === 43 || V(u) === 45) && u++; + const _t = u, yt = _e(); + yt ? (Ke = _.substring(Je, _t) + yt, Je = u) : U(p.Digit_expected); + } + let Ye; + if (C & 512 ? (Ye = Ie, $e && (Ye += "." + $e), Ke && (Ye += Ke)) : Ye = _.substring(K, Je), C & 8192) + return U(p.Decimals_with_leading_zeros_are_not_allowed, K, Je - K), T = "" + +Ye, 9; + if ($e !== void 0 || C & 16) + return J(K, $e === void 0 && !!(C & 16)), T = "" + +Ye, 9; + { + T = Ye; + const _t = Oe(); + return J(K), _t; + } + } + function J(K, Ie) { + if (!Qm(R(u), e)) + return; + const $e = u, { length: Ke } = ke(); + Ke === 1 && _[$e] === "n" ? U(Ie ? p.A_bigint_literal_cannot_use_exponential_notation : p.A_bigint_literal_must_be_an_integer, K, $e - K + 1) : (U(p.An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal, $e, Ke), u = $e); + } + function re() { + const K = u; + let Ie = !0; + for (; dC($(u)); ) + kY(V(u)) || (Ie = !1), u++; + return T = _.substring(K, u), Ie; + } + function te(K, Ie) { + const $e = le( + /*minCount*/ + K, + /*scanAsManyAsPossible*/ + !1, + Ie + ); + return $e ? parseInt($e, 16) : -1; + } + function ie(K, Ie) { + return le( + /*minCount*/ + K, + /*scanAsManyAsPossible*/ + !0, + Ie + ); + } + function le(K, Ie, $e) { + let Ke = [], Je = !1, Ye = !1; + for (; Ke.length < K || Ie; ) { + let _t = V(u); + if ($e && _t === 95) { + C |= 512, Je ? (Je = !1, Ye = !0) : U(Ye ? p.Multiple_consecutive_numeric_separators_are_not_permitted : p.Numeric_separators_are_not_allowed_here, u, 1), u++; + continue; + } + if (Je = $e, _t >= 65 && _t <= 70) + _t += 32; + else if (!(_t >= 48 && _t <= 57 || _t >= 97 && _t <= 102)) + break; + Ke.push(_t), u++, Ye = !1; + } + return Ke.length < K && (Ke = []), V(u - 1) === 95 && U(p.Numeric_separators_are_not_allowed_here, u - 1, 1), String.fromCharCode(...Ke); + } + function Te(K = !1) { + const Ie = V(u); + u++; + let $e = "", Ke = u; + for (; ; ) { + if (u >= m) { + $e += _.substring(Ke, u), C |= 4, U(p.Unterminated_string_literal); + break; + } + const Je = V(u); + if (Je === Ie) { + $e += _.substring(Ke, u), u++; + break; + } + if (Je === 92 && !K) { + $e += _.substring(Ke, u), $e += me( + 3 + /* ReportErrors */ + ), Ke = u; + continue; + } + if ((Je === 10 || Je === 13) && !K) { + $e += _.substring(Ke, u), C |= 4, U(p.Unterminated_string_literal); + break; + } + u++; + } + return $e; + } + function q(K) { + const Ie = V(u) === 96; + u++; + let $e = u, Ke = "", Je; + for (; ; ) { + if (u >= m) { + Ke += _.substring($e, u), C |= 4, U(p.Unterminated_template_literal), Je = Ie ? 15 : 18; + break; + } + const Ye = V(u); + if (Ye === 96) { + Ke += _.substring($e, u), u++, Je = Ie ? 15 : 18; + break; + } + if (Ye === 36 && u + 1 < m && V(u + 1) === 123) { + Ke += _.substring($e, u), u += 2, Je = Ie ? 16 : 17; + break; + } + if (Ye === 92) { + Ke += _.substring($e, u), Ke += me(1 | (K ? 2 : 0)), $e = u; + continue; + } + if (Ye === 13) { + Ke += _.substring($e, u), u++, u < m && V(u) === 10 && u++, Ke += ` +`, $e = u; + continue; + } + u++; + } + return E.assert(Je !== void 0), T = Ke, Je; + } + function me(K) { + const Ie = u; + if (u++, u >= m) + return U(p.Unexpected_end_of_text), ""; + const $e = V(u); + switch (u++, $e) { + case 48: + if (u >= m || !dC(V(u))) + return "\0"; + // '\01', '\011' + // falls through + case 49: + case 50: + case 51: + u < m && kY(V(u)) && u++; + // '\17', '\177' + // falls through + case 52: + case 53: + case 54: + case 55: + if (u < m && kY(V(u)) && u++, C |= 2048, K & 6) { + const Ye = parseInt(_.substring(Ie + 1, u), 8); + return K & 4 && !(K & 32) && $e !== 48 ? U(p.Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead, Ie, u - Ie, "\\x" + Ye.toString(16).padStart(2, "0")) : U(p.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, Ie, u - Ie, "\\x" + Ye.toString(16).padStart(2, "0")), String.fromCharCode(Ye); + } + return _.substring(Ie, u); + case 56: + case 57: + return C |= 2048, K & 6 ? (K & 4 && !(K & 32) ? U(p.Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class, Ie, u - Ie) : U(p.Escape_sequence_0_is_not_allowed, Ie, u - Ie, _.substring(Ie, u)), String.fromCharCode($e)) : _.substring(Ie, u); + case 98: + return "\b"; + case 116: + return " "; + case 110: + return ` +`; + case 118: + return "\v"; + case 102: + return "\f"; + case 114: + return "\r"; + case 39: + return "'"; + case 34: + return '"'; + case 117: + if (u < m && V(u) === 123) { + u -= 2; + const Ye = Ce(!!(K & 6)); + return K & 17 || (C |= 2048, K & 6 && U(p.Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set, Ie, u - Ie)), Ye; + } + for (; u < Ie + 6; u++) + if (!(u < m && TY(V(u)))) + return C |= 2048, K & 6 && U(p.Hexadecimal_digit_expected), _.substring(Ie, u); + C |= 1024; + const Ke = parseInt(_.substring(Ie + 2, u), 16), Je = String.fromCharCode(Ke); + if (K & 16 && Ke >= 55296 && Ke <= 56319 && u + 6 < m && _.substring(u, u + 2) === "\\u" && V(u + 2) !== 123) { + const Ye = u; + let _t = u + 2; + for (; _t < Ye + 6; _t++) + if (!TY(V(_t))) + return Je; + const yt = parseInt(_.substring(Ye + 2, _t), 16); + if (yt >= 56320 && yt <= 57343) + return u = _t, Je + String.fromCharCode(yt); + } + return Je; + case 120: + for (; u < Ie + 4; u++) + if (!(u < m && TY(V(u)))) + return C |= 2048, K & 6 && U(p.Hexadecimal_digit_expected), _.substring(Ie, u); + return C |= 4096, String.fromCharCode(parseInt(_.substring(Ie + 2, u), 16)); + // when encountering a LineContinuation (i.e. a backslash and a line terminator sequence), + // the line terminator is interpreted to be "the empty code unit sequence". + case 13: + u < m && V(u) === 10 && u++; + // falls through + case 10: + case 8232: + case 8233: + return ""; + default: + return (K & 16 || K & 4 && !(K & 8) && kh($e, e)) && U(p.This_character_cannot_be_escaped_in_a_regular_expression, u - 2, 2), String.fromCharCode($e); + } + } + function Ce(K) { + const Ie = u; + u += 3; + const $e = u, Ke = ie( + 1, + /*canHaveSeparators*/ + !1 + ), Je = Ke ? parseInt(Ke, 16) : -1; + let Ye = !1; + return Je < 0 ? (K && U(p.Hexadecimal_digit_expected), Ye = !0) : Je > 1114111 && (K && U(p.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive, $e, u - $e), Ye = !0), u >= m ? (K && U(p.Unexpected_end_of_text), Ye = !0) : V(u) === 125 ? u++ : (K && U(p.Unterminated_Unicode_escape_sequence), Ye = !0), Ye ? (C |= 2048, _.substring(Ie, u)) : (C |= 8, _4(Je)); + } + function Ee() { + if (u + 5 < m && V(u + 1) === 117) { + const K = u; + u += 2; + const Ie = te( + 4, + /*canHaveSeparators*/ + !1 + ); + return u = K, Ie; + } + return -1; + } + function oe() { + if (R(u + 1) === 117 && R(u + 2) === 123) { + const K = u; + u += 3; + const Ie = ie( + 1, + /*canHaveSeparators*/ + !1 + ), $e = Ie ? parseInt(Ie, 16) : -1; + return u = K, $e; + } + return -1; + } + function ke() { + let K = "", Ie = u; + for (; u < m; ) { + let $e = R(u); + if (kh($e, e)) + u += vd($e); + else if ($e === 92) { + if ($e = oe(), $e >= 0 && kh($e, e)) { + K += Ce( + /*shouldEmitInvalidEscapeError*/ + !0 + ), Ie = u; + continue; + } + if ($e = Ee(), !($e >= 0 && kh($e, e))) + break; + C |= 1024, K += _.substring(Ie, u), K += _4($e), u += 6, Ie = u; + } else + break; + } + return K += _.substring(Ie, u), K; + } + function ue() { + const K = T.length; + if (K >= 2 && K <= 12) { + const Ie = T.charCodeAt(0); + if (Ie >= 97 && Ie <= 122) { + const $e = oFe.get(T); + if ($e !== void 0) + return S = $e; + } + } + return S = 80; + } + function it(K) { + let Ie = "", $e = !1, Ke = !1; + for (; ; ) { + const Je = V(u); + if (Je === 95) { + C |= 512, $e ? ($e = !1, Ke = !0) : U(Ke ? p.Multiple_consecutive_numeric_separators_are_not_permitted : p.Numeric_separators_are_not_allowed_here, u, 1), u++; + continue; + } + if ($e = !0, !dC(Je) || Je - 48 >= K) + break; + Ie += _[u], u++, Ke = !1; + } + return V(u - 1) === 95 && U(p.Numeric_separators_are_not_allowed_here, u - 1, 1), Ie; + } + function Oe() { + return V(u) === 110 ? (T += "n", C & 384 && (T = aD(T) + "n"), u++, 10) : (T = "" + (C & 128 ? parseInt(T.slice(2), 2) : C & 256 ? parseInt(T.slice(2), 8) : +T), 9); + } + function xe() { + for (g = u, C = 0; ; ) { + if (h = u, u >= m) + return S = 1; + const K = R(u); + if (u === 0 && K === 35 && Nge(_, u)) { + if (u = Age(_, u), t) + continue; + return S = 6; + } + switch (K) { + case 10: + case 13: + if (C |= 1, t) { + u++; + continue; + } else + return K === 13 && u + 1 < m && V(u + 1) === 10 ? u += 2 : u++, S = 4; + case 9: + case 11: + case 12: + case 32: + case 160: + case 5760: + case 8192: + case 8193: + case 8194: + case 8195: + case 8196: + case 8197: + case 8198: + case 8199: + case 8200: + case 8201: + case 8202: + case 8203: + case 8239: + case 8287: + case 12288: + case 65279: + if (t) { + u++; + continue; + } else { + for (; u < m && em(V(u)); ) + u++; + return S = 5; + } + case 33: + return V(u + 1) === 61 ? V(u + 2) === 61 ? (u += 3, S = 38) : (u += 2, S = 36) : (u++, S = 54); + case 34: + case 39: + return T = Te(), S = 11; + case 96: + return S = q( + /*shouldEmitInvalidEscapeError*/ + !1 + ); + case 37: + return V(u + 1) === 61 ? (u += 2, S = 70) : (u++, S = 45); + case 38: + return V(u + 1) === 38 ? V(u + 2) === 61 ? (u += 3, S = 77) : (u += 2, S = 56) : V(u + 1) === 61 ? (u += 2, S = 74) : (u++, S = 51); + case 40: + return u++, S = 21; + case 41: + return u++, S = 22; + case 42: + if (V(u + 1) === 61) + return u += 2, S = 67; + if (V(u + 1) === 42) + return V(u + 2) === 61 ? (u += 3, S = 68) : (u += 2, S = 43); + if (u++, w && !(C & 32768) && C & 1) { + C |= 32768; + continue; + } + return S = 42; + case 43: + return V(u + 1) === 43 ? (u += 2, S = 46) : V(u + 1) === 61 ? (u += 2, S = 65) : (u++, S = 40); + case 44: + return u++, S = 28; + case 45: + return V(u + 1) === 45 ? (u += 2, S = 47) : V(u + 1) === 61 ? (u += 2, S = 66) : (u++, S = 41); + case 46: + return dC(V(u + 1)) ? (Z(), S = 9) : V(u + 1) === 46 && V(u + 2) === 46 ? (u += 3, S = 26) : (u++, S = 25); + case 47: + if (V(u + 1) === 47) { + for (u += 2; u < m && !yu(V(u)); ) + u++; + if (D = er( + D, + _.slice(h, u), + pFe, + h + ), t) + continue; + return S = 2; + } + if (V(u + 1) === 42) { + u += 2; + const _t = V(u) === 42 && V(u + 1) !== 47; + let yt = !1, We = h; + for (; u < m; ) { + const Et = V(u); + if (Et === 42 && V(u + 1) === 47) { + u += 2, yt = !0; + break; + } + u++, yu(Et) && (We = u, C |= 1); + } + if (_t && he() && (C |= 2), D = er(D, _.slice(We, u), dFe, We), yt || U(p.Asterisk_Slash_expected), t) + continue; + return yt || (C |= 4), S = 3; + } + return V(u + 1) === 61 ? (u += 2, S = 69) : (u++, S = 44); + case 48: + if (u + 2 < m && (V(u + 1) === 88 || V(u + 1) === 120)) + return u += 2, T = ie( + 1, + /*canHaveSeparators*/ + !0 + ), T || (U(p.Hexadecimal_digit_expected), T = "0"), T = "0x" + T, C |= 64, S = Oe(); + if (u + 2 < m && (V(u + 1) === 66 || V(u + 1) === 98)) + return u += 2, T = it( + /* base */ + 2 + ), T || (U(p.Binary_digit_expected), T = "0"), T = "0b" + T, C |= 128, S = Oe(); + if (u + 2 < m && (V(u + 1) === 79 || V(u + 1) === 111)) + return u += 2, T = it( + /* base */ + 8 + ), T || (U(p.Octal_digit_expected), T = "0"), T = "0o" + T, C |= 256, S = Oe(); + // falls through + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + return S = Z(); + case 58: + return u++, S = 59; + case 59: + return u++, S = 27; + case 60: + if (l4(_, u)) { + if (u = kP(_, u, U), t) + continue; + return S = 7; + } + return V(u + 1) === 60 ? V(u + 2) === 61 ? (u += 3, S = 71) : (u += 2, S = 48) : V(u + 1) === 61 ? (u += 2, S = 33) : n === 1 && V(u + 1) === 47 && V(u + 2) !== 42 ? (u += 2, S = 31) : (u++, S = 30); + case 61: + if (l4(_, u)) { + if (u = kP(_, u, U), t) + continue; + return S = 7; + } + return V(u + 1) === 61 ? V(u + 2) === 61 ? (u += 3, S = 37) : (u += 2, S = 35) : V(u + 1) === 62 ? (u += 2, S = 39) : (u++, S = 64); + case 62: + if (l4(_, u)) { + if (u = kP(_, u, U), t) + continue; + return S = 7; + } + return u++, S = 32; + case 63: + return V(u + 1) === 46 && !dC(V(u + 2)) ? (u += 2, S = 29) : V(u + 1) === 63 ? V(u + 2) === 61 ? (u += 3, S = 78) : (u += 2, S = 61) : (u++, S = 58); + case 91: + return u++, S = 23; + case 93: + return u++, S = 24; + case 94: + return V(u + 1) === 61 ? (u += 2, S = 79) : (u++, S = 53); + case 123: + return u++, S = 19; + case 124: + if (l4(_, u)) { + if (u = kP(_, u, U), t) + continue; + return S = 7; + } + return V(u + 1) === 124 ? V(u + 2) === 61 ? (u += 3, S = 76) : (u += 2, S = 57) : V(u + 1) === 61 ? (u += 2, S = 75) : (u++, S = 52); + case 125: + return u++, S = 20; + case 126: + return u++, S = 55; + case 64: + return u++, S = 60; + case 92: + const Ie = oe(); + if (Ie >= 0 && Qm(Ie, e)) + return T = Ce( + /*shouldEmitInvalidEscapeError*/ + !0 + ) + ke(), S = ue(); + const $e = Ee(); + return $e >= 0 && Qm($e, e) ? (u += 6, C |= 1024, T = String.fromCharCode($e) + ke(), S = ue()) : (U(p.Invalid_character), u++, S = 0); + case 35: + if (u !== 0 && _[u + 1] === "!") + return U(p.can_only_be_used_at_the_start_of_a_file, u, 2), u++, S = 0; + const Ke = R(u + 1); + if (Ke === 92) { + u++; + const _t = oe(); + if (_t >= 0 && Qm(_t, e)) + return T = "#" + Ce( + /*shouldEmitInvalidEscapeError*/ + !0 + ) + ke(), S = 81; + const yt = Ee(); + if (yt >= 0 && Qm(yt, e)) + return u += 6, C |= 1024, T = "#" + String.fromCharCode(yt) + ke(), S = 81; + u--; + } + return Qm(Ke, e) ? (u++, Ae(Ke, e)) : (T = "#", U(p.Invalid_character, u++, vd(K))), S = 81; + case 65533: + return U(p.File_appears_to_be_binary, 0, 0), u = m, S = 8; + default: + const Je = Ae(K, e); + if (Je) + return S = Je; + if (em(K)) { + u += vd(K); + continue; + } else if (yu(K)) { + C |= 1, u += vd(K); + continue; + } + const Ye = vd(K); + return U(p.Invalid_character, u, Ye), u += Ye, S = 0; + } + } + } + function he() { + switch (O) { + case 0: + return !0; + case 1: + return !1; + } + return A !== 3 && A !== 4 ? !0 : O === 3 ? !1 : mFe.test(_.slice(g, u)); + } + function ne() { + E.assert(S === 0, "'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'."), u = h = g, C = 0; + const K = R(u), Ie = Ae( + K, + 99 + /* ESNext */ + ); + return Ie ? S = Ie : (u += vd(K), S); + } + function Ae(K, Ie) { + let $e = K; + if (Qm($e, Ie)) { + for (u += vd($e); u < m && kh($e = R(u), Ie); ) u += vd($e); + return T = _.substring(h, u), $e === 92 && (T += ke()), ue(); + } + } + function De() { + if (S === 32) { + if (V(u) === 62) + return V(u + 1) === 62 ? V(u + 2) === 61 ? (u += 3, S = 73) : (u += 2, S = 50) : V(u + 1) === 61 ? (u += 2, S = 72) : (u++, S = 49); + if (V(u) === 61) + return u++, S = 34; + } + return S; + } + function we() { + return E.assert(S === 67, "'reScanAsteriskEqualsToken' should only be called on a '*='"), u = h + 1, S = 64; + } + function Ue(K) { + if (S === 44 || S === 69) { + const Ie = h + 1; + u = Ie; + let $e = !1, Ke = !1, Je = !1; + for (; ; ) { + const _t = $(u); + if (_t === -1 || yu(_t)) { + C |= 4; + break; + } + if ($e) + $e = !1; + else { + if (_t === 47 && !Je) + break; + _t === 91 ? Je = !0 : _t === 92 ? $e = !0 : _t === 93 ? Je = !1 : !Je && _t === 40 && $(u + 1) === 63 && $(u + 2) === 60 && $(u + 3) !== 61 && $(u + 3) !== 33 && (Ke = !0); + } + u++; + } + const Ye = u; + if (C & 4) { + u = Ie, $e = !1; + let _t = 0, yt = !1, We = 0; + for (; u < Ye; ) { + const Et = V(u); + if ($e) + $e = !1; + else if (Et === 92) + $e = !0; + else if (Et === 91) + _t++; + else if (Et === 93 && _t) + _t--; + else if (!_t) { + if (Et === 123) + yt = !0; + else if (Et === 125 && yt) + yt = !1; + else if (!yt) { + if (Et === 40) + We++; + else if (Et === 41 && We) + We--; + else if (Et === 41 || Et === 93 || Et === 125) + break; + } + } + u++; + } + for (; Ig($(u - 1)) || $(u - 1) === 59; ) u--; + U(p.Unterminated_regular_expression_literal, h, u - h); + } else { + u++; + let _t = 0; + for (; ; ) { + const yt = W(u); + if (yt === -1 || !kh(yt, e)) + break; + const We = vd(yt); + if (K) { + const Et = pj(yt); + Et === void 0 ? U(p.Unknown_regular_expression_flag, u, We) : _t & Et ? U(p.Duplicate_regular_expression_flag, u, We) : ((_t | Et) & 96) === 96 ? U(p.The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously, u, We) : (_t |= Et, Lt(Et, We)); + } + u += We; + } + K && tr(Ie, Ye - Ie, () => { + bt( + _t, + /*annexB*/ + !0, + Ke + ); + }); + } + T = _.substring(h, u), S = 14; + } + return S; + } + function bt(K, Ie, $e) { + var Ke = !!(K & 64), Je = !!(K & 96), Ye = Je || !Ie, _t = !1, yt = 0, We, Et, Xt, rn = [], ye; + function ft(Vt) { + for (; ; ) { + if (rn.push(ye), ye = void 0, fe(Vt), ye = rn.pop(), $(u) !== 124) + return; + u++; + } + } + function fe(Vt) { + let ir = !1; + for (; ; ) { + const Tr = u, _r = $(u); + switch (_r) { + case -1: + return; + case 94: + case 36: + u++, ir = !1; + break; + case 92: + switch (u++, $(u)) { + case 98: + case 66: + u++, ir = !1; + break; + default: + ve(), ir = !0; + break; + } + break; + case 40: + if (u++, $(u) === 63) + switch (u++, $(u)) { + case 61: + case 33: + u++, ir = !Ye; + break; + case 60: + const Js = u; + switch (u++, $(u)) { + case 61: + case 33: + u++, ir = !1; + break; + default: + zt( + /*isReference*/ + !1 + ), fr( + 62 + /* greaterThan */ + ), e < 5 && U(p.Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later, Js, u - Js), yt++, ir = !0; + break; + } + break; + default: + const Ms = u, Ns = L( + 0 + /* None */ + ); + $(u) === 45 && (u++, L(Ns), u === Ms + 1 && U(p.Subpattern_flags_must_be_present_when_there_is_a_minus_sign, Ms, u - Ms)), fr( + 58 + /* colon */ + ), ir = !0; + break; + } + else + yt++, ir = !0; + ft( + /*isInGroup*/ + !0 + ), fr( + 41 + /* closeParen */ + ); + break; + case 123: + u++; + const Ot = u; + re(); + const mi = T; + if (!Ye && !mi) { + ir = !0; + break; + } + if ($(u) === 44) { + u++, re(); + const Js = T; + if (mi) + Js && Number.parseInt(mi) > Number.parseInt(Js) && (Ye || $(u) === 125) && U(p.Numbers_out_of_order_in_quantifier, Ot, u - Ot); + else if (Js || $(u) === 125) + U(p.Incomplete_quantifier_Digit_expected, Ot, 0); + else { + U(p.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, Tr, 1, String.fromCharCode(_r)), ir = !0; + break; + } + } else if (!mi) { + Ye && U(p.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, Tr, 1, String.fromCharCode(_r)), ir = !0; + break; + } + if ($(u) !== 125) + if (Ye) + U(p._0_expected, u, 0, "}"), u--; + else { + ir = !0; + break; + } + // falls through + case 42: + case 43: + case 63: + u++, $(u) === 63 && u++, ir || U(p.There_is_nothing_available_for_repetition, Tr, u - Tr), ir = !1; + break; + case 46: + u++, ir = !0; + break; + case 91: + u++, Ke ? Gt() : st(), fr( + 93 + /* closeBracket */ + ), ir = !0; + break; + case 41: + if (Vt) + return; + // falls through + case 93: + case 125: + (Ye || _r === 41) && U(p.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, u, 1, String.fromCharCode(_r)), u++, ir = !0; + break; + case 47: + case 124: + return; + default: + Zt(), ir = !0; + break; + } + } + } + function L(Vt) { + for (; ; ) { + const ir = W(u); + if (ir === -1 || !kh(ir, e)) + break; + const Tr = vd(ir), _r = pj(ir); + _r === void 0 ? U(p.Unknown_regular_expression_flag, u, Tr) : Vt & _r ? U(p.Duplicate_regular_expression_flag, u, Tr) : _r & 28 ? (Vt |= _r, Lt(_r, Tr)) : U(p.This_regular_expression_flag_cannot_be_toggled_within_a_subpattern, u, Tr), u += Tr; + } + return Vt; + } + function ve() { + switch (E.assertEqual( + V(u - 1), + 92 + /* backslash */ + ), $(u)) { + case 107: + u++, $(u) === 60 ? (u++, zt( + /*isReference*/ + !0 + ), fr( + 62 + /* greaterThan */ + )) : (Ye || $e) && U(p.k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets, u - 2, 2); + break; + case 113: + if (Ke) { + u++, U(p.q_is_only_available_inside_character_class, u - 2, 2); + break; + } + // falls through + default: + E.assert(Mt() || X() || lt( + /*atomEscape*/ + !0 + )); + break; + } + } + function X() { + E.assertEqual( + V(u - 1), + 92 + /* backslash */ + ); + const Vt = $(u); + if (Vt >= 49 && Vt <= 57) { + const ir = u; + return re(), Xt = Pr(Xt, { pos: ir, end: u, value: +T }), !0; + } + return !1; + } + function lt(Vt) { + E.assertEqual( + V(u - 1), + 92 + /* backslash */ + ); + let ir = $(u); + switch (ir) { + case -1: + return U(p.Undetermined_character_escape, u - 1, 1), "\\"; + case 99: + if (u++, ir = $(u), xY(ir)) + return u++, String.fromCharCode(ir & 31); + if (Ye) + U(p.c_must_be_followed_by_an_ASCII_letter, u - 2, 2); + else if (Vt) + return u--, "\\"; + return String.fromCharCode(ir); + case 94: + case 36: + case 47: + case 92: + case 46: + case 42: + case 43: + case 63: + case 40: + case 41: + case 91: + case 93: + case 123: + case 125: + case 124: + return u++, String.fromCharCode(ir); + default: + return u--, me( + 12 | (Je ? 16 : 0) | (Vt ? 32 : 0) + ); + } + } + function zt(Vt) { + E.assertEqual( + V(u - 1), + 60 + /* lessThan */ + ), h = u, Ae(W(u), e), u === h ? U(p.Expected_a_capturing_group_name) : Vt ? Et = Pr(Et, { pos: h, end: u, name: T }) : ye?.has(T) || rn.some((ir) => ir?.has(T)) ? U(p.Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other, h, u - h) : (ye ?? (ye = /* @__PURE__ */ new Set()), ye.add(T), We ?? (We = /* @__PURE__ */ new Set()), We.add(T)); + } + function de(Vt) { + return Vt === 93 || Vt === -1 || u >= m; + } + function st() { + for (E.assertEqual( + V(u - 1), + 91 + /* openBracket */ + ), $(u) === 94 && u++; ; ) { + const Vt = $(u); + if (de(Vt)) + return; + const ir = u, Tr = ut(); + if ($(u) === 45) { + u++; + const _r = $(u); + if (de(_r)) + return; + !Tr && Ye && U(p.A_character_class_range_must_not_be_bounded_by_another_character_class, ir, u - 1 - ir); + const Ot = u, mi = ut(); + if (!mi && Ye) { + U(p.A_character_class_range_must_not_be_bounded_by_another_character_class, Ot, u - Ot); + continue; + } + if (!Tr) + continue; + const Js = u4(Tr, 0), Ms = u4(mi, 0); + Tr.length === vd(Js) && mi.length === vd(Ms) && Js > Ms && U(p.Range_out_of_order_in_character_class, ir, u - ir); + } + } + } + function Gt() { + E.assertEqual( + V(u - 1), + 91 + /* openBracket */ + ); + let Vt = !1; + $(u) === 94 && (u++, Vt = !0); + let ir = !1, Tr = $(u); + if (de(Tr)) + return; + let _r = u, Ot; + switch (_.slice(u, u + 2)) { + // TODO: don't use slice + case "--": + case "&&": + U(p.Expected_a_class_set_operand), _t = !1; + break; + default: + Ot = Rr(); + break; + } + switch ($(u)) { + case 45: + if ($(u + 1) === 45) { + Vt && _t && U(p.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, _r, u - _r), ir = _t, Xr( + 3 + /* ClassSubtraction */ + ), _t = !Vt && ir; + return; + } + break; + case 38: + if ($(u + 1) === 38) { + Xr( + 2 + /* ClassIntersection */ + ), Vt && _t && U(p.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, _r, u - _r), ir = _t, _t = !Vt && ir; + return; + } else + U(p.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, u, 1, String.fromCharCode(Tr)); + break; + default: + Vt && _t && U(p.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, _r, u - _r), ir = _t; + break; + } + for (; Tr = $(u), Tr !== -1; ) { + switch (Tr) { + case 45: + if (u++, Tr = $(u), de(Tr)) { + _t = !Vt && ir; + return; + } + if (Tr === 45) { + u++, U(p.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, u - 2, 2), _r = u - 2, Ot = _.slice(_r, u); + continue; + } else { + Ot || U(p.A_character_class_range_must_not_be_bounded_by_another_character_class, _r, u - 1 - _r); + const mi = u, Js = Rr(); + if (Vt && _t && U(p.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, mi, u - mi), ir || (ir = _t), !Js) { + U(p.A_character_class_range_must_not_be_bounded_by_another_character_class, mi, u - mi); + break; + } + if (!Ot) + break; + const Ms = u4(Ot, 0), Ns = u4(Js, 0); + Ot.length === vd(Ms) && Js.length === vd(Ns) && Ms > Ns && U(p.Range_out_of_order_in_character_class, _r, u - _r); + } + break; + case 38: + _r = u, u++, $(u) === 38 ? (u++, U(p.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, u - 2, 2), $(u) === 38 && (U(p.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, u, 1, String.fromCharCode(Tr)), u++)) : U(p.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, u - 1, 1, String.fromCharCode(Tr)), Ot = _.slice(_r, u); + continue; + } + if (de($(u))) + break; + switch (_r = u, _.slice(u, u + 2)) { + // TODO: don't use slice + case "--": + case "&&": + U(p.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, u, 2), u += 2, Ot = _.slice(_r, u); + break; + default: + Ot = Rr(); + break; + } + } + _t = !Vt && ir; + } + function Xr(Vt) { + let ir = _t; + for (; ; ) { + let Tr = $(u); + if (de(Tr)) + break; + switch (Tr) { + case 45: + u++, $(u) === 45 ? (u++, Vt !== 3 && U(p.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, u - 2, 2)) : U(p.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, u - 1, 1); + break; + case 38: + u++, $(u) === 38 ? (u++, Vt !== 2 && U(p.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, u - 2, 2), $(u) === 38 && (U(p.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, u, 1, String.fromCharCode(Tr)), u++)) : U(p.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, u - 1, 1, String.fromCharCode(Tr)); + break; + default: + switch (Vt) { + case 3: + U(p._0_expected, u, 0, "--"); + break; + case 2: + U(p._0_expected, u, 0, "&&"); + break; + } + break; + } + if (Tr = $(u), de(Tr)) { + U(p.Expected_a_class_set_operand); + break; + } + Rr(), ir && (ir = _t); + } + _t = ir; + } + function Rr() { + switch (_t = !1, $(u)) { + case -1: + return ""; + case 91: + return u++, Gt(), fr( + 93 + /* closeBracket */ + ), ""; + case 92: + if (u++, Mt()) + return ""; + if ($(u) === 113) + return u++, $(u) === 123 ? (u++, Jr(), fr( + 125 + /* closeBrace */ + ), "") : (U(p.q_must_be_followed_by_string_alternatives_enclosed_in_braces, u - 2, 2), "q"); + u--; + // falls through + default: + return tt(); + } + } + function Jr() { + E.assertEqual( + V(u - 1), + 123 + /* openBrace */ + ); + let Vt = 0; + for (; ; ) + switch ($(u)) { + case -1: + return; + case 125: + Vt !== 1 && (_t = !0); + return; + case 124: + Vt !== 1 && (_t = !0), u++, o = u, Vt = 0; + break; + default: + tt(), Vt++; + break; + } + } + function tt() { + const Vt = $(u); + if (Vt === -1) + return ""; + if (Vt === 92) { + u++; + const ir = $(u); + switch (ir) { + case 98: + return u++, "\b"; + case 38: + case 45: + case 33: + case 35: + case 37: + case 44: + case 58: + case 59: + case 60: + case 61: + case 62: + case 64: + case 96: + case 126: + return u++, String.fromCharCode(ir); + default: + return lt( + /*atomEscape*/ + !1 + ); + } + } else if (Vt === $(u + 1)) + switch (Vt) { + case 38: + case 33: + case 35: + case 37: + case 42: + case 43: + case 44: + case 46: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 96: + case 126: + return U(p.A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backslash, u, 2), u += 2, _.substring(u - 2, u); + } + switch (Vt) { + case 47: + case 40: + case 41: + case 91: + case 93: + case 123: + case 125: + case 45: + case 124: + return U(p.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, u, 1, String.fromCharCode(Vt)), u++, String.fromCharCode(Vt); + } + return Zt(); + } + function ut() { + if ($(u) === 92) { + u++; + const Vt = $(u); + switch (Vt) { + case 98: + return u++, "\b"; + case 45: + return u++, String.fromCharCode(Vt); + default: + return Mt() ? "" : lt( + /*atomEscape*/ + !1 + ); + } + } else + return Zt(); + } + function Mt() { + E.assertEqual( + V(u - 1), + 92 + /* backslash */ + ); + let Vt = !1; + const ir = u - 1, Tr = $(u); + switch (Tr) { + case 100: + case 68: + case 115: + case 83: + case 119: + case 87: + return u++, !0; + case 80: + Vt = !0; + // falls through + case 112: + if (u++, $(u) === 123) { + u++; + const _r = u, Ot = Pt(); + if ($(u) === 61) { + const mi = Fge.get(Ot); + if (u === _r) + U(p.Expected_a_Unicode_property_name); + else if (mi === void 0) { + U(p.Unknown_Unicode_property_name, _r, u - _r); + const Ns = Sb(Ot, Fge.keys(), lo); + Ns && U(p.Did_you_mean_0, _r, u - _r, Ns); + } + u++; + const Js = u, Ms = Pt(); + if (u === Js) + U(p.Expected_a_Unicode_property_value); + else if (mi !== void 0 && !DP[mi].has(Ms)) { + U(p.Unknown_Unicode_property_value, Js, u - Js); + const Ns = Sb(Ms, DP[mi], lo); + Ns && U(p.Did_you_mean_0, Js, u - Js, Ns); + } + } else if (u === _r) + U(p.Expected_a_Unicode_property_name_or_value); + else if (Lge.has(Ot)) + Ke ? Vt ? U(p.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, _r, u - _r) : _t = !0 : U(p.Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_the_Unicode_Sets_v_flag_is_set, _r, u - _r); + else if (!DP.General_Category.has(Ot) && !Oge.has(Ot)) { + U(p.Unknown_Unicode_property_name_or_value, _r, u - _r); + const mi = Sb(Ot, [...DP.General_Category, ...Oge, ...Lge], lo); + mi && U(p.Did_you_mean_0, _r, u - _r, mi); + } + fr( + 125 + /* closeBrace */ + ), Je || U(p.Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set, ir, u - ir); + } else if (Ye) + U(p._0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces, u - 2, 2, String.fromCharCode(Tr)); + else + return u--, !1; + return !0; + } + return !1; + } + function Pt() { + let Vt = ""; + for (; ; ) { + const ir = $(u); + if (ir === -1 || !Pge(ir)) + break; + Vt += String.fromCharCode(ir), u++; + } + return Vt; + } + function Zt() { + const Vt = Je ? vd(W(u)) : 1; + return u += Vt, Vt > 0 ? _.substring(u - Vt, u) : ""; + } + function fr(Vt) { + $(u) === Vt ? u++ : U(p._0_expected, u, 0, String.fromCharCode(Vt)); + } + ft( + /*isInGroup*/ + !1 + ), lr(Et, (Vt) => { + if (!We?.has(Vt.name) && (U(p.There_is_no_capturing_group_named_0_in_this_regular_expression, Vt.pos, Vt.end - Vt.pos, Vt.name), We)) { + const ir = Sb(Vt.name, We, lo); + ir && U(p.Did_you_mean_0, Vt.pos, Vt.end - Vt.pos, ir); + } + }), lr(Xt, (Vt) => { + Vt.value > yt && (yt ? U(p.This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_regular_expression, Vt.pos, Vt.end - Vt.pos, yt) : U(p.This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regular_expression, Vt.pos, Vt.end - Vt.pos)); + }); + } + function Lt(K, Ie) { + const $e = cFe.get(K); + $e && e < $e && U(p.This_regular_expression_flag_is_only_available_when_targeting_0_or_later, u, Ie, A5($e)); + } + function er(K, Ie, $e, Ke) { + const Je = Nr(Ie.trimStart(), $e); + return Je === void 0 ? K : Pr( + K, + { + range: { pos: Ke, end: u }, + type: Je + } + ); + } + function Nr(K, Ie) { + const $e = Ie.exec(K); + if ($e) + switch ($e[1]) { + case "ts-expect-error": + return 0; + case "ts-ignore": + return 1; + } + } + function Dt(K) { + return u = h, S = q(!K); + } + function Qt() { + return u = h, S = q( + /*shouldEmitInvalidEscapeError*/ + !0 + ); + } + function Wr(K = !0) { + return u = h = g, S = bi(K); + } + function yr() { + return S === 48 ? (u = h + 1, S = 30) : S; + } + function qn() { + return S === 81 ? (u = h + 1, S = 63) : S; + } + function Bt() { + return E.assert(S === 61, "'reScanQuestionToken' should only be called on a '??'"), u = h + 1, S = 58; + } + function bi(K = !0) { + if (g = h = u, u >= m) + return S = 1; + let Ie = V(u); + if (Ie === 60) + return V(u + 1) === 47 ? (u += 2, S = 31) : (u++, S = 30); + if (Ie === 123) + return u++, S = 19; + let $e = 0; + for (; u < m && (Ie = V(u), Ie !== 123); ) { + if (Ie === 60) { + if (l4(_, u)) + return u = kP(_, u, U), S = 7; + break; + } + if (Ie === 62 && U(p.Unexpected_token_Did_you_mean_or_gt, u, 1), Ie === 125 && U(p.Unexpected_token_Did_you_mean_or_rbrace, u, 1), yu(Ie) && $e === 0) + $e = -1; + else { + if (!K && yu(Ie) && $e > 0) + break; + Ig(Ie) || ($e = u); + } + u++; + } + return T = _.substring(g, u), $e === -1 ? 13 : 12; + } + function pi() { + if (c_(S)) { + for (; u < m; ) { + if (V(u) === 45) { + T += "-", u++; + continue; + } + const Ie = u; + if (T += ke(), u === Ie) + break; + } + return ue(); + } + return S; + } + function Xn() { + switch (g = u, V(u)) { + case 34: + case 39: + return T = Te( + /*jsxAttributeString*/ + !0 + ), S = 11; + default: + return xe(); + } + } + function jr() { + return u = h = g, Xn(); + } + function di(K) { + if (g = h = u, C = 0, u >= m) + return S = 1; + for (let Ie = V(u); u < m && !yu(Ie) && Ie !== 96; Ie = R(++u)) + if (!K) { + if (Ie === 123) + break; + if (Ie === 64 && u - 1 >= 0 && em(V(u - 1)) && !(u + 1 < m && Ig(V(u + 1)))) + break; + } + return u === h ? Re() : (T = _.substring(h, u), S = 82); + } + function Re() { + if (g = h = u, C = 0, u >= m) + return S = 1; + const K = R(u); + switch (u += vd(K), K) { + case 9: + case 11: + case 12: + case 32: + for (; u < m && em(V(u)); ) + u++; + return S = 5; + case 64: + return S = 60; + case 13: + V(u) === 10 && u++; + // falls through + case 10: + return C |= 1, S = 4; + case 42: + return S = 42; + case 123: + return S = 19; + case 125: + return S = 20; + case 91: + return S = 23; + case 93: + return S = 24; + case 40: + return S = 21; + case 41: + return S = 22; + case 60: + return S = 30; + case 62: + return S = 32; + case 61: + return S = 64; + case 44: + return S = 28; + case 46: + return S = 25; + case 96: + return S = 62; + case 35: + return S = 63; + case 92: + u--; + const Ie = oe(); + if (Ie >= 0 && Qm(Ie, e)) + return T = Ce( + /*shouldEmitInvalidEscapeError*/ + !0 + ) + ke(), S = ue(); + const $e = Ee(); + return $e >= 0 && Qm($e, e) ? (u += 6, C |= 1024, T = String.fromCharCode($e) + ke(), S = ue()) : (u++, S = 0); + } + if (Qm(K, e)) { + let Ie = K; + for (; u < m && kh(Ie = R(u), e) || Ie === 45; ) u += vd(Ie); + return T = _.substring(h, u), Ie === 92 && (T += ke()), S = ue(); + } else + return S = 0; + } + function gt(K, Ie) { + const $e = u, Ke = g, Je = h, Ye = S, _t = T, yt = C, We = K(); + return (!We || Ie) && (u = $e, g = Ke, h = Je, S = Ye, T = _t, C = yt), We; + } + function tr(K, Ie, $e) { + const Ke = m, Je = u, Ye = g, _t = h, yt = S, We = T, Et = C, Xt = D; + Cs(_, K, Ie); + const rn = $e(); + return m = Ke, u = Je, g = Ye, h = _t, S = yt, T = We, C = Et, D = Xt, rn; + } + function qr(K) { + return gt( + K, + /*isLookahead*/ + !0 + ); + } + function Bn(K) { + return gt( + K, + /*isLookahead*/ + !1 + ); + } + function wn() { + return _; + } + function ki() { + D = void 0; + } + function Cs(K, Ie, $e) { + _ = K || "", m = $e === void 0 ? _.length : Ie + $e, ee(Ie || 0); + } + function Ks(K) { + s = K; + } + function xr(K) { + e = K; + } + function gs(K) { + n = K; + } + function Qe(K) { + A = K; + } + function Ct(K) { + O = K; + } + function ee(K) { + E.assert(K >= 0), u = K, g = K, h = K, S = 0, T = void 0, C = 0; + } + function Ve(K) { + w += K ? 1 : -1; + } + } + function u4(e, t) { + return e.codePointAt(t); + } + function vd(e) { + return e >= 65536 ? 2 : e === -1 ? 0 : 1; + } + function vFe(e) { + if (E.assert(0 <= e && e <= 1114111), e <= 65535) + return String.fromCharCode(e); + const t = Math.floor((e - 65536) / 1024) + 55296, n = (e - 65536) % 1024 + 56320; + return String.fromCharCode(t, n); + } + var bFe = String.fromCodePoint ? (e) => String.fromCodePoint(e) : vFe; + function _4(e) { + return bFe(e); + } + var Fge = new Map(Object.entries({ + General_Category: "General_Category", + gc: "General_Category", + Script: "Script", + sc: "Script", + Script_Extensions: "Script_Extensions", + scx: "Script_Extensions" + })), Oge = /* @__PURE__ */ new Set(["ASCII", "ASCII_Hex_Digit", "AHex", "Alphabetic", "Alpha", "Any", "Assigned", "Bidi_Control", "Bidi_C", "Bidi_Mirrored", "Bidi_M", "Case_Ignorable", "CI", "Cased", "Changes_When_Casefolded", "CWCF", "Changes_When_Casemapped", "CWCM", "Changes_When_Lowercased", "CWL", "Changes_When_NFKC_Casefolded", "CWKCF", "Changes_When_Titlecased", "CWT", "Changes_When_Uppercased", "CWU", "Dash", "Default_Ignorable_Code_Point", "DI", "Deprecated", "Dep", "Diacritic", "Dia", "Emoji", "Emoji_Component", "EComp", "Emoji_Modifier", "EMod", "Emoji_Modifier_Base", "EBase", "Emoji_Presentation", "EPres", "Extended_Pictographic", "ExtPict", "Extender", "Ext", "Grapheme_Base", "Gr_Base", "Grapheme_Extend", "Gr_Ext", "Hex_Digit", "Hex", "IDS_Binary_Operator", "IDSB", "IDS_Trinary_Operator", "IDST", "ID_Continue", "IDC", "ID_Start", "IDS", "Ideographic", "Ideo", "Join_Control", "Join_C", "Logical_Order_Exception", "LOE", "Lowercase", "Lower", "Math", "Noncharacter_Code_Point", "NChar", "Pattern_Syntax", "Pat_Syn", "Pattern_White_Space", "Pat_WS", "Quotation_Mark", "QMark", "Radical", "Regional_Indicator", "RI", "Sentence_Terminal", "STerm", "Soft_Dotted", "SD", "Terminal_Punctuation", "Term", "Unified_Ideograph", "UIdeo", "Uppercase", "Upper", "Variation_Selector", "VS", "White_Space", "space", "XID_Continue", "XIDC", "XID_Start", "XIDS"]), Lge = /* @__PURE__ */ new Set(["Basic_Emoji", "Emoji_Keycap_Sequence", "RGI_Emoji_Modifier_Sequence", "RGI_Emoji_Flag_Sequence", "RGI_Emoji_Tag_Sequence", "RGI_Emoji_ZWJ_Sequence", "RGI_Emoji"]), DP = { + General_Category: /* @__PURE__ */ new Set(["C", "Other", "Cc", "Control", "cntrl", "Cf", "Format", "Cn", "Unassigned", "Co", "Private_Use", "Cs", "Surrogate", "L", "Letter", "LC", "Cased_Letter", "Ll", "Lowercase_Letter", "Lm", "Modifier_Letter", "Lo", "Other_Letter", "Lt", "Titlecase_Letter", "Lu", "Uppercase_Letter", "M", "Mark", "Combining_Mark", "Mc", "Spacing_Mark", "Me", "Enclosing_Mark", "Mn", "Nonspacing_Mark", "N", "Number", "Nd", "Decimal_Number", "digit", "Nl", "Letter_Number", "No", "Other_Number", "P", "Punctuation", "punct", "Pc", "Connector_Punctuation", "Pd", "Dash_Punctuation", "Pe", "Close_Punctuation", "Pf", "Final_Punctuation", "Pi", "Initial_Punctuation", "Po", "Other_Punctuation", "Ps", "Open_Punctuation", "S", "Symbol", "Sc", "Currency_Symbol", "Sk", "Modifier_Symbol", "Sm", "Math_Symbol", "So", "Other_Symbol", "Z", "Separator", "Zl", "Line_Separator", "Zp", "Paragraph_Separator", "Zs", "Space_Separator"]), + Script: /* @__PURE__ */ new Set(["Adlm", "Adlam", "Aghb", "Caucasian_Albanian", "Ahom", "Arab", "Arabic", "Armi", "Imperial_Aramaic", "Armn", "Armenian", "Avst", "Avestan", "Bali", "Balinese", "Bamu", "Bamum", "Bass", "Bassa_Vah", "Batk", "Batak", "Beng", "Bengali", "Bhks", "Bhaiksuki", "Bopo", "Bopomofo", "Brah", "Brahmi", "Brai", "Braille", "Bugi", "Buginese", "Buhd", "Buhid", "Cakm", "Chakma", "Cans", "Canadian_Aboriginal", "Cari", "Carian", "Cham", "Cher", "Cherokee", "Chrs", "Chorasmian", "Copt", "Coptic", "Qaac", "Cpmn", "Cypro_Minoan", "Cprt", "Cypriot", "Cyrl", "Cyrillic", "Deva", "Devanagari", "Diak", "Dives_Akuru", "Dogr", "Dogra", "Dsrt", "Deseret", "Dupl", "Duployan", "Egyp", "Egyptian_Hieroglyphs", "Elba", "Elbasan", "Elym", "Elymaic", "Ethi", "Ethiopic", "Geor", "Georgian", "Glag", "Glagolitic", "Gong", "Gunjala_Gondi", "Gonm", "Masaram_Gondi", "Goth", "Gothic", "Gran", "Grantha", "Grek", "Greek", "Gujr", "Gujarati", "Guru", "Gurmukhi", "Hang", "Hangul", "Hani", "Han", "Hano", "Hanunoo", "Hatr", "Hatran", "Hebr", "Hebrew", "Hira", "Hiragana", "Hluw", "Anatolian_Hieroglyphs", "Hmng", "Pahawh_Hmong", "Hmnp", "Nyiakeng_Puachue_Hmong", "Hrkt", "Katakana_Or_Hiragana", "Hung", "Old_Hungarian", "Ital", "Old_Italic", "Java", "Javanese", "Kali", "Kayah_Li", "Kana", "Katakana", "Kawi", "Khar", "Kharoshthi", "Khmr", "Khmer", "Khoj", "Khojki", "Kits", "Khitan_Small_Script", "Knda", "Kannada", "Kthi", "Kaithi", "Lana", "Tai_Tham", "Laoo", "Lao", "Latn", "Latin", "Lepc", "Lepcha", "Limb", "Limbu", "Lina", "Linear_A", "Linb", "Linear_B", "Lisu", "Lyci", "Lycian", "Lydi", "Lydian", "Mahj", "Mahajani", "Maka", "Makasar", "Mand", "Mandaic", "Mani", "Manichaean", "Marc", "Marchen", "Medf", "Medefaidrin", "Mend", "Mende_Kikakui", "Merc", "Meroitic_Cursive", "Mero", "Meroitic_Hieroglyphs", "Mlym", "Malayalam", "Modi", "Mong", "Mongolian", "Mroo", "Mro", "Mtei", "Meetei_Mayek", "Mult", "Multani", "Mymr", "Myanmar", "Nagm", "Nag_Mundari", "Nand", "Nandinagari", "Narb", "Old_North_Arabian", "Nbat", "Nabataean", "Newa", "Nkoo", "Nko", "Nshu", "Nushu", "Ogam", "Ogham", "Olck", "Ol_Chiki", "Orkh", "Old_Turkic", "Orya", "Oriya", "Osge", "Osage", "Osma", "Osmanya", "Ougr", "Old_Uyghur", "Palm", "Palmyrene", "Pauc", "Pau_Cin_Hau", "Perm", "Old_Permic", "Phag", "Phags_Pa", "Phli", "Inscriptional_Pahlavi", "Phlp", "Psalter_Pahlavi", "Phnx", "Phoenician", "Plrd", "Miao", "Prti", "Inscriptional_Parthian", "Rjng", "Rejang", "Rohg", "Hanifi_Rohingya", "Runr", "Runic", "Samr", "Samaritan", "Sarb", "Old_South_Arabian", "Saur", "Saurashtra", "Sgnw", "SignWriting", "Shaw", "Shavian", "Shrd", "Sharada", "Sidd", "Siddham", "Sind", "Khudawadi", "Sinh", "Sinhala", "Sogd", "Sogdian", "Sogo", "Old_Sogdian", "Sora", "Sora_Sompeng", "Soyo", "Soyombo", "Sund", "Sundanese", "Sylo", "Syloti_Nagri", "Syrc", "Syriac", "Tagb", "Tagbanwa", "Takr", "Takri", "Tale", "Tai_Le", "Talu", "New_Tai_Lue", "Taml", "Tamil", "Tang", "Tangut", "Tavt", "Tai_Viet", "Telu", "Telugu", "Tfng", "Tifinagh", "Tglg", "Tagalog", "Thaa", "Thaana", "Thai", "Tibt", "Tibetan", "Tirh", "Tirhuta", "Tnsa", "Tangsa", "Toto", "Ugar", "Ugaritic", "Vaii", "Vai", "Vith", "Vithkuqi", "Wara", "Warang_Citi", "Wcho", "Wancho", "Xpeo", "Old_Persian", "Xsux", "Cuneiform", "Yezi", "Yezidi", "Yiii", "Yi", "Zanb", "Zanabazar_Square", "Zinh", "Inherited", "Qaai", "Zyyy", "Common", "Zzzz", "Unknown"]), + Script_Extensions: void 0 + }; + DP.Script_Extensions = DP.Script; + function vl(e) { + return lf(e) || q_(e); + } + function mC(e) { + return GE(e, Z4, w5); + } + var PY = /* @__PURE__ */ new Map([ + [99, "lib.esnext.full.d.ts"], + [10, "lib.es2023.full.d.ts"], + [9, "lib.es2022.full.d.ts"], + [8, "lib.es2021.full.d.ts"], + [7, "lib.es2020.full.d.ts"], + [6, "lib.es2019.full.d.ts"], + [5, "lib.es2018.full.d.ts"], + [4, "lib.es2017.full.d.ts"], + [3, "lib.es2016.full.d.ts"], + [2, "lib.es6.d.ts"] + // We don't use lib.es2015.full.d.ts due to breaking change. + ]); + function wP(e) { + const t = pa(e); + switch (t) { + case 99: + case 10: + case 9: + case 8: + case 7: + case 6: + case 5: + case 4: + case 3: + case 2: + return PY.get(t); + default: + return "lib.d.ts"; + } + } + function Yo(e) { + return e.start + e.length; + } + function NY(e) { + return e.length === 0; + } + function gj(e, t) { + return t >= e.start && t < Yo(e); + } + function PP(e, t) { + return t >= e.pos && t <= e.end; + } + function AY(e, t) { + return t.start >= e.start && Yo(t) <= Yo(e); + } + function hj(e, t) { + return t.pos >= e.start && t.end <= Yo(e); + } + function IY(e, t) { + return t.start >= e.pos && Yo(t) <= e.end; + } + function Mge(e, t) { + return FY(e, t) !== void 0; + } + function FY(e, t) { + const n = RY(e, t); + return n && n.length === 0 ? void 0 : n; + } + function OY(e, t) { + return AP(e.start, e.length, t.start, t.length); + } + function NP(e, t, n) { + return AP(e.start, e.length, t, n); + } + function AP(e, t, n, i) { + const s = e + t, o = n + i; + return n <= s && o >= e; + } + function LY(e, t) { + return t <= Yo(e) && t >= e.start; + } + function MY(e, t) { + return NP(t, e.pos, e.end - e.pos); + } + function RY(e, t) { + const n = Math.max(e.start, t.start), i = Math.min(Yo(e), Yo(t)); + return n <= i ? bc(n, i) : void 0; + } + function yj(e) { + e = e.filter((i) => i.length > 0).sort((i, s) => i.start !== s.start ? i.start - s.start : i.length - s.length); + const t = []; + let n = 0; + for (; n < e.length; ) { + let i = e[n], s = n + 1; + for (; s < e.length && OY(i, e[s]); ) { + const o = Math.min(i.start, e[s].start), c = Math.max(Yo(i), Yo(e[s])); + i = bc(o, c), s++; + } + n = s, t.push(i); + } + return t; + } + function ql(e, t) { + if (e < 0) + throw new Error("start < 0"); + if (t < 0) + throw new Error("length < 0"); + return { start: e, length: t }; + } + function bc(e, t) { + return ql(e, t - e); + } + function f4(e) { + return ql(e.span.start, e.newLength); + } + function jY(e) { + return NY(e.span) && e.newLength === 0; + } + function IP(e, t) { + if (t < 0) + throw new Error("newLength < 0"); + return { span: e, newLength: t }; + } + var e7 = IP(ql(0, 0), 0); + function BY(e) { + if (e.length === 0) + return e7; + if (e.length === 1) + return e[0]; + const t = e[0]; + let n = t.span.start, i = Yo(t.span), s = n + t.newLength; + for (let o = 1; o < e.length; o++) { + const c = e[o], _ = n, u = i, m = s, g = c.span.start, h = Yo(c.span), S = g + c.newLength; + n = Math.min(_, g), i = Math.max(u, u + (h - m)), s = Math.max(S, S + (m - h)); + } + return IP( + bc(n, i), + /*newLength*/ + s - n + ); + } + function Rge(e) { + if (e && e.kind === 168) { + for (let t = e; t; t = t.parent) + if (vs(t) || Zn(t) || t.kind === 264) + return t; + } + } + function H_(e, t) { + return Ii(e) && $n( + e, + 31 + /* ParameterPropertyModifier */ + ) && t.kind === 176; + } + function JY(e) { + return Ds(e) ? Ri(e.elements, zY) : !1; + } + function zY(e) { + return ul(e) ? !0 : JY(e.name); + } + function tx(e) { + let t = e.parent; + for (; ma(t.parent); ) + t = t.parent.parent; + return t.parent; + } + function WY(e, t) { + ma(e) && (e = tx(e)); + let n = t(e); + return e.kind === 260 && (e = e.parent), e && e.kind === 261 && (n |= t(e), e = e.parent), e && e.kind === 243 && (n |= t(e)), n; + } + function Q1(e) { + return WY(e, Mu); + } + function vj(e) { + return WY(e, JK); + } + function Ch(e) { + return WY(e, SFe); + } + function SFe(e) { + return e.flags; + } + var UY = ["cs", "de", "es", "fr", "it", "ja", "ko", "pl", "pt-br", "ru", "tr", "zh-cn", "zh-tw"]; + function bj(e, t, n) { + const i = e.toLowerCase(), s = /^([a-z]+)(?:[_-]([a-z]+))?$/.exec(i); + if (!s) { + n && n.push(Ho(p.Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1, "en", "ja-jp")); + return; + } + const o = s[1], c = s[2]; + as(UY, i) && !_(o, c, n) && _( + o, + /*territory*/ + void 0, + n + ), QX(e); + function _(u, m, g) { + const h = Hs(t.getExecutingFilePath()), S = Hn(h); + let T = Ln(S, u); + if (m && (T = T + "-" + m), T = t.resolvePath(Ln(T, "diagnosticMessages.generated.json")), !t.fileExists(T)) + return !1; + let C = ""; + try { + C = t.readFile(T); + } catch { + return g && g.push(Ho(p.Unable_to_open_file_0, T)), !1; + } + try { + see(JSON.parse(C)); + } catch { + return g && g.push(Ho(p.Corrupted_locale_file_0, T)), !1; + } + return !0; + } + } + function Jo(e, t) { + if (e) + for (; e.original !== void 0; ) + e = e.original; + return !e || !t || t(e) ? e : void 0; + } + function ur(e, t) { + for (; e; ) { + const n = t(e); + if (n === "quit") + return; + if (n) + return e; + e = e.parent; + } + } + function p4(e) { + return (e.flags & 16) === 0; + } + function ls(e, t) { + if (e === void 0 || p4(e)) + return e; + for (e = e.original; e; ) { + if (p4(e)) + return !t || t(e) ? e : void 0; + e = e.original; + } + } + function Zo(e) { + return e.length >= 2 && e.charCodeAt(0) === 95 && e.charCodeAt(1) === 95 ? "_" + e : e; + } + function Pi(e) { + const t = e; + return t.length >= 3 && t.charCodeAt(0) === 95 && t.charCodeAt(1) === 95 && t.charCodeAt(2) === 95 ? t.substr(1) : t; + } + function An(e) { + return Pi(e.escapedText); + } + function aS(e) { + const t = sS(e.escapedText); + return t ? jn(t, f_) : void 0; + } + function _c(e) { + return e.valueDeclaration && Fu(e.valueDeclaration) ? An(e.valueDeclaration.name) : Pi(e.escapedName); + } + function jge(e) { + const t = e.parent.parent; + if (t) { + if (bl(t)) + return Sj(t); + switch (t.kind) { + case 243: + if (t.declarationList && t.declarationList.declarations[0]) + return Sj(t.declarationList.declarations[0]); + break; + case 244: + let n = t.expression; + switch (n.kind === 226 && n.operatorToken.kind === 64 && (n = n.left), n.kind) { + case 211: + return n.name; + case 212: + const i = n.argumentExpression; + if (Me(i)) + return i; + } + break; + case 217: + return Sj(t.expression); + case 256: { + if (bl(t.statement) || ct(t.statement)) + return Sj(t.statement); + break; + } + } + } + } + function Sj(e) { + const t = is(e); + return t && Me(t) ? t : void 0; + } + function FP(e, t) { + return !!(Hl(e) && Me(e.name) && An(e.name) === An(t) || pc(e) && at(e.declarationList.declarations, (n) => FP(n, t))); + } + function VY(e) { + return e.name || jge(e); + } + function Hl(e) { + return !!e.name; + } + function t7(e) { + switch (e.kind) { + case 80: + return e; + case 348: + case 341: { + const { name: n } = e; + if (n.kind === 166) + return n.right; + break; + } + case 213: + case 226: { + const n = e; + switch (Sc(n)) { + case 1: + case 4: + case 5: + case 3: + return Z7(n.left); + case 7: + case 8: + case 9: + return n.arguments[1]; + default: + return; + } + } + case 346: + return VY(e); + case 340: + return jge(e); + case 277: { + const { expression: n } = e; + return Me(n) ? n : void 0; + } + case 212: + const t = e; + if (Y7(t)) + return t.argumentExpression; + } + return e.name; + } + function is(e) { + if (e !== void 0) + return t7(e) || (po(e) || bo(e) || Gc(e) ? r7(e) : void 0); + } + function r7(e) { + if (e.parent) { + if (Xc(e.parent) || ma(e.parent)) + return e.parent.name; + if (fn(e.parent) && e === e.parent.right) { + if (Me(e.parent.left)) + return e.parent.left; + if (vo(e.parent.left)) + return Z7(e.parent.left); + } else if (Kn(e.parent) && Me(e.parent.name)) + return e.parent.name; + } else return; + } + function Oy(e) { + if (Pf(e)) + return kn(e.modifiers, ll); + } + function Tb(e) { + if ($n( + e, + 98303 + /* Modifier */ + )) + return kn(e.modifiers, ia); + } + function Bge(e, t) { + if (e.name) + if (Me(e.name)) { + const n = e.name.escapedText; + return i7(e.parent, t).filter((i) => Af(i) && Me(i.name) && i.name.escapedText === n); + } else { + const n = e.parent.parameters.indexOf(e); + E.assert(n > -1, "Parameters should always be in their parents' parameter list"); + const i = i7(e.parent, t).filter(Af); + if (n < i.length) + return [i[n]]; + } + return He; + } + function gC(e) { + return Bge( + e, + /*noCache*/ + !1 + ); + } + function qY(e) { + return Bge( + e, + /*noCache*/ + !0 + ); + } + function Jge(e, t) { + const n = e.name.escapedText; + return i7(e.parent, t).filter((i) => Bp(i) && i.typeParameters.some((s) => s.name.escapedText === n)); + } + function HY(e) { + return Jge( + e, + /*noCache*/ + !1 + ); + } + function GY(e) { + return Jge( + e, + /*noCache*/ + !0 + ); + } + function $Y(e) { + return !!Np(e, Af); + } + function XY(e) { + return Np(e, Xx); + } + function QY(e) { + return s7(e, kF); + } + function Tj(e) { + return Np(e, Ite); + } + function zge(e) { + return Np(e, nz); + } + function YY(e) { + return Np( + e, + nz, + /*noCache*/ + !0 + ); + } + function Wge(e) { + return Np(e, iz); + } + function ZY(e) { + return Np( + e, + iz, + /*noCache*/ + !0 + ); + } + function Uge(e) { + return Np(e, sz); + } + function KY(e) { + return Np( + e, + sz, + /*noCache*/ + !0 + ); + } + function Vge(e) { + return Np(e, az); + } + function eZ(e) { + return Np( + e, + az, + /*noCache*/ + !0 + ); + } + function tZ(e) { + return Np( + e, + TF, + /*noCache*/ + !0 + ); + } + function xj(e) { + return Np(e, oz); + } + function rZ(e) { + return Np( + e, + oz, + /*noCache*/ + !0 + ); + } + function kj(e) { + return Np(e, yN); + } + function n7(e) { + return Np(e, cz); + } + function nZ(e) { + return Np(e, xF); + } + function qge(e) { + return Np(e, Bp); + } + function Cj(e) { + return Np(e, CF); + } + function Y1(e) { + const t = Np(e, DD); + if (t && t.typeExpression && t.typeExpression.type) + return t; + } + function Ly(e) { + let t = Np(e, DD); + return !t && Ii(e) && (t = Pn(gC(e), (n) => !!n.typeExpression)), t && t.typeExpression && t.typeExpression.type; + } + function OP(e) { + const t = nZ(e); + if (t && t.typeExpression) + return t.typeExpression.type; + const n = Y1(e); + if (n && n.typeExpression) { + const i = n.typeExpression.type; + if (Qu(i)) { + const s = Pn(i.members, Jx); + return s && s.type; + } + if (ng(i) || a6(i)) + return i.type; + } + } + function i7(e, t) { + var n; + if (!x3(e)) return He; + let i = (n = e.jsDoc) == null ? void 0 : n.jsDocCache; + if (i === void 0 || t) { + const s = vB(e, t); + E.assert(s.length < 2 || s[0] !== s[1]), i = na(s, (o) => Pd(o) ? o.tags : o), t || (e.jsDoc ?? (e.jsDoc = []), e.jsDoc.jsDocCache = i); + } + return i; + } + function Z1(e) { + return i7( + e, + /*noCache*/ + !1 + ); + } + function Np(e, t, n) { + return Pn(i7(e, n), t); + } + function s7(e, t) { + return Z1(e).filter(t); + } + function Hge(e, t) { + return Z1(e).filter((n) => n.kind === t); + } + function LP(e) { + return typeof e == "string" ? e : e?.map((t) => t.kind === 321 ? t.text : TFe(t)).join(""); + } + function TFe(e) { + const t = e.kind === 324 ? "link" : e.kind === 325 ? "linkcode" : "linkplain", n = e.name ? G_(e.name) : "", i = e.name && (e.text === "" || e.text.startsWith("://")) ? "" : " "; + return `{@${t} ${n}${i}${e.text}}`; + } + function My(e) { + if (B0(e)) { + if (o6(e.parent)) { + const t = LC(e.parent); + if (t && Ir(t.tags)) + return na(t.tags, (n) => Bp(n) ? n.typeParameters : void 0); + } + return He; + } + if (Fp(e)) + return E.assert( + e.parent.kind === 320 + /* JSDoc */ + ), na(e.parent.tags, (t) => Bp(t) ? t.typeParameters : void 0); + if (e.typeParameters || Vte(e) && e.typeParameters) + return e.typeParameters; + if (an(e)) { + const t = d5(e); + if (t.length) + return t; + const n = Ly(e); + if (n && ng(n) && n.typeParameters) + return n.typeParameters; + } + return He; + } + function hC(e) { + return e.constraint ? e.constraint : Bp(e.parent) && e === e.parent.typeParameters[0] ? e.parent.constraint : void 0; + } + function Lg(e) { + return e.kind === 80 || e.kind === 81; + } + function MP(e) { + return e.kind === 178 || e.kind === 177; + } + function a7(e) { + return Tn(e) && !!(e.flags & 64); + } + function Ej(e) { + return fo(e) && !!(e.flags & 64); + } + function oS(e) { + return Fs(e) && !!(e.flags & 64); + } + function vu(e) { + const t = e.kind; + return !!(e.flags & 64) && (t === 211 || t === 212 || t === 213 || t === 235); + } + function d4(e) { + return vu(e) && !Hx(e) && !!e.questionDotToken; + } + function o7(e) { + return d4(e.parent) && e.parent.expression === e; + } + function m4(e) { + return !vu(e.parent) || d4(e.parent) || e !== e.parent.expression; + } + function Dj(e) { + return e.kind === 226 && e.operatorToken.kind === 61; + } + function Kp(e) { + return Y_(e) && Me(e.typeName) && e.typeName.escapedText === "const" && !e.typeArguments; + } + function ed(e) { + return xc( + e, + 8 + /* PartiallyEmittedExpressions */ + ); + } + function c7(e) { + return Hx(e) && !!(e.flags & 64); + } + function g4(e) { + return e.kind === 252 || e.kind === 251; + } + function wj(e) { + return e.kind === 280 || e.kind === 279; + } + function h4(e) { + return e.kind === 348 || e.kind === 341; + } + function l7(e) { + return e >= 166; + } + function Pj(e) { + return e >= 0 && e <= 165; + } + function rx(e) { + return Pj(e.kind); + } + function xb(e) { + return ro(e, "pos") && ro(e, "end"); + } + function y4(e) { + return 9 <= e && e <= 15; + } + function cS(e) { + return y4(e.kind); + } + function Nj(e) { + switch (e.kind) { + case 210: + case 209: + case 14: + case 218: + case 231: + return !0; + } + return !1; + } + function Ry(e) { + return 15 <= e && e <= 18; + } + function iZ(e) { + return Ry(e.kind); + } + function u7(e) { + const t = e.kind; + return t === 17 || t === 18; + } + function jy(e) { + return ju(e) || Tu(e); + } + function yC(e) { + switch (e.kind) { + case 276: + return e.isTypeOnly || e.parent.parent.isTypeOnly; + case 274: + return e.parent.isTypeOnly; + case 273: + case 271: + return e.isTypeOnly; + } + return !1; + } + function sZ(e) { + switch (e.kind) { + case 281: + return e.isTypeOnly || e.parent.parent.isTypeOnly; + case 278: + return e.isTypeOnly && !!e.moduleSpecifier && !e.exportClause; + case 280: + return e.parent.isTypeOnly; + } + return !1; + } + function x0(e) { + return yC(e) || sZ(e); + } + function aZ(e) { + return ur(e, x0) !== void 0; + } + function Aj(e) { + return e.kind === 11 || Ry(e.kind); + } + function oZ(e) { + return ea(e) || Me(e); + } + function Fo(e) { + var t; + return Me(e) && ((t = e.emitNode) == null ? void 0 : t.autoGenerate) !== void 0; + } + function lS(e) { + var t; + return Ni(e) && ((t = e.emitNode) == null ? void 0 : t.autoGenerate) !== void 0; + } + function RP(e) { + const t = e.emitNode.autoGenerate.flags; + return !!(t & 32) && !!(t & 16) && !!(t & 8); + } + function Fu(e) { + return (ss(e) || ix(e)) && Ni(e.name); + } + function vC(e) { + return Tn(e) && Ni(e.name); + } + function By(e) { + switch (e) { + case 128: + case 129: + case 134: + case 87: + case 138: + case 90: + case 95: + case 103: + case 125: + case 123: + case 124: + case 148: + case 126: + case 147: + case 164: + return !0; + } + return !1; + } + function v4(e) { + return !!(Sx(e) & 31); + } + function Ij(e) { + return v4(e) || e === 126 || e === 164 || e === 129; + } + function ia(e) { + return By(e.kind); + } + function Hu(e) { + const t = e.kind; + return t === 166 || t === 80; + } + function Fc(e) { + const t = e.kind; + return t === 80 || t === 81 || t === 11 || t === 9 || t === 167; + } + function uS(e) { + const t = e.kind; + return t === 80 || t === 206 || t === 207; + } + function vs(e) { + return !!e && nx(e.kind); + } + function bC(e) { + return !!e && (nx(e.kind) || nc(e)); + } + function Ka(e) { + return e && Gge(e.kind); + } + function b4(e) { + return e.kind === 112 || e.kind === 97; + } + function Gge(e) { + switch (e) { + case 262: + case 174: + case 176: + case 177: + case 178: + case 218: + case 219: + return !0; + default: + return !1; + } + } + function nx(e) { + switch (e) { + case 173: + case 179: + case 323: + case 180: + case 181: + case 184: + case 317: + case 185: + return !0; + default: + return Gge(e); + } + } + function Fj(e) { + return Ei(e) || dm(e) || ks(e) && vs(e.parent); + } + function sl(e) { + const t = e.kind; + return t === 176 || t === 172 || t === 174 || t === 177 || t === 178 || t === 181 || t === 175 || t === 240; + } + function Zn(e) { + return e && (e.kind === 263 || e.kind === 231); + } + function Jy(e) { + return e && (e.kind === 177 || e.kind === 178); + } + function l_(e) { + return ss(e) && cm(e); + } + function cZ(e) { + return an(e) && Fx(e) ? (!Fb(e) || !Qy(e.expression)) && !vS( + e, + /*excludeThisKeyword*/ + !0 + ) : e.parent && Zn(e.parent) && ss(e) && !cm(e); + } + function ix(e) { + switch (e.kind) { + case 174: + case 177: + case 178: + return !0; + default: + return !1; + } + } + function Oo(e) { + return ia(e) || ll(e); + } + function kb(e) { + const t = e.kind; + return t === 180 || t === 179 || t === 171 || t === 173 || t === 181 || t === 177 || t === 178 || t === 354; + } + function _7(e) { + return kb(e) || sl(e); + } + function Eh(e) { + const t = e.kind; + return t === 303 || t === 304 || t === 305 || t === 174 || t === 177 || t === 178; + } + function fi(e) { + return oJ(e.kind); + } + function lZ(e) { + switch (e.kind) { + case 184: + case 185: + return !0; + } + return !1; + } + function Ds(e) { + if (e) { + const t = e.kind; + return t === 207 || t === 206; + } + return !1; + } + function S4(e) { + const t = e.kind; + return t === 209 || t === 210; + } + function f7(e) { + const t = e.kind; + return t === 208 || t === 232; + } + function jP(e) { + switch (e.kind) { + case 260: + case 169: + case 208: + return !0; + } + return !1; + } + function uZ(e) { + return Kn(e) || Ii(e) || JP(e) || zP(e); + } + function BP(e) { + return Oj(e) || Lj(e); + } + function Oj(e) { + switch (e.kind) { + case 206: + case 210: + return !0; + } + return !1; + } + function JP(e) { + switch (e.kind) { + case 208: + case 303: + // AssignmentProperty + case 304: + // AssignmentProperty + case 305: + return !0; + } + return !1; + } + function Lj(e) { + switch (e.kind) { + case 207: + case 209: + return !0; + } + return !1; + } + function zP(e) { + switch (e.kind) { + case 208: + case 232: + // Elision + case 230: + // AssignmentRestElement + case 209: + // ArrayAssignmentPattern + case 210: + // ObjectAssignmentPattern + case 80: + // DestructuringAssignmentTarget + case 211: + // DestructuringAssignmentTarget + case 212: + return !0; + } + return Cl( + e, + /*excludeCompoundAssignment*/ + !0 + ); + } + function _Z(e) { + const t = e.kind; + return t === 211 || t === 166 || t === 205; + } + function WP(e) { + const t = e.kind; + return t === 211 || t === 166; + } + function Mj(e) { + return Cb(e) || Ky(e); + } + function Cb(e) { + switch (e.kind) { + case 213: + case 214: + case 215: + case 170: + case 286: + case 285: + case 289: + return !0; + case 226: + return e.operatorToken.kind === 104; + default: + return !1; + } + } + function tm(e) { + return e.kind === 213 || e.kind === 214; + } + function sx(e) { + const t = e.kind; + return t === 228 || t === 15; + } + function u_(e) { + return $ge(ed(e).kind); + } + function $ge(e) { + switch (e) { + case 211: + case 212: + case 214: + case 213: + case 284: + case 285: + case 288: + case 215: + case 209: + case 217: + case 210: + case 231: + case 218: + case 80: + case 81: + // technically this is only an Expression if it's in a `#field in expr` BinaryExpression + case 14: + case 9: + case 10: + case 11: + case 15: + case 228: + case 97: + case 106: + case 110: + case 112: + case 108: + case 235: + case 233: + case 236: + case 102: + // technically this is only an Expression if it's in a CallExpression + case 282: + return !0; + default: + return !1; + } + } + function Rj(e) { + return Xge(ed(e).kind); + } + function Xge(e) { + switch (e) { + case 224: + case 225: + case 220: + case 221: + case 222: + case 223: + case 216: + return !0; + default: + return $ge(e); + } + } + function fZ(e) { + switch (e.kind) { + case 225: + return !0; + case 224: + return e.operator === 46 || e.operator === 47; + default: + return !1; + } + } + function pZ(e) { + switch (e.kind) { + case 106: + case 112: + case 97: + case 224: + return !0; + default: + return cS(e); + } + } + function ct(e) { + return xFe(ed(e).kind); + } + function xFe(e) { + switch (e) { + case 227: + case 229: + case 219: + case 226: + case 230: + case 234: + case 232: + case 356: + case 355: + case 238: + return !0; + default: + return Xge(e); + } + } + function Eb(e) { + const t = e.kind; + return t === 216 || t === 234; + } + function zy(e, t) { + switch (e.kind) { + case 248: + case 249: + case 250: + case 246: + case 247: + return !0; + case 256: + return t && zy(e.statement, t); + } + return !1; + } + function kFe(e) { + return Io(e) || wc(e); + } + function dZ(e) { + return at(e, kFe); + } + function p7(e) { + return !ZP(e) && !Io(e) && !$n( + e, + 32 + /* Export */ + ) && !Ou(e); + } + function UP(e) { + return ZP(e) || Io(e) || $n( + e, + 32 + /* Export */ + ); + } + function _S(e) { + return e.kind === 249 || e.kind === 250; + } + function d7(e) { + return ks(e) || ct(e); + } + function jj(e) { + return ks(e); + } + function Kf(e) { + return Il(e) || ct(e); + } + function mZ(e) { + const t = e.kind; + return t === 268 || t === 267 || t === 80; + } + function Qge(e) { + const t = e.kind; + return t === 268 || t === 267; + } + function Yge(e) { + const t = e.kind; + return t === 80 || t === 267; + } + function Bj(e) { + const t = e.kind; + return t === 275 || t === 274; + } + function VP(e) { + return e.kind === 267 || e.kind === 266; + } + function bd(e) { + switch (e.kind) { + case 219: + case 226: + case 208: + case 213: + case 179: + case 263: + case 231: + case 175: + case 176: + case 185: + case 180: + case 212: + case 266: + case 306: + case 277: + case 278: + case 281: + case 262: + case 218: + case 184: + case 177: + case 80: + case 273: + case 271: + case 276: + case 181: + case 264: + case 338: + case 340: + case 317: + case 341: + case 348: + case 323: + case 346: + case 322: + case 291: + case 292: + case 293: + case 200: + case 174: + case 173: + case 267: + case 202: + case 280: + case 270: + case 274: + case 214: + case 15: + case 9: + case 210: + case 169: + case 211: + case 303: + case 172: + case 171: + case 178: + case 304: + case 307: + case 305: + case 11: + case 265: + case 187: + case 168: + case 260: + return !0; + default: + return !1; + } + } + function Ym(e) { + switch (e.kind) { + case 219: + case 241: + case 179: + case 269: + case 299: + case 175: + case 194: + case 176: + case 185: + case 180: + case 248: + case 249: + case 250: + case 262: + case 218: + case 184: + case 177: + case 181: + case 338: + case 340: + case 317: + case 323: + case 346: + case 200: + case 174: + case 173: + case 267: + case 178: + case 307: + case 265: + return !0; + default: + return !1; + } + } + function CFe(e) { + return e === 219 || e === 208 || e === 263 || e === 231 || e === 175 || e === 176 || e === 266 || e === 306 || e === 281 || e === 262 || e === 218 || e === 177 || e === 273 || e === 271 || e === 276 || e === 264 || e === 291 || e === 174 || e === 173 || e === 267 || e === 270 || e === 274 || e === 280 || e === 169 || e === 303 || e === 172 || e === 171 || e === 178 || e === 304 || e === 265 || e === 168 || e === 260 || e === 346 || e === 338 || e === 348 || e === 202; + } + function gZ(e) { + return e === 262 || e === 282 || e === 263 || e === 264 || e === 265 || e === 266 || e === 267 || e === 272 || e === 271 || e === 278 || e === 277 || e === 270; + } + function hZ(e) { + return e === 252 || e === 251 || e === 259 || e === 246 || e === 244 || e === 242 || e === 249 || e === 250 || e === 248 || e === 245 || e === 256 || e === 253 || e === 255 || e === 257 || e === 258 || e === 243 || e === 247 || e === 254 || e === 353; + } + function bl(e) { + return e.kind === 168 ? e.parent && e.parent.kind !== 345 || an(e) : CFe(e.kind); + } + function yZ(e) { + return gZ(e.kind); + } + function qP(e) { + return hZ(e.kind); + } + function xi(e) { + const t = e.kind; + return hZ(t) || gZ(t) || EFe(e); + } + function EFe(e) { + return e.kind !== 241 || e.parent !== void 0 && (e.parent.kind === 258 || e.parent.kind === 299) ? !1 : !Nb(e); + } + function vZ(e) { + const t = e.kind; + return hZ(t) || gZ(t) || t === 241; + } + function bZ(e) { + const t = e.kind; + return t === 283 || t === 166 || t === 80; + } + function T4(e) { + const t = e.kind; + return t === 110 || t === 80 || t === 211 || t === 295; + } + function HP(e) { + const t = e.kind; + return t === 284 || t === 294 || t === 285 || t === 12 || t === 288; + } + function m7(e) { + const t = e.kind; + return t === 291 || t === 293; + } + function SZ(e) { + const t = e.kind; + return t === 11 || t === 294; + } + function bu(e) { + const t = e.kind; + return t === 286 || t === 285; + } + function TZ(e) { + const t = e.kind; + return t === 286 || t === 285 || t === 289; + } + function g7(e) { + const t = e.kind; + return t === 296 || t === 297; + } + function SC(e) { + return e.kind >= 309 && e.kind <= 351; + } + function h7(e) { + return e.kind === 320 || e.kind === 319 || e.kind === 321 || ax(e) || TC(e) || RS(e) || B0(e); + } + function TC(e) { + return e.kind >= 327 && e.kind <= 351; + } + function Mg(e) { + return e.kind === 178; + } + function k0(e) { + return e.kind === 177; + } + function uf(e) { + if (!x3(e)) return !1; + const { jsDoc: t } = e; + return !!t && t.length > 0; + } + function y7(e) { + return !!e.type; + } + function C0(e) { + return !!e.initializer; + } + function fS(e) { + switch (e.kind) { + case 260: + case 169: + case 208: + case 172: + case 303: + case 306: + return !0; + default: + return !1; + } + } + function Jj(e) { + return e.kind === 291 || e.kind === 293 || Eh(e); + } + function v7(e) { + return e.kind === 183 || e.kind === 233; + } + var Zge = 1073741823; + function xZ(e) { + let t = Zge; + for (const n of e) { + if (!n.length) + continue; + let i = 0; + for (; i < n.length && i < t && Ig(n.charCodeAt(i)); i++) + ; + if (i < t && (t = i), t === 0) + return 0; + } + return t === Zge ? void 0 : t; + } + function Na(e) { + return e.kind === 11 || e.kind === 15; + } + function ax(e) { + return e.kind === 324 || e.kind === 325 || e.kind === 326; + } + function zj(e) { + const t = Co(e.parameters); + return !!t && Zm(t); + } + function Zm(e) { + const t = Af(e) ? e.typeExpression && e.typeExpression.type : e.type; + return e.dotDotDotToken !== void 0 || !!t && t.kind === 318; + } + function Kge(e, t) { + return t.text.substring(e.pos, e.end).includes("@internal"); + } + function kZ(e, t) { + t ?? (t = Cr(e)); + const n = ls(e); + if (n && n.kind === 169) { + const s = n.parent.parameters.indexOf(n), o = s > 0 ? n.parent.parameters[s - 1] : void 0, c = t.text, _ = o ? Wi( + // to handle + // ... parameters, /** @internal */ + // public param: string + Fy(c, aa( + c, + o.end + 1, + /*stopAfterLineBreak*/ + !1, + /*stopAtComments*/ + !0 + )), + Fg(c, e.pos) + ) : Fy(c, aa( + c, + e.pos, + /*stopAfterLineBreak*/ + !1, + /*stopAtComments*/ + !0 + )); + return at(_) && Kge(_a(_), t); + } + const i = n && cB(n, t); + return !!lr(i, (s) => Kge(s, t)); + } + var Wj = [], Wy = "tslib", x4 = 160, Uj = 1e6; + function Lo(e, t) { + const n = e.declarations; + if (n) { + for (const i of n) + if (i.kind === t) + return i; + } + } + function CZ(e, t) { + return kn(e.declarations || He, (n) => n.kind === t); + } + function Us(e) { + const t = /* @__PURE__ */ new Map(); + if (e) + for (const n of e) + t.set(n.escapedName, n); + return t; + } + function Rg(e) { + return (e.flags & 33554432) !== 0; + } + function ox(e) { + return !!(e.flags & 1536) && e.escapedName.charCodeAt(0) === 34; + } + var b7 = DFe(); + function DFe() { + var e = ""; + const t = (n) => e += n; + return { + getText: () => e, + write: t, + rawWrite: t, + writeKeyword: t, + writeOperator: t, + writePunctuation: t, + writeSpace: t, + writeStringLiteral: t, + writeLiteral: t, + writeParameter: t, + writeProperty: t, + writeSymbol: (n, i) => t(n), + writeTrailingSemicolon: t, + writeComment: t, + getTextPos: () => e.length, + getLine: () => 0, + getColumn: () => 0, + getIndent: () => 0, + isAtStartOfLine: () => !1, + hasTrailingComment: () => !1, + hasTrailingWhitespace: () => !!e.length && Ig(e.charCodeAt(e.length - 1)), + // Completely ignore indentation for string writers. And map newlines to + // a single space. + writeLine: () => e += " ", + increaseIndent: Ja, + decreaseIndent: Ja, + clear: () => e = "" + }; + } + function S7(e, t) { + return e.configFilePath !== t.configFilePath || wFe(e, t); + } + function wFe(e, t) { + return xC(e, t, Nz); + } + function EZ(e, t) { + return xC(e, t, pre); + } + function xC(e, t, n) { + return e !== t && n.some((i) => !V5(I5(e, i), I5(t, i))); + } + function DZ(e, t) { + for (; ; ) { + const n = t(e); + if (n === "quit") return; + if (n !== void 0) return n; + if (Ei(e)) return; + e = e.parent; + } + } + function al(e, t) { + const n = e.entries(); + for (const [i, s] of n) { + const o = t(s, i); + if (o) + return o; + } + } + function jg(e, t) { + const n = e.keys(); + for (const i of n) { + const s = t(i); + if (s) + return s; + } + } + function T7(e, t) { + e.forEach((n, i) => { + t.set(i, n); + }); + } + function kC(e) { + const t = b7.getText(); + try { + return e(b7), b7.getText(); + } finally { + b7.clear(), b7.writeKeyword(t); + } + } + function GP(e) { + return e.end - e.pos; + } + function Vj(e, t) { + return e.path === t.path && !e.prepend == !t.prepend && !e.circular == !t.circular; + } + function wZ(e, t) { + return e === t || e.resolvedModule === t.resolvedModule || !!e.resolvedModule && !!t.resolvedModule && e.resolvedModule.isExternalLibraryImport === t.resolvedModule.isExternalLibraryImport && e.resolvedModule.extension === t.resolvedModule.extension && e.resolvedModule.resolvedFileName === t.resolvedModule.resolvedFileName && e.resolvedModule.originalPath === t.resolvedModule.originalPath && PFe(e.resolvedModule.packageId, t.resolvedModule.packageId) && e.alternateResult === t.alternateResult; + } + function cx(e) { + return e.resolvedModule; + } + function x7(e) { + return e.resolvedTypeReferenceDirective; + } + function k7(e, t, n, i, s) { + var o; + const c = (o = t.getResolvedModule(e, n, i)) == null ? void 0 : o.alternateResult, _ = c && (Su(t.getCompilerOptions()) === 2 ? [p.There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setting_Consider_updating_to_node16_nodenext_or_bundler, [c]] : [ + p.There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings, + [c, c.includes(Kg + "@types/") ? `@types/${v6(s)}` : s] + ]), u = _ ? fs( + /*details*/ + void 0, + _[0], + ..._[1] + ) : t.typesPackageExists(s) ? fs( + /*details*/ + void 0, + p.If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1, + s, + v6(s) + ) : t.packageBundlesTypes(s) ? fs( + /*details*/ + void 0, + p.If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1, + s, + n + ) : fs( + /*details*/ + void 0, + p.Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0, + n, + v6(s) + ); + return u && (u.repopulateInfo = () => ({ moduleReference: n, mode: i, packageName: s === n ? void 0 : s })), u; + } + function qj(e) { + const t = $g(e.fileName), n = e.packageJsonScope, i = t === ".ts" ? ".mts" : t === ".js" ? ".mjs" : void 0, s = n && !n.contents.packageJsonContent.type ? i ? fs( + /*details*/ + void 0, + p.To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1, + i, + Ln(n.packageDirectory, "package.json") + ) : fs( + /*details*/ + void 0, + p.To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0, + Ln(n.packageDirectory, "package.json") + ) : i ? fs( + /*details*/ + void 0, + p.To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module, + i + ) : fs( + /*details*/ + void 0, + p.To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module + ); + return s.repopulateInfo = () => !0, s; + } + function PFe(e, t) { + return e === t || !!e && !!t && e.name === t.name && e.subModuleName === t.subModuleName && e.version === t.version && e.peerDependencies === t.peerDependencies; + } + function C7({ name: e, subModuleName: t }) { + return t ? `${e}/${t}` : e; + } + function K1(e) { + return `${C7(e)}@${e.version}${e.peerDependencies ?? ""}`; + } + function PZ(e, t) { + return e === t || e.resolvedTypeReferenceDirective === t.resolvedTypeReferenceDirective || !!e.resolvedTypeReferenceDirective && !!t.resolvedTypeReferenceDirective && e.resolvedTypeReferenceDirective.resolvedFileName === t.resolvedTypeReferenceDirective.resolvedFileName && !!e.resolvedTypeReferenceDirective.primary == !!t.resolvedTypeReferenceDirective.primary && e.resolvedTypeReferenceDirective.originalPath === t.resolvedTypeReferenceDirective.originalPath; + } + function Hj(e, t, n, i) { + E.assert(e.length === t.length); + for (let s = 0; s < e.length; s++) { + const o = t[s], c = e[s], _ = n(c); + if (_ ? !o || !i(_, o) : o) + return !0; + } + return !1; + } + function lx(e) { + return NFe(e), (e.flags & 1048576) !== 0; + } + function NFe(e) { + e.flags & 2097152 || ((e.flags & 262144 || ms(e, lx)) && (e.flags |= 1048576), e.flags |= 2097152); + } + function Cr(e) { + for (; e && e.kind !== 307; ) + e = e.parent; + return e; + } + function $P(e) { + return Cr(e.valueDeclaration || tB(e)); + } + function k4(e, t) { + return !!e && (e.scriptKind === 1 || e.scriptKind === 2) && !e.checkJsDirective && t === void 0; + } + function NZ(e) { + switch (e.kind) { + case 241: + case 269: + case 248: + case 249: + case 250: + return !0; + } + return !1; + } + function Uy(e, t) { + return E.assert(e >= 0), Ag(t)[e]; + } + function ehe(e) { + const t = Cr(e), n = js(t, e.pos); + return `${t.fileName}(${n.line + 1},${n.character + 1})`; + } + function XP(e, t) { + E.assert(e >= 0); + const n = Ag(t), i = e, s = t.text; + if (i + 1 === n.length) + return s.length - 1; + { + const o = n[i]; + let c = n[i + 1] - 1; + for (E.assert(yu(s.charCodeAt(c))); o <= c && yu(s.charCodeAt(c)); ) + c--; + return c; + } + } + function E7(e, t, n) { + return !(n && n(t)) && !e.identifiers.has(t); + } + function tc(e) { + return e === void 0 ? !0 : e.pos === e.end && e.pos >= 0 && e.kind !== 1; + } + function Ap(e) { + return !tc(e); + } + function AZ(e, t) { + return Ao(e) ? t === e.expression : nc(e) ? t === e.modifiers : m_(e) ? t === e.initializer : ss(e) ? t === e.questionToken && l_(e) : Xc(e) ? t === e.modifiers || t === e.questionToken || t === e.exclamationToken || QP(e.modifiers, t, Oo) : _u(e) ? t === e.equalsToken || t === e.modifiers || t === e.questionToken || t === e.exclamationToken || QP(e.modifiers, t, Oo) : fc(e) ? t === e.exclamationToken : Go(e) ? t === e.typeParameters || t === e.type || QP(e.typeParameters, t, Ao) : cp(e) ? t === e.typeParameters || QP(e.typeParameters, t, Ao) : A_(e) ? t === e.typeParameters || t === e.type || QP(e.typeParameters, t, Ao) : hN(e) ? t === e.modifiers || QP(e.modifiers, t, Oo) : !1; + } + function QP(e, t, n) { + return !e || os(t) || !n(t) ? !1 : as(e, t); + } + function the(e, t, n) { + if (t === void 0 || t.length === 0) return e; + let i = 0; + for (; i < e.length && n(e[i]); ++i) + ; + return e.splice(i, 0, ...t), e; + } + function rhe(e, t, n) { + if (t === void 0) return e; + let i = 0; + for (; i < e.length && n(e[i]); ++i) + ; + return e.splice(i, 0, t), e; + } + function nhe(e) { + return nm(e) || !!(va(e) & 2097152); + } + function Bg(e, t) { + return the(e, t, nm); + } + function Gj(e, t) { + return the(e, t, nhe); + } + function ihe(e, t) { + return rhe(e, t, nm); + } + function pS(e, t) { + return rhe(e, t, nhe); + } + function $j(e, t, n) { + if (e.charCodeAt(t + 1) === 47 && t + 2 < n && e.charCodeAt(t + 2) === 47) { + const i = e.substring(t, n); + return !!(BFe.test(i) || WFe.test(i) || UFe.test(i) || JFe.test(i) || zFe.test(i) || VFe.test(i)); + } + return !1; + } + function D7(e, t) { + return e.charCodeAt(t + 1) === 42 && e.charCodeAt(t + 2) === 33; + } + function IZ(e, t) { + const n = new Map( + t.map((c) => [ + `${js(e, c.range.end).line}`, + c + ]) + ), i = /* @__PURE__ */ new Map(); + return { getUnusedExpectations: s, markUsed: o }; + function s() { + return Ki(n.entries()).filter(([c, _]) => _.type === 0 && !i.get(c)).map(([c, _]) => _); + } + function o(c) { + return n.has(`${c}`) ? (i.set(`${c}`, !0), !0) : !1; + } + } + function Vy(e, t, n) { + if (tc(e)) + return e.pos; + if (SC(e) || e.kind === 12) + return aa( + (t ?? Cr(e)).text, + e.pos, + /*stopAfterLineBreak*/ + !1, + /*stopAtComments*/ + !0 + ); + if (n && uf(e)) + return Vy(e.jsDoc[0], t); + if (e.kind === 352) { + t ?? (t = Cr(e)); + const i = Uc(lz(e, t)); + if (i) + return Vy(i, t, n); + } + return aa( + (t ?? Cr(e)).text, + e.pos, + /*stopAfterLineBreak*/ + !1, + /*stopAtComments*/ + !1, + $7(e) + ); + } + function Xj(e, t) { + const n = !tc(e) && Jp(e) ? gb(e.modifiers, ll) : void 0; + return n ? aa((t || Cr(e)).text, n.end) : Vy(e, t); + } + function FZ(e, t) { + const n = !tc(e) && Jp(e) && e.modifiers ? _a(e.modifiers) : void 0; + return n ? aa((t || Cr(e)).text, n.end) : Vy(e, t); + } + function Db(e, t, n = !1) { + return C4(e.text, t, n); + } + function AFe(e) { + return !!ur(e, hv); + } + function w7(e) { + return !!(wc(e) && e.exportClause && ig(e.exportClause) && Km(e.exportClause.name)); + } + function qy(e) { + return e.kind === 11 ? e.text : Pi(e.escapedText); + } + function wb(e) { + return e.kind === 11 ? Zo(e.text) : e.escapedText; + } + function Km(e) { + return (e.kind === 11 ? e.text : e.escapedText) === "default"; + } + function C4(e, t, n = !1) { + if (tc(t)) + return ""; + let i = e.substring(n ? t.pos : aa(e, t.pos), t.end); + return AFe(t) && (i = i.split(/\r\n|\n|\r/).map((s) => s.replace(/^\s*\*/, "").trimStart()).join(` +`)), i; + } + function qo(e, t = !1) { + return Db(Cr(e), e, t); + } + function IFe(e) { + return e.pos; + } + function CC(e, t) { + return Cy(e, t, IFe, uo); + } + function va(e) { + const t = e.emitNode; + return t && t.flags || 0; + } + function td(e) { + const t = e.emitNode; + return t && t.internalFlags || 0; + } + var Qj = /* @__PURE__ */ Iu( + () => new Map(Object.entries({ + Array: new Map(Object.entries({ + es2015: [ + "find", + "findIndex", + "fill", + "copyWithin", + "entries", + "keys", + "values" + ], + es2016: [ + "includes" + ], + es2019: [ + "flat", + "flatMap" + ], + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast", + "toReversed", + "toSorted", + "toSpliced", + "with" + ] + })), + Iterator: new Map(Object.entries({ + es2015: He + })), + AsyncIterator: new Map(Object.entries({ + es2015: He + })), + ArrayBuffer: new Map(Object.entries({ + es2024: [ + "maxByteLength", + "resizable", + "resize", + "detached", + "transfer", + "transferToFixedLength" + ] + })), + Atomics: new Map(Object.entries({ + es2017: [ + "add", + "and", + "compareExchange", + "exchange", + "isLockFree", + "load", + "or", + "store", + "sub", + "wait", + "notify", + "xor" + ], + es2024: [ + "waitAsync" + ] + })), + SharedArrayBuffer: new Map(Object.entries({ + es2017: [ + "byteLength", + "slice" + ], + es2024: [ + "growable", + "maxByteLength", + "grow" + ] + })), + AsyncIterable: new Map(Object.entries({ + es2018: He + })), + AsyncIterableIterator: new Map(Object.entries({ + es2018: He + })), + AsyncGenerator: new Map(Object.entries({ + es2018: He + })), + AsyncGeneratorFunction: new Map(Object.entries({ + es2018: He + })), + RegExp: new Map(Object.entries({ + es2015: [ + "flags", + "sticky", + "unicode" + ], + es2018: [ + "dotAll" + ], + es2024: [ + "unicodeSets" + ] + })), + Reflect: new Map(Object.entries({ + es2015: [ + "apply", + "construct", + "defineProperty", + "deleteProperty", + "get", + "getOwnPropertyDescriptor", + "getPrototypeOf", + "has", + "isExtensible", + "ownKeys", + "preventExtensions", + "set", + "setPrototypeOf" + ] + })), + ArrayConstructor: new Map(Object.entries({ + es2015: [ + "from", + "of" + ], + esnext: [ + "fromAsync" + ] + })), + ObjectConstructor: new Map(Object.entries({ + es2015: [ + "assign", + "getOwnPropertySymbols", + "keys", + "is", + "setPrototypeOf" + ], + es2017: [ + "values", + "entries", + "getOwnPropertyDescriptors" + ], + es2019: [ + "fromEntries" + ], + es2022: [ + "hasOwn" + ], + es2024: [ + "groupBy" + ] + })), + NumberConstructor: new Map(Object.entries({ + es2015: [ + "isFinite", + "isInteger", + "isNaN", + "isSafeInteger", + "parseFloat", + "parseInt" + ] + })), + Math: new Map(Object.entries({ + es2015: [ + "clz32", + "imul", + "sign", + "log10", + "log2", + "log1p", + "expm1", + "cosh", + "sinh", + "tanh", + "acosh", + "asinh", + "atanh", + "hypot", + "trunc", + "fround", + "cbrt" + ] + })), + Map: new Map(Object.entries({ + es2015: [ + "entries", + "keys", + "values" + ] + })), + MapConstructor: new Map(Object.entries({ + es2024: [ + "groupBy" + ] + })), + Set: new Map(Object.entries({ + es2015: [ + "entries", + "keys", + "values" + ], + esnext: [ + "union", + "intersection", + "difference", + "symmetricDifference", + "isSubsetOf", + "isSupersetOf", + "isDisjointFrom" + ] + })), + PromiseConstructor: new Map(Object.entries({ + es2015: [ + "all", + "race", + "reject", + "resolve" + ], + es2020: [ + "allSettled" + ], + es2021: [ + "any" + ], + es2024: [ + "withResolvers" + ] + })), + Symbol: new Map(Object.entries({ + es2015: [ + "for", + "keyFor" + ], + es2019: [ + "description" + ] + })), + WeakMap: new Map(Object.entries({ + es2015: [ + "entries", + "keys", + "values" + ] + })), + WeakSet: new Map(Object.entries({ + es2015: [ + "entries", + "keys", + "values" + ] + })), + String: new Map(Object.entries({ + es2015: [ + "codePointAt", + "includes", + "endsWith", + "normalize", + "repeat", + "startsWith", + "anchor", + "big", + "blink", + "bold", + "fixed", + "fontcolor", + "fontsize", + "italics", + "link", + "small", + "strike", + "sub", + "sup" + ], + es2017: [ + "padStart", + "padEnd" + ], + es2019: [ + "trimStart", + "trimEnd", + "trimLeft", + "trimRight" + ], + es2020: [ + "matchAll" + ], + es2021: [ + "replaceAll" + ], + es2022: [ + "at" + ], + es2024: [ + "isWellFormed", + "toWellFormed" + ] + })), + StringConstructor: new Map(Object.entries({ + es2015: [ + "fromCodePoint", + "raw" + ] + })), + DateTimeFormat: new Map(Object.entries({ + es2017: [ + "formatToParts" + ] + })), + Promise: new Map(Object.entries({ + es2015: He, + es2018: [ + "finally" + ] + })), + RegExpMatchArray: new Map(Object.entries({ + es2018: [ + "groups" + ] + })), + RegExpExecArray: new Map(Object.entries({ + es2018: [ + "groups" + ] + })), + Intl: new Map(Object.entries({ + es2018: [ + "PluralRules" + ] + })), + NumberFormat: new Map(Object.entries({ + es2018: [ + "formatToParts" + ] + })), + SymbolConstructor: new Map(Object.entries({ + es2020: [ + "matchAll" + ], + esnext: [ + "metadata", + "dispose", + "asyncDispose" + ] + })), + DataView: new Map(Object.entries({ + es2020: [ + "setBigInt64", + "setBigUint64", + "getBigInt64", + "getBigUint64" + ] + })), + BigInt: new Map(Object.entries({ + es2020: He + })), + RelativeTimeFormat: new Map(Object.entries({ + es2020: [ + "format", + "formatToParts", + "resolvedOptions" + ] + })), + Int8Array: new Map(Object.entries({ + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast", + "toReversed", + "toSorted", + "toSpliced", + "with" + ] + })), + Uint8Array: new Map(Object.entries({ + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast", + "toReversed", + "toSorted", + "toSpliced", + "with" + ] + })), + Uint8ClampedArray: new Map(Object.entries({ + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast", + "toReversed", + "toSorted", + "toSpliced", + "with" + ] + })), + Int16Array: new Map(Object.entries({ + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast", + "toReversed", + "toSorted", + "toSpliced", + "with" + ] + })), + Uint16Array: new Map(Object.entries({ + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast", + "toReversed", + "toSorted", + "toSpliced", + "with" + ] + })), + Int32Array: new Map(Object.entries({ + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast", + "toReversed", + "toSorted", + "toSpliced", + "with" + ] + })), + Uint32Array: new Map(Object.entries({ + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast", + "toReversed", + "toSorted", + "toSpliced", + "with" + ] + })), + Float32Array: new Map(Object.entries({ + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast", + "toReversed", + "toSorted", + "toSpliced", + "with" + ] + })), + Float64Array: new Map(Object.entries({ + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast", + "toReversed", + "toSorted", + "toSpliced", + "with" + ] + })), + BigInt64Array: new Map(Object.entries({ + es2020: He, + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast", + "toReversed", + "toSorted", + "toSpliced", + "with" + ] + })), + BigUint64Array: new Map(Object.entries({ + es2020: He, + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast", + "toReversed", + "toSorted", + "toSpliced", + "with" + ] + })), + Error: new Map(Object.entries({ + es2022: [ + "cause" + ] + })) + })) + ), OZ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.NeverAsciiEscape = 1] = "NeverAsciiEscape", e[e.JsxAttributeEscape = 2] = "JsxAttributeEscape", e[e.TerminateUnterminatedLiterals = 4] = "TerminateUnterminatedLiterals", e[e.AllowNumericSeparator = 8] = "AllowNumericSeparator", e))(OZ || {}); + function LZ(e, t, n) { + if (t && FFe(e, n)) + return Db(t, e); + switch (e.kind) { + case 11: { + const i = n & 2 ? MB : n & 1 || va(e) & 16777216 ? rg : a5; + return e.singleQuote ? "'" + i( + e.text, + 39 + /* singleQuote */ + ) + "'" : '"' + i( + e.text, + 34 + /* doubleQuote */ + ) + '"'; + } + case 15: + case 16: + case 17: + case 18: { + const i = n & 1 || va(e) & 16777216 ? rg : a5, s = e.rawText ?? OB(i( + e.text, + 96 + /* backtick */ + )); + switch (e.kind) { + case 15: + return "`" + s + "`"; + case 16: + return "`" + s + "${"; + case 17: + return "}" + s + "${"; + case 18: + return "}" + s + "`"; + } + break; + } + case 9: + case 10: + return e.text; + case 14: + return n & 4 && e.isUnterminated ? e.text + (e.text.charCodeAt(e.text.length - 1) === 92 ? " /" : "/") : e.text; + } + return E.fail(`Literal kind '${e.kind}' not accounted for.`); + } + function FFe(e, t) { + if (no(e) || !e.parent || t & 4 && e.isUnterminated) + return !1; + if (d_(e)) { + if (e.numericLiteralFlags & 26656) + return !1; + if (e.numericLiteralFlags & 512) + return !!(t & 8); + } + return !gD(e); + } + function MZ(e) { + return rs(e) ? `"${rg(e)}"` : "" + e; + } + function RZ(e) { + return Vc(e).replace(/^(\d)/, "_$1").replace(/\W/g, "_"); + } + function Yj(e) { + return (Ch(e) & 7) !== 0 || Zj(e); + } + function Zj(e) { + const t = om(e); + return t.kind === 260 && t.parent.kind === 299; + } + function Ou(e) { + return Lc(e) && (e.name.kind === 11 || eg(e)); + } + function P7(e) { + return Lc(e) && e.name.kind === 11; + } + function Kj(e) { + return Lc(e) && ea(e.name); + } + function OFe(e) { + return Lc(e) || Me(e); + } + function YP(e) { + return LFe(e.valueDeclaration); + } + function LFe(e) { + return !!e && e.kind === 267 && !e.body; + } + function jZ(e) { + return e.kind === 307 || e.kind === 267 || bC(e); + } + function eg(e) { + return !!(e.flags & 2048); + } + function Pb(e) { + return Ou(e) && eB(e); + } + function eB(e) { + switch (e.parent.kind) { + case 307: + return el(e.parent); + case 268: + return Ou(e.parent.parent) && Ei(e.parent.parent.parent) && !el(e.parent.parent.parent); + } + return !1; + } + function tB(e) { + var t; + return (t = e.declarations) == null ? void 0 : t.find((n) => !Pb(n) && !(Lc(n) && eg(n))); + } + function MFe(e) { + return e === 1 || e === 100 || e === 199; + } + function EC(e, t) { + return el(e) || MFe(Ru(t)) && !!e.commonJsModuleIndicator; + } + function rB(e, t) { + switch (e.scriptKind) { + case 1: + case 3: + case 2: + case 4: + break; + default: + return !1; + } + return e.isDeclarationFile ? !1 : !!(lu(t, "alwaysStrict") || zte(e.statements) || el(e) || Mp(t)); + } + function nB(e) { + return !!(e.flags & 33554432) || $n( + e, + 128 + /* Ambient */ + ); + } + function iB(e, t) { + switch (e.kind) { + case 307: + case 269: + case 299: + case 267: + case 248: + case 249: + case 250: + case 176: + case 174: + case 177: + case 178: + case 262: + case 218: + case 219: + case 172: + case 175: + return !0; + case 241: + return !bC(t); + } + return !1; + } + function sB(e) { + switch (E.type(e), e.kind) { + case 338: + case 346: + case 323: + return !0; + default: + return aB(e); + } + } + function aB(e) { + switch (E.type(e), e.kind) { + case 179: + case 180: + case 173: + case 181: + case 184: + case 185: + case 317: + case 263: + case 231: + case 264: + case 265: + case 345: + case 262: + case 174: + case 176: + case 177: + case 178: + case 218: + case 219: + return !0; + default: + return !1; + } + } + function ux(e) { + switch (e.kind) { + case 272: + case 271: + return !0; + default: + return !1; + } + } + function BZ(e) { + return ux(e) || Ib(e); + } + function JZ(e) { + return ux(e) || f3(e); + } + function N7(e) { + switch (e.kind) { + case 272: + case 271: + case 243: + case 263: + case 262: + case 267: + case 265: + case 264: + case 266: + return !0; + default: + return !1; + } + } + function zZ(e) { + return ZP(e) || Lc(e) || Ed(e) || _f(e); + } + function ZP(e) { + return ux(e) || wc(e); + } + function A7(e) { + return ur(e.parent, (t) => !!(sW(t) & 1)); + } + function Sd(e) { + return ur(e.parent, (t) => iB(t, t.parent)); + } + function WZ(e, t) { + let n = Sd(e); + for (; n; ) + t(n), n = Sd(n); + } + function co(e) { + return !e || GP(e) === 0 ? "(Missing)" : qo(e); + } + function UZ(e) { + return e.declaration ? co(e.declaration.parameters[0].name) : void 0; + } + function KP(e) { + return e.kind === 167 && !wf(e.expression); + } + function E4(e) { + var t; + switch (e.kind) { + case 80: + case 81: + return (t = e.emitNode) != null && t.autoGenerate ? void 0 : e.escapedText; + case 11: + case 9: + case 10: + case 15: + return Zo(e.text); + case 167: + return wf(e.expression) ? Zo(e.expression.text) : void 0; + case 295: + return Ix(e); + default: + return E.assertNever(e); + } + } + function _x(e) { + return E.checkDefined(E4(e)); + } + function G_(e) { + switch (e.kind) { + case 110: + return "this"; + case 81: + case 80: + return GP(e) === 0 ? An(e) : qo(e); + case 166: + return G_(e.left) + "." + G_(e.right); + case 211: + return Me(e.name) || Ni(e.name) ? G_(e.expression) + "." + G_(e.name) : E.assertNever(e.name); + case 311: + return G_(e.left) + "#" + G_(e.right); + case 295: + return G_(e.namespace) + ":" + G_(e.name); + default: + return E.assertNever(e); + } + } + function tn(e, t, ...n) { + const i = Cr(e); + return ep(i, e, t, ...n); + } + function DC(e, t, n, ...i) { + const s = aa(e.text, t.pos); + return ol(e, s, t.end - s, n, ...i); + } + function ep(e, t, n, ...i) { + const s = dS(e, t); + return ol(e, s.start, s.length, n, ...i); + } + function Jg(e, t, n, i) { + const s = dS(e, t); + return I7(e, s.start, s.length, n, i); + } + function e3(e, t, n, i) { + const s = aa(e.text, t.pos); + return I7(e, s, t.end - s, n, i); + } + function VZ(e, t, n) { + E.assertGreaterThanOrEqual(t, 0), E.assertGreaterThanOrEqual(n, 0), E.assertLessThanOrEqual(t, e.length), E.assertLessThanOrEqual(t + n, e.length); + } + function I7(e, t, n, i, s) { + return VZ(e.text, t, n), { + file: e, + start: t, + length: n, + code: i.code, + category: i.category, + messageText: i.next ? i : i.messageText, + relatedInformation: s, + canonicalHead: i.canonicalHead + }; + } + function oB(e, t, n) { + return { + file: e, + start: 0, + length: 0, + code: t.code, + category: t.category, + messageText: t.next ? t : t.messageText, + relatedInformation: n + }; + } + function qZ(e) { + return typeof e.messageText == "string" ? { + code: e.code, + category: e.category, + messageText: e.messageText, + next: e.next + } : e.messageText; + } + function HZ(e, t, n) { + return { + file: e, + start: t.pos, + length: t.end - t.pos, + code: n.code, + category: n.category, + messageText: n.message + }; + } + function GZ(e, ...t) { + return { + code: e.code, + messageText: Dx(e, ...t) + }; + } + function rm(e, t) { + const n = Og( + e.languageVersion, + /*skipTrivia*/ + !0, + e.languageVariant, + e.text, + /*onError*/ + void 0, + t + ); + n.scan(); + const i = n.getTokenStart(); + return bc(i, n.getTokenEnd()); + } + function $Z(e, t) { + const n = Og( + e.languageVersion, + /*skipTrivia*/ + !0, + e.languageVariant, + e.text, + /*onError*/ + void 0, + t + ); + return n.scan(), n.getToken(); + } + function RFe(e, t) { + const n = aa(e.text, t.pos); + if (t.body && t.body.kind === 241) { + const { line: i } = js(e, t.body.pos), { line: s } = js(e, t.body.end); + if (i < s) + return ql(n, XP(i, e) - n + 1); + } + return bc(n, t.end); + } + function dS(e, t) { + let n = t; + switch (t.kind) { + case 307: { + const o = aa( + e.text, + 0, + /*stopAfterLineBreak*/ + !1 + ); + return o === e.text.length ? ql(0, 0) : rm(e, o); + } + // This list is a work in progress. Add missing node kinds to improve their error + // spans. + case 260: + case 208: + case 263: + case 231: + case 264: + case 267: + case 266: + case 306: + case 262: + case 218: + case 174: + case 177: + case 178: + case 265: + case 172: + case 171: + case 274: + n = t.name; + break; + case 219: + return RFe(e, t); + case 296: + case 297: { + const o = aa(e.text, t.pos), c = t.statements.length > 0 ? t.statements[0].pos : t.end; + return bc(o, c); + } + case 253: + case 229: { + const o = aa(e.text, t.pos); + return rm(e, o); + } + case 238: { + const o = aa(e.text, t.expression.end); + return rm(e, o); + } + case 350: { + const o = aa(e.text, t.tagName.pos); + return rm(e, o); + } + case 176: { + const o = t, c = aa(e.text, o.pos), _ = Og( + e.languageVersion, + /*skipTrivia*/ + !0, + e.languageVariant, + e.text, + /*onError*/ + void 0, + c + ); + let u = _.scan(); + for (; u !== 137 && u !== 1; ) + u = _.scan(); + const m = _.getTokenEnd(); + return bc(c, m); + } + } + if (n === void 0) + return rm(e, t.pos); + E.assert(!Pd(n)); + const i = tc(n), s = i || Mx(t) ? n.pos : aa(e.text, n.pos); + return i ? (E.assert(s === n.pos, "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"), E.assert(s === n.end, "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")) : (E.assert(s >= n.pos, "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"), E.assert(s <= n.end, "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")), bc(s, n.end); + } + function E0(e) { + return e.kind === 307 && !$_(e); + } + function $_(e) { + return (e.externalModuleIndicator || e.commonJsModuleIndicator) !== void 0; + } + function tp(e) { + return e.scriptKind === 6; + } + function ev(e) { + return !!(Q1(e) & 4096); + } + function t3(e) { + return !!(Q1(e) & 8 && !H_(e, e.parent)); + } + function r3(e) { + return (Ch(e) & 7) === 6; + } + function n3(e) { + return (Ch(e) & 7) === 4; + } + function wC(e) { + return (Ch(e) & 7) === 2; + } + function XZ(e) { + const t = Ch(e) & 7; + return t === 2 || t === 4 || t === 6; + } + function F7(e) { + return (Ch(e) & 7) === 1; + } + function mS(e) { + return e.kind === 213 && e.expression.kind === 108; + } + function _f(e) { + return e.kind === 213 && e.expression.kind === 102; + } + function PC(e) { + return SD(e) && e.keywordToken === 102 && e.name.escapedText === "meta"; + } + function Dh(e) { + return Ed(e) && M0(e.argument) && ea(e.argument.literal); + } + function nm(e) { + return e.kind === 244 && e.expression.kind === 11; + } + function i3(e) { + return !!(va(e) & 2097152); + } + function O7(e) { + return i3(e) && Tc(e); + } + function jFe(e) { + return Me(e.name) && !e.initializer; + } + function L7(e) { + return i3(e) && pc(e) && Ri(e.declarationList.declarations, jFe); + } + function cB(e, t) { + return e.kind !== 12 ? Fg(t.text, e.pos) : void 0; + } + function lB(e, t) { + const n = e.kind === 169 || e.kind === 168 || e.kind === 218 || e.kind === 219 || e.kind === 217 || e.kind === 260 || e.kind === 281 ? Wi(Fy(t, e.pos), Fg(t, e.pos)) : Fg(t, e.pos); + return kn( + n, + (i) => i.end <= e.end && // Due to parse errors sometime empty parameter may get comments assigned to it that end up not in parameter range + t.charCodeAt(i.pos + 1) === 42 && t.charCodeAt(i.pos + 2) === 42 && t.charCodeAt(i.pos + 3) !== 47 + /* slash */ + ); + } + var BFe = /^\/\/\/\s*/, JFe = /^\/\/\/\s*/, zFe = /^\/\/\/\s*/, WFe = /^\/\/\/\s*/, UFe = /^\/\/\/\s*/, VFe = /^\/\/\/\s*/; + function im(e) { + if (182 <= e.kind && e.kind <= 205) + return !0; + switch (e.kind) { + case 133: + case 159: + case 150: + case 163: + case 154: + case 136: + case 155: + case 151: + case 157: + case 106: + case 146: + return !0; + case 116: + return e.parent.kind !== 222; + case 233: + return she(e); + case 168: + return e.parent.kind === 200 || e.parent.kind === 195; + // Identifiers and qualified names may be type nodes, depending on their context. Climb + // above them to find the lowest container + case 80: + (e.parent.kind === 166 && e.parent.right === e || e.parent.kind === 211 && e.parent.name === e) && (e = e.parent), E.assert(e.kind === 80 || e.kind === 166 || e.kind === 211, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'."); + // falls through + case 166: + case 211: + case 110: { + const { parent: t } = e; + if (t.kind === 186) + return !1; + if (t.kind === 205) + return !t.isTypeOf; + if (182 <= t.kind && t.kind <= 205) + return !0; + switch (t.kind) { + case 233: + return she(t); + case 168: + return e === t.constraint; + case 345: + return e === t.constraint; + case 172: + case 171: + case 169: + case 260: + return e === t.type; + case 262: + case 218: + case 219: + case 176: + case 174: + case 173: + case 177: + case 178: + return e === t.type; + case 179: + case 180: + case 181: + return e === t.type; + case 216: + return e === t.type; + case 213: + case 214: + case 215: + return as(t.typeArguments, e); + } + } + } + return !1; + } + function she(e) { + return kF(e.parent) || Xx(e.parent) || Z_(e.parent) && !h5(e); + } + function Hy(e, t) { + return n(e); + function n(i) { + switch (i.kind) { + case 253: + return t(i); + case 269: + case 241: + case 245: + case 246: + case 247: + case 248: + case 249: + case 250: + case 254: + case 255: + case 296: + case 297: + case 256: + case 258: + case 299: + return ms(i, n); + } + } + } + function QZ(e, t) { + return n(e); + function n(i) { + switch (i.kind) { + case 229: + t(i); + const s = i.expression; + s && n(s); + return; + case 266: + case 264: + case 267: + case 265: + return; + default: + if (vs(i)) { + if (i.name && i.name.kind === 167) { + n(i.name.expression); + return; + } + } else im(i) || ms(i, n); + } + } + } + function uB(e) { + return e && e.kind === 188 ? e.elementType : e && e.kind === 183 ? Hm(e.typeArguments) : void 0; + } + function YZ(e) { + switch (e.kind) { + case 264: + case 263: + case 231: + case 187: + return e.members; + case 210: + return e.properties; + } + } + function D4(e) { + if (e) + switch (e.kind) { + case 208: + case 306: + case 169: + case 303: + case 172: + case 171: + case 304: + case 260: + return !0; + } + return !1; + } + function w4(e) { + return e.parent.kind === 261 && e.parent.parent.kind === 243; + } + function ZZ(e) { + return an(e) ? oa(e.parent) && fn(e.parent.parent) && Sc(e.parent.parent) === 2 || M7(e.parent) : !1; + } + function M7(e) { + return an(e) ? fn(e) && Sc(e) === 1 : !1; + } + function KZ(e) { + return (Kn(e) ? wC(e) && Me(e.name) && w4(e) : ss(e) ? kS(e) && Kc(e) : m_(e) && kS(e)) || M7(e); + } + function eK(e) { + switch (e.kind) { + case 174: + case 173: + case 176: + case 177: + case 178: + case 262: + case 218: + return !0; + } + return !1; + } + function _B(e, t) { + for (; ; ) { + if (t && t(e), e.statement.kind !== 256) + return e.statement; + e = e.statement; + } + } + function Nb(e) { + return e && e.kind === 241 && vs(e.parent); + } + function Ip(e) { + return e && e.kind === 174 && e.parent.kind === 210; + } + function R7(e) { + return (e.kind === 174 || e.kind === 177 || e.kind === 178) && (e.parent.kind === 210 || e.parent.kind === 231); + } + function tK(e) { + return e && e.kind === 1; + } + function rK(e) { + return e && e.kind === 0; + } + function NC(e, t, n, i) { + return lr(e?.properties, (s) => { + if (!Xc(s)) return; + const o = E4(s.name); + return t === o || i && i === o ? n(s) : void 0; + }); + } + function nK(e, t, n) { + return NC(e, t, (i) => Ql(i.initializer) ? Pn(i.initializer.elements, (s) => ea(s) && s.text === n) : void 0); + } + function P4(e) { + if (e && e.statements.length) { + const t = e.statements[0].expression; + return jn(t, oa); + } + } + function j7(e, t, n) { + return s3(e, t, (i) => Ql(i.initializer) ? Pn(i.initializer.elements, (s) => ea(s) && s.text === n) : void 0); + } + function s3(e, t, n) { + return NC(P4(e), t, n); + } + function ff(e) { + return ur(e.parent, vs); + } + function iK(e) { + return ur(e.parent, Ka); + } + function Al(e) { + return ur(e.parent, Zn); + } + function sK(e) { + return ur(e.parent, (t) => Zn(t) || vs(t) ? "quit" : nc(t)); + } + function B7(e) { + return ur(e.parent, bC); + } + function J7(e) { + const t = ur(e.parent, (n) => Zn(n) ? "quit" : ll(n)); + return t && Zn(t.parent) ? Al(t.parent) : Al(t ?? e); + } + function Lu(e, t, n) { + for (E.assert( + e.kind !== 307 + /* SourceFile */ + ); ; ) { + if (e = e.parent, !e) + return E.fail(); + switch (e.kind) { + case 167: + if (n && Zn(e.parent.parent)) + return e; + e = e.parent.parent; + break; + case 170: + e.parent.kind === 169 && sl(e.parent.parent) ? e = e.parent.parent : sl(e.parent) && (e = e.parent); + break; + case 219: + if (!t) + continue; + // falls through + case 262: + case 218: + case 267: + case 175: + case 172: + case 171: + case 174: + case 173: + case 176: + case 177: + case 178: + case 179: + case 180: + case 181: + case 266: + case 307: + return e; + } + } + } + function aK(e) { + switch (e.kind) { + // Arrow functions use the same scope, but may do so in a "delayed" manner + // For example, `const getThis = () => this` may be before a super() call in a derived constructor + case 219: + case 262: + case 218: + case 172: + return !0; + case 241: + switch (e.parent.kind) { + case 176: + case 174: + case 177: + case 178: + return !0; + default: + return !1; + } + default: + return !1; + } + } + function z7(e) { + Me(e) && ($c(e.parent) || Tc(e.parent)) && e.parent.name === e && (e = e.parent); + const t = Lu( + e, + /*includeArrowFunctions*/ + !0, + /*includeClassComputedPropertyName*/ + !1 + ); + return Ei(t); + } + function oK(e) { + const t = Lu( + e, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + if (t) + switch (t.kind) { + case 176: + case 262: + case 218: + return t; + } + } + function a3(e, t) { + for (; ; ) { + if (e = e.parent, !e) + return; + switch (e.kind) { + case 167: + e = e.parent; + break; + case 262: + case 218: + case 219: + if (!t) + continue; + // falls through + case 172: + case 171: + case 174: + case 173: + case 176: + case 177: + case 178: + case 175: + return e; + case 170: + e.parent.kind === 169 && sl(e.parent.parent) ? e = e.parent.parent : sl(e.parent) && (e = e.parent); + break; + } + } + } + function Ab(e) { + if (e.kind === 218 || e.kind === 219) { + let t = e, n = e.parent; + for (; n.kind === 217; ) + t = n, n = n.parent; + if (n.kind === 213 && n.expression === t) + return n; + } + } + function D_(e) { + const t = e.kind; + return (t === 211 || t === 212) && e.expression.kind === 108; + } + function o3(e) { + const t = e.kind; + return (t === 211 || t === 212) && e.expression.kind === 110; + } + function W7(e) { + var t; + return !!e && Kn(e) && ((t = e.initializer) == null ? void 0 : t.kind) === 110; + } + function cK(e) { + return !!e && (_u(e) || Xc(e)) && fn(e.parent.parent) && e.parent.parent.operatorToken.kind === 64 && e.parent.parent.right.kind === 110; + } + function c3(e) { + switch (e.kind) { + case 183: + return e.typeName; + case 233: + return _o(e.expression) ? e.expression : void 0; + // TODO(rbuckton): These aren't valid TypeNodes, but we treat them as such because of `isPartOfTypeNode`, which returns `true` for things that aren't `TypeNode`s. + case 80: + case 166: + return e; + } + } + function U7(e) { + switch (e.kind) { + case 215: + return e.tag; + case 286: + case 285: + return e.tagName; + case 226: + return e.right; + case 289: + return e; + default: + return e.expression; + } + } + function l3(e, t, n, i) { + if (e && Hl(t) && Ni(t.name)) + return !1; + switch (t.kind) { + case 263: + return !0; + case 231: + return !e; + case 172: + return n !== void 0 && (e ? $c(n) : Zn(n) && !Wb(t) && !HB(t)); + case 177: + case 178: + case 174: + return t.body !== void 0 && n !== void 0 && (e ? $c(n) : Zn(n)); + case 169: + return e ? n !== void 0 && n.body !== void 0 && (n.kind === 176 || n.kind === 174 || n.kind === 178) && jb(n) !== t && i !== void 0 && i.kind === 263 : !1; + } + return !1; + } + function AC(e, t, n, i) { + return Pf(t) && l3(e, t, n, i); + } + function u3(e, t, n, i) { + return AC(e, t, n, i) || N4(e, t, n); + } + function N4(e, t, n) { + switch (t.kind) { + case 263: + return at(t.members, (i) => u3(e, i, t, n)); + case 231: + return !e && at(t.members, (i) => u3(e, i, t, n)); + case 174: + case 178: + case 176: + return at(t.parameters, (i) => AC(e, i, t, n)); + default: + return !1; + } + } + function D0(e, t) { + if (AC(e, t)) return !0; + const n = Ug(t); + return !!n && N4(e, n, t); + } + function fB(e, t, n) { + let i; + if (Jy(t)) { + const { firstAccessor: s, secondAccessor: o, setAccessor: c } = zb(n.members, t), _ = Pf(s) ? s : o && Pf(o) ? o : void 0; + if (!_ || t !== _) + return !1; + i = c?.parameters; + } else fc(t) && (i = t.parameters); + if (AC(e, t, n)) + return !0; + if (i) { + for (const s of i) + if (!Bb(s) && AC(e, s, t, n)) + return !0; + } + return !1; + } + function pB(e) { + if (e.textSourceNode) { + switch (e.textSourceNode.kind) { + case 11: + return pB(e.textSourceNode); + case 15: + return e.text === ""; + } + return !1; + } + return e.text === ""; + } + function IC(e) { + const { parent: t } = e; + return t.kind === 286 || t.kind === 285 || t.kind === 287 ? t.tagName === e : !1; + } + function Td(e) { + switch (e.kind) { + case 108: + case 106: + case 112: + case 97: + case 14: + case 209: + case 210: + case 211: + case 212: + case 213: + case 214: + case 215: + case 234: + case 216: + case 238: + case 235: + case 217: + case 218: + case 231: + case 219: + case 222: + case 220: + case 221: + case 224: + case 225: + case 226: + case 227: + case 230: + case 228: + case 232: + case 284: + case 285: + case 288: + case 229: + case 223: + case 236: + return !0; + case 233: + return !Z_(e.parent) && !Xx(e.parent); + case 166: + for (; e.parent.kind === 166; ) + e = e.parent; + return e.parent.kind === 186 || ax(e.parent) || ED(e.parent) || yv(e.parent) || IC(e); + case 311: + for (; yv(e.parent); ) + e = e.parent; + return e.parent.kind === 186 || ax(e.parent) || ED(e.parent) || yv(e.parent) || IC(e); + case 81: + return fn(e.parent) && e.parent.left === e && e.parent.operatorToken.kind === 103; + case 80: + if (e.parent.kind === 186 || ax(e.parent) || ED(e.parent) || yv(e.parent) || IC(e)) + return !0; + // falls through + case 9: + case 10: + case 11: + case 15: + case 110: + return V7(e); + default: + return !1; + } + } + function V7(e) { + const { parent: t } = e; + switch (t.kind) { + case 260: + case 169: + case 172: + case 171: + case 306: + case 303: + case 208: + return t.initializer === e; + case 244: + case 245: + case 246: + case 247: + case 253: + case 254: + case 255: + case 296: + case 257: + return t.expression === e; + case 248: + const n = t; + return n.initializer === e && n.initializer.kind !== 261 || n.condition === e || n.incrementor === e; + case 249: + case 250: + const i = t; + return i.initializer === e && i.initializer.kind !== 261 || i.expression === e; + case 216: + case 234: + return e === t.expression; + case 239: + return e === t.expression; + case 167: + return e === t.expression; + case 170: + case 294: + case 293: + case 305: + return !0; + case 233: + return t.expression === e && !im(t); + case 304: + return t.objectAssignmentInitializer === e; + case 238: + return e === t.expression; + default: + return Td(t); + } + } + function q7(e) { + for (; e.kind === 166 || e.kind === 80; ) + e = e.parent; + return e.kind === 186; + } + function lK(e) { + return ig(e) && !!e.parent.moduleSpecifier; + } + function tv(e) { + return e.kind === 271 && e.moduleReference.kind === 283; + } + function A4(e) { + return E.assert(tv(e)), e.moduleReference.expression; + } + function dB(e) { + return Ib(e) && VC(e.initializer).arguments[0]; + } + function gS(e) { + return e.kind === 271 && e.moduleReference.kind !== 283; + } + function zg(e) { + return e?.kind === 307; + } + function Gu(e) { + return an(e); + } + function an(e) { + return !!e && !!(e.flags & 524288); + } + function H7(e) { + return !!e && !!(e.flags & 134217728); + } + function G7(e) { + return !tp(e); + } + function $7(e) { + return !!e && !!(e.flags & 16777216); + } + function X7(e) { + return Y_(e) && Me(e.typeName) && e.typeName.escapedText === "Object" && e.typeArguments && e.typeArguments.length === 2 && (e.typeArguments[0].kind === 154 || e.typeArguments[0].kind === 150); + } + function __(e, t) { + if (e.kind !== 213) + return !1; + const { expression: n, arguments: i } = e; + if (n.kind !== 80 || n.escapedText !== "require" || i.length !== 1) + return !1; + const s = i[0]; + return !t || Na(s); + } + function _3(e) { + return ahe( + e, + /*allowAccessedRequire*/ + !1 + ); + } + function Ib(e) { + return ahe( + e, + /*allowAccessedRequire*/ + !0 + ); + } + function uK(e) { + return ma(e) && Ib(e.parent.parent); + } + function ahe(e, t) { + return Kn(e) && !!e.initializer && __( + t ? VC(e.initializer) : e.initializer, + /*requireStringLiteralLikeArgument*/ + !0 + ); + } + function f3(e) { + return pc(e) && e.declarationList.declarations.length > 0 && Ri(e.declarationList.declarations, (t) => _3(t)); + } + function p3(e) { + return e === 39 || e === 34; + } + function Q7(e, t) { + return Db(t, e).charCodeAt(0) === 34; + } + function I4(e) { + return fn(e) || vo(e) || Me(e) || Fs(e); + } + function d3(e) { + return an(e) && e.initializer && fn(e.initializer) && (e.initializer.operatorToken.kind === 57 || e.initializer.operatorToken.kind === 61) && e.name && _o(e.name) && FC(e.name, e.initializer.left) ? e.initializer.right : e.initializer; + } + function F4(e) { + const t = d3(e); + return t && rv(t, Qy(e.name)); + } + function qFe(e, t) { + return lr(e.properties, (n) => Xc(n) && Me(n.name) && n.name.escapedText === "value" && n.initializer && rv(n.initializer, t)); + } + function fx(e) { + if (e && e.parent && fn(e.parent) && e.parent.operatorToken.kind === 64) { + const t = Qy(e.parent.left); + return rv(e.parent.right, t) || HFe(e.parent.left, e.parent.right, t); + } + if (e && Fs(e) && yS(e)) { + const t = qFe(e.arguments[2], e.arguments[1].text === "prototype"); + if (t) + return t; + } + } + function rv(e, t) { + if (Fs(e)) { + const n = za(e.expression); + return n.kind === 218 || n.kind === 219 ? e : void 0; + } + if (e.kind === 218 || e.kind === 231 || e.kind === 219 || oa(e) && (e.properties.length === 0 || t)) + return e; + } + function HFe(e, t, n) { + const i = fn(t) && (t.operatorToken.kind === 57 || t.operatorToken.kind === 61) && rv(t.right, n); + if (i && FC(e, t.left)) + return i; + } + function _K(e) { + const t = Kn(e.parent) ? e.parent.name : fn(e.parent) && e.parent.operatorToken.kind === 64 ? e.parent.left : void 0; + return t && rv(e.right, Qy(t)) && _o(t) && FC(t, e.left); + } + function mB(e) { + if (fn(e.parent)) { + const t = (e.parent.operatorToken.kind === 57 || e.parent.operatorToken.kind === 61) && fn(e.parent.parent) ? e.parent.parent : e.parent; + if (t.operatorToken.kind === 64 && Me(t.left)) + return t.left; + } else if (Kn(e.parent)) + return e.parent.name; + } + function FC(e, t) { + return am(e) && am(t) ? rp(e) === rp(t) : Lg(e) && fK(t) && (t.expression.kind === 110 || Me(t.expression) && (t.expression.escapedText === "window" || t.expression.escapedText === "self" || t.expression.escapedText === "global")) ? FC(e, g3(t)) : fK(e) && fK(t) ? wh(e) === wh(t) && FC(e.expression, t.expression) : !1; + } + function m3(e) { + for (; Cl( + e, + /*excludeCompoundAssignment*/ + !0 + ); ) + e = e.right; + return e; + } + function hS(e) { + return Me(e) && e.escapedText === "exports"; + } + function gB(e) { + return Me(e) && e.escapedText === "module"; + } + function Wg(e) { + return (Tn(e) || hB(e)) && gB(e.expression) && wh(e) === "exports"; + } + function Sc(e) { + const t = GFe(e); + return t === 5 || an(e) ? t : 0; + } + function yS(e) { + return Ir(e.arguments) === 3 && Tn(e.expression) && Me(e.expression.expression) && An(e.expression.expression) === "Object" && An(e.expression.name) === "defineProperty" && wf(e.arguments[1]) && vS( + e.arguments[0], + /*excludeThisKeyword*/ + !0 + ); + } + function fK(e) { + return Tn(e) || hB(e); + } + function hB(e) { + return fo(e) && wf(e.argumentExpression); + } + function Fb(e, t) { + return Tn(e) && (!t && e.expression.kind === 110 || Me(e.name) && vS( + e.expression, + /*excludeThisKeyword*/ + !0 + )) || Y7(e, t); + } + function Y7(e, t) { + return hB(e) && (!t && e.expression.kind === 110 || _o(e.expression) || Fb( + e.expression, + /*excludeThisKeyword*/ + !0 + )); + } + function vS(e, t) { + return _o(e) || Fb(e, t); + } + function g3(e) { + return Tn(e) ? e.name : e.argumentExpression; + } + function GFe(e) { + if (Fs(e)) { + if (!yS(e)) + return 0; + const t = e.arguments[0]; + return hS(t) || Wg(t) ? 8 : Fb(t) && wh(t) === "prototype" ? 9 : 7; + } + return e.operatorToken.kind !== 64 || !vo(e.left) || $Fe(m3(e)) ? 0 : vS( + e.left.expression, + /*excludeThisKeyword*/ + !0 + ) && wh(e.left) === "prototype" && oa(yB(e)) ? 6 : h3(e.left); + } + function $Fe(e) { + return Vx(e) && d_(e.expression) && e.expression.text === "0"; + } + function Z7(e) { + if (Tn(e)) + return e.name; + const t = za(e.argumentExpression); + return d_(t) || Na(t) ? t : e; + } + function wh(e) { + const t = Z7(e); + if (t) { + if (Me(t)) + return t.escapedText; + if (Na(t) || d_(t)) + return Zo(t.text); + } + } + function h3(e) { + if (e.expression.kind === 110) + return 4; + if (Wg(e)) + return 2; + if (vS( + e.expression, + /*excludeThisKeyword*/ + !0 + )) { + if (Qy(e.expression)) + return 3; + let t = e; + for (; !Me(t.expression); ) + t = t.expression; + const n = t.expression; + if ((n.escapedText === "exports" || n.escapedText === "module" && wh(t) === "exports") && // ExportsProperty does not support binding with computed names + Fb(e)) + return 1; + if (vS( + e, + /*excludeThisKeyword*/ + !0 + ) || fo(e) && i5(e)) + return 5; + } + return 0; + } + function yB(e) { + for (; fn(e.right); ) + e = e.right; + return e.right; + } + function y3(e) { + return fn(e) && Sc(e) === 3; + } + function pK(e) { + return an(e) && e.parent && e.parent.kind === 244 && (!fo(e) || hB(e)) && !!Y1(e.parent); + } + function v3(e, t) { + const { valueDeclaration: n } = e; + (!n || !(t.flags & 33554432 && !an(t) && !(n.flags & 33554432)) && I4(n) && !I4(t) || n.kind !== t.kind && OFe(n)) && (e.valueDeclaration = t); + } + function dK(e) { + if (!e || !e.valueDeclaration) + return !1; + const t = e.valueDeclaration; + return t.kind === 262 || Kn(t) && t.initializer && vs(t.initializer); + } + function mK(e) { + switch (e?.kind) { + case 260: + case 208: + case 272: + case 278: + case 271: + case 273: + case 280: + case 274: + case 281: + case 276: + case 205: + return !0; + } + return !1; + } + function px(e) { + var t, n; + switch (e.kind) { + case 260: + case 208: + return (t = ur(e.initializer, (i) => __( + i, + /*requireStringLiteralLikeArgument*/ + !0 + ))) == null ? void 0 : t.arguments[0]; + case 272: + case 278: + case 351: + return jn(e.moduleSpecifier, Na); + case 271: + return jn((n = jn(e.moduleReference, Mh)) == null ? void 0 : n.expression, Na); + case 273: + case 280: + return jn(e.parent.moduleSpecifier, Na); + case 274: + case 281: + return jn(e.parent.parent.moduleSpecifier, Na); + case 276: + return jn(e.parent.parent.parent.moduleSpecifier, Na); + case 205: + return Dh(e) ? e.argument.literal : void 0; + default: + E.assertNever(e); + } + } + function O4(e) { + return b3(e) || E.failBadSyntaxKind(e.parent); + } + function b3(e) { + switch (e.parent.kind) { + case 272: + case 278: + case 351: + return e.parent; + case 283: + return e.parent.parent; + case 213: + return _f(e.parent) || __( + e.parent, + /*requireStringLiteralLikeArgument*/ + !1 + ) ? e.parent : void 0; + case 201: + if (!ea(e)) + break; + return jn(e.parent.parent, Ed); + default: + return; + } + } + function S3(e, t) { + return !!t.rewriteRelativeImportExtensions && lf(e) && !fl(e) && ES(e); + } + function dx(e) { + switch (e.kind) { + case 272: + case 278: + case 351: + return e.moduleSpecifier; + case 271: + return e.moduleReference.kind === 283 ? e.moduleReference.expression : void 0; + case 205: + return Dh(e) ? e.argument.literal : void 0; + case 213: + return e.arguments[0]; + case 267: + return e.name.kind === 11 ? e.name : void 0; + default: + return E.assertNever(e); + } + } + function OC(e) { + switch (e.kind) { + case 272: + return e.importClause && jn(e.importClause.namedBindings, Yg); + case 271: + return e; + case 278: + return e.exportClause && jn(e.exportClause, ig); + default: + return E.assertNever(e); + } + } + function bS(e) { + return (e.kind === 272 || e.kind === 351) && !!e.importClause && !!e.importClause.name; + } + function gK(e, t) { + if (e.name) { + const n = t(e); + if (n) return n; + } + if (e.namedBindings) { + const n = Yg(e.namedBindings) ? t(e.namedBindings) : lr(e.namedBindings.elements, t); + if (n) return n; + } + } + function mx(e) { + switch (e.kind) { + case 169: + case 174: + case 173: + case 304: + case 303: + case 172: + case 171: + return e.questionToken !== void 0; + } + return !1; + } + function gx(e) { + const t = a6(e) ? Uc(e.parameters) : void 0, n = jn(t && t.name, Me); + return !!n && n.escapedText === "new"; + } + function Fp(e) { + return e.kind === 346 || e.kind === 338 || e.kind === 340; + } + function T3(e) { + return Fp(e) || jp(e); + } + function XFe(e) { + return El(e) && fn(e.expression) && e.expression.operatorToken.kind === 64 ? m3(e.expression) : void 0; + } + function ohe(e) { + return El(e) && fn(e.expression) && Sc(e.expression) !== 0 && fn(e.expression.right) && (e.expression.right.operatorToken.kind === 57 || e.expression.right.operatorToken.kind === 61) ? e.expression.right.right : void 0; + } + function che(e) { + switch (e.kind) { + case 243: + const t = hx(e); + return t && t.initializer; + case 172: + return e.initializer; + case 303: + return e.initializer; + } + } + function hx(e) { + return pc(e) ? Uc(e.declarationList.declarations) : void 0; + } + function lhe(e) { + return Lc(e) && e.body && e.body.kind === 267 ? e.body : void 0; + } + function L4(e) { + if (e.kind >= 243 && e.kind <= 259) + return !0; + switch (e.kind) { + case 80: + case 110: + case 108: + case 166: + case 236: + case 212: + case 211: + case 208: + case 218: + case 219: + case 174: + case 177: + case 178: + return !0; + default: + return !1; + } + } + function x3(e) { + switch (e.kind) { + case 219: + case 226: + case 241: + case 252: + case 179: + case 296: + case 263: + case 231: + case 175: + case 176: + case 185: + case 180: + case 251: + case 259: + case 246: + case 212: + case 242: + case 1: + case 266: + case 306: + case 277: + case 278: + case 281: + case 244: + case 249: + case 250: + case 248: + case 262: + case 218: + case 184: + case 177: + case 80: + case 245: + case 272: + case 271: + case 181: + case 264: + case 317: + case 323: + case 256: + case 174: + case 173: + case 267: + case 202: + case 270: + case 210: + case 169: + case 217: + case 211: + case 303: + case 172: + case 171: + case 253: + case 240: + case 178: + case 304: + case 305: + case 255: + case 257: + case 258: + case 265: + case 168: + case 260: + case 243: + case 247: + case 254: + return !0; + default: + return !1; + } + } + function vB(e, t) { + let n; + D4(e) && C0(e) && uf(e.initializer) && (n = Nn(n, uhe(e, e.initializer.jsDoc))); + let i = e; + for (; i && i.parent; ) { + if (uf(i) && (n = Nn(n, uhe(e, i.jsDoc))), i.kind === 169) { + n = Nn(n, (t ? qY : gC)(i)); + break; + } + if (i.kind === 168) { + n = Nn(n, (t ? GY : HY)(i)); + break; + } + i = bB(i); + } + return n || He; + } + function uhe(e, t) { + const n = _a(t); + return na(t, (i) => { + if (i === n) { + const s = kn(i.tags, (o) => QFe(e, o)); + return i.tags === s ? [i] : s; + } else + return kn(i.tags, o6); + }); + } + function QFe(e, t) { + return !(DD(t) || CF(t)) || !t.parent || !Pd(t.parent) || !Yu(t.parent.parent) || t.parent.parent === e; + } + function bB(e) { + const t = e.parent; + if (t.kind === 303 || t.kind === 277 || t.kind === 172 || t.kind === 244 && e.kind === 211 || t.kind === 253 || lhe(t) || Cl(e)) + return t; + if (t.parent && (hx(t.parent) === e || Cl(t))) + return t.parent; + if (t.parent && t.parent.parent && (hx(t.parent.parent) || che(t.parent.parent) === e || ohe(t.parent.parent))) + return t.parent.parent; + } + function k3(e) { + if (e.symbol) + return e.symbol; + if (!Me(e.name)) + return; + const t = e.name.escapedText, n = nv(e); + if (!n) + return; + const i = Pn(n.parameters, (s) => s.name.kind === 80 && s.name.escapedText === t); + return i && i.symbol; + } + function K7(e) { + if (Pd(e.parent) && e.parent.tags) { + const t = Pn(e.parent.tags, Fp); + if (t) + return t; + } + return nv(e); + } + function SB(e) { + return s7(e, o6); + } + function nv(e) { + const t = iv(e); + if (t) + return m_(t) && t.type && vs(t.type) ? t.type : vs(t) ? t : void 0; + } + function iv(e) { + const t = Ob(e); + if (t) + return ohe(t) || XFe(t) || che(t) || hx(t) || lhe(t) || t; + } + function Ob(e) { + const t = LC(e); + if (!t) + return; + const n = t.parent; + if (n && n.jsDoc && t === Co(n.jsDoc)) + return n; + } + function LC(e) { + return ur(e.parent, Pd); + } + function hK(e) { + const t = e.name.escapedText, { typeParameters: n } = e.parent.parent.parent; + return n && Pn(n, (i) => i.name.escapedText === t); + } + function _he(e) { + return !!e.typeArguments; + } + var yK = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Definite = 1] = "Definite", e[e.Compound = 2] = "Compound", e))(yK || {}); + function vK(e) { + let t = e.parent; + for (; ; ) { + switch (t.kind) { + case 226: + const n = t, i = n.operatorToken.kind; + return Ah(i) && n.left === e ? n : void 0; + case 224: + case 225: + const s = t, o = s.operator; + return o === 46 || o === 47 ? s : void 0; + case 249: + case 250: + const c = t; + return c.initializer === e ? c : void 0; + case 217: + case 209: + case 230: + case 235: + e = t; + break; + case 305: + e = t.parent; + break; + case 304: + if (t.name !== e) + return; + e = t.parent; + break; + case 303: + if (t.name === e) + return; + e = t.parent; + break; + default: + return; + } + t = e.parent; + } + } + function Gy(e) { + const t = vK(e); + if (!t) + return 0; + switch (t.kind) { + case 226: + const n = t.operatorToken.kind; + return n === 64 || q4(n) ? 1 : 2; + case 224: + case 225: + return 2; + case 249: + case 250: + return 1; + } + } + function $y(e) { + return !!vK(e); + } + function YFe(e) { + const t = za(e.right); + return t.kind === 226 && bz(t.operatorToken.kind); + } + function TB(e) { + const t = vK(e); + return !!t && Cl( + t, + /*excludeCompoundAssignment*/ + !0 + ) && YFe(t); + } + function bK(e) { + switch (e.kind) { + case 241: + case 243: + case 254: + case 245: + case 255: + case 269: + case 296: + case 297: + case 256: + case 248: + case 249: + case 250: + case 246: + case 247: + case 258: + case 299: + return !0; + } + return !1; + } + function SS(e) { + return po(e) || bo(e) || ix(e) || Tc(e) || Go(e); + } + function fhe(e, t) { + for (; e && e.kind === t; ) + e = e.parent; + return e; + } + function C3(e) { + return fhe( + e, + 196 + /* ParenthesizedType */ + ); + } + function rd(e) { + return fhe( + e, + 217 + /* ParenthesizedExpression */ + ); + } + function SK(e) { + let t; + for (; e && e.kind === 196; ) + t = e, e = e.parent; + return [t, e]; + } + function M4(e) { + for (; IS(e); ) e = e.type; + return e; + } + function za(e, t) { + return xc(e, t ? -2147483647 : 1); + } + function xB(e) { + return e.kind !== 211 && e.kind !== 212 ? !1 : (e = rd(e.parent), e && e.kind === 220); + } + function Lb(e, t) { + for (; e; ) { + if (e === t) return !0; + e = e.parent; + } + return !1; + } + function tg(e) { + return !Ei(e) && !Ds(e) && bl(e.parent) && e.parent.name === e; + } + function R4(e) { + const t = e.parent; + switch (e.kind) { + case 11: + case 15: + case 9: + if (fa(t)) return t.parent; + // falls through + case 80: + if (bl(t)) + return t.name === e ? t : void 0; + if (Xu(t)) { + const n = t.parent; + return Af(n) && n.name === t ? n : void 0; + } else { + const n = t.parent; + return fn(n) && Sc(n) !== 0 && (n.left.symbol || n.symbol) && is(n) === e ? n : void 0; + } + case 81: + return bl(t) && t.name === e ? t : void 0; + default: + return; + } + } + function E3(e) { + return wf(e) && e.parent.kind === 167 && bl(e.parent.parent); + } + function TK(e) { + const t = e.parent; + switch (t.kind) { + case 172: + case 171: + case 174: + case 173: + case 177: + case 178: + case 306: + case 303: + case 211: + return t.name === e; + case 166: + return t.right === e; + case 208: + case 276: + return t.propertyName === e; + case 281: + case 291: + case 285: + case 286: + case 287: + return !0; + } + return !1; + } + function kB(e) { + switch (e.parent.kind) { + case 273: + case 276: + case 274: + case 281: + case 277: + case 271: + case 280: + return e.parent; + case 166: + do + e = e.parent; + while (e.parent.kind === 166); + return kB(e); + } + } + function e5(e) { + return _o(e) || Gc(e); + } + function D3(e) { + const t = CB(e); + return e5(t); + } + function CB(e) { + return Io(e) ? e.expression : e.right; + } + function xK(e) { + return e.kind === 304 ? e.name : e.kind === 303 ? e.initializer : e.parent.right; + } + function sm(e) { + const t = Mb(e); + if (t && an(e)) { + const n = XY(e); + if (n) + return n.class; + } + return t; + } + function Mb(e) { + const t = w3( + e.heritageClauses, + 96 + /* ExtendsKeyword */ + ); + return t && t.types.length > 0 ? t.types[0] : void 0; + } + function MC(e) { + if (an(e)) + return QY(e).map((t) => t.class); + { + const t = w3( + e.heritageClauses, + 119 + /* ImplementsKeyword */ + ); + return t?.types; + } + } + function j4(e) { + return Yl(e) ? B4(e) || He : Zn(e) && Wi(QT(sm(e)), MC(e)) || He; + } + function B4(e) { + const t = w3( + e.heritageClauses, + 96 + /* ExtendsKeyword */ + ); + return t ? t.types : void 0; + } + function w3(e, t) { + if (e) { + for (const n of e) + if (n.token === t) + return n; + } + } + function sv(e, t) { + for (; e; ) { + if (e.kind === t) + return e; + e = e.parent; + } + } + function f_(e) { + return 83 <= e && e <= 165; + } + function EB(e) { + return 19 <= e && e <= 79; + } + function t5(e) { + return f_(e) || EB(e); + } + function r5(e) { + return 128 <= e && e <= 165; + } + function DB(e) { + return f_(e) && !r5(e); + } + function yx(e) { + const t = sS(e); + return t !== void 0 && DB(t); + } + function wB(e) { + const t = aS(e); + return !!t && !r5(t); + } + function RC(e) { + return 2 <= e && e <= 7; + } + var kK = /* @__PURE__ */ ((e) => (e[e.Normal = 0] = "Normal", e[e.Generator = 1] = "Generator", e[e.Async = 2] = "Async", e[e.Invalid = 4] = "Invalid", e[e.AsyncGenerator = 3] = "AsyncGenerator", e))(kK || {}); + function Oc(e) { + if (!e) + return 4; + let t = 0; + switch (e.kind) { + case 262: + case 218: + case 174: + e.asteriskToken && (t |= 1); + // falls through + case 219: + $n( + e, + 1024 + /* Async */ + ) && (t |= 2); + break; + } + return e.body || (t |= 4), t; + } + function J4(e) { + switch (e.kind) { + case 262: + case 218: + case 219: + case 174: + return e.body !== void 0 && e.asteriskToken === void 0 && $n( + e, + 1024 + /* Async */ + ); + } + return !1; + } + function wf(e) { + return Na(e) || d_(e); + } + function n5(e) { + return pv(e) && (e.operator === 40 || e.operator === 41) && d_(e.operand); + } + function Ph(e) { + const t = is(e); + return !!t && i5(t); + } + function i5(e) { + if (!(e.kind === 167 || e.kind === 212)) + return !1; + const t = fo(e) ? za(e.argumentExpression) : e.expression; + return !wf(t) && !n5(t); + } + function TS(e) { + switch (e.kind) { + case 80: + case 81: + return e.escapedText; + case 11: + case 15: + case 9: + case 10: + return Zo(e.text); + case 167: + const t = e.expression; + return wf(t) ? Zo(t.text) : n5(t) ? t.operator === 41 ? Xs(t.operator) + t.operand.text : t.operand.text : void 0; + case 295: + return Ix(e); + default: + return E.assertNever(e); + } + } + function am(e) { + switch (e.kind) { + case 80: + case 11: + case 15: + case 9: + return !0; + default: + return !1; + } + } + function rp(e) { + return Lg(e) ? An(e) : wd(e) ? fD(e) : e.text; + } + function z4(e) { + return Lg(e) ? e.escapedText : wd(e) ? Ix(e) : Zo(e.text); + } + function P3(e, t) { + return `__#${Zs(e)}@${t}`; + } + function N3(e) { + return Vi(e.escapedName, "__@"); + } + function CK(e) { + return Vi(e.escapedName, "__#"); + } + function ZFe(e) { + return Me(e) ? An(e) === "__proto__" : ea(e) && e.text === "__proto__"; + } + function s5(e, t) { + switch (e = xc(e), e.kind) { + case 231: + if (wW(e)) + return !1; + break; + case 218: + if (e.name) + return !1; + break; + case 219: + break; + default: + return !1; + } + return typeof t == "function" ? t(e) : !0; + } + function PB(e) { + switch (e.kind) { + case 303: + return !ZFe(e.name); + case 304: + return !!e.objectAssignmentInitializer; + case 260: + return Me(e.name) && !!e.initializer; + case 169: + return Me(e.name) && !!e.initializer && !e.dotDotDotToken; + case 208: + return Me(e.name) && !!e.initializer && !e.dotDotDotToken; + case 172: + return !!e.initializer; + case 226: + switch (e.operatorToken.kind) { + case 64: + case 77: + case 76: + case 78: + return Me(e.left); + } + break; + case 277: + return !0; + } + return !1; + } + function X_(e, t) { + if (!PB(e)) return !1; + switch (e.kind) { + case 303: + return s5(e.initializer, t); + case 304: + return s5(e.objectAssignmentInitializer, t); + case 260: + case 169: + case 208: + case 172: + return s5(e.initializer, t); + case 226: + return s5(e.right, t); + case 277: + return s5(e.expression, t); + } + } + function NB(e) { + return e.escapedText === "push" || e.escapedText === "unshift"; + } + function av(e) { + return om(e).kind === 169; + } + function om(e) { + for (; e.kind === 208; ) + e = e.parent.parent; + return e; + } + function AB(e) { + const t = e.kind; + return t === 176 || t === 218 || t === 262 || t === 219 || t === 174 || t === 177 || t === 178 || t === 267 || t === 307; + } + function no(e) { + return kd(e.pos) || kd(e.end); + } + var EK = /* @__PURE__ */ ((e) => (e[e.Left = 0] = "Left", e[e.Right = 1] = "Right", e))(EK || {}); + function IB(e) { + const t = phe(e), n = e.kind === 214 && e.arguments !== void 0; + return FB(e.kind, t, n); + } + function FB(e, t, n) { + switch (e) { + case 214: + return n ? 0 : 1; + case 224: + case 221: + case 222: + case 220: + case 223: + case 227: + case 229: + return 1; + case 226: + switch (t) { + case 43: + case 64: + case 65: + case 66: + case 68: + case 67: + case 69: + case 70: + case 71: + case 72: + case 73: + case 74: + case 79: + case 75: + case 76: + case 77: + case 78: + return 1; + } + } + return 0; + } + function W4(e) { + const t = phe(e), n = e.kind === 214 && e.arguments !== void 0; + return A3(e.kind, t, n); + } + function phe(e) { + return e.kind === 226 ? e.operatorToken.kind : e.kind === 224 || e.kind === 225 ? e.operator : e.kind; + } + var DK = /* @__PURE__ */ ((e) => (e[e.Comma = 0] = "Comma", e[e.Spread = 1] = "Spread", e[e.Yield = 2] = "Yield", e[e.Assignment = 3] = "Assignment", e[e.Conditional = 4] = "Conditional", e[ + e.Coalesce = 4 + /* Conditional */ + ] = "Coalesce", e[e.LogicalOR = 5] = "LogicalOR", e[e.LogicalAND = 6] = "LogicalAND", e[e.BitwiseOR = 7] = "BitwiseOR", e[e.BitwiseXOR = 8] = "BitwiseXOR", e[e.BitwiseAND = 9] = "BitwiseAND", e[e.Equality = 10] = "Equality", e[e.Relational = 11] = "Relational", e[e.Shift = 12] = "Shift", e[e.Additive = 13] = "Additive", e[e.Multiplicative = 14] = "Multiplicative", e[e.Exponentiation = 15] = "Exponentiation", e[e.Unary = 16] = "Unary", e[e.Update = 17] = "Update", e[e.LeftHandSide = 18] = "LeftHandSide", e[e.Member = 19] = "Member", e[e.Primary = 20] = "Primary", e[ + e.Highest = 20 + /* Primary */ + ] = "Highest", e[ + e.Lowest = 0 + /* Comma */ + ] = "Lowest", e[e.Invalid = -1] = "Invalid", e))(DK || {}); + function A3(e, t, n) { + switch (e) { + case 356: + return 0; + case 230: + return 1; + case 229: + return 2; + case 227: + return 4; + case 226: + switch (t) { + case 28: + return 0; + case 64: + case 65: + case 66: + case 68: + case 67: + case 69: + case 70: + case 71: + case 72: + case 73: + case 74: + case 79: + case 75: + case 76: + case 77: + case 78: + return 3; + default: + return I3(t); + } + // TODO: Should prefix `++` and `--` be moved to the `Update` precedence? + case 216: + case 235: + case 224: + case 221: + case 222: + case 220: + case 223: + return 16; + case 225: + return 17; + case 213: + return 18; + case 214: + return n ? 19 : 18; + case 215: + case 211: + case 212: + case 236: + return 19; + case 234: + case 238: + return 11; + case 110: + case 108: + case 80: + case 81: + case 106: + case 112: + case 97: + case 9: + case 10: + case 11: + case 209: + case 210: + case 218: + case 219: + case 231: + case 14: + case 15: + case 228: + case 217: + case 232: + case 284: + case 285: + case 288: + return 20; + default: + return -1; + } + } + function I3(e) { + switch (e) { + case 61: + return 4; + case 57: + return 5; + case 56: + return 6; + case 52: + return 7; + case 53: + return 8; + case 51: + return 9; + case 35: + case 36: + case 37: + case 38: + return 10; + case 30: + case 32: + case 33: + case 34: + case 104: + case 103: + case 130: + case 152: + return 11; + case 48: + case 49: + case 50: + return 12; + case 40: + case 41: + return 13; + case 42: + case 44: + case 45: + return 14; + case 43: + return 15; + } + return -1; + } + function jC(e) { + return kn(e, (t) => { + switch (t.kind) { + case 294: + return !!t.expression; + case 12: + return !t.containsOnlyTriviaWhiteSpaces; + default: + return !0; + } + }); + } + function F3() { + let e = []; + const t = [], n = /* @__PURE__ */ new Map(); + let i = !1; + return { + add: o, + lookup: s, + getGlobalDiagnostics: c, + getDiagnostics: _ + }; + function s(u) { + let m; + if (u.file ? m = n.get(u.file.fileName) : m = e, !m) + return; + const g = Cy(m, u, lo, cee); + if (g >= 0) + return m[g]; + if (~g > 0 && w5(u, m[~g - 1])) + return m[~g - 1]; + } + function o(u) { + let m; + u.file ? (m = n.get(u.file.fileName), m || (m = [], n.set(u.file.fileName, m), xy(t, u.file.fileName, cu))) : (i && (i = !1, e = e.slice()), m = e), xy(m, u, cee, w5); + } + function c() { + return i = !0, e; + } + function _(u) { + if (u) + return n.get(u) || []; + const m = qE(t, (g) => n.get(g)); + return e.length && m.unshift(...e), m; + } + } + var KFe = /\$\{/g; + function OB(e) { + return e.replace(KFe, "\\${"); + } + function wK(e) { + return !!((e.templateFlags || 0) & 2048); + } + function LB(e) { + return e && !!(NS(e) ? wK(e) : wK(e.head) || at(e.templateSpans, (t) => wK(t.literal))); + } + var eOe = /[\\"\u0000-\u001f\u2028\u2029\u0085]/g, tOe = /[\\'\u0000-\u001f\u2028\u2029\u0085]/g, rOe = /\r\n|[\\`\u0000-\u0009\u000b-\u001f\u2028\u2029\u0085]/g, nOe = new Map(Object.entries({ + " ": "\\t", + "\v": "\\v", + "\f": "\\f", + "\b": "\\b", + "\r": "\\r", + "\n": "\\n", + "\\": "\\\\", + '"': '\\"', + "'": "\\'", + "`": "\\`", + "\u2028": "\\u2028", + // lineSeparator + "\u2029": "\\u2029", + // paragraphSeparator + "…": "\\u0085", + // nextLine + "\r\n": "\\r\\n" + // special case for CRLFs in backticks + })); + function dhe(e) { + return "\\u" + ("0000" + e.toString(16).toUpperCase()).slice(-4); + } + function iOe(e, t, n) { + if (e.charCodeAt(0) === 0) { + const i = n.charCodeAt(t + e.length); + return i >= 48 && i <= 57 ? "\\x00" : "\\0"; + } + return nOe.get(e) || dhe(e.charCodeAt(0)); + } + function rg(e, t) { + const n = t === 96 ? rOe : t === 39 ? tOe : eOe; + return e.replace(n, iOe); + } + var mhe = /[^\u0000-\u007F]/g; + function a5(e, t) { + return e = rg(e, t), mhe.test(e) ? e.replace(mhe, (n) => dhe(n.charCodeAt(0))) : e; + } + var sOe = /["\u0000-\u001f\u2028\u2029\u0085]/g, aOe = /['\u0000-\u001f\u2028\u2029\u0085]/g, oOe = new Map(Object.entries({ + '"': """, + "'": "'" + })); + function cOe(e) { + return "&#x" + e.toString(16).toUpperCase() + ";"; + } + function lOe(e) { + return e.charCodeAt(0) === 0 ? "�" : oOe.get(e) || cOe(e.charCodeAt(0)); + } + function MB(e, t) { + const n = t === 39 ? aOe : sOe; + return e.replace(n, lOe); + } + function Op(e) { + const t = e.length; + return t >= 2 && e.charCodeAt(0) === e.charCodeAt(t - 1) && uOe(e.charCodeAt(0)) ? e.substring(1, t - 1) : e; + } + function uOe(e) { + return e === 39 || e === 34 || e === 96; + } + function BC(e) { + const t = e.charCodeAt(0); + return t >= 97 && t <= 122 || e.includes("-"); + } + var O3 = ["", " "]; + function o5(e) { + const t = O3[1]; + for (let n = O3.length; n <= e; n++) + O3.push(O3[n - 1] + t); + return O3[e]; + } + function L3() { + return O3[1].length; + } + function M3(e) { + var t, n, i, s, o, c = !1; + function _(D) { + const w = ex(D); + w.length > 1 ? (s = s + w.length - 1, o = t.length - D.length + _a(w), i = o - t.length === 0) : i = !1; + } + function u(D) { + D && D.length && (i && (D = o5(n) + D, i = !1), t += D, _(D)); + } + function m(D) { + D && (c = !1), u(D); + } + function g(D) { + D && (c = !0), u(D); + } + function h() { + t = "", n = 0, i = !0, s = 0, o = 0, c = !1; + } + function S(D) { + D !== void 0 && (t += D, _(D), c = !1); + } + function T(D) { + D && D.length && m(D); + } + function C(D) { + (!i || D) && (t += e, s++, o = t.length, i = !0, c = !1); + } + return h(), { + write: m, + rawWrite: S, + writeLiteral: T, + writeLine: C, + increaseIndent: () => { + n++; + }, + decreaseIndent: () => { + n--; + }, + getIndent: () => n, + getTextPos: () => t.length, + getLine: () => s, + getColumn: () => i ? n * L3() : t.length - o, + getText: () => t, + isAtStartOfLine: () => i, + hasTrailingComment: () => c, + hasTrailingWhitespace: () => !!t.length && Ig(t.charCodeAt(t.length - 1)), + clear: h, + writeKeyword: m, + writeOperator: m, + writeParameter: m, + writeProperty: m, + writePunctuation: m, + writeSpace: m, + writeStringLiteral: m, + writeSymbol: (D, w) => m(D), + writeTrailingSemicolon: m, + writeComment: g + }; + } + function RB(e) { + let t = !1; + function n() { + t && (e.writeTrailingSemicolon(";"), t = !1); + } + return { + ...e, + writeTrailingSemicolon() { + t = !0; + }, + writeLiteral(i) { + n(), e.writeLiteral(i); + }, + writeStringLiteral(i) { + n(), e.writeStringLiteral(i); + }, + writeSymbol(i, s) { + n(), e.writeSymbol(i, s); + }, + writePunctuation(i) { + n(), e.writePunctuation(i); + }, + writeKeyword(i) { + n(), e.writeKeyword(i); + }, + writeOperator(i) { + n(), e.writeOperator(i); + }, + writeParameter(i) { + n(), e.writeParameter(i); + }, + writeSpace(i) { + n(), e.writeSpace(i); + }, + writeProperty(i) { + n(), e.writeProperty(i); + }, + writeComment(i) { + n(), e.writeComment(i); + }, + writeLine() { + n(), e.writeLine(); + }, + increaseIndent() { + n(), e.increaseIndent(); + }, + decreaseIndent() { + n(), e.decreaseIndent(); + } + }; + } + function xS(e) { + return e.useCaseSensitiveFileNames ? e.useCaseSensitiveFileNames() : !1; + } + function Nh(e) { + return Wl(xS(e)); + } + function jB(e, t, n) { + return t.moduleName || BB(e, t.fileName, n && n.fileName); + } + function ghe(e, t) { + return e.getCanonicalFileName(Xi(t, e.getCurrentDirectory())); + } + function PK(e, t, n) { + const i = t.getExternalModuleFileFromDeclaration(n); + if (!i || i.isDeclarationFile) + return; + const s = dx(n); + if (!(s && Na(s) && !lf(s.text) && !ghe(e, i.path).includes(ghe(e, il(e.getCommonSourceDirectory()))))) + return jB(e, i); + } + function BB(e, t, n) { + const i = (u) => e.getCanonicalFileName(u), s = oo(n ? Hn(n) : e.getCommonSourceDirectory(), e.getCurrentDirectory(), i), o = Xi(t, e.getCurrentDirectory()), c = KT( + s, + o, + s, + i, + /*isAbsolutePathAnUrl*/ + !1 + ), _ = $u(c); + return n ? iS(_) : _; + } + function NK(e, t, n) { + const i = t.getCompilerOptions(); + let s; + return i.outDir ? s = $u(f5(e, t, i.outDir)) : s = $u(e), s + n; + } + function AK(e, t) { + return c5(e, t.getCompilerOptions(), t); + } + function c5(e, t, n) { + const i = t.declarationDir || t.outDir, s = i ? IK(e, i, n.getCurrentDirectory(), n.getCommonSourceDirectory(), (c) => n.getCanonicalFileName(c)) : e, o = l5(s); + return $u(s) + o; + } + function l5(e) { + return vc(e, [ + ".mjs", + ".mts" + /* Mts */ + ]) ? ".d.mts" : vc(e, [ + ".cjs", + ".cts" + /* Cts */ + ]) ? ".d.cts" : vc(e, [ + ".json" + /* Json */ + ]) ? ".d.json.ts" : ( + // Drive-by redefinition of json declaration file output name so if it's ever enabled, it behaves well + ".d.ts" + ); + } + function JB(e) { + return vc(e, [ + ".d.mts", + ".mjs", + ".mts" + /* Mts */ + ]) ? [ + ".mts", + ".mjs" + /* Mjs */ + ] : vc(e, [ + ".d.cts", + ".cjs", + ".cts" + /* Cts */ + ]) ? [ + ".cts", + ".cjs" + /* Cjs */ + ] : vc(e, [".d.json.ts"]) ? [ + ".json" + /* Json */ + ] : [ + ".tsx", + ".ts", + ".jsx", + ".js" + /* Js */ + ]; + } + function zB(e, t, n, i) { + return n ? Iy( + i(), + Df(n, e, t) + ) : e; + } + function u5(e, t) { + var n; + if (e.paths) + return e.baseUrl ?? E.checkDefined(e.pathsBasePath || ((n = t.getCurrentDirectory) == null ? void 0 : n.call(t)), "Encountered 'paths' without a 'baseUrl', config file, or host 'getCurrentDirectory'."); + } + function _5(e, t, n) { + const i = e.getCompilerOptions(); + if (i.outFile) { + const s = Ru(i), o = i.emitDeclarationOnly || s === 2 || s === 4; + return kn( + e.getSourceFiles(), + (c) => (o || !el(c)) && Rb(c, e, n) + ); + } else { + const s = t === void 0 ? e.getSourceFiles() : [t]; + return kn( + s, + (o) => Rb(o, e, n) + ); + } + } + function Rb(e, t, n) { + const i = t.getCompilerOptions(); + if (i.noEmitForJsFiles && Gu(e) || e.isDeclarationFile || t.isSourceFileFromExternalLibrary(e)) return !1; + if (n) return !0; + if (t.isSourceOfProjectReferenceRedirect(e.fileName)) return !1; + if (!tp(e)) return !0; + if (t.getResolvedProjectReferenceToRedirect(e.fileName)) return !1; + if (i.outFile) return !0; + if (!i.outDir) return !1; + if (i.rootDir || i.composite && i.configFilePath) { + const s = Xi(XD(i, () => [], t.getCurrentDirectory(), t.getCanonicalFileName), t.getCurrentDirectory()), o = IK(e.fileName, i.outDir, t.getCurrentDirectory(), s, t.getCanonicalFileName); + if (xh(e.fileName, o, t.getCurrentDirectory(), !t.useCaseSensitiveFileNames()) === 0) return !1; + } + return !0; + } + function f5(e, t, n) { + return IK(e, n, t.getCurrentDirectory(), t.getCommonSourceDirectory(), (i) => t.getCanonicalFileName(i)); + } + function IK(e, t, n, i, s) { + let o = Xi(e, n); + return o = s(o).indexOf(s(i)) === 0 ? o.substring(i.length) : o, Ln(t, o); + } + function p5(e, t, n, i, s, o, c) { + e.writeFile( + n, + i, + s, + (_) => { + t.add(Ho(p.Could_not_write_file_0_Colon_1, n, _)); + }, + o, + c + ); + } + function hhe(e, t, n) { + if (e.length > Xm(e) && !n(e)) { + const i = Hn(e); + hhe(i, t, n), t(e); + } + } + function WB(e, t, n, i, s, o) { + try { + i(e, t, n); + } catch { + hhe(Hn(Hs(e)), s, o), i(e, t, n); + } + } + function U4(e, t) { + const n = Ag(e); + return o4(n, t); + } + function JC(e, t) { + return o4(e, t); + } + function Ug(e) { + return Pn(e.members, (t) => Go(t) && Ap(t.body)); + } + function V4(e) { + if (e && e.parameters.length > 0) { + const t = e.parameters.length === 2 && Bb(e.parameters[0]); + return e.parameters[t ? 1 : 0]; + } + } + function FK(e) { + const t = V4(e); + return t && t.type; + } + function jb(e) { + if (e.parameters.length && !B0(e)) { + const t = e.parameters[0]; + if (Bb(t)) + return t; + } + } + function Bb(e) { + return Xy(e.name); + } + function Xy(e) { + return !!e && e.kind === 80 && UB(e); + } + function vx(e) { + return !!ur( + e, + (t) => t.kind === 186 ? !0 : t.kind === 80 || t.kind === 166 ? !1 : "quit" + ); + } + function Jb(e) { + if (!Xy(e)) + return !1; + for (; Xu(e.parent) && e.parent.left === e; ) + e = e.parent; + return e.parent.kind === 186; + } + function UB(e) { + return e.escapedText === "this"; + } + function zb(e, t) { + let n, i, s, o; + return Ph(t) ? (n = t, t.kind === 177 ? s = t : t.kind === 178 ? o = t : E.fail("Accessor has wrong kind")) : lr(e, (c) => { + if (Jy(c) && Vs(c) === Vs(t)) { + const _ = TS(c.name), u = TS(t.name); + _ === u && (n ? i || (i = c) : n = c, c.kind === 177 && !s && (s = c), c.kind === 178 && !o && (o = c)); + } + }), { + firstAccessor: n, + secondAccessor: i, + getAccessor: s, + setAccessor: o + }; + } + function qc(e) { + if (!an(e) && Tc(e) || jp(e)) return; + const t = e.type; + return t || !an(e) ? t : h4(e) ? e.typeExpression && e.typeExpression.type : Ly(e); + } + function OK(e) { + return e.type; + } + function pf(e) { + return B0(e) ? e.type && e.type.typeExpression && e.type.typeExpression.type : e.type || (an(e) ? OP(e) : void 0); + } + function d5(e) { + return na(Z1(e), (t) => _Oe(t) ? t.typeParameters : void 0); + } + function _Oe(e) { + return Bp(e) && !(e.parent.kind === 320 && (e.parent.tags.some(Fp) || e.parent.tags.some(o6))); + } + function VB(e) { + const t = V4(e); + return t && qc(t); + } + function fOe(e, t, n, i) { + pOe(e, t, n.pos, i); + } + function pOe(e, t, n, i) { + i && i.length && n !== i[0].pos && JC(e, n) !== JC(e, i[0].pos) && t.writeLine(); + } + function LK(e, t, n, i) { + n !== i && JC(e, n) !== JC(e, i) && t.writeLine(); + } + function dOe(e, t, n, i, s, o, c, _) { + if (i && i.length > 0) { + let u = !1; + for (const m of i) + u && (n.writeSpace(" "), u = !1), _(e, t, n, m.pos, m.end, c), m.hasTrailingNewLine ? n.writeLine() : u = !0; + u && o && n.writeSpace(" "); + } + } + function MK(e, t, n, i, s, o, c) { + let _, u; + if (c ? s.pos === 0 && (_ = kn(Fg(e, s.pos), m)) : _ = Fg(e, s.pos), _) { + const g = []; + let h; + for (const S of _) { + if (h) { + const T = JC(t, h.end); + if (JC(t, S.pos) >= T + 2) + break; + } + g.push(S), h = S; + } + if (g.length) { + const S = JC(t, _a(g).end); + JC(t, aa(e, s.pos)) >= S + 2 && (fOe(t, n, s, _), dOe( + e, + t, + n, + g, + /*leadingSeparator*/ + !1, + /*trailingSeparator*/ + !0, + o, + i + ), u = { nodePos: s.pos, detachedCommentEndPos: _a(g).end }); + } + } + return u; + function m(g) { + return D7(e, g.pos); + } + } + function zC(e, t, n, i, s, o) { + if (e.charCodeAt(i + 1) === 42) { + const c = pC(t, i), _ = t.length; + let u; + for (let m = i, g = c.line; m < s; g++) { + const h = g + 1 === _ ? e.length + 1 : t[g + 1]; + if (m !== i) { + u === void 0 && (u = yhe(e, t[c.line], i)); + const T = n.getIndent() * L3() - u + yhe(e, m, h); + if (T > 0) { + let C = T % L3(); + const D = o5((T - C) / L3()); + for (n.rawWrite(D); C; ) + n.rawWrite(" "), C--; + } else + n.rawWrite(""); + } + mOe(e, s, n, o, m, h), m = h; + } + } else + n.writeComment(e.substring(i, s)); + } + function mOe(e, t, n, i, s, o) { + const c = Math.min(t, o - 1), _ = e.substring(s, c).trim(); + _ ? (n.writeComment(_), c !== t && n.writeLine()) : n.rawWrite(i); + } + function yhe(e, t, n) { + let i = 0; + for (; t < n && em(e.charCodeAt(t)); t++) + e.charCodeAt(t) === 9 ? i += L3() - i % L3() : i++; + return i; + } + function qB(e) { + return Mu(e) !== 0; + } + function RK(e) { + return w0(e) !== 0; + } + function Q_(e, t) { + return !!bx(e, t); + } + function $n(e, t) { + return !!jK(e, t); + } + function Vs(e) { + return sl(e) && Kc(e) || nc(e); + } + function Kc(e) { + return $n( + e, + 256 + /* Static */ + ); + } + function m5(e) { + return Q_( + e, + 16 + /* Override */ + ); + } + function Wb(e) { + return $n( + e, + 64 + /* Abstract */ + ); + } + function HB(e) { + return $n( + e, + 128 + /* Ambient */ + ); + } + function cm(e) { + return $n( + e, + 512 + /* Accessor */ + ); + } + function kS(e) { + return Q_( + e, + 8 + /* Readonly */ + ); + } + function Pf(e) { + return $n( + e, + 32768 + /* Decorator */ + ); + } + function bx(e, t) { + return Mu(e) & t; + } + function jK(e, t) { + return w0(e) & t; + } + function BK(e, t, n) { + return e.kind >= 0 && e.kind <= 165 ? 0 : (e.modifierFlagsCache & 536870912 || (e.modifierFlagsCache = GB(e) | 536870912), n || t && an(e) ? (!(e.modifierFlagsCache & 268435456) && e.parent && (e.modifierFlagsCache |= vhe(e) | 268435456), bhe(e.modifierFlagsCache)) : gOe(e.modifierFlagsCache)); + } + function Mu(e) { + return BK( + e, + /*includeJSDoc*/ + !0 + ); + } + function JK(e) { + return BK( + e, + /*includeJSDoc*/ + !0, + /*alwaysIncludeJSDoc*/ + !0 + ); + } + function w0(e) { + return BK( + e, + /*includeJSDoc*/ + !1 + ); + } + function vhe(e) { + let t = 0; + return e.parent && !Ii(e) && (an(e) && (YY(e) && (t |= 8388608), ZY(e) && (t |= 16777216), KY(e) && (t |= 33554432), eZ(e) && (t |= 67108864), tZ(e) && (t |= 134217728)), rZ(e) && (t |= 65536)), t; + } + function gOe(e) { + return e & 65535; + } + function bhe(e) { + return e & 131071 | (e & 260046848) >>> 23; + } + function hOe(e) { + return bhe(vhe(e)); + } + function zK(e) { + return GB(e) | hOe(e); + } + function GB(e) { + let t = Jp(e) ? lm(e.modifiers) : 0; + return (e.flags & 8 || e.kind === 80 && e.flags & 4096) && (t |= 32), t; + } + function lm(e) { + let t = 0; + if (e) + for (const n of e) + t |= Sx(n.kind); + return t; + } + function Sx(e) { + switch (e) { + case 126: + return 256; + case 125: + return 1; + case 124: + return 4; + case 123: + return 2; + case 128: + return 64; + case 129: + return 512; + case 95: + return 32; + case 138: + return 128; + case 87: + return 4096; + case 90: + return 2048; + case 134: + return 1024; + case 148: + return 8; + case 164: + return 16; + case 103: + return 8192; + case 147: + return 16384; + case 170: + return 32768; + } + return 0; + } + function R3(e) { + return e === 57 || e === 56; + } + function WK(e) { + return R3(e) || e === 54; + } + function q4(e) { + return e === 76 || e === 77 || e === 78; + } + function $B(e) { + return fn(e) && q4(e.operatorToken.kind); + } + function g5(e) { + return R3(e) || e === 61; + } + function j3(e) { + return fn(e) && g5(e.operatorToken.kind); + } + function Ah(e) { + return e >= 64 && e <= 79; + } + function XB(e) { + const t = QB(e); + return t && !t.isImplements ? t.class : void 0; + } + function QB(e) { + if (Lh(e)) { + if (Z_(e.parent) && Zn(e.parent.parent)) + return { + class: e.parent.parent, + isImplements: e.parent.token === 119 + /* ImplementsKeyword */ + }; + if (Xx(e.parent)) { + const t = iv(e.parent); + if (t && Zn(t)) + return { class: t, isImplements: !1 }; + } + } + } + function Cl(e, t) { + return fn(e) && (t ? e.operatorToken.kind === 64 : Ah(e.operatorToken.kind)) && u_(e.left); + } + function P0(e) { + if (Cl( + e, + /*excludeCompoundAssignment*/ + !0 + )) { + const t = e.left.kind; + return t === 210 || t === 209; + } + return !1; + } + function h5(e) { + return XB(e) !== void 0; + } + function _o(e) { + return e.kind === 80 || J3(e); + } + function w_(e) { + switch (e.kind) { + case 80: + return e; + case 166: + do + e = e.left; + while (e.kind !== 80); + return e; + case 211: + do + e = e.expression; + while (e.kind !== 80); + return e; + } + } + function B3(e) { + return e.kind === 80 || e.kind === 110 || e.kind === 108 || e.kind === 236 || e.kind === 211 && B3(e.expression) || e.kind === 217 && B3(e.expression); + } + function J3(e) { + return Tn(e) && Me(e.name) && _o(e.expression); + } + function z3(e) { + if (Tn(e)) { + const t = z3(e.expression); + if (t !== void 0) + return t + "." + G_(e.name); + } else if (fo(e)) { + const t = z3(e.expression); + if (t !== void 0 && Fc(e.argumentExpression)) + return t + "." + TS(e.argumentExpression); + } else { + if (Me(e)) + return Pi(e.escapedText); + if (wd(e)) + return fD(e); + } + } + function Qy(e) { + return Fb(e) && wh(e) === "prototype"; + } + function H4(e) { + return e.parent.kind === 166 && e.parent.right === e || e.parent.kind === 211 && e.parent.name === e || e.parent.kind === 236 && e.parent.name === e; + } + function YB(e) { + return !!e.parent && (Tn(e.parent) && e.parent.name === e || fo(e.parent) && e.parent.argumentExpression === e); + } + function UK(e) { + return Xu(e.parent) && e.parent.right === e || Tn(e.parent) && e.parent.name === e || yv(e.parent) && e.parent.right === e; + } + function y5(e) { + return fn(e) && e.operatorToken.kind === 104; + } + function VK(e) { + return y5(e.parent) && e === e.parent.right; + } + function ZB(e) { + return e.kind === 210 && e.properties.length === 0; + } + function qK(e) { + return e.kind === 209 && e.elements.length === 0; + } + function G4(e) { + if (!(!yOe(e) || !e.declarations)) { + for (const t of e.declarations) + if (t.localSymbol) return t.localSymbol; + } + } + function yOe(e) { + return e && Ir(e.declarations) > 0 && $n( + e.declarations[0], + 2048 + /* Default */ + ); + } + function v5(e) { + return Pn(HOe, (t) => Bo(e, t)); + } + function vOe(e) { + const t = [], n = e.length; + for (let i = 0; i < n; i++) { + const s = e.charCodeAt(i); + s < 128 ? t.push(s) : s < 2048 ? (t.push(s >> 6 | 192), t.push(s & 63 | 128)) : s < 65536 ? (t.push(s >> 12 | 224), t.push(s >> 6 & 63 | 128), t.push(s & 63 | 128)) : s < 131072 ? (t.push(s >> 18 | 240), t.push(s >> 12 & 63 | 128), t.push(s >> 6 & 63 | 128), t.push(s & 63 | 128)) : E.assert(!1, "Unexpected code point"); + } + return t; + } + var Tx = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; + function HK(e) { + let t = ""; + const n = vOe(e); + let i = 0; + const s = n.length; + let o, c, _, u; + for (; i < s; ) + o = n[i] >> 2, c = (n[i] & 3) << 4 | n[i + 1] >> 4, _ = (n[i + 1] & 15) << 2 | n[i + 2] >> 6, u = n[i + 2] & 63, i + 1 >= s ? _ = u = 64 : i + 2 >= s && (u = 64), t += Tx.charAt(o) + Tx.charAt(c) + Tx.charAt(_) + Tx.charAt(u), i += 3; + return t; + } + function bOe(e) { + let t = "", n = 0; + const i = e.length; + for (; n < i; ) { + const s = e[n]; + if (s < 128) + t += String.fromCharCode(s), n++; + else if ((s & 192) === 192) { + let o = s & 63; + n++; + let c = e[n]; + for (; (c & 192) === 128; ) + o = o << 6 | c & 63, n++, c = e[n]; + t += String.fromCharCode(o); + } else + t += String.fromCharCode(s), n++; + } + return t; + } + function GK(e, t) { + return e && e.base64encode ? e.base64encode(t) : HK(t); + } + function $K(e, t) { + if (e && e.base64decode) + return e.base64decode(t); + const n = t.length, i = []; + let s = 0; + for (; s < n && t.charCodeAt(s) !== Tx.charCodeAt(64); ) { + const o = Tx.indexOf(t[s]), c = Tx.indexOf(t[s + 1]), _ = Tx.indexOf(t[s + 2]), u = Tx.indexOf(t[s + 3]), m = (o & 63) << 2 | c >> 4 & 3, g = (c & 15) << 4 | _ >> 2 & 15, h = (_ & 3) << 6 | u & 63; + g === 0 && _ !== 0 ? i.push(m) : h === 0 && u !== 0 ? i.push(m, g) : i.push(m, g, h), s += 4; + } + return bOe(i); + } + function KB(e, t) { + const n = rs(t) ? t : t.readFile(e); + if (!n) return; + const i = Mz(e, n); + return i.error ? void 0 : i.config; + } + function WC(e, t) { + return KB(e, t) || {}; + } + function b5(e) { + try { + return JSON.parse(e); + } catch { + return; + } + } + function xd(e, t) { + return !t.directoryExists || t.directoryExists(e); + } + var SOe = `\r +`, TOe = ` +`; + function N0(e) { + switch (e.newLine) { + case 0: + return SOe; + case 1: + case void 0: + return TOe; + } + } + function np(e, t = e) { + return E.assert(t >= e || t === -1), { pos: e, end: t }; + } + function S5(e, t) { + return np(e.pos, t); + } + function ov(e, t) { + return np(t, e.end); + } + function Ih(e) { + const t = Jp(e) ? gb(e.modifiers, ll) : void 0; + return t && !kd(t.end) ? ov(e, t.end) : e; + } + function um(e) { + if (ss(e) || fc(e)) + return ov(e, e.name.pos); + const t = Jp(e) ? Co(e.modifiers) : void 0; + return t && !kd(t.end) ? ov(e, t.end) : Ih(e); + } + function eJ(e, t) { + return np(e, e + Xs(t).length); + } + function CS(e, t) { + return QK(e, e, t); + } + function T5(e, t, n) { + return ip( + $4( + e, + n, + /*includeComments*/ + !1 + ), + $4( + t, + n, + /*includeComments*/ + !1 + ), + n + ); + } + function XK(e, t, n) { + return ip(e.end, t.end, n); + } + function QK(e, t, n) { + return ip($4( + e, + n, + /*includeComments*/ + !1 + ), t.end, n); + } + function W3(e, t, n) { + return ip(e.end, $4( + t, + n, + /*includeComments*/ + !1 + ), n); + } + function tJ(e, t, n, i) { + const s = $4(t, n, i); + return c4(n, e.end, s); + } + function She(e, t, n) { + return c4(n, e.end, t.end); + } + function YK(e, t) { + return !ip(e.pos, e.end, t); + } + function ip(e, t, n) { + return c4(n, e, t) === 0; + } + function $4(e, t, n) { + return kd(e.pos) ? -1 : aa( + t.text, + e.pos, + /*stopAfterLineBreak*/ + !1, + n + ); + } + function ZK(e, t, n, i) { + const s = aa( + n.text, + e, + /*stopAfterLineBreak*/ + !1, + i + ), o = xOe(s, t, n); + return c4(n, o ?? t, s); + } + function KK(e, t, n, i) { + const s = aa( + n.text, + e, + /*stopAfterLineBreak*/ + !1, + i + ); + return c4(n, e, Math.min(t, s)); + } + function p_(e, t) { + return rJ(e.pos, e.end, t); + } + function rJ(e, t, n) { + return e <= n.pos && t >= n.end; + } + function xOe(e, t = 0, n) { + for (; e-- > t; ) + if (!Ig(n.text.charCodeAt(e))) + return e; + } + function nJ(e) { + const t = ls(e); + if (t) + switch (t.parent.kind) { + case 266: + case 267: + return t === t.parent.name; + } + return !1; + } + function X4(e) { + return kn(e.declarations, U3); + } + function U3(e) { + return Kn(e) && e.initializer !== void 0; + } + function iJ(e) { + return e.watch && ro(e, "watch"); + } + function nd(e) { + e.close(); + } + function rc(e) { + return e.flags & 33554432 ? e.links.checkFlags : 0; + } + function sp(e, t = !1) { + if (e.valueDeclaration) { + const n = t && e.declarations && Pn(e.declarations, A_) || e.flags & 32768 && Pn(e.declarations, cp) || e.valueDeclaration, i = Q1(n); + return e.parent && e.parent.flags & 32 ? i : i & -8; + } + if (rc(e) & 6) { + const n = e.links.checkFlags, i = n & 1024 ? 2 : n & 256 ? 1 : 4, s = n & 2048 ? 256 : 0; + return i | s; + } + return e.flags & 4194304 ? 257 : 0; + } + function Gl(e, t) { + return e.flags & 2097152 ? t.getAliasedSymbol(e) : e; + } + function UC(e) { + return e.exportSymbol ? e.exportSymbol.flags | e.flags : e.flags; + } + function x5(e) { + return Q4(e) === 1; + } + function xx(e) { + return Q4(e) !== 0; + } + function Q4(e) { + const { parent: t } = e; + switch (t?.kind) { + case 217: + return Q4(t); + case 225: + case 224: + const { operator: n } = t; + return n === 46 || n === 47 ? 2 : 0; + case 226: + const { left: i, operatorToken: s } = t; + return i === e && Ah(s.kind) ? s.kind === 64 ? 1 : 2 : 0; + case 211: + return t.name !== e ? 0 : Q4(t); + case 303: { + const o = Q4(t.parent); + return e === t.name ? kOe(o) : o; + } + case 304: + return e === t.objectAssignmentInitializer ? 0 : Q4(t.parent); + case 209: + return Q4(t); + case 249: + case 250: + return e === t.initializer ? 1 : 0; + default: + return 0; + } + } + function kOe(e) { + switch (e) { + case 0: + return 1; + case 1: + return 0; + case 2: + return 2; + default: + return E.assertNever(e); + } + } + function sJ(e, t) { + if (!e || !t || Object.keys(e).length !== Object.keys(t).length) + return !1; + for (const n in e) + if (typeof e[n] == "object") { + if (!sJ(e[n], t[n])) + return !1; + } else if (typeof e[n] != "function" && e[n] !== t[n]) + return !1; + return !0; + } + function P_(e, t) { + e.forEach(t), e.clear(); + } + function Vg(e, t, n) { + const { onDeleteValue: i, onExistingValue: s } = n; + e.forEach((o, c) => { + var _; + t?.has(c) ? s && s(o, (_ = t.get) == null ? void 0 : _.call(t, c), c) : (e.delete(c), i(o, c)); + }); + } + function Y4(e, t, n) { + Vg(e, t, n); + const { createNewValue: i } = n; + t?.forEach((s, o) => { + e.has(o) || e.set(o, i(o, s)); + }); + } + function eee(e) { + if (e.flags & 32) { + const t = Fh(e); + return !!t && $n( + t, + 64 + /* Abstract */ + ); + } + return !1; + } + function Fh(e) { + var t; + return (t = e.declarations) == null ? void 0 : t.find(Zn); + } + function Cn(e) { + return e.flags & 3899393 ? e.objectFlags : 0; + } + function k5(e) { + return !!e && !!e.declarations && !!e.declarations[0] && hN(e.declarations[0]); + } + function tee({ moduleSpecifier: e }) { + return ea(e) ? e.text : qo(e); + } + function aJ(e) { + let t; + return ms(e, (n) => { + Ap(n) && (t = n); + }, (n) => { + for (let i = n.length - 1; i >= 0; i--) + if (Ap(n[i])) { + t = n[i]; + break; + } + }), t; + } + function Lp(e, t) { + return e.has(t) ? !1 : (e.add(t), !0); + } + function kx(e) { + return Zn(e) || Yl(e) || Qu(e); + } + function oJ(e) { + return e >= 182 && e <= 205 || e === 133 || e === 159 || e === 150 || e === 163 || e === 151 || e === 136 || e === 154 || e === 155 || e === 116 || e === 157 || e === 146 || e === 141 || e === 233 || e === 312 || e === 313 || e === 314 || e === 315 || e === 316 || e === 317 || e === 318; + } + function vo(e) { + return e.kind === 211 || e.kind === 212; + } + function cJ(e) { + return e.kind === 211 ? e.name : (E.assert( + e.kind === 212 + /* ElementAccessExpression */ + ), e.argumentExpression); + } + function C5(e) { + return e.kind === 275 || e.kind === 279; + } + function VC(e) { + for (; vo(e); ) + e = e.expression; + return e; + } + function ree(e, t) { + if (vo(e.parent) && YB(e)) + return n(e.parent); + function n(i) { + if (i.kind === 211) { + const s = t(i.name); + if (s !== void 0) + return s; + } else if (i.kind === 212) + if (Me(i.argumentExpression) || Na(i.argumentExpression)) { + const s = t(i.argumentExpression); + if (s !== void 0) + return s; + } else + return; + if (vo(i.expression)) + return n(i.expression); + if (Me(i.expression)) + return t(i.expression); + } + } + function qC(e, t) { + for (; ; ) { + switch (e.kind) { + case 225: + e = e.operand; + continue; + case 226: + e = e.left; + continue; + case 227: + e = e.condition; + continue; + case 215: + e = e.tag; + continue; + case 213: + if (t) + return e; + // falls through + case 234: + case 212: + case 211: + case 235: + case 355: + case 238: + e = e.expression; + continue; + } + return e; + } + } + function COe(e, t) { + this.flags = e, this.escapedName = t, this.declarations = void 0, this.valueDeclaration = void 0, this.id = 0, this.mergeId = 0, this.parent = void 0, this.members = void 0, this.exports = void 0, this.exportSymbol = void 0, this.constEnumOnlyModule = void 0, this.isReferenced = void 0, this.lastAssignmentPos = void 0, this.links = void 0; + } + function EOe(e, t) { + this.flags = t, (E.isDebugging || nn) && (this.checker = e); + } + function DOe(e, t) { + this.flags = t, E.isDebugging && (this.checker = e); + } + function nee(e, t, n) { + this.pos = t, this.end = n, this.kind = e, this.id = 0, this.flags = 0, this.modifierFlagsCache = 0, this.transformFlags = 0, this.parent = void 0, this.original = void 0, this.emitNode = void 0; + } + function wOe(e, t, n) { + this.pos = t, this.end = n, this.kind = e, this.id = 0, this.flags = 0, this.transformFlags = 0, this.parent = void 0, this.emitNode = void 0; + } + function POe(e, t, n) { + this.pos = t, this.end = n, this.kind = e, this.id = 0, this.flags = 0, this.transformFlags = 0, this.parent = void 0, this.original = void 0, this.emitNode = void 0; + } + function NOe(e, t, n) { + this.fileName = e, this.text = t, this.skipTrivia = n || ((i) => i); + } + var $l = { + getNodeConstructor: () => nee, + getTokenConstructor: () => wOe, + getIdentifierConstructor: () => POe, + getPrivateIdentifierConstructor: () => nee, + getSourceFileConstructor: () => nee, + getSymbolConstructor: () => COe, + getTypeConstructor: () => EOe, + getSignatureConstructor: () => DOe, + getSourceMapSourceConstructor: () => NOe + }, The = []; + function xhe(e) { + The.push(e), e($l); + } + function iee(e) { + Object.assign($l, e), lr(The, (t) => t($l)); + } + function qg(e, t) { + return e.replace(/\{(\d+)\}/g, (n, i) => "" + E.checkDefined(t[+i])); + } + var E5; + function see(e) { + E5 = e; + } + function aee(e) { + !E5 && e && (E5 = e()); + } + function us(e) { + return E5 && E5[e.key] || e.message; + } + function Cx(e, t, n, i, s, ...o) { + n + i > t.length && (i = t.length - n), VZ(t, n, i); + let c = us(s); + return at(o) && (c = qg(c, o)), { + file: void 0, + start: n, + length: i, + messageText: c, + category: s.category, + code: s.code, + reportsUnnecessary: s.reportsUnnecessary, + fileName: e + }; + } + function AOe(e) { + return e.file === void 0 && e.start !== void 0 && e.length !== void 0 && typeof e.fileName == "string"; + } + function khe(e, t) { + const n = t.fileName || "", i = t.text.length; + E.assertEqual(e.fileName, n), E.assertLessThanOrEqual(e.start, i), E.assertLessThanOrEqual(e.start + e.length, i); + const s = { + file: t, + start: e.start, + length: e.length, + messageText: e.messageText, + category: e.category, + code: e.code, + reportsUnnecessary: e.reportsUnnecessary + }; + if (e.relatedInformation) { + s.relatedInformation = []; + for (const o of e.relatedInformation) + AOe(o) && o.fileName === n ? (E.assertLessThanOrEqual(o.start, i), E.assertLessThanOrEqual(o.start + o.length, i), s.relatedInformation.push(khe(o, t))) : s.relatedInformation.push(o); + } + return s; + } + function Ex(e, t) { + const n = []; + for (const i of e) + n.push(khe(i, t)); + return n; + } + function ol(e, t, n, i, ...s) { + VZ(e.text, t, n); + let o = us(i); + return at(s) && (o = qg(o, s)), { + file: e, + start: t, + length: n, + messageText: o, + category: i.category, + code: i.code, + reportsUnnecessary: i.reportsUnnecessary, + reportsDeprecated: i.reportsDeprecated + }; + } + function Dx(e, ...t) { + let n = us(e); + return at(t) && (n = qg(n, t)), n; + } + function Ho(e, ...t) { + let n = us(e); + return at(t) && (n = qg(n, t)), { + file: void 0, + start: void 0, + length: void 0, + messageText: n, + category: e.category, + code: e.code, + reportsUnnecessary: e.reportsUnnecessary, + reportsDeprecated: e.reportsDeprecated + }; + } + function D5(e, t) { + return { + file: void 0, + start: void 0, + length: void 0, + code: e.code, + category: e.category, + messageText: e.next ? e : e.messageText, + relatedInformation: t + }; + } + function fs(e, t, ...n) { + let i = us(t); + return at(n) && (i = qg(i, n)), { + messageText: i, + category: t.category, + code: t.code, + next: e === void 0 || Array.isArray(e) ? e : [e] + }; + } + function oee(e, t) { + let n = e; + for (; n.next; ) + n = n.next[0]; + n.next = [t]; + } + function lJ(e) { + return e.file ? e.file.path : void 0; + } + function Z4(e, t) { + return cee(e, t) || IOe(e, t) || 0; + } + function cee(e, t) { + const n = uJ(e), i = uJ(t); + return cu(lJ(e), lJ(t)) || uo(e.start, t.start) || uo(e.length, t.length) || uo(n, i) || FOe(e, t) || 0; + } + function IOe(e, t) { + return !e.relatedInformation && !t.relatedInformation ? 0 : e.relatedInformation && t.relatedInformation ? uo(t.relatedInformation.length, e.relatedInformation.length) || lr(e.relatedInformation, (n, i) => { + const s = t.relatedInformation[i]; + return Z4(n, s); + }) || 0 : e.relatedInformation ? -1 : 1; + } + function FOe(e, t) { + let n = _J(e), i = _J(t); + typeof n != "string" && (n = n.messageText), typeof i != "string" && (i = i.messageText); + const s = typeof e.messageText != "string" ? e.messageText.next : void 0, o = typeof t.messageText != "string" ? t.messageText.next : void 0; + let c = cu(n, i); + return c || (c = OOe(s, o), c) ? c : e.canonicalHead && !t.canonicalHead ? -1 : t.canonicalHead && !e.canonicalHead ? 1 : 0; + } + function OOe(e, t) { + return e === void 0 && t === void 0 ? 0 : e === void 0 ? 1 : t === void 0 ? -1 : Che(e, t) || Ehe(e, t); + } + function Che(e, t) { + if (e === void 0 && t === void 0) + return 0; + if (e === void 0) + return 1; + if (t === void 0) + return -1; + let n = uo(t.length, e.length); + if (n) + return n; + for (let i = 0; i < t.length; i++) + if (n = Che(e[i].next, t[i].next), n) + return n; + return 0; + } + function Ehe(e, t) { + let n; + for (let i = 0; i < t.length; i++) { + if (n = cu(e[i].messageText, t[i].messageText), n) + return n; + if (e[i].next !== void 0 && (n = Ehe(e[i].next, t[i].next), n)) + return n; + } + return 0; + } + function w5(e, t) { + const n = uJ(e), i = uJ(t), s = _J(e), o = _J(t); + return cu(lJ(e), lJ(t)) === 0 && uo(e.start, t.start) === 0 && uo(e.length, t.length) === 0 && uo(n, i) === 0 && LOe(s, o); + } + function uJ(e) { + var t; + return ((t = e.canonicalHead) == null ? void 0 : t.code) || e.code; + } + function _J(e) { + var t; + return ((t = e.canonicalHead) == null ? void 0 : t.messageText) || e.messageText; + } + function LOe(e, t) { + const n = typeof e == "string" ? e : e.messageText, i = typeof t == "string" ? t : t.messageText; + return cu(n, i) === 0; + } + function V3(e) { + return e === 4 || e === 2 || e === 1 || e === 6 ? 1 : 0; + } + function Dhe(e) { + if (e.transformFlags & 2) + return bu(e) || gv(e) ? e : ms(e, Dhe); + } + function MOe(e) { + return e.isDeclarationFile ? void 0 : Dhe(e); + } + function ROe(e, t) { + return (GS(e, t) === 99 || vc(e.fileName, [ + ".cjs", + ".cts", + ".mjs", + ".mts" + /* Mts */ + ])) && !e.isDeclarationFile ? !0 : void 0; + } + function q3(e) { + switch (uee(e)) { + case 3: + return (s) => { + s.externalModuleIndicator = wN(s) || !s.isDeclarationFile || void 0; + }; + case 1: + return (s) => { + s.externalModuleIndicator = wN(s); + }; + case 2: + const t = [wN]; + (e.jsx === 4 || e.jsx === 5) && t.push(MOe), t.push(ROe); + const n = U_(...t); + return (s) => void (s.externalModuleIndicator = n(s, e)); + } + } + function fJ(e) { + const t = Su(e); + return 3 <= t && t <= 99 || H3(e) || G3(e); + } + function Ift(e) { + return e; + } + var Xl = { + allowImportingTsExtensions: { + dependencies: ["rewriteRelativeImportExtensions"], + computeValue: (e) => !!(e.allowImportingTsExtensions || e.rewriteRelativeImportExtensions) + }, + target: { + dependencies: ["module"], + computeValue: (e) => (e.target === 0 ? void 0 : e.target) ?? (e.module === 100 && 9 || e.module === 199 && 99 || 1) + }, + module: { + dependencies: ["target"], + computeValue: (e) => typeof e.module == "number" ? e.module : Xl.target.computeValue(e) >= 2 ? 5 : 1 + }, + moduleResolution: { + dependencies: ["module", "target"], + computeValue: (e) => { + let t = e.moduleResolution; + if (t === void 0) + switch (Xl.module.computeValue(e)) { + case 1: + t = 2; + break; + case 100: + t = 3; + break; + case 199: + t = 99; + break; + case 200: + t = 100; + break; + default: + t = 1; + break; + } + return t; + } + }, + moduleDetection: { + dependencies: ["module", "target"], + computeValue: (e) => e.moduleDetection || (Xl.module.computeValue(e) === 100 || Xl.module.computeValue(e) === 199 ? 3 : 2) + }, + isolatedModules: { + dependencies: ["verbatimModuleSyntax"], + computeValue: (e) => !!(e.isolatedModules || e.verbatimModuleSyntax) + }, + esModuleInterop: { + dependencies: ["module", "target"], + computeValue: (e) => { + if (e.esModuleInterop !== void 0) + return e.esModuleInterop; + switch (Xl.module.computeValue(e)) { + case 100: + case 199: + case 200: + return !0; + } + return !1; + } + }, + allowSyntheticDefaultImports: { + dependencies: ["module", "target", "moduleResolution"], + computeValue: (e) => e.allowSyntheticDefaultImports !== void 0 ? e.allowSyntheticDefaultImports : Xl.esModuleInterop.computeValue(e) || Xl.module.computeValue(e) === 4 || Xl.moduleResolution.computeValue(e) === 100 + }, + resolvePackageJsonExports: { + dependencies: ["moduleResolution"], + computeValue: (e) => { + const t = Xl.moduleResolution.computeValue(e); + if (!HC(t)) + return !1; + if (e.resolvePackageJsonExports !== void 0) + return e.resolvePackageJsonExports; + switch (t) { + case 3: + case 99: + case 100: + return !0; + } + return !1; + } + }, + resolvePackageJsonImports: { + dependencies: ["moduleResolution", "resolvePackageJsonExports"], + computeValue: (e) => { + const t = Xl.moduleResolution.computeValue(e); + if (!HC(t)) + return !1; + if (e.resolvePackageJsonExports !== void 0) + return e.resolvePackageJsonExports; + switch (t) { + case 3: + case 99: + case 100: + return !0; + } + return !1; + } + }, + resolveJsonModule: { + dependencies: ["moduleResolution", "module", "target"], + computeValue: (e) => e.resolveJsonModule !== void 0 ? e.resolveJsonModule : Xl.moduleResolution.computeValue(e) === 100 + }, + declaration: { + dependencies: ["composite"], + computeValue: (e) => !!(e.declaration || e.composite) + }, + preserveConstEnums: { + dependencies: ["isolatedModules", "verbatimModuleSyntax"], + computeValue: (e) => !!(e.preserveConstEnums || Xl.isolatedModules.computeValue(e)) + }, + incremental: { + dependencies: ["composite"], + computeValue: (e) => !!(e.incremental || e.composite) + }, + declarationMap: { + dependencies: ["declaration", "composite"], + computeValue: (e) => !!(e.declarationMap && Xl.declaration.computeValue(e)) + }, + allowJs: { + dependencies: ["checkJs"], + computeValue: (e) => e.allowJs === void 0 ? !!e.checkJs : e.allowJs + }, + useDefineForClassFields: { + dependencies: ["target", "module"], + computeValue: (e) => e.useDefineForClassFields === void 0 ? Xl.target.computeValue(e) >= 9 : e.useDefineForClassFields + }, + noImplicitAny: { + dependencies: ["strict"], + computeValue: (e) => lu(e, "noImplicitAny") + }, + noImplicitThis: { + dependencies: ["strict"], + computeValue: (e) => lu(e, "noImplicitThis") + }, + strictNullChecks: { + dependencies: ["strict"], + computeValue: (e) => lu(e, "strictNullChecks") + }, + strictFunctionTypes: { + dependencies: ["strict"], + computeValue: (e) => lu(e, "strictFunctionTypes") + }, + strictBindCallApply: { + dependencies: ["strict"], + computeValue: (e) => lu(e, "strictBindCallApply") + }, + strictPropertyInitialization: { + dependencies: ["strict"], + computeValue: (e) => lu(e, "strictPropertyInitialization") + }, + strictBuiltinIteratorReturn: { + dependencies: ["strict"], + computeValue: (e) => lu(e, "strictBuiltinIteratorReturn") + }, + alwaysStrict: { + dependencies: ["strict"], + computeValue: (e) => lu(e, "alwaysStrict") + }, + useUnknownInCatchVariables: { + dependencies: ["strict"], + computeValue: (e) => lu(e, "useUnknownInCatchVariables") + } + }, K4 = Xl, lee = Xl.allowImportingTsExtensions.computeValue, pa = Xl.target.computeValue, Ru = Xl.module.computeValue, Su = Xl.moduleResolution.computeValue, uee = Xl.moduleDetection.computeValue, Mp = Xl.isolatedModules.computeValue, Hg = Xl.esModuleInterop.computeValue, wx = Xl.allowSyntheticDefaultImports.computeValue, H3 = Xl.resolvePackageJsonExports.computeValue, G3 = Xl.resolvePackageJsonImports.computeValue, Ub = Xl.resolveJsonModule.computeValue, N_ = Xl.declaration.computeValue, Yy = Xl.preserveConstEnums.computeValue, Vb = Xl.incremental.computeValue, P5 = Xl.declarationMap.computeValue, Zy = Xl.allowJs.computeValue, $3 = Xl.useDefineForClassFields.computeValue; + function X3(e) { + return e >= 5 && e <= 99; + } + function N5(e) { + switch (Ru(e)) { + case 0: + case 4: + case 3: + return !1; + } + return !0; + } + function _ee(e) { + return e.allowUnreachableCode === !1; + } + function fee(e) { + return e.allowUnusedLabels === !1; + } + function HC(e) { + return e >= 3 && e <= 99 || e === 100; + } + function lu(e, t) { + return e[t] === void 0 ? !!e.strict : !!e[t]; + } + function A5(e) { + return al(Pz.type, (t, n) => t === e ? n : void 0); + } + function pJ(e) { + return e.useDefineForClassFields !== !1 && pa(e) >= 9; + } + function pee(e, t) { + return xC(t, e, ure); + } + function dee(e, t) { + return xC(t, e, _re); + } + function mee(e, t) { + return xC(t, e, fre); + } + function I5(e, t) { + return t.strictFlag ? lu(e, t.name) : t.allowJsFlag ? Zy(e) : e[t.name]; + } + function F5(e) { + const t = e.jsx; + return t === 2 || t === 4 || t === 5; + } + function Q3(e, t) { + const n = t?.pragmas.get("jsximportsource"), i = os(n) ? n[n.length - 1] : n, s = t?.pragmas.get("jsxruntime"), o = os(s) ? s[s.length - 1] : s; + if (o?.arguments.factory !== "classic") + return e.jsx === 4 || e.jsx === 5 || e.jsxImportSource || i || o?.arguments.factory === "automatic" ? i?.arguments.factory || e.jsxImportSource || "react" : void 0; + } + function O5(e, t) { + return e ? `${e}/${t.jsx === 5 ? "jsx-dev-runtime" : "jsx-runtime"}` : void 0; + } + function dJ(e) { + let t = !1; + for (let n = 0; n < e.length; n++) + if (e.charCodeAt(n) === 42) + if (!t) + t = !0; + else + return !1; + return !0; + } + function mJ(e, t) { + let n, i, s, o = !1; + return { + getSymlinkedFiles: () => s, + getSymlinkedDirectories: () => n, + getSymlinkedDirectoriesByRealpath: () => i, + setSymlinkedFile: (u, m) => (s || (s = /* @__PURE__ */ new Map())).set(u, m), + setSymlinkedDirectory: (u, m) => { + let g = oo(u, e, t); + cD(g) || (g = il(g), m !== !1 && !n?.has(g) && (i || (i = wp())).add(m.realPath, u), (n || (n = /* @__PURE__ */ new Map())).set(g, m)); + }, + setSymlinksFromResolutions(u, m, g) { + E.assert(!o), o = !0, u((h) => _(this, h.resolvedModule)), m((h) => _(this, h.resolvedTypeReferenceDirective)), g.forEach((h) => _(this, h.resolvedTypeReferenceDirective)); + }, + hasProcessedResolutions: () => o, + setSymlinksFromResolution(u) { + _(this, u); + }, + hasAnySymlinks: c + }; + function c() { + return !!s?.size || !!n && !!al(n, (u) => !!u); + } + function _(u, m) { + if (!m || !m.originalPath || !m.resolvedFileName) return; + const { resolvedFileName: g, originalPath: h } = m; + u.setSymlinkedFile(oo(h, e, t), g); + const [S, T] = jOe(g, h, e, t) || He; + S && T && u.setSymlinkedDirectory( + T, + { + real: il(S), + realPath: il(oo(S, e, t)) + } + ); + } + } + function jOe(e, t, n, i) { + const s = Ul(Xi(e, n)), o = Ul(Xi(t, n)); + let c = !1; + for (; s.length >= 2 && o.length >= 2 && !whe(s[s.length - 2], i) && !whe(o[o.length - 2], i) && i(s[s.length - 1]) === i(o[o.length - 1]); ) + s.pop(), o.pop(), c = !0; + return c ? [T0(s), T0(o)] : void 0; + } + function whe(e, t) { + return e !== void 0 && (t(e) === "node_modules" || Vi(e, "@")); + } + function BOe(e) { + return aj(e.charCodeAt(0)) ? e.slice(1) : void 0; + } + function gJ(e, t, n) { + const i = OR(e, t, n); + return i === void 0 ? void 0 : BOe(i); + } + var gee = /[^\w\s/]/g; + function Phe(e) { + return e.replace(gee, JOe); + } + function JOe(e) { + return "\\" + e; + } + var zOe = [ + 42, + 63 + /* question */ + ], WOe = ["node_modules", "bower_components", "jspm_packages"], hee = `(?!(${WOe.join("|")})(/|$))`, Nhe = { + /** + * Matches any single directory segment unless it is the last segment and a .min.js file + * Breakdown: + * [^./] # matches everything up to the first . character (excluding directory separators) + * (\\.(?!min\\.js$))? # matches . characters but not if they are part of the .min.js file extension + */ + singleAsteriskRegexFragment: "([^./]|(\\.(?!min\\.js$))?)*", + /** + * Regex for the ** wildcard. Matches any number of subdirectories. When used for including + * files or directories, does not match subdirectories that start with a . character + */ + doubleAsteriskRegexFragment: `(/${hee}[^/.][^/]*)*?`, + replaceWildcardCharacter: (e) => vee(e, Nhe.singleAsteriskRegexFragment) + }, Ahe = { + singleAsteriskRegexFragment: "[^/]*", + /** + * Regex for the ** wildcard. Matches any number of subdirectories. When used for including + * files or directories, does not match subdirectories that start with a . character + */ + doubleAsteriskRegexFragment: `(/${hee}[^/.][^/]*)*?`, + replaceWildcardCharacter: (e) => vee(e, Ahe.singleAsteriskRegexFragment) + }, Ihe = { + singleAsteriskRegexFragment: "[^/]*", + doubleAsteriskRegexFragment: "(/.+?)?", + replaceWildcardCharacter: (e) => vee(e, Ihe.singleAsteriskRegexFragment) + }, yee = { + files: Nhe, + directories: Ahe, + exclude: Ihe + }; + function eD(e, t, n) { + const i = L5(e, t, n); + return !i || !i.length ? void 0 : `^(${i.map((c) => `(${c})`).join("|")})${n === "exclude" ? "($|/)" : "$"}`; + } + function L5(e, t, n) { + if (!(e === void 0 || e.length === 0)) + return na(e, (i) => i && M5(i, t, n, yee[n])); + } + function hJ(e) { + return !/[.*?]/.test(e); + } + function yJ(e, t, n) { + const i = e && M5(e, t, n, yee[n]); + return i && `^(${i})${n === "exclude" ? "($|/)" : "$"}`; + } + function M5(e, t, n, { singleAsteriskRegexFragment: i, doubleAsteriskRegexFragment: s, replaceWildcardCharacter: o } = yee[n]) { + let c = "", _ = !1; + const u = SP(e, t), m = _a(u); + if (n !== "exclude" && m === "**") + return; + u[0] = X1(u[0]), hJ(m) && u.push("**", "*"); + let g = 0; + for (let h of u) { + if (h === "**") + c += s; + else if (n === "directories" && (c += "(", g++), _ && (c += jo), n !== "exclude") { + let S = ""; + h.charCodeAt(0) === 42 ? (S += "([^./]" + i + ")?", h = h.substr(1)) : h.charCodeAt(0) === 63 && (S += "[^./]", h = h.substr(1)), S += h.replace(gee, o), S !== h && (c += hee), c += S; + } else + c += h.replace(gee, o); + _ = !0; + } + for (; g > 0; ) + c += ")?", g--; + return c; + } + function vee(e, t) { + return e === "*" ? t : e === "?" ? "[^/]" : "\\" + e; + } + function R5(e, t, n, i, s) { + e = Hs(e), s = Hs(s); + const o = Ln(s, e); + return { + includeFilePatterns: gr(L5(n, o, "files"), (c) => `^${c}$`), + includeFilePattern: eD(n, o, "files"), + includeDirectoryPattern: eD(n, o, "directories"), + excludePattern: eD(t, o, "exclude"), + basePaths: UOe(e, n, i) + }; + } + function A0(e, t) { + return new RegExp(e, t ? "" : "i"); + } + function vJ(e, t, n, i, s, o, c, _, u) { + e = Hs(e), o = Hs(o); + const m = R5(e, n, i, s, o), g = m.includeFilePatterns && m.includeFilePatterns.map((A) => A0(A, s)), h = m.includeDirectoryPattern && A0(m.includeDirectoryPattern, s), S = m.excludePattern && A0(m.excludePattern, s), T = g ? g.map(() => []) : [[]], C = /* @__PURE__ */ new Map(), D = Wl(s); + for (const A of m.basePaths) + w(A, Ln(o, A), c); + return Dp(T); + function w(A, O, F) { + const R = D(u(O)); + if (C.has(R)) return; + C.set(R, !0); + const { files: W, directories: V } = _(A); + for (const $ of W_(W, cu)) { + const U = Ln(A, $), _e = Ln(O, $); + if (!(t && !vc(U, t)) && !(S && S.test(_e))) + if (!g) + T[0].push(U); + else { + const Z = ec(g, (J) => J.test(_e)); + Z !== -1 && T[Z].push(U); + } + } + if (!(F !== void 0 && (F--, F === 0))) + for (const $ of W_(V, cu)) { + const U = Ln(A, $), _e = Ln(O, $); + (!h || h.test(_e)) && (!S || !S.test(_e)) && w(U, _e, F); + } + } + } + function UOe(e, t, n) { + const i = [e]; + if (t) { + const s = []; + for (const o of t) { + const c = q_(o) ? o : Hs(Ln(e, o)); + s.push(VOe(c)); + } + s.sort(cC(!n)); + for (const o of s) + Ri(i, (c) => !Zf(c, o, e, !n)) && i.push(o); + } + return i; + } + function VOe(e) { + const t = RX(e, zOe); + return t < 0 ? _C(e) ? X1(Hn(e)) : e : e.substring(0, e.lastIndexOf(jo, t)); + } + function j5(e, t) { + return t || B5(e) || 3; + } + function B5(e) { + switch (e.substr(e.lastIndexOf(".")).toLowerCase()) { + case ".js": + case ".cjs": + case ".mjs": + return 1; + case ".jsx": + return 2; + case ".ts": + case ".cts": + case ".mts": + return 3; + case ".tsx": + return 4; + case ".json": + return 6; + default: + return 0; + } + } + var J5 = [[ + ".ts", + ".tsx", + ".d.ts" + /* Dts */ + ], [ + ".cts", + ".d.cts" + /* Dcts */ + ], [ + ".mts", + ".d.mts" + /* Dmts */ + ]], bJ = Dp(J5), qOe = [...J5, [ + ".json" + /* Json */ + ]], HOe = [ + ".d.ts", + ".d.cts", + ".d.mts", + ".cts", + ".mts", + ".ts", + ".tsx" + /* Tsx */ + ], GOe = [[ + ".js", + ".jsx" + /* Jsx */ + ], [ + ".mjs" + /* Mjs */ + ], [ + ".cjs" + /* Cjs */ + ]], GC = Dp(GOe), SJ = [[ + ".ts", + ".tsx", + ".d.ts", + ".js", + ".jsx" + /* Jsx */ + ], [ + ".cts", + ".d.cts", + ".cjs" + /* Cjs */ + ], [ + ".mts", + ".d.mts", + ".mjs" + /* Mjs */ + ]], $Oe = [...SJ, [ + ".json" + /* Json */ + ]], z5 = [ + ".d.ts", + ".d.cts", + ".d.mts" + /* Dmts */ + ], Y3 = [ + ".ts", + ".cts", + ".mts", + ".tsx" + /* Tsx */ + ], W5 = [ + ".mts", + ".d.mts", + ".mjs", + ".cts", + ".d.cts", + ".cjs" + /* Cjs */ + ]; + function tD(e, t) { + const n = e && Zy(e); + if (!t || t.length === 0) + return n ? SJ : J5; + const i = n ? SJ : J5, s = Dp(i); + return [ + ...i, + ...Li(t, (c) => c.scriptKind === 7 || n && XOe(c.scriptKind) && !s.includes(c.extension) ? [c.extension] : void 0) + ]; + } + function Z3(e, t) { + return !e || !Ub(e) ? t : t === SJ ? $Oe : t === J5 ? qOe : [...t, [ + ".json" + /* Json */ + ]]; + } + function XOe(e) { + return e === 1 || e === 2; + } + function Gg(e) { + return at(GC, (t) => Bo(e, t)); + } + function ES(e) { + return at(bJ, (t) => Bo(e, t)); + } + function bee(e) { + return at(Y3, (t) => Bo(e, t)) && !fl(e); + } + var See = /* @__PURE__ */ ((e) => (e[e.Minimal = 0] = "Minimal", e[e.Index = 1] = "Index", e[e.JsExtension = 2] = "JsExtension", e[e.TsExtension = 3] = "TsExtension", e))(See || {}); + function QOe({ imports: e }, t = U_(Gg, ES)) { + return Dc(e, ({ text: n }) => lf(n) && !vc(n, W5) ? t(n) : void 0) || !1; + } + function Tee(e, t, n, i) { + const s = Su(n), o = 3 <= s && s <= 99; + if (e === "js" || t === 99 && o) + return b6(n) && c() !== 2 ? 3 : 2; + if (e === "minimal") + return 0; + if (e === "index") + return 1; + if (!b6(n)) + return i && QOe(i) ? 2 : 0; + return c(); + function c() { + let _ = !1; + const u = i?.imports.length ? i.imports : i && Gu(i) ? YOe(i).map((m) => m.arguments[0]) : He; + for (const m of u) + if (lf(m.text)) { + if (o && t === 1 && ZW(i, m, n) === 99 || vc(m.text, W5)) + continue; + if (ES(m.text)) + return 3; + Gg(m.text) && (_ = !0); + } + return _ ? 2 : 0; + } + } + function YOe(e) { + let t = 0, n; + for (const i of e.statements) { + if (t > 3) + break; + f3(i) ? n = Wi(n, i.declarationList.declarations.map((s) => s.initializer)) : El(i) && __( + i.expression, + /*requireStringLiteralLikeArgument*/ + !0 + ) ? n = Pr(n, i.expression) : t++; + } + return n || He; + } + function TJ(e, t, n) { + if (!e) return !1; + const i = tD(t, n); + for (const s of Dp(Z3(t, i))) + if (Bo(e, s)) + return !0; + return !1; + } + function Fhe(e) { + const t = e.match(/\//g); + return t ? t.length : 0; + } + function K3(e, t) { + return uo( + Fhe(e), + Fhe(t) + ); + } + var xee = [ + ".d.ts", + ".d.mts", + ".d.cts", + ".mjs", + ".mts", + ".cjs", + ".cts", + ".ts", + ".js", + ".tsx", + ".jsx", + ".json" + /* Json */ + ]; + function $u(e) { + for (const t of xee) { + const n = kee(e, t); + if (n !== void 0) + return n; + } + return e; + } + function kee(e, t) { + return Bo(e, t) ? eN(e, t) : void 0; + } + function eN(e, t) { + return e.substring(0, e.length - t.length); + } + function Oh(e, t) { + return TP( + e, + t, + xee, + /*ignoreCase*/ + !1 + ); + } + function Px(e) { + const t = e.indexOf("*"); + return t === -1 ? e : e.indexOf("*", t + 1) !== -1 ? void 0 : { + prefix: e.substr(0, t), + suffix: e.substr(t + 1) + }; + } + var Ohe = /* @__PURE__ */ new WeakMap(); + function tN(e) { + let t = Ohe.get(e); + if (t !== void 0) + return t; + let n, i; + const s = Zd(e); + for (const o of s) { + const c = Px(o); + c !== void 0 && (typeof c == "string" ? (n ?? (n = /* @__PURE__ */ new Set())).add(c) : (i ?? (i = [])).push(c)); + } + return Ohe.set( + e, + t = { + matchableStringSet: n, + patterns: i + } + ), t; + } + function kd(e) { + return !(e >= 0); + } + function U5(e) { + return e === ".ts" || e === ".tsx" || e === ".d.ts" || e === ".cts" || e === ".mts" || e === ".d.mts" || e === ".d.cts" || Vi(e, ".d.") && Eo(e, ".ts"); + } + function rD(e) { + return U5(e) || e === ".json"; + } + function nD(e) { + const t = $g(e); + return t !== void 0 ? t : E.fail(`File ${e} has unknown extension.`); + } + function Lhe(e) { + return $g(e) !== void 0; + } + function $g(e) { + return Pn(xee, (t) => Bo(e, t)); + } + function iD(e, t) { + return e.checkJsDirective ? e.checkJsDirective.enabled : t.checkJs; + } + var xJ = { + files: He, + directories: He + }; + function kJ(e, t) { + const { matchableStringSet: n, patterns: i } = e; + if (n?.has(t)) + return t; + if (!(i === void 0 || i.length === 0)) + return FR(i, (s) => s, t); + } + function CJ(e, t) { + const n = e.indexOf(t); + return E.assert(n !== -1), e.slice(n); + } + function Bs(e, ...t) { + return t.length && (e.relatedInformation || (e.relatedInformation = []), E.assert(e.relatedInformation !== He, "Diagnostic had empty array singleton for related info, but is still being constructed!"), e.relatedInformation.push(...t)), e; + } + function Cee(e, t) { + E.assert(e.length !== 0); + let n = t(e[0]), i = n; + for (let s = 1; s < e.length; s++) { + const o = t(e[s]); + o < n ? n = o : o > i && (i = o); + } + return { min: n, max: i }; + } + function EJ(e) { + return { pos: Vy(e), end: e.end }; + } + function DJ(e, t) { + const n = t.pos - 1, i = Math.min(e.text.length, aa(e.text, t.end) + 1); + return { pos: n, end: i }; + } + function $C(e, t, n) { + return Mhe( + e, + t, + n, + /*ignoreNoCheck*/ + !1 + ); + } + function Eee(e, t, n) { + return Mhe( + e, + t, + n, + /*ignoreNoCheck*/ + !0 + ); + } + function Mhe(e, t, n, i) { + return t.skipLibCheck && e.isDeclarationFile || t.skipDefaultLibCheck && e.hasNoDefaultLib || !i && t.noCheck || n.isSourceOfProjectReferenceRedirect(e.fileName) || !sD(e, t); + } + function sD(e, t) { + if (e.checkJsDirective && e.checkJsDirective.enabled === !1) return !1; + if (e.scriptKind === 3 || e.scriptKind === 4 || e.scriptKind === 5) return !0; + const i = (e.scriptKind === 1 || e.scriptKind === 2) && iD(e, t); + return k4(e, t.checkJs) || i || e.scriptKind === 7; + } + function V5(e, t) { + return e === t || typeof e == "object" && e !== null && typeof t == "object" && t !== null && VX(e, t, V5); + } + function aD(e) { + let t; + switch (e.charCodeAt(1)) { + // "x" in "0x123" + case 98: + case 66: + t = 1; + break; + case 111: + case 79: + t = 3; + break; + case 120: + case 88: + t = 4; + break; + default: + const m = e.length - 1; + let g = 0; + for (; e.charCodeAt(g) === 48; ) + g++; + return e.slice(g, m) || "0"; + } + const n = 2, i = e.length - 1, s = (i - n) * t, o = new Uint16Array((s >>> 4) + (s & 15 ? 1 : 0)); + for (let m = i - 1, g = 0; m >= n; m--, g += t) { + const h = g >>> 4, S = e.charCodeAt(m), C = (S <= 57 ? S - 48 : 10 + S - (S <= 70 ? 65 : 97)) << (g & 15); + o[h] |= C; + const D = C >>> 16; + D && (o[h + 1] |= D); + } + let c = "", _ = o.length - 1, u = !0; + for (; u; ) { + let m = 0; + u = !1; + for (let g = _; g >= 0; g--) { + const h = m << 16 | o[g], S = h / 10 | 0; + o[g] = S, m = h - S * 10, S && !u && (_ = g, u = !0); + } + c = m + c; + } + return c; + } + function qb({ negative: e, base10Value: t }) { + return (e && t !== "0" ? "-" : "") + t; + } + function Dee(e) { + if (q5( + e, + /*roundTripOnly*/ + !1 + )) + return wJ(e); + } + function wJ(e) { + const t = e.startsWith("-"), n = aD(`${t ? e.slice(1) : e}n`); + return { negative: t, base10Value: n }; + } + function q5(e, t) { + if (e === "") return !1; + const n = Og( + 99, + /*skipTrivia*/ + !1 + ); + let i = !0; + n.setOnError(() => i = !1), n.setText(e + "n"); + let s = n.scan(); + const o = s === 41; + o && (s = n.scan()); + const c = n.getTokenFlags(); + return i && s === 10 && n.getTokenEnd() === e.length + 1 && !(c & 512) && (!t || e === qb({ negative: o, base10Value: aD(n.getTokenValue()) })); + } + function cv(e) { + return !!(e.flags & 33554432) || q7(e) || e9e(e) || KOe(e) || !(Td(e) || ZOe(e)); + } + function ZOe(e) { + return Me(e) && _u(e.parent) && e.parent.name === e; + } + function KOe(e) { + for (; e.kind === 80 || e.kind === 211; ) + e = e.parent; + if (e.kind !== 167) + return !1; + if ($n( + e.parent, + 64 + /* Abstract */ + )) + return !0; + const t = e.parent.parent.kind; + return t === 264 || t === 187; + } + function e9e(e) { + if (e.kind !== 80) return !1; + const t = ur(e.parent, (n) => { + switch (n.kind) { + case 298: + return !0; + case 211: + case 233: + return !1; + default: + return "quit"; + } + }); + return t?.token === 119 || t?.parent.kind === 264; + } + function wee(e) { + return Y_(e) && Me(e.typeName); + } + function Pee(e, t = wy) { + if (e.length < 2) return !0; + const n = e[0]; + for (let i = 1, s = e.length; i < s; i++) { + const o = e[i]; + if (!t(n, o)) return !1; + } + return !0; + } + function oD(e, t) { + return e.pos = t, e; + } + function XC(e, t) { + return e.end = t, e; + } + function Cd(e, t, n) { + return XC(oD(e, t), n); + } + function PJ(e, t, n) { + return Cd(e, t, t + n); + } + function Nee(e, t) { + return e && (e.flags = t), e; + } + function Fa(e, t) { + return e && t && (e.parent = t), e; + } + function lv(e, t) { + if (!e) return e; + return Yx(e, SC(e) ? n : s), e; + function n(o, c) { + if (t && o.parent === c) + return "skip"; + Fa(o, c); + } + function i(o) { + if (uf(o)) + for (const c of o.jsDoc) + n(c, o), Yx(c, n); + } + function s(o, c) { + return n(o, c) || i(o); + } + } + function t9e(e) { + return !ul(e); + } + function NJ(e) { + return Ql(e) && Ri(e.elements, t9e); + } + function Aee(e) { + for (E.assertIsDefined(e.parent); ; ) { + const t = e.parent; + if (Yu(t)) { + e = t; + continue; + } + if (El(t) || Vx(t) || mv(t) && (t.initializer === e || t.incrementor === e)) + return !0; + if (TD(t)) { + if (e !== _a(t.elements)) return !0; + e = t; + continue; + } + if (fn(t) && t.operatorToken.kind === 28) { + if (e === t.left) return !0; + e = t; + continue; + } + return !1; + } + } + function cD(e) { + return at(qI, (t) => e.includes(t)); + } + function Iee(e) { + if (!e.parent) return; + switch (e.kind) { + case 168: + const { parent: n } = e; + return n.kind === 195 ? void 0 : n.typeParameters; + case 169: + return e.parent.parameters; + case 204: + return e.parent.templateSpans; + case 239: + return e.parent.templateSpans; + case 170: { + const { parent: i } = e; + return n2(i) ? i.modifiers : void 0; + } + case 298: + return e.parent.heritageClauses; + } + const { parent: t } = e; + if (TC(e)) + return RS(e.parent) ? void 0 : e.parent.tags; + switch (t.kind) { + case 187: + case 264: + return kb(e) ? t.members : void 0; + case 192: + case 193: + return t.types; + case 189: + case 209: + case 356: + case 275: + case 279: + return t.elements; + case 210: + case 292: + return t.properties; + case 213: + case 214: + return fi(e) ? t.typeArguments : t.expression === e ? void 0 : t.arguments; + case 284: + case 288: + return HP(e) ? t.children : void 0; + case 286: + case 285: + return fi(e) ? t.typeArguments : void 0; + case 241: + case 296: + case 297: + case 268: + return t.statements; + case 269: + return t.clauses; + case 263: + case 231: + return sl(e) ? t.members : void 0; + case 266: + return j0(e) ? t.members : void 0; + case 307: + return t.statements; + } + } + function H5(e) { + if (!e.typeParameters) { + if (at(e.parameters, (t) => !qc(t))) + return !0; + if (e.kind !== 219) { + const t = Uc(e.parameters); + if (!(t && Bb(t))) + return !0; + } + } + return !1; + } + function lD(e) { + return e === "Infinity" || e === "-Infinity" || e === "NaN"; + } + function Fee(e) { + return e.kind === 260 && e.parent.kind === 299; + } + function Ky(e) { + return e.kind === 218 || e.kind === 219; + } + function Hb(e) { + return e.replace(/\$/g, () => "\\$"); + } + function Xg(e) { + return (+e).toString() === e; + } + function G5(e, t, n, i, s) { + const o = s && e === "new"; + return !o && E_(e, t) ? N.createIdentifier(e) : !i && !o && Xg(e) && +e >= 0 ? N.createNumericLiteral(+e) : N.createStringLiteral(e, !!n); + } + function uD(e) { + return !!(e.flags & 262144 && e.isThisType); + } + function $5(e) { + let t = 0, n = 0, i = 0, s = 0, o; + ((m) => { + m[m.BeforeNodeModules = 0] = "BeforeNodeModules", m[m.NodeModules = 1] = "NodeModules", m[m.Scope = 2] = "Scope", m[m.PackageContent = 3] = "PackageContent"; + })(o || (o = {})); + let c = 0, _ = 0, u = 0; + for (; _ >= 0; ) + switch (c = _, _ = e.indexOf("/", c + 1), u) { + case 0: + e.indexOf(Kg, c) === c && (t = c, n = _, u = 1); + break; + case 1: + case 2: + u === 1 && e.charAt(c + 1) === "@" ? u = 2 : (i = _, u = 3); + break; + case 3: + e.indexOf(Kg, c) === c ? u = 1 : u = 3; + break; + } + return s = c, u > 1 ? { topLevelNodeModulesIndex: t, topLevelPackageNameIndex: n, packageRootIndex: i, fileNameIndex: s } : void 0; + } + function Nx(e) { + switch (e.kind) { + case 168: + case 263: + case 264: + case 265: + case 266: + case 346: + case 338: + case 340: + return !0; + case 273: + return e.isTypeOnly; + case 276: + case 281: + return e.parent.parent.isTypeOnly; + default: + return !1; + } + } + function rN(e) { + return Zb(e) || pc(e) || Tc(e) || $c(e) || Yl(e) || Nx(e) || Lc(e) && !Pb(e) && !eg(e); + } + function nN(e) { + if (!h4(e)) + return !1; + const { isBracketed: t, typeExpression: n } = e; + return t || !!n && n.type.kind === 316; + } + function AJ(e, t) { + if (e.length === 0) + return !1; + const n = e.charCodeAt(0); + return n === 35 ? e.length > 1 && Qm(e.charCodeAt(1), t) : Qm(n, t); + } + function Oee(e) { + var t; + return ((t = WJ(e)) == null ? void 0 : t.kind) === 0; + } + function X5(e) { + return an(e) && // node.type should only be a JSDocOptionalType when node is a parameter of a JSDocFunctionType + (e.type && e.type.kind === 316 || gC(e).some(nN)); + } + function Ax(e) { + switch (e.kind) { + case 172: + case 171: + return !!e.questionToken; + case 169: + return !!e.questionToken || X5(e); + case 348: + case 341: + return nN(e); + default: + return !1; + } + } + function Lee(e) { + const t = e.kind; + return (t === 211 || t === 212) && Hx(e.expression); + } + function IJ(e) { + return an(e) && Yu(e) && uf(e) && !!Cj(e); + } + function FJ(e) { + return E.checkDefined(Q5(e)); + } + function Q5(e) { + const t = Cj(e); + return t && t.typeExpression && t.typeExpression.type; + } + function _D(e) { + return Me(e) ? e.escapedText : Ix(e); + } + function iN(e) { + return Me(e) ? An(e) : fD(e); + } + function Mee(e) { + const t = e.kind; + return t === 80 || t === 295; + } + function Ix(e) { + return `${e.namespace.escapedText}:${An(e.name)}`; + } + function fD(e) { + return `${An(e.namespace)}:${An(e.name)}`; + } + function OJ(e) { + return Me(e) ? An(e) : fD(e); + } + function ap(e) { + return !!(e.flags & 8576); + } + function op(e) { + return e.flags & 8192 ? e.escapedName : e.flags & 384 ? Zo("" + e.value) : E.fail(); + } + function Fx(e) { + return !!e && (Tn(e) || fo(e) || fn(e)); + } + function Ree(e) { + return e === void 0 ? !1 : !!k6(e.attributes); + } + var r9e = String.prototype.replace; + function DS(e, t) { + return r9e.call(e, "*", t); + } + function Y5(e) { + return Me(e.name) ? e.name.escapedText : Zo(e.name.text); + } + function jee(e) { + switch (e.kind) { + case 168: + case 169: + case 172: + case 171: + case 185: + case 184: + case 179: + case 180: + case 181: + case 174: + case 173: + case 175: + case 176: + case 177: + case 178: + case 183: + case 182: + case 186: + case 187: + case 188: + case 189: + case 192: + case 193: + case 196: + case 190: + case 191: + case 197: + case 198: + case 194: + case 195: + case 203: + case 205: + case 202: + case 328: + case 329: + case 346: + case 338: + case 340: + case 345: + case 344: + case 324: + case 325: + case 326: + case 341: + case 348: + case 317: + case 315: + case 314: + case 312: + case 313: + case 322: + case 318: + case 309: + case 333: + case 335: + case 334: + case 350: + case 343: + case 199: + case 200: + case 262: + case 241: + case 268: + case 243: + case 244: + case 245: + case 246: + case 247: + case 248: + case 249: + case 250: + case 251: + case 252: + case 253: + case 254: + case 255: + case 256: + case 257: + case 258: + case 260: + case 208: + case 263: + case 264: + case 265: + case 266: + case 267: + case 272: + case 271: + case 278: + case 277: + case 242: + case 259: + case 282: + return !0; + } + return !1; + } + function cl(e, t = !1, n = !1, i = !1) { + return { value: e, isSyntacticallyString: t, resolvedOtherFiles: n, hasExternalReferences: i }; + } + function Bee({ evaluateElementAccessExpression: e, evaluateEntityNameExpression: t }) { + function n(s, o) { + let c = !1, _ = !1, u = !1; + switch (s = za(s), s.kind) { + case 224: + const m = n(s.operand, o); + if (_ = m.resolvedOtherFiles, u = m.hasExternalReferences, typeof m.value == "number") + switch (s.operator) { + case 40: + return cl(m.value, c, _, u); + case 41: + return cl(-m.value, c, _, u); + case 55: + return cl(~m.value, c, _, u); + } + break; + case 226: { + const g = n(s.left, o), h = n(s.right, o); + if (c = (g.isSyntacticallyString || h.isSyntacticallyString) && s.operatorToken.kind === 40, _ = g.resolvedOtherFiles || h.resolvedOtherFiles, u = g.hasExternalReferences || h.hasExternalReferences, typeof g.value == "number" && typeof h.value == "number") + switch (s.operatorToken.kind) { + case 52: + return cl(g.value | h.value, c, _, u); + case 51: + return cl(g.value & h.value, c, _, u); + case 49: + return cl(g.value >> h.value, c, _, u); + case 50: + return cl(g.value >>> h.value, c, _, u); + case 48: + return cl(g.value << h.value, c, _, u); + case 53: + return cl(g.value ^ h.value, c, _, u); + case 42: + return cl(g.value * h.value, c, _, u); + case 44: + return cl(g.value / h.value, c, _, u); + case 40: + return cl(g.value + h.value, c, _, u); + case 41: + return cl(g.value - h.value, c, _, u); + case 45: + return cl(g.value % h.value, c, _, u); + case 43: + return cl(g.value ** h.value, c, _, u); + } + else if ((typeof g.value == "string" || typeof g.value == "number") && (typeof h.value == "string" || typeof h.value == "number") && s.operatorToken.kind === 40) + return cl( + "" + g.value + h.value, + c, + _, + u + ); + break; + } + case 11: + case 15: + return cl( + s.text, + /*isSyntacticallyString*/ + !0 + ); + case 228: + return i(s, o); + case 9: + return cl(+s.text); + case 80: + return t(s, o); + case 211: + if (_o(s)) + return t(s, o); + break; + case 212: + return e(s, o); + } + return cl( + /*value*/ + void 0, + c, + _, + u + ); + } + function i(s, o) { + let c = s.head.text, _ = !1, u = !1; + for (const m of s.templateSpans) { + const g = n(m.expression, o); + if (g.value === void 0) + return cl( + /*value*/ + void 0, + /*isSyntacticallyString*/ + !0 + ); + c += g.value, c += m.literal.text, _ || (_ = g.resolvedOtherFiles), u || (u = g.hasExternalReferences); + } + return cl( + c, + /*isSyntacticallyString*/ + !0, + _, + u + ); + } + return n; + } + function LJ(e) { + return Eb(e) && Kp(e.type) || DD(e) && Kp(e.typeExpression); + } + function sN(e) { + const t = e.members; + for (const n of t) + if (n.kind === 176 && Ap(n.body)) + return n; + } + function MJ({ + compilerOptions: e, + requireSymbol: t, + argumentsSymbol: n, + error: i, + getSymbolOfDeclaration: s, + globals: o, + lookup: c, + setRequiresScopeChangeCache: _ = vb, + getRequiresScopeChangeCache: u = vb, + onPropertyWithInvalidInitializer: m = Th, + onFailedToResolveSymbol: g = vb, + onSuccessfullyResolvedSymbol: h = vb + }) { + var S = e.verbatimModuleSyntax ? "verbatimModuleSyntax" : "isolatedModules", T = pJ(e), C = Us(); + return D; + function D(R, W, V, $, U, _e) { + var Z, J, re; + const te = R; + let ie, le, Te, q, me, Ce = !1, Ee; + const oe = rs(W) ? W : W.escapedText; + e: + for (; R; ) { + if (oe === "const" && LJ(R)) + return; + if (VP(R) && le && R.name === le && (le = R, R = R.parent), Ym(R) && R.locals && !E0(R) && (ie = c(R.locals, oe, V))) { + let ke = !0; + if (vs(R) && le && le !== R.body ? (V & ie.flags & 788968 && le.kind !== 320 && (ke = ie.flags & 262144 ? !!(le.flags & 16) || // Synthetic fake scopes are added for signatures so type parameters are accessible from them + le === R.type || le.kind === 169 || le.kind === 341 || le.kind === 342 || le.kind === 168 : !1), V & ie.flags & 3 && (w(ie, R, le) ? ke = !1 : ie.flags & 1 && (ke = le.kind === 169 || !!(le.flags & 16) || // Synthetic fake scopes are added for signatures so parameters are accessible from them + le === R.type && !!ur(ie.valueDeclaration, Ii)))) : R.kind === 194 && (ke = le === R.trueType), ke) + break e; + ie = void 0; + } + switch (Ce = Ce || A(R, le), R.kind) { + case 307: + if (!$_(R)) break; + // falls through + case 267: + const ke = ((Z = s(R)) == null ? void 0 : Z.exports) || C; + if (R.kind === 307 || Lc(R) && R.flags & 33554432 && !eg(R)) { + if (ie = ke.get( + "default" + /* Default */ + )) { + const Oe = G4(ie); + if (Oe && ie.flags & V && Oe.escapedName === oe) + break e; + ie = void 0; + } + const it = ke.get(oe); + if (it && it.flags === 2097152 && (Lo( + it, + 281 + /* ExportSpecifier */ + ) || Lo( + it, + 280 + /* NamespaceExport */ + ))) + break; + } + if (oe !== "default" && (ie = c( + ke, + oe, + V & 2623475 + /* ModuleMember */ + ))) + if (Ei(R) && R.commonJsModuleIndicator && !((J = ie.declarations) != null && J.some(Fp))) + ie = void 0; + else + break e; + break; + case 266: + if (ie = c( + ((re = s(R)) == null ? void 0 : re.exports) || C, + oe, + V & 8 + /* EnumMember */ + )) { + $ && Mp(e) && !(R.flags & 33554432) && Cr(R) !== Cr(ie.valueDeclaration) && i( + te, + p.Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead, + Pi(oe), + S, + `${Pi(s(R).escapedName)}.${Pi(oe)}` + ); + break e; + } + break; + case 172: + if (!Vs(R)) { + const it = sN(R.parent); + it && it.locals && c( + it.locals, + oe, + V & 111551 + /* Value */ + ) && (E.assertNode(R, ss), q = R); + } + break; + case 263: + case 231: + case 264: + if (ie = c( + s(R).members || C, + oe, + V & 788968 + /* Type */ + )) { + if (!F(ie, R)) { + ie = void 0; + break; + } + if (le && Vs(le)) { + $ && i(te, p.Static_members_cannot_reference_class_type_parameters); + return; + } + break e; + } + if (Gc(R) && V & 32) { + const it = R.name; + if (it && oe === it.escapedText) { + ie = R.symbol; + break e; + } + } + break; + case 233: + if (le === R.expression && R.parent.token === 96) { + const it = R.parent.parent; + if (Zn(it) && (ie = c( + s(it).members, + oe, + V & 788968 + /* Type */ + ))) { + $ && i(te, p.Base_class_expressions_cannot_reference_class_type_parameters); + return; + } + } + break; + // It is not legal to reference a class's own type parameters from a computed property name that + // belongs to the class. For example: + // + // function foo() { return '' } + // class C { // <-- Class's own type parameter T + // [foo()]() { } // <-- Reference to T from class's own computed property + // } + // + case 167: + if (Ee = R.parent.parent, (Zn(Ee) || Ee.kind === 264) && (ie = c( + s(Ee).members, + oe, + V & 788968 + /* Type */ + ))) { + $ && i(te, p.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); + return; + } + break; + case 219: + if (pa(e) >= 2) + break; + // falls through + case 174: + case 176: + case 177: + case 178: + case 262: + if (V & 3 && oe === "arguments") { + ie = n; + break e; + } + break; + case 218: + if (V & 3 && oe === "arguments") { + ie = n; + break e; + } + if (V & 16) { + const it = R.name; + if (it && oe === it.escapedText) { + ie = R.symbol; + break e; + } + } + break; + case 170: + R.parent && R.parent.kind === 169 && (R = R.parent), R.parent && (sl(R.parent) || R.parent.kind === 263) && (R = R.parent); + break; + case 346: + case 338: + case 340: + case 351: + const ue = LC(R); + ue && (R = ue.parent); + break; + case 169: + le && (le === R.initializer || le === R.name && Ds(le)) && (me || (me = R)); + break; + case 208: + le && (le === R.initializer || le === R.name && Ds(le)) && av(R) && !me && (me = R); + break; + case 195: + if (V & 262144) { + const it = R.typeParameter.name; + if (it && oe === it.escapedText) { + ie = R.typeParameter.symbol; + break e; + } + } + break; + case 281: + le && le === R.propertyName && R.parent.parent.moduleSpecifier && (R = R.parent.parent.parent); + break; + } + O(R, le) && (Te = R), le = R, R = Bp(R) ? K7(R) || R.parent : (Af(R) || xF(R)) && nv(R) || R.parent; + } + if (U && ie && (!Te || ie !== Te.symbol) && (ie.isReferenced |= V), !ie) { + if (le && (E.assertNode(le, Ei), le.commonJsModuleIndicator && oe === "exports" && V & le.symbol.flags)) + return le.symbol; + _e || (ie = c(o, oe, V)); + } + if (!ie && te && an(te) && te.parent && __( + te.parent, + /*requireStringLiteralLikeArgument*/ + !1 + )) + return t; + if ($) { + if (q && m(te, oe, q, ie)) + return; + ie ? h(te, ie, V, le, me, Ce) : g(te, W, V, $); + } + return ie; + } + function w(R, W, V) { + const $ = pa(e), U = W; + if (Ii(V) && U.body && R.valueDeclaration && R.valueDeclaration.pos >= U.body.pos && R.valueDeclaration.end <= U.body.end && $ >= 2) { + let J = u(U); + return J === void 0 && (J = lr(U.parameters, _e) || !1, _(U, J)), !J; + } + return !1; + function _e(J) { + return Z(J.name) || !!J.initializer && Z(J.initializer); + } + function Z(J) { + switch (J.kind) { + case 219: + case 218: + case 262: + case 176: + return !1; + case 174: + case 177: + case 178: + case 303: + return Z(J.name); + case 172: + return Kc(J) ? !T : Z(J.name); + default: + return Dj(J) || vu(J) ? $ < 7 : ma(J) && J.dotDotDotToken && Nf(J.parent) ? $ < 4 : fi(J) ? !1 : ms(J, Z) || !1; + } + } + } + function A(R, W) { + return R.kind !== 219 && R.kind !== 218 ? $b(R) || (Ka(R) || R.kind === 172 && !Vs(R)) && (!W || W !== R.name) : W && W === R.name ? !1 : R.asteriskToken || $n( + R, + 1024 + /* Async */ + ) ? !0 : !Ab(R); + } + function O(R, W) { + switch (R.kind) { + case 169: + return !!W && W === R.name; + case 262: + case 263: + case 264: + case 266: + case 265: + case 267: + return !0; + default: + return !1; + } + } + function F(R, W) { + if (R.declarations) { + for (const V of R.declarations) + if (V.kind === 168 && (Bp(V.parent) ? Ob(V.parent) : V.parent) === W) + return !(Bp(V.parent) && Pn(V.parent.parent.tags, Fp)); + } + return !1; + } + } + function Z5(e, t = !0) { + switch (E.type(e), e.kind) { + case 112: + case 97: + case 9: + case 11: + case 15: + return !0; + case 10: + return t; + case 224: + return e.operator === 41 ? d_(e.operand) || t && gD(e.operand) : e.operator === 40 ? d_(e.operand) : !1; + default: + return !1; + } + } + function Jee(e) { + for (; e.kind === 217; ) + e = e.expression; + return e; + } + function K5(e) { + switch (E.type(e), e.kind) { + case 169: + case 171: + case 172: + case 208: + case 211: + case 212: + case 226: + case 260: + case 277: + case 303: + case 304: + case 341: + case 348: + return !0; + default: + return !1; + } + } + function RJ(e) { + const t = ur(e, zo); + return !!t && !t.importClause; + } + var zee = [ + "assert", + "assert/strict", + "async_hooks", + "buffer", + "child_process", + "cluster", + "console", + "constants", + "crypto", + "dgram", + "diagnostics_channel", + "dns", + "dns/promises", + "domain", + "events", + "fs", + "fs/promises", + "http", + "http2", + "https", + "inspector", + "inspector/promises", + "module", + "net", + "os", + "path", + "path/posix", + "path/win32", + "perf_hooks", + "process", + "punycode", + "querystring", + "readline", + "readline/promises", + "repl", + "stream", + "stream/consumers", + "stream/promises", + "stream/web", + "string_decoder", + "sys", + "test/mock_loader", + "timers", + "timers/promises", + "tls", + "trace_events", + "tty", + "url", + "util", + "util/types", + "v8", + "vm", + "wasi", + "worker_threads", + "zlib" + ], Wee = new Set(zee), eF = /* @__PURE__ */ new Set([ + "node:sea", + "node:sqlite", + "node:test", + "node:test/reporters" + ]), QC = /* @__PURE__ */ new Set([ + ...zee, + ...zee.map((e) => `node:${e}`), + ...eF + ]); + function tF(e, t, n, i) { + const s = an(e), o = /import|require/g; + for (; o.exec(e.text) !== null; ) { + const c = n9e( + e, + o.lastIndex, + /*includeJSDoc*/ + t + ); + if (s && __(c, n)) + i(c, c.arguments[0]); + else if (_f(c) && c.arguments.length >= 1 && (!n || Na(c.arguments[0]))) + i(c, c.arguments[0]); + else if (t && Dh(c)) + i(c, c.argument.literal); + else if (t && ym(c)) { + const _ = dx(c); + _ && ea(_) && _.text && i(c, _); + } + } + } + function n9e(e, t, n) { + const i = an(e); + let s = e; + const o = (c) => { + if (c.pos <= t && (t < c.end || t === c.end && c.kind === 1)) + return c; + }; + for (; ; ) { + const c = i && n && uf(s) && lr(s.jsDoc, o) || ms(s, o); + if (!c) + return s; + s = c; + } + } + function Uee(e) { + return vs(e) || B0(e) || FS(e); + } + function Vee() { + let e, t, n, i, s; + return { + createBaseSourceFileNode: o, + createBaseIdentifierNode: c, + createBasePrivateIdentifierNode: _, + createBaseTokenNode: u, + createBaseNode: m + }; + function o(g) { + return new (s || (s = $l.getSourceFileConstructor()))( + g, + /*pos*/ + -1, + /*end*/ + -1 + ); + } + function c(g) { + return new (n || (n = $l.getIdentifierConstructor()))( + g, + /*pos*/ + -1, + /*end*/ + -1 + ); + } + function _(g) { + return new (i || (i = $l.getPrivateIdentifierConstructor()))( + g, + /*pos*/ + -1, + /*end*/ + -1 + ); + } + function u(g) { + return new (t || (t = $l.getTokenConstructor()))( + g, + /*pos*/ + -1, + /*end*/ + -1 + ); + } + function m(g) { + return new (e || (e = $l.getNodeConstructor()))( + g, + /*pos*/ + -1, + /*end*/ + -1 + ); + } + } + function qee(e) { + let t, n; + return { + getParenthesizeLeftSideOfBinaryForOperator: i, + getParenthesizeRightSideOfBinaryForOperator: s, + parenthesizeLeftSideOfBinary: m, + parenthesizeRightSideOfBinary: g, + parenthesizeExpressionOfComputedPropertyName: h, + parenthesizeConditionOfConditionalExpression: S, + parenthesizeBranchOfConditionalExpression: T, + parenthesizeExpressionOfExportDefault: C, + parenthesizeExpressionOfNew: D, + parenthesizeLeftSideOfAccess: w, + parenthesizeOperandOfPostfixUnary: A, + parenthesizeOperandOfPrefixUnary: O, + parenthesizeExpressionsOfCommaDelimitedList: F, + parenthesizeExpressionForDisallowedComma: R, + parenthesizeExpressionOfExpressionStatement: W, + parenthesizeConciseBodyOfArrowFunction: V, + parenthesizeCheckTypeOfConditionalType: $, + parenthesizeExtendsTypeOfConditionalType: U, + parenthesizeConstituentTypesOfUnionType: Z, + parenthesizeConstituentTypeOfUnionType: _e, + parenthesizeConstituentTypesOfIntersectionType: re, + parenthesizeConstituentTypeOfIntersectionType: J, + parenthesizeOperandOfTypeOperator: te, + parenthesizeOperandOfReadonlyTypeOperator: ie, + parenthesizeNonArrayTypeOfPostfixType: le, + parenthesizeElementTypesOfTupleType: Te, + parenthesizeElementTypeOfTupleType: q, + parenthesizeTypeOfOptionalType: Ce, + parenthesizeTypeArguments: ke, + parenthesizeLeadingTypeArgument: Ee + }; + function i(ue) { + t || (t = /* @__PURE__ */ new Map()); + let it = t.get(ue); + return it || (it = (Oe) => m(ue, Oe), t.set(ue, it)), it; + } + function s(ue) { + n || (n = /* @__PURE__ */ new Map()); + let it = n.get(ue); + return it || (it = (Oe) => g( + ue, + /*leftSide*/ + void 0, + Oe + ), n.set(ue, it)), it; + } + function o(ue, it, Oe, xe) { + const he = A3(226, ue), ne = FB(226, ue), Ae = ed(it); + if (!Oe && it.kind === 219 && he > 3) + return !0; + const De = W4(Ae); + switch (uo(De, he)) { + case -1: + return !(!Oe && ne === 1 && it.kind === 229); + case 1: + return !1; + case 0: + if (Oe) + return ne === 1; + if (fn(Ae) && Ae.operatorToken.kind === ue) { + if (c(ue)) + return !1; + if (ue === 40) { + const Ue = xe ? _(xe) : 0; + if (y4(Ue) && Ue === _(Ae)) + return !1; + } + } + return IB(Ae) === 0; + } + } + function c(ue) { + return ue === 42 || ue === 52 || ue === 51 || ue === 53 || ue === 28; + } + function _(ue) { + if (ue = ed(ue), y4(ue.kind)) + return ue.kind; + if (ue.kind === 226 && ue.operatorToken.kind === 40) { + if (ue.cachedLiteralKind !== void 0) + return ue.cachedLiteralKind; + const it = _(ue.left), Oe = y4(it) && it === _(ue.right) ? it : 0; + return ue.cachedLiteralKind = Oe, Oe; + } + return 0; + } + function u(ue, it, Oe, xe) { + return ed(it).kind === 217 ? it : o(ue, it, Oe, xe) ? e.createParenthesizedExpression(it) : it; + } + function m(ue, it) { + return u( + ue, + it, + /*isLeftSideOfBinary*/ + !0 + ); + } + function g(ue, it, Oe) { + return u( + ue, + Oe, + /*isLeftSideOfBinary*/ + !1, + it + ); + } + function h(ue) { + return PD(ue) ? e.createParenthesizedExpression(ue) : ue; + } + function S(ue) { + const it = A3( + 227, + 58 + /* QuestionToken */ + ), Oe = ed(ue), xe = W4(Oe); + return uo(xe, it) !== 1 ? e.createParenthesizedExpression(ue) : ue; + } + function T(ue) { + const it = ed(ue); + return PD(it) ? e.createParenthesizedExpression(ue) : ue; + } + function C(ue) { + const it = ed(ue); + let Oe = PD(it); + if (!Oe) + switch (qC( + it, + /*stopAtCallExpressions*/ + !1 + ).kind) { + case 231: + case 218: + Oe = !0; + } + return Oe ? e.createParenthesizedExpression(ue) : ue; + } + function D(ue) { + const it = qC( + ue, + /*stopAtCallExpressions*/ + !0 + ); + switch (it.kind) { + case 213: + return e.createParenthesizedExpression(ue); + case 214: + return it.arguments ? ue : e.createParenthesizedExpression(ue); + } + return w(ue); + } + function w(ue, it) { + const Oe = ed(ue); + return u_(Oe) && (Oe.kind !== 214 || Oe.arguments) && (it || !vu(Oe)) ? ue : ot(e.createParenthesizedExpression(ue), ue); + } + function A(ue) { + return u_(ue) ? ue : ot(e.createParenthesizedExpression(ue), ue); + } + function O(ue) { + return Rj(ue) ? ue : ot(e.createParenthesizedExpression(ue), ue); + } + function F(ue) { + const it = Wc(ue, R); + return ot(e.createNodeArray(it, ue.hasTrailingComma), ue); + } + function R(ue) { + const it = ed(ue), Oe = W4(it), xe = A3( + 226, + 28 + /* CommaToken */ + ); + return Oe > xe ? ue : ot(e.createParenthesizedExpression(ue), ue); + } + function W(ue) { + const it = ed(ue); + if (Fs(it)) { + const xe = it.expression, he = ed(xe).kind; + if (he === 218 || he === 219) { + const ne = e.updateCallExpression( + it, + ot(e.createParenthesizedExpression(xe), xe), + it.typeArguments, + it.arguments + ); + return e.restoreOuterExpressions( + ue, + ne, + 8 + /* PartiallyEmittedExpressions */ + ); + } + } + const Oe = qC( + it, + /*stopAtCallExpressions*/ + !1 + ).kind; + return Oe === 210 || Oe === 218 ? ot(e.createParenthesizedExpression(ue), ue) : ue; + } + function V(ue) { + return !ks(ue) && (PD(ue) || qC( + ue, + /*stopAtCallExpressions*/ + !1 + ).kind === 210) ? ot(e.createParenthesizedExpression(ue), ue) : ue; + } + function $(ue) { + switch (ue.kind) { + case 184: + case 185: + case 194: + return e.createParenthesizedType(ue); + } + return ue; + } + function U(ue) { + switch (ue.kind) { + case 194: + return e.createParenthesizedType(ue); + } + return ue; + } + function _e(ue) { + switch (ue.kind) { + case 192: + // Not strictly necessary, but a union containing a union should have been flattened + case 193: + return e.createParenthesizedType(ue); + } + return $(ue); + } + function Z(ue) { + return e.createNodeArray(Wc(ue, _e)); + } + function J(ue) { + switch (ue.kind) { + case 192: + case 193: + return e.createParenthesizedType(ue); + } + return _e(ue); + } + function re(ue) { + return e.createNodeArray(Wc(ue, J)); + } + function te(ue) { + switch (ue.kind) { + case 193: + return e.createParenthesizedType(ue); + } + return J(ue); + } + function ie(ue) { + switch (ue.kind) { + case 198: + return e.createParenthesizedType(ue); + } + return te(ue); + } + function le(ue) { + switch (ue.kind) { + case 195: + case 198: + case 186: + return e.createParenthesizedType(ue); + } + return te(ue); + } + function Te(ue) { + return e.createNodeArray(Wc(ue, q)); + } + function q(ue) { + return me(ue) ? e.createParenthesizedType(ue) : ue; + } + function me(ue) { + return s6(ue) ? ue.postfix : KC(ue) || ng(ue) || ZC(ue) || _v(ue) ? me(ue.type) : Xb(ue) ? me(ue.falseType) : L0(ue) || Ux(ue) ? me(_a(ue.types)) : AS(ue) ? !!ue.typeParameter.constraint && me(ue.typeParameter.constraint) : !1; + } + function Ce(ue) { + return me(ue) ? e.createParenthesizedType(ue) : le(ue); + } + function Ee(ue) { + return lZ(ue) && ue.typeParameters ? e.createParenthesizedType(ue) : ue; + } + function oe(ue, it) { + return it === 0 ? Ee(ue) : ue; + } + function ke(ue) { + if (at(ue)) + return e.createNodeArray(Wc(ue, oe)); + } + } + var Hee = { + getParenthesizeLeftSideOfBinaryForOperator: (e) => lo, + getParenthesizeRightSideOfBinaryForOperator: (e) => lo, + parenthesizeLeftSideOfBinary: (e, t) => t, + parenthesizeRightSideOfBinary: (e, t, n) => n, + parenthesizeExpressionOfComputedPropertyName: lo, + parenthesizeConditionOfConditionalExpression: lo, + parenthesizeBranchOfConditionalExpression: lo, + parenthesizeExpressionOfExportDefault: lo, + parenthesizeExpressionOfNew: (e) => Ws(e, u_), + parenthesizeLeftSideOfAccess: (e) => Ws(e, u_), + parenthesizeOperandOfPostfixUnary: (e) => Ws(e, u_), + parenthesizeOperandOfPrefixUnary: (e) => Ws(e, Rj), + parenthesizeExpressionsOfCommaDelimitedList: (e) => Ws(e, xb), + parenthesizeExpressionForDisallowedComma: lo, + parenthesizeExpressionOfExpressionStatement: lo, + parenthesizeConciseBodyOfArrowFunction: lo, + parenthesizeCheckTypeOfConditionalType: lo, + parenthesizeExtendsTypeOfConditionalType: lo, + parenthesizeConstituentTypesOfUnionType: (e) => Ws(e, xb), + parenthesizeConstituentTypeOfUnionType: lo, + parenthesizeConstituentTypesOfIntersectionType: (e) => Ws(e, xb), + parenthesizeConstituentTypeOfIntersectionType: lo, + parenthesizeOperandOfTypeOperator: lo, + parenthesizeOperandOfReadonlyTypeOperator: lo, + parenthesizeNonArrayTypeOfPostfixType: lo, + parenthesizeElementTypesOfTupleType: (e) => Ws(e, xb), + parenthesizeElementTypeOfTupleType: lo, + parenthesizeTypeOfOptionalType: lo, + parenthesizeTypeArguments: (e) => e && Ws(e, xb), + parenthesizeLeadingTypeArgument: lo + }; + function Gee(e) { + return { + convertToFunctionBlock: t, + convertToFunctionExpression: n, + convertToClassExpression: i, + convertToArrayAssignmentElement: s, + convertToObjectAssignmentElement: o, + convertToAssignmentPattern: c, + convertToObjectAssignmentPattern: _, + convertToArrayAssignmentPattern: u, + convertToAssignmentElementTarget: m + }; + function t(g, h) { + if (ks(g)) return g; + const S = e.createReturnStatement(g); + ot(S, g); + const T = e.createBlock([S], h); + return ot(T, g), T; + } + function n(g) { + var h; + if (!g.body) return E.fail("Cannot convert a FunctionDeclaration without a body"); + const S = e.createFunctionExpression( + (h = Tb(g)) == null ? void 0 : h.filter((T) => !jx(T) && !_F(T)), + g.asteriskToken, + g.name, + g.typeParameters, + g.parameters, + g.type, + g.body + ); + return Sn(S, g), ot(S, g), pD(g) && iF( + S, + /*newLine*/ + !0 + ), S; + } + function i(g) { + var h; + const S = e.createClassExpression( + (h = g.modifiers) == null ? void 0 : h.filter((T) => !jx(T) && !_F(T)), + g.name, + g.typeParameters, + g.heritageClauses, + g.members + ); + return Sn(S, g), ot(S, g), pD(g) && iF( + S, + /*newLine*/ + !0 + ), S; + } + function s(g) { + if (ma(g)) { + if (g.dotDotDotToken) + return E.assertNode(g.name, Me), Sn(ot(e.createSpreadElement(g.name), g), g); + const h = m(g.name); + return g.initializer ? Sn( + ot( + e.createAssignment(h, g.initializer), + g + ), + g + ) : h; + } + return Ws(g, ct); + } + function o(g) { + if (ma(g)) { + if (g.dotDotDotToken) + return E.assertNode(g.name, Me), Sn(ot(e.createSpreadAssignment(g.name), g), g); + if (g.propertyName) { + const h = m(g.name); + return Sn(ot(e.createPropertyAssignment(g.propertyName, g.initializer ? e.createAssignment(h, g.initializer) : h), g), g); + } + return E.assertNode(g.name, Me), Sn(ot(e.createShorthandPropertyAssignment(g.name, g.initializer), g), g); + } + return Ws(g, Eh); + } + function c(g) { + switch (g.kind) { + case 207: + case 209: + return u(g); + case 206: + case 210: + return _(g); + } + } + function _(g) { + return Nf(g) ? Sn( + ot( + e.createObjectLiteralExpression(gr(g.elements, o)), + g + ), + g + ) : Ws(g, oa); + } + function u(g) { + return R0(g) ? Sn( + ot( + e.createArrayLiteralExpression(gr(g.elements, s)), + g + ), + g + ) : Ws(g, Ql); + } + function m(g) { + return Ds(g) ? c(g) : Ws(g, ct); + } + } + var $ee = { + convertToFunctionBlock: qs, + convertToFunctionExpression: qs, + convertToClassExpression: qs, + convertToArrayAssignmentElement: qs, + convertToObjectAssignmentElement: qs, + convertToAssignmentPattern: qs, + convertToObjectAssignmentPattern: qs, + convertToArrayAssignmentPattern: qs, + convertToAssignmentElementTarget: qs + }, jJ = 0, Xee = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.NoParenthesizerRules = 1] = "NoParenthesizerRules", e[e.NoNodeConverters = 2] = "NoNodeConverters", e[e.NoIndentationOnFreshPropertyAccess = 4] = "NoIndentationOnFreshPropertyAccess", e[e.NoOriginalNode = 8] = "NoOriginalNode", e))(Xee || {}), Rhe = []; + function jhe(e) { + Rhe.push(e); + } + function aN(e, t) { + const n = e & 8 ? lo : Sn, i = Iu(() => e & 1 ? Hee : qee(A)), s = Iu(() => e & 2 ? $ee : Gee(A)), o = Kd((v) => (P, B) => Hr(P, v, B)), c = Kd((v) => (P) => et(v, P)), _ = Kd((v) => (P) => jt(P, v)), u = Kd((v) => () => cs(v)), m = Kd((v) => (P) => Ek(v, P)), g = Kd((v) => (P, B) => un(v, P, B)), h = Kd((v) => (P, B) => iy(v, P, B)), S = Kd((v) => (P, B) => qv(v, P, B)), T = Kd((v) => (P, B) => Gv(v, P, B)), C = Kd((v) => (P, B, ae) => pu(v, P, B, ae)), D = Kd((v) => (P, B, ae) => $p(v, P, B, ae)), w = Kd((v) => (P, B, ae, Be) => oE(v, P, B, ae, Be)), A = { + get parenthesizer() { + return i(); + }, + get converters() { + return s(); + }, + baseFactory: t, + flags: e, + createNodeArray: O, + createNumericLiteral: V, + createBigIntLiteral: $, + createStringLiteral: _e, + createStringLiteralFromNode: Z, + createRegularExpressionLiteral: J, + createLiteralLikeNode: re, + createIdentifier: le, + createTempVariable: Te, + createLoopVariable: q, + createUniqueName: me, + getGeneratedNameForNode: Ce, + createPrivateIdentifier: oe, + createUniquePrivateName: ue, + getGeneratedPrivateNameForNode: it, + createToken: xe, + createSuper: he, + createThis: ne, + createNull: Ae, + createTrue: De, + createFalse: we, + createModifier: Ue, + createModifiersFromModifierFlags: bt, + createQualifiedName: Lt, + updateQualifiedName: er, + createComputedPropertyName: Nr, + updateComputedPropertyName: Dt, + createTypeParameterDeclaration: Qt, + updateTypeParameterDeclaration: Wr, + createParameterDeclaration: yr, + updateParameterDeclaration: qn, + createDecorator: Bt, + updateDecorator: bi, + createPropertySignature: pi, + updatePropertySignature: Xn, + createPropertyDeclaration: di, + updatePropertyDeclaration: Re, + createMethodSignature: gt, + updateMethodSignature: tr, + createMethodDeclaration: qr, + updateMethodDeclaration: Bn, + createConstructorDeclaration: xr, + updateConstructorDeclaration: gs, + createGetAccessorDeclaration: Ct, + updateGetAccessorDeclaration: ee, + createSetAccessorDeclaration: K, + updateSetAccessorDeclaration: Ie, + createCallSignature: Ke, + updateCallSignature: Je, + createConstructSignature: Ye, + updateConstructSignature: _t, + createIndexSignature: yt, + updateIndexSignature: We, + createClassStaticBlockDeclaration: ki, + updateClassStaticBlockDeclaration: Cs, + createTemplateLiteralTypeSpan: Et, + updateTemplateLiteralTypeSpan: Xt, + createKeywordTypeNode: rn, + createTypePredicateNode: ye, + updateTypePredicateNode: ft, + createTypeReferenceNode: fe, + updateTypeReferenceNode: L, + createFunctionTypeNode: ve, + updateFunctionTypeNode: X, + createConstructorTypeNode: zt, + updateConstructorTypeNode: Gt, + createTypeQueryNode: Jr, + updateTypeQueryNode: tt, + createTypeLiteralNode: ut, + updateTypeLiteralNode: Mt, + createArrayTypeNode: Pt, + updateArrayTypeNode: Zt, + createTupleTypeNode: fr, + updateTupleTypeNode: Vt, + createNamedTupleMember: ir, + updateNamedTupleMember: Tr, + createOptionalTypeNode: _r, + updateOptionalTypeNode: Ot, + createRestTypeNode: mi, + updateRestTypeNode: Js, + createUnionTypeNode: kc, + updateUnionTypeNode: Wo, + createIntersectionTypeNode: sc, + updateIntersectionTypeNode: ri, + createConditionalTypeNode: zs, + updateConditionalTypeNode: eu, + createInferTypeNode: hs, + updateInferTypeNode: Bu, + createImportTypeNode: Zi, + updateImportTypeNode: Gs, + createParenthesizedType: Ca, + updateParenthesizedType: Oi, + createThisTypeNode: qt, + createTypeOperatorNode: Qa, + updateTypeOperatorNode: Mc, + createIndexedAccessTypeNode: Ol, + updateIndexedAccessTypeNode: Ll, + createMappedTypeNode: To, + updateMappedTypeNode: ge, + createLiteralTypeNode: G, + updateLiteralTypeNode: rt, + createTemplateLiteralType: Yc, + updateTemplateLiteralType: Sl, + createObjectBindingPattern: wt, + updateObjectBindingPattern: Kt, + createArrayBindingPattern: Yr, + updateArrayBindingPattern: Mn, + createBindingElement: pr, + updateBindingElement: En, + createArrayLiteralExpression: Ji, + updateArrayLiteralExpression: hi, + createObjectLiteralExpression: ba, + updateObjectLiteralExpression: Mo, + createPropertyAccessExpression: e & 4 ? (v, P) => on( + mc(v, P), + 262144 + /* NoIndentation */ + ) : mc, + updatePropertyAccessExpression: Rc, + createPropertyAccessChain: e & 4 ? (v, P, B) => on( + Uo(v, P, B), + 262144 + /* NoIndentation */ + ) : Uo, + updatePropertyAccessChain: ac, + createElementAccessExpression: dl, + updateElementAccessExpression: Ml, + createElementAccessChain: Rl, + updateElementAccessChain: Fe, + createCallExpression: Br, + updateCallExpression: Ti, + createCallChain: Sa, + updateCallChain: to, + createNewExpression: Do, + updateNewExpression: ml, + createTaggedTemplateExpression: gc, + updateTaggedTemplateExpression: Va, + createTypeAssertion: mo, + updateTypeAssertion: df, + createParenthesizedExpression: Rf, + updateParenthesizedExpression: F_, + createFunctionExpression: mf, + updateFunctionExpression: jf, + createArrowFunction: fp, + updateArrowFunction: th, + createDeleteExpression: od, + updateDeleteExpression: t_, + createTypeOfExpression: gf, + updateTypeOfExpression: y_, + createVoidExpression: cd, + updateVoidExpression: hf, + createAwaitExpression: ug, + updateAwaitExpression: Q, + createPrefixUnaryExpression: et, + updatePrefixUnaryExpression: Rt, + createPostfixUnaryExpression: jt, + updatePostfixUnaryExpression: Er, + createBinaryExpression: Hr, + updateBinaryExpression: ii, + createConditionalExpression: j, + updateConditionalExpression: Ne, + createTemplateExpression: Tt, + updateTemplateExpression: Ar, + createTemplateHead: xa, + createTemplateMiddle: Ro, + createTemplateTail: O_, + createNoSubstitutionTemplateLiteral: Ld, + createTemplateLiteralLikeNode: ja, + createYieldExpression: km, + updateYieldExpression: Cm, + createSpreadElement: G0, + updateSpreadElement: rh, + createClassExpression: pp, + updateClassExpression: ld, + createOmittedExpression: xo, + createExpressionWithTypeArguments: yf, + updateExpressionWithTypeArguments: qh, + createAsExpression: v_, + updateAsExpression: nh, + createNonNullExpression: _g, + updateNonNullExpression: Md, + createSatisfiesExpression: Em, + updateSatisfiesExpression: $0, + createNonNullChain: m1, + updateNonNullChain: dp, + createMetaProperty: g1, + updateMetaProperty: mp, + createTemplateSpan: Rd, + updateTemplateSpan: Hh, + createSemicolonClassElement: h1, + createBlock: ud, + updateBlock: Rv, + createVariableStatement: y1, + updateVariableStatement: X0, + createEmptyStatement: Le, + createExpressionStatement: Ge, + updateExpressionStatement: St, + createIfStatement: rr, + updateIfStatement: vr, + createDoStatement: Gr, + updateDoStatement: Dr, + createWhileStatement: cn, + updateWhileStatement: ai, + createForStatement: hn, + updateForStatement: ji, + createForInStatement: Gn, + updateForInStatement: ta, + createForOfStatement: Cc, + updateForOfStatement: r_, + createContinueStatement: vf, + updateContinueStatement: Bf, + createBreakStatement: n_, + updateBreakStatement: i_, + createReturnStatement: jv, + updateReturnStatement: Bv, + createWithStatement: fg, + updateWithStatement: Q0, + createSwitchStatement: Gh, + updateSwitchStatement: jd, + createLabeledStatement: $h, + updateLabeledStatement: v1, + createThrowStatement: Xh, + updateThrowStatement: nT, + createTryStatement: b2, + updateTryStatement: Jv, + createDebuggerStatement: Pa, + createVariableDeclaration: b1, + updateVariableDeclaration: eE, + createVariableDeclarationList: Y0, + updateVariableDeclarationList: Z0, + createFunctionDeclaration: pg, + updateFunctionDeclaration: Jf, + createClassDeclaration: L_, + updateClassDeclaration: b_, + createInterfaceDeclaration: zv, + updateInterfaceDeclaration: tE, + createTypeAliasDeclaration: Tl, + updateTypeAliasDeclaration: Bd, + createEnumDeclaration: K0, + updateEnumDeclaration: Dm, + createModuleDeclaration: Ck, + updateModuleDeclaration: tu, + createModuleBlock: ih, + updateModuleBlock: zf, + createCaseBlock: qp, + updateCaseBlock: wm, + createNamespaceExportDeclaration: je, + updateNamespaceExportDeclaration: Qh, + createImportEqualsDeclaration: S1, + updateImportEqualsDeclaration: iT, + createImportDeclaration: Yh, + updateImportDeclaration: T1, + createImportClause: Zh, + updateImportClause: sT, + createAssertClause: ca, + updateAssertClause: _d, + createAssertEntry: ey, + updateAssertEntry: sf, + createImportTypeAssertionContainer: Kh, + updateImportTypeAssertionContainer: mg, + createImportAttributes: Pm, + updateImportAttributes: Wv, + createImportAttribute: ty, + updateImportAttribute: Uv, + createNamespaceImport: Nm, + updateNamespaceImport: e0, + createNamespaceExport: rE, + updateNamespaceExport: Ci, + createNamedImports: yn, + updateNamedImports: fu, + createImportSpecifier: ry, + updateImportSpecifier: ny, + createExportAssignment: S2, + updateExportAssignment: x1, + createExportDeclaration: go, + updateExportDeclaration: T2, + createNamedExports: k1, + updateNamedExports: Hp, + createExportSpecifier: x2, + updateExportSpecifier: nE, + createMissingDeclaration: iE, + createExternalModuleReference: gn, + updateExternalModuleReference: Ju, + // lazily load factory members for JSDoc types with similar structure + get createJSDocAllType() { + return u( + 312 + /* JSDocAllType */ + ); + }, + get createJSDocUnknownType() { + return u( + 313 + /* JSDocUnknownType */ + ); + }, + get createJSDocNonNullableType() { + return h( + 315 + /* JSDocNonNullableType */ + ); + }, + get updateJSDocNonNullableType() { + return S( + 315 + /* JSDocNonNullableType */ + ); + }, + get createJSDocNullableType() { + return h( + 314 + /* JSDocNullableType */ + ); + }, + get updateJSDocNullableType() { + return S( + 314 + /* JSDocNullableType */ + ); + }, + get createJSDocOptionalType() { + return m( + 316 + /* JSDocOptionalType */ + ); + }, + get updateJSDocOptionalType() { + return g( + 316 + /* JSDocOptionalType */ + ); + }, + get createJSDocVariadicType() { + return m( + 318 + /* JSDocVariadicType */ + ); + }, + get updateJSDocVariadicType() { + return g( + 318 + /* JSDocVariadicType */ + ); + }, + get createJSDocNamepathType() { + return m( + 319 + /* JSDocNamepathType */ + ); + }, + get updateJSDocNamepathType() { + return g( + 319 + /* JSDocNamepathType */ + ); + }, + createJSDocFunctionType: sE, + updateJSDocFunctionType: Dk, + createJSDocTypeLiteral: wu, + updateJSDocTypeLiteral: Am, + createJSDocTypeExpression: ru, + updateJSDocTypeExpression: sh, + createJSDocSignature: k2, + updateJSDocSignature: C1, + createJSDocTemplateTag: gg, + updateJSDocTemplateTag: C2, + createJSDocTypedefTag: t0, + updateJSDocTypedefTag: E2, + createJSDocParameterTag: Hv, + updateJSDocParameterTag: aT, + createJSDocPropertyTag: D2, + updateJSDocPropertyTag: w2, + createJSDocCallbackTag: Im, + updateJSDocCallbackTag: wk, + createJSDocOverloadTag: oT, + updateJSDocOverloadTag: sy, + createJSDocAugmentsTag: P2, + updateJSDocAugmentsTag: fd, + createJSDocImplementsTag: ah, + updateJSDocImplementsTag: Pl, + createJSDocSeeTag: oh, + updateJSDocSeeTag: E1, + createJSDocImportTag: Ik, + updateJSDocImportTag: oc, + createJSDocNameReference: wl, + updateJSDocNameReference: N2, + createJSDocMemberName: ch, + updateJSDocMemberName: A2, + createJSDocLink: Pk, + updateJSDocLink: Fm, + createJSDocLinkCode: aE, + updateJSDocLinkCode: ay, + createJSDocLinkPlain: cT, + updateJSDocLinkPlain: jc, + // lazily load factory members for JSDoc tags with similar structure + get createJSDocTypeTag() { + return D( + 344 + /* JSDocTypeTag */ + ); + }, + get updateJSDocTypeTag() { + return w( + 344 + /* JSDocTypeTag */ + ); + }, + get createJSDocReturnTag() { + return D( + 342 + /* JSDocReturnTag */ + ); + }, + get updateJSDocReturnTag() { + return w( + 342 + /* JSDocReturnTag */ + ); + }, + get createJSDocThisTag() { + return D( + 343 + /* JSDocThisTag */ + ); + }, + get updateJSDocThisTag() { + return w( + 343 + /* JSDocThisTag */ + ); + }, + get createJSDocAuthorTag() { + return T( + 330 + /* JSDocAuthorTag */ + ); + }, + get updateJSDocAuthorTag() { + return C( + 330 + /* JSDocAuthorTag */ + ); + }, + get createJSDocClassTag() { + return T( + 332 + /* JSDocClassTag */ + ); + }, + get updateJSDocClassTag() { + return C( + 332 + /* JSDocClassTag */ + ); + }, + get createJSDocPublicTag() { + return T( + 333 + /* JSDocPublicTag */ + ); + }, + get updateJSDocPublicTag() { + return C( + 333 + /* JSDocPublicTag */ + ); + }, + get createJSDocPrivateTag() { + return T( + 334 + /* JSDocPrivateTag */ + ); + }, + get updateJSDocPrivateTag() { + return C( + 334 + /* JSDocPrivateTag */ + ); + }, + get createJSDocProtectedTag() { + return T( + 335 + /* JSDocProtectedTag */ + ); + }, + get updateJSDocProtectedTag() { + return C( + 335 + /* JSDocProtectedTag */ + ); + }, + get createJSDocReadonlyTag() { + return T( + 336 + /* JSDocReadonlyTag */ + ); + }, + get updateJSDocReadonlyTag() { + return C( + 336 + /* JSDocReadonlyTag */ + ); + }, + get createJSDocOverrideTag() { + return T( + 337 + /* JSDocOverrideTag */ + ); + }, + get updateJSDocOverrideTag() { + return C( + 337 + /* JSDocOverrideTag */ + ); + }, + get createJSDocDeprecatedTag() { + return T( + 331 + /* JSDocDeprecatedTag */ + ); + }, + get updateJSDocDeprecatedTag() { + return C( + 331 + /* JSDocDeprecatedTag */ + ); + }, + get createJSDocThrowsTag() { + return D( + 349 + /* JSDocThrowsTag */ + ); + }, + get updateJSDocThrowsTag() { + return w( + 349 + /* JSDocThrowsTag */ + ); + }, + get createJSDocSatisfiesTag() { + return D( + 350 + /* JSDocSatisfiesTag */ + ); + }, + get updateJSDocSatisfiesTag() { + return w( + 350 + /* JSDocSatisfiesTag */ + ); + }, + createJSDocEnumTag: oy, + updateJSDocEnumTag: Ak, + createJSDocUnknownTag: Jd, + updateJSDocUnknownTag: Nk, + createJSDocText: lT, + updateJSDocText: cE, + createJSDocComment: cy, + updateJSDocComment: lE, + createJsxElement: Pu, + updateJsxElement: Fk, + createJsxSelfClosingElement: uT, + updateJsxSelfClosingElement: I2, + createJsxOpeningElement: M_, + updateJsxOpeningElement: Ok, + createJsxClosingElement: D1, + updateJsxClosingElement: hp, + createJsxFragment: w1, + createJsxText: fT, + updateJsxText: pT, + createJsxOpeningFragment: dT, + createJsxJsxClosingFragment: $v, + updateJsxFragment: _T, + createJsxAttribute: mT, + updateJsxAttribute: zu, + createJsxAttributes: Uf, + updateJsxAttributes: uE, + createJsxSpreadAttribute: Lk, + updateJsxSpreadAttribute: Oa, + createJsxExpression: dn, + updateJsxExpression: R_, + createJsxNamespacedName: af, + updateJsxNamespacedName: gT, + createCaseClause: Mk, + updateCaseClause: Rk, + createDefaultClause: P1, + updateDefaultClause: hT, + createHeritageClause: Xv, + updateHeritageClause: pd, + createCatchClause: gl, + updateCatchClause: lh, + createPropertyAssignment: Om, + updatePropertyAssignment: Xp, + createShorthandPropertyAssignment: Bc, + updateShorthandPropertyAssignment: k, + createSpreadAssignment: mt, + updateSpreadAssignment: sr, + createEnumMember: Yn, + updateEnumMember: zi, + createSourceFile: Qi, + updateSourceFile: uh, + createRedirectedSourceFile: ds, + createBundle: Wu, + updateBundle: Qv, + createSyntheticExpression: jk, + createSyntaxList: F2, + createNotEmittedStatement: Yv, + createNotEmittedTypeElement: Qp, + createPartiallyEmittedExpression: yT, + updatePartiallyEmittedExpression: Zv, + createCommaListExpression: Kv, + updateCommaListExpression: b8, + createSyntheticReferenceExpression: A1, + updateSyntheticReferenceExpression: Fw, + cloneNode: $r, + // Lazily load factory methods for common operator factories and utilities + get createComma() { + return o( + 28 + /* CommaToken */ + ); + }, + get createAssignment() { + return o( + 64 + /* EqualsToken */ + ); + }, + get createLogicalOr() { + return o( + 57 + /* BarBarToken */ + ); + }, + get createLogicalAnd() { + return o( + 56 + /* AmpersandAmpersandToken */ + ); + }, + get createBitwiseOr() { + return o( + 52 + /* BarToken */ + ); + }, + get createBitwiseXor() { + return o( + 53 + /* CaretToken */ + ); + }, + get createBitwiseAnd() { + return o( + 51 + /* AmpersandToken */ + ); + }, + get createStrictEquality() { + return o( + 37 + /* EqualsEqualsEqualsToken */ + ); + }, + get createStrictInequality() { + return o( + 38 + /* ExclamationEqualsEqualsToken */ + ); + }, + get createEquality() { + return o( + 35 + /* EqualsEqualsToken */ + ); + }, + get createInequality() { + return o( + 36 + /* ExclamationEqualsToken */ + ); + }, + get createLessThan() { + return o( + 30 + /* LessThanToken */ + ); + }, + get createLessThanEquals() { + return o( + 33 + /* LessThanEqualsToken */ + ); + }, + get createGreaterThan() { + return o( + 32 + /* GreaterThanToken */ + ); + }, + get createGreaterThanEquals() { + return o( + 34 + /* GreaterThanEqualsToken */ + ); + }, + get createLeftShift() { + return o( + 48 + /* LessThanLessThanToken */ + ); + }, + get createRightShift() { + return o( + 49 + /* GreaterThanGreaterThanToken */ + ); + }, + get createUnsignedRightShift() { + return o( + 50 + /* GreaterThanGreaterThanGreaterThanToken */ + ); + }, + get createAdd() { + return o( + 40 + /* PlusToken */ + ); + }, + get createSubtract() { + return o( + 41 + /* MinusToken */ + ); + }, + get createMultiply() { + return o( + 42 + /* AsteriskToken */ + ); + }, + get createDivide() { + return o( + 44 + /* SlashToken */ + ); + }, + get createModulo() { + return o( + 45 + /* PercentToken */ + ); + }, + get createExponent() { + return o( + 43 + /* AsteriskAsteriskToken */ + ); + }, + get createPrefixPlus() { + return c( + 40 + /* PlusToken */ + ); + }, + get createPrefixMinus() { + return c( + 41 + /* MinusToken */ + ); + }, + get createPrefixIncrement() { + return c( + 46 + /* PlusPlusToken */ + ); + }, + get createPrefixDecrement() { + return c( + 47 + /* MinusMinusToken */ + ); + }, + get createBitwiseNot() { + return c( + 55 + /* TildeToken */ + ); + }, + get createLogicalNot() { + return c( + 54 + /* ExclamationToken */ + ); + }, + get createPostfixIncrement() { + return _( + 46 + /* PlusPlusToken */ + ); + }, + get createPostfixDecrement() { + return _( + 47 + /* MinusMinusToken */ + ); + }, + // Compound nodes + createImmediatelyInvokedFunctionExpression: Ow, + createImmediatelyInvokedArrowFunction: fE, + createVoidZero: I1, + createExportDefault: pE, + createExternalModuleExport: x8, + createTypeCheck: dE, + createIsNotTypeCheck: RL, + createMethodCall: Lm, + createGlobalMethodCall: vT, + createFunctionBindCall: jL, + createFunctionCallCall: Lw, + createFunctionApplyCall: BL, + createArraySliceCall: bT, + createArrayConcatCall: k8, + createObjectDefinePropertyCall: F1, + createObjectGetOwnPropertyDescriptorCall: dd, + createReflectGetCall: mE, + createReflectSetCall: hg, + createPropertyDescriptor: C8, + createCallBinding: Ua, + createAssignmentTargetWrapper: H, + // Utilities + inlineExpressions: Pe, + getInternalName: vt, + getLocalName: Wt, + getExportName: br, + getDeclarationName: Rn, + getNamespaceMemberName: Ai, + getExternalModuleOrNamespaceExportName: ui, + restoreOuterExpressions: E8, + restoreEnclosingLabel: Pc, + createUseStrictPrologue: Ya, + copyPrologue: _i, + copyStandardPrologue: Za, + copyCustomPrologue: Ia, + ensureUseStrict: yp, + liftToBlock: rl, + mergeLexicalEnvironment: n0, + replaceModifiers: _h, + replaceDecoratorsAndModifiers: L1, + replacePropertyName: JL + }; + return lr(Rhe, (v) => v(A)), A; + function O(v, P) { + if (v === void 0 || v === He) + v = []; + else if (xb(v)) { + if (P === void 0 || v.hasTrailingComma === P) + return v.transformFlags === void 0 && Jhe(v), E.attachNodeArrayDebugInfo(v), v; + const Be = v.slice(); + return Be.pos = v.pos, Be.end = v.end, Be.hasTrailingComma = P, Be.transformFlags = v.transformFlags, E.attachNodeArrayDebugInfo(Be), Be; + } + const B = v.length, ae = B >= 1 && B <= 4 ? v.slice() : v; + return ae.pos = -1, ae.end = -1, ae.hasTrailingComma = !!P, ae.transformFlags = 0, Jhe(ae), E.attachNodeArrayDebugInfo(ae), ae; + } + function F(v) { + return t.createBaseNode(v); + } + function R(v) { + const P = F(v); + return P.symbol = void 0, P.localSymbol = void 0, P; + } + function W(v, P) { + return v !== P && (v.typeArguments = P.typeArguments), ln(v, P); + } + function V(v, P = 0) { + const B = typeof v == "number" ? v + "" : v; + E.assert(B.charCodeAt(0) !== 45, "Negative numbers should be created in combination with createPrefixUnaryExpression"); + const ae = R( + 9 + /* NumericLiteral */ + ); + return ae.text = B, ae.numericLiteralFlags = P, P & 384 && (ae.transformFlags |= 1024), ae; + } + function $(v) { + const P = Oe( + 10 + /* BigIntLiteral */ + ); + return P.text = typeof v == "string" ? v : qb(v) + "n", P.transformFlags |= 32, P; + } + function U(v, P) { + const B = R( + 11 + /* StringLiteral */ + ); + return B.text = v, B.singleQuote = P, B; + } + function _e(v, P, B) { + const ae = U(v, P); + return ae.hasExtendedUnicodeEscape = B, B && (ae.transformFlags |= 1024), ae; + } + function Z(v) { + const P = U( + rp(v), + /*isSingleQuote*/ + void 0 + ); + return P.textSourceNode = v, P; + } + function J(v) { + const P = Oe( + 14 + /* RegularExpressionLiteral */ + ); + return P.text = v, P; + } + function re(v, P) { + switch (v) { + case 9: + return V( + P, + /*numericLiteralFlags*/ + 0 + ); + case 10: + return $(P); + case 11: + return _e( + P, + /*isSingleQuote*/ + void 0 + ); + case 12: + return fT( + P, + /*containsOnlyTriviaWhiteSpaces*/ + !1 + ); + case 13: + return fT( + P, + /*containsOnlyTriviaWhiteSpaces*/ + !0 + ); + case 14: + return J(P); + case 15: + return ja( + v, + P, + /*rawText*/ + void 0, + /*templateFlags*/ + 0 + ); + } + } + function te(v) { + const P = t.createBaseIdentifierNode( + 80 + /* Identifier */ + ); + return P.escapedText = v, P.jsDoc = void 0, P.flowNode = void 0, P.symbol = void 0, P; + } + function ie(v, P, B, ae) { + const Be = te(Zo(v)); + return _N(Be, { + flags: P, + id: jJ, + prefix: B, + suffix: ae + }), jJ++, Be; + } + function le(v, P, B) { + P === void 0 && v && (P = sS(v)), P === 80 && (P = void 0); + const ae = te(Zo(v)); + return B && (ae.flags |= 256), ae.escapedText === "await" && (ae.transformFlags |= 67108864), ae.flags & 256 && (ae.transformFlags |= 1024), ae; + } + function Te(v, P, B, ae) { + let Be = 1; + P && (Be |= 8); + const Jt = ie("", Be, B, ae); + return v && v(Jt), Jt; + } + function q(v) { + let P = 2; + return v && (P |= 8), ie( + "", + P, + /*prefix*/ + void 0, + /*suffix*/ + void 0 + ); + } + function me(v, P = 0, B, ae) { + return E.assert(!(P & 7), "Argument out of range: flags"), E.assert((P & 48) !== 32, "GeneratedIdentifierFlags.FileLevel cannot be set without also setting GeneratedIdentifierFlags.Optimistic"), ie(v, 3 | P, B, ae); + } + function Ce(v, P = 0, B, ae) { + E.assert(!(P & 7), "Argument out of range: flags"); + const Be = v ? Lg(v) ? vv( + /*privateName*/ + !1, + B, + v, + ae, + An + ) : `generated@${Aa(v)}` : ""; + (B || ae) && (P |= 16); + const Jt = ie(Be, 4 | P, B, ae); + return Jt.original = v, Jt; + } + function Ee(v) { + const P = t.createBasePrivateIdentifierNode( + 81 + /* PrivateIdentifier */ + ); + return P.escapedText = v, P.transformFlags |= 16777216, P; + } + function oe(v) { + return Vi(v, "#") || E.fail("First character of private identifier must be #: " + v), Ee(Zo(v)); + } + function ke(v, P, B, ae) { + const Be = Ee(Zo(v)); + return _N(Be, { + flags: P, + id: jJ, + prefix: B, + suffix: ae + }), jJ++, Be; + } + function ue(v, P, B) { + v && !Vi(v, "#") && E.fail("First character of private identifier must be #: " + v); + const ae = 8 | (v ? 3 : 1); + return ke(v ?? "", ae, P, B); + } + function it(v, P, B) { + const ae = Lg(v) ? vv( + /*privateName*/ + !0, + P, + v, + B, + An + ) : `#generated@${Aa(v)}`, Jt = ke(ae, 4 | (P || B ? 16 : 0), P, B); + return Jt.original = v, Jt; + } + function Oe(v) { + return t.createBaseTokenNode(v); + } + function xe(v) { + E.assert(v >= 0 && v <= 165, "Invalid token"), E.assert(v <= 15 || v >= 18, "Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."), E.assert(v <= 9 || v >= 15, "Invalid token. Use 'createLiteralLikeNode' to create literals."), E.assert(v !== 80, "Invalid token. Use 'createIdentifier' to create identifiers"); + const P = Oe(v); + let B = 0; + switch (v) { + case 134: + B = 384; + break; + case 160: + B = 4; + break; + case 125: + case 123: + case 124: + case 148: + case 128: + case 138: + case 87: + case 133: + case 150: + case 163: + case 146: + case 151: + case 103: + case 147: + case 164: + case 154: + case 136: + case 155: + case 116: + case 159: + case 157: + B = 1; + break; + case 108: + B = 134218752, P.flowNode = void 0; + break; + case 126: + B = 1024; + break; + case 129: + B = 16777216; + break; + case 110: + B = 16384, P.flowNode = void 0; + break; + } + return B && (P.transformFlags |= B), P; + } + function he() { + return xe( + 108 + /* SuperKeyword */ + ); + } + function ne() { + return xe( + 110 + /* ThisKeyword */ + ); + } + function Ae() { + return xe( + 106 + /* NullKeyword */ + ); + } + function De() { + return xe( + 112 + /* TrueKeyword */ + ); + } + function we() { + return xe( + 97 + /* FalseKeyword */ + ); + } + function Ue(v) { + return xe(v); + } + function bt(v) { + const P = []; + return v & 32 && P.push(Ue( + 95 + /* ExportKeyword */ + )), v & 128 && P.push(Ue( + 138 + /* DeclareKeyword */ + )), v & 2048 && P.push(Ue( + 90 + /* DefaultKeyword */ + )), v & 4096 && P.push(Ue( + 87 + /* ConstKeyword */ + )), v & 1 && P.push(Ue( + 125 + /* PublicKeyword */ + )), v & 2 && P.push(Ue( + 123 + /* PrivateKeyword */ + )), v & 4 && P.push(Ue( + 124 + /* ProtectedKeyword */ + )), v & 64 && P.push(Ue( + 128 + /* AbstractKeyword */ + )), v & 256 && P.push(Ue( + 126 + /* StaticKeyword */ + )), v & 16 && P.push(Ue( + 164 + /* OverrideKeyword */ + )), v & 8 && P.push(Ue( + 148 + /* ReadonlyKeyword */ + )), v & 512 && P.push(Ue( + 129 + /* AccessorKeyword */ + )), v & 1024 && P.push(Ue( + 134 + /* AsyncKeyword */ + )), v & 8192 && P.push(Ue( + 103 + /* InKeyword */ + )), v & 16384 && P.push(Ue( + 147 + /* OutKeyword */ + )), P.length ? P : void 0; + } + function Lt(v, P) { + const B = F( + 166 + /* QualifiedName */ + ); + return B.left = v, B.right = Zc(P), B.transformFlags |= mn(B.left) | oN(B.right), B.flowNode = void 0, B; + } + function er(v, P, B) { + return v.left !== P || v.right !== B ? ln(Lt(P, B), v) : v; + } + function Nr(v) { + const P = F( + 167 + /* ComputedPropertyName */ + ); + return P.expression = i().parenthesizeExpressionOfComputedPropertyName(v), P.transformFlags |= mn(P.expression) | 1024 | 131072, P; + } + function Dt(v, P) { + return v.expression !== P ? ln(Nr(P), v) : v; + } + function Qt(v, P, B, ae) { + const Be = R( + 168 + /* TypeParameter */ + ); + return Be.modifiers = La(v), Be.name = Zc(P), Be.constraint = B, Be.default = ae, Be.transformFlags = 1, Be.expression = void 0, Be.jsDoc = void 0, Be; + } + function Wr(v, P, B, ae, Be) { + return v.modifiers !== P || v.name !== B || v.constraint !== ae || v.default !== Be ? ln(Qt(P, B, ae, Be), v) : v; + } + function yr(v, P, B, ae, Be, Jt) { + const _n = R( + 169 + /* Parameter */ + ); + return _n.modifiers = La(v), _n.dotDotDotToken = P, _n.name = Zc(B), _n.questionToken = ae, _n.type = Be, _n.initializer = O2(Jt), Xy(_n.name) ? _n.transformFlags = 1 : _n.transformFlags = ka(_n.modifiers) | mn(_n.dotDotDotToken) | e1(_n.name) | mn(_n.questionToken) | mn(_n.initializer) | (_n.questionToken ?? _n.type ? 1 : 0) | (_n.dotDotDotToken ?? _n.initializer ? 1024 : 0) | (lm(_n.modifiers) & 31 ? 8192 : 0), _n.jsDoc = void 0, _n; + } + function qn(v, P, B, ae, Be, Jt, _n) { + return v.modifiers !== P || v.dotDotDotToken !== B || v.name !== ae || v.questionToken !== Be || v.type !== Jt || v.initializer !== _n ? ln(yr(P, B, ae, Be, Jt, _n), v) : v; + } + function Bt(v) { + const P = F( + 170 + /* Decorator */ + ); + return P.expression = i().parenthesizeLeftSideOfAccess( + v, + /*optionalChain*/ + !1 + ), P.transformFlags |= mn(P.expression) | 1 | 8192 | 33554432, P; + } + function bi(v, P) { + return v.expression !== P ? ln(Bt(P), v) : v; + } + function pi(v, P, B, ae) { + const Be = R( + 171 + /* PropertySignature */ + ); + return Be.modifiers = La(v), Be.name = Zc(P), Be.type = ae, Be.questionToken = B, Be.transformFlags = 1, Be.initializer = void 0, Be.jsDoc = void 0, Be; + } + function Xn(v, P, B, ae, Be) { + return v.modifiers !== P || v.name !== B || v.questionToken !== ae || v.type !== Be ? jr(pi(P, B, ae, Be), v) : v; + } + function jr(v, P) { + return v !== P && (v.initializer = P.initializer), ln(v, P); + } + function di(v, P, B, ae, Be) { + const Jt = R( + 172 + /* PropertyDeclaration */ + ); + Jt.modifiers = La(v), Jt.name = Zc(P), Jt.questionToken = B && t1(B) ? B : void 0, Jt.exclamationToken = B && pN(B) ? B : void 0, Jt.type = ae, Jt.initializer = O2(Be); + const _n = Jt.flags & 33554432 || lm(Jt.modifiers) & 128; + return Jt.transformFlags = ka(Jt.modifiers) | e1(Jt.name) | mn(Jt.initializer) | (_n || Jt.questionToken || Jt.exclamationToken || Jt.type ? 1 : 0) | (fa(Jt.name) || lm(Jt.modifiers) & 256 && Jt.initializer ? 8192 : 0) | 16777216, Jt.jsDoc = void 0, Jt; + } + function Re(v, P, B, ae, Be, Jt) { + return v.modifiers !== P || v.name !== B || v.questionToken !== (ae !== void 0 && t1(ae) ? ae : void 0) || v.exclamationToken !== (ae !== void 0 && pN(ae) ? ae : void 0) || v.type !== Be || v.initializer !== Jt ? ln(di(P, B, ae, Be, Jt), v) : v; + } + function gt(v, P, B, ae, Be, Jt) { + const _n = R( + 173 + /* MethodSignature */ + ); + return _n.modifiers = La(v), _n.name = Zc(P), _n.questionToken = B, _n.typeParameters = La(ae), _n.parameters = La(Be), _n.type = Jt, _n.transformFlags = 1, _n.jsDoc = void 0, _n.locals = void 0, _n.nextContainer = void 0, _n.typeArguments = void 0, _n; + } + function tr(v, P, B, ae, Be, Jt, _n) { + return v.modifiers !== P || v.name !== B || v.questionToken !== ae || v.typeParameters !== Be || v.parameters !== Jt || v.type !== _n ? W(gt(P, B, ae, Be, Jt, _n), v) : v; + } + function qr(v, P, B, ae, Be, Jt, _n, es) { + const io = R( + 174 + /* MethodDeclaration */ + ); + if (io.modifiers = La(v), io.asteriskToken = P, io.name = Zc(B), io.questionToken = ae, io.exclamationToken = void 0, io.typeParameters = La(Be), io.parameters = O(Jt), io.type = _n, io.body = es, !io.body) + io.transformFlags = 1; + else { + const vp = lm(io.modifiers) & 1024, vg = !!io.asteriskToken, qf = vp && vg; + io.transformFlags = ka(io.modifiers) | mn(io.asteriskToken) | e1(io.name) | mn(io.questionToken) | ka(io.typeParameters) | ka(io.parameters) | mn(io.type) | mn(io.body) & -67108865 | (qf ? 128 : vp ? 256 : vg ? 2048 : 0) | (io.questionToken || io.typeParameters || io.type ? 1 : 0) | 1024; + } + return io.typeArguments = void 0, io.jsDoc = void 0, io.locals = void 0, io.nextContainer = void 0, io.flowNode = void 0, io.endFlowNode = void 0, io.returnFlowNode = void 0, io; + } + function Bn(v, P, B, ae, Be, Jt, _n, es, io) { + return v.modifiers !== P || v.asteriskToken !== B || v.name !== ae || v.questionToken !== Be || v.typeParameters !== Jt || v.parameters !== _n || v.type !== es || v.body !== io ? wn(qr(P, B, ae, Be, Jt, _n, es, io), v) : v; + } + function wn(v, P) { + return v !== P && (v.exclamationToken = P.exclamationToken), ln(v, P); + } + function ki(v) { + const P = R( + 175 + /* ClassStaticBlockDeclaration */ + ); + return P.body = v, P.transformFlags = mn(v) | 16777216, P.modifiers = void 0, P.jsDoc = void 0, P.locals = void 0, P.nextContainer = void 0, P.endFlowNode = void 0, P.returnFlowNode = void 0, P; + } + function Cs(v, P) { + return v.body !== P ? Ks(ki(P), v) : v; + } + function Ks(v, P) { + return v !== P && (v.modifiers = P.modifiers), ln(v, P); + } + function xr(v, P, B) { + const ae = R( + 176 + /* Constructor */ + ); + return ae.modifiers = La(v), ae.parameters = O(P), ae.body = B, ae.body ? ae.transformFlags = ka(ae.modifiers) | ka(ae.parameters) | mn(ae.body) & -67108865 | 1024 : ae.transformFlags = 1, ae.typeParameters = void 0, ae.type = void 0, ae.typeArguments = void 0, ae.jsDoc = void 0, ae.locals = void 0, ae.nextContainer = void 0, ae.endFlowNode = void 0, ae.returnFlowNode = void 0, ae; + } + function gs(v, P, B, ae) { + return v.modifiers !== P || v.parameters !== B || v.body !== ae ? Qe(xr(P, B, ae), v) : v; + } + function Qe(v, P) { + return v !== P && (v.typeParameters = P.typeParameters, v.type = P.type), W(v, P); + } + function Ct(v, P, B, ae, Be) { + const Jt = R( + 177 + /* GetAccessor */ + ); + return Jt.modifiers = La(v), Jt.name = Zc(P), Jt.parameters = O(B), Jt.type = ae, Jt.body = Be, Jt.body ? Jt.transformFlags = ka(Jt.modifiers) | e1(Jt.name) | ka(Jt.parameters) | mn(Jt.type) | mn(Jt.body) & -67108865 | (Jt.type ? 1 : 0) : Jt.transformFlags = 1, Jt.typeArguments = void 0, Jt.typeParameters = void 0, Jt.jsDoc = void 0, Jt.locals = void 0, Jt.nextContainer = void 0, Jt.flowNode = void 0, Jt.endFlowNode = void 0, Jt.returnFlowNode = void 0, Jt; + } + function ee(v, P, B, ae, Be, Jt) { + return v.modifiers !== P || v.name !== B || v.parameters !== ae || v.type !== Be || v.body !== Jt ? Ve(Ct(P, B, ae, Be, Jt), v) : v; + } + function Ve(v, P) { + return v !== P && (v.typeParameters = P.typeParameters), W(v, P); + } + function K(v, P, B, ae) { + const Be = R( + 178 + /* SetAccessor */ + ); + return Be.modifiers = La(v), Be.name = Zc(P), Be.parameters = O(B), Be.body = ae, Be.body ? Be.transformFlags = ka(Be.modifiers) | e1(Be.name) | ka(Be.parameters) | mn(Be.body) & -67108865 | (Be.type ? 1 : 0) : Be.transformFlags = 1, Be.typeArguments = void 0, Be.typeParameters = void 0, Be.type = void 0, Be.jsDoc = void 0, Be.locals = void 0, Be.nextContainer = void 0, Be.flowNode = void 0, Be.endFlowNode = void 0, Be.returnFlowNode = void 0, Be; + } + function Ie(v, P, B, ae, Be) { + return v.modifiers !== P || v.name !== B || v.parameters !== ae || v.body !== Be ? $e(K(P, B, ae, Be), v) : v; + } + function $e(v, P) { + return v !== P && (v.typeParameters = P.typeParameters, v.type = P.type), W(v, P); + } + function Ke(v, P, B) { + const ae = R( + 179 + /* CallSignature */ + ); + return ae.typeParameters = La(v), ae.parameters = La(P), ae.type = B, ae.transformFlags = 1, ae.jsDoc = void 0, ae.locals = void 0, ae.nextContainer = void 0, ae.typeArguments = void 0, ae; + } + function Je(v, P, B, ae) { + return v.typeParameters !== P || v.parameters !== B || v.type !== ae ? W(Ke(P, B, ae), v) : v; + } + function Ye(v, P, B) { + const ae = R( + 180 + /* ConstructSignature */ + ); + return ae.typeParameters = La(v), ae.parameters = La(P), ae.type = B, ae.transformFlags = 1, ae.jsDoc = void 0, ae.locals = void 0, ae.nextContainer = void 0, ae.typeArguments = void 0, ae; + } + function _t(v, P, B, ae) { + return v.typeParameters !== P || v.parameters !== B || v.type !== ae ? W(Ye(P, B, ae), v) : v; + } + function yt(v, P, B) { + const ae = R( + 181 + /* IndexSignature */ + ); + return ae.modifiers = La(v), ae.parameters = La(P), ae.type = B, ae.transformFlags = 1, ae.jsDoc = void 0, ae.locals = void 0, ae.nextContainer = void 0, ae.typeArguments = void 0, ae; + } + function We(v, P, B, ae) { + return v.parameters !== B || v.type !== ae || v.modifiers !== P ? W(yt(P, B, ae), v) : v; + } + function Et(v, P) { + const B = F( + 204 + /* TemplateLiteralTypeSpan */ + ); + return B.type = v, B.literal = P, B.transformFlags = 1, B; + } + function Xt(v, P, B) { + return v.type !== P || v.literal !== B ? ln(Et(P, B), v) : v; + } + function rn(v) { + return xe(v); + } + function ye(v, P, B) { + const ae = F( + 182 + /* TypePredicate */ + ); + return ae.assertsModifier = v, ae.parameterName = Zc(P), ae.type = B, ae.transformFlags = 1, ae; + } + function ft(v, P, B, ae) { + return v.assertsModifier !== P || v.parameterName !== B || v.type !== ae ? ln(ye(P, B, ae), v) : v; + } + function fe(v, P) { + const B = F( + 183 + /* TypeReference */ + ); + return B.typeName = Zc(v), B.typeArguments = P && i().parenthesizeTypeArguments(O(P)), B.transformFlags = 1, B; + } + function L(v, P, B) { + return v.typeName !== P || v.typeArguments !== B ? ln(fe(P, B), v) : v; + } + function ve(v, P, B) { + const ae = R( + 184 + /* FunctionType */ + ); + return ae.typeParameters = La(v), ae.parameters = La(P), ae.type = B, ae.transformFlags = 1, ae.modifiers = void 0, ae.jsDoc = void 0, ae.locals = void 0, ae.nextContainer = void 0, ae.typeArguments = void 0, ae; + } + function X(v, P, B, ae) { + return v.typeParameters !== P || v.parameters !== B || v.type !== ae ? lt(ve(P, B, ae), v) : v; + } + function lt(v, P) { + return v !== P && (v.modifiers = P.modifiers), W(v, P); + } + function zt(...v) { + return v.length === 4 ? de(...v) : v.length === 3 ? st(...v) : E.fail("Incorrect number of arguments specified."); + } + function de(v, P, B, ae) { + const Be = R( + 185 + /* ConstructorType */ + ); + return Be.modifiers = La(v), Be.typeParameters = La(P), Be.parameters = La(B), Be.type = ae, Be.transformFlags = 1, Be.jsDoc = void 0, Be.locals = void 0, Be.nextContainer = void 0, Be.typeArguments = void 0, Be; + } + function st(v, P, B) { + return de( + /*modifiers*/ + void 0, + v, + P, + B + ); + } + function Gt(...v) { + return v.length === 5 ? Xr(...v) : v.length === 4 ? Rr(...v) : E.fail("Incorrect number of arguments specified."); + } + function Xr(v, P, B, ae, Be) { + return v.modifiers !== P || v.typeParameters !== B || v.parameters !== ae || v.type !== Be ? W(zt(P, B, ae, Be), v) : v; + } + function Rr(v, P, B, ae) { + return Xr(v, v.modifiers, P, B, ae); + } + function Jr(v, P) { + const B = F( + 186 + /* TypeQuery */ + ); + return B.exprName = v, B.typeArguments = P && i().parenthesizeTypeArguments(P), B.transformFlags = 1, B; + } + function tt(v, P, B) { + return v.exprName !== P || v.typeArguments !== B ? ln(Jr(P, B), v) : v; + } + function ut(v) { + const P = R( + 187 + /* TypeLiteral */ + ); + return P.members = O(v), P.transformFlags = 1, P; + } + function Mt(v, P) { + return v.members !== P ? ln(ut(P), v) : v; + } + function Pt(v) { + const P = F( + 188 + /* ArrayType */ + ); + return P.elementType = i().parenthesizeNonArrayTypeOfPostfixType(v), P.transformFlags = 1, P; + } + function Zt(v, P) { + return v.elementType !== P ? ln(Pt(P), v) : v; + } + function fr(v) { + const P = F( + 189 + /* TupleType */ + ); + return P.elements = O(i().parenthesizeElementTypesOfTupleType(v)), P.transformFlags = 1, P; + } + function Vt(v, P) { + return v.elements !== P ? ln(fr(P), v) : v; + } + function ir(v, P, B, ae) { + const Be = R( + 202 + /* NamedTupleMember */ + ); + return Be.dotDotDotToken = v, Be.name = P, Be.questionToken = B, Be.type = ae, Be.transformFlags = 1, Be.jsDoc = void 0, Be; + } + function Tr(v, P, B, ae, Be) { + return v.dotDotDotToken !== P || v.name !== B || v.questionToken !== ae || v.type !== Be ? ln(ir(P, B, ae, Be), v) : v; + } + function _r(v) { + const P = F( + 190 + /* OptionalType */ + ); + return P.type = i().parenthesizeTypeOfOptionalType(v), P.transformFlags = 1, P; + } + function Ot(v, P) { + return v.type !== P ? ln(_r(P), v) : v; + } + function mi(v) { + const P = F( + 191 + /* RestType */ + ); + return P.type = v, P.transformFlags = 1, P; + } + function Js(v, P) { + return v.type !== P ? ln(mi(P), v) : v; + } + function Ms(v, P, B) { + const ae = F(v); + return ae.types = A.createNodeArray(B(P)), ae.transformFlags = 1, ae; + } + function Ns(v, P, B) { + return v.types !== P ? ln(Ms(v.kind, P, B), v) : v; + } + function kc(v) { + return Ms(192, v, i().parenthesizeConstituentTypesOfUnionType); + } + function Wo(v, P) { + return Ns(v, P, i().parenthesizeConstituentTypesOfUnionType); + } + function sc(v) { + return Ms(193, v, i().parenthesizeConstituentTypesOfIntersectionType); + } + function ri(v, P) { + return Ns(v, P, i().parenthesizeConstituentTypesOfIntersectionType); + } + function zs(v, P, B, ae) { + const Be = F( + 194 + /* ConditionalType */ + ); + return Be.checkType = i().parenthesizeCheckTypeOfConditionalType(v), Be.extendsType = i().parenthesizeExtendsTypeOfConditionalType(P), Be.trueType = B, Be.falseType = ae, Be.transformFlags = 1, Be.locals = void 0, Be.nextContainer = void 0, Be; + } + function eu(v, P, B, ae, Be) { + return v.checkType !== P || v.extendsType !== B || v.trueType !== ae || v.falseType !== Be ? ln(zs(P, B, ae, Be), v) : v; + } + function hs(v) { + const P = F( + 195 + /* InferType */ + ); + return P.typeParameter = v, P.transformFlags = 1, P; + } + function Bu(v, P) { + return v.typeParameter !== P ? ln(hs(P), v) : v; + } + function Yc(v, P) { + const B = F( + 203 + /* TemplateLiteralType */ + ); + return B.head = v, B.templateSpans = O(P), B.transformFlags = 1, B; + } + function Sl(v, P, B) { + return v.head !== P || v.templateSpans !== B ? ln(Yc(P, B), v) : v; + } + function Zi(v, P, B, ae, Be = !1) { + const Jt = F( + 205 + /* ImportType */ + ); + return Jt.argument = v, Jt.attributes = P, Jt.assertions && Jt.assertions.assertClause && Jt.attributes && (Jt.assertions.assertClause = Jt.attributes), Jt.qualifier = B, Jt.typeArguments = ae && i().parenthesizeTypeArguments(ae), Jt.isTypeOf = Be, Jt.transformFlags = 1, Jt; + } + function Gs(v, P, B, ae, Be, Jt = v.isTypeOf) { + return v.argument !== P || v.attributes !== B || v.qualifier !== ae || v.typeArguments !== Be || v.isTypeOf !== Jt ? ln(Zi(P, B, ae, Be, Jt), v) : v; + } + function Ca(v) { + const P = F( + 196 + /* ParenthesizedType */ + ); + return P.type = v, P.transformFlags = 1, P; + } + function Oi(v, P) { + return v.type !== P ? ln(Ca(P), v) : v; + } + function qt() { + const v = F( + 197 + /* ThisType */ + ); + return v.transformFlags = 1, v; + } + function Qa(v, P) { + const B = F( + 198 + /* TypeOperator */ + ); + return B.operator = v, B.type = v === 148 ? i().parenthesizeOperandOfReadonlyTypeOperator(P) : i().parenthesizeOperandOfTypeOperator(P), B.transformFlags = 1, B; + } + function Mc(v, P) { + return v.type !== P ? ln(Qa(v.operator, P), v) : v; + } + function Ol(v, P) { + const B = F( + 199 + /* IndexedAccessType */ + ); + return B.objectType = i().parenthesizeNonArrayTypeOfPostfixType(v), B.indexType = P, B.transformFlags = 1, B; + } + function Ll(v, P, B) { + return v.objectType !== P || v.indexType !== B ? ln(Ol(P, B), v) : v; + } + function To(v, P, B, ae, Be, Jt) { + const _n = R( + 200 + /* MappedType */ + ); + return _n.readonlyToken = v, _n.typeParameter = P, _n.nameType = B, _n.questionToken = ae, _n.type = Be, _n.members = Jt && O(Jt), _n.transformFlags = 1, _n.locals = void 0, _n.nextContainer = void 0, _n; + } + function ge(v, P, B, ae, Be, Jt, _n) { + return v.readonlyToken !== P || v.typeParameter !== B || v.nameType !== ae || v.questionToken !== Be || v.type !== Jt || v.members !== _n ? ln(To(P, B, ae, Be, Jt, _n), v) : v; + } + function G(v) { + const P = F( + 201 + /* LiteralType */ + ); + return P.literal = v, P.transformFlags = 1, P; + } + function rt(v, P) { + return v.literal !== P ? ln(G(P), v) : v; + } + function wt(v) { + const P = F( + 206 + /* ObjectBindingPattern */ + ); + return P.elements = O(v), P.transformFlags |= ka(P.elements) | 1024 | 524288, P.transformFlags & 32768 && (P.transformFlags |= 65664), P; + } + function Kt(v, P) { + return v.elements !== P ? ln(wt(P), v) : v; + } + function Yr(v) { + const P = F( + 207 + /* ArrayBindingPattern */ + ); + return P.elements = O(v), P.transformFlags |= ka(P.elements) | 1024 | 524288, P; + } + function Mn(v, P) { + return v.elements !== P ? ln(Yr(P), v) : v; + } + function pr(v, P, B, ae) { + const Be = R( + 208 + /* BindingElement */ + ); + return Be.dotDotDotToken = v, Be.propertyName = Zc(P), Be.name = Zc(B), Be.initializer = O2(ae), Be.transformFlags |= mn(Be.dotDotDotToken) | e1(Be.propertyName) | e1(Be.name) | mn(Be.initializer) | (Be.dotDotDotToken ? 32768 : 0) | 1024, Be.flowNode = void 0, Be; + } + function En(v, P, B, ae, Be) { + return v.propertyName !== B || v.dotDotDotToken !== P || v.name !== ae || v.initializer !== Be ? ln(pr(P, B, ae, Be), v) : v; + } + function Ji(v, P) { + const B = F( + 209 + /* ArrayLiteralExpression */ + ), ae = v && Co(v), Be = O(v, ae && ul(ae) ? !0 : void 0); + return B.elements = i().parenthesizeExpressionsOfCommaDelimitedList(Be), B.multiLine = P, B.transformFlags |= ka(B.elements), B; + } + function hi(v, P) { + return v.elements !== P ? ln(Ji(P, v.multiLine), v) : v; + } + function ba(v, P) { + const B = R( + 210 + /* ObjectLiteralExpression */ + ); + return B.properties = O(v), B.multiLine = P, B.transformFlags |= ka(B.properties), B.jsDoc = void 0, B; + } + function Mo(v, P) { + return v.properties !== P ? ln(ba(P, v.multiLine), v) : v; + } + function dc(v, P, B) { + const ae = R( + 211 + /* PropertyAccessExpression */ + ); + return ae.expression = v, ae.questionDotToken = P, ae.name = B, ae.transformFlags = mn(ae.expression) | mn(ae.questionDotToken) | (Me(ae.name) ? oN(ae.name) : mn(ae.name) | 536870912), ae.jsDoc = void 0, ae.flowNode = void 0, ae; + } + function mc(v, P) { + const B = dc( + i().parenthesizeLeftSideOfAccess( + v, + /*optionalChain*/ + !1 + ), + /*questionDotToken*/ + void 0, + Zc(P) + ); + return yD(v) && (B.transformFlags |= 384), B; + } + function Rc(v, P, B) { + return a7(v) ? ac(v, P, v.questionDotToken, Ws(B, Me)) : v.expression !== P || v.name !== B ? ln(mc(P, B), v) : v; + } + function Uo(v, P, B) { + const ae = dc( + i().parenthesizeLeftSideOfAccess( + v, + /*optionalChain*/ + !0 + ), + P, + Zc(B) + ); + return ae.flags |= 64, ae.transformFlags |= 32, ae; + } + function ac(v, P, B, ae) { + return E.assert(!!(v.flags & 64), "Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."), v.expression !== P || v.questionDotToken !== B || v.name !== ae ? ln(Uo(P, B, ae), v) : v; + } + function Vp(v, P, B) { + const ae = R( + 212 + /* ElementAccessExpression */ + ); + return ae.expression = v, ae.questionDotToken = P, ae.argumentExpression = B, ae.transformFlags |= mn(ae.expression) | mn(ae.questionDotToken) | mn(ae.argumentExpression), ae.jsDoc = void 0, ae.flowNode = void 0, ae; + } + function dl(v, P) { + const B = Vp( + i().parenthesizeLeftSideOfAccess( + v, + /*optionalChain*/ + !1 + ), + /*questionDotToken*/ + void 0, + i0(P) + ); + return yD(v) && (B.transformFlags |= 384), B; + } + function Ml(v, P, B) { + return Ej(v) ? Fe(v, P, v.questionDotToken, B) : v.expression !== P || v.argumentExpression !== B ? ln(dl(P, B), v) : v; + } + function Rl(v, P, B) { + const ae = Vp( + i().parenthesizeLeftSideOfAccess( + v, + /*optionalChain*/ + !0 + ), + P, + i0(B) + ); + return ae.flags |= 64, ae.transformFlags |= 32, ae; + } + function Fe(v, P, B, ae) { + return E.assert(!!(v.flags & 64), "Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."), v.expression !== P || v.questionDotToken !== B || v.argumentExpression !== ae ? ln(Rl(P, B, ae), v) : v; + } + function Ft(v, P, B, ae) { + const Be = R( + 213 + /* CallExpression */ + ); + return Be.expression = v, Be.questionDotToken = P, Be.typeArguments = B, Be.arguments = ae, Be.transformFlags |= mn(Be.expression) | mn(Be.questionDotToken) | ka(Be.typeArguments) | ka(Be.arguments), Be.typeArguments && (Be.transformFlags |= 1), D_(Be.expression) && (Be.transformFlags |= 16384), Be; + } + function Br(v, P, B) { + const ae = Ft( + i().parenthesizeLeftSideOfAccess( + v, + /*optionalChain*/ + !1 + ), + /*questionDotToken*/ + void 0, + La(P), + i().parenthesizeExpressionsOfCommaDelimitedList(O(B)) + ); + return vD(ae.expression) && (ae.transformFlags |= 8388608), ae; + } + function Ti(v, P, B, ae) { + return oS(v) ? to(v, P, v.questionDotToken, B, ae) : v.expression !== P || v.typeArguments !== B || v.arguments !== ae ? ln(Br(P, B, ae), v) : v; + } + function Sa(v, P, B, ae) { + const Be = Ft( + i().parenthesizeLeftSideOfAccess( + v, + /*optionalChain*/ + !0 + ), + P, + La(B), + i().parenthesizeExpressionsOfCommaDelimitedList(O(ae)) + ); + return Be.flags |= 64, Be.transformFlags |= 32, Be; + } + function to(v, P, B, ae, Be) { + return E.assert(!!(v.flags & 64), "Cannot update a CallExpression using updateCallChain. Use updateCall instead."), v.expression !== P || v.questionDotToken !== B || v.typeArguments !== ae || v.arguments !== Be ? ln(Sa(P, B, ae, Be), v) : v; + } + function Do(v, P, B) { + const ae = R( + 214 + /* NewExpression */ + ); + return ae.expression = i().parenthesizeExpressionOfNew(v), ae.typeArguments = La(P), ae.arguments = B ? i().parenthesizeExpressionsOfCommaDelimitedList(B) : void 0, ae.transformFlags |= mn(ae.expression) | ka(ae.typeArguments) | ka(ae.arguments) | 32, ae.typeArguments && (ae.transformFlags |= 1), ae; + } + function ml(v, P, B, ae) { + return v.expression !== P || v.typeArguments !== B || v.arguments !== ae ? ln(Do(P, B, ae), v) : v; + } + function gc(v, P, B) { + const ae = F( + 215 + /* TaggedTemplateExpression */ + ); + return ae.tag = i().parenthesizeLeftSideOfAccess( + v, + /*optionalChain*/ + !1 + ), ae.typeArguments = La(P), ae.template = B, ae.transformFlags |= mn(ae.tag) | ka(ae.typeArguments) | mn(ae.template) | 1024, ae.typeArguments && (ae.transformFlags |= 1), LB(ae.template) && (ae.transformFlags |= 128), ae; + } + function Va(v, P, B, ae) { + return v.tag !== P || v.typeArguments !== B || v.template !== ae ? ln(gc(P, B, ae), v) : v; + } + function mo(v, P) { + const B = F( + 216 + /* TypeAssertionExpression */ + ); + return B.expression = i().parenthesizeOperandOfPrefixUnary(P), B.type = v, B.transformFlags |= mn(B.expression) | mn(B.type) | 1, B; + } + function df(v, P, B) { + return v.type !== P || v.expression !== B ? ln(mo(P, B), v) : v; + } + function Rf(v) { + const P = F( + 217 + /* ParenthesizedExpression */ + ); + return P.expression = v, P.transformFlags = mn(P.expression), P.jsDoc = void 0, P; + } + function F_(v, P) { + return v.expression !== P ? ln(Rf(P), v) : v; + } + function mf(v, P, B, ae, Be, Jt, _n) { + const es = R( + 218 + /* FunctionExpression */ + ); + es.modifiers = La(v), es.asteriskToken = P, es.name = Zc(B), es.typeParameters = La(ae), es.parameters = O(Be), es.type = Jt, es.body = _n; + const io = lm(es.modifiers) & 1024, vp = !!es.asteriskToken, vg = io && vp; + return es.transformFlags = ka(es.modifiers) | mn(es.asteriskToken) | e1(es.name) | ka(es.typeParameters) | ka(es.parameters) | mn(es.type) | mn(es.body) & -67108865 | (vg ? 128 : io ? 256 : vp ? 2048 : 0) | (es.typeParameters || es.type ? 1 : 0) | 4194304, es.typeArguments = void 0, es.jsDoc = void 0, es.locals = void 0, es.nextContainer = void 0, es.flowNode = void 0, es.endFlowNode = void 0, es.returnFlowNode = void 0, es; + } + function jf(v, P, B, ae, Be, Jt, _n, es) { + return v.name !== ae || v.modifiers !== P || v.asteriskToken !== B || v.typeParameters !== Be || v.parameters !== Jt || v.type !== _n || v.body !== es ? W(mf(P, B, ae, Be, Jt, _n, es), v) : v; + } + function fp(v, P, B, ae, Be, Jt) { + const _n = R( + 219 + /* ArrowFunction */ + ); + _n.modifiers = La(v), _n.typeParameters = La(P), _n.parameters = O(B), _n.type = ae, _n.equalsGreaterThanToken = Be ?? xe( + 39 + /* EqualsGreaterThanToken */ + ), _n.body = i().parenthesizeConciseBodyOfArrowFunction(Jt); + const es = lm(_n.modifiers) & 1024; + return _n.transformFlags = ka(_n.modifiers) | ka(_n.typeParameters) | ka(_n.parameters) | mn(_n.type) | mn(_n.equalsGreaterThanToken) | mn(_n.body) & -67108865 | (_n.typeParameters || _n.type ? 1 : 0) | (es ? 16640 : 0) | 1024, _n.typeArguments = void 0, _n.jsDoc = void 0, _n.locals = void 0, _n.nextContainer = void 0, _n.flowNode = void 0, _n.endFlowNode = void 0, _n.returnFlowNode = void 0, _n; + } + function th(v, P, B, ae, Be, Jt, _n) { + return v.modifiers !== P || v.typeParameters !== B || v.parameters !== ae || v.type !== Be || v.equalsGreaterThanToken !== Jt || v.body !== _n ? W(fp(P, B, ae, Be, Jt, _n), v) : v; + } + function od(v) { + const P = F( + 220 + /* DeleteExpression */ + ); + return P.expression = i().parenthesizeOperandOfPrefixUnary(v), P.transformFlags |= mn(P.expression), P; + } + function t_(v, P) { + return v.expression !== P ? ln(od(P), v) : v; + } + function gf(v) { + const P = F( + 221 + /* TypeOfExpression */ + ); + return P.expression = i().parenthesizeOperandOfPrefixUnary(v), P.transformFlags |= mn(P.expression), P; + } + function y_(v, P) { + return v.expression !== P ? ln(gf(P), v) : v; + } + function cd(v) { + const P = F( + 222 + /* VoidExpression */ + ); + return P.expression = i().parenthesizeOperandOfPrefixUnary(v), P.transformFlags |= mn(P.expression), P; + } + function hf(v, P) { + return v.expression !== P ? ln(cd(P), v) : v; + } + function ug(v) { + const P = F( + 223 + /* AwaitExpression */ + ); + return P.expression = i().parenthesizeOperandOfPrefixUnary(v), P.transformFlags |= mn(P.expression) | 256 | 128 | 2097152, P; + } + function Q(v, P) { + return v.expression !== P ? ln(ug(P), v) : v; + } + function et(v, P) { + const B = F( + 224 + /* PrefixUnaryExpression */ + ); + return B.operator = v, B.operand = i().parenthesizeOperandOfPrefixUnary(P), B.transformFlags |= mn(B.operand), (v === 46 || v === 47) && Me(B.operand) && !Fo(B.operand) && !Rh(B.operand) && (B.transformFlags |= 268435456), B; + } + function Rt(v, P) { + return v.operand !== P ? ln(et(v.operator, P), v) : v; + } + function jt(v, P) { + const B = F( + 225 + /* PostfixUnaryExpression */ + ); + return B.operator = P, B.operand = i().parenthesizeOperandOfPostfixUnary(v), B.transformFlags |= mn(B.operand), Me(B.operand) && !Fo(B.operand) && !Rh(B.operand) && (B.transformFlags |= 268435456), B; + } + function Er(v, P) { + return v.operand !== P ? ln(jt(P, v.operator), v) : v; + } + function Hr(v, P, B) { + const ae = R( + 226 + /* BinaryExpression */ + ), Be = Mw(P), Jt = Be.kind; + return ae.left = i().parenthesizeLeftSideOfBinary(Jt, v), ae.operatorToken = Be, ae.right = i().parenthesizeRightSideOfBinary(Jt, ae.left, B), ae.transformFlags |= mn(ae.left) | mn(ae.operatorToken) | mn(ae.right), Jt === 61 ? ae.transformFlags |= 32 : Jt === 64 ? oa(ae.left) ? ae.transformFlags |= 5248 | xn(ae.left) : Ql(ae.left) && (ae.transformFlags |= 5120 | xn(ae.left)) : Jt === 43 || Jt === 68 ? ae.transformFlags |= 512 : q4(Jt) && (ae.transformFlags |= 16), Jt === 103 && Ni(ae.left) && (ae.transformFlags |= 536870912), ae.jsDoc = void 0, ae; + } + function xn(v) { + return DN(v) ? 65536 : 0; + } + function ii(v, P, B, ae) { + return v.left !== P || v.operatorToken !== B || v.right !== ae ? ln(Hr(P, B, ae), v) : v; + } + function j(v, P, B, ae, Be) { + const Jt = F( + 227 + /* ConditionalExpression */ + ); + return Jt.condition = i().parenthesizeConditionOfConditionalExpression(v), Jt.questionToken = P ?? xe( + 58 + /* QuestionToken */ + ), Jt.whenTrue = i().parenthesizeBranchOfConditionalExpression(B), Jt.colonToken = ae ?? xe( + 59 + /* ColonToken */ + ), Jt.whenFalse = i().parenthesizeBranchOfConditionalExpression(Be), Jt.transformFlags |= mn(Jt.condition) | mn(Jt.questionToken) | mn(Jt.whenTrue) | mn(Jt.colonToken) | mn(Jt.whenFalse), Jt; + } + function Ne(v, P, B, ae, Be, Jt) { + return v.condition !== P || v.questionToken !== B || v.whenTrue !== ae || v.colonToken !== Be || v.whenFalse !== Jt ? ln(j(P, B, ae, Be, Jt), v) : v; + } + function Tt(v, P) { + const B = F( + 228 + /* TemplateExpression */ + ); + return B.head = v, B.templateSpans = O(P), B.transformFlags |= mn(B.head) | ka(B.templateSpans) | 1024, B; + } + function Ar(v, P, B) { + return v.head !== P || v.templateSpans !== B ? ln(Tt(P, B), v) : v; + } + function ei(v, P, B, ae = 0) { + E.assert(!(ae & -7177), "Unsupported template flags."); + let Be; + if (B !== void 0 && B !== P && (Be = i9e(v, B), typeof Be == "object")) + return E.fail("Invalid raw text"); + if (P === void 0) { + if (Be === void 0) + return E.fail("Arguments 'text' and 'rawText' may not both be undefined."); + P = Be; + } else Be !== void 0 && E.assert(P === Be, "Expected argument 'text' to be the normalized (i.e. 'cooked') version of argument 'rawText'."); + return P; + } + function Ss(v) { + let P = 1024; + return v && (P |= 128), P; + } + function _s(v, P, B, ae) { + const Be = Oe(v); + return Be.text = P, Be.rawText = B, Be.templateFlags = ae & 7176, Be.transformFlags = Ss(Be.templateFlags), Be; + } + function ps(v, P, B, ae) { + const Be = R(v); + return Be.text = P, Be.rawText = B, Be.templateFlags = ae & 7176, Be.transformFlags = Ss(Be.templateFlags), Be; + } + function ja(v, P, B, ae) { + return v === 15 ? ps(v, P, B, ae) : _s(v, P, B, ae); + } + function xa(v, P, B) { + return v = ei(16, v, P, B), ja(16, v, P, B); + } + function Ro(v, P, B) { + return v = ei(16, v, P, B), ja(17, v, P, B); + } + function O_(v, P, B) { + return v = ei(16, v, P, B), ja(18, v, P, B); + } + function Ld(v, P, B) { + return v = ei(16, v, P, B), ps(15, v, P, B); + } + function km(v, P) { + E.assert(!v || !!P, "A `YieldExpression` with an asteriskToken must have an expression."); + const B = F( + 229 + /* YieldExpression */ + ); + return B.expression = P && i().parenthesizeExpressionForDisallowedComma(P), B.asteriskToken = v, B.transformFlags |= mn(B.expression) | mn(B.asteriskToken) | 1024 | 128 | 1048576, B; + } + function Cm(v, P, B) { + return v.expression !== B || v.asteriskToken !== P ? ln(km(P, B), v) : v; + } + function G0(v) { + const P = F( + 230 + /* SpreadElement */ + ); + return P.expression = i().parenthesizeExpressionForDisallowedComma(v), P.transformFlags |= mn(P.expression) | 1024 | 32768, P; + } + function rh(v, P) { + return v.expression !== P ? ln(G0(P), v) : v; + } + function pp(v, P, B, ae, Be) { + const Jt = R( + 231 + /* ClassExpression */ + ); + return Jt.modifiers = La(v), Jt.name = Zc(P), Jt.typeParameters = La(B), Jt.heritageClauses = La(ae), Jt.members = O(Be), Jt.transformFlags |= ka(Jt.modifiers) | e1(Jt.name) | ka(Jt.typeParameters) | ka(Jt.heritageClauses) | ka(Jt.members) | (Jt.typeParameters ? 1 : 0) | 1024, Jt.jsDoc = void 0, Jt; + } + function ld(v, P, B, ae, Be, Jt) { + return v.modifiers !== P || v.name !== B || v.typeParameters !== ae || v.heritageClauses !== Be || v.members !== Jt ? ln(pp(P, B, ae, Be, Jt), v) : v; + } + function xo() { + return F( + 232 + /* OmittedExpression */ + ); + } + function yf(v, P) { + const B = F( + 233 + /* ExpressionWithTypeArguments */ + ); + return B.expression = i().parenthesizeLeftSideOfAccess( + v, + /*optionalChain*/ + !1 + ), B.typeArguments = P && i().parenthesizeTypeArguments(P), B.transformFlags |= mn(B.expression) | ka(B.typeArguments) | 1024, B; + } + function qh(v, P, B) { + return v.expression !== P || v.typeArguments !== B ? ln(yf(P, B), v) : v; + } + function v_(v, P) { + const B = F( + 234 + /* AsExpression */ + ); + return B.expression = v, B.type = P, B.transformFlags |= mn(B.expression) | mn(B.type) | 1, B; + } + function nh(v, P, B) { + return v.expression !== P || v.type !== B ? ln(v_(P, B), v) : v; + } + function _g(v) { + const P = F( + 235 + /* NonNullExpression */ + ); + return P.expression = i().parenthesizeLeftSideOfAccess( + v, + /*optionalChain*/ + !1 + ), P.transformFlags |= mn(P.expression) | 1, P; + } + function Md(v, P) { + return c7(v) ? dp(v, P) : v.expression !== P ? ln(_g(P), v) : v; + } + function Em(v, P) { + const B = F( + 238 + /* SatisfiesExpression */ + ); + return B.expression = v, B.type = P, B.transformFlags |= mn(B.expression) | mn(B.type) | 1, B; + } + function $0(v, P, B) { + return v.expression !== P || v.type !== B ? ln(Em(P, B), v) : v; + } + function m1(v) { + const P = F( + 235 + /* NonNullExpression */ + ); + return P.flags |= 64, P.expression = i().parenthesizeLeftSideOfAccess( + v, + /*optionalChain*/ + !0 + ), P.transformFlags |= mn(P.expression) | 1, P; + } + function dp(v, P) { + return E.assert(!!(v.flags & 64), "Cannot update a NonNullExpression using updateNonNullChain. Use updateNonNullExpression instead."), v.expression !== P ? ln(m1(P), v) : v; + } + function g1(v, P) { + const B = F( + 236 + /* MetaProperty */ + ); + switch (B.keywordToken = v, B.name = P, B.transformFlags |= mn(B.name), v) { + case 105: + B.transformFlags |= 1024; + break; + case 102: + B.transformFlags |= 32; + break; + default: + return E.assertNever(v); + } + return B.flowNode = void 0, B; + } + function mp(v, P) { + return v.name !== P ? ln(g1(v.keywordToken, P), v) : v; + } + function Rd(v, P) { + const B = F( + 239 + /* TemplateSpan */ + ); + return B.expression = v, B.literal = P, B.transformFlags |= mn(B.expression) | mn(B.literal) | 1024, B; + } + function Hh(v, P, B) { + return v.expression !== P || v.literal !== B ? ln(Rd(P, B), v) : v; + } + function h1() { + const v = F( + 240 + /* SemicolonClassElement */ + ); + return v.transformFlags |= 1024, v; + } + function ud(v, P) { + const B = F( + 241 + /* Block */ + ); + return B.statements = O(v), B.multiLine = P, B.transformFlags |= ka(B.statements), B.jsDoc = void 0, B.locals = void 0, B.nextContainer = void 0, B; + } + function Rv(v, P) { + return v.statements !== P ? ln(ud(P, v.multiLine), v) : v; + } + function y1(v, P) { + const B = F( + 243 + /* VariableStatement */ + ); + return B.modifiers = La(v), B.declarationList = os(P) ? Y0(P) : P, B.transformFlags |= ka(B.modifiers) | mn(B.declarationList), lm(B.modifiers) & 128 && (B.transformFlags = 1), B.jsDoc = void 0, B.flowNode = void 0, B; + } + function X0(v, P, B) { + return v.modifiers !== P || v.declarationList !== B ? ln(y1(P, B), v) : v; + } + function Le() { + const v = F( + 242 + /* EmptyStatement */ + ); + return v.jsDoc = void 0, v; + } + function Ge(v) { + const P = F( + 244 + /* ExpressionStatement */ + ); + return P.expression = i().parenthesizeExpressionOfExpressionStatement(v), P.transformFlags |= mn(P.expression), P.jsDoc = void 0, P.flowNode = void 0, P; + } + function St(v, P) { + return v.expression !== P ? ln(Ge(P), v) : v; + } + function rr(v, P, B) { + const ae = F( + 245 + /* IfStatement */ + ); + return ae.expression = v, ae.thenStatement = Sf(P), ae.elseStatement = Sf(B), ae.transformFlags |= mn(ae.expression) | mn(ae.thenStatement) | mn(ae.elseStatement), ae.jsDoc = void 0, ae.flowNode = void 0, ae; + } + function vr(v, P, B, ae) { + return v.expression !== P || v.thenStatement !== B || v.elseStatement !== ae ? ln(rr(P, B, ae), v) : v; + } + function Gr(v, P) { + const B = F( + 246 + /* DoStatement */ + ); + return B.statement = Sf(v), B.expression = P, B.transformFlags |= mn(B.statement) | mn(B.expression), B.jsDoc = void 0, B.flowNode = void 0, B; + } + function Dr(v, P, B) { + return v.statement !== P || v.expression !== B ? ln(Gr(P, B), v) : v; + } + function cn(v, P) { + const B = F( + 247 + /* WhileStatement */ + ); + return B.expression = v, B.statement = Sf(P), B.transformFlags |= mn(B.expression) | mn(B.statement), B.jsDoc = void 0, B.flowNode = void 0, B; + } + function ai(v, P, B) { + return v.expression !== P || v.statement !== B ? ln(cn(P, B), v) : v; + } + function hn(v, P, B, ae) { + const Be = F( + 248 + /* ForStatement */ + ); + return Be.initializer = v, Be.condition = P, Be.incrementor = B, Be.statement = Sf(ae), Be.transformFlags |= mn(Be.initializer) | mn(Be.condition) | mn(Be.incrementor) | mn(Be.statement), Be.jsDoc = void 0, Be.locals = void 0, Be.nextContainer = void 0, Be.flowNode = void 0, Be; + } + function ji(v, P, B, ae, Be) { + return v.initializer !== P || v.condition !== B || v.incrementor !== ae || v.statement !== Be ? ln(hn(P, B, ae, Be), v) : v; + } + function Gn(v, P, B) { + const ae = F( + 249 + /* ForInStatement */ + ); + return ae.initializer = v, ae.expression = P, ae.statement = Sf(B), ae.transformFlags |= mn(ae.initializer) | mn(ae.expression) | mn(ae.statement), ae.jsDoc = void 0, ae.locals = void 0, ae.nextContainer = void 0, ae.flowNode = void 0, ae; + } + function ta(v, P, B, ae) { + return v.initializer !== P || v.expression !== B || v.statement !== ae ? ln(Gn(P, B, ae), v) : v; + } + function Cc(v, P, B, ae) { + const Be = F( + 250 + /* ForOfStatement */ + ); + return Be.awaitModifier = v, Be.initializer = P, Be.expression = i().parenthesizeExpressionForDisallowedComma(B), Be.statement = Sf(ae), Be.transformFlags |= mn(Be.awaitModifier) | mn(Be.initializer) | mn(Be.expression) | mn(Be.statement) | 1024, v && (Be.transformFlags |= 128), Be.jsDoc = void 0, Be.locals = void 0, Be.nextContainer = void 0, Be.flowNode = void 0, Be; + } + function r_(v, P, B, ae, Be) { + return v.awaitModifier !== P || v.initializer !== B || v.expression !== ae || v.statement !== Be ? ln(Cc(P, B, ae, Be), v) : v; + } + function vf(v) { + const P = F( + 251 + /* ContinueStatement */ + ); + return P.label = Zc(v), P.transformFlags |= mn(P.label) | 4194304, P.jsDoc = void 0, P.flowNode = void 0, P; + } + function Bf(v, P) { + return v.label !== P ? ln(vf(P), v) : v; + } + function n_(v) { + const P = F( + 252 + /* BreakStatement */ + ); + return P.label = Zc(v), P.transformFlags |= mn(P.label) | 4194304, P.jsDoc = void 0, P.flowNode = void 0, P; + } + function i_(v, P) { + return v.label !== P ? ln(n_(P), v) : v; + } + function jv(v) { + const P = F( + 253 + /* ReturnStatement */ + ); + return P.expression = v, P.transformFlags |= mn(P.expression) | 128 | 4194304, P.jsDoc = void 0, P.flowNode = void 0, P; + } + function Bv(v, P) { + return v.expression !== P ? ln(jv(P), v) : v; + } + function fg(v, P) { + const B = F( + 254 + /* WithStatement */ + ); + return B.expression = v, B.statement = Sf(P), B.transformFlags |= mn(B.expression) | mn(B.statement), B.jsDoc = void 0, B.flowNode = void 0, B; + } + function Q0(v, P, B) { + return v.expression !== P || v.statement !== B ? ln(fg(P, B), v) : v; + } + function Gh(v, P) { + const B = F( + 255 + /* SwitchStatement */ + ); + return B.expression = i().parenthesizeExpressionForDisallowedComma(v), B.caseBlock = P, B.transformFlags |= mn(B.expression) | mn(B.caseBlock), B.jsDoc = void 0, B.flowNode = void 0, B.possiblyExhaustive = !1, B; + } + function jd(v, P, B) { + return v.expression !== P || v.caseBlock !== B ? ln(Gh(P, B), v) : v; + } + function $h(v, P) { + const B = F( + 256 + /* LabeledStatement */ + ); + return B.label = Zc(v), B.statement = Sf(P), B.transformFlags |= mn(B.label) | mn(B.statement), B.jsDoc = void 0, B.flowNode = void 0, B; + } + function v1(v, P, B) { + return v.label !== P || v.statement !== B ? ln($h(P, B), v) : v; + } + function Xh(v) { + const P = F( + 257 + /* ThrowStatement */ + ); + return P.expression = v, P.transformFlags |= mn(P.expression), P.jsDoc = void 0, P.flowNode = void 0, P; + } + function nT(v, P) { + return v.expression !== P ? ln(Xh(P), v) : v; + } + function b2(v, P, B) { + const ae = F( + 258 + /* TryStatement */ + ); + return ae.tryBlock = v, ae.catchClause = P, ae.finallyBlock = B, ae.transformFlags |= mn(ae.tryBlock) | mn(ae.catchClause) | mn(ae.finallyBlock), ae.jsDoc = void 0, ae.flowNode = void 0, ae; + } + function Jv(v, P, B, ae) { + return v.tryBlock !== P || v.catchClause !== B || v.finallyBlock !== ae ? ln(b2(P, B, ae), v) : v; + } + function Pa() { + const v = F( + 259 + /* DebuggerStatement */ + ); + return v.jsDoc = void 0, v.flowNode = void 0, v; + } + function b1(v, P, B, ae) { + const Be = R( + 260 + /* VariableDeclaration */ + ); + return Be.name = Zc(v), Be.exclamationToken = P, Be.type = B, Be.initializer = O2(ae), Be.transformFlags |= e1(Be.name) | mn(Be.initializer) | (Be.exclamationToken ?? Be.type ? 1 : 0), Be.jsDoc = void 0, Be; + } + function eE(v, P, B, ae, Be) { + return v.name !== P || v.type !== ae || v.exclamationToken !== B || v.initializer !== Be ? ln(b1(P, B, ae, Be), v) : v; + } + function Y0(v, P = 0) { + const B = F( + 261 + /* VariableDeclarationList */ + ); + return B.flags |= P & 7, B.declarations = O(v), B.transformFlags |= ka(B.declarations) | 4194304, P & 7 && (B.transformFlags |= 263168), P & 4 && (B.transformFlags |= 4), B; + } + function Z0(v, P) { + return v.declarations !== P ? ln(Y0(P, v.flags), v) : v; + } + function pg(v, P, B, ae, Be, Jt, _n) { + const es = R( + 262 + /* FunctionDeclaration */ + ); + if (es.modifiers = La(v), es.asteriskToken = P, es.name = Zc(B), es.typeParameters = La(ae), es.parameters = O(Be), es.type = Jt, es.body = _n, !es.body || lm(es.modifiers) & 128) + es.transformFlags = 1; + else { + const io = lm(es.modifiers) & 1024, vp = !!es.asteriskToken, vg = io && vp; + es.transformFlags = ka(es.modifiers) | mn(es.asteriskToken) | e1(es.name) | ka(es.typeParameters) | ka(es.parameters) | mn(es.type) | mn(es.body) & -67108865 | (vg ? 128 : io ? 256 : vp ? 2048 : 0) | (es.typeParameters || es.type ? 1 : 0) | 4194304; + } + return es.typeArguments = void 0, es.jsDoc = void 0, es.locals = void 0, es.nextContainer = void 0, es.endFlowNode = void 0, es.returnFlowNode = void 0, es; + } + function Jf(v, P, B, ae, Be, Jt, _n, es) { + return v.modifiers !== P || v.asteriskToken !== B || v.name !== ae || v.typeParameters !== Be || v.parameters !== Jt || v.type !== _n || v.body !== es ? bf(pg(P, B, ae, Be, Jt, _n, es), v) : v; + } + function bf(v, P) { + return v !== P && v.modifiers === P.modifiers && (v.modifiers = P.modifiers), W(v, P); + } + function L_(v, P, B, ae, Be) { + const Jt = R( + 263 + /* ClassDeclaration */ + ); + return Jt.modifiers = La(v), Jt.name = Zc(P), Jt.typeParameters = La(B), Jt.heritageClauses = La(ae), Jt.members = O(Be), lm(Jt.modifiers) & 128 ? Jt.transformFlags = 1 : (Jt.transformFlags |= ka(Jt.modifiers) | e1(Jt.name) | ka(Jt.typeParameters) | ka(Jt.heritageClauses) | ka(Jt.members) | (Jt.typeParameters ? 1 : 0) | 1024, Jt.transformFlags & 8192 && (Jt.transformFlags |= 1)), Jt.jsDoc = void 0, Jt; + } + function b_(v, P, B, ae, Be, Jt) { + return v.modifiers !== P || v.name !== B || v.typeParameters !== ae || v.heritageClauses !== Be || v.members !== Jt ? ln(L_(P, B, ae, Be, Jt), v) : v; + } + function zv(v, P, B, ae, Be) { + const Jt = R( + 264 + /* InterfaceDeclaration */ + ); + return Jt.modifiers = La(v), Jt.name = Zc(P), Jt.typeParameters = La(B), Jt.heritageClauses = La(ae), Jt.members = O(Be), Jt.transformFlags = 1, Jt.jsDoc = void 0, Jt; + } + function tE(v, P, B, ae, Be, Jt) { + return v.modifiers !== P || v.name !== B || v.typeParameters !== ae || v.heritageClauses !== Be || v.members !== Jt ? ln(zv(P, B, ae, Be, Jt), v) : v; + } + function Tl(v, P, B, ae) { + const Be = R( + 265 + /* TypeAliasDeclaration */ + ); + return Be.modifiers = La(v), Be.name = Zc(P), Be.typeParameters = La(B), Be.type = ae, Be.transformFlags = 1, Be.jsDoc = void 0, Be.locals = void 0, Be.nextContainer = void 0, Be; + } + function Bd(v, P, B, ae, Be) { + return v.modifiers !== P || v.name !== B || v.typeParameters !== ae || v.type !== Be ? ln(Tl(P, B, ae, Be), v) : v; + } + function K0(v, P, B) { + const ae = R( + 266 + /* EnumDeclaration */ + ); + return ae.modifiers = La(v), ae.name = Zc(P), ae.members = O(B), ae.transformFlags |= ka(ae.modifiers) | mn(ae.name) | ka(ae.members) | 1, ae.transformFlags &= -67108865, ae.jsDoc = void 0, ae; + } + function Dm(v, P, B, ae) { + return v.modifiers !== P || v.name !== B || v.members !== ae ? ln(K0(P, B, ae), v) : v; + } + function Ck(v, P, B, ae = 0) { + const Be = R( + 267 + /* ModuleDeclaration */ + ); + return Be.modifiers = La(v), Be.flags |= ae & 2088, Be.name = P, Be.body = B, lm(Be.modifiers) & 128 ? Be.transformFlags = 1 : Be.transformFlags |= ka(Be.modifiers) | mn(Be.name) | mn(Be.body) | 1, Be.transformFlags &= -67108865, Be.jsDoc = void 0, Be.locals = void 0, Be.nextContainer = void 0, Be; + } + function tu(v, P, B, ae) { + return v.modifiers !== P || v.name !== B || v.body !== ae ? ln(Ck(P, B, ae, v.flags), v) : v; + } + function ih(v) { + const P = F( + 268 + /* ModuleBlock */ + ); + return P.statements = O(v), P.transformFlags |= ka(P.statements), P.jsDoc = void 0, P; + } + function zf(v, P) { + return v.statements !== P ? ln(ih(P), v) : v; + } + function qp(v) { + const P = F( + 269 + /* CaseBlock */ + ); + return P.clauses = O(v), P.transformFlags |= ka(P.clauses), P.locals = void 0, P.nextContainer = void 0, P; + } + function wm(v, P) { + return v.clauses !== P ? ln(qp(P), v) : v; + } + function je(v) { + const P = R( + 270 + /* NamespaceExportDeclaration */ + ); + return P.name = Zc(v), P.transformFlags |= oN(P.name) | 1, P.modifiers = void 0, P.jsDoc = void 0, P; + } + function Qh(v, P) { + return v.name !== P ? dg(je(P), v) : v; + } + function dg(v, P) { + return v !== P && (v.modifiers = P.modifiers), ln(v, P); + } + function S1(v, P, B, ae) { + const Be = R( + 271 + /* ImportEqualsDeclaration */ + ); + return Be.modifiers = La(v), Be.name = Zc(B), Be.isTypeOnly = P, Be.moduleReference = ae, Be.transformFlags |= ka(Be.modifiers) | oN(Be.name) | mn(Be.moduleReference), Mh(Be.moduleReference) || (Be.transformFlags |= 1), Be.transformFlags &= -67108865, Be.jsDoc = void 0, Be; + } + function iT(v, P, B, ae, Be) { + return v.modifiers !== P || v.isTypeOnly !== B || v.name !== ae || v.moduleReference !== Be ? ln(S1(P, B, ae, Be), v) : v; + } + function Yh(v, P, B, ae) { + const Be = F( + 272 + /* ImportDeclaration */ + ); + return Be.modifiers = La(v), Be.importClause = P, Be.moduleSpecifier = B, Be.attributes = Be.assertClause = ae, Be.transformFlags |= mn(Be.importClause) | mn(Be.moduleSpecifier), Be.transformFlags &= -67108865, Be.jsDoc = void 0, Be; + } + function T1(v, P, B, ae, Be) { + return v.modifiers !== P || v.importClause !== B || v.moduleSpecifier !== ae || v.attributes !== Be ? ln(Yh(P, B, ae, Be), v) : v; + } + function Zh(v, P, B) { + const ae = R( + 273 + /* ImportClause */ + ); + return ae.isTypeOnly = v, ae.name = P, ae.namedBindings = B, ae.transformFlags |= mn(ae.name) | mn(ae.namedBindings), v && (ae.transformFlags |= 1), ae.transformFlags &= -67108865, ae; + } + function sT(v, P, B, ae) { + return v.isTypeOnly !== P || v.name !== B || v.namedBindings !== ae ? ln(Zh(P, B, ae), v) : v; + } + function ca(v, P) { + const B = F( + 300 + /* AssertClause */ + ); + return B.elements = O(v), B.multiLine = P, B.token = 132, B.transformFlags |= 4, B; + } + function _d(v, P, B) { + return v.elements !== P || v.multiLine !== B ? ln(ca(P, B), v) : v; + } + function ey(v, P) { + const B = F( + 301 + /* AssertEntry */ + ); + return B.name = v, B.value = P, B.transformFlags |= 4, B; + } + function sf(v, P, B) { + return v.name !== P || v.value !== B ? ln(ey(P, B), v) : v; + } + function Kh(v, P) { + const B = F( + 302 + /* ImportTypeAssertionContainer */ + ); + return B.assertClause = v, B.multiLine = P, B; + } + function mg(v, P, B) { + return v.assertClause !== P || v.multiLine !== B ? ln(Kh(P, B), v) : v; + } + function Pm(v, P, B) { + const ae = F( + 300 + /* ImportAttributes */ + ); + return ae.token = B ?? 118, ae.elements = O(v), ae.multiLine = P, ae.transformFlags |= 4, ae; + } + function Wv(v, P, B) { + return v.elements !== P || v.multiLine !== B ? ln(Pm(P, B, v.token), v) : v; + } + function ty(v, P) { + const B = F( + 301 + /* ImportAttribute */ + ); + return B.name = v, B.value = P, B.transformFlags |= 4, B; + } + function Uv(v, P, B) { + return v.name !== P || v.value !== B ? ln(ty(P, B), v) : v; + } + function Nm(v) { + const P = R( + 274 + /* NamespaceImport */ + ); + return P.name = v, P.transformFlags |= mn(P.name), P.transformFlags &= -67108865, P; + } + function e0(v, P) { + return v.name !== P ? ln(Nm(P), v) : v; + } + function rE(v) { + const P = R( + 280 + /* NamespaceExport */ + ); + return P.name = v, P.transformFlags |= mn(P.name) | 32, P.transformFlags &= -67108865, P; + } + function Ci(v, P) { + return v.name !== P ? ln(rE(P), v) : v; + } + function yn(v) { + const P = F( + 275 + /* NamedImports */ + ); + return P.elements = O(v), P.transformFlags |= ka(P.elements), P.transformFlags &= -67108865, P; + } + function fu(v, P) { + return v.elements !== P ? ln(yn(P), v) : v; + } + function ry(v, P, B) { + const ae = R( + 276 + /* ImportSpecifier */ + ); + return ae.isTypeOnly = v, ae.propertyName = P, ae.name = B, ae.transformFlags |= mn(ae.propertyName) | mn(ae.name), ae.transformFlags &= -67108865, ae; + } + function ny(v, P, B, ae) { + return v.isTypeOnly !== P || v.propertyName !== B || v.name !== ae ? ln(ry(P, B, ae), v) : v; + } + function S2(v, P, B) { + const ae = R( + 277 + /* ExportAssignment */ + ); + return ae.modifiers = La(v), ae.isExportEquals = P, ae.expression = P ? i().parenthesizeRightSideOfBinary( + 64, + /*leftSide*/ + void 0, + B + ) : i().parenthesizeExpressionOfExportDefault(B), ae.transformFlags |= ka(ae.modifiers) | mn(ae.expression), ae.transformFlags &= -67108865, ae.jsDoc = void 0, ae; + } + function x1(v, P, B) { + return v.modifiers !== P || v.expression !== B ? ln(S2(P, v.isExportEquals, B), v) : v; + } + function go(v, P, B, ae, Be) { + const Jt = R( + 278 + /* ExportDeclaration */ + ); + return Jt.modifiers = La(v), Jt.isTypeOnly = P, Jt.exportClause = B, Jt.moduleSpecifier = ae, Jt.attributes = Jt.assertClause = Be, Jt.transformFlags |= ka(Jt.modifiers) | mn(Jt.exportClause) | mn(Jt.moduleSpecifier), Jt.transformFlags &= -67108865, Jt.jsDoc = void 0, Jt; + } + function T2(v, P, B, ae, Be, Jt) { + return v.modifiers !== P || v.isTypeOnly !== B || v.exportClause !== ae || v.moduleSpecifier !== Be || v.attributes !== Jt ? Vv(go(P, B, ae, Be, Jt), v) : v; + } + function Vv(v, P) { + return v !== P && v.modifiers === P.modifiers && (v.modifiers = P.modifiers), ln(v, P); + } + function k1(v) { + const P = F( + 279 + /* NamedExports */ + ); + return P.elements = O(v), P.transformFlags |= ka(P.elements), P.transformFlags &= -67108865, P; + } + function Hp(v, P) { + return v.elements !== P ? ln(k1(P), v) : v; + } + function x2(v, P, B) { + const ae = F( + 281 + /* ExportSpecifier */ + ); + return ae.isTypeOnly = v, ae.propertyName = Zc(P), ae.name = Zc(B), ae.transformFlags |= mn(ae.propertyName) | mn(ae.name), ae.transformFlags &= -67108865, ae.jsDoc = void 0, ae; + } + function nE(v, P, B, ae) { + return v.isTypeOnly !== P || v.propertyName !== B || v.name !== ae ? ln(x2(P, B, ae), v) : v; + } + function iE() { + const v = R( + 282 + /* MissingDeclaration */ + ); + return v.jsDoc = void 0, v; + } + function gn(v) { + const P = F( + 283 + /* ExternalModuleReference */ + ); + return P.expression = v, P.transformFlags |= mn(P.expression), P.transformFlags &= -67108865, P; + } + function Ju(v, P) { + return v.expression !== P ? ln(gn(P), v) : v; + } + function cs(v) { + return F(v); + } + function iy(v, P, B = !1) { + const ae = Ek( + v, + B ? P && i().parenthesizeNonArrayTypeOfPostfixType(P) : P + ); + return ae.postfix = B, ae; + } + function Ek(v, P) { + const B = F(v); + return B.type = P, B; + } + function qv(v, P, B) { + return P.type !== B ? ln(iy(v, B, P.postfix), P) : P; + } + function un(v, P, B) { + return P.type !== B ? ln(Ek(v, B), P) : P; + } + function sE(v, P) { + const B = R( + 317 + /* JSDocFunctionType */ + ); + return B.parameters = La(v), B.type = P, B.transformFlags = ka(B.parameters) | (B.type ? 1 : 0), B.jsDoc = void 0, B.locals = void 0, B.nextContainer = void 0, B.typeArguments = void 0, B; + } + function Dk(v, P, B) { + return v.parameters !== P || v.type !== B ? ln(sE(P, B), v) : v; + } + function wu(v, P = !1) { + const B = R( + 322 + /* JSDocTypeLiteral */ + ); + return B.jsDocPropertyTags = La(v), B.isArrayType = P, B; + } + function Am(v, P, B) { + return v.jsDocPropertyTags !== P || v.isArrayType !== B ? ln(wu(P, B), v) : v; + } + function ru(v) { + const P = F( + 309 + /* JSDocTypeExpression */ + ); + return P.type = v, P; + } + function sh(v, P) { + return v.type !== P ? ln(ru(P), v) : v; + } + function k2(v, P, B) { + const ae = R( + 323 + /* JSDocSignature */ + ); + return ae.typeParameters = La(v), ae.parameters = O(P), ae.type = B, ae.jsDoc = void 0, ae.locals = void 0, ae.nextContainer = void 0, ae; + } + function C1(v, P, B, ae) { + return v.typeParameters !== P || v.parameters !== B || v.type !== ae ? ln(k2(P, B, ae), v) : v; + } + function Wf(v) { + const P = BJ(v.kind); + return v.tagName.escapedText === Zo(P) ? v.tagName : le(P); + } + function gp(v, P, B) { + const ae = F(v); + return ae.tagName = P, ae.comment = B, ae; + } + function Gp(v, P, B) { + const ae = R(v); + return ae.tagName = P, ae.comment = B, ae; + } + function gg(v, P, B, ae) { + const Be = gp(345, v ?? le("template"), ae); + return Be.constraint = P, Be.typeParameters = O(B), Be; + } + function C2(v, P = Wf(v), B, ae, Be) { + return v.tagName !== P || v.constraint !== B || v.typeParameters !== ae || v.comment !== Be ? ln(gg(P, B, ae, Be), v) : v; + } + function t0(v, P, B, ae) { + const Be = Gp(346, v ?? le("typedef"), ae); + return Be.typeExpression = P, Be.fullName = B, Be.name = yz(B), Be.locals = void 0, Be.nextContainer = void 0, Be; + } + function E2(v, P = Wf(v), B, ae, Be) { + return v.tagName !== P || v.typeExpression !== B || v.fullName !== ae || v.comment !== Be ? ln(t0(P, B, ae, Be), v) : v; + } + function Hv(v, P, B, ae, Be, Jt) { + const _n = Gp(341, v ?? le("param"), Jt); + return _n.typeExpression = ae, _n.name = P, _n.isNameFirst = !!Be, _n.isBracketed = B, _n; + } + function aT(v, P = Wf(v), B, ae, Be, Jt, _n) { + return v.tagName !== P || v.name !== B || v.isBracketed !== ae || v.typeExpression !== Be || v.isNameFirst !== Jt || v.comment !== _n ? ln(Hv(P, B, ae, Be, Jt, _n), v) : v; + } + function D2(v, P, B, ae, Be, Jt) { + const _n = Gp(348, v ?? le("prop"), Jt); + return _n.typeExpression = ae, _n.name = P, _n.isNameFirst = !!Be, _n.isBracketed = B, _n; + } + function w2(v, P = Wf(v), B, ae, Be, Jt, _n) { + return v.tagName !== P || v.name !== B || v.isBracketed !== ae || v.typeExpression !== Be || v.isNameFirst !== Jt || v.comment !== _n ? ln(D2(P, B, ae, Be, Jt, _n), v) : v; + } + function Im(v, P, B, ae) { + const Be = Gp(338, v ?? le("callback"), ae); + return Be.typeExpression = P, Be.fullName = B, Be.name = yz(B), Be.locals = void 0, Be.nextContainer = void 0, Be; + } + function wk(v, P = Wf(v), B, ae, Be) { + return v.tagName !== P || v.typeExpression !== B || v.fullName !== ae || v.comment !== Be ? ln(Im(P, B, ae, Be), v) : v; + } + function oT(v, P, B) { + const ae = gp(339, v ?? le("overload"), B); + return ae.typeExpression = P, ae; + } + function sy(v, P = Wf(v), B, ae) { + return v.tagName !== P || v.typeExpression !== B || v.comment !== ae ? ln(oT(P, B, ae), v) : v; + } + function P2(v, P, B) { + const ae = gp(328, v ?? le("augments"), B); + return ae.class = P, ae; + } + function fd(v, P = Wf(v), B, ae) { + return v.tagName !== P || v.class !== B || v.comment !== ae ? ln(P2(P, B, ae), v) : v; + } + function ah(v, P, B) { + const ae = gp(329, v ?? le("implements"), B); + return ae.class = P, ae; + } + function oh(v, P, B) { + const ae = gp(347, v ?? le("see"), B); + return ae.name = P, ae; + } + function E1(v, P, B, ae) { + return v.tagName !== P || v.name !== B || v.comment !== ae ? ln(oh(P, B, ae), v) : v; + } + function wl(v) { + const P = F( + 310 + /* JSDocNameReference */ + ); + return P.name = v, P; + } + function N2(v, P) { + return v.name !== P ? ln(wl(P), v) : v; + } + function ch(v, P) { + const B = F( + 311 + /* JSDocMemberName */ + ); + return B.left = v, B.right = P, B.transformFlags |= mn(B.left) | mn(B.right), B; + } + function A2(v, P, B) { + return v.left !== P || v.right !== B ? ln(ch(P, B), v) : v; + } + function Pk(v, P) { + const B = F( + 324 + /* JSDocLink */ + ); + return B.name = v, B.text = P, B; + } + function Fm(v, P, B) { + return v.name !== P ? ln(Pk(P, B), v) : v; + } + function aE(v, P) { + const B = F( + 325 + /* JSDocLinkCode */ + ); + return B.name = v, B.text = P, B; + } + function ay(v, P, B) { + return v.name !== P ? ln(aE(P, B), v) : v; + } + function cT(v, P) { + const B = F( + 326 + /* JSDocLinkPlain */ + ); + return B.name = v, B.text = P, B; + } + function jc(v, P, B) { + return v.name !== P ? ln(cT(P, B), v) : v; + } + function Pl(v, P = Wf(v), B, ae) { + return v.tagName !== P || v.class !== B || v.comment !== ae ? ln(ah(P, B, ae), v) : v; + } + function Gv(v, P, B) { + return gp(v, P ?? le(BJ(v)), B); + } + function pu(v, P, B = Wf(P), ae) { + return P.tagName !== B || P.comment !== ae ? ln(Gv(v, B, ae), P) : P; + } + function $p(v, P, B, ae) { + const Be = gp(v, P ?? le(BJ(v)), ae); + return Be.typeExpression = B, Be; + } + function oE(v, P, B = Wf(P), ae, Be) { + return P.tagName !== B || P.typeExpression !== ae || P.comment !== Be ? ln($p(v, B, ae, Be), P) : P; + } + function Jd(v, P) { + return gp(327, v, P); + } + function Nk(v, P, B) { + return v.tagName !== P || v.comment !== B ? ln(Jd(P, B), v) : v; + } + function oy(v, P, B) { + const ae = Gp(340, v ?? le(BJ( + 340 + /* JSDocEnumTag */ + )), B); + return ae.typeExpression = P, ae.locals = void 0, ae.nextContainer = void 0, ae; + } + function Ak(v, P = Wf(v), B, ae) { + return v.tagName !== P || v.typeExpression !== B || v.comment !== ae ? ln(oy(P, B, ae), v) : v; + } + function Ik(v, P, B, ae, Be) { + const Jt = gp(351, v ?? le("import"), Be); + return Jt.importClause = P, Jt.moduleSpecifier = B, Jt.attributes = ae, Jt.comment = Be, Jt; + } + function oc(v, P, B, ae, Be, Jt) { + return v.tagName !== P || v.comment !== Jt || v.importClause !== B || v.moduleSpecifier !== ae || v.attributes !== Be ? ln(Ik(P, B, ae, Be, Jt), v) : v; + } + function lT(v) { + const P = F( + 321 + /* JSDocText */ + ); + return P.text = v, P; + } + function cE(v, P) { + return v.text !== P ? ln(lT(P), v) : v; + } + function cy(v, P) { + const B = F( + 320 + /* JSDoc */ + ); + return B.comment = v, B.tags = La(P), B; + } + function lE(v, P, B) { + return v.comment !== P || v.tags !== B ? ln(cy(P, B), v) : v; + } + function Pu(v, P, B) { + const ae = F( + 284 + /* JsxElement */ + ); + return ae.openingElement = v, ae.children = O(P), ae.closingElement = B, ae.transformFlags |= mn(ae.openingElement) | ka(ae.children) | mn(ae.closingElement) | 2, ae; + } + function Fk(v, P, B, ae) { + return v.openingElement !== P || v.children !== B || v.closingElement !== ae ? ln(Pu(P, B, ae), v) : v; + } + function uT(v, P, B) { + const ae = F( + 285 + /* JsxSelfClosingElement */ + ); + return ae.tagName = v, ae.typeArguments = La(P), ae.attributes = B, ae.transformFlags |= mn(ae.tagName) | ka(ae.typeArguments) | mn(ae.attributes) | 2, ae.typeArguments && (ae.transformFlags |= 1), ae; + } + function I2(v, P, B, ae) { + return v.tagName !== P || v.typeArguments !== B || v.attributes !== ae ? ln(uT(P, B, ae), v) : v; + } + function M_(v, P, B) { + const ae = F( + 286 + /* JsxOpeningElement */ + ); + return ae.tagName = v, ae.typeArguments = La(P), ae.attributes = B, ae.transformFlags |= mn(ae.tagName) | ka(ae.typeArguments) | mn(ae.attributes) | 2, P && (ae.transformFlags |= 1), ae; + } + function Ok(v, P, B, ae) { + return v.tagName !== P || v.typeArguments !== B || v.attributes !== ae ? ln(M_(P, B, ae), v) : v; + } + function D1(v) { + const P = F( + 287 + /* JsxClosingElement */ + ); + return P.tagName = v, P.transformFlags |= mn(P.tagName) | 2, P; + } + function hp(v, P) { + return v.tagName !== P ? ln(D1(P), v) : v; + } + function w1(v, P, B) { + const ae = F( + 288 + /* JsxFragment */ + ); + return ae.openingFragment = v, ae.children = O(P), ae.closingFragment = B, ae.transformFlags |= mn(ae.openingFragment) | ka(ae.children) | mn(ae.closingFragment) | 2, ae; + } + function _T(v, P, B, ae) { + return v.openingFragment !== P || v.children !== B || v.closingFragment !== ae ? ln(w1(P, B, ae), v) : v; + } + function fT(v, P) { + const B = F( + 12 + /* JsxText */ + ); + return B.text = v, B.containsOnlyTriviaWhiteSpaces = !!P, B.transformFlags |= 2, B; + } + function pT(v, P, B) { + return v.text !== P || v.containsOnlyTriviaWhiteSpaces !== B ? ln(fT(P, B), v) : v; + } + function dT() { + const v = F( + 289 + /* JsxOpeningFragment */ + ); + return v.transformFlags |= 2, v; + } + function $v() { + const v = F( + 290 + /* JsxClosingFragment */ + ); + return v.transformFlags |= 2, v; + } + function mT(v, P) { + const B = R( + 291 + /* JsxAttribute */ + ); + return B.name = v, B.initializer = P, B.transformFlags |= mn(B.name) | mn(B.initializer) | 2, B; + } + function zu(v, P, B) { + return v.name !== P || v.initializer !== B ? ln(mT(P, B), v) : v; + } + function Uf(v) { + const P = R( + 292 + /* JsxAttributes */ + ); + return P.properties = O(v), P.transformFlags |= ka(P.properties) | 2, P; + } + function uE(v, P) { + return v.properties !== P ? ln(Uf(P), v) : v; + } + function Lk(v) { + const P = F( + 293 + /* JsxSpreadAttribute */ + ); + return P.expression = v, P.transformFlags |= mn(P.expression) | 2, P; + } + function Oa(v, P) { + return v.expression !== P ? ln(Lk(P), v) : v; + } + function dn(v, P) { + const B = F( + 294 + /* JsxExpression */ + ); + return B.dotDotDotToken = v, B.expression = P, B.transformFlags |= mn(B.dotDotDotToken) | mn(B.expression) | 2, B; + } + function R_(v, P) { + return v.expression !== P ? ln(dn(v.dotDotDotToken, P), v) : v; + } + function af(v, P) { + const B = F( + 295 + /* JsxNamespacedName */ + ); + return B.namespace = v, B.name = P, B.transformFlags |= mn(B.namespace) | mn(B.name) | 2, B; + } + function gT(v, P, B) { + return v.namespace !== P || v.name !== B ? ln(af(P, B), v) : v; + } + function Mk(v, P) { + const B = F( + 296 + /* CaseClause */ + ); + return B.expression = i().parenthesizeExpressionForDisallowedComma(v), B.statements = O(P), B.transformFlags |= mn(B.expression) | ka(B.statements), B.jsDoc = void 0, B; + } + function Rk(v, P, B) { + return v.expression !== P || v.statements !== B ? ln(Mk(P, B), v) : v; + } + function P1(v) { + const P = F( + 297 + /* DefaultClause */ + ); + return P.statements = O(v), P.transformFlags = ka(P.statements), P; + } + function hT(v, P) { + return v.statements !== P ? ln(P1(P), v) : v; + } + function Xv(v, P) { + const B = F( + 298 + /* HeritageClause */ + ); + switch (B.token = v, B.types = O(P), B.transformFlags |= ka(B.types), v) { + case 96: + B.transformFlags |= 1024; + break; + case 119: + B.transformFlags |= 1; + break; + default: + return E.assertNever(v); + } + return B; + } + function pd(v, P) { + return v.types !== P ? ln(Xv(v.token, P), v) : v; + } + function gl(v, P) { + const B = F( + 299 + /* CatchClause */ + ); + return B.variableDeclaration = tb(v), B.block = P, B.transformFlags |= mn(B.variableDeclaration) | mn(B.block) | (v ? 0 : 64), B.locals = void 0, B.nextContainer = void 0, B; + } + function lh(v, P, B) { + return v.variableDeclaration !== P || v.block !== B ? ln(gl(P, B), v) : v; + } + function Om(v, P) { + const B = R( + 303 + /* PropertyAssignment */ + ); + return B.name = Zc(v), B.initializer = i().parenthesizeExpressionForDisallowedComma(P), B.transformFlags |= e1(B.name) | mn(B.initializer), B.modifiers = void 0, B.questionToken = void 0, B.exclamationToken = void 0, B.jsDoc = void 0, B; + } + function Xp(v, P, B) { + return v.name !== P || v.initializer !== B ? _E(Om(P, B), v) : v; + } + function _E(v, P) { + return v !== P && (v.modifiers = P.modifiers, v.questionToken = P.questionToken, v.exclamationToken = P.exclamationToken), ln(v, P); + } + function Bc(v, P) { + const B = R( + 304 + /* ShorthandPropertyAssignment */ + ); + return B.name = Zc(v), B.objectAssignmentInitializer = P && i().parenthesizeExpressionForDisallowedComma(P), B.transformFlags |= oN(B.name) | mn(B.objectAssignmentInitializer) | 1024, B.equalsToken = void 0, B.modifiers = void 0, B.questionToken = void 0, B.exclamationToken = void 0, B.jsDoc = void 0, B; + } + function k(v, P, B) { + return v.name !== P || v.objectAssignmentInitializer !== B ? ce(Bc(P, B), v) : v; + } + function ce(v, P) { + return v !== P && (v.modifiers = P.modifiers, v.questionToken = P.questionToken, v.exclamationToken = P.exclamationToken, v.equalsToken = P.equalsToken), ln(v, P); + } + function mt(v) { + const P = R( + 305 + /* SpreadAssignment */ + ); + return P.expression = i().parenthesizeExpressionForDisallowedComma(v), P.transformFlags |= mn(P.expression) | 128 | 65536, P.jsDoc = void 0, P; + } + function sr(v, P) { + return v.expression !== P ? ln(mt(P), v) : v; + } + function Yn(v, P) { + const B = R( + 306 + /* EnumMember */ + ); + return B.name = Zc(v), B.initializer = P && i().parenthesizeExpressionForDisallowedComma(P), B.transformFlags |= mn(B.name) | mn(B.initializer) | 1, B.jsDoc = void 0, B; + } + function zi(v, P, B) { + return v.name !== P || v.initializer !== B ? ln(Yn(P, B), v) : v; + } + function Qi(v, P, B) { + const ae = t.createBaseSourceFileNode( + 307 + /* SourceFile */ + ); + return ae.statements = O(v), ae.endOfFileToken = P, ae.flags |= B, ae.text = "", ae.fileName = "", ae.path = "", ae.resolvedPath = "", ae.originalFileName = "", ae.languageVersion = 1, ae.languageVariant = 0, ae.scriptKind = 0, ae.isDeclarationFile = !1, ae.hasNoDefaultLib = !1, ae.transformFlags |= ka(ae.statements) | mn(ae.endOfFileToken), ae.locals = void 0, ae.nextContainer = void 0, ae.endFlowNode = void 0, ae.nodeCount = 0, ae.identifierCount = 0, ae.symbolCount = 0, ae.parseDiagnostics = void 0, ae.bindDiagnostics = void 0, ae.bindSuggestionDiagnostics = void 0, ae.lineMap = void 0, ae.externalModuleIndicator = void 0, ae.setExternalModuleIndicator = void 0, ae.pragmas = void 0, ae.checkJsDirective = void 0, ae.referencedFiles = void 0, ae.typeReferenceDirectives = void 0, ae.libReferenceDirectives = void 0, ae.amdDependencies = void 0, ae.commentDirectives = void 0, ae.identifiers = void 0, ae.packageJsonLocations = void 0, ae.packageJsonScope = void 0, ae.imports = void 0, ae.moduleAugmentations = void 0, ae.ambientModuleNames = void 0, ae.classifiableNames = void 0, ae.impliedNodeFormat = void 0, ae; + } + function ds(v) { + const P = Object.create(v.redirectTarget); + return Object.defineProperties(P, { + id: { + get() { + return this.redirectInfo.redirectTarget.id; + }, + set(B) { + this.redirectInfo.redirectTarget.id = B; + } + }, + symbol: { + get() { + return this.redirectInfo.redirectTarget.symbol; + }, + set(B) { + this.redirectInfo.redirectTarget.symbol = B; + } + } + }), P.redirectInfo = v, P; + } + function ws(v) { + const P = ds(v.redirectInfo); + return P.flags |= v.flags & -17, P.fileName = v.fileName, P.path = v.path, P.resolvedPath = v.resolvedPath, P.originalFileName = v.originalFileName, P.packageJsonLocations = v.packageJsonLocations, P.packageJsonScope = v.packageJsonScope, P.emitNode = void 0, P; + } + function Ea(v) { + const P = t.createBaseSourceFileNode( + 307 + /* SourceFile */ + ); + P.flags |= v.flags & -17; + for (const B in v) + if (!(ro(P, B) || !ro(v, B))) { + if (B === "emitNode") { + P.emitNode = void 0; + continue; + } + P[B] = v[B]; + } + return P; + } + function nu(v) { + const P = v.redirectInfo ? ws(v) : Ea(v); + return n(P, v), P; + } + function r0(v, P, B, ae, Be, Jt, _n) { + const es = nu(v); + return es.statements = O(P), es.isDeclarationFile = B, es.referencedFiles = ae, es.typeReferenceDirectives = Be, es.hasNoDefaultLib = Jt, es.libReferenceDirectives = _n, es.transformFlags = ka(es.statements) | mn(es.endOfFileToken), es; + } + function uh(v, P, B = v.isDeclarationFile, ae = v.referencedFiles, Be = v.typeReferenceDirectives, Jt = v.hasNoDefaultLib, _n = v.libReferenceDirectives) { + return v.statements !== P || v.isDeclarationFile !== B || v.referencedFiles !== ae || v.typeReferenceDirectives !== Be || v.hasNoDefaultLib !== Jt || v.libReferenceDirectives !== _n ? ln(r0(v, P, B, ae, Be, Jt, _n), v) : v; + } + function Wu(v) { + const P = F( + 308 + /* Bundle */ + ); + return P.sourceFiles = v, P.syntheticFileReferences = void 0, P.syntheticTypeReferences = void 0, P.syntheticLibReferences = void 0, P.hasNoDefaultLib = void 0, P; + } + function Qv(v, P) { + return v.sourceFiles !== P ? ln(Wu(P), v) : v; + } + function jk(v, P = !1, B) { + const ae = F( + 237 + /* SyntheticExpression */ + ); + return ae.type = v, ae.isSpread = P, ae.tupleNameSource = B, ae; + } + function F2(v) { + const P = F( + 352 + /* SyntaxList */ + ); + return P._children = v, P; + } + function Yv(v) { + const P = F( + 353 + /* NotEmittedStatement */ + ); + return P.original = v, ot(P, v), P; + } + function yT(v, P) { + const B = F( + 355 + /* PartiallyEmittedExpression */ + ); + return B.expression = v, B.original = P, B.transformFlags |= mn(B.expression) | 1, ot(B, P), B; + } + function Zv(v, P) { + return v.expression !== P ? ln(yT(P, v.original), v) : v; + } + function Qp() { + return F( + 354 + /* NotEmittedTypeElement */ + ); + } + function N1(v) { + if (no(v) && !p4(v) && !v.original && !v.emitNode && !v.id) { + if (TD(v)) + return v.elements; + if (fn(v) && lte(v.operatorToken)) + return [v.left, v.right]; + } + return v; + } + function Kv(v) { + const P = F( + 356 + /* CommaListExpression */ + ); + return P.elements = O(jX(v, N1)), P.transformFlags |= ka(P.elements), P; + } + function b8(v, P) { + return v.elements !== P ? ln(Kv(P), v) : v; + } + function A1(v, P) { + const B = F( + 357 + /* SyntheticReferenceExpression */ + ); + return B.expression = v, B.thisArg = P, B.transformFlags |= mn(B.expression) | mn(B.thisArg), B; + } + function Fw(v, P, B) { + return v.expression !== P || v.thisArg !== B ? ln(A1(P, B), v) : v; + } + function S8(v) { + const P = te(v.escapedText); + return P.flags |= v.flags & -17, P.transformFlags = v.transformFlags, n(P, v), _N(P, { ...v.emitNode.autoGenerate }), P; + } + function T8(v) { + const P = te(v.escapedText); + P.flags |= v.flags & -17, P.jsDoc = v.jsDoc, P.flowNode = v.flowNode, P.symbol = v.symbol, P.transformFlags = v.transformFlags, n(P, v); + const B = PS(v); + return B && O0(P, B), P; + } + function Ui(v) { + const P = Ee(v.escapedText); + return P.flags |= v.flags & -17, P.transformFlags = v.transformFlags, n(P, v), _N(P, { ...v.emitNode.autoGenerate }), P; + } + function eb(v) { + const P = Ee(v.escapedText); + return P.flags |= v.flags & -17, P.transformFlags = v.transformFlags, n(P, v), P; + } + function $r(v) { + if (v === void 0) + return v; + if (Ei(v)) + return nu(v); + if (Fo(v)) + return S8(v); + if (Me(v)) + return T8(v); + if (lS(v)) + return Ui(v); + if (Ni(v)) + return eb(v); + const P = l7(v.kind) ? t.createBaseNode(v.kind) : t.createBaseTokenNode(v.kind); + P.flags |= v.flags & -17, P.transformFlags = v.transformFlags, n(P, v); + for (const B in v) + ro(P, B) || !ro(v, B) || (P[B] = v[B]); + return P; + } + function Ow(v, P, B) { + return Br( + mf( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + /*parameters*/ + P ? [P] : [], + /*type*/ + void 0, + ud( + v, + /*multiLine*/ + !0 + ) + ), + /*typeArguments*/ + void 0, + /*argumentsArray*/ + B ? [B] : [] + ); + } + function fE(v, P, B) { + return Br( + fp( + /*modifiers*/ + void 0, + /*typeParameters*/ + void 0, + /*parameters*/ + P ? [P] : [], + /*type*/ + void 0, + /*equalsGreaterThanToken*/ + void 0, + ud( + v, + /*multiLine*/ + !0 + ) + ), + /*typeArguments*/ + void 0, + /*argumentsArray*/ + B ? [B] : [] + ); + } + function I1() { + return cd(V("0")); + } + function pE(v) { + return S2( + /*modifiers*/ + void 0, + /*isExportEquals*/ + !1, + v + ); + } + function x8(v) { + return go( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + k1([ + x2( + /*isTypeOnly*/ + !1, + /*propertyName*/ + void 0, + v + ) + ]) + ); + } + function dE(v, P) { + return P === "null" ? A.createStrictEquality(v, Ae()) : P === "undefined" ? A.createStrictEquality(v, I1()) : A.createStrictEquality(gf(v), _e(P)); + } + function RL(v, P) { + return P === "null" ? A.createStrictInequality(v, Ae()) : P === "undefined" ? A.createStrictInequality(v, I1()) : A.createStrictInequality(gf(v), _e(P)); + } + function Lm(v, P, B) { + return oS(v) ? Sa( + Uo( + v, + /*questionDotToken*/ + void 0, + P + ), + /*questionDotToken*/ + void 0, + /*typeArguments*/ + void 0, + B + ) : Br( + mc(v, P), + /*typeArguments*/ + void 0, + B + ); + } + function jL(v, P, B) { + return Lm(v, "bind", [P, ...B]); + } + function Lw(v, P, B) { + return Lm(v, "call", [P, ...B]); + } + function BL(v, P, B) { + return Lm(v, "apply", [P, B]); + } + function vT(v, P, B) { + return Lm(le(v), P, B); + } + function bT(v, P) { + return Lm(v, "slice", P === void 0 ? [] : [i0(P)]); + } + function k8(v, P) { + return Lm(v, "concat", P); + } + function F1(v, P, B) { + return vT("Object", "defineProperty", [v, i0(P), B]); + } + function dd(v, P) { + return vT("Object", "getOwnPropertyDescriptor", [v, i0(P)]); + } + function mE(v, P, B) { + return vT("Reflect", "get", B ? [v, P, B] : [v, P]); + } + function hg(v, P, B, ae) { + return vT("Reflect", "set", ae ? [v, P, B, ae] : [v, P, B]); + } + function O1(v, P, B) { + return B ? (v.push(Om(P, B)), !0) : !1; + } + function C8(v, P) { + const B = []; + O1(B, "enumerable", i0(v.enumerable)), O1(B, "configurable", i0(v.configurable)); + let ae = O1(B, "writable", i0(v.writable)); + ae = O1(B, "value", v.value) || ae; + let Be = O1(B, "get", v.get); + return Be = O1(B, "set", v.set) || Be, E.assert(!(ae && Be), "A PropertyDescriptor may not be both an accessor descriptor and a data descriptor."), ba(B, !P); + } + function yg(v, P) { + switch (v.kind) { + case 217: + return F_(v, P); + case 216: + return df(v, v.type, P); + case 234: + return nh(v, P, v.type); + case 238: + return $0(v, P, v.type); + case 235: + return Md(v, P); + case 233: + return qh(v, P, v.typeArguments); + case 355: + return Zv(v, P); + } + } + function ST(v) { + return Yu(v) && no(v) && no(F0(v)) && no(fm(v)) && !at(YC(v)) && !at(uN(v)); + } + function E8(v, P, B = 31) { + return v && wF(v, B) && !ST(v) ? yg( + v, + E8(v.expression, P) + ) : P; + } + function Pc(v, P, B) { + if (!P) + return v; + const ae = v1( + P, + P.label, + i1(P.statement) ? Pc(v, P.statement) : v + ); + return B && B(P), ae; + } + function Bk(v, P) { + const B = za(v); + switch (B.kind) { + case 80: + return P; + case 110: + case 9: + case 10: + case 11: + return !1; + case 209: + return B.elements.length !== 0; + case 210: + return B.properties.length > 0; + default: + return !0; + } + } + function Ua(v, P, B, ae = !1) { + const Be = xc( + v, + 31 + /* All */ + ); + let Jt, _n; + return D_(Be) ? (Jt = ne(), _n = Be) : yD(Be) ? (Jt = ne(), _n = B !== void 0 && B < 2 ? ot(le("_super"), Be) : Be) : va(Be) & 8192 ? (Jt = I1(), _n = i().parenthesizeLeftSideOfAccess( + Be, + /*optionalChain*/ + !1 + )) : Tn(Be) ? Bk(Be.expression, ae) ? (Jt = Te(P), _n = mc( + ot( + A.createAssignment( + Jt, + Be.expression + ), + Be.expression + ), + Be.name + ), ot(_n, Be)) : (Jt = Be.expression, _n = Be) : fo(Be) ? Bk(Be.expression, ae) ? (Jt = Te(P), _n = dl( + ot( + A.createAssignment( + Jt, + Be.expression + ), + Be.expression + ), + Be.argumentExpression + ), ot(_n, Be)) : (Jt = Be.expression, _n = Be) : (Jt = I1(), _n = i().parenthesizeLeftSideOfAccess( + v, + /*optionalChain*/ + !1 + )), { target: _n, thisArg: Jt }; + } + function H(v, P) { + return mc( + // Explicit parens required because of v8 regression (https://bugs.chromium.org/p/v8/issues/detail?id=9560) + Rf( + ba([ + K( + /*modifiers*/ + void 0, + "value", + [yr( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + v, + /*questionToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + )], + ud([ + Ge(P) + ]) + ) + ]) + ), + "value" + ); + } + function Pe(v) { + return v.length > 10 ? Kv(v) : qu(v, A.createComma); + } + function qe(v, P, B, ae = 0, Be) { + const Jt = Be ? v && t7(v) : is(v); + if (Jt && Me(Jt) && !Fo(Jt)) { + const _n = Fa(ot($r(Jt), Jt), Jt.parent); + return ae |= va(Jt), B || (ae |= 96), P || (ae |= 3072), ae && on(_n, ae), _n; + } + return Ce(v); + } + function vt(v, P, B) { + return qe( + v, + P, + B, + 98304 + /* InternalName */ + ); + } + function Wt(v, P, B, ae) { + return qe(v, P, B, 32768, ae); + } + function br(v, P, B) { + return qe( + v, + P, + B, + 16384 + /* ExportName */ + ); + } + function Rn(v, P, B) { + return qe(v, P, B); + } + function Ai(v, P, B, ae) { + const Be = mc(v, no(P) ? P : $r(P)); + ot(Be, P); + let Jt = 0; + return ae || (Jt |= 96), B || (Jt |= 3072), Jt && on(Be, Jt), Be; + } + function ui(v, P, B, ae) { + return v && $n( + P, + 32 + /* Export */ + ) ? Ai(v, qe(P), B, ae) : br(P, B, ae); + } + function _i(v, P, B, ae) { + const Be = Za(v, P, 0, B); + return Ia(v, P, Be, ae); + } + function qi(v) { + return ea(v.expression) && v.expression.text === "use strict"; + } + function Ya() { + return xu(Ge(_e("use strict"))); + } + function Za(v, P, B = 0, ae) { + E.assert(P.length === 0, "Prologue directives should be at the first statement in the target statements array"); + let Be = !1; + const Jt = v.length; + for (; B < Jt; ) { + const _n = v[B]; + if (nm(_n)) + qi(_n) && (Be = !0), P.push(_n); + else + break; + B++; + } + return ae && !Be && P.push(Ya()), B; + } + function Ia(v, P, B, ae, Be = yb) { + const Jt = v.length; + for (; B !== void 0 && B < Jt; ) { + const _n = v[B]; + if (va(_n) & 2097152 && Be(_n)) + Pr(P, ae ? Xe(_n, ae, xi) : _n); + else + break; + B++; + } + return B; + } + function yp(v) { + return mz(v) ? v : ot(O([Ya(), ...v]), v); + } + function rl(v) { + return E.assert(Ri(v, vZ), "Cannot lift nodes to a Block."), Hm(v) || ud(v); + } + function Vf(v, P, B) { + let ae = B; + for (; ae < v.length && P(v[ae]); ) + ae++; + return ae; + } + function n0(v, P) { + if (!at(P)) + return v; + const B = Vf(v, nm, 0), ae = Vf(v, O7, B), Be = Vf(v, L7, ae), Jt = Vf(P, nm, 0), _n = Vf(P, O7, Jt), es = Vf(P, L7, _n), io = Vf(P, i3, es); + E.assert(io === P.length, "Expected declarations to be valid standard or custom prologues"); + const vp = xb(v) ? v.slice() : v; + if (io > es && vp.splice(Be, 0, ...P.slice(es, io)), es > _n && vp.splice(ae, 0, ...P.slice(_n, es)), _n > Jt && vp.splice(B, 0, ...P.slice(Jt, _n)), Jt > 0) + if (B === 0) + vp.splice(0, 0, ...P.slice(0, Jt)); + else { + const vg = /* @__PURE__ */ new Map(); + for (let qf = 0; qf < B; qf++) { + const gE = v[qf]; + vg.set(gE.expression.text, !0); + } + for (let qf = Jt - 1; qf >= 0; qf--) { + const gE = P[qf]; + vg.has(gE.expression.text) || vp.unshift(gE); + } + } + return xb(v) ? ot(O(vp, v.hasTrailingComma), v) : v; + } + function _h(v, P) { + let B; + return typeof P == "number" ? B = bt(P) : B = P, Ao(v) ? Wr(v, B, v.name, v.constraint, v.default) : Ii(v) ? qn(v, B, v.dotDotDotToken, v.name, v.questionToken, v.type, v.initializer) : ZC(v) ? Xr(v, B, v.typeParameters, v.parameters, v.type) : m_(v) ? Xn(v, B, v.name, v.questionToken, v.type) : ss(v) ? Re(v, B, v.name, v.questionToken ?? v.exclamationToken, v.type, v.initializer) : pm(v) ? tr(v, B, v.name, v.questionToken, v.typeParameters, v.parameters, v.type) : fc(v) ? Bn(v, B, v.asteriskToken, v.name, v.questionToken, v.typeParameters, v.parameters, v.type, v.body) : Go(v) ? gs(v, B, v.parameters, v.body) : cp(v) ? ee(v, B, v.name, v.parameters, v.type, v.body) : A_(v) ? Ie(v, B, v.name, v.parameters, v.body) : r1(v) ? We(v, B, v.parameters, v.type) : po(v) ? jf(v, B, v.asteriskToken, v.name, v.typeParameters, v.parameters, v.type, v.body) : bo(v) ? th(v, B, v.typeParameters, v.parameters, v.type, v.equalsGreaterThanToken, v.body) : Gc(v) ? ld(v, B, v.name, v.typeParameters, v.heritageClauses, v.members) : pc(v) ? X0(v, B, v.declarationList) : Tc(v) ? Jf(v, B, v.asteriskToken, v.name, v.typeParameters, v.parameters, v.type, v.body) : $c(v) ? b_(v, B, v.name, v.typeParameters, v.heritageClauses, v.members) : Yl(v) ? tE(v, B, v.name, v.typeParameters, v.heritageClauses, v.members) : jp(v) ? Bd(v, B, v.name, v.typeParameters, v.type) : Zb(v) ? Dm(v, B, v.name, v.members) : Lc(v) ? tu(v, B, v.name, v.body) : _l(v) ? iT(v, B, v.isTypeOnly, v.name, v.moduleReference) : zo(v) ? T1(v, B, v.importClause, v.moduleSpecifier, v.attributes) : Io(v) ? x1(v, B, v.expression) : wc(v) ? T2(v, B, v.isTypeOnly, v.exportClause, v.moduleSpecifier, v.attributes) : E.assertNever(v); + } + function L1(v, P) { + return Ii(v) ? qn(v, P, v.dotDotDotToken, v.name, v.questionToken, v.type, v.initializer) : ss(v) ? Re(v, P, v.name, v.questionToken ?? v.exclamationToken, v.type, v.initializer) : fc(v) ? Bn(v, P, v.asteriskToken, v.name, v.questionToken, v.typeParameters, v.parameters, v.type, v.body) : cp(v) ? ee(v, P, v.name, v.parameters, v.type, v.body) : A_(v) ? Ie(v, P, v.name, v.parameters, v.body) : Gc(v) ? ld(v, P, v.name, v.typeParameters, v.heritageClauses, v.members) : $c(v) ? b_(v, P, v.name, v.typeParameters, v.heritageClauses, v.members) : E.assertNever(v); + } + function JL(v, P) { + switch (v.kind) { + case 177: + return ee(v, v.modifiers, P, v.parameters, v.type, v.body); + case 178: + return Ie(v, v.modifiers, P, v.parameters, v.body); + case 174: + return Bn(v, v.modifiers, v.asteriskToken, P, v.questionToken, v.typeParameters, v.parameters, v.type, v.body); + case 173: + return tr(v, v.modifiers, P, v.questionToken, v.typeParameters, v.parameters, v.type); + case 172: + return Re(v, v.modifiers, P, v.questionToken ?? v.exclamationToken, v.type, v.initializer); + case 171: + return Xn(v, v.modifiers, P, v.questionToken, v.type); + case 303: + return Xp(v, P, v.initializer); + } + } + function La(v) { + return v ? O(v) : void 0; + } + function Zc(v) { + return typeof v == "string" ? le(v) : v; + } + function i0(v) { + return typeof v == "string" ? _e(v) : typeof v == "number" ? V(v) : typeof v == "boolean" ? v ? De() : we() : v; + } + function O2(v) { + return v && i().parenthesizeExpressionForDisallowedComma(v); + } + function Mw(v) { + return typeof v == "number" ? xe(v) : v; + } + function Sf(v) { + return v && Cte(v) ? ot(n(Le(), v), v) : v; + } + function tb(v) { + return typeof v == "string" || v && !Kn(v) ? b1( + v, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ) : v; + } + function ln(v, P) { + return v !== P && (n(v, P), ot(v, P)), v; + } + } + function BJ(e) { + switch (e) { + case 344: + return "type"; + case 342: + return "returns"; + case 343: + return "this"; + case 340: + return "enum"; + case 330: + return "author"; + case 332: + return "class"; + case 333: + return "public"; + case 334: + return "private"; + case 335: + return "protected"; + case 336: + return "readonly"; + case 337: + return "override"; + case 345: + return "template"; + case 346: + return "typedef"; + case 341: + return "param"; + case 348: + return "prop"; + case 338: + return "callback"; + case 339: + return "overload"; + case 328: + return "augments"; + case 329: + return "implements"; + case 351: + return "import"; + default: + return E.fail(`Unsupported kind: ${E.formatSyntaxKind(e)}`); + } + } + var I0, Bhe = {}; + function i9e(e, t) { + switch (I0 || (I0 = Og( + 99, + /*skipTrivia*/ + !1, + 0 + /* Standard */ + )), e) { + case 15: + I0.setText("`" + t + "`"); + break; + case 16: + I0.setText("`" + t + "${"); + break; + case 17: + I0.setText("}" + t + "${"); + break; + case 18: + I0.setText("}" + t + "`"); + break; + } + let n = I0.scan(); + if (n === 20 && (n = I0.reScanTemplateToken( + /*isTaggedTemplate*/ + !1 + )), I0.isUnterminated()) + return I0.setText(void 0), Bhe; + let i; + switch (n) { + case 15: + case 16: + case 17: + case 18: + i = I0.getTokenValue(); + break; + } + return i === void 0 || I0.scan() !== 1 ? (I0.setText(void 0), Bhe) : (I0.setText(void 0), i); + } + function e1(e) { + return e && Me(e) ? oN(e) : mn(e); + } + function oN(e) { + return mn(e) & -67108865; + } + function s9e(e, t) { + return t | e.transformFlags & 134234112; + } + function mn(e) { + if (!e) return 0; + const t = e.transformFlags & ~a9e(e.kind); + return Hl(e) && Fc(e.name) ? s9e(e.name, t) : t; + } + function ka(e) { + return e ? e.transformFlags : 0; + } + function Jhe(e) { + let t = 0; + for (const n of e) + t |= mn(n); + e.transformFlags = t; + } + function a9e(e) { + if (e >= 182 && e <= 205) + return -2; + switch (e) { + case 213: + case 214: + case 209: + return -2147450880; + case 267: + return -1941676032; + case 169: + return -2147483648; + case 219: + return -2072174592; + case 218: + case 262: + return -1937940480; + case 261: + return -2146893824; + case 263: + case 231: + return -2147344384; + case 176: + return -1937948672; + case 172: + return -2013249536; + case 174: + case 177: + case 178: + return -2005057536; + case 133: + case 150: + case 163: + case 146: + case 154: + case 151: + case 136: + case 155: + case 116: + case 168: + case 171: + case 173: + case 179: + case 180: + case 181: + case 264: + case 265: + return -2; + case 210: + return -2147278848; + case 299: + return -2147418112; + case 206: + case 207: + return -2147450880; + case 216: + case 238: + case 234: + case 355: + case 217: + case 108: + return -2147483648; + case 211: + case 212: + return -2147483648; + default: + return -2147483648; + } + } + var rF = Vee(); + function nF(e) { + return e.flags |= 16, e; + } + var o9e = { + createBaseSourceFileNode: (e) => nF(rF.createBaseSourceFileNode(e)), + createBaseIdentifierNode: (e) => nF(rF.createBaseIdentifierNode(e)), + createBasePrivateIdentifierNode: (e) => nF(rF.createBasePrivateIdentifierNode(e)), + createBaseTokenNode: (e) => nF(rF.createBaseTokenNode(e)), + createBaseNode: (e) => nF(rF.createBaseNode(e)) + }, N = aN(4, o9e), zhe; + function Whe(e, t, n) { + return new (zhe || (zhe = $l.getSourceMapSourceConstructor()))(e, t, n); + } + function Sn(e, t) { + if (e.original !== t && (e.original = t, t)) { + const n = t.emitNode; + n && (e.emitNode = c9e(n, e.emitNode)); + } + return e; + } + function c9e(e, t) { + const { + flags: n, + internalFlags: i, + leadingComments: s, + trailingComments: o, + commentRange: c, + sourceMapRange: _, + tokenSourceMapRanges: u, + constantValue: m, + helpers: g, + startsOnNewLine: h, + snippetElement: S, + classThis: T, + assignedName: C + } = e; + if (t || (t = {}), n && (t.flags = n), i && (t.internalFlags = i & -9), s && (t.leadingComments = Nn(s.slice(), t.leadingComments)), o && (t.trailingComments = Nn(o.slice(), t.trailingComments)), c && (t.commentRange = c), _ && (t.sourceMapRange = _), u && (t.tokenSourceMapRanges = l9e(u, t.tokenSourceMapRanges)), m !== void 0 && (t.constantValue = m), g) + for (const D of g) + t.helpers = Sh(t.helpers, D); + return h !== void 0 && (t.startsOnNewLine = h), S !== void 0 && (t.snippetElement = S), T && (t.classThis = T), C && (t.assignedName = C), t; + } + function l9e(e, t) { + t || (t = []); + for (const n in e) + t[n] = e[n]; + return t; + } + function uu(e) { + if (e.emitNode) + E.assert(!(e.emitNode.internalFlags & 8), "Invalid attempt to mutate an immutable node."); + else { + if (p4(e)) { + if (e.kind === 307) + return e.emitNode = { annotatedNodes: [e] }; + const t = Cr(ls(Cr(e))) ?? E.fail("Could not determine parsed source file."); + uu(t).annotatedNodes.push(e); + } + e.emitNode = {}; + } + return e.emitNode; + } + function JJ(e) { + var t, n; + const i = (n = (t = Cr(ls(e))) == null ? void 0 : t.emitNode) == null ? void 0 : n.annotatedNodes; + if (i) + for (const s of i) + s.emitNode = void 0; + } + function cN(e) { + const t = uu(e); + return t.flags |= 3072, t.leadingComments = void 0, t.trailingComments = void 0, e; + } + function on(e, t) { + return uu(e).flags = t, e; + } + function _m(e, t) { + const n = uu(e); + return n.flags = n.flags | t, e; + } + function lN(e, t) { + return uu(e).internalFlags = t, e; + } + function wS(e, t) { + const n = uu(e); + return n.internalFlags = n.internalFlags | t, e; + } + function F0(e) { + var t; + return ((t = e.emitNode) == null ? void 0 : t.sourceMapRange) ?? e; + } + function da(e, t) { + return uu(e).sourceMapRange = t, e; + } + function Uhe(e, t) { + var n, i; + return (i = (n = e.emitNode) == null ? void 0 : n.tokenSourceMapRanges) == null ? void 0 : i[t]; + } + function Qee(e, t, n) { + const i = uu(e), s = i.tokenSourceMapRanges ?? (i.tokenSourceMapRanges = []); + return s[t] = n, e; + } + function pD(e) { + var t; + return (t = e.emitNode) == null ? void 0 : t.startsOnNewLine; + } + function iF(e, t) { + return uu(e).startsOnNewLine = t, e; + } + function fm(e) { + var t; + return ((t = e.emitNode) == null ? void 0 : t.commentRange) ?? e; + } + function Hc(e, t) { + return uu(e).commentRange = t, e; + } + function YC(e) { + var t; + return (t = e.emitNode) == null ? void 0 : t.leadingComments; + } + function uv(e, t) { + return uu(e).leadingComments = t, e; + } + function Gb(e, t, n, i) { + return uv(e, Pr(YC(e), { kind: t, pos: -1, end: -1, hasTrailingNewLine: i, text: n })); + } + function uN(e) { + var t; + return (t = e.emitNode) == null ? void 0 : t.trailingComments; + } + function Ox(e, t) { + return uu(e).trailingComments = t, e; + } + function dD(e, t, n, i) { + return Ox(e, Pr(uN(e), { kind: t, pos: -1, end: -1, hasTrailingNewLine: i, text: n })); + } + function Yee(e, t) { + uv(e, YC(t)), Ox(e, uN(t)); + const n = uu(t); + return n.leadingComments = void 0, n.trailingComments = void 0, e; + } + function Zee(e) { + var t; + return (t = e.emitNode) == null ? void 0 : t.constantValue; + } + function Kee(e, t) { + const n = uu(e); + return n.constantValue = t, e; + } + function Lx(e, t) { + const n = uu(e); + return n.helpers = Pr(n.helpers, t), e; + } + function Qg(e, t) { + if (at(t)) { + const n = uu(e); + for (const i of t) + n.helpers = Sh(n.helpers, i); + } + return e; + } + function Vhe(e, t) { + var n; + const i = (n = e.emitNode) == null ? void 0 : n.helpers; + return i ? $E(i, t) : !1; + } + function zJ(e) { + var t; + return (t = e.emitNode) == null ? void 0 : t.helpers; + } + function ete(e, t, n) { + const i = e.emitNode, s = i && i.helpers; + if (!at(s)) return; + const o = uu(t); + let c = 0; + for (let _ = 0; _ < s.length; _++) { + const u = s[_]; + n(u) ? (c++, o.helpers = Sh(o.helpers, u)) : c > 0 && (s[_ - c] = u); + } + c > 0 && (s.length -= c); + } + function WJ(e) { + var t; + return (t = e.emitNode) == null ? void 0 : t.snippetElement; + } + function UJ(e, t) { + const n = uu(e); + return n.snippetElement = t, e; + } + function VJ(e) { + return uu(e).internalFlags |= 4, e; + } + function tte(e, t) { + const n = uu(e); + return n.typeNode = t, e; + } + function rte(e) { + var t; + return (t = e.emitNode) == null ? void 0 : t.typeNode; + } + function O0(e, t) { + return uu(e).identifierTypeArguments = t, e; + } + function PS(e) { + var t; + return (t = e.emitNode) == null ? void 0 : t.identifierTypeArguments; + } + function _N(e, t) { + return uu(e).autoGenerate = t, e; + } + function qhe(e) { + var t; + return (t = e.emitNode) == null ? void 0 : t.autoGenerate; + } + function nte(e, t) { + return uu(e).generatedImportReference = t, e; + } + function ite(e) { + var t; + return (t = e.emitNode) == null ? void 0 : t.generatedImportReference; + } + var ste = /* @__PURE__ */ ((e) => (e.Field = "f", e.Method = "m", e.Accessor = "a", e))(ste || {}); + function ate(e) { + const t = e.factory, n = Iu(() => lN( + t.createTrue(), + 8 + /* Immutable */ + )), i = Iu(() => lN( + t.createFalse(), + 8 + /* Immutable */ + )); + return { + getUnscopedHelperName: s, + // TypeScript Helpers + createDecorateHelper: o, + createMetadataHelper: c, + createParamHelper: _, + // ES Decorators Helpers + createESDecorateHelper: D, + createRunInitializersHelper: w, + // ES2018 Helpers + createAssignHelper: A, + createAwaitHelper: O, + createAsyncGeneratorHelper: F, + createAsyncDelegatorHelper: R, + createAsyncValuesHelper: W, + // ES2018 Destructuring Helpers + createRestHelper: V, + // ES2017 Helpers + createAwaiterHelper: $, + // ES2015 Helpers + createExtendsHelper: U, + createTemplateObjectHelper: _e, + createSpreadArrayHelper: Z, + createPropKeyHelper: J, + createSetFunctionNameHelper: re, + // ES2015 Destructuring Helpers + createValuesHelper: te, + createReadHelper: ie, + // ES2015 Generator Helpers + createGeneratorHelper: le, + // ES Module Helpers + createImportStarHelper: Te, + createImportStarCallbackHelper: q, + createImportDefaultHelper: me, + createExportStarHelper: Ce, + // Class Fields Helpers + createClassPrivateFieldGetHelper: Ee, + createClassPrivateFieldSetHelper: oe, + createClassPrivateFieldInHelper: ke, + // 'using' helpers + createAddDisposableResourceHelper: ue, + createDisposeResourcesHelper: it, + // --rewriteRelativeImportExtensions helpers + createRewriteRelativeImportExtensionsHelper: Oe + }; + function s(xe) { + return on( + t.createIdentifier(xe), + 8196 + /* AdviseOnEmitNode */ + ); + } + function o(xe, he, ne, Ae) { + e.requestEmitHelper(u9e); + const De = []; + return De.push(t.createArrayLiteralExpression( + xe, + /*multiLine*/ + !0 + )), De.push(he), ne && (De.push(ne), Ae && De.push(Ae)), t.createCallExpression( + s("__decorate"), + /*typeArguments*/ + void 0, + De + ); + } + function c(xe, he) { + return e.requestEmitHelper(_9e), t.createCallExpression( + s("__metadata"), + /*typeArguments*/ + void 0, + [ + t.createStringLiteral(xe), + he + ] + ); + } + function _(xe, he, ne) { + return e.requestEmitHelper(f9e), ot( + t.createCallExpression( + s("__param"), + /*typeArguments*/ + void 0, + [ + t.createNumericLiteral(he + ""), + xe + ] + ), + ne + ); + } + function u(xe) { + const he = [ + t.createPropertyAssignment(t.createIdentifier("kind"), t.createStringLiteral("class")), + t.createPropertyAssignment(t.createIdentifier("name"), xe.name), + t.createPropertyAssignment(t.createIdentifier("metadata"), xe.metadata) + ]; + return t.createObjectLiteralExpression(he); + } + function m(xe) { + const he = xe.computed ? t.createElementAccessExpression(t.createIdentifier("obj"), xe.name) : t.createPropertyAccessExpression(t.createIdentifier("obj"), xe.name); + return t.createPropertyAssignment( + "get", + t.createArrowFunction( + /*modifiers*/ + void 0, + /*typeParameters*/ + void 0, + [t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + t.createIdentifier("obj") + )], + /*type*/ + void 0, + /*equalsGreaterThanToken*/ + void 0, + he + ) + ); + } + function g(xe) { + const he = xe.computed ? t.createElementAccessExpression(t.createIdentifier("obj"), xe.name) : t.createPropertyAccessExpression(t.createIdentifier("obj"), xe.name); + return t.createPropertyAssignment( + "set", + t.createArrowFunction( + /*modifiers*/ + void 0, + /*typeParameters*/ + void 0, + [ + t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + t.createIdentifier("obj") + ), + t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + t.createIdentifier("value") + ) + ], + /*type*/ + void 0, + /*equalsGreaterThanToken*/ + void 0, + t.createBlock([ + t.createExpressionStatement( + t.createAssignment( + he, + t.createIdentifier("value") + ) + ) + ]) + ) + ); + } + function h(xe) { + const he = xe.computed ? xe.name : Me(xe.name) ? t.createStringLiteralFromNode(xe.name) : xe.name; + return t.createPropertyAssignment( + "has", + t.createArrowFunction( + /*modifiers*/ + void 0, + /*typeParameters*/ + void 0, + [t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + t.createIdentifier("obj") + )], + /*type*/ + void 0, + /*equalsGreaterThanToken*/ + void 0, + t.createBinaryExpression( + he, + 103, + t.createIdentifier("obj") + ) + ) + ); + } + function S(xe, he) { + const ne = []; + return ne.push(h(xe)), he.get && ne.push(m(xe)), he.set && ne.push(g(xe)), t.createObjectLiteralExpression(ne); + } + function T(xe) { + const he = [ + t.createPropertyAssignment(t.createIdentifier("kind"), t.createStringLiteral(xe.kind)), + t.createPropertyAssignment(t.createIdentifier("name"), xe.name.computed ? xe.name.name : t.createStringLiteralFromNode(xe.name.name)), + t.createPropertyAssignment(t.createIdentifier("static"), xe.static ? t.createTrue() : t.createFalse()), + t.createPropertyAssignment(t.createIdentifier("private"), xe.private ? t.createTrue() : t.createFalse()), + t.createPropertyAssignment(t.createIdentifier("access"), S(xe.name, xe.access)), + t.createPropertyAssignment(t.createIdentifier("metadata"), xe.metadata) + ]; + return t.createObjectLiteralExpression(he); + } + function C(xe) { + return xe.kind === "class" ? u(xe) : T(xe); + } + function D(xe, he, ne, Ae, De, we) { + return e.requestEmitHelper(p9e), t.createCallExpression( + s("__esDecorate"), + /*typeArguments*/ + void 0, + [ + xe ?? t.createNull(), + he ?? t.createNull(), + ne, + C(Ae), + De, + we + ] + ); + } + function w(xe, he, ne) { + return e.requestEmitHelper(d9e), t.createCallExpression( + s("__runInitializers"), + /*typeArguments*/ + void 0, + ne ? [xe, he, ne] : [xe, he] + ); + } + function A(xe) { + return pa(e.getCompilerOptions()) >= 2 ? t.createCallExpression( + t.createPropertyAccessExpression(t.createIdentifier("Object"), "assign"), + /*typeArguments*/ + void 0, + xe + ) : (e.requestEmitHelper(m9e), t.createCallExpression( + s("__assign"), + /*typeArguments*/ + void 0, + xe + )); + } + function O(xe) { + return e.requestEmitHelper(sF), t.createCallExpression( + s("__await"), + /*typeArguments*/ + void 0, + [xe] + ); + } + function F(xe, he) { + return e.requestEmitHelper(sF), e.requestEmitHelper(g9e), (xe.emitNode || (xe.emitNode = {})).flags |= 1572864, t.createCallExpression( + s("__asyncGenerator"), + /*typeArguments*/ + void 0, + [ + he ? t.createThis() : t.createVoidZero(), + t.createIdentifier("arguments"), + xe + ] + ); + } + function R(xe) { + return e.requestEmitHelper(sF), e.requestEmitHelper(h9e), t.createCallExpression( + s("__asyncDelegator"), + /*typeArguments*/ + void 0, + [xe] + ); + } + function W(xe) { + return e.requestEmitHelper(y9e), t.createCallExpression( + s("__asyncValues"), + /*typeArguments*/ + void 0, + [xe] + ); + } + function V(xe, he, ne, Ae) { + e.requestEmitHelper(v9e); + const De = []; + let we = 0; + for (let Ue = 0; Ue < he.length - 1; Ue++) { + const bt = hz(he[Ue]); + if (bt) + if (fa(bt)) { + E.assertIsDefined(ne, "Encountered computed property name but 'computedTempVariables' argument was not provided."); + const Lt = ne[we]; + we++, De.push( + t.createConditionalExpression( + t.createTypeCheck(Lt, "symbol"), + /*questionToken*/ + void 0, + Lt, + /*colonToken*/ + void 0, + t.createAdd(Lt, t.createStringLiteral("")) + ) + ); + } else + De.push(t.createStringLiteralFromNode(bt)); + } + return t.createCallExpression( + s("__rest"), + /*typeArguments*/ + void 0, + [ + xe, + ot( + t.createArrayLiteralExpression(De), + Ae + ) + ] + ); + } + function $(xe, he, ne, Ae, De) { + e.requestEmitHelper(b9e); + const we = t.createFunctionExpression( + /*modifiers*/ + void 0, + t.createToken( + 42 + /* AsteriskToken */ + ), + /*name*/ + void 0, + /*typeParameters*/ + void 0, + Ae ?? [], + /*type*/ + void 0, + De + ); + return (we.emitNode || (we.emitNode = {})).flags |= 1572864, t.createCallExpression( + s("__awaiter"), + /*typeArguments*/ + void 0, + [ + xe ? t.createThis() : t.createVoidZero(), + he ?? t.createVoidZero(), + ne ? bN(t, ne) : t.createVoidZero(), + we + ] + ); + } + function U(xe) { + return e.requestEmitHelper(S9e), t.createCallExpression( + s("__extends"), + /*typeArguments*/ + void 0, + [xe, t.createUniqueName( + "_super", + 48 + /* FileLevel */ + )] + ); + } + function _e(xe, he) { + return e.requestEmitHelper(T9e), t.createCallExpression( + s("__makeTemplateObject"), + /*typeArguments*/ + void 0, + [xe, he] + ); + } + function Z(xe, he, ne) { + return e.requestEmitHelper(k9e), t.createCallExpression( + s("__spreadArray"), + /*typeArguments*/ + void 0, + [xe, he, ne ? n() : i()] + ); + } + function J(xe) { + return e.requestEmitHelper(C9e), t.createCallExpression( + s("__propKey"), + /*typeArguments*/ + void 0, + [xe] + ); + } + function re(xe, he, ne) { + return e.requestEmitHelper(E9e), e.factory.createCallExpression( + s("__setFunctionName"), + /*typeArguments*/ + void 0, + ne ? [xe, he, e.factory.createStringLiteral(ne)] : [xe, he] + ); + } + function te(xe) { + return e.requestEmitHelper(D9e), t.createCallExpression( + s("__values"), + /*typeArguments*/ + void 0, + [xe] + ); + } + function ie(xe, he) { + return e.requestEmitHelper(x9e), t.createCallExpression( + s("__read"), + /*typeArguments*/ + void 0, + he !== void 0 ? [xe, t.createNumericLiteral(he + "")] : [xe] + ); + } + function le(xe) { + return e.requestEmitHelper(w9e), t.createCallExpression( + s("__generator"), + /*typeArguments*/ + void 0, + [t.createThis(), xe] + ); + } + function Te(xe) { + return e.requestEmitHelper(Ghe), t.createCallExpression( + s("__importStar"), + /*typeArguments*/ + void 0, + [xe] + ); + } + function q() { + return e.requestEmitHelper(Ghe), s("__importStar"); + } + function me(xe) { + return e.requestEmitHelper(N9e), t.createCallExpression( + s("__importDefault"), + /*typeArguments*/ + void 0, + [xe] + ); + } + function Ce(xe, he = t.createIdentifier("exports")) { + return e.requestEmitHelper(A9e), e.requestEmitHelper(cte), t.createCallExpression( + s("__exportStar"), + /*typeArguments*/ + void 0, + [xe, he] + ); + } + function Ee(xe, he, ne, Ae) { + e.requestEmitHelper(I9e); + let De; + return Ae ? De = [xe, he, t.createStringLiteral(ne), Ae] : De = [xe, he, t.createStringLiteral(ne)], t.createCallExpression( + s("__classPrivateFieldGet"), + /*typeArguments*/ + void 0, + De + ); + } + function oe(xe, he, ne, Ae, De) { + e.requestEmitHelper(F9e); + let we; + return De ? we = [xe, he, ne, t.createStringLiteral(Ae), De] : we = [xe, he, ne, t.createStringLiteral(Ae)], t.createCallExpression( + s("__classPrivateFieldSet"), + /*typeArguments*/ + void 0, + we + ); + } + function ke(xe, he) { + return e.requestEmitHelper(O9e), t.createCallExpression( + s("__classPrivateFieldIn"), + /*typeArguments*/ + void 0, + [xe, he] + ); + } + function ue(xe, he, ne) { + return e.requestEmitHelper(L9e), t.createCallExpression( + s("__addDisposableResource"), + /*typeArguments*/ + void 0, + [xe, he, ne ? t.createTrue() : t.createFalse()] + ); + } + function it(xe) { + return e.requestEmitHelper(M9e), t.createCallExpression( + s("__disposeResources"), + /*typeArguments*/ + void 0, + [xe] + ); + } + function Oe(xe) { + return e.requestEmitHelper(R9e), t.createCallExpression( + s("__rewriteRelativeImportExtension"), + /*typeArguments*/ + void 0, + e.getCompilerOptions().jsx === 1 ? [xe, t.createTrue()] : [xe] + ); + } + } + function ote(e, t) { + return e === t || e.priority === t.priority ? 0 : e.priority === void 0 ? 1 : t.priority === void 0 ? -1 : uo(e.priority, t.priority); + } + function Hhe(e, ...t) { + return (n) => { + let i = ""; + for (let s = 0; s < t.length; s++) + i += e[s], i += n(t[s]); + return i += e[e.length - 1], i; + }; + } + var u9e = { + name: "typescript:decorate", + importName: "__decorate", + scoped: !1, + priority: 2, + text: ` + var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + };` + }, _9e = { + name: "typescript:metadata", + importName: "__metadata", + scoped: !1, + priority: 3, + text: ` + var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + };` + }, f9e = { + name: "typescript:param", + importName: "__param", + scoped: !1, + priority: 4, + text: ` + var __param = (this && this.__param) || function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + };` + }, p9e = { + name: "typescript:esDecorate", + importName: "__esDecorate", + scoped: !1, + priority: 2, + text: ` + var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } + else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; + };` + }, d9e = { + name: "typescript:runInitializers", + importName: "__runInitializers", + scoped: !1, + priority: 2, + text: ` + var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; + };` + }, m9e = { + name: "typescript:assign", + importName: "__assign", + scoped: !1, + priority: 1, + text: ` + var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); + };` + }, sF = { + name: "typescript:await", + importName: "__await", + scoped: !1, + text: ` + var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }` + }, g9e = { + name: "typescript:asyncGenerator", + importName: "__asyncGenerator", + scoped: !1, + dependencies: [sF], + text: ` + var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } + function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + };` + }, h9e = { + name: "typescript:asyncDelegator", + importName: "__asyncDelegator", + scoped: !1, + dependencies: [sF], + text: ` + var __asyncDelegator = (this && this.__asyncDelegator) || function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } + };` + }, y9e = { + name: "typescript:asyncValues", + importName: "__asyncValues", + scoped: !1, + text: ` + var __asyncValues = (this && this.__asyncValues) || function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + };` + }, v9e = { + name: "typescript:rest", + importName: "__rest", + scoped: !1, + text: ` + var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + };` + }, b9e = { + name: "typescript:awaiter", + importName: "__awaiter", + scoped: !1, + priority: 5, + text: ` + var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + };` + }, S9e = { + name: "typescript:extends", + importName: "__extends", + scoped: !1, + priority: 0, + text: ` + var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })();` + }, T9e = { + name: "typescript:makeTemplateObject", + importName: "__makeTemplateObject", + scoped: !1, + priority: 0, + text: ` + var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + };` + }, x9e = { + name: "typescript:read", + importName: "__read", + scoped: !1, + text: ` + var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + };` + }, k9e = { + name: "typescript:spreadArray", + importName: "__spreadArray", + scoped: !1, + text: ` + var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + };` + }, C9e = { + name: "typescript:propKey", + importName: "__propKey", + scoped: !1, + text: ` + var __propKey = (this && this.__propKey) || function (x) { + return typeof x === "symbol" ? x : "".concat(x); + };` + }, E9e = { + name: "typescript:setFunctionName", + importName: "__setFunctionName", + scoped: !1, + text: ` + var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + };` + }, D9e = { + name: "typescript:values", + importName: "__values", + scoped: !1, + text: ` + var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + };` + }, w9e = { + name: "typescript:generator", + importName: "__generator", + scoped: !1, + priority: 6, + text: ` + var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + };` + }, cte = { + name: "typescript:commonjscreatebinding", + importName: "__createBinding", + scoped: !1, + priority: 1, + text: ` + var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }));` + }, P9e = { + name: "typescript:commonjscreatevalue", + importName: "__setModuleDefault", + scoped: !1, + priority: 1, + text: ` + var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + });` + }, Ghe = { + name: "typescript:commonjsimportstar", + importName: "__importStar", + scoped: !1, + dependencies: [cte, P9e], + priority: 2, + text: ` + var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; + })();` + }, N9e = { + name: "typescript:commonjsimportdefault", + importName: "__importDefault", + scoped: !1, + text: ` + var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + };` + }, A9e = { + name: "typescript:export-star", + importName: "__exportStar", + scoped: !1, + dependencies: [cte], + priority: 2, + text: ` + var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); + };` + }, I9e = { + name: "typescript:classPrivateFieldGet", + importName: "__classPrivateFieldGet", + scoped: !1, + text: ` + var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + };` + }, F9e = { + name: "typescript:classPrivateFieldSet", + importName: "__classPrivateFieldSet", + scoped: !1, + text: ` + var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + };` + }, O9e = { + name: "typescript:classPrivateFieldIn", + importName: "__classPrivateFieldIn", + scoped: !1, + text: ` + var __classPrivateFieldIn = (this && this.__classPrivateFieldIn) || function(state, receiver) { + if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state === "function" ? receiver === state : state.has(receiver); + };` + }, L9e = { + name: "typescript:addDisposableResource", + importName: "__addDisposableResource", + scoped: !1, + text: ` + var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose, inner; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + if (async) inner = dispose; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + };` + }, M9e = { + name: "typescript:disposeResources", + importName: "__disposeResources", + scoped: !1, + text: ` + var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + var r, s = 0; + function next() { + while (r = env.stack.pop()) { + try { + if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); + if (r.dispose) { + var result = r.dispose.call(r.value); + if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + else s |= 1; + } + catch (e) { + fail(e); + } + } + if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); + if (env.hasError) throw env.error; + } + return next(); + }; + })(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; + });` + }, R9e = { + name: "typescript:rewriteRelativeImportExtensions", + importName: "__rewriteRelativeImportExtension", + scoped: !1, + text: ` + var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) { + if (typeof path === "string" && /^\\.\\.?\\//.test(path)) { + return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) { + return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js"); + }); + } + return path; + };` + }, aF = { + name: "typescript:async-super", + scoped: !0, + text: Hhe` + const ${"_superIndex"} = name => super[name];` + }, oF = { + name: "typescript:advanced-async-super", + scoped: !0, + text: Hhe` + const ${"_superIndex"} = (function (geti, seti) { + const cache = Object.create(null); + return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } }); + })(name => super[name], (name, value) => super[name] = value);` + }; + function mD(e, t) { + return Fs(e) && Me(e.expression) && (va(e.expression) & 8192) !== 0 && e.expression.escapedText === t; + } + function d_(e) { + return e.kind === 9; + } + function gD(e) { + return e.kind === 10; + } + function ea(e) { + return e.kind === 11; + } + function Mx(e) { + return e.kind === 12; + } + function qJ(e) { + return e.kind === 14; + } + function NS(e) { + return e.kind === 15; + } + function Rx(e) { + return e.kind === 16; + } + function HJ(e) { + return e.kind === 17; + } + function cF(e) { + return e.kind === 18; + } + function lF(e) { + return e.kind === 26; + } + function lte(e) { + return e.kind === 28; + } + function GJ(e) { + return e.kind === 40; + } + function $J(e) { + return e.kind === 41; + } + function fN(e) { + return e.kind === 42; + } + function pN(e) { + return e.kind === 54; + } + function t1(e) { + return e.kind === 58; + } + function ute(e) { + return e.kind === 59; + } + function uF(e) { + return e.kind === 29; + } + function _te(e) { + return e.kind === 39; + } + function Me(e) { + return e.kind === 80; + } + function Ni(e) { + return e.kind === 81; + } + function jx(e) { + return e.kind === 95; + } + function _F(e) { + return e.kind === 90; + } + function hD(e) { + return e.kind === 134; + } + function fte(e) { + return e.kind === 131; + } + function XJ(e) { + return e.kind === 135; + } + function pte(e) { + return e.kind === 148; + } + function Bx(e) { + return e.kind === 126; + } + function dte(e) { + return e.kind === 128; + } + function mte(e) { + return e.kind === 164; + } + function gte(e) { + return e.kind === 129; + } + function yD(e) { + return e.kind === 108; + } + function vD(e) { + return e.kind === 102; + } + function hte(e) { + return e.kind === 84; + } + function Xu(e) { + return e.kind === 166; + } + function fa(e) { + return e.kind === 167; + } + function Ao(e) { + return e.kind === 168; + } + function Ii(e) { + return e.kind === 169; + } + function ll(e) { + return e.kind === 170; + } + function m_(e) { + return e.kind === 171; + } + function ss(e) { + return e.kind === 172; + } + function pm(e) { + return e.kind === 173; + } + function fc(e) { + return e.kind === 174; + } + function nc(e) { + return e.kind === 175; + } + function Go(e) { + return e.kind === 176; + } + function cp(e) { + return e.kind === 177; + } + function A_(e) { + return e.kind === 178; + } + function Jx(e) { + return e.kind === 179; + } + function dN(e) { + return e.kind === 180; + } + function r1(e) { + return e.kind === 181; + } + function zx(e) { + return e.kind === 182; + } + function Y_(e) { + return e.kind === 183; + } + function ng(e) { + return e.kind === 184; + } + function ZC(e) { + return e.kind === 185; + } + function $b(e) { + return e.kind === 186; + } + function Qu(e) { + return e.kind === 187; + } + function mN(e) { + return e.kind === 188; + } + function Wx(e) { + return e.kind === 189; + } + function KC(e) { + return e.kind === 202; + } + function fF(e) { + return e.kind === 190; + } + function pF(e) { + return e.kind === 191; + } + function L0(e) { + return e.kind === 192; + } + function Ux(e) { + return e.kind === 193; + } + function Xb(e) { + return e.kind === 194; + } + function AS(e) { + return e.kind === 195; + } + function IS(e) { + return e.kind === 196; + } + function bD(e) { + return e.kind === 197; + } + function _v(e) { + return e.kind === 198; + } + function Qb(e) { + return e.kind === 199; + } + function FS(e) { + return e.kind === 200; + } + function M0(e) { + return e.kind === 201; + } + function Ed(e) { + return e.kind === 205; + } + function QJ(e) { + return e.kind === 204; + } + function yte(e) { + return e.kind === 203; + } + function Nf(e) { + return e.kind === 206; + } + function R0(e) { + return e.kind === 207; + } + function ma(e) { + return e.kind === 208; + } + function Ql(e) { + return e.kind === 209; + } + function oa(e) { + return e.kind === 210; + } + function Tn(e) { + return e.kind === 211; + } + function fo(e) { + return e.kind === 212; + } + function Fs(e) { + return e.kind === 213; + } + function Yb(e) { + return e.kind === 214; + } + function fv(e) { + return e.kind === 215; + } + function dF(e) { + return e.kind === 216; + } + function Yu(e) { + return e.kind === 217; + } + function po(e) { + return e.kind === 218; + } + function bo(e) { + return e.kind === 219; + } + function vte(e) { + return e.kind === 220; + } + function e6(e) { + return e.kind === 221; + } + function Vx(e) { + return e.kind === 222; + } + function n1(e) { + return e.kind === 223; + } + function pv(e) { + return e.kind === 224; + } + function YJ(e) { + return e.kind === 225; + } + function fn(e) { + return e.kind === 226; + } + function qx(e) { + return e.kind === 227; + } + function mF(e) { + return e.kind === 228; + } + function gF(e) { + return e.kind === 229; + } + function lp(e) { + return e.kind === 230; + } + function Gc(e) { + return e.kind === 231; + } + function ul(e) { + return e.kind === 232; + } + function Lh(e) { + return e.kind === 233; + } + function t6(e) { + return e.kind === 234; + } + function hF(e) { + return e.kind === 238; + } + function Hx(e) { + return e.kind === 235; + } + function SD(e) { + return e.kind === 236; + } + function $he(e) { + return e.kind === 237; + } + function bte(e) { + return e.kind === 355; + } + function TD(e) { + return e.kind === 356; + } + function r6(e) { + return e.kind === 239; + } + function Ste(e) { + return e.kind === 240; + } + function ks(e) { + return e.kind === 241; + } + function pc(e) { + return e.kind === 243; + } + function ZJ(e) { + return e.kind === 242; + } + function El(e) { + return e.kind === 244; + } + function dv(e) { + return e.kind === 245; + } + function Xhe(e) { + return e.kind === 246; + } + function KJ(e) { + return e.kind === 247; + } + function mv(e) { + return e.kind === 248; + } + function yF(e) { + return e.kind === 249; + } + function gN(e) { + return e.kind === 250; + } + function Qhe(e) { + return e.kind === 251; + } + function Yhe(e) { + return e.kind === 252; + } + function Rp(e) { + return e.kind === 253; + } + function Tte(e) { + return e.kind === 254; + } + function xD(e) { + return e.kind === 255; + } + function i1(e) { + return e.kind === 256; + } + function ez(e) { + return e.kind === 257; + } + function OS(e) { + return e.kind === 258; + } + function Zhe(e) { + return e.kind === 259; + } + function Kn(e) { + return e.kind === 260; + } + function Il(e) { + return e.kind === 261; + } + function Tc(e) { + return e.kind === 262; + } + function $c(e) { + return e.kind === 263; + } + function Yl(e) { + return e.kind === 264; + } + function jp(e) { + return e.kind === 265; + } + function Zb(e) { + return e.kind === 266; + } + function Lc(e) { + return e.kind === 267; + } + function dm(e) { + return e.kind === 268; + } + function kD(e) { + return e.kind === 269; + } + function hN(e) { + return e.kind === 270; + } + function _l(e) { + return e.kind === 271; + } + function zo(e) { + return e.kind === 272; + } + function id(e) { + return e.kind === 273; + } + function Khe(e) { + return e.kind === 302; + } + function xte(e) { + return e.kind === 300; + } + function e0e(e) { + return e.kind === 301; + } + function LS(e) { + return e.kind === 300; + } + function kte(e) { + return e.kind === 301; + } + function Yg(e) { + return e.kind === 274; + } + function ig(e) { + return e.kind === 280; + } + function mm(e) { + return e.kind === 275; + } + function ju(e) { + return e.kind === 276; + } + function Io(e) { + return e.kind === 277; + } + function wc(e) { + return e.kind === 278; + } + function up(e) { + return e.kind === 279; + } + function Tu(e) { + return e.kind === 281; + } + function vF(e) { + return e.kind === 80 || e.kind === 11; + } + function t0e(e) { + return e.kind === 282; + } + function Cte(e) { + return e.kind === 353; + } + function Gx(e) { + return e.kind === 357; + } + function Mh(e) { + return e.kind === 283; + } + function gm(e) { + return e.kind === 284; + } + function MS(e) { + return e.kind === 285; + } + function Dd(e) { + return e.kind === 286; + } + function Kb(e) { + return e.kind === 287; + } + function gv(e) { + return e.kind === 288; + } + function sd(e) { + return e.kind === 289; + } + function Ete(e) { + return e.kind === 290; + } + function hm(e) { + return e.kind === 291; + } + function e2(e) { + return e.kind === 292; + } + function $x(e) { + return e.kind === 293; + } + function n6(e) { + return e.kind === 294; + } + function wd(e) { + return e.kind === 295; + } + function i6(e) { + return e.kind === 296; + } + function CD(e) { + return e.kind === 297; + } + function Z_(e) { + return e.kind === 298; + } + function t2(e) { + return e.kind === 299; + } + function Xc(e) { + return e.kind === 303; + } + function _u(e) { + return e.kind === 304; + } + function Zg(e) { + return e.kind === 305; + } + function j0(e) { + return e.kind === 306; + } + function Ei(e) { + return e.kind === 307; + } + function Dte(e) { + return e.kind === 308; + } + function hv(e) { + return e.kind === 309; + } + function ED(e) { + return e.kind === 310; + } + function yv(e) { + return e.kind === 311; + } + function wte(e) { + return e.kind === 324; + } + function Pte(e) { + return e.kind === 325; + } + function r0e(e) { + return e.kind === 326; + } + function Nte(e) { + return e.kind === 312; + } + function Ate(e) { + return e.kind === 313; + } + function s6(e) { + return e.kind === 314; + } + function bF(e) { + return e.kind === 315; + } + function tz(e) { + return e.kind === 316; + } + function a6(e) { + return e.kind === 317; + } + function SF(e) { + return e.kind === 318; + } + function n0e(e) { + return e.kind === 319; + } + function Pd(e) { + return e.kind === 320; + } + function RS(e) { + return e.kind === 322; + } + function B0(e) { + return e.kind === 323; + } + function Xx(e) { + return e.kind === 328; + } + function i0e(e) { + return e.kind === 330; + } + function Ite(e) { + return e.kind === 332; + } + function rz(e) { + return e.kind === 338; + } + function nz(e) { + return e.kind === 333; + } + function iz(e) { + return e.kind === 334; + } + function sz(e) { + return e.kind === 335; + } + function az(e) { + return e.kind === 336; + } + function TF(e) { + return e.kind === 337; + } + function o6(e) { + return e.kind === 339; + } + function oz(e) { + return e.kind === 331; + } + function s0e(e) { + return e.kind === 347; + } + function yN(e) { + return e.kind === 340; + } + function Af(e) { + return e.kind === 341; + } + function xF(e) { + return e.kind === 342; + } + function cz(e) { + return e.kind === 343; + } + function DD(e) { + return e.kind === 344; + } + function Bp(e) { + return e.kind === 345; + } + function jS(e) { + return e.kind === 346; + } + function a0e(e) { + return e.kind === 327; + } + function Fte(e) { + return e.kind === 348; + } + function kF(e) { + return e.kind === 329; + } + function CF(e) { + return e.kind === 350; + } + function o0e(e) { + return e.kind === 349; + } + function ym(e) { + return e.kind === 351; + } + function c6(e) { + return e.kind === 352; + } + var wD = /* @__PURE__ */ new WeakMap(); + function lz(e, t) { + var n; + const i = e.kind; + return l7(i) ? i === 352 ? e._children : (n = wD.get(t)) == null ? void 0 : n.get(e) : He; + } + function Ote(e, t, n) { + e.kind === 352 && E.fail("Should not need to re-set the children of a SyntaxList."); + let i = wD.get(t); + return i === void 0 && (i = /* @__PURE__ */ new WeakMap(), wD.set(t, i)), i.set(e, n), n; + } + function uz(e, t) { + var n; + e.kind === 352 && E.fail("Did not expect to unset the children of a SyntaxList."), (n = wD.get(t)) == null || n.delete(e); + } + function Lte(e, t) { + const n = wD.get(e); + n !== void 0 && (wD.delete(e), wD.set(t, n)); + } + function vN(e) { + return e.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + e.createNamedExports([]), + /*moduleSpecifier*/ + void 0 + ); + } + function BS(e, t, n, i) { + if (fa(n)) + return ot(e.createElementAccessExpression(t, n.expression), i); + { + const s = ot( + Lg(n) ? e.createPropertyAccessExpression(t, n) : e.createElementAccessExpression(t, n), + n + ); + return _m( + s, + 128 + /* NoNestedSourceMaps */ + ), s; + } + } + function Mte(e, t) { + const n = bv.createIdentifier(e || "React"); + return Fa(n, ls(t)), n; + } + function Rte(e, t, n) { + if (Xu(t)) { + const i = Rte(e, t.left, n), s = e.createIdentifier(An(t.right)); + return s.escapedText = t.right.escapedText, e.createPropertyAccessExpression(i, s); + } else + return Mte(An(t), n); + } + function _z(e, t, n, i) { + return t ? Rte(e, t, i) : e.createPropertyAccessExpression( + Mte(n, i), + "createElement" + ); + } + function j9e(e, t, n, i) { + return t ? Rte(e, t, i) : e.createPropertyAccessExpression( + Mte(n, i), + "Fragment" + ); + } + function jte(e, t, n, i, s, o) { + const c = [n]; + if (i && c.push(i), s && s.length > 0) + if (i || c.push(e.createNull()), s.length > 1) + for (const _ of s) + xu(_), c.push(_); + else + c.push(s[0]); + return ot( + e.createCallExpression( + t, + /*typeArguments*/ + void 0, + c + ), + o + ); + } + function Bte(e, t, n, i, s, o, c) { + const u = [j9e(e, n, i, o), e.createNull()]; + if (s && s.length > 0) + if (s.length > 1) + for (const m of s) + xu(m), u.push(m); + else + u.push(s[0]); + return ot( + e.createCallExpression( + _z(e, t, i, o), + /*typeArguments*/ + void 0, + u + ), + c + ); + } + function fz(e, t, n) { + if (Il(t)) { + const i = ya(t.declarations), s = e.updateVariableDeclaration( + i, + i.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + n + ); + return ot( + e.createVariableStatement( + /*modifiers*/ + void 0, + e.updateVariableDeclarationList(t, [s]) + ), + /*location*/ + t + ); + } else { + const i = ot( + e.createAssignment(t, n), + /*location*/ + t + ); + return ot( + e.createExpressionStatement(i), + /*location*/ + t + ); + } + } + function bN(e, t) { + if (Xu(t)) { + const n = bN(e, t.left), i = Fa(ot(e.cloneNode(t.right), t.right), t.right.parent); + return ot(e.createPropertyAccessExpression(n, i), t); + } else + return Fa(ot(e.cloneNode(t), t), t.parent); + } + function pz(e, t) { + return Me(t) ? e.createStringLiteralFromNode(t) : fa(t) ? Fa(ot(e.cloneNode(t.expression), t.expression), t.expression.parent) : Fa(ot(e.cloneNode(t), t), t.parent); + } + function B9e(e, t, n, i, s) { + const { firstAccessor: o, getAccessor: c, setAccessor: _ } = zb(t, n); + if (n === o) + return ot( + e.createObjectDefinePropertyCall( + i, + pz(e, n.name), + e.createPropertyDescriptor({ + enumerable: e.createFalse(), + configurable: !0, + get: c && ot( + Sn( + e.createFunctionExpression( + Tb(c), + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + c.parameters, + /*type*/ + void 0, + c.body + // TODO: GH#18217 + ), + c + ), + c + ), + set: _ && ot( + Sn( + e.createFunctionExpression( + Tb(_), + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + _.parameters, + /*type*/ + void 0, + _.body + // TODO: GH#18217 + ), + _ + ), + _ + ) + }, !s) + ), + o + ); + } + function J9e(e, t, n) { + return Sn( + ot( + e.createAssignment( + BS( + e, + n, + t.name, + /*location*/ + t.name + ), + t.initializer + ), + t + ), + t + ); + } + function z9e(e, t, n) { + return Sn( + ot( + e.createAssignment( + BS( + e, + n, + t.name, + /*location*/ + t.name + ), + e.cloneNode(t.name) + ), + /*location*/ + t + ), + /*original*/ + t + ); + } + function W9e(e, t, n) { + return Sn( + ot( + e.createAssignment( + BS( + e, + n, + t.name, + /*location*/ + t.name + ), + Sn( + ot( + e.createFunctionExpression( + Tb(t), + t.asteriskToken, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + t.parameters, + /*type*/ + void 0, + t.body + // TODO: GH#18217 + ), + /*location*/ + t + ), + /*original*/ + t + ) + ), + /*location*/ + t + ), + /*original*/ + t + ); + } + function Jte(e, t, n, i) { + switch (n.name && Ni(n.name) && E.failBadSyntaxKind(n.name, "Private identifiers are not allowed in object literals."), n.kind) { + case 177: + case 178: + return B9e(e, t.properties, n, i, !!t.multiLine); + case 303: + return J9e(e, n, i); + case 304: + return z9e(e, n, i); + case 174: + return W9e(e, n, i); + } + } + function EF(e, t, n, i, s) { + const o = t.operator; + E.assert(o === 46 || o === 47, "Expected 'node' to be a pre- or post-increment or pre- or post-decrement expression"); + const c = e.createTempVariable(i); + n = e.createAssignment(c, n), ot(n, t.operand); + let _ = pv(t) ? e.createPrefixUnaryExpression(o, c) : e.createPostfixUnaryExpression(c, o); + return ot(_, t), s && (_ = e.createAssignment(s, _), ot(_, t)), n = e.createComma(n, _), ot(n, t), YJ(t) && (n = e.createComma(n, c), ot(n, t)), n; + } + function dz(e) { + return (va(e) & 65536) !== 0; + } + function Rh(e) { + return (va(e) & 32768) !== 0; + } + function DF(e) { + return (va(e) & 16384) !== 0; + } + function c0e(e) { + return ea(e.expression) && e.expression.text === "use strict"; + } + function mz(e) { + for (const t of e) + if (nm(t)) { + if (c0e(t)) + return t; + } else + break; + } + function zte(e) { + const t = Uc(e); + return t !== void 0 && nm(t) && c0e(t); + } + function SN(e) { + return e.kind === 226 && e.operatorToken.kind === 28; + } + function PD(e) { + return SN(e) || TD(e); + } + function r2(e) { + return Yu(e) && an(e) && !!Y1(e); + } + function l6(e) { + const t = Ly(e); + return E.assertIsDefined(t), t; + } + function wF(e, t = 31) { + switch (e.kind) { + case 217: + return t & -2147483648 && r2(e) ? !1 : (t & 1) !== 0; + case 216: + case 234: + case 238: + return (t & 2) !== 0; + case 233: + return (t & 16) !== 0; + case 235: + return (t & 4) !== 0; + case 355: + return (t & 8) !== 0; + } + return !1; + } + function xc(e, t = 31) { + for (; wF(e, t); ) + e = e.expression; + return e; + } + function Wte(e, t = 31) { + let n = e.parent; + for (; wF(n, t); ) + n = n.parent, E.assert(n); + return n; + } + function xu(e) { + return iF( + e, + /*newLine*/ + !0 + ); + } + function TN(e) { + const t = Jo(e, Ei), n = t && t.emitNode; + return n && n.externalHelpersModuleName; + } + function Ute(e) { + const t = Jo(e, Ei), n = t && t.emitNode; + return !!n && (!!n.externalHelpersModuleName || !!n.externalHelpers); + } + function gz(e, t, n, i, s, o, c) { + if (i.importHelpers && EC(n, i)) { + const _ = Ru(i), u = GS(n, i), m = U9e(n); + if (_ >= 5 && _ <= 99 || u === 99 || u === void 0 && _ === 200) { + if (m) { + const g = []; + for (const h of m) { + const S = h.importName; + S && Qf(g, S); + } + if (at(g)) { + g.sort(cu); + const h = e.createNamedImports( + gr(g, (D) => E7(n, D) ? e.createImportSpecifier( + /*isTypeOnly*/ + !1, + /*propertyName*/ + void 0, + e.createIdentifier(D) + ) : e.createImportSpecifier( + /*isTypeOnly*/ + !1, + e.createIdentifier(D), + t.getUnscopedHelperName(D) + )) + ), S = Jo(n, Ei), T = uu(S); + T.externalHelpers = !0; + const C = e.createImportDeclaration( + /*modifiers*/ + void 0, + e.createImportClause( + /*isTypeOnly*/ + !1, + /*name*/ + void 0, + h + ), + e.createStringLiteral(Wy), + /*attributes*/ + void 0 + ); + return wS( + C, + 2 + /* NeverApplyImportHelper */ + ), C; + } + } + } else { + const g = V9e(e, n, i, m, s, o || c); + if (g) { + const h = e.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + g, + e.createExternalModuleReference(e.createStringLiteral(Wy)) + ); + return wS( + h, + 2 + /* NeverApplyImportHelper */ + ), h; + } + } + } + } + function U9e(e) { + return kn(zJ(e), (t) => !t.scoped); + } + function V9e(e, t, n, i, s, o) { + const c = TN(t); + if (c) + return c; + if (at(i) || (s || Hg(n) && o) && KD(t, n) < 4) { + const u = Jo(t, Ei), m = uu(u); + return m.externalHelpersModuleName || (m.externalHelpersModuleName = e.createUniqueName(Wy)); + } + } + function u6(e, t, n) { + const i = OC(t); + if (i && !bS(t) && !w7(t)) { + const s = i.name; + return s.kind === 11 ? e.getGeneratedNameForNode(t) : Fo(s) ? s : e.createIdentifier(Db(n, s) || An(s)); + } + if (t.kind === 272 && t.importClause || t.kind === 278 && t.moduleSpecifier) + return e.getGeneratedNameForNode(t); + } + function Qx(e, t, n, i, s, o) { + const c = dx(t); + if (c && ea(c)) + return H9e(t, i, e, s, o) || q9e(e, c, n) || e.cloneNode(c); + } + function q9e(e, t, n) { + const i = n.renamedDependencies && n.renamedDependencies.get(t.text); + return i ? e.createStringLiteral(i) : void 0; + } + function xN(e, t, n, i) { + if (t) { + if (t.moduleName) + return e.createStringLiteral(t.moduleName); + if (!t.isDeclarationFile && i.outFile) + return e.createStringLiteral(BB(n, t.fileName)); + } + } + function H9e(e, t, n, i, s) { + return xN(n, i.getExternalModuleFileFromDeclaration(e), t, s); + } + function kN(e) { + if (jP(e)) + return e.initializer; + if (Xc(e)) { + const t = e.initializer; + return Cl( + t, + /*excludeCompoundAssignment*/ + !0 + ) ? t.right : void 0; + } + if (_u(e)) + return e.objectAssignmentInitializer; + if (Cl( + e, + /*excludeCompoundAssignment*/ + !0 + )) + return e.right; + if (lp(e)) + return kN(e.expression); + } + function s1(e) { + if (jP(e)) + return e.name; + if (Eh(e)) { + switch (e.kind) { + case 303: + return s1(e.initializer); + case 304: + return e.name; + case 305: + return s1(e.expression); + } + return; + } + return Cl( + e, + /*excludeCompoundAssignment*/ + !0 + ) ? s1(e.left) : lp(e) ? s1(e.expression) : e; + } + function PF(e) { + switch (e.kind) { + case 169: + case 208: + return e.dotDotDotToken; + case 230: + case 305: + return e; + } + } + function hz(e) { + const t = NF(e); + return E.assert(!!t || Zg(e), "Invalid property name for binding element."), t; + } + function NF(e) { + switch (e.kind) { + case 208: + if (e.propertyName) { + const n = e.propertyName; + return Ni(n) ? E.failBadSyntaxKind(n) : fa(n) && l0e(n.expression) ? n.expression : n; + } + break; + case 303: + if (e.name) { + const n = e.name; + return Ni(n) ? E.failBadSyntaxKind(n) : fa(n) && l0e(n.expression) ? n.expression : n; + } + break; + case 305: + return e.name && Ni(e.name) ? E.failBadSyntaxKind(e.name) : e.name; + } + const t = s1(e); + if (t && Fc(t)) + return t; + } + function l0e(e) { + const t = e.kind; + return t === 11 || t === 9; + } + function _6(e) { + switch (e.kind) { + case 206: + case 207: + case 209: + return e.elements; + case 210: + return e.properties; + } + } + function yz(e) { + if (e) { + let t = e; + for (; ; ) { + if (Me(t) || !t.body) + return Me(t) ? t : t.name; + t = t.body; + } + } + } + function u0e(e) { + const t = e.kind; + return t === 176 || t === 178; + } + function Vte(e) { + const t = e.kind; + return t === 176 || t === 177 || t === 178; + } + function vz(e) { + const t = e.kind; + return t === 303 || t === 304 || t === 262 || t === 176 || t === 181 || t === 175 || t === 282 || t === 243 || t === 264 || t === 265 || t === 266 || t === 267 || t === 271 || t === 272 || t === 270 || t === 278 || t === 277; + } + function qte(e) { + const t = e.kind; + return t === 175 || t === 303 || t === 304 || t === 282 || t === 270; + } + function Hte(e) { + return t1(e) || pN(e); + } + function Gte(e) { + return Me(e) || bD(e); + } + function $te(e) { + return pte(e) || GJ(e) || $J(e); + } + function Xte(e) { + return t1(e) || GJ(e) || $J(e); + } + function Qte(e) { + return Me(e) || ea(e); + } + function G9e(e) { + return e === 43; + } + function $9e(e) { + return e === 42 || e === 44 || e === 45; + } + function X9e(e) { + return G9e(e) || $9e(e); + } + function Q9e(e) { + return e === 40 || e === 41; + } + function Y9e(e) { + return Q9e(e) || X9e(e); + } + function Z9e(e) { + return e === 48 || e === 49 || e === 50; + } + function bz(e) { + return Z9e(e) || Y9e(e); + } + function K9e(e) { + return e === 30 || e === 33 || e === 32 || e === 34 || e === 104 || e === 103; + } + function eLe(e) { + return K9e(e) || bz(e); + } + function tLe(e) { + return e === 35 || e === 37 || e === 36 || e === 38; + } + function rLe(e) { + return tLe(e) || eLe(e); + } + function nLe(e) { + return e === 51 || e === 52 || e === 53; + } + function iLe(e) { + return nLe(e) || rLe(e); + } + function sLe(e) { + return e === 56 || e === 57; + } + function aLe(e) { + return sLe(e) || iLe(e); + } + function oLe(e) { + return e === 61 || aLe(e) || Ah(e); + } + function cLe(e) { + return oLe(e) || e === 28; + } + function Yte(e) { + return cLe(e.kind); + } + var Sz; + ((e) => { + function t(g, h, S, T, C, D, w) { + const A = h > 0 ? C[h - 1] : void 0; + return E.assertEqual(S[h], t), C[h] = g.onEnter(T[h], A, w), S[h] = _(g, t), h; + } + e.enter = t; + function n(g, h, S, T, C, D, w) { + E.assertEqual(S[h], n), E.assertIsDefined(g.onLeft), S[h] = _(g, n); + const A = g.onLeft(T[h].left, C[h], T[h]); + return A ? (m(h, T, A), u(h, S, T, C, A)) : h; + } + e.left = n; + function i(g, h, S, T, C, D, w) { + return E.assertEqual(S[h], i), E.assertIsDefined(g.onOperator), S[h] = _(g, i), g.onOperator(T[h].operatorToken, C[h], T[h]), h; + } + e.operator = i; + function s(g, h, S, T, C, D, w) { + E.assertEqual(S[h], s), E.assertIsDefined(g.onRight), S[h] = _(g, s); + const A = g.onRight(T[h].right, C[h], T[h]); + return A ? (m(h, T, A), u(h, S, T, C, A)) : h; + } + e.right = s; + function o(g, h, S, T, C, D, w) { + E.assertEqual(S[h], o), S[h] = _(g, o); + const A = g.onExit(T[h], C[h]); + if (h > 0) { + if (h--, g.foldState) { + const O = S[h] === o ? "right" : "left"; + C[h] = g.foldState(C[h], A, O); + } + } else + D.value = A; + return h; + } + e.exit = o; + function c(g, h, S, T, C, D, w) { + return E.assertEqual(S[h], c), h; + } + e.done = c; + function _(g, h) { + switch (h) { + case t: + if (g.onLeft) return n; + // falls through + case n: + if (g.onOperator) return i; + // falls through + case i: + if (g.onRight) return s; + // falls through + case s: + return o; + case o: + return c; + case c: + return c; + default: + E.fail("Invalid state"); + } + } + e.nextState = _; + function u(g, h, S, T, C) { + return g++, h[g] = t, S[g] = C, T[g] = void 0, g; + } + function m(g, h, S) { + if (E.shouldAssert( + 2 + /* Aggressive */ + )) + for (; g >= 0; ) + E.assert(h[g] !== S, "Circular traversal detected."), g--; + } + })(Sz || (Sz = {})); + var lLe = class { + constructor(e, t, n, i, s, o) { + this.onEnter = e, this.onLeft = t, this.onOperator = n, this.onRight = i, this.onExit = s, this.foldState = o; + } + }; + function AF(e, t, n, i, s, o) { + const c = new lLe(e, t, n, i, s, o); + return _; + function _(u, m) { + const g = { value: void 0 }, h = [Sz.enter], S = [u], T = [void 0]; + let C = 0; + for (; h[C] !== Sz.done; ) + C = h[C](c, C, h, S, T, g, m); + return E.assertEqual(C, 0), g.value; + } + } + function uLe(e) { + return e === 95 || e === 90; + } + function CN(e) { + const t = e.kind; + return uLe(t); + } + function Zte(e, t) { + if (t !== void 0) + return t.length === 0 ? t : ot(e.createNodeArray([], t.hasTrailingComma), t); + } + function EN(e) { + var t; + const n = e.emitNode.autoGenerate; + if (n.flags & 4) { + const i = n.id; + let s = e, o = s.original; + for (; o; ) { + s = o; + const c = (t = s.emitNode) == null ? void 0 : t.autoGenerate; + if (Lg(s) && (c === void 0 || c.flags & 4 && c.id !== i)) + break; + o = s.original; + } + return s; + } + return e; + } + function f6(e, t) { + return typeof e == "object" ? vv( + /*privateName*/ + !1, + e.prefix, + e.node, + e.suffix, + t + ) : typeof e == "string" ? e.length > 0 && e.charCodeAt(0) === 35 ? e.slice(1) : e : ""; + } + function _Le(e, t) { + return typeof e == "string" ? e : fLe(e, E.checkDefined(t)); + } + function fLe(e, t) { + return lS(e) ? t(e).slice(1) : Fo(e) ? t(e) : Ni(e) ? e.escapedText.slice(1) : An(e); + } + function vv(e, t, n, i, s) { + return t = f6(t, s), i = f6(i, s), n = _Le(n, s), `${e ? "#" : ""}${t}${n}${i}`; + } + function Tz(e, t, n, i) { + return e.updatePropertyDeclaration( + t, + n, + e.getGeneratedPrivateNameForNode( + t.name, + /*prefix*/ + void 0, + "_accessor_storage" + ), + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + i + ); + } + function Kte(e, t, n, i, s = e.createThis()) { + return e.createGetAccessorDeclaration( + n, + i, + [], + /*type*/ + void 0, + e.createBlock([ + e.createReturnStatement( + e.createPropertyAccessExpression( + s, + e.getGeneratedPrivateNameForNode( + t.name, + /*prefix*/ + void 0, + "_accessor_storage" + ) + ) + ) + ]) + ); + } + function ere(e, t, n, i, s = e.createThis()) { + return e.createSetAccessorDeclaration( + n, + i, + [e.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "value" + )], + e.createBlock([ + e.createExpressionStatement( + e.createAssignment( + e.createPropertyAccessExpression( + s, + e.getGeneratedPrivateNameForNode( + t.name, + /*prefix*/ + void 0, + "_accessor_storage" + ) + ), + e.createIdentifier("value") + ) + ) + ]) + ); + } + function IF(e) { + let t = e.expression; + for (; ; ) { + if (t = xc(t), TD(t)) { + t = _a(t.elements); + continue; + } + if (SN(t)) { + t = t.right; + continue; + } + if (Cl( + t, + /*excludeCompoundAssignment*/ + !0 + ) && Fo(t.left)) + return t; + break; + } + } + function pLe(e) { + return Yu(e) && no(e) && !e.emitNode; + } + function FF(e, t) { + if (pLe(e)) + FF(e.expression, t); + else if (SN(e)) + FF(e.left, t), FF(e.right, t); + else if (TD(e)) + for (const n of e.elements) + FF(n, t); + else + t.push(e); + } + function tre(e) { + const t = []; + return FF(e, t), t; + } + function DN(e) { + if (e.transformFlags & 65536) return !0; + if (e.transformFlags & 128) + for (const t of _6(e)) { + const n = s1(t); + if (n && S4(n) && (n.transformFlags & 65536 || n.transformFlags & 128 && DN(n))) + return !0; + } + return !1; + } + function ot(e, t) { + return t ? Cd(e, t.pos, t.end) : e; + } + function Jp(e) { + const t = e.kind; + return t === 168 || t === 169 || t === 171 || t === 172 || t === 173 || t === 174 || t === 176 || t === 177 || t === 178 || t === 181 || t === 185 || t === 218 || t === 219 || t === 231 || t === 243 || t === 262 || t === 263 || t === 264 || t === 265 || t === 266 || t === 267 || t === 271 || t === 272 || t === 277 || t === 278; + } + function n2(e) { + const t = e.kind; + return t === 169 || t === 172 || t === 174 || t === 177 || t === 178 || t === 231 || t === 263; + } + var _0e, f0e, p0e, d0e, m0e, rre = { + createBaseSourceFileNode: (e) => new (m0e || (m0e = $l.getSourceFileConstructor()))(e, -1, -1), + createBaseIdentifierNode: (e) => new (p0e || (p0e = $l.getIdentifierConstructor()))(e, -1, -1), + createBasePrivateIdentifierNode: (e) => new (d0e || (d0e = $l.getPrivateIdentifierConstructor()))(e, -1, -1), + createBaseTokenNode: (e) => new (f0e || (f0e = $l.getTokenConstructor()))(e, -1, -1), + createBaseNode: (e) => new (_0e || (_0e = $l.getNodeConstructor()))(e, -1, -1) + }, bv = aN(1, rre); + function Ht(e, t) { + return t && e(t); + } + function Di(e, t, n) { + if (n) { + if (t) + return t(n); + for (const i of n) { + const s = e(i); + if (s) + return s; + } + } + } + function xz(e, t) { + return e.charCodeAt(t + 1) === 42 && e.charCodeAt(t + 2) === 42 && e.charCodeAt(t + 3) !== 47; + } + function wN(e) { + return lr(e.statements, dLe) || mLe(e); + } + function dLe(e) { + return Jp(e) && gLe( + e, + 95 + /* ExportKeyword */ + ) || _l(e) && Mh(e.moduleReference) || zo(e) || Io(e) || wc(e) ? e : void 0; + } + function mLe(e) { + return e.flags & 8388608 ? g0e(e) : void 0; + } + function g0e(e) { + return hLe(e) ? e : ms(e, g0e); + } + function gLe(e, t) { + return at(e.modifiers, (n) => n.kind === t); + } + function hLe(e) { + return SD(e) && e.keywordToken === 102 && e.name.escapedText === "meta"; + } + var yLe = { + 166: function(t, n, i) { + return Ht(n, t.left) || Ht(n, t.right); + }, + 168: function(t, n, i) { + return Di(n, i, t.modifiers) || Ht(n, t.name) || Ht(n, t.constraint) || Ht(n, t.default) || Ht(n, t.expression); + }, + 304: function(t, n, i) { + return Di(n, i, t.modifiers) || Ht(n, t.name) || Ht(n, t.questionToken) || Ht(n, t.exclamationToken) || Ht(n, t.equalsToken) || Ht(n, t.objectAssignmentInitializer); + }, + 305: function(t, n, i) { + return Ht(n, t.expression); + }, + 169: function(t, n, i) { + return Di(n, i, t.modifiers) || Ht(n, t.dotDotDotToken) || Ht(n, t.name) || Ht(n, t.questionToken) || Ht(n, t.type) || Ht(n, t.initializer); + }, + 172: function(t, n, i) { + return Di(n, i, t.modifiers) || Ht(n, t.name) || Ht(n, t.questionToken) || Ht(n, t.exclamationToken) || Ht(n, t.type) || Ht(n, t.initializer); + }, + 171: function(t, n, i) { + return Di(n, i, t.modifiers) || Ht(n, t.name) || Ht(n, t.questionToken) || Ht(n, t.type) || Ht(n, t.initializer); + }, + 303: function(t, n, i) { + return Di(n, i, t.modifiers) || Ht(n, t.name) || Ht(n, t.questionToken) || Ht(n, t.exclamationToken) || Ht(n, t.initializer); + }, + 260: function(t, n, i) { + return Ht(n, t.name) || Ht(n, t.exclamationToken) || Ht(n, t.type) || Ht(n, t.initializer); + }, + 208: function(t, n, i) { + return Ht(n, t.dotDotDotToken) || Ht(n, t.propertyName) || Ht(n, t.name) || Ht(n, t.initializer); + }, + 181: function(t, n, i) { + return Di(n, i, t.modifiers) || Di(n, i, t.typeParameters) || Di(n, i, t.parameters) || Ht(n, t.type); + }, + 185: function(t, n, i) { + return Di(n, i, t.modifiers) || Di(n, i, t.typeParameters) || Di(n, i, t.parameters) || Ht(n, t.type); + }, + 184: function(t, n, i) { + return Di(n, i, t.modifiers) || Di(n, i, t.typeParameters) || Di(n, i, t.parameters) || Ht(n, t.type); + }, + 179: h0e, + 180: h0e, + 174: function(t, n, i) { + return Di(n, i, t.modifiers) || Ht(n, t.asteriskToken) || Ht(n, t.name) || Ht(n, t.questionToken) || Ht(n, t.exclamationToken) || Di(n, i, t.typeParameters) || Di(n, i, t.parameters) || Ht(n, t.type) || Ht(n, t.body); + }, + 173: function(t, n, i) { + return Di(n, i, t.modifiers) || Ht(n, t.name) || Ht(n, t.questionToken) || Di(n, i, t.typeParameters) || Di(n, i, t.parameters) || Ht(n, t.type); + }, + 176: function(t, n, i) { + return Di(n, i, t.modifiers) || Ht(n, t.name) || Di(n, i, t.typeParameters) || Di(n, i, t.parameters) || Ht(n, t.type) || Ht(n, t.body); + }, + 177: function(t, n, i) { + return Di(n, i, t.modifiers) || Ht(n, t.name) || Di(n, i, t.typeParameters) || Di(n, i, t.parameters) || Ht(n, t.type) || Ht(n, t.body); + }, + 178: function(t, n, i) { + return Di(n, i, t.modifiers) || Ht(n, t.name) || Di(n, i, t.typeParameters) || Di(n, i, t.parameters) || Ht(n, t.type) || Ht(n, t.body); + }, + 262: function(t, n, i) { + return Di(n, i, t.modifiers) || Ht(n, t.asteriskToken) || Ht(n, t.name) || Di(n, i, t.typeParameters) || Di(n, i, t.parameters) || Ht(n, t.type) || Ht(n, t.body); + }, + 218: function(t, n, i) { + return Di(n, i, t.modifiers) || Ht(n, t.asteriskToken) || Ht(n, t.name) || Di(n, i, t.typeParameters) || Di(n, i, t.parameters) || Ht(n, t.type) || Ht(n, t.body); + }, + 219: function(t, n, i) { + return Di(n, i, t.modifiers) || Di(n, i, t.typeParameters) || Di(n, i, t.parameters) || Ht(n, t.type) || Ht(n, t.equalsGreaterThanToken) || Ht(n, t.body); + }, + 175: function(t, n, i) { + return Di(n, i, t.modifiers) || Ht(n, t.body); + }, + 183: function(t, n, i) { + return Ht(n, t.typeName) || Di(n, i, t.typeArguments); + }, + 182: function(t, n, i) { + return Ht(n, t.assertsModifier) || Ht(n, t.parameterName) || Ht(n, t.type); + }, + 186: function(t, n, i) { + return Ht(n, t.exprName) || Di(n, i, t.typeArguments); + }, + 187: function(t, n, i) { + return Di(n, i, t.members); + }, + 188: function(t, n, i) { + return Ht(n, t.elementType); + }, + 189: function(t, n, i) { + return Di(n, i, t.elements); + }, + 192: y0e, + 193: y0e, + 194: function(t, n, i) { + return Ht(n, t.checkType) || Ht(n, t.extendsType) || Ht(n, t.trueType) || Ht(n, t.falseType); + }, + 195: function(t, n, i) { + return Ht(n, t.typeParameter); + }, + 205: function(t, n, i) { + return Ht(n, t.argument) || Ht(n, t.attributes) || Ht(n, t.qualifier) || Di(n, i, t.typeArguments); + }, + 302: function(t, n, i) { + return Ht(n, t.assertClause); + }, + 196: v0e, + 198: v0e, + 199: function(t, n, i) { + return Ht(n, t.objectType) || Ht(n, t.indexType); + }, + 200: function(t, n, i) { + return Ht(n, t.readonlyToken) || Ht(n, t.typeParameter) || Ht(n, t.nameType) || Ht(n, t.questionToken) || Ht(n, t.type) || Di(n, i, t.members); + }, + 201: function(t, n, i) { + return Ht(n, t.literal); + }, + 202: function(t, n, i) { + return Ht(n, t.dotDotDotToken) || Ht(n, t.name) || Ht(n, t.questionToken) || Ht(n, t.type); + }, + 206: b0e, + 207: b0e, + 209: function(t, n, i) { + return Di(n, i, t.elements); + }, + 210: function(t, n, i) { + return Di(n, i, t.properties); + }, + 211: function(t, n, i) { + return Ht(n, t.expression) || Ht(n, t.questionDotToken) || Ht(n, t.name); + }, + 212: function(t, n, i) { + return Ht(n, t.expression) || Ht(n, t.questionDotToken) || Ht(n, t.argumentExpression); + }, + 213: S0e, + 214: S0e, + 215: function(t, n, i) { + return Ht(n, t.tag) || Ht(n, t.questionDotToken) || Di(n, i, t.typeArguments) || Ht(n, t.template); + }, + 216: function(t, n, i) { + return Ht(n, t.type) || Ht(n, t.expression); + }, + 217: function(t, n, i) { + return Ht(n, t.expression); + }, + 220: function(t, n, i) { + return Ht(n, t.expression); + }, + 221: function(t, n, i) { + return Ht(n, t.expression); + }, + 222: function(t, n, i) { + return Ht(n, t.expression); + }, + 224: function(t, n, i) { + return Ht(n, t.operand); + }, + 229: function(t, n, i) { + return Ht(n, t.asteriskToken) || Ht(n, t.expression); + }, + 223: function(t, n, i) { + return Ht(n, t.expression); + }, + 225: function(t, n, i) { + return Ht(n, t.operand); + }, + 226: function(t, n, i) { + return Ht(n, t.left) || Ht(n, t.operatorToken) || Ht(n, t.right); + }, + 234: function(t, n, i) { + return Ht(n, t.expression) || Ht(n, t.type); + }, + 235: function(t, n, i) { + return Ht(n, t.expression); + }, + 238: function(t, n, i) { + return Ht(n, t.expression) || Ht(n, t.type); + }, + 236: function(t, n, i) { + return Ht(n, t.name); + }, + 227: function(t, n, i) { + return Ht(n, t.condition) || Ht(n, t.questionToken) || Ht(n, t.whenTrue) || Ht(n, t.colonToken) || Ht(n, t.whenFalse); + }, + 230: function(t, n, i) { + return Ht(n, t.expression); + }, + 241: T0e, + 268: T0e, + 307: function(t, n, i) { + return Di(n, i, t.statements) || Ht(n, t.endOfFileToken); + }, + 243: function(t, n, i) { + return Di(n, i, t.modifiers) || Ht(n, t.declarationList); + }, + 261: function(t, n, i) { + return Di(n, i, t.declarations); + }, + 244: function(t, n, i) { + return Ht(n, t.expression); + }, + 245: function(t, n, i) { + return Ht(n, t.expression) || Ht(n, t.thenStatement) || Ht(n, t.elseStatement); + }, + 246: function(t, n, i) { + return Ht(n, t.statement) || Ht(n, t.expression); + }, + 247: function(t, n, i) { + return Ht(n, t.expression) || Ht(n, t.statement); + }, + 248: function(t, n, i) { + return Ht(n, t.initializer) || Ht(n, t.condition) || Ht(n, t.incrementor) || Ht(n, t.statement); + }, + 249: function(t, n, i) { + return Ht(n, t.initializer) || Ht(n, t.expression) || Ht(n, t.statement); + }, + 250: function(t, n, i) { + return Ht(n, t.awaitModifier) || Ht(n, t.initializer) || Ht(n, t.expression) || Ht(n, t.statement); + }, + 251: x0e, + 252: x0e, + 253: function(t, n, i) { + return Ht(n, t.expression); + }, + 254: function(t, n, i) { + return Ht(n, t.expression) || Ht(n, t.statement); + }, + 255: function(t, n, i) { + return Ht(n, t.expression) || Ht(n, t.caseBlock); + }, + 269: function(t, n, i) { + return Di(n, i, t.clauses); + }, + 296: function(t, n, i) { + return Ht(n, t.expression) || Di(n, i, t.statements); + }, + 297: function(t, n, i) { + return Di(n, i, t.statements); + }, + 256: function(t, n, i) { + return Ht(n, t.label) || Ht(n, t.statement); + }, + 257: function(t, n, i) { + return Ht(n, t.expression); + }, + 258: function(t, n, i) { + return Ht(n, t.tryBlock) || Ht(n, t.catchClause) || Ht(n, t.finallyBlock); + }, + 299: function(t, n, i) { + return Ht(n, t.variableDeclaration) || Ht(n, t.block); + }, + 170: function(t, n, i) { + return Ht(n, t.expression); + }, + 263: k0e, + 231: k0e, + 264: function(t, n, i) { + return Di(n, i, t.modifiers) || Ht(n, t.name) || Di(n, i, t.typeParameters) || Di(n, i, t.heritageClauses) || Di(n, i, t.members); + }, + 265: function(t, n, i) { + return Di(n, i, t.modifiers) || Ht(n, t.name) || Di(n, i, t.typeParameters) || Ht(n, t.type); + }, + 266: function(t, n, i) { + return Di(n, i, t.modifiers) || Ht(n, t.name) || Di(n, i, t.members); + }, + 306: function(t, n, i) { + return Ht(n, t.name) || Ht(n, t.initializer); + }, + 267: function(t, n, i) { + return Di(n, i, t.modifiers) || Ht(n, t.name) || Ht(n, t.body); + }, + 271: function(t, n, i) { + return Di(n, i, t.modifiers) || Ht(n, t.name) || Ht(n, t.moduleReference); + }, + 272: function(t, n, i) { + return Di(n, i, t.modifiers) || Ht(n, t.importClause) || Ht(n, t.moduleSpecifier) || Ht(n, t.attributes); + }, + 273: function(t, n, i) { + return Ht(n, t.name) || Ht(n, t.namedBindings); + }, + 300: function(t, n, i) { + return Di(n, i, t.elements); + }, + 301: function(t, n, i) { + return Ht(n, t.name) || Ht(n, t.value); + }, + 270: function(t, n, i) { + return Di(n, i, t.modifiers) || Ht(n, t.name); + }, + 274: function(t, n, i) { + return Ht(n, t.name); + }, + 280: function(t, n, i) { + return Ht(n, t.name); + }, + 275: C0e, + 279: C0e, + 278: function(t, n, i) { + return Di(n, i, t.modifiers) || Ht(n, t.exportClause) || Ht(n, t.moduleSpecifier) || Ht(n, t.attributes); + }, + 276: E0e, + 281: E0e, + 277: function(t, n, i) { + return Di(n, i, t.modifiers) || Ht(n, t.expression); + }, + 228: function(t, n, i) { + return Ht(n, t.head) || Di(n, i, t.templateSpans); + }, + 239: function(t, n, i) { + return Ht(n, t.expression) || Ht(n, t.literal); + }, + 203: function(t, n, i) { + return Ht(n, t.head) || Di(n, i, t.templateSpans); + }, + 204: function(t, n, i) { + return Ht(n, t.type) || Ht(n, t.literal); + }, + 167: function(t, n, i) { + return Ht(n, t.expression); + }, + 298: function(t, n, i) { + return Di(n, i, t.types); + }, + 233: function(t, n, i) { + return Ht(n, t.expression) || Di(n, i, t.typeArguments); + }, + 283: function(t, n, i) { + return Ht(n, t.expression); + }, + 282: function(t, n, i) { + return Di(n, i, t.modifiers); + }, + 356: function(t, n, i) { + return Di(n, i, t.elements); + }, + 284: function(t, n, i) { + return Ht(n, t.openingElement) || Di(n, i, t.children) || Ht(n, t.closingElement); + }, + 288: function(t, n, i) { + return Ht(n, t.openingFragment) || Di(n, i, t.children) || Ht(n, t.closingFragment); + }, + 285: D0e, + 286: D0e, + 292: function(t, n, i) { + return Di(n, i, t.properties); + }, + 291: function(t, n, i) { + return Ht(n, t.name) || Ht(n, t.initializer); + }, + 293: function(t, n, i) { + return Ht(n, t.expression); + }, + 294: function(t, n, i) { + return Ht(n, t.dotDotDotToken) || Ht(n, t.expression); + }, + 287: function(t, n, i) { + return Ht(n, t.tagName); + }, + 295: function(t, n, i) { + return Ht(n, t.namespace) || Ht(n, t.name); + }, + 190: ND, + 191: ND, + 309: ND, + 315: ND, + 314: ND, + 316: ND, + 318: ND, + 317: function(t, n, i) { + return Di(n, i, t.parameters) || Ht(n, t.type); + }, + 320: function(t, n, i) { + return (typeof t.comment == "string" ? void 0 : Di(n, i, t.comment)) || Di(n, i, t.tags); + }, + 347: function(t, n, i) { + return Ht(n, t.tagName) || Ht(n, t.name) || (typeof t.comment == "string" ? void 0 : Di(n, i, t.comment)); + }, + 310: function(t, n, i) { + return Ht(n, t.name); + }, + 311: function(t, n, i) { + return Ht(n, t.left) || Ht(n, t.right); + }, + 341: w0e, + 348: w0e, + 330: function(t, n, i) { + return Ht(n, t.tagName) || (typeof t.comment == "string" ? void 0 : Di(n, i, t.comment)); + }, + 329: function(t, n, i) { + return Ht(n, t.tagName) || Ht(n, t.class) || (typeof t.comment == "string" ? void 0 : Di(n, i, t.comment)); + }, + 328: function(t, n, i) { + return Ht(n, t.tagName) || Ht(n, t.class) || (typeof t.comment == "string" ? void 0 : Di(n, i, t.comment)); + }, + 345: function(t, n, i) { + return Ht(n, t.tagName) || Ht(n, t.constraint) || Di(n, i, t.typeParameters) || (typeof t.comment == "string" ? void 0 : Di(n, i, t.comment)); + }, + 346: function(t, n, i) { + return Ht(n, t.tagName) || (t.typeExpression && t.typeExpression.kind === 309 ? Ht(n, t.typeExpression) || Ht(n, t.fullName) || (typeof t.comment == "string" ? void 0 : Di(n, i, t.comment)) : Ht(n, t.fullName) || Ht(n, t.typeExpression) || (typeof t.comment == "string" ? void 0 : Di(n, i, t.comment))); + }, + 338: function(t, n, i) { + return Ht(n, t.tagName) || Ht(n, t.fullName) || Ht(n, t.typeExpression) || (typeof t.comment == "string" ? void 0 : Di(n, i, t.comment)); + }, + 342: AD, + 344: AD, + 343: AD, + 340: AD, + 350: AD, + 349: AD, + 339: AD, + 323: function(t, n, i) { + return lr(t.typeParameters, n) || lr(t.parameters, n) || Ht(n, t.type); + }, + 324: nre, + 325: nre, + 326: nre, + 322: function(t, n, i) { + return lr(t.jsDocPropertyTags, n); + }, + 327: p6, + 332: p6, + 333: p6, + 334: p6, + 335: p6, + 336: p6, + 331: p6, + 337: p6, + 351: vLe, + 355: bLe + }; + function h0e(e, t, n) { + return Di(t, n, e.typeParameters) || Di(t, n, e.parameters) || Ht(t, e.type); + } + function y0e(e, t, n) { + return Di(t, n, e.types); + } + function v0e(e, t, n) { + return Ht(t, e.type); + } + function b0e(e, t, n) { + return Di(t, n, e.elements); + } + function S0e(e, t, n) { + return Ht(t, e.expression) || // TODO: should we separate these branches out? + Ht(t, e.questionDotToken) || Di(t, n, e.typeArguments) || Di(t, n, e.arguments); + } + function T0e(e, t, n) { + return Di(t, n, e.statements); + } + function x0e(e, t, n) { + return Ht(t, e.label); + } + function k0e(e, t, n) { + return Di(t, n, e.modifiers) || Ht(t, e.name) || Di(t, n, e.typeParameters) || Di(t, n, e.heritageClauses) || Di(t, n, e.members); + } + function C0e(e, t, n) { + return Di(t, n, e.elements); + } + function E0e(e, t, n) { + return Ht(t, e.propertyName) || Ht(t, e.name); + } + function D0e(e, t, n) { + return Ht(t, e.tagName) || Di(t, n, e.typeArguments) || Ht(t, e.attributes); + } + function ND(e, t, n) { + return Ht(t, e.type); + } + function w0e(e, t, n) { + return Ht(t, e.tagName) || (e.isNameFirst ? Ht(t, e.name) || Ht(t, e.typeExpression) : Ht(t, e.typeExpression) || Ht(t, e.name)) || (typeof e.comment == "string" ? void 0 : Di(t, n, e.comment)); + } + function AD(e, t, n) { + return Ht(t, e.tagName) || Ht(t, e.typeExpression) || (typeof e.comment == "string" ? void 0 : Di(t, n, e.comment)); + } + function nre(e, t, n) { + return Ht(t, e.name); + } + function p6(e, t, n) { + return Ht(t, e.tagName) || (typeof e.comment == "string" ? void 0 : Di(t, n, e.comment)); + } + function vLe(e, t, n) { + return Ht(t, e.tagName) || Ht(t, e.importClause) || Ht(t, e.moduleSpecifier) || Ht(t, e.attributes) || (typeof e.comment == "string" ? void 0 : Di(t, n, e.comment)); + } + function bLe(e, t, n) { + return Ht(t, e.expression); + } + function ms(e, t, n) { + if (e === void 0 || e.kind <= 165) + return; + const i = yLe[e.kind]; + return i === void 0 ? void 0 : i(e, t, n); + } + function Yx(e, t, n) { + const i = P0e(e), s = []; + for (; s.length < i.length; ) + s.push(e); + for (; i.length !== 0; ) { + const o = i.pop(), c = s.pop(); + if (os(o)) { + if (n) { + const _ = n(o, c); + if (_) { + if (_ === "skip") continue; + return _; + } + } + for (let _ = o.length - 1; _ >= 0; --_) + i.push(o[_]), s.push(c); + } else { + const _ = t(o, c); + if (_) { + if (_ === "skip") continue; + return _; + } + if (o.kind >= 166) + for (const u of P0e(o)) + i.push(u), s.push(o); + } + } + } + function P0e(e) { + const t = []; + return ms(e, n, n), t; + function n(i) { + t.unshift(i); + } + } + function N0e(e) { + e.externalModuleIndicator = wN(e); + } + function Zx(e, t, n, i = !1, s) { + var o, c; + (o = nn) == null || o.push( + nn.Phase.Parse, + "createSourceFile", + { path: e }, + /*separateBeginAndEnd*/ + !0 + ), Qo("beforeParse"); + let _; + const { + languageVersion: u, + setExternalModuleIndicator: m, + impliedNodeFormat: g, + jsDocParsingMode: h + } = typeof n == "object" ? n : { languageVersion: n }; + if (u === 100) + _ = Sv.parseSourceFile( + e, + t, + u, + /*syntaxCursor*/ + void 0, + i, + 6, + Ja, + h + ); + else { + const S = g === void 0 ? m : (T) => (T.impliedNodeFormat = g, (m || N0e)(T)); + _ = Sv.parseSourceFile( + e, + t, + u, + /*syntaxCursor*/ + void 0, + i, + s, + S, + h + ); + } + return Qo("afterParse"), Yf("Parse", "beforeParse", "afterParse"), (c = nn) == null || c.pop(), _; + } + function Kx(e, t) { + return Sv.parseIsolatedEntityName(e, t); + } + function PN(e, t) { + return Sv.parseJsonText(e, t); + } + function el(e) { + return e.externalModuleIndicator !== void 0; + } + function kz(e, t, n, i = !1) { + const s = Cz.updateSourceFile(e, t, n, i); + return s.flags |= e.flags & 12582912, s; + } + function ire(e, t, n) { + const i = Sv.JSDocParser.parseIsolatedJSDocComment(e, t, n); + return i && i.jsDoc && Sv.fixupParentReferences(i.jsDoc), i; + } + function A0e(e, t, n) { + return Sv.JSDocParser.parseJSDocTypeExpressionForTests(e, t, n); + } + var Sv; + ((e) => { + var t = Og( + 99, + /*skipTrivia*/ + !0 + ), n = 40960, i, s, o, c, _; + function u(H) { + return we++, H; + } + var m = { + createBaseSourceFileNode: (H) => u(new _( + H, + /*pos*/ + 0, + /*end*/ + 0 + )), + createBaseIdentifierNode: (H) => u(new o( + H, + /*pos*/ + 0, + /*end*/ + 0 + )), + createBasePrivateIdentifierNode: (H) => u(new c( + H, + /*pos*/ + 0, + /*end*/ + 0 + )), + createBaseTokenNode: (H) => u(new s( + H, + /*pos*/ + 0, + /*end*/ + 0 + )), + createBaseNode: (H) => u(new i( + H, + /*pos*/ + 0, + /*end*/ + 0 + )) + }, g = aN(11, m), { + createNodeArray: h, + createNumericLiteral: S, + createStringLiteral: T, + createLiteralLikeNode: C, + createIdentifier: D, + createPrivateIdentifier: w, + createToken: A, + createArrayLiteralExpression: O, + createObjectLiteralExpression: F, + createPropertyAccessExpression: R, + createPropertyAccessChain: W, + createElementAccessExpression: V, + createElementAccessChain: $, + createCallExpression: U, + createCallChain: _e, + createNewExpression: Z, + createParenthesizedExpression: J, + createBlock: re, + createVariableStatement: te, + createExpressionStatement: ie, + createIfStatement: le, + createWhileStatement: Te, + createForStatement: q, + createForOfStatement: me, + createVariableDeclaration: Ce, + createVariableDeclarationList: Ee + } = g, oe, ke, ue, it, Oe, xe, he, ne, Ae, De, we, Ue, bt, Lt, er, Nr, Dt = !0, Qt = !1; + function Wr(H, Pe, qe, vt, Wt = !1, br, Rn, Ai = 0) { + var ui; + if (br = j5(H, br), br === 6) { + const qi = qn(H, Pe, qe, vt, Wt); + return ON( + qi, + (ui = qi.statements[0]) == null ? void 0 : ui.expression, + qi.parseDiagnostics, + /*returnValue*/ + !1, + /*jsonConversionNotifier*/ + void 0 + ), qi.referencedFiles = He, qi.typeReferenceDirectives = He, qi.libReferenceDirectives = He, qi.amdDependencies = He, qi.hasNoDefaultLib = !1, qi.pragmas = _R, qi; + } + Bt(H, Pe, qe, vt, br, Ai); + const _i = pi(qe, Wt, br, Rn || N0e, Ai); + return bi(), _i; + } + e.parseSourceFile = Wr; + function yr(H, Pe) { + Bt( + "", + H, + Pe, + /*syntaxCursor*/ + void 0, + 1, + 0 + /* ParseAll */ + ), de(); + const qe = et( + /*allowReservedWords*/ + !0 + ), vt = X() === 1 && !he.length; + return bi(), vt ? qe : void 0; + } + e.parseIsolatedEntityName = yr; + function qn(H, Pe, qe = 2, vt, Wt = !1) { + Bt( + H, + Pe, + qe, + vt, + 6, + 0 + /* ParseAll */ + ), ke = Nr, de(); + const br = L(); + let Rn, Ai; + if (X() === 1) + Rn = Oi([], br, br), Ai = Yc(); + else { + let qi; + for (; X() !== 1; ) { + let Ia; + switch (X()) { + case 23: + Ia = wk(); + break; + case 112: + case 97: + case 106: + Ia = Yc(); + break; + case 41: + Vt( + () => de() === 9 && de() !== 59 + /* ColonToken */ + ) ? Ia = Uv() : Ia = sy(); + break; + case 9: + case 11: + if (Vt( + () => de() !== 59 + /* ColonToken */ + )) { + Ia = Ar(); + break; + } + // falls through + default: + Ia = sy(); + break; + } + qi && os(qi) ? qi.push(Ia) : qi ? qi = [qi, Ia] : (qi = Ia, X() !== 1 && Xt(p.Unexpected_token)); + } + const Ya = os(qi) ? qt(O(qi), br) : E.checkDefined(qi), Za = ie(Ya); + qt(Za, br), Rn = Oi([Za], br), Ai = hs(1, p.Unexpected_token); + } + const ui = gt( + H, + 2, + 6, + /*isDeclarationFile*/ + !1, + Rn, + Ai, + ke, + Ja + ); + Wt && Re(ui), ui.nodeCount = we, ui.identifierCount = bt, ui.identifiers = Ue, ui.parseDiagnostics = Ex(he, ui), ne && (ui.jsDocDiagnostics = Ex(ne, ui)); + const _i = ui; + return bi(), _i; + } + e.parseJsonText = qn; + function Bt(H, Pe, qe, vt, Wt, br) { + switch (i = $l.getNodeConstructor(), s = $l.getTokenConstructor(), o = $l.getIdentifierConstructor(), c = $l.getPrivateIdentifierConstructor(), _ = $l.getSourceFileConstructor(), oe = Hs(H), ue = Pe, it = qe, Ae = vt, Oe = Wt, xe = V3(Wt), he = [], Lt = 0, Ue = /* @__PURE__ */ new Map(), bt = 0, we = 0, ke = 0, Dt = !0, Oe) { + case 1: + case 2: + Nr = 524288; + break; + case 6: + Nr = 134742016; + break; + default: + Nr = 0; + break; + } + Qt = !1, t.setText(ue), t.setOnError(fe), t.setScriptTarget(it), t.setLanguageVariant(xe), t.setScriptKind(Oe), t.setJSDocParsingMode(br); + } + function bi() { + t.clearCommentDirectives(), t.setText(""), t.setOnError(void 0), t.setScriptKind( + 0 + /* Unknown */ + ), t.setJSDocParsingMode( + 0 + /* ParseAll */ + ), ue = void 0, it = void 0, Ae = void 0, Oe = void 0, xe = void 0, ke = 0, he = void 0, ne = void 0, Lt = 0, Ue = void 0, er = void 0, Dt = !0; + } + function pi(H, Pe, qe, vt, Wt) { + const br = fl(oe); + br && (Nr |= 33554432), ke = Nr, de(); + const Rn = Do(0, hp); + E.assert( + X() === 1 + /* EndOfFileToken */ + ); + const Ai = ve(), ui = jr(Yc(), Ai), _i = gt(oe, H, qe, br, Rn, ui, ke, vt); + return Ez(_i, ue), Dz(_i, qi), _i.commentDirectives = t.getCommentDirectives(), _i.nodeCount = we, _i.identifierCount = bt, _i.identifiers = Ue, _i.parseDiagnostics = Ex(he, _i), _i.jsDocParsingMode = Wt, ne && (_i.jsDocDiagnostics = Ex(ne, _i)), Pe && Re(_i), _i; + function qi(Ya, Za, Ia) { + he.push(Cx(oe, ue, Ya, Za, Ia)); + } + } + let Xn = !1; + function jr(H, Pe) { + if (!Pe) + return H; + E.assert(!H.jsDoc); + const qe = Li(lB(H, ue), (vt) => Ua.parseJSDocComment(H, vt.pos, vt.end - vt.pos)); + return qe.length && (H.jsDoc = qe), Xn && (Xn = !1, H.flags |= 536870912), H; + } + function di(H) { + const Pe = Ae, qe = Cz.createSyntaxCursor(H); + Ae = { currentNode: qi }; + const vt = [], Wt = he; + he = []; + let br = 0, Rn = ui(H.statements, 0); + for (; Rn !== -1; ) { + const Ya = H.statements[br], Za = H.statements[Rn]; + Nn(vt, H.statements, br, Rn), br = _i(H.statements, Rn); + const Ia = ec(Wt, (rl) => rl.start >= Ya.pos), yp = Ia >= 0 ? ec(Wt, (rl) => rl.start >= Za.pos, Ia) : -1; + Ia >= 0 && Nn(he, Wt, Ia, yp >= 0 ? yp : void 0), fr( + () => { + const rl = Nr; + for (Nr |= 65536, t.resetTokenState(Za.pos), de(); X() !== 1; ) { + const Vf = t.getTokenFullStart(), n0 = ml(0, hp); + if (vt.push(n0), Vf === t.getTokenFullStart() && de(), br >= 0) { + const _h = H.statements[br]; + if (n0.end === _h.pos) + break; + n0.end > _h.pos && (br = _i(H.statements, br + 1)); + } + } + Nr = rl; + }, + 2 + /* Reparse */ + ), Rn = br >= 0 ? ui(H.statements, br) : -1; + } + if (br >= 0) { + const Ya = H.statements[br]; + Nn(vt, H.statements, br); + const Za = ec(Wt, (Ia) => Ia.start >= Ya.pos); + Za >= 0 && Nn(he, Wt, Za); + } + return Ae = Pe, g.updateSourceFile(H, ot(h(vt), H.statements)); + function Ai(Ya) { + return !(Ya.flags & 65536) && !!(Ya.transformFlags & 67108864); + } + function ui(Ya, Za) { + for (let Ia = Za; Ia < Ya.length; Ia++) + if (Ai(Ya[Ia])) + return Ia; + return -1; + } + function _i(Ya, Za) { + for (let Ia = Za; Ia < Ya.length; Ia++) + if (!Ai(Ya[Ia])) + return Ia; + return -1; + } + function qi(Ya) { + const Za = qe.currentNode(Ya); + return Dt && Za && Ai(Za) && sre(Za), Za; + } + } + function Re(H) { + lv( + H, + /*incremental*/ + !0 + ); + } + e.fixupParentReferences = Re; + function gt(H, Pe, qe, vt, Wt, br, Rn, Ai) { + let ui = g.createSourceFile(Wt, br, Rn); + if (PJ(ui, 0, ue.length), _i(ui), !vt && el(ui) && ui.transformFlags & 67108864) { + const qi = ui; + ui = di(ui), qi !== ui && _i(ui); + } + return ui; + function _i(qi) { + qi.text = ue, qi.bindDiagnostics = [], qi.bindSuggestionDiagnostics = void 0, qi.languageVersion = Pe, qi.fileName = H, qi.languageVariant = V3(qe), qi.isDeclarationFile = vt, qi.scriptKind = qe, Ai(qi), qi.setExternalModuleIndicator = Ai; + } + } + function tr(H, Pe) { + H ? Nr |= Pe : Nr &= ~Pe; + } + function qr(H) { + tr( + H, + 8192 + /* DisallowInContext */ + ); + } + function Bn(H) { + tr( + H, + 16384 + /* YieldContext */ + ); + } + function wn(H) { + tr( + H, + 32768 + /* DecoratorContext */ + ); + } + function ki(H) { + tr( + H, + 65536 + /* AwaitContext */ + ); + } + function Cs(H, Pe) { + const qe = H & Nr; + if (qe) { + tr( + /*val*/ + !1, + qe + ); + const vt = Pe(); + return tr( + /*val*/ + !0, + qe + ), vt; + } + return Pe(); + } + function Ks(H, Pe) { + const qe = H & ~Nr; + if (qe) { + tr( + /*val*/ + !0, + qe + ); + const vt = Pe(); + return tr( + /*val*/ + !1, + qe + ), vt; + } + return Pe(); + } + function xr(H) { + return Cs(8192, H); + } + function gs(H) { + return Ks(8192, H); + } + function Qe(H) { + return Cs(131072, H); + } + function Ct(H) { + return Ks(131072, H); + } + function ee(H) { + return Ks(16384, H); + } + function Ve(H) { + return Ks(32768, H); + } + function K(H) { + return Ks(65536, H); + } + function Ie(H) { + return Cs(65536, H); + } + function $e(H) { + return Ks(81920, H); + } + function Ke(H) { + return Cs(81920, H); + } + function Je(H) { + return (Nr & H) !== 0; + } + function Ye() { + return Je( + 16384 + /* YieldContext */ + ); + } + function _t() { + return Je( + 8192 + /* DisallowInContext */ + ); + } + function yt() { + return Je( + 131072 + /* DisallowConditionalTypesContext */ + ); + } + function We() { + return Je( + 32768 + /* DecoratorContext */ + ); + } + function Et() { + return Je( + 65536 + /* AwaitContext */ + ); + } + function Xt(H, ...Pe) { + return ye(t.getTokenStart(), t.getTokenEnd(), H, ...Pe); + } + function rn(H, Pe, qe, ...vt) { + const Wt = Co(he); + let br; + return (!Wt || H !== Wt.start) && (br = Cx(oe, ue, H, Pe, qe, ...vt), he.push(br)), Qt = !0, br; + } + function ye(H, Pe, qe, ...vt) { + return rn(H, Pe - H, qe, ...vt); + } + function ft(H, Pe, ...qe) { + ye(H.pos, H.end, Pe, ...qe); + } + function fe(H, Pe, qe) { + rn(t.getTokenEnd(), Pe, H, qe); + } + function L() { + return t.getTokenFullStart(); + } + function ve() { + return t.hasPrecedingJSDocComment(); + } + function X() { + return De; + } + function lt() { + return De = t.scan(); + } + function zt(H) { + return de(), H(); + } + function de() { + return f_(De) && (t.hasUnicodeEscape() || t.hasExtendedUnicodeEscape()) && ye(t.getTokenStart(), t.getTokenEnd(), p.Keywords_cannot_contain_escape_characters), lt(); + } + function st() { + return De = t.scanJsDocToken(); + } + function Gt(H) { + return De = t.scanJSDocCommentTextToken(H); + } + function Xr() { + return De = t.reScanGreaterToken(); + } + function Rr() { + return De = t.reScanSlashToken(); + } + function Jr(H) { + return De = t.reScanTemplateToken(H); + } + function tt() { + return De = t.reScanLessThanToken(); + } + function ut() { + return De = t.reScanHashToken(); + } + function Mt() { + return De = t.scanJsxIdentifier(); + } + function Pt() { + return De = t.scanJsxToken(); + } + function Zt() { + return De = t.scanJsxAttributeValue(); + } + function fr(H, Pe) { + const qe = De, vt = he.length, Wt = Qt, br = Nr, Rn = Pe !== 0 ? t.lookAhead(H) : t.tryScan(H); + return E.assert(br === Nr), (!Rn || Pe !== 0) && (De = qe, Pe !== 2 && (he.length = vt), Qt = Wt), Rn; + } + function Vt(H) { + return fr( + H, + 1 + /* Lookahead */ + ); + } + function ir(H) { + return fr( + H, + 0 + /* TryParse */ + ); + } + function Tr() { + return X() === 80 ? !0 : X() > 118; + } + function _r() { + return X() === 80 ? !0 : X() === 127 && Ye() || X() === 135 && Et() ? !1 : X() > 118; + } + function Ot(H, Pe, qe = !0) { + return X() === H ? (qe && de(), !0) : (Pe ? Xt(Pe) : Xt(p._0_expected, Xs(H)), !1); + } + const mi = Object.keys(QI).filter((H) => H.length > 2); + function Js(H) { + if (fv(H)) { + ye(aa(ue, H.template.pos), H.template.end, p.Module_declaration_names_may_only_use_or_quoted_strings); + return; + } + const Pe = Me(H) ? An(H) : void 0; + if (!Pe || !E_(Pe, it)) { + Xt(p._0_expected, Xs( + 27 + /* SemicolonToken */ + )); + return; + } + const qe = aa(ue, H.pos); + switch (Pe) { + case "const": + case "let": + case "var": + ye(qe, H.end, p.Variable_declaration_not_allowed_at_this_location); + return; + case "declare": + return; + case "interface": + Ms( + p.Interface_name_cannot_be_0, + p.Interface_must_be_given_a_name, + 19 + /* OpenBraceToken */ + ); + return; + case "is": + ye(qe, t.getTokenStart(), p.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); + return; + case "module": + case "namespace": + Ms( + p.Namespace_name_cannot_be_0, + p.Namespace_must_be_given_a_name, + 19 + /* OpenBraceToken */ + ); + return; + case "type": + Ms( + p.Type_alias_name_cannot_be_0, + p.Type_alias_must_be_given_a_name, + 64 + /* EqualsToken */ + ); + return; + } + const vt = Sb(Pe, mi, lo) ?? Ns(Pe); + if (vt) { + ye(qe, H.end, p.Unknown_keyword_or_identifier_Did_you_mean_0, vt); + return; + } + X() !== 0 && ye(qe, H.end, p.Unexpected_keyword_or_identifier); + } + function Ms(H, Pe, qe) { + X() === qe ? Xt(Pe) : Xt(H, t.getTokenValue()); + } + function Ns(H) { + for (const Pe of mi) + if (H.length > Pe.length + 2 && Vi(H, Pe)) + return `${Pe} ${H.slice(Pe.length)}`; + } + function kc(H, Pe, qe) { + if (X() === 60 && !t.hasPrecedingLineBreak()) { + Xt(p.Decorators_must_precede_the_name_and_all_keywords_of_property_declarations); + return; + } + if (X() === 21) { + Xt(p.Cannot_start_a_function_call_in_a_type_annotation), de(); + return; + } + if (Pe && !Zi()) { + qe ? Xt(p._0_expected, Xs( + 27 + /* SemicolonToken */ + )) : Xt(p.Expected_for_property_initializer); + return; + } + if (!Gs()) { + if (qe) { + Xt(p._0_expected, Xs( + 27 + /* SemicolonToken */ + )); + return; + } + Js(H); + } + } + function Wo(H) { + return X() === H ? (st(), !0) : (E.assert(t5(H)), Xt(p._0_expected, Xs(H)), !1); + } + function sc(H, Pe, qe, vt) { + if (X() === Pe) { + de(); + return; + } + const Wt = Xt(p._0_expected, Xs(Pe)); + qe && Wt && Bs( + Wt, + Cx(oe, ue, vt, 1, p.The_parser_expected_to_find_a_1_to_match_the_0_token_here, Xs(H), Xs(Pe)) + ); + } + function ri(H) { + return X() === H ? (de(), !0) : !1; + } + function zs(H) { + if (X() === H) + return Yc(); + } + function eu(H) { + if (X() === H) + return Sl(); + } + function hs(H, Pe, qe) { + return zs(H) || Qa( + H, + /*reportAtCurrentPosition*/ + !1, + Pe || p._0_expected, + qe || Xs(H) + ); + } + function Bu(H) { + const Pe = eu(H); + return Pe || (E.assert(t5(H)), Qa( + H, + /*reportAtCurrentPosition*/ + !1, + p._0_expected, + Xs(H) + )); + } + function Yc() { + const H = L(), Pe = X(); + return de(), qt(A(Pe), H); + } + function Sl() { + const H = L(), Pe = X(); + return st(), qt(A(Pe), H); + } + function Zi() { + return X() === 27 ? !0 : X() === 20 || X() === 1 || t.hasPrecedingLineBreak(); + } + function Gs() { + return Zi() ? (X() === 27 && de(), !0) : !1; + } + function Ca() { + return Gs() || Ot( + 27 + /* SemicolonToken */ + ); + } + function Oi(H, Pe, qe, vt) { + const Wt = h(H, vt); + return Cd(Wt, Pe, qe ?? t.getTokenFullStart()), Wt; + } + function qt(H, Pe, qe) { + return Cd(H, Pe, qe ?? t.getTokenFullStart()), Nr && (H.flags |= Nr), Qt && (Qt = !1, H.flags |= 262144), H; + } + function Qa(H, Pe, qe, ...vt) { + Pe ? rn(t.getTokenFullStart(), 0, qe, ...vt) : qe && Xt(qe, ...vt); + const Wt = L(), br = H === 80 ? D( + "", + /*originalKeywordKind*/ + void 0 + ) : Ry(H) ? g.createTemplateLiteralLikeNode( + H, + "", + "", + /*templateFlags*/ + void 0 + ) : H === 9 ? S( + "", + /*numericLiteralFlags*/ + void 0 + ) : H === 11 ? T( + "", + /*isSingleQuote*/ + void 0 + ) : H === 282 ? g.createMissingDeclaration() : A(H); + return qt(br, Wt); + } + function Mc(H) { + let Pe = Ue.get(H); + return Pe === void 0 && Ue.set(H, Pe = H), Pe; + } + function Ol(H, Pe, qe) { + if (H) { + bt++; + const Ai = t.hasPrecedingJSDocLeadingAsterisks() ? t.getTokenStart() : L(), ui = X(), _i = Mc(t.getTokenValue()), qi = t.hasExtendedUnicodeEscape(); + return lt(), qt(D(_i, ui, qi), Ai); + } + if (X() === 81) + return Xt(qe || p.Private_identifiers_are_not_allowed_outside_class_bodies), Ol( + /*isIdentifier*/ + !0 + ); + if (X() === 0 && t.tryScan( + () => t.reScanInvalidIdentifier() === 80 + /* Identifier */ + )) + return Ol( + /*isIdentifier*/ + !0 + ); + bt++; + const vt = X() === 1, Wt = t.isReservedWord(), br = t.getTokenText(), Rn = Wt ? p.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here : p.Identifier_expected; + return Qa(80, vt, Pe || Rn, br); + } + function Ll(H) { + return Ol( + Tr(), + /*diagnosticMessage*/ + void 0, + H + ); + } + function To(H, Pe) { + return Ol(_r(), H, Pe); + } + function ge(H) { + return Ol(c_(X()), H); + } + function G() { + return (t.hasUnicodeEscape() || t.hasExtendedUnicodeEscape()) && Xt(p.Unicode_escape_sequence_cannot_appear_here), Ol(c_(X())); + } + function rt() { + return c_(X()) || X() === 11 || X() === 9 || X() === 10; + } + function wt() { + return c_(X()) || X() === 11; + } + function Kt(H) { + if (X() === 11 || X() === 9 || X() === 10) { + const Pe = Ar(); + return Pe.text = Mc(Pe.text), Pe; + } + return X() === 23 ? Mn() : X() === 81 ? pr() : ge(); + } + function Yr() { + return Kt(); + } + function Mn() { + const H = L(); + Ot( + 23 + /* OpenBracketToken */ + ); + const Pe = xr(tu); + return Ot( + 24 + /* CloseBracketToken */ + ), qt(g.createComputedPropertyName(Pe), H); + } + function pr() { + const H = L(), Pe = w(Mc(t.getTokenValue())); + return de(), qt(Pe, H); + } + function En(H) { + return X() === H && ir(hi); + } + function Ji() { + return de(), t.hasPrecedingLineBreak() ? !1 : mc(); + } + function hi() { + switch (X()) { + case 87: + return de() === 94; + case 95: + return de(), X() === 90 ? Vt(Uo) : X() === 156 ? Vt(Mo) : ba(); + case 90: + return Uo(); + case 126: + return de(), mc(); + case 139: + case 153: + return de(), Rc(); + default: + return Ji(); + } + } + function ba() { + return X() === 60 || X() !== 42 && X() !== 130 && X() !== 19 && mc(); + } + function Mo() { + return de(), ba(); + } + function dc() { + return By(X()) && ir(hi); + } + function mc() { + return X() === 23 || X() === 19 || X() === 42 || X() === 26 || rt(); + } + function Rc() { + return X() === 23 || rt(); + } + function Uo() { + return de(), X() === 86 || X() === 100 || X() === 120 || X() === 60 || X() === 128 && Vt(Ik) || X() === 134 && Vt(oc); + } + function ac(H, Pe) { + if (gc(H)) + return !0; + switch (H) { + case 0: + case 1: + case 3: + return !(X() === 27 && Pe) && lE(); + case 2: + return X() === 84 || X() === 90; + case 4: + return Vt(Le); + case 5: + return Vt(_E) || X() === 27 && !Pe; + case 6: + return X() === 23 || rt(); + case 12: + switch (X()) { + case 23: + case 42: + case 26: + case 25: + return !0; + default: + return rt(); + } + case 18: + return rt(); + case 9: + return X() === 23 || X() === 26 || rt(); + case 24: + return wt(); + case 7: + return X() === 19 ? Vt(Vp) : Pe ? _r() && !Fe() : K0() && !Fe(); + case 8: + return dn(); + case 10: + return X() === 28 || X() === 26 || dn(); + case 19: + return X() === 103 || X() === 87 || _r(); + case 15: + switch (X()) { + case 28: + case 25: + return !0; + } + // falls through + case 11: + return X() === 26 || Dm(); + case 16: + return nh( + /*isJSDocParameter*/ + !1 + ); + case 17: + return nh( + /*isJSDocParameter*/ + !0 + ); + case 20: + case 21: + return X() === 28 || jd(); + case 22: + return Yv(); + case 23: + return X() === 161 && Vt(dT) ? !1 : X() === 11 ? !0 : c_(X()); + case 13: + return c_(X()) || X() === 19; + case 14: + return !0; + case 25: + return !0; + case 26: + return E.fail("ParsingContext.Count used as a context"); + // Not a real context, only a marker. + default: + E.assertNever(H, "Non-exhaustive case in 'isListElement'."); + } + } + function Vp() { + if (E.assert( + X() === 19 + /* OpenBraceToken */ + ), de() === 20) { + const H = de(); + return H === 28 || H === 19 || H === 96 || H === 119; + } + return !0; + } + function dl() { + return de(), _r(); + } + function Ml() { + return de(), c_(X()); + } + function Rl() { + return de(), SY(X()); + } + function Fe() { + return X() === 119 || X() === 96 ? Vt(Ft) : !1; + } + function Ft() { + return de(), Dm(); + } + function Br() { + return de(), jd(); + } + function Ti(H) { + if (X() === 1) + return !0; + switch (H) { + case 1: + case 2: + case 4: + case 5: + case 6: + case 12: + case 9: + case 23: + case 24: + return X() === 20; + case 3: + return X() === 20 || X() === 84 || X() === 90; + case 7: + return X() === 19 || X() === 96 || X() === 119; + case 8: + return Sa(); + case 19: + return X() === 32 || X() === 21 || X() === 19 || X() === 96 || X() === 119; + case 11: + return X() === 22 || X() === 27; + case 15: + case 21: + case 10: + return X() === 24; + case 17: + case 16: + case 18: + return X() === 22 || X() === 24; + case 20: + return X() !== 28; + case 22: + return X() === 19 || X() === 20; + case 13: + return X() === 32 || X() === 44; + case 14: + return X() === 30 && Vt($r); + default: + return !1; + } + } + function Sa() { + return !!(Zi() || sf(X()) || X() === 39); + } + function to() { + E.assert(Lt, "Missing parsing context"); + for (let H = 0; H < 26; H++) + if (Lt & 1 << H && (ac( + H, + /*inErrorRecovery*/ + !0 + ) || Ti(H))) + return !0; + return !1; + } + function Do(H, Pe) { + const qe = Lt; + Lt |= 1 << H; + const vt = [], Wt = L(); + for (; !Ti(H); ) { + if (ac( + H, + /*inErrorRecovery*/ + !1 + )) { + vt.push(ml(H, Pe)); + continue; + } + if (t_(H)) + break; + } + return Lt = qe, Oi(vt, Wt); + } + function ml(H, Pe) { + const qe = gc(H); + return qe ? Va(qe) : Pe(); + } + function gc(H, Pe) { + var qe; + if (!Ae || !mo(H) || Qt) + return; + const vt = Ae.currentNode(Pe ?? t.getTokenFullStart()); + if (!(tc(vt) || TLe(vt) || lx(vt) || (vt.flags & 101441536) !== Nr) && df(vt, H)) + return x3(vt) && ((qe = vt.jsDoc) != null && qe.jsDocCache) && (vt.jsDoc.jsDocCache = void 0), vt; + } + function Va(H) { + return t.resetTokenState(H.end), de(), H; + } + function mo(H) { + switch (H) { + case 5: + case 2: + case 0: + case 1: + case 3: + case 6: + case 4: + case 8: + case 17: + case 16: + return !0; + } + return !1; + } + function df(H, Pe) { + switch (Pe) { + case 5: + return Rf(H); + case 2: + return F_(H); + case 0: + case 1: + case 3: + return mf(H); + case 6: + return jf(H); + case 4: + return fp(H); + case 8: + return th(H); + case 17: + case 16: + return od(H); + } + return !1; + } + function Rf(H) { + if (H) + switch (H.kind) { + case 176: + case 181: + case 177: + case 178: + case 172: + case 240: + return !0; + case 174: + const Pe = H; + return !(Pe.name.kind === 80 && Pe.name.escapedText === "constructor"); + } + return !1; + } + function F_(H) { + if (H) + switch (H.kind) { + case 296: + case 297: + return !0; + } + return !1; + } + function mf(H) { + if (H) + switch (H.kind) { + case 262: + case 243: + case 241: + case 245: + case 244: + case 257: + case 253: + case 255: + case 252: + case 251: + case 249: + case 250: + case 248: + case 247: + case 254: + case 242: + case 258: + case 256: + case 246: + case 259: + case 272: + case 271: + case 278: + case 277: + case 267: + case 263: + case 264: + case 266: + case 265: + return !0; + } + return !1; + } + function jf(H) { + return H.kind === 306; + } + function fp(H) { + if (H) + switch (H.kind) { + case 180: + case 173: + case 181: + case 171: + case 179: + return !0; + } + return !1; + } + function th(H) { + return H.kind !== 260 ? !1 : H.initializer === void 0; + } + function od(H) { + return H.kind !== 169 ? !1 : H.initializer === void 0; + } + function t_(H) { + return gf(H), to() ? !0 : (de(), !1); + } + function gf(H) { + switch (H) { + case 0: + return X() === 90 ? Xt(p._0_expected, Xs( + 95 + /* ExportKeyword */ + )) : Xt(p.Declaration_or_statement_expected); + case 1: + return Xt(p.Declaration_or_statement_expected); + case 2: + return Xt(p.case_or_default_expected); + case 3: + return Xt(p.Statement_expected); + case 18: + // fallthrough + case 4: + return Xt(p.Property_or_signature_expected); + case 5: + return Xt(p.Unexpected_token_A_constructor_method_accessor_or_property_was_expected); + case 6: + return Xt(p.Enum_member_expected); + case 7: + return Xt(p.Expression_expected); + case 8: + return f_(X()) ? Xt(p._0_is_not_allowed_as_a_variable_declaration_name, Xs(X())) : Xt(p.Variable_declaration_expected); + case 9: + return Xt(p.Property_destructuring_pattern_expected); + case 10: + return Xt(p.Array_element_destructuring_pattern_expected); + case 11: + return Xt(p.Argument_expression_expected); + case 12: + return Xt(p.Property_assignment_expected); + case 15: + return Xt(p.Expression_or_comma_expected); + case 17: + return Xt(p.Parameter_declaration_expected); + case 16: + return f_(X()) ? Xt(p._0_is_not_allowed_as_a_parameter_name, Xs(X())) : Xt(p.Parameter_declaration_expected); + case 19: + return Xt(p.Type_parameter_declaration_expected); + case 20: + return Xt(p.Type_argument_expected); + case 21: + return Xt(p.Type_expected); + case 22: + return Xt(p.Unexpected_token_expected); + case 23: + return X() === 161 ? Xt(p._0_expected, "}") : Xt(p.Identifier_expected); + case 13: + return Xt(p.Identifier_expected); + case 14: + return Xt(p.Identifier_expected); + case 24: + return Xt(p.Identifier_or_string_literal_expected); + case 25: + return Xt(p.Identifier_expected); + case 26: + return E.fail("ParsingContext.Count used as a context"); + // Not a real context, only a marker. + default: + E.assertNever(H); + } + } + function y_(H, Pe, qe) { + const vt = Lt; + Lt |= 1 << H; + const Wt = [], br = L(); + let Rn = -1; + for (; ; ) { + if (ac( + H, + /*inErrorRecovery*/ + !1 + )) { + const Ai = t.getTokenFullStart(), ui = ml(H, Pe); + if (!ui) { + Lt = vt; + return; + } + if (Wt.push(ui), Rn = t.getTokenStart(), ri( + 28 + /* CommaToken */ + )) + continue; + if (Rn = -1, Ti(H)) + break; + Ot(28, cd(H)), qe && X() === 27 && !t.hasPrecedingLineBreak() && de(), Ai === t.getTokenFullStart() && de(); + continue; + } + if (Ti(H) || t_(H)) + break; + } + return Lt = vt, Oi( + Wt, + br, + /*end*/ + void 0, + Rn >= 0 + ); + } + function cd(H) { + return H === 6 ? p.An_enum_member_name_must_be_followed_by_a_or : void 0; + } + function hf() { + const H = Oi([], L()); + return H.isMissingList = !0, H; + } + function ug(H) { + return !!H.isMissingList; + } + function Q(H, Pe, qe, vt) { + if (Ot(qe)) { + const Wt = y_(H, Pe); + return Ot(vt), Wt; + } + return hf(); + } + function et(H, Pe) { + const qe = L(); + let vt = H ? ge(Pe) : To(Pe); + for (; ri( + 25 + /* DotToken */ + ) && X() !== 30; ) + vt = qt( + g.createQualifiedName( + vt, + jt( + H, + /*allowPrivateIdentifiers*/ + !1, + /*allowUnicodeEscapeSequenceInIdentifierName*/ + !0 + ) + ), + qe + ); + return vt; + } + function Rt(H, Pe) { + return qt(g.createQualifiedName(H, Pe), H.pos); + } + function jt(H, Pe, qe) { + if (t.hasPrecedingLineBreak() && c_(X()) && Vt(Ak)) + return Qa( + 80, + /*reportAtCurrentPosition*/ + !0, + p.Identifier_expected + ); + if (X() === 81) { + const vt = pr(); + return Pe ? vt : Qa( + 80, + /*reportAtCurrentPosition*/ + !0, + p.Identifier_expected + ); + } + return H ? qe ? ge() : G() : To(); + } + function Er(H) { + const Pe = L(), qe = []; + let vt; + do + vt = Tt(H), qe.push(vt); + while (vt.literal.kind === 17); + return Oi(qe, Pe); + } + function Hr(H) { + const Pe = L(); + return qt( + g.createTemplateExpression( + ei(H), + Er(H) + ), + Pe + ); + } + function xn() { + const H = L(); + return qt( + g.createTemplateLiteralType( + ei( + /*isTaggedTemplate*/ + !1 + ), + ii() + ), + H + ); + } + function ii() { + const H = L(), Pe = []; + let qe; + do + qe = j(), Pe.push(qe); + while (qe.literal.kind === 17); + return Oi(Pe, H); + } + function j() { + const H = L(); + return qt( + g.createTemplateLiteralTypeSpan( + Tl(), + Ne( + /*isTaggedTemplate*/ + !1 + ) + ), + H + ); + } + function Ne(H) { + return X() === 20 ? (Jr(H), Ss()) : hs(18, p._0_expected, Xs( + 20 + /* CloseBraceToken */ + )); + } + function Tt(H) { + const Pe = L(); + return qt( + g.createTemplateSpan( + xr(tu), + Ne(H) + ), + Pe + ); + } + function Ar() { + return ps(X()); + } + function ei(H) { + !H && t.getTokenFlags() & 26656 && Jr( + /*isTaggedTemplate*/ + !1 + ); + const Pe = ps(X()); + return E.assert(Pe.kind === 16, "Template head has wrong token kind"), Pe; + } + function Ss() { + const H = ps(X()); + return E.assert(H.kind === 17 || H.kind === 18, "Template fragment has wrong token kind"), H; + } + function _s(H) { + const Pe = H === 15 || H === 18, qe = t.getTokenText(); + return qe.substring(1, qe.length - (t.isUnterminated() ? 0 : Pe ? 1 : 2)); + } + function ps(H) { + const Pe = L(), qe = Ry(H) ? g.createTemplateLiteralLikeNode( + H, + t.getTokenValue(), + _s(H), + t.getTokenFlags() & 7176 + /* TemplateLiteralLikeFlags */ + ) : ( + // Note that theoretically the following condition would hold true literals like 009, + // which is not octal. But because of how the scanner separates the tokens, we would + // never get a token like this. Instead, we would get 00 and 9 as two separate tokens. + // We also do not need to check for negatives because any prefix operator would be part of a + // parent unary expression. + H === 9 ? S(t.getTokenValue(), t.getNumericLiteralFlags()) : H === 11 ? T( + t.getTokenValue(), + /*isSingleQuote*/ + void 0, + t.hasExtendedUnicodeEscape() + ) : y4(H) ? C(H, t.getTokenValue()) : E.fail() + ); + return t.hasExtendedUnicodeEscape() && (qe.hasExtendedUnicodeEscape = !0), t.isUnterminated() && (qe.isUnterminated = !0), de(), qt(qe, Pe); + } + function ja() { + return et( + /*allowReservedWords*/ + !0, + p.Type_expected + ); + } + function xa() { + if (!t.hasPrecedingLineBreak() && tt() === 30) + return Q( + 20, + Tl, + 30, + 32 + /* GreaterThanToken */ + ); + } + function Ro() { + const H = L(); + return qt( + g.createTypeReferenceNode( + ja(), + xa() + ), + H + ); + } + function O_(H) { + switch (H.kind) { + case 183: + return tc(H.typeName); + case 184: + case 185: { + const { parameters: Pe, type: qe } = H; + return ug(Pe) || O_(qe); + } + case 196: + return O_(H.type); + default: + return !1; + } + } + function Ld(H) { + return de(), qt(g.createTypePredicateNode( + /*assertsModifier*/ + void 0, + H, + Tl() + ), H.pos); + } + function km() { + const H = L(); + return de(), qt(g.createThisTypeNode(), H); + } + function Cm() { + const H = L(); + return de(), qt(g.createJSDocAllType(), H); + } + function G0() { + const H = L(); + return de(), qt(g.createJSDocNonNullableType( + Gh(), + /*postfix*/ + !1 + ), H); + } + function rh() { + const H = L(); + return de(), X() === 28 || X() === 20 || X() === 22 || X() === 32 || X() === 64 || X() === 52 ? qt(g.createJSDocUnknownType(), H) : qt(g.createJSDocNullableType( + Tl(), + /*postfix*/ + !1 + ), H); + } + function pp() { + const H = L(), Pe = ve(); + if (ir(Ui)) { + const qe = Rd( + 36 + /* JSDoc */ + ), vt = dp( + 59, + /*isType*/ + !1 + ); + return jr(qt(g.createJSDocFunctionType(qe, vt), H), Pe); + } + return qt(g.createTypeReferenceNode( + ge(), + /*typeArguments*/ + void 0 + ), H); + } + function ld() { + const H = L(); + let Pe; + return (X() === 110 || X() === 105) && (Pe = ge(), Ot( + 59 + /* ColonToken */ + )), qt( + g.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + // TODO(rbuckton): JSDoc parameters don't have names (except `this`/`new`), should we manufacture an empty identifier? + Pe, + /*questionToken*/ + void 0, + xo(), + /*initializer*/ + void 0 + ), + H + ); + } + function xo() { + t.setSkipJsDocLeadingAsterisks(!0); + const H = L(); + if (ri( + 144 + /* ModuleKeyword */ + )) { + const vt = g.createJSDocNamepathType( + /*type*/ + void 0 + ); + e: + for (; ; ) + switch (X()) { + case 20: + case 1: + case 28: + case 5: + break e; + default: + st(); + } + return t.setSkipJsDocLeadingAsterisks(!1), qt(vt, H); + } + const Pe = ri( + 26 + /* DotDotDotToken */ + ); + let qe = b_(); + return t.setSkipJsDocLeadingAsterisks(!1), Pe && (qe = qt(g.createJSDocVariadicType(qe), H)), X() === 64 ? (de(), qt(g.createJSDocOptionalType(qe), H)) : qe; + } + function yf() { + const H = L(); + Ot( + 114 + /* TypeOfKeyword */ + ); + const Pe = et( + /*allowReservedWords*/ + !0 + ), qe = t.hasPrecedingLineBreak() ? void 0 : F2(); + return qt(g.createTypeQueryNode(Pe, qe), H); + } + function qh() { + const H = L(), Pe = Yn( + /*allowDecorators*/ + !1, + /*permitConstAsModifier*/ + !0 + ), qe = To(); + let vt, Wt; + ri( + 96 + /* ExtendsKeyword */ + ) && (jd() || !Dm() ? vt = Tl() : Wt = fu()); + const br = ri( + 64 + /* EqualsToken */ + ) ? Tl() : void 0, Rn = g.createTypeParameterDeclaration(Pe, qe, vt, br); + return Rn.expression = Wt, qt(Rn, H); + } + function v_() { + if (X() === 30) + return Q( + 19, + qh, + 30, + 32 + /* GreaterThanToken */ + ); + } + function nh(H) { + return X() === 26 || dn() || By(X()) || X() === 60 || jd( + /*inStartOfParameter*/ + !H + ); + } + function _g(H) { + const Pe = R_(p.Private_identifiers_cannot_be_used_as_parameters); + return GP(Pe) === 0 && !at(H) && By(X()) && de(), Pe; + } + function Md() { + return Tr() || X() === 23 || X() === 19; + } + function Em(H) { + return m1(H); + } + function $0(H) { + return m1( + H, + /*allowAmbiguity*/ + !1 + ); + } + function m1(H, Pe = !0) { + const qe = L(), vt = ve(), Wt = H ? K(() => Yn( + /*allowDecorators*/ + !0 + )) : Ie(() => Yn( + /*allowDecorators*/ + !0 + )); + if (X() === 110) { + const ui = g.createParameterDeclaration( + Wt, + /*dotDotDotToken*/ + void 0, + Ol( + /*isIdentifier*/ + !0 + ), + /*questionToken*/ + void 0, + Bd(), + /*initializer*/ + void 0 + ), _i = Uc(Wt); + return _i && ft(_i, p.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters), jr(qt(ui, qe), vt); + } + const br = Dt; + Dt = !1; + const Rn = zs( + 26 + /* DotDotDotToken */ + ); + if (!Pe && !Md()) + return; + const Ai = jr( + qt( + g.createParameterDeclaration( + Wt, + Rn, + _g(Wt), + zs( + 58 + /* QuestionToken */ + ), + Bd(), + ih() + ), + qe + ), + vt + ); + return Dt = br, Ai; + } + function dp(H, Pe) { + if (g1(H, Pe)) + return Qe(b_); + } + function g1(H, Pe) { + return H === 39 ? (Ot(H), !0) : ri( + 59 + /* ColonToken */ + ) ? !0 : Pe && X() === 39 ? (Xt(p._0_expected, Xs( + 59 + /* ColonToken */ + )), de(), !0) : !1; + } + function mp(H, Pe) { + const qe = Ye(), vt = Et(); + Bn(!!(H & 1)), ki(!!(H & 2)); + const Wt = H & 32 ? y_(17, ld) : y_(16, () => Pe ? Em(vt) : $0(vt)); + return Bn(qe), ki(vt), Wt; + } + function Rd(H) { + if (!Ot( + 21 + /* OpenParenToken */ + )) + return hf(); + const Pe = mp( + H, + /*allowAmbiguity*/ + !0 + ); + return Ot( + 22 + /* CloseParenToken */ + ), Pe; + } + function Hh() { + ri( + 28 + /* CommaToken */ + ) || Ca(); + } + function h1(H) { + const Pe = L(), qe = ve(); + H === 180 && Ot( + 105 + /* NewKeyword */ + ); + const vt = v_(), Wt = Rd( + 4 + /* Type */ + ), br = dp( + 59, + /*isType*/ + !0 + ); + Hh(); + const Rn = H === 179 ? g.createCallSignature(vt, Wt, br) : g.createConstructSignature(vt, Wt, br); + return jr(qt(Rn, Pe), qe); + } + function ud() { + return X() === 23 && Vt(Rv); + } + function Rv() { + if (de(), X() === 26 || X() === 24) + return !0; + if (By(X())) { + if (de(), _r()) + return !0; + } else if (_r()) + de(); + else + return !1; + return X() === 59 || X() === 28 ? !0 : X() !== 58 ? !1 : (de(), X() === 59 || X() === 28 || X() === 24); + } + function y1(H, Pe, qe) { + const vt = Q( + 16, + () => Em( + /*inOuterAwaitContext*/ + !1 + ), + 23, + 24 + /* CloseBracketToken */ + ), Wt = Bd(); + Hh(); + const br = g.createIndexSignature(qe, vt, Wt); + return jr(qt(br, H), Pe); + } + function X0(H, Pe, qe) { + const vt = Yr(), Wt = zs( + 58 + /* QuestionToken */ + ); + let br; + if (X() === 21 || X() === 30) { + const Rn = v_(), Ai = Rd( + 4 + /* Type */ + ), ui = dp( + 59, + /*isType*/ + !0 + ); + br = g.createMethodSignature(qe, vt, Wt, Rn, Ai, ui); + } else { + const Rn = Bd(); + br = g.createPropertySignature(qe, vt, Wt, Rn), X() === 64 && (br.initializer = ih()); + } + return Hh(), jr(qt(br, H), Pe); + } + function Le() { + if (X() === 21 || X() === 30 || X() === 139 || X() === 153) + return !0; + let H = !1; + for (; By(X()); ) + H = !0, de(); + return X() === 23 ? !0 : (rt() && (H = !0, de()), H ? X() === 21 || X() === 30 || X() === 58 || X() === 59 || X() === 28 || Zi() : !1); + } + function Ge() { + if (X() === 21 || X() === 30) + return h1( + 179 + /* CallSignature */ + ); + if (X() === 105 && Vt(St)) + return h1( + 180 + /* ConstructSignature */ + ); + const H = L(), Pe = ve(), qe = Yn( + /*allowDecorators*/ + !1 + ); + return En( + 139 + /* GetKeyword */ + ) ? Xp( + H, + Pe, + qe, + 177, + 4 + /* Type */ + ) : En( + 153 + /* SetKeyword */ + ) ? Xp( + H, + Pe, + qe, + 178, + 4 + /* Type */ + ) : ud() ? y1(H, Pe, qe) : X0(H, Pe, qe); + } + function St() { + return de(), X() === 21 || X() === 30; + } + function rr() { + return de() === 25; + } + function vr() { + switch (de()) { + case 21: + case 30: + case 25: + return !0; + } + return !1; + } + function Gr() { + const H = L(); + return qt(g.createTypeLiteralNode(Dr()), H); + } + function Dr() { + let H; + return Ot( + 19 + /* OpenBraceToken */ + ) ? (H = Do(4, Ge), Ot( + 20 + /* CloseBraceToken */ + )) : H = hf(), H; + } + function cn() { + return de(), X() === 40 || X() === 41 ? de() === 148 : (X() === 148 && de(), X() === 23 && dl() && de() === 103); + } + function ai() { + const H = L(), Pe = ge(); + Ot( + 103 + /* InKeyword */ + ); + const qe = Tl(); + return qt(g.createTypeParameterDeclaration( + /*modifiers*/ + void 0, + Pe, + qe, + /*defaultType*/ + void 0 + ), H); + } + function hn() { + const H = L(); + Ot( + 19 + /* OpenBraceToken */ + ); + let Pe; + (X() === 148 || X() === 40 || X() === 41) && (Pe = Yc(), Pe.kind !== 148 && Ot( + 148 + /* ReadonlyKeyword */ + )), Ot( + 23 + /* OpenBracketToken */ + ); + const qe = ai(), vt = ri( + 130 + /* AsKeyword */ + ) ? Tl() : void 0; + Ot( + 24 + /* CloseBracketToken */ + ); + let Wt; + (X() === 58 || X() === 40 || X() === 41) && (Wt = Yc(), Wt.kind !== 58 && Ot( + 58 + /* QuestionToken */ + )); + const br = Bd(); + Ca(); + const Rn = Do(4, Ge); + return Ot( + 20 + /* CloseBraceToken */ + ), qt(g.createMappedTypeNode(Pe, qe, vt, Wt, br, Rn), H); + } + function ji() { + const H = L(); + if (ri( + 26 + /* DotDotDotToken */ + )) + return qt(g.createRestTypeNode(Tl()), H); + const Pe = Tl(); + if (s6(Pe) && Pe.pos === Pe.type.pos) { + const qe = g.createOptionalTypeNode(Pe.type); + return ot(qe, Pe), qe.flags = Pe.flags, qe; + } + return Pe; + } + function Gn() { + return de() === 59 || X() === 58 && de() === 59; + } + function ta() { + return X() === 26 ? c_(de()) && Gn() : c_(X()) && Gn(); + } + function Cc() { + if (Vt(ta)) { + const H = L(), Pe = ve(), qe = zs( + 26 + /* DotDotDotToken */ + ), vt = ge(), Wt = zs( + 58 + /* QuestionToken */ + ); + Ot( + 59 + /* ColonToken */ + ); + const br = ji(), Rn = g.createNamedTupleMember(qe, vt, Wt, br); + return jr(qt(Rn, H), Pe); + } + return ji(); + } + function r_() { + const H = L(); + return qt( + g.createTupleTypeNode( + Q( + 21, + Cc, + 23, + 24 + /* CloseBracketToken */ + ) + ), + H + ); + } + function vf() { + const H = L(); + Ot( + 21 + /* OpenParenToken */ + ); + const Pe = Tl(); + return Ot( + 22 + /* CloseParenToken */ + ), qt(g.createParenthesizedType(Pe), H); + } + function Bf() { + let H; + if (X() === 128) { + const Pe = L(); + de(); + const qe = qt(A( + 128 + /* AbstractKeyword */ + ), Pe); + H = Oi([qe], Pe); + } + return H; + } + function n_() { + const H = L(), Pe = ve(), qe = Bf(), vt = ri( + 105 + /* NewKeyword */ + ); + E.assert(!qe || vt, "Per isStartOfFunctionOrConstructorType, a function type cannot have modifiers."); + const Wt = v_(), br = Rd( + 4 + /* Type */ + ), Rn = dp( + 39, + /*isType*/ + !1 + ), Ai = vt ? g.createConstructorTypeNode(qe, Wt, br, Rn) : g.createFunctionTypeNode(Wt, br, Rn); + return jr(qt(Ai, H), Pe); + } + function i_() { + const H = Yc(); + return X() === 25 ? void 0 : H; + } + function jv(H) { + const Pe = L(); + H && de(); + let qe = X() === 112 || X() === 97 || X() === 106 ? Yc() : ps(X()); + return H && (qe = qt(g.createPrefixUnaryExpression(41, qe), Pe)), qt(g.createLiteralTypeNode(qe), Pe); + } + function Bv() { + return de(), X() === 102; + } + function fg() { + ke |= 4194304; + const H = L(), Pe = ri( + 114 + /* TypeOfKeyword */ + ); + Ot( + 102 + /* ImportKeyword */ + ), Ot( + 21 + /* OpenParenToken */ + ); + const qe = Tl(); + let vt; + if (ri( + 28 + /* CommaToken */ + )) { + const Rn = t.getTokenStart(); + Ot( + 19 + /* OpenBraceToken */ + ); + const Ai = X(); + if (Ai === 118 || Ai === 132 ? de() : Xt(p._0_expected, Xs( + 118 + /* WithKeyword */ + )), Ot( + 59 + /* ColonToken */ + ), vt = dE( + Ai, + /*skipKeyword*/ + !0 + ), !Ot( + 20 + /* CloseBraceToken */ + )) { + const ui = Co(he); + ui && ui.code === p._0_expected.code && Bs( + ui, + Cx(oe, ue, Rn, 1, p.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}") + ); + } + } + Ot( + 22 + /* CloseParenToken */ + ); + const Wt = ri( + 25 + /* DotToken */ + ) ? ja() : void 0, br = xa(); + return qt(g.createImportTypeNode(qe, vt, Wt, br, Pe), H); + } + function Q0() { + return de(), X() === 9 || X() === 10; + } + function Gh() { + switch (X()) { + case 133: + case 159: + case 154: + case 150: + case 163: + case 155: + case 136: + case 157: + case 146: + case 151: + return ir(i_) || Ro(); + case 67: + t.reScanAsteriskEqualsToken(); + // falls through + case 42: + return Cm(); + case 61: + t.reScanQuestionToken(); + // falls through + case 58: + return rh(); + case 100: + return pp(); + case 54: + return G0(); + case 15: + case 11: + case 9: + case 10: + case 112: + case 97: + case 106: + return jv(); + case 41: + return Vt(Q0) ? jv( + /*negative*/ + !0 + ) : Ro(); + case 116: + return Yc(); + case 110: { + const H = km(); + return X() === 142 && !t.hasPrecedingLineBreak() ? Ld(H) : H; + } + case 114: + return Vt(Bv) ? fg() : yf(); + case 19: + return Vt(cn) ? hn() : Gr(); + case 23: + return r_(); + case 21: + return vf(); + case 102: + return fg(); + case 131: + return Vt(Ak) ? tE() : Ro(); + case 16: + return xn(); + default: + return Ro(); + } + } + function jd(H) { + switch (X()) { + case 133: + case 159: + case 154: + case 150: + case 163: + case 136: + case 148: + case 155: + case 158: + case 116: + case 157: + case 106: + case 110: + case 114: + case 146: + case 19: + case 23: + case 30: + case 52: + case 51: + case 105: + case 11: + case 9: + case 10: + case 112: + case 97: + case 151: + case 42: + case 58: + case 54: + case 26: + case 140: + case 102: + case 131: + case 15: + case 16: + return !0; + case 100: + return !H; + case 41: + return !H && Vt(Q0); + case 21: + return !H && Vt($h); + default: + return _r(); + } + } + function $h() { + return de(), X() === 22 || nh( + /*isJSDocParameter*/ + !1 + ) || jd(); + } + function v1() { + const H = L(); + let Pe = Gh(); + for (; !t.hasPrecedingLineBreak(); ) + switch (X()) { + case 54: + de(), Pe = qt(g.createJSDocNonNullableType( + Pe, + /*postfix*/ + !0 + ), H); + break; + case 58: + if (Vt(Br)) + return Pe; + de(), Pe = qt(g.createJSDocNullableType( + Pe, + /*postfix*/ + !0 + ), H); + break; + case 23: + if (Ot( + 23 + /* OpenBracketToken */ + ), jd()) { + const qe = Tl(); + Ot( + 24 + /* CloseBracketToken */ + ), Pe = qt(g.createIndexedAccessTypeNode(Pe, qe), H); + } else + Ot( + 24 + /* CloseBracketToken */ + ), Pe = qt(g.createArrayTypeNode(Pe), H); + break; + default: + return Pe; + } + return Pe; + } + function Xh(H) { + const Pe = L(); + return Ot(H), qt(g.createTypeOperatorNode(H, Pa()), Pe); + } + function nT() { + if (ri( + 96 + /* ExtendsKeyword */ + )) { + const H = Ct(Tl); + if (yt() || X() !== 58) + return H; + } + } + function b2() { + const H = L(), Pe = To(), qe = ir(nT), vt = g.createTypeParameterDeclaration( + /*modifiers*/ + void 0, + Pe, + qe + ); + return qt(vt, H); + } + function Jv() { + const H = L(); + return Ot( + 140 + /* InferKeyword */ + ), qt(g.createInferTypeNode(b2()), H); + } + function Pa() { + const H = X(); + switch (H) { + case 143: + case 158: + case 148: + return Xh(H); + case 140: + return Jv(); + } + return Qe(v1); + } + function b1(H) { + if (Jf()) { + const Pe = n_(); + let qe; + return ng(Pe) ? qe = H ? p.Function_type_notation_must_be_parenthesized_when_used_in_a_union_type : p.Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type : qe = H ? p.Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type : p.Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type, ft(Pe, qe), Pe; + } + } + function eE(H, Pe, qe) { + const vt = L(), Wt = H === 52, br = ri(H); + let Rn = br && b1(Wt) || Pe(); + if (X() === H || br) { + const Ai = [Rn]; + for (; ri(H); ) + Ai.push(b1(Wt) || Pe()); + Rn = qt(qe(Oi(Ai, vt)), vt); + } + return Rn; + } + function Y0() { + return eE(51, Pa, g.createIntersectionTypeNode); + } + function Z0() { + return eE(52, Y0, g.createUnionTypeNode); + } + function pg() { + return de(), X() === 105; + } + function Jf() { + return X() === 30 || X() === 21 && Vt(L_) ? !0 : X() === 105 || X() === 128 && Vt(pg); + } + function bf() { + if (By(X()) && Yn( + /*allowDecorators*/ + !1 + ), _r() || X() === 110) + return de(), !0; + if (X() === 23 || X() === 19) { + const H = he.length; + return R_(), H === he.length; + } + return !1; + } + function L_() { + return de(), !!(X() === 22 || X() === 26 || bf() && (X() === 59 || X() === 28 || X() === 58 || X() === 64 || X() === 22 && (de(), X() === 39))); + } + function b_() { + const H = L(), Pe = _r() && ir(zv), qe = Tl(); + return Pe ? qt(g.createTypePredicateNode( + /*assertsModifier*/ + void 0, + Pe, + qe + ), H) : qe; + } + function zv() { + const H = To(); + if (X() === 142 && !t.hasPrecedingLineBreak()) + return de(), H; + } + function tE() { + const H = L(), Pe = hs( + 131 + /* AssertsKeyword */ + ), qe = X() === 110 ? km() : To(), vt = ri( + 142 + /* IsKeyword */ + ) ? Tl() : void 0; + return qt(g.createTypePredicateNode(Pe, qe, vt), H); + } + function Tl() { + if (Nr & 81920) + return Cs(81920, Tl); + if (Jf()) + return n_(); + const H = L(), Pe = Z0(); + if (!yt() && !t.hasPrecedingLineBreak() && ri( + 96 + /* ExtendsKeyword */ + )) { + const qe = Ct(Tl); + Ot( + 58 + /* QuestionToken */ + ); + const vt = Qe(Tl); + Ot( + 59 + /* ColonToken */ + ); + const Wt = Qe(Tl); + return qt(g.createConditionalTypeNode(Pe, qe, vt, Wt), H); + } + return Pe; + } + function Bd() { + return ri( + 59 + /* ColonToken */ + ) ? Tl() : void 0; + } + function K0() { + switch (X()) { + case 110: + case 108: + case 106: + case 112: + case 97: + case 9: + case 10: + case 11: + case 15: + case 16: + case 21: + case 23: + case 19: + case 100: + case 86: + case 105: + case 44: + case 69: + case 80: + return !0; + case 102: + return Vt(vr); + default: + return _r(); + } + } + function Dm() { + if (K0()) + return !0; + switch (X()) { + case 40: + case 41: + case 55: + case 54: + case 91: + case 114: + case 116: + case 46: + case 47: + case 30: + case 135: + case 127: + case 81: + case 60: + return !0; + default: + return mg() ? !0 : _r(); + } + } + function Ck() { + return X() !== 19 && X() !== 100 && X() !== 86 && X() !== 60 && Dm(); + } + function tu() { + const H = We(); + H && wn( + /*val*/ + !1 + ); + const Pe = L(); + let qe = zf( + /*allowReturnTypeInArrowFunction*/ + !0 + ), vt; + for (; vt = zs( + 28 + /* CommaToken */ + ); ) + qe = Wv(qe, vt, zf( + /*allowReturnTypeInArrowFunction*/ + !0 + ), Pe); + return H && wn( + /*val*/ + !0 + ), qe; + } + function ih() { + return ri( + 64 + /* EqualsToken */ + ) ? zf( + /*allowReturnTypeInArrowFunction*/ + !0 + ) : void 0; + } + function zf(H) { + if (qp()) + return je(); + const Pe = dg(H) || T1(H); + if (Pe) + return Pe; + const qe = L(), vt = ve(), Wt = ey( + 0 + /* Lowest */ + ); + return Wt.kind === 80 && X() === 39 ? Qh( + qe, + Wt, + H, + vt, + /*asyncModifier*/ + void 0 + ) : u_(Wt) && Ah(Xr()) ? Wv(Wt, Yc(), zf(H), qe) : _d(Wt, qe, H); + } + function qp() { + return X() === 127 ? Ye() ? !0 : Vt(lT) : !1; + } + function wm() { + return de(), !t.hasPrecedingLineBreak() && _r(); + } + function je() { + const H = L(); + return de(), !t.hasPrecedingLineBreak() && (X() === 42 || Dm()) ? qt( + g.createYieldExpression( + zs( + 42 + /* AsteriskToken */ + ), + zf( + /*allowReturnTypeInArrowFunction*/ + !0 + ) + ), + H + ) : qt(g.createYieldExpression( + /*asteriskToken*/ + void 0, + /*expression*/ + void 0 + ), H); + } + function Qh(H, Pe, qe, vt, Wt) { + E.assert(X() === 39, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); + const br = g.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + Pe, + /*questionToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ); + qt(br, Pe.pos); + const Rn = Oi([br], br.pos, br.end), Ai = hs( + 39 + /* EqualsGreaterThanToken */ + ), ui = ca( + /*isAsync*/ + !!Wt, + qe + ), _i = g.createArrowFunction( + Wt, + /*typeParameters*/ + void 0, + Rn, + /*type*/ + void 0, + Ai, + ui + ); + return jr(qt(_i, H), vt); + } + function dg(H) { + const Pe = S1(); + if (Pe !== 0) + return Pe === 1 ? sT( + /*allowAmbiguity*/ + !0, + /*allowReturnTypeInArrowFunction*/ + !0 + ) : ir(() => Yh(H)); + } + function S1() { + return X() === 21 || X() === 30 || X() === 134 ? Vt(iT) : X() === 39 ? 1 : 0; + } + function iT() { + if (X() === 134 && (de(), t.hasPrecedingLineBreak() || X() !== 21 && X() !== 30)) + return 0; + const H = X(), Pe = de(); + if (H === 21) { + if (Pe === 22) + switch (de()) { + case 39: + case 59: + case 19: + return 1; + default: + return 0; + } + if (Pe === 23 || Pe === 19) + return 2; + if (Pe === 26) + return 1; + if (By(Pe) && Pe !== 134 && Vt(dl)) + return de() === 130 ? 0 : 1; + if (!_r() && Pe !== 110) + return 0; + switch (de()) { + case 59: + return 1; + case 58: + return de(), X() === 59 || X() === 28 || X() === 64 || X() === 22 ? 1 : 0; + case 28: + case 64: + case 22: + return 2; + } + return 0; + } else + return E.assert( + H === 30 + /* LessThanToken */ + ), !_r() && X() !== 87 ? 0 : xe === 1 ? Vt(() => { + ri( + 87 + /* ConstKeyword */ + ); + const vt = de(); + if (vt === 96) + switch (de()) { + case 64: + case 32: + case 44: + return !1; + default: + return !0; + } + else if (vt === 28 || vt === 64) + return !0; + return !1; + }) ? 1 : 0 : 2; + } + function Yh(H) { + const Pe = t.getTokenStart(); + if (er?.has(Pe)) + return; + const qe = sT( + /*allowAmbiguity*/ + !1, + H + ); + return qe || (er || (er = /* @__PURE__ */ new Set())).add(Pe), qe; + } + function T1(H) { + if (X() === 134 && Vt(Zh) === 1) { + const Pe = L(), qe = ve(), vt = zi(), Wt = ey( + 0 + /* Lowest */ + ); + return Qh(Pe, Wt, H, qe, vt); + } + } + function Zh() { + if (X() === 134) { + if (de(), t.hasPrecedingLineBreak() || X() === 39) + return 0; + const H = ey( + 0 + /* Lowest */ + ); + if (!t.hasPrecedingLineBreak() && H.kind === 80 && X() === 39) + return 1; + } + return 0; + } + function sT(H, Pe) { + const qe = L(), vt = ve(), Wt = zi(), br = at(Wt, hD) ? 2 : 0, Rn = v_(); + let Ai; + if (Ot( + 21 + /* OpenParenToken */ + )) { + if (H) + Ai = mp(br, H); + else { + const Vf = mp(br, H); + if (!Vf) + return; + Ai = Vf; + } + if (!Ot( + 22 + /* CloseParenToken */ + ) && !H) + return; + } else { + if (!H) + return; + Ai = hf(); + } + const ui = X() === 59, _i = dp( + 59, + /*isType*/ + !1 + ); + if (_i && !H && O_(_i)) + return; + let qi = _i; + for (; qi?.kind === 196; ) + qi = qi.type; + const Ya = qi && a6(qi); + if (!H && X() !== 39 && (Ya || X() !== 19)) + return; + const Za = X(), Ia = hs( + 39 + /* EqualsGreaterThanToken */ + ), yp = Za === 39 || Za === 19 ? ca(at(Wt, hD), Pe) : To(); + if (!Pe && ui && X() !== 59) + return; + const rl = g.createArrowFunction(Wt, Rn, Ai, _i, Ia, yp); + return jr(qt(rl, qe), vt); + } + function ca(H, Pe) { + if (X() === 19) + return E1( + H ? 2 : 0 + /* None */ + ); + if (X() !== 27 && X() !== 100 && X() !== 86 && lE() && !Ck()) + return E1(16 | (H ? 2 : 0)); + const qe = Dt; + Dt = !1; + const vt = H ? K(() => zf(Pe)) : Ie(() => zf(Pe)); + return Dt = qe, vt; + } + function _d(H, Pe, qe) { + const vt = zs( + 58 + /* QuestionToken */ + ); + if (!vt) + return H; + let Wt; + return qt( + g.createConditionalExpression( + H, + vt, + Cs(n, () => zf( + /*allowReturnTypeInArrowFunction*/ + !1 + )), + Wt = hs( + 59 + /* ColonToken */ + ), + Ap(Wt) ? zf(qe) : Qa( + 80, + /*reportAtCurrentPosition*/ + !1, + p._0_expected, + Xs( + 59 + /* ColonToken */ + ) + ) + ), + Pe + ); + } + function ey(H) { + const Pe = L(), qe = fu(); + return Kh(H, qe, Pe); + } + function sf(H) { + return H === 103 || H === 165; + } + function Kh(H, Pe, qe) { + for (; ; ) { + Xr(); + const vt = I3(X()); + if (!(X() === 43 ? vt >= H : vt > H) || X() === 103 && _t()) + break; + if (X() === 130 || X() === 152) { + if (t.hasPrecedingLineBreak()) + break; + { + const br = X(); + de(), Pe = br === 152 ? Pm(Pe, Tl()) : ty(Pe, Tl()); + } + } else + Pe = Wv(Pe, Yc(), ey(vt), qe); + } + return Pe; + } + function mg() { + return _t() && X() === 103 ? !1 : I3(X()) > 0; + } + function Pm(H, Pe) { + return qt(g.createSatisfiesExpression(H, Pe), H.pos); + } + function Wv(H, Pe, qe, vt) { + return qt(g.createBinaryExpression(H, Pe, qe), vt); + } + function ty(H, Pe) { + return qt(g.createAsExpression(H, Pe), H.pos); + } + function Uv() { + const H = L(); + return qt(g.createPrefixUnaryExpression(X(), zt(ry)), H); + } + function Nm() { + const H = L(); + return qt(g.createDeleteExpression(zt(ry)), H); + } + function e0() { + const H = L(); + return qt(g.createTypeOfExpression(zt(ry)), H); + } + function rE() { + const H = L(); + return qt(g.createVoidExpression(zt(ry)), H); + } + function Ci() { + return X() === 135 ? Et() ? !0 : Vt(lT) : !1; + } + function yn() { + const H = L(); + return qt(g.createAwaitExpression(zt(ry)), H); + } + function fu() { + if (ny()) { + const qe = L(), vt = S2(); + return X() === 43 ? Kh(I3(X()), vt, qe) : vt; + } + const H = X(), Pe = ry(); + if (X() === 43) { + const qe = aa(ue, Pe.pos), { end: vt } = Pe; + Pe.kind === 216 ? ye(qe, vt, p.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses) : (E.assert(t5(H)), ye(qe, vt, p.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses, Xs(H))); + } + return Pe; + } + function ry() { + switch (X()) { + case 40: + case 41: + case 55: + case 54: + return Uv(); + case 91: + return Nm(); + case 114: + return e0(); + case 116: + return rE(); + case 30: + return xe === 1 ? Vv( + /*inExpressionContext*/ + !0, + /*topInvalidNodePosition*/ + void 0, + /*openingTag*/ + void 0, + /*mustBeUnary*/ + !0 + ) : wu(); + case 135: + if (Ci()) + return yn(); + // falls through + default: + return S2(); + } + } + function ny() { + switch (X()) { + case 40: + case 41: + case 55: + case 54: + case 91: + case 114: + case 116: + case 135: + return !1; + case 30: + if (xe !== 1) + return !1; + // We are in JSX context and the token is part of JSXElement. + // falls through + default: + return !0; + } + } + function S2() { + if (X() === 46 || X() === 47) { + const Pe = L(); + return qt(g.createPrefixUnaryExpression(X(), zt(x1)), Pe); + } else if (xe === 1 && X() === 30 && Vt(Rl)) + return Vv( + /*inExpressionContext*/ + !0 + ); + const H = x1(); + if (E.assert(u_(H)), (X() === 46 || X() === 47) && !t.hasPrecedingLineBreak()) { + const Pe = X(); + return de(), qt(g.createPostfixUnaryExpression(H, Pe), H.pos); + } + return H; + } + function x1() { + const H = L(); + let Pe; + return X() === 102 ? Vt(St) ? (ke |= 4194304, Pe = Yc()) : Vt(rr) ? (de(), de(), Pe = qt(g.createMetaProperty(102, ge()), H), ke |= 8388608) : Pe = go() : Pe = X() === 108 ? T2() : go(), gg(H, Pe); + } + function go() { + const H = L(), Pe = Hv(); + return Wf( + H, + Pe, + /*allowOptionalChain*/ + !0 + ); + } + function T2() { + const H = L(); + let Pe = Yc(); + if (X() === 30) { + const qe = L(), vt = ir(t0); + vt !== void 0 && (ye(qe, L(), p.super_may_not_use_type_arguments), gp() || (Pe = g.createExpressionWithTypeArguments(Pe, vt))); + } + return X() === 21 || X() === 25 || X() === 23 ? Pe : (hs(25, p.super_must_be_followed_by_an_argument_list_or_member_access), qt(R(Pe, jt( + /*allowIdentifierNames*/ + !0, + /*allowPrivateIdentifiers*/ + !0, + /*allowUnicodeEscapeSequenceInIdentifierName*/ + !0 + )), H)); + } + function Vv(H, Pe, qe, vt = !1) { + const Wt = L(), br = iE(H); + let Rn; + if (br.kind === 286) { + let Ai = x2(br), ui; + const _i = Ai[Ai.length - 1]; + if (_i?.kind === 284 && !Tv(_i.openingElement.tagName, _i.closingElement.tagName) && Tv(br.tagName, _i.closingElement.tagName)) { + const qi = _i.children.end, Ya = qt( + g.createJsxElement( + _i.openingElement, + _i.children, + qt(g.createJsxClosingElement(qt(D(""), qi, qi)), qi, qi) + ), + _i.openingElement.pos, + qi + ); + Ai = Oi([...Ai.slice(0, Ai.length - 1), Ya], Ai.pos, qi), ui = _i.closingElement; + } else + ui = sE(br, H), Tv(br.tagName, ui.tagName) || (qe && Dd(qe) && Tv(ui.tagName, qe.tagName) ? ft(br.tagName, p.JSX_element_0_has_no_corresponding_closing_tag, C4(ue, br.tagName)) : ft(ui.tagName, p.Expected_corresponding_JSX_closing_tag_for_0, C4(ue, br.tagName))); + Rn = qt(g.createJsxElement(br, Ai, ui), Wt); + } else br.kind === 289 ? Rn = qt(g.createJsxFragment(br, x2(br), Dk(H)), Wt) : (E.assert( + br.kind === 285 + /* JsxSelfClosingElement */ + ), Rn = br); + if (!vt && H && X() === 30) { + const Ai = typeof Pe > "u" ? Rn.pos : Pe, ui = ir(() => Vv( + /*inExpressionContext*/ + !0, + Ai + )); + if (ui) { + const _i = Qa( + 28, + /*reportAtCurrentPosition*/ + !1 + ); + return PJ(_i, ui.pos, 0), ye(aa(ue, Ai), ui.end, p.JSX_expressions_must_have_one_parent_element), qt(g.createBinaryExpression(Rn, _i, ui), Wt); + } + } + return Rn; + } + function k1() { + const H = L(), Pe = g.createJsxText( + t.getTokenValue(), + De === 13 + /* JsxTextAllWhiteSpaces */ + ); + return De = t.scanJsxToken(), qt(Pe, H); + } + function Hp(H, Pe) { + switch (Pe) { + case 1: + if (sd(H)) + ft(H, p.JSX_fragment_has_no_corresponding_closing_tag); + else { + const qe = H.tagName, vt = Math.min(aa(ue, qe.pos), qe.end); + ye(vt, qe.end, p.JSX_element_0_has_no_corresponding_closing_tag, C4(ue, H.tagName)); + } + return; + case 31: + case 7: + return; + case 12: + case 13: + return k1(); + case 19: + return cs( + /*inExpressionContext*/ + !1 + ); + case 30: + return Vv( + /*inExpressionContext*/ + !1, + /*topInvalidNodePosition*/ + void 0, + H + ); + default: + return E.assertNever(Pe); + } + } + function x2(H) { + const Pe = [], qe = L(), vt = Lt; + for (Lt |= 16384; ; ) { + const Wt = Hp(H, De = t.reScanJsxToken()); + if (!Wt || (Pe.push(Wt), Dd(H) && Wt?.kind === 284 && !Tv(Wt.openingElement.tagName, Wt.closingElement.tagName) && Tv(H.tagName, Wt.closingElement.tagName))) + break; + } + return Lt = vt, Oi(Pe, qe); + } + function nE() { + const H = L(); + return qt(g.createJsxAttributes(Do(13, iy)), H); + } + function iE(H) { + const Pe = L(); + if (Ot( + 30 + /* LessThanToken */ + ), X() === 32) + return Pt(), qt(g.createJsxOpeningFragment(), Pe); + const qe = gn(), vt = Nr & 524288 ? void 0 : F2(), Wt = nE(); + let br; + return X() === 32 ? (Pt(), br = g.createJsxOpeningElement(qe, vt, Wt)) : (Ot( + 44 + /* SlashToken */ + ), Ot( + 32, + /*diagnosticMessage*/ + void 0, + /*shouldAdvance*/ + !1 + ) && (H ? de() : Pt()), br = g.createJsxSelfClosingElement(qe, vt, Wt)), qt(br, Pe); + } + function gn() { + const H = L(), Pe = Ju(); + if (wd(Pe)) + return Pe; + let qe = Pe; + for (; ri( + 25 + /* DotToken */ + ); ) + qe = qt(R(qe, jt( + /*allowIdentifierNames*/ + !0, + /*allowPrivateIdentifiers*/ + !1, + /*allowUnicodeEscapeSequenceInIdentifierName*/ + !1 + )), H); + return qe; + } + function Ju() { + const H = L(); + Mt(); + const Pe = X() === 110, qe = G(); + return ri( + 59 + /* ColonToken */ + ) ? (Mt(), qt(g.createJsxNamespacedName(qe, G()), H)) : Pe ? qt(g.createToken( + 110 + /* ThisKeyword */ + ), H) : qe; + } + function cs(H) { + const Pe = L(); + if (!Ot( + 19 + /* OpenBraceToken */ + )) + return; + let qe, vt; + return X() !== 20 && (H || (qe = zs( + 26 + /* DotDotDotToken */ + )), vt = tu()), H ? Ot( + 20 + /* CloseBraceToken */ + ) : Ot( + 20, + /*diagnosticMessage*/ + void 0, + /*shouldAdvance*/ + !1 + ) && Pt(), qt(g.createJsxExpression(qe, vt), Pe); + } + function iy() { + if (X() === 19) + return un(); + const H = L(); + return qt(g.createJsxAttribute(qv(), Ek()), H); + } + function Ek() { + if (X() === 64) { + if (Zt() === 11) + return Ar(); + if (X() === 19) + return cs( + /*inExpressionContext*/ + !0 + ); + if (X() === 30) + return Vv( + /*inExpressionContext*/ + !0 + ); + Xt(p.or_JSX_element_expected); + } + } + function qv() { + const H = L(); + Mt(); + const Pe = G(); + return ri( + 59 + /* ColonToken */ + ) ? (Mt(), qt(g.createJsxNamespacedName(Pe, G()), H)) : Pe; + } + function un() { + const H = L(); + Ot( + 19 + /* OpenBraceToken */ + ), Ot( + 26 + /* DotDotDotToken */ + ); + const Pe = tu(); + return Ot( + 20 + /* CloseBraceToken */ + ), qt(g.createJsxSpreadAttribute(Pe), H); + } + function sE(H, Pe) { + const qe = L(); + Ot( + 31 + /* LessThanSlashToken */ + ); + const vt = gn(); + return Ot( + 32, + /*diagnosticMessage*/ + void 0, + /*shouldAdvance*/ + !1 + ) && (Pe || !Tv(H.tagName, vt) ? de() : Pt()), qt(g.createJsxClosingElement(vt), qe); + } + function Dk(H) { + const Pe = L(); + return Ot( + 31 + /* LessThanSlashToken */ + ), Ot( + 32, + p.Expected_corresponding_closing_tag_for_JSX_fragment, + /*shouldAdvance*/ + !1 + ) && (H ? de() : Pt()), qt(g.createJsxJsxClosingFragment(), Pe); + } + function wu() { + E.assert(xe !== 1, "Type assertions should never be parsed in JSX; they should be parsed as comparisons or JSX elements/fragments."); + const H = L(); + Ot( + 30 + /* LessThanToken */ + ); + const Pe = Tl(); + Ot( + 32 + /* GreaterThanToken */ + ); + const qe = ry(); + return qt(g.createTypeAssertion(Pe, qe), H); + } + function Am() { + return de(), c_(X()) || X() === 23 || gp(); + } + function ru() { + return X() === 29 && Vt(Am); + } + function sh(H) { + if (H.flags & 64) + return !0; + if (Hx(H)) { + let Pe = H.expression; + for (; Hx(Pe) && !(Pe.flags & 64); ) + Pe = Pe.expression; + if (Pe.flags & 64) { + for (; Hx(H); ) + H.flags |= 64, H = H.expression; + return !0; + } + } + return !1; + } + function k2(H, Pe, qe) { + const vt = jt( + /*allowIdentifierNames*/ + !0, + /*allowPrivateIdentifiers*/ + !0, + /*allowUnicodeEscapeSequenceInIdentifierName*/ + !0 + ), Wt = qe || sh(Pe), br = Wt ? W(Pe, qe, vt) : R(Pe, vt); + if (Wt && Ni(br.name) && ft(br.name, p.An_optional_chain_cannot_contain_private_identifiers), Lh(Pe) && Pe.typeArguments) { + const Rn = Pe.typeArguments.pos - 1, Ai = aa(ue, Pe.typeArguments.end) + 1; + ye(Rn, Ai, p.An_instantiation_expression_cannot_be_followed_by_a_property_access); + } + return qt(br, H); + } + function C1(H, Pe, qe) { + let vt; + if (X() === 24) + vt = Qa( + 80, + /*reportAtCurrentPosition*/ + !0, + p.An_element_access_expression_should_take_an_argument + ); + else { + const br = xr(tu); + wf(br) && (br.text = Mc(br.text)), vt = br; + } + Ot( + 24 + /* CloseBracketToken */ + ); + const Wt = qe || sh(Pe) ? $(Pe, qe, vt) : V(Pe, vt); + return qt(Wt, H); + } + function Wf(H, Pe, qe) { + for (; ; ) { + let vt, Wt = !1; + if (qe && ru() ? (vt = hs( + 29 + /* QuestionDotToken */ + ), Wt = c_(X())) : Wt = ri( + 25 + /* DotToken */ + ), Wt) { + Pe = k2(H, Pe, vt); + continue; + } + if ((vt || !We()) && ri( + 23 + /* OpenBracketToken */ + )) { + Pe = C1(H, Pe, vt); + continue; + } + if (gp()) { + Pe = !vt && Pe.kind === 233 ? Gp(H, Pe.expression, vt, Pe.typeArguments) : Gp( + H, + Pe, + vt, + /*typeArguments*/ + void 0 + ); + continue; + } + if (!vt) { + if (X() === 54 && !t.hasPrecedingLineBreak()) { + de(), Pe = qt(g.createNonNullExpression(Pe), H); + continue; + } + const br = ir(t0); + if (br) { + Pe = qt(g.createExpressionWithTypeArguments(Pe, br), H); + continue; + } + } + return Pe; + } + } + function gp() { + return X() === 15 || X() === 16; + } + function Gp(H, Pe, qe, vt) { + const Wt = g.createTaggedTemplateExpression( + Pe, + vt, + X() === 15 ? (Jr( + /*isTaggedTemplate*/ + !0 + ), Ar()) : Hr( + /*isTaggedTemplate*/ + !0 + ) + ); + return (qe || Pe.flags & 64) && (Wt.flags |= 64), Wt.questionDotToken = qe, qt(Wt, H); + } + function gg(H, Pe) { + for (; ; ) { + Pe = Wf( + H, + Pe, + /*allowOptionalChain*/ + !0 + ); + let qe; + const vt = zs( + 29 + /* QuestionDotToken */ + ); + if (vt && (qe = ir(t0), gp())) { + Pe = Gp(H, Pe, vt, qe); + continue; + } + if (qe || X() === 21) { + !vt && Pe.kind === 233 && (qe = Pe.typeArguments, Pe = Pe.expression); + const Wt = C2(), br = vt || sh(Pe) ? _e(Pe, vt, qe, Wt) : U(Pe, qe, Wt); + Pe = qt(br, H); + continue; + } + if (vt) { + const Wt = Qa( + 80, + /*reportAtCurrentPosition*/ + !1, + p.Identifier_expected + ); + Pe = qt(W(Pe, vt, Wt), H); + } + break; + } + return Pe; + } + function C2() { + Ot( + 21 + /* OpenParenToken */ + ); + const H = y_(11, Im); + return Ot( + 22 + /* CloseParenToken */ + ), H; + } + function t0() { + if (Nr & 524288 || tt() !== 30) + return; + de(); + const H = y_(20, Tl); + if (Xr() === 32) + return de(), H && E2() ? H : void 0; + } + function E2() { + switch (X()) { + // These tokens can follow a type argument list in a call expression. + case 21: + // foo( + case 15: + // foo `...` + case 16: + return !0; + // A type argument list followed by `<` never makes sense, and a type argument list followed + // by `>` is ambiguous with a (re-scanned) `>>` operator, so we disqualify both. Also, in + // this context, `+` and `-` are unary operators, not binary operators. + case 30: + case 32: + case 40: + case 41: + return !1; + } + return t.hasPrecedingLineBreak() || mg() || !Dm(); + } + function Hv() { + switch (X()) { + case 15: + t.getTokenFlags() & 26656 && Jr( + /*isTaggedTemplate*/ + !1 + ); + // falls through + case 9: + case 10: + case 11: + return Ar(); + case 110: + case 108: + case 106: + case 112: + case 97: + return Yc(); + case 21: + return aT(); + case 23: + return wk(); + case 19: + return sy(); + case 134: + if (!Vt(oc)) + break; + return P2(); + case 60: + return ds(); + case 86: + return ws(); + case 100: + return P2(); + case 105: + return ah(); + case 44: + case 69: + if (Rr() === 14) + return Ar(); + break; + case 16: + return Hr( + /*isTaggedTemplate*/ + !1 + ); + case 81: + return pr(); + } + return To(p.Expression_expected); + } + function aT() { + const H = L(), Pe = ve(); + Ot( + 21 + /* OpenParenToken */ + ); + const qe = xr(tu); + return Ot( + 22 + /* CloseParenToken */ + ), jr(qt(J(qe), H), Pe); + } + function D2() { + const H = L(); + Ot( + 26 + /* DotDotDotToken */ + ); + const Pe = zf( + /*allowReturnTypeInArrowFunction*/ + !0 + ); + return qt(g.createSpreadElement(Pe), H); + } + function w2() { + return X() === 26 ? D2() : X() === 28 ? qt(g.createOmittedExpression(), L()) : zf( + /*allowReturnTypeInArrowFunction*/ + !0 + ); + } + function Im() { + return Cs(n, w2); + } + function wk() { + const H = L(), Pe = t.getTokenStart(), qe = Ot( + 23 + /* OpenBracketToken */ + ), vt = t.hasPrecedingLineBreak(), Wt = y_(15, w2); + return sc(23, 24, qe, Pe), qt(O(Wt, vt), H); + } + function oT() { + const H = L(), Pe = ve(); + if (zs( + 26 + /* DotDotDotToken */ + )) { + const qi = zf( + /*allowReturnTypeInArrowFunction*/ + !0 + ); + return jr(qt(g.createSpreadAssignment(qi), H), Pe); + } + const qe = Yn( + /*allowDecorators*/ + !0 + ); + if (En( + 139 + /* GetKeyword */ + )) + return Xp( + H, + Pe, + qe, + 177, + 0 + /* None */ + ); + if (En( + 153 + /* SetKeyword */ + )) + return Xp( + H, + Pe, + qe, + 178, + 0 + /* None */ + ); + const vt = zs( + 42 + /* AsteriskToken */ + ), Wt = _r(), br = Yr(), Rn = zs( + 58 + /* QuestionToken */ + ), Ai = zs( + 54 + /* ExclamationToken */ + ); + if (vt || X() === 21 || X() === 30) + return gl(H, Pe, qe, vt, br, Rn, Ai); + let ui; + if (Wt && X() !== 59) { + const qi = zs( + 64 + /* EqualsToken */ + ), Ya = qi ? xr(() => zf( + /*allowReturnTypeInArrowFunction*/ + !0 + )) : void 0; + ui = g.createShorthandPropertyAssignment(br, Ya), ui.equalsToken = qi; + } else { + Ot( + 59 + /* ColonToken */ + ); + const qi = xr(() => zf( + /*allowReturnTypeInArrowFunction*/ + !0 + )); + ui = g.createPropertyAssignment(br, qi); + } + return ui.modifiers = qe, ui.questionToken = Rn, ui.exclamationToken = Ai, jr(qt(ui, H), Pe); + } + function sy() { + const H = L(), Pe = t.getTokenStart(), qe = Ot( + 19 + /* OpenBraceToken */ + ), vt = t.hasPrecedingLineBreak(), Wt = y_( + 12, + oT, + /*considerSemicolonAsDelimiter*/ + !0 + ); + return sc(19, 20, qe, Pe), qt(F(Wt, vt), H); + } + function P2() { + const H = We(); + wn( + /*val*/ + !1 + ); + const Pe = L(), qe = ve(), vt = Yn( + /*allowDecorators*/ + !1 + ); + Ot( + 100 + /* FunctionKeyword */ + ); + const Wt = zs( + 42 + /* AsteriskToken */ + ), br = Wt ? 1 : 0, Rn = at(vt, hD) ? 2 : 0, Ai = br && Rn ? $e(fd) : br ? ee(fd) : Rn ? K(fd) : fd(), ui = v_(), _i = Rd(br | Rn), qi = dp( + 59, + /*isType*/ + !1 + ), Ya = E1(br | Rn); + wn(H); + const Za = g.createFunctionExpression(vt, Wt, Ai, ui, _i, qi, Ya); + return jr(qt(Za, Pe), qe); + } + function fd() { + return Tr() ? Ll() : void 0; + } + function ah() { + const H = L(); + if (Ot( + 105 + /* NewKeyword */ + ), ri( + 25 + /* DotToken */ + )) { + const br = ge(); + return qt(g.createMetaProperty(105, br), H); + } + const Pe = L(); + let qe = Wf( + Pe, + Hv(), + /*allowOptionalChain*/ + !1 + ), vt; + qe.kind === 233 && (vt = qe.typeArguments, qe = qe.expression), X() === 29 && Xt(p.Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0, C4(ue, qe)); + const Wt = X() === 21 ? C2() : void 0; + return qt(Z(qe, vt, Wt), H); + } + function oh(H, Pe) { + const qe = L(), vt = ve(), Wt = t.getTokenStart(), br = Ot(19, Pe); + if (br || H) { + const Rn = t.hasPrecedingLineBreak(), Ai = Do(1, hp); + sc(19, 20, br, Wt); + const ui = jr(qt(re(Ai, Rn), qe), vt); + return X() === 64 && (Xt(p.Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses), de()), ui; + } else { + const Rn = hf(); + return jr(qt(re( + Rn, + /*multiLine*/ + void 0 + ), qe), vt); + } + } + function E1(H, Pe) { + const qe = Ye(); + Bn(!!(H & 1)); + const vt = Et(); + ki(!!(H & 2)); + const Wt = Dt; + Dt = !1; + const br = We(); + br && wn( + /*val*/ + !1 + ); + const Rn = oh(!!(H & 16), Pe); + return br && wn( + /*val*/ + !0 + ), Dt = Wt, Bn(qe), ki(vt), Rn; + } + function wl() { + const H = L(), Pe = ve(); + return Ot( + 27 + /* SemicolonToken */ + ), jr(qt(g.createEmptyStatement(), H), Pe); + } + function N2() { + const H = L(), Pe = ve(); + Ot( + 101 + /* IfKeyword */ + ); + const qe = t.getTokenStart(), vt = Ot( + 21 + /* OpenParenToken */ + ), Wt = xr(tu); + sc(21, 22, vt, qe); + const br = hp(), Rn = ri( + 93 + /* ElseKeyword */ + ) ? hp() : void 0; + return jr(qt(le(Wt, br, Rn), H), Pe); + } + function ch() { + const H = L(), Pe = ve(); + Ot( + 92 + /* DoKeyword */ + ); + const qe = hp(); + Ot( + 117 + /* WhileKeyword */ + ); + const vt = t.getTokenStart(), Wt = Ot( + 21 + /* OpenParenToken */ + ), br = xr(tu); + return sc(21, 22, Wt, vt), ri( + 27 + /* SemicolonToken */ + ), jr(qt(g.createDoStatement(qe, br), H), Pe); + } + function A2() { + const H = L(), Pe = ve(); + Ot( + 117 + /* WhileKeyword */ + ); + const qe = t.getTokenStart(), vt = Ot( + 21 + /* OpenParenToken */ + ), Wt = xr(tu); + sc(21, 22, vt, qe); + const br = hp(); + return jr(qt(Te(Wt, br), H), Pe); + } + function Pk() { + const H = L(), Pe = ve(); + Ot( + 99 + /* ForKeyword */ + ); + const qe = zs( + 135 + /* AwaitKeyword */ + ); + Ot( + 21 + /* OpenParenToken */ + ); + let vt; + X() !== 27 && (X() === 115 || X() === 121 || X() === 87 || X() === 160 && Vt(uT) || // this one is meant to allow of + X() === 135 && Vt(Ok) ? vt = Mk( + /*inForStatementInitializer*/ + !0 + ) : vt = gs(tu)); + let Wt; + if (qe ? Ot( + 165 + /* OfKeyword */ + ) : ri( + 165 + /* OfKeyword */ + )) { + const br = xr(() => zf( + /*allowReturnTypeInArrowFunction*/ + !0 + )); + Ot( + 22 + /* CloseParenToken */ + ), Wt = me(qe, vt, br, hp()); + } else if (ri( + 103 + /* InKeyword */ + )) { + const br = xr(tu); + Ot( + 22 + /* CloseParenToken */ + ), Wt = g.createForInStatement(vt, br, hp()); + } else { + Ot( + 27 + /* SemicolonToken */ + ); + const br = X() !== 27 && X() !== 22 ? xr(tu) : void 0; + Ot( + 27 + /* SemicolonToken */ + ); + const Rn = X() !== 22 ? xr(tu) : void 0; + Ot( + 22 + /* CloseParenToken */ + ), Wt = q(vt, br, Rn, hp()); + } + return jr(qt(Wt, H), Pe); + } + function Fm(H) { + const Pe = L(), qe = ve(); + Ot( + H === 252 ? 83 : 88 + /* ContinueKeyword */ + ); + const vt = Zi() ? void 0 : To(); + Ca(); + const Wt = H === 252 ? g.createBreakStatement(vt) : g.createContinueStatement(vt); + return jr(qt(Wt, Pe), qe); + } + function aE() { + const H = L(), Pe = ve(); + Ot( + 107 + /* ReturnKeyword */ + ); + const qe = Zi() ? void 0 : xr(tu); + return Ca(), jr(qt(g.createReturnStatement(qe), H), Pe); + } + function ay() { + const H = L(), Pe = ve(); + Ot( + 118 + /* WithKeyword */ + ); + const qe = t.getTokenStart(), vt = Ot( + 21 + /* OpenParenToken */ + ), Wt = xr(tu); + sc(21, 22, vt, qe); + const br = Ks(67108864, hp); + return jr(qt(g.createWithStatement(Wt, br), H), Pe); + } + function cT() { + const H = L(), Pe = ve(); + Ot( + 84 + /* CaseKeyword */ + ); + const qe = xr(tu); + Ot( + 59 + /* ColonToken */ + ); + const vt = Do(3, hp); + return jr(qt(g.createCaseClause(qe, vt), H), Pe); + } + function jc() { + const H = L(); + Ot( + 90 + /* DefaultKeyword */ + ), Ot( + 59 + /* ColonToken */ + ); + const Pe = Do(3, hp); + return qt(g.createDefaultClause(Pe), H); + } + function Pl() { + return X() === 84 ? cT() : jc(); + } + function Gv() { + const H = L(); + Ot( + 19 + /* OpenBraceToken */ + ); + const Pe = Do(2, Pl); + return Ot( + 20 + /* CloseBraceToken */ + ), qt(g.createCaseBlock(Pe), H); + } + function pu() { + const H = L(), Pe = ve(); + Ot( + 109 + /* SwitchKeyword */ + ), Ot( + 21 + /* OpenParenToken */ + ); + const qe = xr(tu); + Ot( + 22 + /* CloseParenToken */ + ); + const vt = Gv(); + return jr(qt(g.createSwitchStatement(qe, vt), H), Pe); + } + function $p() { + const H = L(), Pe = ve(); + Ot( + 111 + /* ThrowKeyword */ + ); + let qe = t.hasPrecedingLineBreak() ? void 0 : xr(tu); + return qe === void 0 && (bt++, qe = qt(D(""), L())), Gs() || Js(qe), jr(qt(g.createThrowStatement(qe), H), Pe); + } + function oE() { + const H = L(), Pe = ve(); + Ot( + 113 + /* TryKeyword */ + ); + const qe = oh( + /*ignoreMissingOpenBrace*/ + !1 + ), vt = X() === 85 ? Jd() : void 0; + let Wt; + return (!vt || X() === 98) && (Ot(98, p.catch_or_finally_expected), Wt = oh( + /*ignoreMissingOpenBrace*/ + !1 + )), jr(qt(g.createTryStatement(qe, vt, Wt), H), Pe); + } + function Jd() { + const H = L(); + Ot( + 85 + /* CatchKeyword */ + ); + let Pe; + ri( + 21 + /* OpenParenToken */ + ) ? (Pe = gT(), Ot( + 22 + /* CloseParenToken */ + )) : Pe = void 0; + const qe = oh( + /*ignoreMissingOpenBrace*/ + !1 + ); + return qt(g.createCatchClause(Pe, qe), H); + } + function Nk() { + const H = L(), Pe = ve(); + return Ot( + 89 + /* DebuggerKeyword */ + ), Ca(), jr(qt(g.createDebuggerStatement(), H), Pe); + } + function oy() { + const H = L(); + let Pe = ve(), qe; + const vt = X() === 21, Wt = xr(tu); + return Me(Wt) && ri( + 59 + /* ColonToken */ + ) ? qe = g.createLabeledStatement(Wt, hp()) : (Gs() || Js(Wt), qe = ie(Wt), vt && (Pe = !1)), jr(qt(qe, H), Pe); + } + function Ak() { + return de(), c_(X()) && !t.hasPrecedingLineBreak(); + } + function Ik() { + return de(), X() === 86 && !t.hasPrecedingLineBreak(); + } + function oc() { + return de(), X() === 100 && !t.hasPrecedingLineBreak(); + } + function lT() { + return de(), (c_(X()) || X() === 9 || X() === 10 || X() === 11) && !t.hasPrecedingLineBreak(); + } + function cE() { + for (; ; ) + switch (X()) { + case 115: + case 121: + case 87: + case 100: + case 86: + case 94: + return !0; + case 160: + return M_(); + case 135: + return D1(); + // 'declare', 'module', 'namespace', 'interface'* and 'type' are all legal JavaScript identifiers; + // however, an identifier cannot be followed by another identifier on the same line. This is what we + // count on to parse out the respective declarations. For instance, we exploit this to say that + // + // namespace n + // + // can be none other than the beginning of a namespace declaration, but need to respect that JavaScript sees + // + // namespace + // n + // + // as the identifier 'namespace' on one line followed by the identifier 'n' on another. + // We need to look one token ahead to see if it permissible to try parsing a declaration. + // + // *Note*: 'interface' is actually a strict mode reserved word. So while + // + // "use strict" + // interface + // I {} + // + // could be legal, it would add complexity for very little gain. + case 120: + case 156: + return wm(); + case 144: + case 145: + return mT(); + case 128: + case 129: + case 134: + case 138: + case 123: + case 124: + case 125: + case 148: + const H = X(); + if (de(), t.hasPrecedingLineBreak()) + return !1; + if (H === 138 && X() === 156) + return !0; + continue; + case 162: + return de(), X() === 19 || X() === 80 || X() === 95; + case 102: + return de(), X() === 11 || X() === 42 || X() === 19 || c_(X()); + case 95: + let Pe = de(); + if (Pe === 156 && (Pe = Vt(de)), Pe === 64 || Pe === 42 || Pe === 19 || Pe === 90 || Pe === 130 || Pe === 60) + return !0; + continue; + case 126: + de(); + continue; + default: + return !1; + } + } + function cy() { + return Vt(cE); + } + function lE() { + switch (X()) { + case 60: + case 27: + case 19: + case 115: + case 121: + case 160: + case 100: + case 86: + case 94: + case 101: + case 92: + case 117: + case 99: + case 88: + case 83: + case 107: + case 118: + case 109: + case 111: + case 113: + case 89: + // 'catch' and 'finally' do not actually indicate that the code is part of a statement, + // however, we say they are here so that we may gracefully parse them and error later. + // falls through + case 85: + case 98: + return !0; + case 102: + return cy() || Vt(vr); + case 87: + case 95: + return cy(); + case 134: + case 138: + case 120: + case 144: + case 145: + case 156: + case 162: + return !0; + case 129: + case 125: + case 123: + case 124: + case 126: + case 148: + return cy() || !Vt(Ak); + default: + return Dm(); + } + } + function Pu() { + return de(), Tr() || X() === 19 || X() === 23; + } + function Fk() { + return Vt(Pu); + } + function uT() { + return I2( + /*disallowOf*/ + !0 + ); + } + function I2(H) { + return de(), H && X() === 165 ? !1 : (Tr() || X() === 19) && !t.hasPrecedingLineBreak(); + } + function M_() { + return Vt(I2); + } + function Ok(H) { + return de() === 160 ? I2(H) : !1; + } + function D1() { + return Vt(Ok); + } + function hp() { + switch (X()) { + case 27: + return wl(); + case 19: + return oh( + /*ignoreMissingOpenBrace*/ + !1 + ); + case 115: + return P1( + L(), + ve(), + /*modifiers*/ + void 0 + ); + case 121: + if (Fk()) + return P1( + L(), + ve(), + /*modifiers*/ + void 0 + ); + break; + case 135: + if (D1()) + return P1( + L(), + ve(), + /*modifiers*/ + void 0 + ); + break; + case 160: + if (M_()) + return P1( + L(), + ve(), + /*modifiers*/ + void 0 + ); + break; + case 100: + return hT( + L(), + ve(), + /*modifiers*/ + void 0 + ); + case 86: + return Ea( + L(), + ve(), + /*modifiers*/ + void 0 + ); + case 101: + return N2(); + case 92: + return ch(); + case 117: + return A2(); + case 99: + return Pk(); + case 88: + return Fm( + 251 + /* ContinueStatement */ + ); + case 83: + return Fm( + 252 + /* BreakStatement */ + ); + case 107: + return aE(); + case 118: + return ay(); + case 109: + return pu(); + case 111: + return $p(); + case 113: + // Include 'catch' and 'finally' for error recovery. + // falls through + case 85: + case 98: + return oE(); + case 89: + return Nk(); + case 60: + return _T(); + case 134: + case 120: + case 156: + case 144: + case 145: + case 138: + case 87: + case 94: + case 95: + case 102: + case 123: + case 124: + case 125: + case 128: + case 129: + case 126: + case 148: + case 162: + if (cy()) + return _T(); + break; + } + return oy(); + } + function w1(H) { + return H.kind === 138; + } + function _T() { + const H = L(), Pe = ve(), qe = Yn( + /*allowDecorators*/ + !0 + ); + if (at(qe, w1)) { + const Wt = fT(H); + if (Wt) + return Wt; + for (const br of qe) + br.flags |= 33554432; + return Ks(33554432, () => pT(H, Pe, qe)); + } else + return pT(H, Pe, qe); + } + function fT(H) { + return Ks(33554432, () => { + const Pe = gc(Lt, H); + if (Pe) + return Va(Pe); + }); + } + function pT(H, Pe, qe) { + switch (X()) { + case 115: + case 121: + case 87: + case 160: + case 135: + return P1(H, Pe, qe); + case 100: + return hT(H, Pe, qe); + case 86: + return Ea(H, Pe, qe); + case 120: + return Zv(H, Pe, qe); + case 156: + return Qp(H, Pe, qe); + case 94: + return Kv(H, Pe, qe); + case 162: + case 144: + case 145: + return S8(H, Pe, qe); + case 102: + return fE(H, Pe, qe); + case 95: + switch (de(), X()) { + case 90: + case 64: + return E8(H, Pe, qe); + case 130: + return Ow(H, Pe, qe); + default: + return ST(H, Pe, qe); + } + default: + if (qe) { + const vt = Qa( + 282, + /*reportAtCurrentPosition*/ + !0, + p.Declaration_expected + ); + return oD(vt, H), vt.modifiers = qe, vt; + } + return; + } + } + function dT() { + return de() === 11; + } + function $v() { + return de(), X() === 161 || X() === 64; + } + function mT() { + return de(), !t.hasPrecedingLineBreak() && (_r() || X() === 11); + } + function zu(H, Pe) { + if (X() !== 19) { + if (H & 4) { + Hh(); + return; + } + if (Zi()) { + Ca(); + return; + } + } + return E1(H, Pe); + } + function Uf() { + const H = L(); + if (X() === 28) + return qt(g.createOmittedExpression(), H); + const Pe = zs( + 26 + /* DotDotDotToken */ + ), qe = R_(), vt = ih(); + return qt(g.createBindingElement( + Pe, + /*propertyName*/ + void 0, + qe, + vt + ), H); + } + function uE() { + const H = L(), Pe = zs( + 26 + /* DotDotDotToken */ + ), qe = Tr(); + let vt = Yr(), Wt; + qe && X() !== 59 ? (Wt = vt, vt = void 0) : (Ot( + 59 + /* ColonToken */ + ), Wt = R_()); + const br = ih(); + return qt(g.createBindingElement(Pe, vt, Wt, br), H); + } + function Lk() { + const H = L(); + Ot( + 19 + /* OpenBraceToken */ + ); + const Pe = xr(() => y_(9, uE)); + return Ot( + 20 + /* CloseBraceToken */ + ), qt(g.createObjectBindingPattern(Pe), H); + } + function Oa() { + const H = L(); + Ot( + 23 + /* OpenBracketToken */ + ); + const Pe = xr(() => y_(10, Uf)); + return Ot( + 24 + /* CloseBracketToken */ + ), qt(g.createArrayBindingPattern(Pe), H); + } + function dn() { + return X() === 19 || X() === 23 || X() === 81 || Tr(); + } + function R_(H) { + return X() === 23 ? Oa() : X() === 19 ? Lk() : Ll(H); + } + function af() { + return gT( + /*allowExclamation*/ + !0 + ); + } + function gT(H) { + const Pe = L(), qe = ve(), vt = R_(p.Private_identifiers_are_not_allowed_in_variable_declarations); + let Wt; + H && vt.kind === 80 && X() === 54 && !t.hasPrecedingLineBreak() && (Wt = Yc()); + const br = Bd(), Rn = sf(X()) ? void 0 : ih(), Ai = Ce(vt, Wt, br, Rn); + return jr(qt(Ai, Pe), qe); + } + function Mk(H) { + const Pe = L(); + let qe = 0; + switch (X()) { + case 115: + break; + case 121: + qe |= 1; + break; + case 87: + qe |= 2; + break; + case 160: + qe |= 4; + break; + case 135: + E.assert(D1()), qe |= 6, de(); + break; + default: + E.fail(); + } + de(); + let vt; + if (X() === 165 && Vt(Rk)) + vt = hf(); + else { + const Wt = _t(); + qr(H), vt = y_( + 8, + H ? gT : af + ), qr(Wt); + } + return qt(Ee(vt, qe), Pe); + } + function Rk() { + return dl() && de() === 22; + } + function P1(H, Pe, qe) { + const vt = Mk( + /*inForStatementInitializer*/ + !1 + ); + Ca(); + const Wt = te(qe, vt); + return jr(qt(Wt, H), Pe); + } + function hT(H, Pe, qe) { + const vt = Et(), Wt = lm(qe); + Ot( + 100 + /* FunctionKeyword */ + ); + const br = zs( + 42 + /* AsteriskToken */ + ), Rn = Wt & 2048 ? fd() : Ll(), Ai = br ? 1 : 0, ui = Wt & 1024 ? 2 : 0, _i = v_(); + Wt & 32 && ki( + /*value*/ + !0 + ); + const qi = Rd(Ai | ui), Ya = dp( + 59, + /*isType*/ + !1 + ), Za = zu(Ai | ui, p.or_expected); + ki(vt); + const Ia = g.createFunctionDeclaration(qe, br, Rn, _i, qi, Ya, Za); + return jr(qt(Ia, H), Pe); + } + function Xv() { + if (X() === 137) + return Ot( + 137 + /* ConstructorKeyword */ + ); + if (X() === 11 && Vt(de) === 21) + return ir(() => { + const H = Ar(); + return H.text === "constructor" ? H : void 0; + }); + } + function pd(H, Pe, qe) { + return ir(() => { + if (Xv()) { + const vt = v_(), Wt = Rd( + 0 + /* None */ + ), br = dp( + 59, + /*isType*/ + !1 + ), Rn = zu(0, p.or_expected), Ai = g.createConstructorDeclaration(qe, Wt, Rn); + return Ai.typeParameters = vt, Ai.type = br, jr(qt(Ai, H), Pe); + } + }); + } + function gl(H, Pe, qe, vt, Wt, br, Rn, Ai) { + const ui = vt ? 1 : 0, _i = at(qe, hD) ? 2 : 0, qi = v_(), Ya = Rd(ui | _i), Za = dp( + 59, + /*isType*/ + !1 + ), Ia = zu(ui | _i, Ai), yp = g.createMethodDeclaration( + qe, + vt, + Wt, + br, + qi, + Ya, + Za, + Ia + ); + return yp.exclamationToken = Rn, jr(qt(yp, H), Pe); + } + function lh(H, Pe, qe, vt, Wt) { + const br = !Wt && !t.hasPrecedingLineBreak() ? zs( + 54 + /* ExclamationToken */ + ) : void 0, Rn = Bd(), Ai = Cs(90112, ih); + kc(vt, Rn, Ai); + const ui = g.createPropertyDeclaration( + qe, + vt, + Wt || br, + Rn, + Ai + ); + return jr(qt(ui, H), Pe); + } + function Om(H, Pe, qe) { + const vt = zs( + 42 + /* AsteriskToken */ + ), Wt = Yr(), br = zs( + 58 + /* QuestionToken */ + ); + return vt || X() === 21 || X() === 30 ? gl( + H, + Pe, + qe, + vt, + Wt, + br, + /*exclamationToken*/ + void 0, + p.or_expected + ) : lh(H, Pe, qe, Wt, br); + } + function Xp(H, Pe, qe, vt, Wt) { + const br = Yr(), Rn = v_(), Ai = Rd( + 0 + /* None */ + ), ui = dp( + 59, + /*isType*/ + !1 + ), _i = zu(Wt), qi = vt === 177 ? g.createGetAccessorDeclaration(qe, br, Ai, ui, _i) : g.createSetAccessorDeclaration(qe, br, Ai, _i); + return qi.typeParameters = Rn, A_(qi) && (qi.type = ui), jr(qt(qi, H), Pe); + } + function _E() { + let H; + if (X() === 60) + return !0; + for (; By(X()); ) { + if (H = X(), Ij(H)) + return !0; + de(); + } + if (X() === 42 || (rt() && (H = X(), de()), X() === 23)) + return !0; + if (H !== void 0) { + if (!f_(H) || H === 153 || H === 139) + return !0; + switch (X()) { + case 21: + // Method declaration + case 30: + // Generic Method declaration + case 54: + // Non-null assertion on property name + case 59: + // Type Annotation for declaration + case 64: + // Initializer for declaration + case 58: + return !0; + default: + return Zi(); + } + } + return !1; + } + function Bc(H, Pe, qe) { + hs( + 126 + /* StaticKeyword */ + ); + const vt = k(), Wt = jr(qt(g.createClassStaticBlockDeclaration(vt), H), Pe); + return Wt.modifiers = qe, Wt; + } + function k() { + const H = Ye(), Pe = Et(); + Bn(!1), ki(!0); + const qe = oh( + /*ignoreMissingOpenBrace*/ + !1 + ); + return Bn(H), ki(Pe), qe; + } + function ce() { + if (Et() && X() === 135) { + const H = L(), Pe = To(p.Expression_expected); + de(); + const qe = Wf( + H, + Pe, + /*allowOptionalChain*/ + !0 + ); + return gg(H, qe); + } + return x1(); + } + function mt() { + const H = L(); + if (!ri( + 60 + /* AtToken */ + )) + return; + const Pe = Ve(ce); + return qt(g.createDecorator(Pe), H); + } + function sr(H, Pe, qe) { + const vt = L(), Wt = X(); + if (X() === 87 && Pe) { + if (!ir(Ji)) + return; + } else { + if (qe && X() === 126 && Vt(eb)) + return; + if (H && X() === 126) + return; + if (!dc()) + return; + } + return qt(A(Wt), vt); + } + function Yn(H, Pe, qe) { + const vt = L(); + let Wt, br, Rn, Ai = !1, ui = !1, _i = !1; + if (H && X() === 60) + for (; br = mt(); ) + Wt = Pr(Wt, br); + for (; Rn = sr(Ai, Pe, qe); ) + Rn.kind === 126 && (Ai = !0), Wt = Pr(Wt, Rn), ui = !0; + if (ui && H && X() === 60) + for (; br = mt(); ) + Wt = Pr(Wt, br), _i = !0; + if (_i) + for (; Rn = sr(Ai, Pe, qe); ) + Rn.kind === 126 && (Ai = !0), Wt = Pr(Wt, Rn); + return Wt && Oi(Wt, vt); + } + function zi() { + let H; + if (X() === 134) { + const Pe = L(); + de(); + const qe = qt(A( + 134 + /* AsyncKeyword */ + ), Pe); + H = Oi([qe], Pe); + } + return H; + } + function Qi() { + const H = L(), Pe = ve(); + if (X() === 27) + return de(), jr(qt(g.createSemicolonClassElement(), H), Pe); + const qe = Yn( + /*allowDecorators*/ + !0, + /*permitConstAsModifier*/ + !0, + /*stopOnStartOfClassStaticBlock*/ + !0 + ); + if (X() === 126 && Vt(eb)) + return Bc(H, Pe, qe); + if (En( + 139 + /* GetKeyword */ + )) + return Xp( + H, + Pe, + qe, + 177, + 0 + /* None */ + ); + if (En( + 153 + /* SetKeyword */ + )) + return Xp( + H, + Pe, + qe, + 178, + 0 + /* None */ + ); + if (X() === 137 || X() === 11) { + const vt = pd(H, Pe, qe); + if (vt) + return vt; + } + if (ud()) + return y1(H, Pe, qe); + if (c_(X()) || X() === 11 || X() === 9 || X() === 10 || X() === 42 || X() === 23) + if (at(qe, w1)) { + for (const Wt of qe) + Wt.flags |= 33554432; + return Ks(33554432, () => Om(H, Pe, qe)); + } else + return Om(H, Pe, qe); + if (qe) { + const vt = Qa( + 80, + /*reportAtCurrentPosition*/ + !0, + p.Declaration_expected + ); + return lh( + H, + Pe, + qe, + vt, + /*questionToken*/ + void 0 + ); + } + return E.fail("Should not have attempted to parse class member declaration."); + } + function ds() { + const H = L(), Pe = ve(), qe = Yn( + /*allowDecorators*/ + !0 + ); + if (X() === 86) + return nu( + H, + Pe, + qe, + 231 + /* ClassExpression */ + ); + const vt = Qa( + 282, + /*reportAtCurrentPosition*/ + !0, + p.Expression_expected + ); + return oD(vt, H), vt.modifiers = qe, vt; + } + function ws() { + return nu( + L(), + ve(), + /*modifiers*/ + void 0, + 231 + /* ClassExpression */ + ); + } + function Ea(H, Pe, qe) { + return nu( + H, + Pe, + qe, + 263 + /* ClassDeclaration */ + ); + } + function nu(H, Pe, qe, vt) { + const Wt = Et(); + Ot( + 86 + /* ClassKeyword */ + ); + const br = r0(), Rn = v_(); + at(qe, jx) && ki( + /*value*/ + !0 + ); + const Ai = Wu(); + let ui; + Ot( + 19 + /* OpenBraceToken */ + ) ? (ui = yT(), Ot( + 20 + /* CloseBraceToken */ + )) : ui = hf(), ki(Wt); + const _i = vt === 263 ? g.createClassDeclaration(qe, br, Rn, Ai, ui) : g.createClassExpression(qe, br, Rn, Ai, ui); + return jr(qt(_i, H), Pe); + } + function r0() { + return Tr() && !uh() ? Ol(Tr()) : void 0; + } + function uh() { + return X() === 119 && Vt(Ml); + } + function Wu() { + if (Yv()) + return Do(22, Qv); + } + function Qv() { + const H = L(), Pe = X(); + E.assert( + Pe === 96 || Pe === 119 + /* ImplementsKeyword */ + ), de(); + const qe = y_(7, jk); + return qt(g.createHeritageClause(Pe, qe), H); + } + function jk() { + const H = L(), Pe = x1(); + if (Pe.kind === 233) + return Pe; + const qe = F2(); + return qt(g.createExpressionWithTypeArguments(Pe, qe), H); + } + function F2() { + return X() === 30 ? Q( + 20, + Tl, + 30, + 32 + /* GreaterThanToken */ + ) : void 0; + } + function Yv() { + return X() === 96 || X() === 119; + } + function yT() { + return Do(5, Qi); + } + function Zv(H, Pe, qe) { + Ot( + 120 + /* InterfaceKeyword */ + ); + const vt = To(), Wt = v_(), br = Wu(), Rn = Dr(), Ai = g.createInterfaceDeclaration(qe, vt, Wt, br, Rn); + return jr(qt(Ai, H), Pe); + } + function Qp(H, Pe, qe) { + Ot( + 156 + /* TypeKeyword */ + ), t.hasPrecedingLineBreak() && Xt(p.Line_break_not_permitted_here); + const vt = To(), Wt = v_(); + Ot( + 64 + /* EqualsToken */ + ); + const br = X() === 141 && ir(i_) || Tl(); + Ca(); + const Rn = g.createTypeAliasDeclaration(qe, vt, Wt, br); + return jr(qt(Rn, H), Pe); + } + function N1() { + const H = L(), Pe = ve(), qe = Yr(), vt = xr(ih); + return jr(qt(g.createEnumMember(qe, vt), H), Pe); + } + function Kv(H, Pe, qe) { + Ot( + 94 + /* EnumKeyword */ + ); + const vt = To(); + let Wt; + Ot( + 19 + /* OpenBraceToken */ + ) ? (Wt = Ke(() => y_(6, N1)), Ot( + 20 + /* CloseBraceToken */ + )) : Wt = hf(); + const br = g.createEnumDeclaration(qe, vt, Wt); + return jr(qt(br, H), Pe); + } + function b8() { + const H = L(); + let Pe; + return Ot( + 19 + /* OpenBraceToken */ + ) ? (Pe = Do(1, hp), Ot( + 20 + /* CloseBraceToken */ + )) : Pe = hf(), qt(g.createModuleBlock(Pe), H); + } + function A1(H, Pe, qe, vt) { + const Wt = vt & 32, br = vt & 8 ? ge() : To(), Rn = ri( + 25 + /* DotToken */ + ) ? A1( + L(), + /*hasJSDoc*/ + !1, + /*modifiers*/ + void 0, + 8 | Wt + ) : b8(), Ai = g.createModuleDeclaration(qe, br, Rn, vt); + return jr(qt(Ai, H), Pe); + } + function Fw(H, Pe, qe) { + let vt = 0, Wt; + X() === 162 ? (Wt = To(), vt |= 2048) : (Wt = Ar(), Wt.text = Mc(Wt.text)); + let br; + X() === 19 ? br = b8() : Ca(); + const Rn = g.createModuleDeclaration(qe, Wt, br, vt); + return jr(qt(Rn, H), Pe); + } + function S8(H, Pe, qe) { + let vt = 0; + if (X() === 162) + return Fw(H, Pe, qe); + if (ri( + 145 + /* NamespaceKeyword */ + )) + vt |= 32; + else if (Ot( + 144 + /* ModuleKeyword */ + ), X() === 11) + return Fw(H, Pe, qe); + return A1(H, Pe, qe, vt); + } + function T8() { + return X() === 149 && Vt(Ui); + } + function Ui() { + return de() === 21; + } + function eb() { + return de() === 19; + } + function $r() { + return de() === 44; + } + function Ow(H, Pe, qe) { + Ot( + 130 + /* AsKeyword */ + ), Ot( + 145 + /* NamespaceKeyword */ + ); + const vt = To(); + Ca(); + const Wt = g.createNamespaceExportDeclaration(vt); + return Wt.modifiers = qe, jr(qt(Wt, H), Pe); + } + function fE(H, Pe, qe) { + Ot( + 102 + /* ImportKeyword */ + ); + const vt = t.getTokenFullStart(); + let Wt; + _r() && (Wt = To()); + let br = !1; + if (Wt?.escapedText === "type" && (X() !== 161 || _r() && Vt($v)) && (_r() || RL()) && (br = !0, Wt = _r() ? To() : void 0), Wt && !Lm()) + return jL(H, Pe, qe, Wt, br); + const Rn = I1(Wt, vt, br), Ai = bT(), ui = pE(); + Ca(); + const _i = g.createImportDeclaration(qe, Rn, Ai, ui); + return jr(qt(_i, H), Pe); + } + function I1(H, Pe, qe, vt = !1) { + let Wt; + return (H || // import id + X() === 42 || // import * + X() === 19) && (Wt = Lw(H, Pe, qe, vt), Ot( + 161 + /* FromKeyword */ + )), Wt; + } + function pE() { + const H = X(); + if ((H === 118 || H === 132) && !t.hasPrecedingLineBreak()) + return dE(H); + } + function x8() { + const H = L(), Pe = c_(X()) ? ge() : ps( + 11 + /* StringLiteral */ + ); + Ot( + 59 + /* ColonToken */ + ); + const qe = zf( + /*allowReturnTypeInArrowFunction*/ + !0 + ); + return qt(g.createImportAttribute(Pe, qe), H); + } + function dE(H, Pe) { + const qe = L(); + Pe || Ot(H); + const vt = t.getTokenStart(); + if (Ot( + 19 + /* OpenBraceToken */ + )) { + const Wt = t.hasPrecedingLineBreak(), br = y_( + 24, + x8, + /*considerSemicolonAsDelimiter*/ + !0 + ); + if (!Ot( + 20 + /* CloseBraceToken */ + )) { + const Rn = Co(he); + Rn && Rn.code === p._0_expected.code && Bs( + Rn, + Cx(oe, ue, vt, 1, p.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}") + ); + } + return qt(g.createImportAttributes(br, Wt, H), qe); + } else { + const Wt = Oi( + [], + L(), + /*end*/ + void 0, + /*hasTrailingComma*/ + !1 + ); + return qt(g.createImportAttributes( + Wt, + /*multiLine*/ + !1, + H + ), qe); + } + } + function RL() { + return X() === 42 || X() === 19; + } + function Lm() { + return X() === 28 || X() === 161; + } + function jL(H, Pe, qe, vt, Wt) { + Ot( + 64 + /* EqualsToken */ + ); + const br = BL(); + Ca(); + const Rn = g.createImportEqualsDeclaration(qe, Wt, vt, br); + return jr(qt(Rn, H), Pe); + } + function Lw(H, Pe, qe, vt) { + let Wt; + return (!H || ri( + 28 + /* CommaToken */ + )) && (vt && t.setSkipJsDocLeadingAsterisks(!0), Wt = X() === 42 ? k8() : mE( + 275 + /* NamedImports */ + ), vt && t.setSkipJsDocLeadingAsterisks(!1)), qt(g.createImportClause(qe, H, Wt), Pe); + } + function BL() { + return T8() ? vT() : et( + /*allowReservedWords*/ + !1 + ); + } + function vT() { + const H = L(); + Ot( + 149 + /* RequireKeyword */ + ), Ot( + 21 + /* OpenParenToken */ + ); + const Pe = bT(); + return Ot( + 22 + /* CloseParenToken */ + ), qt(g.createExternalModuleReference(Pe), H); + } + function bT() { + if (X() === 11) { + const H = Ar(); + return H.text = Mc(H.text), H; + } else + return tu(); + } + function k8() { + const H = L(); + Ot( + 42 + /* AsteriskToken */ + ), Ot( + 130 + /* AsKeyword */ + ); + const Pe = To(); + return qt(g.createNamespaceImport(Pe), H); + } + function F1() { + return c_(X()) || X() === 11; + } + function dd(H) { + return X() === 11 ? Ar() : H(); + } + function mE(H) { + const Pe = L(), qe = H === 275 ? g.createNamedImports(Q( + 23, + O1, + 19, + 20 + /* CloseBraceToken */ + )) : g.createNamedExports(Q( + 23, + hg, + 19, + 20 + /* CloseBraceToken */ + )); + return qt(qe, Pe); + } + function hg() { + const H = ve(); + return jr(C8( + 281 + /* ExportSpecifier */ + ), H); + } + function O1() { + return C8( + 276 + /* ImportSpecifier */ + ); + } + function C8(H) { + const Pe = L(); + let qe = f_(X()) && !_r(), vt = t.getTokenStart(), Wt = t.getTokenEnd(), br = !1, Rn, Ai = !0, ui = dd(ge); + if (ui.kind === 80 && ui.escapedText === "type") + if (X() === 130) { + const Ya = ge(); + if (X() === 130) { + const Za = ge(); + F1() ? (br = !0, Rn = Ya, ui = dd(qi), Ai = !1) : (Rn = ui, ui = Za, Ai = !1); + } else F1() ? (Rn = ui, Ai = !1, ui = dd(qi)) : (br = !0, ui = Ya); + } else F1() && (br = !0, ui = dd(qi)); + Ai && X() === 130 && (Rn = ui, Ot( + 130 + /* AsKeyword */ + ), ui = dd(qi)), H === 276 && (ui.kind !== 80 ? (ye(aa(ue, ui.pos), ui.end, p.Identifier_expected), ui = Cd(Qa( + 80, + /*reportAtCurrentPosition*/ + !1 + ), ui.pos, ui.pos)) : qe && ye(vt, Wt, p.Identifier_expected)); + const _i = H === 276 ? g.createImportSpecifier(br, Rn, ui) : g.createExportSpecifier(br, Rn, ui); + return qt(_i, Pe); + function qi() { + return qe = f_(X()) && !_r(), vt = t.getTokenStart(), Wt = t.getTokenEnd(), ge(); + } + } + function yg(H) { + return qt(g.createNamespaceExport(dd(ge)), H); + } + function ST(H, Pe, qe) { + const vt = Et(); + ki( + /*value*/ + !0 + ); + let Wt, br, Rn; + const Ai = ri( + 156 + /* TypeKeyword */ + ), ui = L(); + ri( + 42 + /* AsteriskToken */ + ) ? (ri( + 130 + /* AsKeyword */ + ) && (Wt = yg(ui)), Ot( + 161 + /* FromKeyword */ + ), br = bT()) : (Wt = mE( + 279 + /* NamedExports */ + ), (X() === 161 || X() === 11 && !t.hasPrecedingLineBreak()) && (Ot( + 161 + /* FromKeyword */ + ), br = bT())); + const _i = X(); + br && (_i === 118 || _i === 132) && !t.hasPrecedingLineBreak() && (Rn = dE(_i)), Ca(), ki(vt); + const qi = g.createExportDeclaration(qe, Ai, Wt, br, Rn); + return jr(qt(qi, H), Pe); + } + function E8(H, Pe, qe) { + const vt = Et(); + ki( + /*value*/ + !0 + ); + let Wt; + ri( + 64 + /* EqualsToken */ + ) ? Wt = !0 : Ot( + 90 + /* DefaultKeyword */ + ); + const br = zf( + /*allowReturnTypeInArrowFunction*/ + !0 + ); + Ca(), ki(vt); + const Rn = g.createExportAssignment(qe, Wt, br); + return jr(qt(Rn, H), Pe); + } + let Pc; + ((H) => { + H[H.SourceElements = 0] = "SourceElements", H[H.BlockStatements = 1] = "BlockStatements", H[H.SwitchClauses = 2] = "SwitchClauses", H[H.SwitchClauseStatements = 3] = "SwitchClauseStatements", H[H.TypeMembers = 4] = "TypeMembers", H[H.ClassMembers = 5] = "ClassMembers", H[H.EnumMembers = 6] = "EnumMembers", H[H.HeritageClauseElement = 7] = "HeritageClauseElement", H[H.VariableDeclarations = 8] = "VariableDeclarations", H[H.ObjectBindingElements = 9] = "ObjectBindingElements", H[H.ArrayBindingElements = 10] = "ArrayBindingElements", H[H.ArgumentExpressions = 11] = "ArgumentExpressions", H[H.ObjectLiteralMembers = 12] = "ObjectLiteralMembers", H[H.JsxAttributes = 13] = "JsxAttributes", H[H.JsxChildren = 14] = "JsxChildren", H[H.ArrayLiteralMembers = 15] = "ArrayLiteralMembers", H[H.Parameters = 16] = "Parameters", H[H.JSDocParameters = 17] = "JSDocParameters", H[H.RestProperties = 18] = "RestProperties", H[H.TypeParameters = 19] = "TypeParameters", H[H.TypeArguments = 20] = "TypeArguments", H[H.TupleElementTypes = 21] = "TupleElementTypes", H[H.HeritageClauses = 22] = "HeritageClauses", H[H.ImportOrExportSpecifiers = 23] = "ImportOrExportSpecifiers", H[H.ImportAttributes = 24] = "ImportAttributes", H[H.JSDocComment = 25] = "JSDocComment", H[H.Count = 26] = "Count"; + })(Pc || (Pc = {})); + let Bk; + ((H) => { + H[H.False = 0] = "False", H[H.True = 1] = "True", H[H.Unknown = 2] = "Unknown"; + })(Bk || (Bk = {})); + let Ua; + ((H) => { + function Pe(_i, qi, Ya) { + Bt( + "file.js", + _i, + 99, + /*syntaxCursor*/ + void 0, + 1, + 0 + /* ParseAll */ + ), t.setText(_i, qi, Ya), De = t.scan(); + const Za = qe(), Ia = gt( + "file.js", + 99, + 1, + /*isDeclarationFile*/ + !1, + [], + A( + 1 + /* EndOfFileToken */ + ), + 0, + Ja + ), yp = Ex(he, Ia); + return ne && (Ia.jsDocDiagnostics = Ex(ne, Ia)), bi(), Za ? { jsDocTypeExpression: Za, diagnostics: yp } : void 0; + } + H.parseJSDocTypeExpressionForTests = Pe; + function qe(_i) { + const qi = L(), Ya = (_i ? ri : Ot)( + 19 + /* OpenBraceToken */ + ), Za = Ks(16777216, xo); + (!_i || Ya) && Wo( + 20 + /* CloseBraceToken */ + ); + const Ia = g.createJSDocTypeExpression(Za); + return Re(Ia), qt(Ia, qi); + } + H.parseJSDocTypeExpression = qe; + function vt() { + const _i = L(), qi = ri( + 19 + /* OpenBraceToken */ + ), Ya = L(); + let Za = et( + /*allowReservedWords*/ + !1 + ); + for (; X() === 81; ) + ut(), st(), Za = qt(g.createJSDocMemberName(Za, To()), Ya); + qi && Wo( + 20 + /* CloseBraceToken */ + ); + const Ia = g.createJSDocNameReference(Za); + return Re(Ia), qt(Ia, _i); + } + H.parseJSDocNameReference = vt; + function Wt(_i, qi, Ya) { + Bt( + "", + _i, + 99, + /*syntaxCursor*/ + void 0, + 1, + 0 + /* ParseAll */ + ); + const Za = Ks(16777216, () => ui(qi, Ya)), yp = Ex(he, { languageVariant: 0, text: _i }); + return bi(), Za ? { jsDoc: Za, diagnostics: yp } : void 0; + } + H.parseIsolatedJSDocComment = Wt; + function br(_i, qi, Ya) { + const Za = De, Ia = he.length, yp = Qt, rl = Ks(16777216, () => ui(qi, Ya)); + return Fa(rl, _i), Nr & 524288 && (ne || (ne = []), Nn(ne, he, Ia)), De = Za, he.length = Ia, Qt = yp, rl; + } + H.parseJSDocComment = br; + let Rn; + ((_i) => { + _i[_i.BeginningOfLine = 0] = "BeginningOfLine", _i[_i.SawAsterisk = 1] = "SawAsterisk", _i[_i.SavingComments = 2] = "SavingComments", _i[_i.SavingBackticks = 3] = "SavingBackticks"; + })(Rn || (Rn = {})); + let Ai; + ((_i) => { + _i[_i.Property = 1] = "Property", _i[_i.Parameter = 2] = "Parameter", _i[_i.CallbackParameter = 4] = "CallbackParameter"; + })(Ai || (Ai = {})); + function ui(_i = 0, qi) { + const Ya = ue, Za = qi === void 0 ? Ya.length : _i + qi; + if (qi = Za - _i, E.assert(_i >= 0), E.assert(_i <= Za), E.assert(Za <= Ya.length), !xz(Ya, _i)) + return; + let Ia, yp, rl, Vf, n0, _h = []; + const L1 = [], JL = Lt; + Lt |= 1 << 25; + const La = t.scanRange(_i + 3, qi - 5, Zc); + return Lt = JL, La; + function Zc() { + let wr = 1, Dn, On = _i - (Ya.lastIndexOf(` +`, _i) + 1) + 4; + function yi(so) { + Dn || (Dn = On), _h.push(so), On += so.length; + } + for (st(); zd( + 5 + /* WhitespaceTrivia */ + ); ) ; + zd( + 4 + /* NewLineTrivia */ + ) && (wr = 0, On = 0); + e: + for (; ; ) { + switch (X()) { + case 60: + O2(_h), n0 || (n0 = L()), es(ln(On)), wr = 0, Dn = void 0; + break; + case 4: + _h.push(t.getTokenText()), wr = 0, On = 0; + break; + case 42: + const so = t.getTokenText(); + wr === 1 ? (wr = 2, yi(so)) : (E.assert( + wr === 0 + /* BeginningOfLine */ + ), wr = 1, On += so.length); + break; + case 5: + E.assert(wr !== 2, "whitespace shouldn't come from the scanner while saving top-level comment text"); + const wo = t.getTokenText(); + Dn !== void 0 && On + wo.length > Dn && _h.push(wo.slice(Dn - On)), On += wo.length; + break; + case 1: + break e; + case 82: + wr = 2, yi(t.getTokenValue()); + break; + case 19: + wr = 2; + const bg = t.getTokenFullStart(), Rm = t.getTokenEnd() - 1, Wd = B(Rm); + if (Wd) { + Vf || i0(_h), L1.push(qt(g.createJSDocText(_h.join("")), Vf ?? _i, bg)), L1.push(Wd), _h = [], Vf = t.getTokenEnd(); + break; + } + // fallthrough if it's not a {@link sequence + default: + wr = 2, yi(t.getTokenText()); + break; + } + wr === 2 ? Gt( + /*inBackticks*/ + !1 + ) : st(); + } + const oi = _h.join("").trimEnd(); + L1.length && oi.length && L1.push(qt(g.createJSDocText(oi), Vf ?? _i, n0)), L1.length && Ia && E.assertIsDefined(n0, "having parsed tags implies that the end of the comment span should be set"); + const Ma = Ia && Oi(Ia, yp, rl); + return qt(g.createJSDocComment(L1.length ? Oi(L1, _i, n0) : oi.length ? oi : void 0, Ma), _i, Za); + } + function i0(wr) { + for (; wr.length && (wr[0] === ` +` || wr[0] === "\r"); ) + wr.shift(); + } + function O2(wr) { + for (; wr.length; ) { + const Dn = wr[wr.length - 1].trimEnd(); + if (Dn === "") + wr.pop(); + else if (Dn.length < wr[wr.length - 1].length) { + wr[wr.length - 1] = Dn; + break; + } else + break; + } + } + function Mw() { + for (; ; ) { + if (st(), X() === 1) + return !0; + if (!(X() === 5 || X() === 4)) + return !1; + } + } + function Sf() { + if (!((X() === 5 || X() === 4) && Vt(Mw))) + for (; X() === 5 || X() === 4; ) + st(); + } + function tb() { + if ((X() === 5 || X() === 4) && Vt(Mw)) + return ""; + let wr = t.hasPrecedingLineBreak(), Dn = !1, On = ""; + for (; wr && X() === 42 || X() === 5 || X() === 4; ) + On += t.getTokenText(), X() === 4 ? (wr = !0, Dn = !0, On = "") : X() === 42 && (wr = !1), st(); + return Dn ? On : ""; + } + function ln(wr) { + E.assert( + X() === 60 + /* AtToken */ + ); + const Dn = t.getTokenStart(); + st(); + const On = rb( + /*message*/ + void 0 + ), yi = tb(); + let oi; + switch (On.escapedText) { + case "author": + oi = afe(Dn, On, wr, yi); + break; + case "implements": + oi = jw(Dn, On, wr, yi); + break; + case "augments": + case "extends": + oi = DG(Dn, On, wr, yi); + break; + case "class": + case "constructor": + oi = Jk(Dn, g.createJSDocClassTag, On, wr, yi); + break; + case "public": + oi = Jk(Dn, g.createJSDocPublicTag, On, wr, yi); + break; + case "private": + oi = Jk(Dn, g.createJSDocPrivateTag, On, wr, yi); + break; + case "protected": + oi = Jk(Dn, g.createJSDocProtectedTag, On, wr, yi); + break; + case "readonly": + oi = Jk(Dn, g.createJSDocReadonlyTag, On, wr, yi); + break; + case "override": + oi = Jk(Dn, g.createJSDocOverrideTag, On, wr, yi); + break; + case "deprecated": + Xn = !0, oi = Jk(Dn, g.createJSDocDeprecatedTag, On, wr, yi); + break; + case "this": + oi = AG(Dn, On, wr, yi); + break; + case "enum": + oi = cfe(Dn, On, wr, yi); + break; + case "arg": + case "argument": + case "param": + return qf(Dn, On, 2, wr); + case "return": + case "returns": + oi = sfe(Dn, On, wr, yi); + break; + case "template": + oi = WL(Dn, On, wr, yi); + break; + case "type": + oi = EG(Dn, On, wr, yi); + break; + case "typedef": + oi = hE(Dn, On, wr, yi); + break; + case "callback": + oi = en(Dn, On, wr, yi); + break; + case "overload": + oi = M1(Dn, On, wr, yi); + break; + case "satisfies": + oi = wG(Dn, On, wr, yi); + break; + case "see": + oi = TT(Dn, On, wr, yi); + break; + case "exception": + case "throws": + oi = Rw(Dn, On, wr, yi); + break; + case "import": + oi = Bw(Dn, On, wr, yi); + break; + default: + oi = _n(Dn, On, wr, yi); + break; + } + return oi; + } + function v(wr, Dn, On, yi) { + return yi || (On += Dn - wr), P(On, yi.slice(On)); + } + function P(wr, Dn) { + const On = L(); + let yi = []; + const oi = []; + let Ma, so = 0, wo; + function bg(jm) { + wo || (wo = wr), yi.push(jm), wr += jm.length; + } + Dn !== void 0 && (Dn !== "" && bg(Dn), so = 1); + let Rm = X(); + e: + for (; ; ) { + switch (Rm) { + case 4: + so = 0, yi.push(t.getTokenText()), wr = 0; + break; + case 60: + t.resetTokenState(t.getTokenEnd() - 1); + break e; + case 1: + break e; + case 5: + E.assert(so !== 2 && so !== 3, "whitespace shouldn't come from the scanner while saving comment text"); + const jm = t.getTokenText(); + wo !== void 0 && wr + jm.length > wo && (yi.push(jm.slice(wo - wr)), so = 2), wr += jm.length; + break; + case 19: + so = 2; + const w8 = t.getTokenFullStart(), bE = t.getTokenEnd() - 1, S_ = B(bE); + S_ ? (oi.push(qt(g.createJSDocText(yi.join("")), Ma ?? On, w8)), oi.push(S_), yi = [], Ma = t.getTokenEnd()) : bg(t.getTokenText()); + break; + case 62: + so === 3 ? so = 2 : so = 3, bg(t.getTokenText()); + break; + case 82: + so !== 3 && (so = 2), bg(t.getTokenValue()); + break; + case 42: + if (so === 0) { + so = 1, wr += 1; + break; + } + // record the * as a comment + // falls through + default: + so !== 3 && (so = 2), bg(t.getTokenText()); + break; + } + so === 2 || so === 3 ? Rm = Gt( + so === 3 + /* SavingBackticks */ + ) : Rm = st(); + } + i0(yi); + const Wd = yi.join("").trimEnd(); + if (oi.length) + return Wd.length && oi.push(qt(g.createJSDocText(Wd), Ma ?? On)), Oi(oi, On, t.getTokenEnd()); + if (Wd.length) + return Wd; + } + function B(wr) { + const Dn = ir(Be); + if (!Dn) + return; + st(), Sf(); + const On = ae(), yi = []; + for (; X() !== 20 && X() !== 4 && X() !== 1; ) + yi.push(t.getTokenText()), st(); + const oi = Dn === "link" ? g.createJSDocLink : Dn === "linkcode" ? g.createJSDocLinkCode : g.createJSDocLinkPlain; + return qt(oi(On, yi.join("")), wr, t.getTokenEnd()); + } + function ae() { + if (c_(X())) { + const wr = L(); + let Dn = ge(); + for (; ri( + 25 + /* DotToken */ + ); ) + Dn = qt(g.createQualifiedName(Dn, X() === 81 ? Qa( + 80, + /*reportAtCurrentPosition*/ + !1 + ) : ge()), wr); + for (; X() === 81; ) + ut(), st(), Dn = qt(g.createJSDocMemberName(Dn, To()), wr); + return Dn; + } + } + function Be() { + if (tb(), X() === 19 && st() === 60 && c_(st())) { + const wr = t.getTokenValue(); + if (Jt(wr)) return wr; + } + } + function Jt(wr) { + return wr === "link" || wr === "linkcode" || wr === "linkplain"; + } + function _n(wr, Dn, On, yi) { + return qt(g.createJSDocUnknownTag(Dn, v(wr, L(), On, yi)), wr); + } + function es(wr) { + wr && (Ia ? Ia.push(wr) : (Ia = [wr], yp = wr.pos), rl = wr.end); + } + function io() { + return tb(), X() === 19 ? qe() : void 0; + } + function vp() { + const wr = zd( + 23 + /* OpenBracketToken */ + ); + wr && Sf(); + const Dn = zd( + 62 + /* BacktickToken */ + ), On = ufe(); + return Dn && Bu( + 62 + /* BacktickToken */ + ), wr && (Sf(), zs( + 64 + /* EqualsToken */ + ) && tu(), Ot( + 24 + /* CloseBracketToken */ + )), { name: On, isBracketed: wr }; + } + function vg(wr) { + switch (wr.kind) { + case 151: + return !0; + case 188: + return vg(wr.elementType); + default: + return Y_(wr) && Me(wr.typeName) && wr.typeName.escapedText === "Object" && !wr.typeArguments; + } + } + function qf(wr, Dn, On, yi) { + let oi = io(), Ma = !oi; + tb(); + const { name: so, isBracketed: wo } = vp(), bg = tb(); + Ma && !Vt(Be) && (oi = io()); + const Rm = v(wr, L(), yi, bg), Wd = gE(oi, so, On, yi); + Wd && (oi = Wd, Ma = !0); + const jm = On === 1 ? g.createJSDocPropertyTag(Dn, so, wo, oi, Ma, Rm) : g.createJSDocParameterTag(Dn, so, wo, oi, Ma, Rm); + return qt(jm, wr); + } + function gE(wr, Dn, On, yi) { + if (wr && vg(wr.type)) { + const oi = L(); + let Ma, so; + for (; Ma = ir(() => xT(On, yi, Dn)); ) + Ma.kind === 341 || Ma.kind === 348 ? so = Pr(so, Ma) : Ma.kind === 345 && ft(Ma.tagName, p.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag); + if (so) { + const wo = qt(g.createJSDocTypeLiteral( + so, + wr.type.kind === 188 + /* ArrayType */ + ), oi); + return qt(g.createJSDocTypeExpression(wo), oi); + } + } + } + function sfe(wr, Dn, On, yi) { + at(Ia, xF) && ye(Dn.pos, t.getTokenStart(), p._0_tag_already_specified, Pi(Dn.escapedText)); + const oi = io(); + return qt(g.createJSDocReturnTag(Dn, oi, v(wr, L(), On, yi)), wr); + } + function EG(wr, Dn, On, yi) { + at(Ia, DD) && ye(Dn.pos, t.getTokenStart(), p._0_tag_already_specified, Pi(Dn.escapedText)); + const oi = qe( + /*mayOmitBraces*/ + !0 + ), Ma = On !== void 0 && yi !== void 0 ? v(wr, L(), On, yi) : void 0; + return qt(g.createJSDocTypeTag(Dn, oi, Ma), wr); + } + function TT(wr, Dn, On, yi) { + const Ma = X() === 23 || Vt(() => st() === 60 && c_(st()) && Jt(t.getTokenValue())) ? void 0 : vt(), so = On !== void 0 && yi !== void 0 ? v(wr, L(), On, yi) : void 0; + return qt(g.createJSDocSeeTag(Dn, Ma, so), wr); + } + function Rw(wr, Dn, On, yi) { + const oi = io(), Ma = v(wr, L(), On, yi); + return qt(g.createJSDocThrowsTag(Dn, oi, Ma), wr); + } + function afe(wr, Dn, On, yi) { + const oi = L(), Ma = ofe(); + let so = t.getTokenFullStart(); + const wo = v(wr, so, On, yi); + wo || (so = t.getTokenFullStart()); + const bg = typeof wo != "string" ? Oi(Wi([qt(Ma, oi, so)], wo), oi) : Ma.text + wo; + return qt(g.createJSDocAuthorTag(Dn, bg), wr); + } + function ofe() { + const wr = []; + let Dn = !1, On = t.getToken(); + for (; On !== 1 && On !== 4; ) { + if (On === 30) + Dn = !0; + else { + if (On === 60 && !Dn) + break; + if (On === 32 && Dn) { + wr.push(t.getTokenText()), t.resetTokenState(t.getTokenEnd()); + break; + } + } + wr.push(t.getTokenText()), On = st(); + } + return g.createJSDocText(wr.join("")); + } + function jw(wr, Dn, On, yi) { + const oi = PG(); + return qt(g.createJSDocImplementsTag(Dn, oi, v(wr, L(), On, yi)), wr); + } + function DG(wr, Dn, On, yi) { + const oi = PG(); + return qt(g.createJSDocAugmentsTag(Dn, oi, v(wr, L(), On, yi)), wr); + } + function wG(wr, Dn, On, yi) { + const oi = qe( + /*mayOmitBraces*/ + !1 + ), Ma = On !== void 0 && yi !== void 0 ? v(wr, L(), On, yi) : void 0; + return qt(g.createJSDocSatisfiesTag(Dn, oi, Ma), wr); + } + function Bw(wr, Dn, On, yi) { + const oi = t.getTokenFullStart(); + let Ma; + _r() && (Ma = To()); + const so = I1( + Ma, + oi, + /*isTypeOnly*/ + !0, + /*skipJsDocLeadingAsterisks*/ + !0 + ), wo = bT(), bg = pE(), Rm = On !== void 0 && yi !== void 0 ? v(wr, L(), On, yi) : void 0; + return qt(g.createJSDocImportTag(Dn, so, wo, bg, Rm), wr); + } + function PG() { + const wr = ri( + 19 + /* OpenBraceToken */ + ), Dn = L(), On = NG(); + t.setSkipJsDocLeadingAsterisks(!0); + const yi = F2(); + t.setSkipJsDocLeadingAsterisks(!1); + const oi = g.createExpressionWithTypeArguments(On, yi), Ma = qt(oi, Dn); + return wr && Ot( + 20 + /* CloseBraceToken */ + ), Ma; + } + function NG() { + const wr = L(); + let Dn = rb(); + for (; ri( + 25 + /* DotToken */ + ); ) { + const On = rb(); + Dn = qt(R(Dn, On), wr); + } + return Dn; + } + function Jk(wr, Dn, On, yi, oi) { + return qt(Dn(On, v(wr, L(), yi, oi)), wr); + } + function AG(wr, Dn, On, yi) { + const oi = qe( + /*mayOmitBraces*/ + !0 + ); + return Sf(), qt(g.createJSDocThisTag(Dn, oi, v(wr, L(), On, yi)), wr); + } + function cfe(wr, Dn, On, yi) { + const oi = qe( + /*mayOmitBraces*/ + !0 + ); + return Sf(), qt(g.createJSDocEnumTag(Dn, oi, v(wr, L(), On, yi)), wr); + } + function hE(wr, Dn, On, yi) { + let oi = io(); + tb(); + const Ma = D8(); + Sf(); + let so = P(On), wo; + if (!oi || vg(oi.type)) { + let Rm, Wd, jm, w8 = !1; + for (; (Rm = ir(() => Mm(On))) && Rm.kind !== 345; ) + if (w8 = !0, Rm.kind === 344) + if (Wd) { + const bE = Xt(p.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags); + bE && Bs(bE, Cx(oe, ue, 0, 0, p.The_tag_was_first_specified_here)); + break; + } else + Wd = Rm; + else + jm = Pr(jm, Rm); + if (w8) { + const bE = oi && oi.type.kind === 188, S_ = g.createJSDocTypeLiteral(jm, bE); + oi = Wd && Wd.typeExpression && !vg(Wd.typeExpression.type) ? Wd.typeExpression : qt(S_, wr), wo = oi.end; + } + } + wo = wo || so !== void 0 ? L() : (Ma ?? oi ?? Dn).end, so || (so = v(wr, wo, On, yi)); + const bg = g.createJSDocTypedefTag(Dn, oi, Ma, so); + return qt(bg, wr, wo); + } + function D8(wr) { + const Dn = t.getTokenStart(); + if (!c_(X())) + return; + const On = rb(); + if (ri( + 25 + /* DotToken */ + )) { + const yi = D8( + /*nested*/ + !0 + ), oi = g.createModuleDeclaration( + /*modifiers*/ + void 0, + On, + yi, + wr ? 8 : void 0 + ); + return qt(oi, Dn); + } + return wr && (On.flags |= 4096), On; + } + function lfe(wr) { + const Dn = L(); + let On, yi; + for (; On = ir(() => xT(4, wr)); ) { + if (On.kind === 345) { + ft(On.tagName, p.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag); + break; + } + yi = Pr(yi, On); + } + return Oi(yi || [], Dn); + } + function ly(wr, Dn) { + const On = lfe(Dn), yi = ir(() => { + if (zd( + 60 + /* AtToken */ + )) { + const oi = ln(Dn); + if (oi && oi.kind === 342) + return oi; + } + }); + return qt(g.createJSDocSignature( + /*typeParameters*/ + void 0, + On, + yi + ), wr); + } + function en(wr, Dn, On, yi) { + const oi = D8(); + Sf(); + let Ma = P(On); + const so = ly(wr, On); + Ma || (Ma = v(wr, L(), On, yi)); + const wo = Ma !== void 0 ? L() : so.end; + return qt(g.createJSDocCallbackTag(Dn, so, oi, Ma), wr, wo); + } + function M1(wr, Dn, On, yi) { + Sf(); + let oi = P(On); + const Ma = ly(wr, On); + oi || (oi = v(wr, L(), On, yi)); + const so = oi !== void 0 ? L() : Ma.end; + return qt(g.createJSDocOverloadTag(Dn, Ma, oi), wr, so); + } + function IG(wr, Dn) { + for (; !Me(wr) || !Me(Dn); ) + if (!Me(wr) && !Me(Dn) && wr.right.escapedText === Dn.right.escapedText) + wr = wr.left, Dn = Dn.left; + else + return !1; + return wr.escapedText === Dn.escapedText; + } + function Mm(wr) { + return xT(1, wr); + } + function xT(wr, Dn, On) { + let yi = !0, oi = !1; + for (; ; ) + switch (st()) { + case 60: + if (yi) { + const Ma = yE(wr, Dn); + return Ma && (Ma.kind === 341 || Ma.kind === 348) && On && (Me(Ma.name) || !IG(On, Ma.name.left)) ? !1 : Ma; + } + oi = !1; + break; + case 4: + yi = !0, oi = !1; + break; + case 42: + oi && (yi = !1), oi = !0; + break; + case 80: + yi = !1; + break; + case 1: + return !1; + } + } + function yE(wr, Dn) { + E.assert( + X() === 60 + /* AtToken */ + ); + const On = t.getTokenFullStart(); + st(); + const yi = rb(), oi = tb(); + let Ma; + switch (yi.escapedText) { + case "type": + return wr === 1 && EG(On, yi); + case "prop": + case "property": + Ma = 1; + break; + case "arg": + case "argument": + case "param": + Ma = 6; + break; + case "template": + return WL(On, yi, Dn, oi); + case "this": + return AG(On, yi, Dn, oi); + default: + return !1; + } + return wr & Ma ? qf(On, yi, wr, Dn) : !1; + } + function zL() { + const wr = L(), Dn = zd( + 23 + /* OpenBracketToken */ + ); + Dn && Sf(); + const On = Yn( + /*allowDecorators*/ + !1, + /*permitConstAsModifier*/ + !0 + ), yi = rb(p.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces); + let oi; + if (Dn && (Sf(), Ot( + 64 + /* EqualsToken */ + ), oi = Ks(16777216, xo), Ot( + 24 + /* CloseBracketToken */ + )), !tc(yi)) + return qt(g.createTypeParameterDeclaration( + On, + yi, + /*constraint*/ + void 0, + oi + ), wr); + } + function vE() { + const wr = L(), Dn = []; + do { + Sf(); + const On = zL(); + On !== void 0 && Dn.push(On), tb(); + } while (zd( + 28 + /* CommaToken */ + )); + return Oi(Dn, wr); + } + function WL(wr, Dn, On, yi) { + const oi = X() === 19 ? qe() : void 0, Ma = vE(); + return qt(g.createJSDocTemplateTag(Dn, oi, Ma, v(wr, L(), On, yi)), wr); + } + function zd(wr) { + return X() === wr ? (st(), !0) : !1; + } + function ufe() { + let wr = rb(); + for (ri( + 23 + /* OpenBracketToken */ + ) && Ot( + 24 + /* CloseBracketToken */ + ); ri( + 25 + /* DotToken */ + ); ) { + const Dn = rb(); + ri( + 23 + /* OpenBracketToken */ + ) && Ot( + 24 + /* CloseBracketToken */ + ), wr = Rt(wr, Dn); + } + return wr; + } + function rb(wr) { + if (!c_(X())) + return Qa( + 80, + /*reportAtCurrentPosition*/ + !wr, + wr || p.Identifier_expected + ); + bt++; + const Dn = t.getTokenStart(), On = t.getTokenEnd(), yi = X(), oi = Mc(t.getTokenValue()), Ma = qt(D(oi, yi), Dn, On); + return st(), Ma; + } + } + })(Ua = e.JSDocParser || (e.JSDocParser = {})); + })(Sv || (Sv = {})); + var I0e = /* @__PURE__ */ new WeakSet(); + function SLe(e) { + I0e.has(e) && E.fail("Source file has already been incrementally parsed"), I0e.add(e); + } + var F0e = /* @__PURE__ */ new WeakSet(); + function TLe(e) { + return F0e.has(e); + } + function sre(e) { + F0e.add(e); + } + var Cz; + ((e) => { + function t(T, C, D, w) { + if (w = w || E.shouldAssert( + 2 + /* Aggressive */ + ), g(T, C, D, w), jY(D)) + return T; + if (T.statements.length === 0) + return Sv.parseSourceFile( + T.fileName, + C, + T.languageVersion, + /*syntaxCursor*/ + void 0, + /*setParentNodes*/ + !0, + T.scriptKind, + T.setExternalModuleIndicator, + T.jsDocParsingMode + ); + SLe(T), Sv.fixupParentReferences(T); + const A = T.text, O = h(T), F = u(T, D); + g(T, C, F, w), E.assert(F.span.start <= D.span.start), E.assert(Yo(F.span) === Yo(D.span)), E.assert(Yo(f4(F)) === Yo(f4(D))); + const R = f4(F).length - F.span.length; + _(T, F.span.start, Yo(F.span), Yo(f4(F)), R, A, C, w); + const W = Sv.parseSourceFile( + T.fileName, + C, + T.languageVersion, + O, + /*setParentNodes*/ + !0, + T.scriptKind, + T.setExternalModuleIndicator, + T.jsDocParsingMode + ); + return W.commentDirectives = n( + T.commentDirectives, + W.commentDirectives, + F.span.start, + Yo(F.span), + R, + A, + C, + w + ), W.impliedNodeFormat = T.impliedNodeFormat, Lte(T, W), W; + } + e.updateSourceFile = t; + function n(T, C, D, w, A, O, F, R) { + if (!T) return C; + let W, V = !1; + for (const U of T) { + const { range: _e, type: Z } = U; + if (_e.end < D) + W = Pr(W, U); + else if (_e.pos > w) { + $(); + const J = { + range: { pos: _e.pos + A, end: _e.end + A }, + type: Z + }; + W = Pr(W, J), R && E.assert(O.substring(_e.pos, _e.end) === F.substring(J.range.pos, J.range.end)); + } + } + return $(), W; + function $() { + V || (V = !0, W ? C && W.push(...C) : W = C); + } + } + function i(T, C, D, w, A, O, F) { + D ? W(T) : R(T); + return; + function R(V) { + let $ = ""; + if (F && s(V) && ($ = A.substring(V.pos, V.end)), uz(V, C), Cd(V, V.pos + w, V.end + w), F && s(V) && E.assert($ === O.substring(V.pos, V.end)), ms(V, R, W), uf(V)) + for (const U of V.jsDoc) + R(U); + c(V, F); + } + function W(V) { + Cd(V, V.pos + w, V.end + w); + for (const $ of V) + R($); + } + } + function s(T) { + switch (T.kind) { + case 11: + case 9: + case 80: + return !0; + } + return !1; + } + function o(T, C, D, w, A) { + E.assert(T.end >= C, "Adjusting an element that was entirely before the change range"), E.assert(T.pos <= D, "Adjusting an element that was entirely after the change range"), E.assert(T.pos <= T.end); + const O = Math.min(T.pos, w), F = T.end >= D ? ( + // Element ends after the change range. Always adjust the end pos. + T.end + A + ) : ( + // Element ends in the change range. The element will keep its position if + // possible. Or Move backward to the new-end if it's in the 'Y' range. + Math.min(T.end, w) + ); + if (E.assert(O <= F), T.parent) { + const R = T.parent; + E.assertGreaterThanOrEqual(O, R.pos), E.assertLessThanOrEqual(F, R.end); + } + Cd(T, O, F); + } + function c(T, C) { + if (C) { + let D = T.pos; + const w = (A) => { + E.assert(A.pos >= D), D = A.end; + }; + if (uf(T)) + for (const A of T.jsDoc) + w(A); + ms(T, w), E.assert(D <= T.end); + } + } + function _(T, C, D, w, A, O, F, R) { + W(T); + return; + function W($) { + if (E.assert($.pos <= $.end), $.pos > D) { + i( + $, + T, + /*isArray*/ + !1, + A, + O, + F, + R + ); + return; + } + const U = $.end; + if (U >= C) { + if (sre($), uz($, T), o($, C, D, w, A), ms($, W, V), uf($)) + for (const _e of $.jsDoc) + W(_e); + c($, R); + return; + } + E.assert(U < C); + } + function V($) { + if (E.assert($.pos <= $.end), $.pos > D) { + i( + $, + T, + /*isArray*/ + !0, + A, + O, + F, + R + ); + return; + } + const U = $.end; + if (U >= C) { + sre($), o($, C, D, w, A); + for (const _e of $) + W(_e); + return; + } + E.assert(U < C); + } + } + function u(T, C) { + let w = C.span.start; + for (let F = 0; w > 0 && F <= 1; F++) { + const R = m(T, w); + E.assert(R.pos <= w); + const W = R.pos; + w = Math.max(0, W - 1); + } + const A = bc(w, Yo(C.span)), O = C.newLength + (C.span.start - w); + return IP(A, O); + } + function m(T, C) { + let D = T, w; + if (ms(T, O), w) { + const F = A(w); + F.pos > D.pos && (D = F); + } + return D; + function A(F) { + for (; ; ) { + const R = aJ(F); + if (R) + F = R; + else + return F; + } + } + function O(F) { + if (!tc(F)) + if (F.pos <= C) { + if (F.pos >= D.pos && (D = F), C < F.end) + return ms(F, O), !0; + E.assert(F.end <= C), w = F; + } else + return E.assert(F.pos > C), !0; + } + } + function g(T, C, D, w) { + const A = T.text; + if (D && (E.assert(A.length - D.span.length + D.newLength === C.length), w || E.shouldAssert( + 3 + /* VeryAggressive */ + ))) { + const O = A.substr(0, D.span.start), F = C.substr(0, D.span.start); + E.assert(O === F); + const R = A.substring(Yo(D.span), A.length), W = C.substring(Yo(f4(D)), C.length); + E.assert(R === W); + } + } + function h(T) { + let C = T.statements, D = 0; + E.assert(D < C.length); + let w = C[D], A = -1; + return { + currentNode(F) { + return F !== A && (w && w.end === F && D < C.length - 1 && (D++, w = C[D]), (!w || w.pos !== F) && O(F)), A = F, E.assert(!w || w.pos === F), w; + } + }; + function O(F) { + C = void 0, D = -1, w = void 0, ms(T, R, W); + return; + function R(V) { + return F >= V.pos && F < V.end ? (ms(V, R, W), !0) : !1; + } + function W(V) { + if (F >= V.pos && F < V.end) + for (let $ = 0; $ < V.length; $++) { + const U = V[$]; + if (U) { + if (U.pos === F) + return C = V, D = $, w = U, !0; + if (U.pos < F && F < U.end) + return ms(U, R, W), !0; + } + } + return !1; + } + } + } + e.createSyntaxCursor = h; + let S; + ((T) => { + T[T.Value = -1] = "Value"; + })(S || (S = {})); + })(Cz || (Cz = {})); + function fl(e) { + return OF(e) !== void 0; + } + function OF(e) { + const t = ZT( + e, + z5, + /*ignoreCase*/ + !1 + ); + if (t) + return t; + if (Bo( + e, + ".ts" + /* Ts */ + )) { + const n = Vc(e), i = n.lastIndexOf(".d."); + if (i >= 0) + return n.substring(i); + } + } + function xLe(e, t, n, i) { + if (e) { + if (e === "import") + return 99; + if (e === "require") + return 1; + i(t, n - t, p.resolution_mode_should_be_either_require_or_import); + } + } + function Ez(e, t) { + const n = []; + for (const i of Fg(t, 0) || He) { + const s = t.substring(i.pos, i.end); + DLe(n, i, s); + } + e.pragmas = /* @__PURE__ */ new Map(); + for (const i of n) { + if (e.pragmas.has(i.name)) { + const s = e.pragmas.get(i.name); + s instanceof Array ? s.push(i.args) : e.pragmas.set(i.name, [s, i.args]); + continue; + } + e.pragmas.set(i.name, i.args); + } + } + function Dz(e, t) { + e.checkJsDirective = void 0, e.referencedFiles = [], e.typeReferenceDirectives = [], e.libReferenceDirectives = [], e.amdDependencies = [], e.hasNoDefaultLib = !1, e.pragmas.forEach((n, i) => { + switch (i) { + case "reference": { + const s = e.referencedFiles, o = e.typeReferenceDirectives, c = e.libReferenceDirectives; + lr($T(n), (_) => { + const { types: u, lib: m, path: g, ["resolution-mode"]: h, preserve: S } = _.arguments, T = S === "true" ? !0 : void 0; + if (_.arguments["no-default-lib"] === "true") + e.hasNoDefaultLib = !0; + else if (u) { + const C = xLe(h, u.pos, u.end, t); + o.push({ pos: u.pos, end: u.end, fileName: u.value, ...C ? { resolutionMode: C } : {}, ...T ? { preserve: T } : {} }); + } else m ? c.push({ pos: m.pos, end: m.end, fileName: m.value, ...T ? { preserve: T } : {} }) : g ? s.push({ pos: g.pos, end: g.end, fileName: g.value, ...T ? { preserve: T } : {} }) : t(_.range.pos, _.range.end - _.range.pos, p.Invalid_reference_directive_syntax); + }); + break; + } + case "amd-dependency": { + e.amdDependencies = gr( + $T(n), + (s) => ({ name: s.arguments.name, path: s.arguments.path }) + ); + break; + } + case "amd-module": { + if (n instanceof Array) + for (const s of n) + e.moduleName && t(s.range.pos, s.range.end - s.range.pos, p.An_AMD_module_cannot_have_multiple_name_assignments), e.moduleName = s.arguments.name; + else + e.moduleName = n.arguments.name; + break; + } + case "ts-nocheck": + case "ts-check": { + lr($T(n), (s) => { + (!e.checkJsDirective || s.range.pos > e.checkJsDirective.pos) && (e.checkJsDirective = { + enabled: i === "ts-check", + end: s.range.end, + pos: s.range.pos + }); + }); + break; + } + case "jsx": + case "jsxfrag": + case "jsximportsource": + case "jsxruntime": + return; + // Accessed directly + default: + E.fail("Unhandled pragma kind"); + } + }); + } + var are = /* @__PURE__ */ new Map(); + function kLe(e) { + if (are.has(e)) + return are.get(e); + const t = new RegExp(`(\\s${e}\\s*=\\s*)(?:(?:'([^']*)')|(?:"([^"]*)"))`, "im"); + return are.set(e, t), t; + } + var CLe = /^\/\/\/\s*<(\S+)\s.*?\/>/m, ELe = /^\/\/\/?\s*@([^\s:]+)((?:[^\S\r\n]|:).*)?$/m; + function DLe(e, t, n) { + const i = t.kind === 2 && CLe.exec(n); + if (i) { + const o = i[1].toLowerCase(), c = UI[o]; + if (!c || !(c.kind & 1)) + return; + if (c.args) { + const _ = {}; + for (const u of c.args) { + const g = kLe(u.name).exec(n); + if (!g && !u.optional) + return; + if (g) { + const h = g[2] || g[3]; + if (u.captureSpan) { + const S = t.pos + g.index + g[1].length + 1; + _[u.name] = { + value: h, + pos: S, + end: S + h.length + }; + } else + _[u.name] = h; + } + } + e.push({ name: o, args: { arguments: _, range: t } }); + } else + e.push({ name: o, args: { arguments: {}, range: t } }); + return; + } + const s = t.kind === 2 && ELe.exec(n); + if (s) + return O0e(e, t, 2, s); + if (t.kind === 3) { + const o = /@(\S+)(\s+(?:\S.*)?)?$/gm; + let c; + for (; c = o.exec(n); ) + O0e(e, t, 4, c); + } + } + function O0e(e, t, n, i) { + if (!i) return; + const s = i[1].toLowerCase(), o = UI[s]; + if (!o || !(o.kind & n)) + return; + const c = i[2], _ = wLe(o, c); + _ !== "fail" && e.push({ name: s, args: { arguments: _, range: t } }); + } + function wLe(e, t) { + if (!t) return {}; + if (!e.args) return {}; + const n = t.trim().split(/\s+/), i = {}; + for (let s = 0; s < e.args.length; s++) { + const o = e.args[s]; + if (!n[s] && !o.optional) + return "fail"; + if (o.captureSpan) + return E.fail("Capture spans not yet implemented for non-xml pragmas"); + i[o.name] = n[s]; + } + return i; + } + function Tv(e, t) { + return e.kind !== t.kind ? !1 : e.kind === 80 ? e.escapedText === t.escapedText : e.kind === 110 ? !0 : e.kind === 295 ? e.namespace.escapedText === t.namespace.escapedText && e.name.escapedText === t.name.escapedText : e.name.escapedText === t.name.escapedText && Tv(e.expression, t.expression); + } + var ore = { + name: "compileOnSave", + type: "boolean", + defaultValueDescription: !1 + }, L0e = new Map(Object.entries({ + preserve: 1, + "react-native": 3, + react: 2, + "react-jsx": 4, + "react-jsxdev": 5 + /* ReactJSXDev */ + })), NN = new Map(VE(L0e.entries(), ([e, t]) => ["" + t, e])), M0e = [ + // JavaScript only + ["es5", "lib.es5.d.ts"], + ["es6", "lib.es2015.d.ts"], + ["es2015", "lib.es2015.d.ts"], + ["es7", "lib.es2016.d.ts"], + ["es2016", "lib.es2016.d.ts"], + ["es2017", "lib.es2017.d.ts"], + ["es2018", "lib.es2018.d.ts"], + ["es2019", "lib.es2019.d.ts"], + ["es2020", "lib.es2020.d.ts"], + ["es2021", "lib.es2021.d.ts"], + ["es2022", "lib.es2022.d.ts"], + ["es2023", "lib.es2023.d.ts"], + ["es2024", "lib.es2024.d.ts"], + ["esnext", "lib.esnext.d.ts"], + // Host only + ["dom", "lib.dom.d.ts"], + ["dom.iterable", "lib.dom.iterable.d.ts"], + ["dom.asynciterable", "lib.dom.asynciterable.d.ts"], + ["webworker", "lib.webworker.d.ts"], + ["webworker.importscripts", "lib.webworker.importscripts.d.ts"], + ["webworker.iterable", "lib.webworker.iterable.d.ts"], + ["webworker.asynciterable", "lib.webworker.asynciterable.d.ts"], + ["scripthost", "lib.scripthost.d.ts"], + // ES2015 Or ESNext By-feature options + ["es2015.core", "lib.es2015.core.d.ts"], + ["es2015.collection", "lib.es2015.collection.d.ts"], + ["es2015.generator", "lib.es2015.generator.d.ts"], + ["es2015.iterable", "lib.es2015.iterable.d.ts"], + ["es2015.promise", "lib.es2015.promise.d.ts"], + ["es2015.proxy", "lib.es2015.proxy.d.ts"], + ["es2015.reflect", "lib.es2015.reflect.d.ts"], + ["es2015.symbol", "lib.es2015.symbol.d.ts"], + ["es2015.symbol.wellknown", "lib.es2015.symbol.wellknown.d.ts"], + ["es2016.array.include", "lib.es2016.array.include.d.ts"], + ["es2016.intl", "lib.es2016.intl.d.ts"], + ["es2017.arraybuffer", "lib.es2017.arraybuffer.d.ts"], + ["es2017.date", "lib.es2017.date.d.ts"], + ["es2017.object", "lib.es2017.object.d.ts"], + ["es2017.sharedmemory", "lib.es2017.sharedmemory.d.ts"], + ["es2017.string", "lib.es2017.string.d.ts"], + ["es2017.intl", "lib.es2017.intl.d.ts"], + ["es2017.typedarrays", "lib.es2017.typedarrays.d.ts"], + ["es2018.asyncgenerator", "lib.es2018.asyncgenerator.d.ts"], + ["es2018.asynciterable", "lib.es2018.asynciterable.d.ts"], + ["es2018.intl", "lib.es2018.intl.d.ts"], + ["es2018.promise", "lib.es2018.promise.d.ts"], + ["es2018.regexp", "lib.es2018.regexp.d.ts"], + ["es2019.array", "lib.es2019.array.d.ts"], + ["es2019.object", "lib.es2019.object.d.ts"], + ["es2019.string", "lib.es2019.string.d.ts"], + ["es2019.symbol", "lib.es2019.symbol.d.ts"], + ["es2019.intl", "lib.es2019.intl.d.ts"], + ["es2020.bigint", "lib.es2020.bigint.d.ts"], + ["es2020.date", "lib.es2020.date.d.ts"], + ["es2020.promise", "lib.es2020.promise.d.ts"], + ["es2020.sharedmemory", "lib.es2020.sharedmemory.d.ts"], + ["es2020.string", "lib.es2020.string.d.ts"], + ["es2020.symbol.wellknown", "lib.es2020.symbol.wellknown.d.ts"], + ["es2020.intl", "lib.es2020.intl.d.ts"], + ["es2020.number", "lib.es2020.number.d.ts"], + ["es2021.promise", "lib.es2021.promise.d.ts"], + ["es2021.string", "lib.es2021.string.d.ts"], + ["es2021.weakref", "lib.es2021.weakref.d.ts"], + ["es2021.intl", "lib.es2021.intl.d.ts"], + ["es2022.array", "lib.es2022.array.d.ts"], + ["es2022.error", "lib.es2022.error.d.ts"], + ["es2022.intl", "lib.es2022.intl.d.ts"], + ["es2022.object", "lib.es2022.object.d.ts"], + ["es2022.string", "lib.es2022.string.d.ts"], + ["es2022.regexp", "lib.es2022.regexp.d.ts"], + ["es2023.array", "lib.es2023.array.d.ts"], + ["es2023.collection", "lib.es2023.collection.d.ts"], + ["es2023.intl", "lib.es2023.intl.d.ts"], + ["es2024.arraybuffer", "lib.es2024.arraybuffer.d.ts"], + ["es2024.collection", "lib.es2024.collection.d.ts"], + ["es2024.object", "lib.es2024.object.d.ts"], + ["es2024.promise", "lib.es2024.promise.d.ts"], + ["es2024.regexp", "lib.es2024.regexp.d.ts"], + ["es2024.sharedmemory", "lib.es2024.sharedmemory.d.ts"], + ["es2024.string", "lib.es2024.string.d.ts"], + ["esnext.array", "lib.es2023.array.d.ts"], + ["esnext.collection", "lib.esnext.collection.d.ts"], + ["esnext.symbol", "lib.es2019.symbol.d.ts"], + ["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"], + ["esnext.intl", "lib.esnext.intl.d.ts"], + ["esnext.disposable", "lib.esnext.disposable.d.ts"], + ["esnext.bigint", "lib.es2020.bigint.d.ts"], + ["esnext.string", "lib.es2022.string.d.ts"], + ["esnext.promise", "lib.es2024.promise.d.ts"], + ["esnext.weakref", "lib.es2021.weakref.d.ts"], + ["esnext.decorators", "lib.esnext.decorators.d.ts"], + ["esnext.object", "lib.es2024.object.d.ts"], + ["esnext.array", "lib.esnext.array.d.ts"], + ["esnext.regexp", "lib.es2024.regexp.d.ts"], + ["esnext.string", "lib.es2024.string.d.ts"], + ["esnext.iterator", "lib.esnext.iterator.d.ts"], + ["decorators", "lib.decorators.d.ts"], + ["decorators.legacy", "lib.decorators.legacy.d.ts"] + ], LF = M0e.map((e) => e[0]), wz = new Map(M0e), ek = [ + { + name: "watchFile", + type: new Map(Object.entries({ + fixedpollinginterval: 0, + prioritypollinginterval: 1, + dynamicprioritypolling: 2, + fixedchunksizepolling: 3, + usefsevents: 4, + usefseventsonparentdirectory: 5 + /* UseFsEventsOnParentDirectory */ + })), + category: p.Watch_and_Build_Modes, + description: p.Specify_how_the_TypeScript_watch_mode_works, + defaultValueDescription: 4 + /* UseFsEvents */ + }, + { + name: "watchDirectory", + type: new Map(Object.entries({ + usefsevents: 0, + fixedpollinginterval: 1, + dynamicprioritypolling: 2, + fixedchunksizepolling: 3 + /* FixedChunkSizePolling */ + })), + category: p.Watch_and_Build_Modes, + description: p.Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality, + defaultValueDescription: 0 + /* UseFsEvents */ + }, + { + name: "fallbackPolling", + type: new Map(Object.entries({ + fixedinterval: 0, + priorityinterval: 1, + dynamicpriority: 2, + fixedchunksize: 3 + /* FixedChunkSize */ + })), + category: p.Watch_and_Build_Modes, + description: p.Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers, + defaultValueDescription: 1 + /* PriorityInterval */ + }, + { + name: "synchronousWatchDirectory", + type: "boolean", + category: p.Watch_and_Build_Modes, + description: p.Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively, + defaultValueDescription: !1 + }, + { + name: "excludeDirectories", + type: "list", + element: { + name: "excludeDirectory", + type: "string", + isFilePath: !0, + extraValidation: Pre + }, + allowConfigDirTemplateSubstitution: !0, + category: p.Watch_and_Build_Modes, + description: p.Remove_a_list_of_directories_from_the_watch_process + }, + { + name: "excludeFiles", + type: "list", + element: { + name: "excludeFile", + type: "string", + isFilePath: !0, + extraValidation: Pre + }, + allowConfigDirTemplateSubstitution: !0, + category: p.Watch_and_Build_Modes, + description: p.Remove_a_list_of_files_from_the_watch_mode_s_processing + } + ], MF = [ + { + name: "help", + shortName: "h", + type: "boolean", + showInSimplifiedHelpView: !0, + isCommandLineOnly: !0, + category: p.Command_line_Options, + description: p.Print_this_message, + defaultValueDescription: !1 + }, + { + name: "help", + shortName: "?", + type: "boolean", + isCommandLineOnly: !0, + category: p.Command_line_Options, + defaultValueDescription: !1 + }, + { + name: "watch", + shortName: "w", + type: "boolean", + showInSimplifiedHelpView: !0, + isCommandLineOnly: !0, + category: p.Command_line_Options, + description: p.Watch_input_files, + defaultValueDescription: !1 + }, + { + name: "preserveWatchOutput", + type: "boolean", + showInSimplifiedHelpView: !1, + category: p.Output_Formatting, + description: p.Disable_wiping_the_console_in_watch_mode, + defaultValueDescription: !1 + }, + { + name: "listFiles", + type: "boolean", + category: p.Compiler_Diagnostics, + description: p.Print_all_of_the_files_read_during_the_compilation, + defaultValueDescription: !1 + }, + { + name: "explainFiles", + type: "boolean", + category: p.Compiler_Diagnostics, + description: p.Print_files_read_during_the_compilation_including_why_it_was_included, + defaultValueDescription: !1 + }, + { + name: "listEmittedFiles", + type: "boolean", + category: p.Compiler_Diagnostics, + description: p.Print_the_names_of_emitted_files_after_a_compilation, + defaultValueDescription: !1 + }, + { + name: "pretty", + type: "boolean", + showInSimplifiedHelpView: !0, + category: p.Output_Formatting, + description: p.Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read, + defaultValueDescription: !0 + }, + { + name: "traceResolution", + type: "boolean", + category: p.Compiler_Diagnostics, + description: p.Log_paths_used_during_the_moduleResolution_process, + defaultValueDescription: !1 + }, + { + name: "diagnostics", + type: "boolean", + category: p.Compiler_Diagnostics, + description: p.Output_compiler_performance_information_after_building, + defaultValueDescription: !1 + }, + { + name: "extendedDiagnostics", + type: "boolean", + category: p.Compiler_Diagnostics, + description: p.Output_more_detailed_compiler_performance_information_after_building, + defaultValueDescription: !1 + }, + { + name: "generateCpuProfile", + type: "string", + isFilePath: !0, + paramType: p.FILE_OR_DIRECTORY, + category: p.Compiler_Diagnostics, + description: p.Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging, + defaultValueDescription: "profile.cpuprofile" + }, + { + name: "generateTrace", + type: "string", + isFilePath: !0, + paramType: p.DIRECTORY, + category: p.Compiler_Diagnostics, + description: p.Generates_an_event_trace_and_a_list_of_types + }, + { + name: "incremental", + shortName: "i", + type: "boolean", + category: p.Projects, + description: p.Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects, + transpileOptionValue: void 0, + defaultValueDescription: p.false_unless_composite_is_set + }, + { + name: "declaration", + shortName: "d", + type: "boolean", + // Not setting affectsEmit because we calculate this flag might not affect full emit + affectsBuildInfo: !0, + showInSimplifiedHelpView: !0, + category: p.Emit, + transpileOptionValue: void 0, + description: p.Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project, + defaultValueDescription: p.false_unless_composite_is_set + }, + { + name: "declarationMap", + type: "boolean", + // Not setting affectsEmit because we calculate this flag might not affect full emit + affectsBuildInfo: !0, + showInSimplifiedHelpView: !0, + category: p.Emit, + defaultValueDescription: !1, + description: p.Create_sourcemaps_for_d_ts_files + }, + { + name: "emitDeclarationOnly", + type: "boolean", + // Not setting affectsEmit because we calculate this flag might not affect full emit + affectsBuildInfo: !0, + showInSimplifiedHelpView: !0, + category: p.Emit, + description: p.Only_output_d_ts_files_and_not_JavaScript_files, + transpileOptionValue: void 0, + defaultValueDescription: !1 + }, + { + name: "sourceMap", + type: "boolean", + // Not setting affectsEmit because we calculate this flag might not affect full emit + affectsBuildInfo: !0, + showInSimplifiedHelpView: !0, + category: p.Emit, + defaultValueDescription: !1, + description: p.Create_source_map_files_for_emitted_JavaScript_files + }, + { + name: "inlineSourceMap", + type: "boolean", + // Not setting affectsEmit because we calculate this flag might not affect full emit + affectsBuildInfo: !0, + category: p.Emit, + description: p.Include_sourcemap_files_inside_the_emitted_JavaScript, + defaultValueDescription: !1 + }, + { + name: "noCheck", + type: "boolean", + showInSimplifiedHelpView: !1, + category: p.Compiler_Diagnostics, + description: p.Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported, + transpileOptionValue: !0, + defaultValueDescription: !1 + // Not setting affectsSemanticDiagnostics or affectsBuildInfo because we dont want all diagnostics to go away, its handled in builder + }, + { + name: "noEmit", + type: "boolean", + showInSimplifiedHelpView: !0, + category: p.Emit, + description: p.Disable_emitting_files_from_a_compilation, + transpileOptionValue: void 0, + defaultValueDescription: !1 + }, + { + name: "assumeChangesOnlyAffectDirectDependencies", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsEmit: !0, + affectsBuildInfo: !0, + category: p.Watch_and_Build_Modes, + description: p.Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it, + defaultValueDescription: !1 + }, + { + name: "locale", + type: "string", + category: p.Command_line_Options, + isCommandLineOnly: !0, + description: p.Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit, + defaultValueDescription: p.Platform_specific + } + ], Pz = { + name: "target", + shortName: "t", + type: new Map(Object.entries({ + es3: 0, + es5: 1, + es6: 2, + es2015: 2, + es2016: 3, + es2017: 4, + es2018: 5, + es2019: 6, + es2020: 7, + es2021: 8, + es2022: 9, + es2023: 10, + es2024: 11, + esnext: 99 + /* ESNext */ + })), + affectsSourceFile: !0, + affectsModuleResolution: !0, + affectsEmit: !0, + affectsBuildInfo: !0, + deprecatedKeys: /* @__PURE__ */ new Set(["es3"]), + paramType: p.VERSION, + showInSimplifiedHelpView: !0, + category: p.Language_and_Environment, + description: p.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations, + defaultValueDescription: 1 + /* ES5 */ + }, cre = { + name: "module", + shortName: "m", + type: new Map(Object.entries({ + none: 0, + commonjs: 1, + amd: 2, + system: 4, + umd: 3, + es6: 5, + es2015: 5, + es2020: 6, + es2022: 7, + esnext: 99, + node16: 100, + nodenext: 199, + preserve: 200 + /* Preserve */ + })), + affectsSourceFile: !0, + affectsModuleResolution: !0, + affectsEmit: !0, + affectsBuildInfo: !0, + paramType: p.KIND, + showInSimplifiedHelpView: !0, + category: p.Modules, + description: p.Specify_what_module_code_is_generated, + defaultValueDescription: void 0 + }, lre = [ + // CommandLine only options + { + name: "all", + type: "boolean", + showInSimplifiedHelpView: !0, + category: p.Command_line_Options, + description: p.Show_all_compiler_options, + defaultValueDescription: !1 + }, + { + name: "version", + shortName: "v", + type: "boolean", + showInSimplifiedHelpView: !0, + category: p.Command_line_Options, + description: p.Print_the_compiler_s_version, + defaultValueDescription: !1 + }, + { + name: "init", + type: "boolean", + showInSimplifiedHelpView: !0, + category: p.Command_line_Options, + description: p.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file, + defaultValueDescription: !1 + }, + { + name: "project", + shortName: "p", + type: "string", + isFilePath: !0, + showInSimplifiedHelpView: !0, + category: p.Command_line_Options, + paramType: p.FILE_OR_DIRECTORY, + description: p.Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json + }, + { + name: "showConfig", + type: "boolean", + showInSimplifiedHelpView: !0, + category: p.Command_line_Options, + isCommandLineOnly: !0, + description: p.Print_the_final_configuration_instead_of_building, + defaultValueDescription: !1 + }, + { + name: "listFilesOnly", + type: "boolean", + category: p.Command_line_Options, + isCommandLineOnly: !0, + description: p.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing, + defaultValueDescription: !1 + }, + // Basic + Pz, + cre, + { + name: "lib", + type: "list", + element: { + name: "lib", + type: wz, + defaultValueDescription: void 0 + }, + affectsProgramStructure: !0, + showInSimplifiedHelpView: !0, + category: p.Language_and_Environment, + description: p.Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment, + transpileOptionValue: void 0 + }, + { + name: "allowJs", + type: "boolean", + allowJsFlag: !0, + affectsBuildInfo: !0, + showInSimplifiedHelpView: !0, + category: p.JavaScript_Support, + description: p.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files, + defaultValueDescription: !1 + }, + { + name: "checkJs", + type: "boolean", + affectsModuleResolution: !0, + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + showInSimplifiedHelpView: !0, + category: p.JavaScript_Support, + description: p.Enable_error_reporting_in_type_checked_JavaScript_files, + defaultValueDescription: !1 + }, + { + name: "jsx", + type: L0e, + affectsSourceFile: !0, + affectsEmit: !0, + affectsBuildInfo: !0, + affectsModuleResolution: !0, + // The checker emits an error when it sees JSX but this option is not set in compilerOptions. + // This is effectively a semantic error, so mark this option as affecting semantic diagnostics + // so we know to refresh errors when this option is changed. + affectsSemanticDiagnostics: !0, + paramType: p.KIND, + showInSimplifiedHelpView: !0, + category: p.Language_and_Environment, + description: p.Specify_what_JSX_code_is_generated, + defaultValueDescription: void 0 + }, + { + name: "outFile", + type: "string", + affectsEmit: !0, + affectsBuildInfo: !0, + affectsDeclarationPath: !0, + isFilePath: !0, + paramType: p.FILE, + showInSimplifiedHelpView: !0, + category: p.Emit, + description: p.Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output, + transpileOptionValue: void 0 + }, + { + name: "outDir", + type: "string", + affectsEmit: !0, + affectsBuildInfo: !0, + affectsDeclarationPath: !0, + isFilePath: !0, + paramType: p.DIRECTORY, + showInSimplifiedHelpView: !0, + category: p.Emit, + description: p.Specify_an_output_folder_for_all_emitted_files + }, + { + name: "rootDir", + type: "string", + affectsEmit: !0, + affectsBuildInfo: !0, + affectsDeclarationPath: !0, + isFilePath: !0, + paramType: p.LOCATION, + category: p.Modules, + description: p.Specify_the_root_folder_within_your_source_files, + defaultValueDescription: p.Computed_from_the_list_of_input_files + }, + { + name: "composite", + type: "boolean", + // Not setting affectsEmit because we calculate this flag might not affect full emit + affectsBuildInfo: !0, + isTSConfigOnly: !0, + category: p.Projects, + transpileOptionValue: void 0, + defaultValueDescription: !1, + description: p.Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references + }, + { + name: "tsBuildInfoFile", + type: "string", + affectsEmit: !0, + affectsBuildInfo: !0, + isFilePath: !0, + paramType: p.FILE, + category: p.Projects, + transpileOptionValue: void 0, + defaultValueDescription: ".tsbuildinfo", + description: p.Specify_the_path_to_tsbuildinfo_incremental_compilation_file + }, + { + name: "removeComments", + type: "boolean", + affectsEmit: !0, + affectsBuildInfo: !0, + showInSimplifiedHelpView: !0, + category: p.Emit, + defaultValueDescription: !1, + description: p.Disable_emitting_comments + }, + { + name: "importHelpers", + type: "boolean", + affectsEmit: !0, + affectsBuildInfo: !0, + affectsSourceFile: !0, + category: p.Emit, + description: p.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file, + defaultValueDescription: !1 + }, + { + name: "importsNotUsedAsValues", + type: new Map(Object.entries({ + remove: 0, + preserve: 1, + error: 2 + /* Error */ + })), + affectsEmit: !0, + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Backwards_Compatibility, + description: p.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types, + defaultValueDescription: 0 + /* Remove */ + }, + { + name: "downlevelIteration", + type: "boolean", + affectsEmit: !0, + affectsBuildInfo: !0, + category: p.Emit, + description: p.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration, + defaultValueDescription: !1 + }, + { + name: "isolatedModules", + type: "boolean", + category: p.Interop_Constraints, + description: p.Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports, + transpileOptionValue: !0, + defaultValueDescription: !1 + }, + { + name: "verbatimModuleSyntax", + type: "boolean", + affectsEmit: !0, + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Interop_Constraints, + description: p.Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting, + defaultValueDescription: !1 + }, + { + name: "isolatedDeclarations", + type: "boolean", + category: p.Interop_Constraints, + description: p.Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files, + defaultValueDescription: !1, + affectsBuildInfo: !0, + affectsSemanticDiagnostics: !0 + }, + // Strict Type Checks + { + name: "strict", + type: "boolean", + // Though this affects semantic diagnostics, affectsSemanticDiagnostics is not set here + // The value of each strictFlag depends on own strictFlag value or this and never accessed directly. + // But we need to store `strict` in builf info, even though it won't be examined directly, so that the + // flags it controls (e.g. `strictNullChecks`) will be retrieved correctly + affectsBuildInfo: !0, + showInSimplifiedHelpView: !0, + category: p.Type_Checking, + description: p.Enable_all_strict_type_checking_options, + defaultValueDescription: !1 + }, + { + name: "noImplicitAny", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + strictFlag: !0, + category: p.Type_Checking, + description: p.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type, + defaultValueDescription: p.false_unless_strict_is_set + }, + { + name: "strictNullChecks", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + strictFlag: !0, + category: p.Type_Checking, + description: p.When_type_checking_take_into_account_null_and_undefined, + defaultValueDescription: p.false_unless_strict_is_set + }, + { + name: "strictFunctionTypes", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + strictFlag: !0, + category: p.Type_Checking, + description: p.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible, + defaultValueDescription: p.false_unless_strict_is_set + }, + { + name: "strictBindCallApply", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + strictFlag: !0, + category: p.Type_Checking, + description: p.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function, + defaultValueDescription: p.false_unless_strict_is_set + }, + { + name: "strictPropertyInitialization", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + strictFlag: !0, + category: p.Type_Checking, + description: p.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor, + defaultValueDescription: p.false_unless_strict_is_set + }, + { + name: "strictBuiltinIteratorReturn", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + strictFlag: !0, + category: p.Type_Checking, + description: p.Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any, + defaultValueDescription: p.false_unless_strict_is_set + }, + { + name: "noImplicitThis", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + strictFlag: !0, + category: p.Type_Checking, + description: p.Enable_error_reporting_when_this_is_given_the_type_any, + defaultValueDescription: p.false_unless_strict_is_set + }, + { + name: "useUnknownInCatchVariables", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + strictFlag: !0, + category: p.Type_Checking, + description: p.Default_catch_clause_variables_as_unknown_instead_of_any, + defaultValueDescription: p.false_unless_strict_is_set + }, + { + name: "alwaysStrict", + type: "boolean", + affectsSourceFile: !0, + affectsEmit: !0, + affectsBuildInfo: !0, + strictFlag: !0, + category: p.Type_Checking, + description: p.Ensure_use_strict_is_always_emitted, + defaultValueDescription: p.false_unless_strict_is_set + }, + // Additional Checks + { + name: "noUnusedLocals", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Type_Checking, + description: p.Enable_error_reporting_when_local_variables_aren_t_read, + defaultValueDescription: !1 + }, + { + name: "noUnusedParameters", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Type_Checking, + description: p.Raise_an_error_when_a_function_parameter_isn_t_read, + defaultValueDescription: !1 + }, + { + name: "exactOptionalPropertyTypes", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Type_Checking, + description: p.Interpret_optional_property_types_as_written_rather_than_adding_undefined, + defaultValueDescription: !1 + }, + { + name: "noImplicitReturns", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Type_Checking, + description: p.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function, + defaultValueDescription: !1 + }, + { + name: "noFallthroughCasesInSwitch", + type: "boolean", + affectsBindDiagnostics: !0, + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Type_Checking, + description: p.Enable_error_reporting_for_fallthrough_cases_in_switch_statements, + defaultValueDescription: !1 + }, + { + name: "noUncheckedIndexedAccess", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Type_Checking, + description: p.Add_undefined_to_a_type_when_accessed_using_an_index, + defaultValueDescription: !1 + }, + { + name: "noImplicitOverride", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Type_Checking, + description: p.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier, + defaultValueDescription: !1 + }, + { + name: "noPropertyAccessFromIndexSignature", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + showInSimplifiedHelpView: !1, + category: p.Type_Checking, + description: p.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type, + defaultValueDescription: !1 + }, + // Module Resolution + { + name: "moduleResolution", + type: new Map(Object.entries({ + // N.B. The first entry specifies the value shown in `tsc --init` + node10: 2, + node: 2, + classic: 1, + node16: 3, + nodenext: 99, + bundler: 100 + /* Bundler */ + })), + deprecatedKeys: /* @__PURE__ */ new Set(["node"]), + affectsSourceFile: !0, + affectsModuleResolution: !0, + paramType: p.STRATEGY, + category: p.Modules, + description: p.Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier, + defaultValueDescription: p.module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node + }, + { + name: "baseUrl", + type: "string", + affectsModuleResolution: !0, + isFilePath: !0, + category: p.Modules, + description: p.Specify_the_base_directory_to_resolve_non_relative_module_names + }, + { + // this option can only be specified in tsconfig.json + // use type = object to copy the value as-is + name: "paths", + type: "object", + affectsModuleResolution: !0, + allowConfigDirTemplateSubstitution: !0, + isTSConfigOnly: !0, + category: p.Modules, + description: p.Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations, + transpileOptionValue: void 0 + }, + { + // this option can only be specified in tsconfig.json + // use type = object to copy the value as-is + name: "rootDirs", + type: "list", + isTSConfigOnly: !0, + element: { + name: "rootDirs", + type: "string", + isFilePath: !0 + }, + affectsModuleResolution: !0, + allowConfigDirTemplateSubstitution: !0, + category: p.Modules, + description: p.Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules, + transpileOptionValue: void 0, + defaultValueDescription: p.Computed_from_the_list_of_input_files + }, + { + name: "typeRoots", + type: "list", + element: { + name: "typeRoots", + type: "string", + isFilePath: !0 + }, + affectsModuleResolution: !0, + allowConfigDirTemplateSubstitution: !0, + category: p.Modules, + description: p.Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types + }, + { + name: "types", + type: "list", + element: { + name: "types", + type: "string" + }, + affectsProgramStructure: !0, + showInSimplifiedHelpView: !0, + category: p.Modules, + description: p.Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file, + transpileOptionValue: void 0 + }, + { + name: "allowSyntheticDefaultImports", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Interop_Constraints, + description: p.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export, + defaultValueDescription: p.module_system_or_esModuleInterop + }, + { + name: "esModuleInterop", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsEmit: !0, + affectsBuildInfo: !0, + showInSimplifiedHelpView: !0, + category: p.Interop_Constraints, + description: p.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility, + defaultValueDescription: !1 + }, + { + name: "preserveSymlinks", + type: "boolean", + category: p.Interop_Constraints, + description: p.Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node, + defaultValueDescription: !1 + }, + { + name: "allowUmdGlobalAccess", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Modules, + description: p.Allow_accessing_UMD_globals_from_modules, + defaultValueDescription: !1 + }, + { + name: "moduleSuffixes", + type: "list", + element: { + name: "suffix", + type: "string" + }, + listPreserveFalsyValues: !0, + affectsModuleResolution: !0, + category: p.Modules, + description: p.List_of_file_name_suffixes_to_search_when_resolving_a_module + }, + { + name: "allowImportingTsExtensions", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Modules, + description: p.Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set, + defaultValueDescription: !1, + transpileOptionValue: void 0 + }, + { + name: "rewriteRelativeImportExtensions", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Modules, + description: p.Rewrite_ts_tsx_mts_and_cts_file_extensions_in_relative_import_paths_to_their_JavaScript_equivalent_in_output_files, + defaultValueDescription: !1 + }, + { + name: "resolvePackageJsonExports", + type: "boolean", + affectsModuleResolution: !0, + category: p.Modules, + description: p.Use_the_package_json_exports_field_when_resolving_package_imports, + defaultValueDescription: p.true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false + }, + { + name: "resolvePackageJsonImports", + type: "boolean", + affectsModuleResolution: !0, + category: p.Modules, + description: p.Use_the_package_json_imports_field_when_resolving_imports, + defaultValueDescription: p.true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false + }, + { + name: "customConditions", + type: "list", + element: { + name: "condition", + type: "string" + }, + affectsModuleResolution: !0, + category: p.Modules, + description: p.Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports + }, + { + name: "noUncheckedSideEffectImports", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Modules, + description: p.Check_side_effect_imports, + defaultValueDescription: !1 + }, + // Source Maps + { + name: "sourceRoot", + type: "string", + affectsEmit: !0, + affectsBuildInfo: !0, + paramType: p.LOCATION, + category: p.Emit, + description: p.Specify_the_root_path_for_debuggers_to_find_the_reference_source_code + }, + { + name: "mapRoot", + type: "string", + affectsEmit: !0, + affectsBuildInfo: !0, + paramType: p.LOCATION, + category: p.Emit, + description: p.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations + }, + { + name: "inlineSources", + type: "boolean", + affectsEmit: !0, + affectsBuildInfo: !0, + category: p.Emit, + description: p.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript, + defaultValueDescription: !1 + }, + // Experimental + { + name: "experimentalDecorators", + type: "boolean", + affectsEmit: !0, + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Language_and_Environment, + description: p.Enable_experimental_support_for_legacy_experimental_decorators, + defaultValueDescription: !1 + }, + { + name: "emitDecoratorMetadata", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsEmit: !0, + affectsBuildInfo: !0, + category: p.Language_and_Environment, + description: p.Emit_design_type_metadata_for_decorated_declarations_in_source_files, + defaultValueDescription: !1 + }, + // Advanced + { + name: "jsxFactory", + type: "string", + category: p.Language_and_Environment, + description: p.Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h, + defaultValueDescription: "`React.createElement`" + }, + { + name: "jsxFragmentFactory", + type: "string", + category: p.Language_and_Environment, + description: p.Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment, + defaultValueDescription: "React.Fragment" + }, + { + name: "jsxImportSource", + type: "string", + affectsSemanticDiagnostics: !0, + affectsEmit: !0, + affectsBuildInfo: !0, + affectsModuleResolution: !0, + affectsSourceFile: !0, + category: p.Language_and_Environment, + description: p.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk, + defaultValueDescription: "react" + }, + { + name: "resolveJsonModule", + type: "boolean", + affectsModuleResolution: !0, + category: p.Modules, + description: p.Enable_importing_json_files, + defaultValueDescription: !1 + }, + { + name: "allowArbitraryExtensions", + type: "boolean", + affectsProgramStructure: !0, + category: p.Modules, + description: p.Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present, + defaultValueDescription: !1 + }, + { + name: "out", + type: "string", + affectsEmit: !0, + affectsBuildInfo: !0, + affectsDeclarationPath: !0, + isFilePath: !1, + // This is intentionally broken to support compatibility with existing tsconfig files + // for correct behaviour, please use outFile + category: p.Backwards_Compatibility, + paramType: p.FILE, + transpileOptionValue: void 0, + description: p.Deprecated_setting_Use_outFile_instead + }, + { + name: "reactNamespace", + type: "string", + affectsEmit: !0, + affectsBuildInfo: !0, + category: p.Language_and_Environment, + description: p.Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit, + defaultValueDescription: "`React`" + }, + { + name: "skipDefaultLibCheck", + type: "boolean", + // We need to store these to determine whether `lib` files need to be rechecked + affectsBuildInfo: !0, + category: p.Completeness, + description: p.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript, + defaultValueDescription: !1 + }, + { + name: "charset", + type: "string", + category: p.Backwards_Compatibility, + description: p.No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files, + defaultValueDescription: "utf8" + }, + { + name: "emitBOM", + type: "boolean", + affectsEmit: !0, + affectsBuildInfo: !0, + category: p.Emit, + description: p.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files, + defaultValueDescription: !1 + }, + { + name: "newLine", + type: new Map(Object.entries({ + crlf: 0, + lf: 1 + /* LineFeed */ + })), + affectsEmit: !0, + affectsBuildInfo: !0, + paramType: p.NEWLINE, + category: p.Emit, + description: p.Set_the_newline_character_for_emitting_files, + defaultValueDescription: "lf" + }, + { + name: "noErrorTruncation", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Output_Formatting, + description: p.Disable_truncating_types_in_error_messages, + defaultValueDescription: !1 + }, + { + name: "noLib", + type: "boolean", + category: p.Language_and_Environment, + affectsProgramStructure: !0, + description: p.Disable_including_any_library_files_including_the_default_lib_d_ts, + // We are not returning a sourceFile for lib file when asked by the program, + // so pass --noLib to avoid reporting a file not found error. + transpileOptionValue: !0, + defaultValueDescription: !1 + }, + { + name: "noResolve", + type: "boolean", + affectsModuleResolution: !0, + category: p.Modules, + description: p.Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project, + // We are not doing a full typecheck, we are not resolving the whole context, + // so pass --noResolve to avoid reporting missing file errors. + transpileOptionValue: !0, + defaultValueDescription: !1 + }, + { + name: "stripInternal", + type: "boolean", + affectsEmit: !0, + affectsBuildInfo: !0, + category: p.Emit, + description: p.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments, + defaultValueDescription: !1 + }, + { + name: "disableSizeLimit", + type: "boolean", + affectsProgramStructure: !0, + category: p.Editor_Support, + description: p.Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server, + defaultValueDescription: !1 + }, + { + name: "disableSourceOfProjectReferenceRedirect", + type: "boolean", + isTSConfigOnly: !0, + category: p.Projects, + description: p.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects, + defaultValueDescription: !1 + }, + { + name: "disableSolutionSearching", + type: "boolean", + isTSConfigOnly: !0, + category: p.Projects, + description: p.Opt_a_project_out_of_multi_project_reference_checking_when_editing, + defaultValueDescription: !1 + }, + { + name: "disableReferencedProjectLoad", + type: "boolean", + isTSConfigOnly: !0, + category: p.Projects, + description: p.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript, + defaultValueDescription: !1 + }, + { + name: "noImplicitUseStrict", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Backwards_Compatibility, + description: p.Disable_adding_use_strict_directives_in_emitted_JavaScript_files, + defaultValueDescription: !1 + }, + { + name: "noEmitHelpers", + type: "boolean", + affectsEmit: !0, + affectsBuildInfo: !0, + category: p.Emit, + description: p.Disable_generating_custom_helper_functions_like_extends_in_compiled_output, + defaultValueDescription: !1 + }, + { + name: "noEmitOnError", + type: "boolean", + affectsEmit: !0, + affectsBuildInfo: !0, + category: p.Emit, + transpileOptionValue: void 0, + description: p.Disable_emitting_files_if_any_type_checking_errors_are_reported, + defaultValueDescription: !1 + }, + { + name: "preserveConstEnums", + type: "boolean", + affectsEmit: !0, + affectsBuildInfo: !0, + category: p.Emit, + description: p.Disable_erasing_const_enum_declarations_in_generated_code, + defaultValueDescription: !1 + }, + { + name: "declarationDir", + type: "string", + affectsEmit: !0, + affectsBuildInfo: !0, + affectsDeclarationPath: !0, + isFilePath: !0, + paramType: p.DIRECTORY, + category: p.Emit, + transpileOptionValue: void 0, + description: p.Specify_the_output_directory_for_generated_declaration_files + }, + { + name: "skipLibCheck", + type: "boolean", + // We need to store these to determine whether `lib` files need to be rechecked + affectsBuildInfo: !0, + category: p.Completeness, + description: p.Skip_type_checking_all_d_ts_files, + defaultValueDescription: !1 + }, + { + name: "allowUnusedLabels", + type: "boolean", + affectsBindDiagnostics: !0, + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Type_Checking, + description: p.Disable_error_reporting_for_unused_labels, + defaultValueDescription: void 0 + }, + { + name: "allowUnreachableCode", + type: "boolean", + affectsBindDiagnostics: !0, + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Type_Checking, + description: p.Disable_error_reporting_for_unreachable_code, + defaultValueDescription: void 0 + }, + { + name: "suppressExcessPropertyErrors", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Backwards_Compatibility, + description: p.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals, + defaultValueDescription: !1 + }, + { + name: "suppressImplicitAnyIndexErrors", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Backwards_Compatibility, + description: p.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures, + defaultValueDescription: !1 + }, + { + name: "forceConsistentCasingInFileNames", + type: "boolean", + affectsModuleResolution: !0, + category: p.Interop_Constraints, + description: p.Ensure_that_casing_is_correct_in_imports, + defaultValueDescription: !0 + }, + { + name: "maxNodeModuleJsDepth", + type: "number", + affectsModuleResolution: !0, + category: p.JavaScript_Support, + description: p.Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs, + defaultValueDescription: 0 + }, + { + name: "noStrictGenericChecks", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Backwards_Compatibility, + description: p.Disable_strict_checking_of_generic_signatures_in_function_types, + defaultValueDescription: !1 + }, + { + name: "useDefineForClassFields", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsEmit: !0, + affectsBuildInfo: !0, + category: p.Language_and_Environment, + description: p.Emit_ECMAScript_standard_compliant_class_fields, + defaultValueDescription: p.true_for_ES2022_and_above_including_ESNext + }, + { + name: "preserveValueImports", + type: "boolean", + affectsEmit: !0, + affectsBuildInfo: !0, + category: p.Backwards_Compatibility, + description: p.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed, + defaultValueDescription: !1 + }, + { + name: "keyofStringsOnly", + type: "boolean", + category: p.Backwards_Compatibility, + description: p.Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option, + defaultValueDescription: !1 + }, + { + // A list of plugins to load in the language service + name: "plugins", + type: "list", + isTSConfigOnly: !0, + element: { + name: "plugin", + type: "object" + }, + description: p.Specify_a_list_of_language_service_plugins_to_include, + category: p.Editor_Support + }, + { + name: "moduleDetection", + type: new Map(Object.entries({ + auto: 2, + legacy: 1, + force: 3 + /* Force */ + })), + affectsSourceFile: !0, + affectsModuleResolution: !0, + description: p.Control_what_method_is_used_to_detect_module_format_JS_files, + category: p.Language_and_Environment, + defaultValueDescription: p.auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules + }, + { + name: "ignoreDeprecations", + type: "string", + defaultValueDescription: void 0 + } + ], Nd = [ + ...MF, + ...lre + ], ure = Nd.filter((e) => !!e.affectsSemanticDiagnostics), _re = Nd.filter((e) => !!e.affectsEmit), fre = Nd.filter((e) => !!e.affectsDeclarationPath), Nz = Nd.filter((e) => !!e.affectsModuleResolution), Az = Nd.filter((e) => !!e.affectsSourceFile || !!e.affectsBindDiagnostics), pre = Nd.filter((e) => !!e.affectsProgramStructure), dre = Nd.filter((e) => ro(e, "transpileOptionValue")), PLe = Nd.filter( + (e) => e.allowConfigDirTemplateSubstitution || !e.isCommandLineOnly && e.isFilePath + ), NLe = ek.filter( + (e) => e.allowConfigDirTemplateSubstitution || !e.isCommandLineOnly && e.isFilePath + ), mre = Nd.filter(ALe); + function ALe(e) { + return !rs(e.type); + } + var JS = { + name: "build", + type: "boolean", + shortName: "b", + showInSimplifiedHelpView: !0, + category: p.Command_line_Options, + description: p.Build_one_or_more_projects_and_their_dependencies_if_out_of_date, + defaultValueDescription: !1 + }, Iz = [ + JS, + { + name: "verbose", + shortName: "v", + category: p.Command_line_Options, + description: p.Enable_verbose_logging, + type: "boolean", + defaultValueDescription: !1 + }, + { + name: "dry", + shortName: "d", + category: p.Command_line_Options, + description: p.Show_what_would_be_built_or_deleted_if_specified_with_clean, + type: "boolean", + defaultValueDescription: !1 + }, + { + name: "force", + shortName: "f", + category: p.Command_line_Options, + description: p.Build_all_projects_including_those_that_appear_to_be_up_to_date, + type: "boolean", + defaultValueDescription: !1 + }, + { + name: "clean", + category: p.Command_line_Options, + description: p.Delete_the_outputs_of_all_projects, + type: "boolean", + defaultValueDescription: !1 + }, + { + name: "stopBuildOnErrors", + category: p.Command_line_Options, + description: p.Skip_building_downstream_projects_on_error_in_upstream_project, + type: "boolean", + defaultValueDescription: !1 + } + ], AN = [ + ...MF, + ...Iz + ], RF = [ + { + name: "enable", + type: "boolean", + defaultValueDescription: !1 + }, + { + name: "include", + type: "list", + element: { + name: "include", + type: "string" + } + }, + { + name: "exclude", + type: "list", + element: { + name: "exclude", + type: "string" + } + }, + { + name: "disableFilenameBasedTypeAcquisition", + type: "boolean", + defaultValueDescription: !1 + } + ]; + function jF(e) { + const t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(); + return lr(e, (i) => { + t.set(i.name.toLowerCase(), i), i.shortName && n.set(i.shortName, i.name); + }), { optionsNameMap: t, shortOptionNames: n }; + } + var R0e; + function d6() { + return R0e || (R0e = jF(Nd)); + } + var ILe = { + diagnostic: p.Compiler_option_0_may_only_be_used_with_build, + getOptionsNameMap: W0e + }, Fz = { + module: 1, + target: 3, + strict: !0, + esModuleInterop: !0, + forceConsistentCasingInFileNames: !0, + skipLibCheck: !0 + }; + function gre(e) { + return j0e(e, Ho); + } + function j0e(e, t) { + const n = Ki(e.type.keys()), i = (e.deprecatedKeys ? n.filter((s) => !e.deprecatedKeys.has(s)) : n).map((s) => `'${s}'`).join(", "); + return t(p.Argument_for_0_option_must_be_Colon_1, `--${e.name}`, i); + } + function BF(e, t, n) { + return xye(e, (t ?? "").trim(), n); + } + function hre(e, t = "", n) { + if (t = t.trim(), Vi(t, "-")) + return; + if (e.type === "listOrElement" && !t.includes(",")) + return tk(e, t, n); + if (t === "") + return []; + const i = t.split(","); + switch (e.element.type) { + case "number": + return Li(i, (s) => tk(e.element, parseInt(s), n)); + case "string": + return Li(i, (s) => tk(e.element, s || "", n)); + case "boolean": + case "object": + return E.fail(`List of ${e.element.type} is not yet supported.`); + default: + return Li(i, (s) => BF(e.element, s, n)); + } + } + function B0e(e) { + return e.name; + } + function yre(e, t, n, i, s) { + var o; + const c = (o = t.alternateMode) == null ? void 0 : o.getOptionsNameMap().optionsNameMap.get(e.toLowerCase()); + if (c) + return xv( + s, + i, + c !== JS ? t.alternateMode.diagnostic : p.Option_build_must_be_the_first_command_line_argument, + e + ); + const _ = Sb(e, t.optionDeclarations, B0e); + return _ ? xv(s, i, t.unknownDidYouMeanDiagnostic, n || e, _.name) : xv(s, i, t.unknownOptionDiagnostic, n || e); + } + function Oz(e, t, n) { + const i = {}; + let s; + const o = [], c = []; + return _(t), { + options: i, + watchOptions: s, + fileNames: o, + errors: c + }; + function _(m) { + let g = 0; + for (; g < m.length; ) { + const h = m[g]; + if (g++, h.charCodeAt(0) === 64) + u(h.slice(1)); + else if (h.charCodeAt(0) === 45) { + const S = h.slice(h.charCodeAt(1) === 45 ? 2 : 1), T = bre( + e.getOptionsNameMap, + S, + /*allowShort*/ + !0 + ); + if (T) + g = J0e(m, g, e, T, i, c); + else { + const C = bre( + jz.getOptionsNameMap, + S, + /*allowShort*/ + !0 + ); + C ? g = J0e(m, g, jz, C, s || (s = {}), c) : c.push(yre(S, e, h)); + } + } else + o.push(h); + } + } + function u(m) { + const g = ID(m, n || ((T) => nl.readFile(T))); + if (!rs(g)) { + c.push(g); + return; + } + const h = []; + let S = 0; + for (; ; ) { + for (; S < g.length && g.charCodeAt(S) <= 32; ) S++; + if (S >= g.length) break; + const T = S; + if (g.charCodeAt(T) === 34) { + for (S++; S < g.length && g.charCodeAt(S) !== 34; ) S++; + S < g.length ? (h.push(g.substring(T + 1, S)), S++) : c.push(Ho(p.Unterminated_quoted_string_in_response_file_0, m)); + } else { + for (; g.charCodeAt(S) > 32; ) S++; + h.push(g.substring(T, S)); + } + } + _(h); + } + } + function J0e(e, t, n, i, s, o) { + if (i.isTSConfigOnly) { + const c = e[t]; + c === "null" ? (s[i.name] = void 0, t++) : i.type === "boolean" ? c === "false" ? (s[i.name] = tk( + i, + /*value*/ + !1, + o + ), t++) : (c === "true" && t++, o.push(Ho(p.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line, i.name))) : (o.push(Ho(p.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line, i.name)), c && !Vi(c, "-") && t++); + } else if (!e[t] && i.type !== "boolean" && o.push(Ho(n.optionTypeMismatchDiagnostic, i.name, Bz(i))), e[t] !== "null") + switch (i.type) { + case "number": + s[i.name] = tk(i, parseInt(e[t]), o), t++; + break; + case "boolean": + const c = e[t]; + s[i.name] = tk(i, c !== "false", o), (c === "false" || c === "true") && t++; + break; + case "string": + s[i.name] = tk(i, e[t] || "", o), t++; + break; + case "list": + const _ = hre(i, e[t], o); + s[i.name] = _ || [], _ && t++; + break; + case "listOrElement": + E.fail("listOrElement not supported here"); + break; + // If not a primitive, the possible types are specified in what is effectively a map of options. + default: + s[i.name] = BF(i, e[t], o), t++; + break; + } + else + s[i.name] = void 0, t++; + return t; + } + var JF = { + alternateMode: ILe, + getOptionsNameMap: d6, + optionDeclarations: Nd, + unknownOptionDiagnostic: p.Unknown_compiler_option_0, + unknownDidYouMeanDiagnostic: p.Unknown_compiler_option_0_Did_you_mean_1, + optionTypeMismatchDiagnostic: p.Compiler_option_0_expects_an_argument + }; + function vre(e, t) { + return Oz(JF, e, t); + } + function Lz(e, t) { + return bre(d6, e, t); + } + function bre(e, t, n = !1) { + t = t.toLowerCase(); + const { optionsNameMap: i, shortOptionNames: s } = e(); + if (n) { + const o = s.get(t); + o !== void 0 && (t = o); + } + return i.get(t); + } + var z0e; + function W0e() { + return z0e || (z0e = jF(AN)); + } + var FLe = { + diagnostic: p.Compiler_option_0_may_not_be_used_with_build, + getOptionsNameMap: d6 + }, OLe = { + alternateMode: FLe, + getOptionsNameMap: W0e, + optionDeclarations: AN, + unknownOptionDiagnostic: p.Unknown_build_option_0, + unknownDidYouMeanDiagnostic: p.Unknown_build_option_0_Did_you_mean_1, + optionTypeMismatchDiagnostic: p.Build_option_0_requires_a_value_of_type_1 + }; + function Sre(e) { + const { options: t, watchOptions: n, fileNames: i, errors: s } = Oz( + OLe, + e + ), o = t; + return i.length === 0 && i.push("."), o.clean && o.force && s.push(Ho(p.Options_0_and_1_cannot_be_combined, "clean", "force")), o.clean && o.verbose && s.push(Ho(p.Options_0_and_1_cannot_be_combined, "clean", "verbose")), o.clean && o.watch && s.push(Ho(p.Options_0_and_1_cannot_be_combined, "clean", "watch")), o.watch && o.dry && s.push(Ho(p.Options_0_and_1_cannot_be_combined, "watch", "dry")), { buildOptions: o, watchOptions: n, projects: i, errors: s }; + } + function g_(e, ...t) { + return Ws(Ho(e, ...t).messageText, rs); + } + function IN(e, t, n, i, s, o) { + const c = ID(e, (m) => n.readFile(m)); + if (!rs(c)) { + n.onUnRecoverableConfigFileDiagnostic(c); + return; + } + const _ = PN(e, c), u = n.getCurrentDirectory(); + return _.path = oo(e, u, Wl(n.useCaseSensitiveFileNames)), _.resolvedPath = _.path, _.originalFileName = _.fileName, LN( + _, + n, + Xi(Hn(e), u), + t, + Xi(e, u), + /*resolutionStack*/ + void 0, + o, + i, + s + ); + } + function FN(e, t) { + const n = ID(e, t); + return rs(n) ? Mz(e, n) : { config: {}, error: n }; + } + function Mz(e, t) { + const n = PN(e, t); + return { + config: tye( + n, + n.parseDiagnostics, + /*jsonConversionNotifier*/ + void 0 + ), + error: n.parseDiagnostics.length ? n.parseDiagnostics[0] : void 0 + }; + } + function Tre(e, t) { + const n = ID(e, t); + return rs(n) ? PN(e, n) : { fileName: e, parseDiagnostics: [n] }; + } + function ID(e, t) { + let n; + try { + n = t(e); + } catch (i) { + return Ho(p.Cannot_read_file_0_Colon_1, e, i.message); + } + return n === void 0 ? Ho(p.Cannot_read_file_0, e) : n; + } + function Rz(e) { + return aC(e, B0e); + } + var U0e = { + optionDeclarations: RF, + unknownOptionDiagnostic: p.Unknown_type_acquisition_option_0, + unknownDidYouMeanDiagnostic: p.Unknown_type_acquisition_option_0_Did_you_mean_1 + }, V0e; + function q0e() { + return V0e || (V0e = jF(ek)); + } + var jz = { + getOptionsNameMap: q0e, + optionDeclarations: ek, + unknownOptionDiagnostic: p.Unknown_watch_option_0, + unknownDidYouMeanDiagnostic: p.Unknown_watch_option_0_Did_you_mean_1, + optionTypeMismatchDiagnostic: p.Watch_option_0_requires_a_value_of_type_1 + }, H0e; + function G0e() { + return H0e || (H0e = Rz(Nd)); + } + var $0e; + function X0e() { + return $0e || ($0e = Rz(ek)); + } + var Q0e; + function Y0e() { + return Q0e || (Q0e = Rz(RF)); + } + var zF = { + name: "extends", + type: "listOrElement", + element: { + name: "extends", + type: "string" + }, + category: p.File_Management, + disallowNullOrUndefined: !0 + }, Z0e = { + name: "compilerOptions", + type: "object", + elementOptions: G0e(), + extraKeyDiagnostics: JF + }, K0e = { + name: "watchOptions", + type: "object", + elementOptions: X0e(), + extraKeyDiagnostics: jz + }, eye = { + name: "typeAcquisition", + type: "object", + elementOptions: Y0e(), + extraKeyDiagnostics: U0e + }, xre; + function LLe() { + return xre === void 0 && (xre = { + name: void 0, + // should never be needed since this is root + type: "object", + elementOptions: Rz([ + Z0e, + K0e, + eye, + zF, + { + name: "references", + type: "list", + element: { + name: "references", + type: "object" + }, + category: p.Projects + }, + { + name: "files", + type: "list", + element: { + name: "files", + type: "string" + }, + category: p.File_Management + }, + { + name: "include", + type: "list", + element: { + name: "include", + type: "string" + }, + category: p.File_Management, + defaultValueDescription: p.if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk + }, + { + name: "exclude", + type: "list", + element: { + name: "exclude", + type: "string" + }, + category: p.File_Management, + defaultValueDescription: p.node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified + }, + ore + ]) + }), xre; + } + function tye(e, t, n) { + var i; + const s = (i = e.statements[0]) == null ? void 0 : i.expression; + if (s && s.kind !== 210) { + if (t.push(ep( + e, + s, + p.The_root_value_of_a_0_file_must_be_an_object, + Vc(e.fileName) === "jsconfig.json" ? "jsconfig.json" : "tsconfig.json" + )), Ql(s)) { + const o = Pn(s.elements, oa); + if (o) + return ON( + e, + o, + t, + /*returnValue*/ + !0, + n + ); + } + return {}; + } + return ON( + e, + s, + t, + /*returnValue*/ + !0, + n + ); + } + function kre(e, t) { + var n; + return ON( + e, + (n = e.statements[0]) == null ? void 0 : n.expression, + t, + /*returnValue*/ + !0, + /*jsonConversionNotifier*/ + void 0 + ); + } + function ON(e, t, n, i, s) { + if (!t) + return i ? {} : void 0; + return _(t, s?.rootOptions); + function o(m, g) { + var h; + const S = i ? {} : void 0; + for (const T of m.properties) { + if (T.kind !== 303) { + n.push(ep(e, T, p.Property_assignment_expected)); + continue; + } + T.questionToken && n.push(ep(e, T.questionToken, p.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")), u(T.name) || n.push(ep(e, T.name, p.String_literal_with_double_quotes_expected)); + const C = KP(T.name) ? void 0 : _x(T.name), D = C && Pi(C), w = D ? (h = g?.elementOptions) == null ? void 0 : h.get(D) : void 0, A = _(T.initializer, w); + typeof D < "u" && (i && (S[D] = A), s?.onPropertySet(D, A, T, g, w)); + } + return S; + } + function c(m, g) { + if (!i) { + m.forEach((h) => _(h, g)); + return; + } + return kn(m.map((h) => _(h, g)), (h) => h !== void 0); + } + function _(m, g) { + switch (m.kind) { + case 112: + return !0; + case 97: + return !1; + case 106: + return null; + // eslint-disable-line no-restricted-syntax + case 11: + return u(m) || n.push(ep(e, m, p.String_literal_with_double_quotes_expected)), m.text; + case 9: + return Number(m.text); + case 224: + if (m.operator !== 41 || m.operand.kind !== 9) + break; + return -Number(m.operand.text); + case 210: + return o(m, g); + case 209: + return c( + m.elements, + g && g.element + ); + } + g ? n.push(ep(e, m, p.Compiler_option_0_requires_a_value_of_type_1, g.name, Bz(g))) : n.push(ep(e, m, p.Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal)); + } + function u(m) { + return ea(m) && Q7(m, e); + } + } + function Bz(e) { + return e.type === "listOrElement" ? `${Bz(e.element)} or Array` : e.type === "list" ? "Array" : rs(e.type) ? e.type : "string"; + } + function rye(e, t) { + if (e) { + if (MN(t)) return !e.disallowNullOrUndefined; + if (e.type === "list") + return os(t); + if (e.type === "listOrElement") + return os(t) || rye(e.element, t); + const n = rs(e.type) ? e.type : "string"; + return typeof t === n; + } + return !1; + } + function Jz(e, t, n) { + var i, s, o; + const c = Wl(n.useCaseSensitiveFileNames), _ = gr( + kn( + e.fileNames, + (s = (i = e.options.configFile) == null ? void 0 : i.configFileSpecs) != null && s.validatedIncludeSpecs ? jLe( + t, + e.options.configFile.configFileSpecs.validatedIncludeSpecs, + e.options.configFile.configFileSpecs.validatedExcludeSpecs, + n + ) : yb + ), + (C) => fC(Xi(t, n.getCurrentDirectory()), Xi(C, n.getCurrentDirectory()), c) + ), u = { configFilePath: Xi(t, n.getCurrentDirectory()), useCaseSensitiveFileNames: n.useCaseSensitiveFileNames }, m = UF(e.options, u), g = e.watchOptions && BLe(e.watchOptions), h = { + compilerOptions: { + ...WF(m), + showConfig: void 0, + configFile: void 0, + configFilePath: void 0, + help: void 0, + init: void 0, + listFiles: void 0, + listEmittedFiles: void 0, + project: void 0, + build: void 0, + version: void 0 + }, + watchOptions: g && WF(g), + references: gr(e.projectReferences, (C) => ({ ...C, path: C.originalPath ? C.originalPath : "", originalPath: void 0 })), + files: Ir(_) ? _ : void 0, + ...(o = e.options.configFile) != null && o.configFileSpecs ? { + include: RLe(e.options.configFile.configFileSpecs.validatedIncludeSpecs), + exclude: e.options.configFile.configFileSpecs.validatedExcludeSpecs + } : {}, + compileOnSave: e.compileOnSave ? !0 : void 0 + }, S = new Set(m.keys()), T = {}; + for (const C in K4) + if (!S.has(C) && MLe(C, S)) { + const D = K4[C].computeValue(e.options), w = K4[C].computeValue({}); + D !== w && (T[C] = K4[C].computeValue(e.options)); + } + return eS(h.compilerOptions, WF(UF(T, u))), h; + } + function MLe(e, t) { + const n = /* @__PURE__ */ new Set(); + return i(e); + function i(s) { + var o; + return Lp(n, s) ? at((o = K4[s]) == null ? void 0 : o.dependencies, (c) => t.has(c) || i(c)) : !1; + } + } + function WF(e) { + return Object.fromEntries(e); + } + function RLe(e) { + if (Ir(e)) { + if (Ir(e) !== 1) return e; + if (e[0] !== cye) + return e; + } + } + function jLe(e, t, n, i) { + if (!t) return yb; + const s = R5(e, n, t, i.useCaseSensitiveFileNames, i.getCurrentDirectory()), o = s.excludePattern && A0(s.excludePattern, i.useCaseSensitiveFileNames), c = s.includeFilePattern && A0(s.includeFilePattern, i.useCaseSensitiveFileNames); + return c ? o ? (_) => !(c.test(_) && !o.test(_)) : (_) => !c.test(_) : o ? (_) => o.test(_) : yb; + } + function nye(e) { + switch (e.type) { + case "string": + case "number": + case "boolean": + case "object": + return; + case "list": + case "listOrElement": + return nye(e.element); + default: + return e.type; + } + } + function zz(e, t) { + return al(t, (n, i) => { + if (n === e) + return i; + }); + } + function UF(e, t) { + return iye(e, d6(), t); + } + function BLe(e) { + return iye(e, q0e()); + } + function iye(e, { optionsNameMap: t }, n) { + const i = /* @__PURE__ */ new Map(), s = n && Wl(n.useCaseSensitiveFileNames); + for (const o in e) + if (ro(e, o)) { + if (t.has(o) && (t.get(o).category === p.Command_line_Options || t.get(o).category === p.Output_Formatting)) + continue; + const c = e[o], _ = t.get(o.toLowerCase()); + if (_) { + E.assert(_.type !== "listOrElement"); + const u = nye(_); + u ? _.type === "list" ? i.set(o, c.map((m) => zz(m, u))) : i.set(o, zz(c, u)) : n && _.isFilePath ? i.set(o, fC(n.configFilePath, Xi(c, Hn(n.configFilePath)), s)) : n && _.type === "list" && _.element.isFilePath ? i.set(o, c.map((m) => fC(n.configFilePath, Xi(m, Hn(n.configFilePath)), s))) : i.set(o, c); + } + } + return i; + } + function Cre(e, t) { + const n = sye(e); + return s(); + function i(o) { + return Array(o + 1).join(" "); + } + function s() { + const o = [], c = i(2); + return lre.forEach((_) => { + if (!n.has(_.name)) + return; + const u = n.get(_.name), m = Fre(_); + u !== m ? o.push(`${c}${_.name}: ${u}`) : ro(Fz, _.name) && o.push(`${c}${_.name}: ${m}`); + }), o.join(t) + t; + } + } + function sye(e) { + const t = OI(e, Fz); + return UF(t); + } + function Ere(e, t, n) { + const i = sye(e); + return c(); + function s(_) { + return Array(_ + 1).join(" "); + } + function o({ category: _, name: u, isCommandLineOnly: m }) { + const g = [p.Command_line_Options, p.Editor_Support, p.Compiler_Diagnostics, p.Backwards_Compatibility, p.Watch_and_Build_Modes, p.Output_Formatting]; + return !m && _ !== void 0 && (!g.includes(_) || i.has(u)); + } + function c() { + const _ = /* @__PURE__ */ new Map(); + _.set(p.Projects, []), _.set(p.Language_and_Environment, []), _.set(p.Modules, []), _.set(p.JavaScript_Support, []), _.set(p.Emit, []), _.set(p.Interop_Constraints, []), _.set(p.Type_Checking, []), _.set(p.Completeness, []); + for (const T of Nd) + if (o(T)) { + let C = _.get(T.category); + C || _.set(T.category, C = []), C.push(T); + } + let u = 0, m = 0; + const g = []; + _.forEach((T, C) => { + g.length !== 0 && g.push({ value: "" }), g.push({ value: `/* ${us(C)} */` }); + for (const D of T) { + let w; + i.has(D.name) ? w = `"${D.name}": ${JSON.stringify(i.get(D.name))}${(m += 1) === i.size ? "" : ","}` : w = `// "${D.name}": ${JSON.stringify(Fre(D))},`, g.push({ + value: w, + description: `/* ${D.description && us(D.description) || D.name} */` + }), u = Math.max(w.length, u); + } + }); + const h = s(2), S = []; + S.push("{"), S.push(`${h}"compilerOptions": {`), S.push(`${h}${h}/* ${us(p.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file)} */`), S.push(""); + for (const T of g) { + const { value: C, description: D = "" } = T; + S.push(C && `${h}${h}${C}${D && s(u - C.length + 2) + D}`); + } + if (t.length) { + S.push(`${h}},`), S.push(`${h}"files": [`); + for (let T = 0; T < t.length; T++) + S.push(`${h}${h}${JSON.stringify(t[T])}${T === t.length - 1 ? "" : ","}`); + S.push(`${h}]`); + } else + S.push(`${h}}`); + return S.push("}"), S.join(n) + n; + } + } + function VF(e, t) { + const n = {}, i = d6().optionsNameMap; + for (const s in e) + ro(e, s) && (n[s] = JLe( + i.get(s.toLowerCase()), + e[s], + t + )); + return n.configFilePath && (n.configFilePath = t(n.configFilePath)), n; + } + function JLe(e, t, n) { + if (e && !MN(t)) { + if (e.type === "list") { + const i = t; + if (e.element.isFilePath && i.length) + return i.map(n); + } else if (e.isFilePath) + return n(t); + E.assert(e.type !== "listOrElement"); + } + return t; + } + function aye(e, t, n, i, s, o, c, _, u) { + return lye( + e, + /*sourceFile*/ + void 0, + t, + n, + i, + u, + s, + o, + c, + _ + ); + } + function LN(e, t, n, i, s, o, c, _, u) { + var m, g; + (m = nn) == null || m.push(nn.Phase.Parse, "parseJsonSourceFileConfigFileContent", { path: e.fileName }); + const h = lye( + /*json*/ + void 0, + e, + t, + n, + i, + u, + s, + o, + c, + _ + ); + return (g = nn) == null || g.pop(), h; + } + function Wz(e, t) { + t && Object.defineProperty(e, "configFile", { enumerable: !1, writable: !1, value: t }); + } + function MN(e) { + return e == null; + } + function oye(e, t) { + return Hn(Xi(e, t)); + } + var cye = "**/*"; + function lye(e, t, n, i, s = {}, o, c, _ = [], u = [], m) { + E.assert(e === void 0 && t !== void 0 || e !== void 0 && t === void 0); + const g = [], h = mye(e, t, n, i, c, _, g, m), { raw: S } = h, T = uye( + OI(s, h.options || {}), + PLe, + i + ), C = qF( + o && h.watchOptions ? OI(o, h.watchOptions) : h.watchOptions || o, + i + ); + T.configFilePath = c && Vl(c); + const D = Hs(c ? oye(c, i) : i), w = A(); + return t && (t.configFileSpecs = w), Wz(T, t), { + options: T, + watchOptions: C, + fileNames: O(D), + projectReferences: F(D), + typeAcquisition: h.typeAcquisition || qz(), + raw: S, + errors: g, + // Wildcard directories (provided as part of a wildcard path) are stored in a + // file map that marks whether it was a regular wildcard match (with a `*` or `?` token), + // or a recursive directory. This information is used by filesystem watchers to monitor for + // new entries in these paths. + wildcardDirectories: ZLe(w, D, n.useCaseSensitiveFileNames), + compileOnSave: !!S.compileOnSave + }; + function A() { + const U = V("references", (Ee) => typeof Ee == "object", "object"), _e = R(W("files")); + if (_e) { + const Ee = U === "no-prop" || os(U) && U.length === 0, oe = ro(S, "extends"); + if (_e.length === 0 && Ee && !oe) + if (t) { + const ke = c || "tsconfig.json", ue = p.The_files_list_in_config_file_0_is_empty, it = s3(t, "files", (xe) => xe.initializer), Oe = xv(t, it, ue, ke); + g.push(Oe); + } else + $(p.The_files_list_in_config_file_0_is_empty, c || "tsconfig.json"); + } + let Z = R(W("include")); + const J = W("exclude"); + let re = !1, te = R(J); + if (J === "no-prop") { + const Ee = T.outDir, oe = T.declarationDir; + (Ee || oe) && (te = kn([Ee, oe], (ke) => !!ke)); + } + _e === void 0 && Z === void 0 && (Z = [cye], re = !0); + let ie, le, Te, q; + Z && (ie = Eye( + Z, + g, + /*disallowTrailingRecursion*/ + !0, + t, + "include" + ), Te = HF( + ie, + D + ) || ie), te && (le = Eye( + te, + g, + /*disallowTrailingRecursion*/ + !1, + t, + "exclude" + ), q = HF( + le, + D + ) || le); + const me = kn(_e, rs), Ce = HF( + me, + D + ) || me; + return { + filesSpecs: _e, + includeSpecs: Z, + excludeSpecs: te, + validatedFilesSpec: Ce, + validatedIncludeSpecs: Te, + validatedExcludeSpecs: q, + validatedFilesSpecBeforeSubstitution: me, + validatedIncludeSpecsBeforeSubstitution: ie, + validatedExcludeSpecsBeforeSubstitution: le, + isDefaultIncludeSpec: re + }; + } + function O(U) { + const _e = FD(w, U, T, n, u); + return dye(_e, RN(S), _) && g.push(pye(w, c)), _e; + } + function F(U) { + let _e; + const Z = V("references", (J) => typeof J == "object", "object"); + if (os(Z)) + for (const J of Z) + typeof J.path != "string" ? $(p.Compiler_option_0_requires_a_value_of_type_1, "reference.path", "string") : (_e || (_e = [])).push({ + path: Xi(J.path, U), + originalPath: J.path, + prepend: J.prepend, + circular: J.circular + }); + return _e; + } + function R(U) { + return os(U) ? U : void 0; + } + function W(U) { + return V(U, rs, "string"); + } + function V(U, _e, Z) { + if (ro(S, U) && !MN(S[U])) + if (os(S[U])) { + const J = S[U]; + return !t && !Ri(J, _e) && g.push(Ho(p.Compiler_option_0_requires_a_value_of_type_1, U, Z)), J; + } else + return $(p.Compiler_option_0_requires_a_value_of_type_1, U, "Array"), "not-array"; + return "no-prop"; + } + function $(U, ..._e) { + t || g.push(Ho(U, ..._e)); + } + } + function qF(e, t) { + return uye(e, NLe, t); + } + function uye(e, t, n) { + if (!e) return e; + let i; + for (const o of t) + if (e[o.name] !== void 0) { + const c = e[o.name]; + switch (o.type) { + case "string": + E.assert(o.isFilePath), Uz(c) && s(o, fye(c, n)); + break; + case "list": + E.assert(o.element.isFilePath); + const _ = HF(c, n); + _ && s(o, _); + break; + case "object": + E.assert(o.name === "paths"); + const u = zLe(c, n); + u && s(o, u); + break; + default: + E.fail("option type not supported"); + } + } + return i || e; + function s(o, c) { + (i ?? (i = eS({}, e)))[o.name] = c; + } + } + var _ye = "${configDir}"; + function Uz(e) { + return rs(e) && Vi( + e, + _ye, + /*ignoreCase*/ + !0 + ); + } + function fye(e, t) { + return Xi(e.replace(_ye, "./"), t); + } + function HF(e, t) { + if (!e) return e; + let n; + return e.forEach((i, s) => { + Uz(i) && ((n ?? (n = e.slice()))[s] = fye(i, t)); + }), n; + } + function zLe(e, t) { + let n; + return Zd(e).forEach((s) => { + if (!os(e[s])) return; + const o = HF(e[s], t); + o && ((n ?? (n = eS({}, e)))[s] = o); + }), n; + } + function WLe(e) { + return e.code === p.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2.code; + } + function pye({ includeSpecs: e, excludeSpecs: t }, n) { + return Ho( + p.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2, + n || "tsconfig.json", + JSON.stringify(e || []), + JSON.stringify(t || []) + ); + } + function dye(e, t, n) { + return e.length === 0 && t && (!n || n.length === 0); + } + function Vz(e) { + return !e.fileNames.length && ro(e.raw, "references"); + } + function RN(e) { + return !ro(e, "files") && !ro(e, "references"); + } + function GF(e, t, n, i, s) { + const o = i.length; + return dye(e, s) ? i.push(pye(n, t)) : dR(i, (c) => !WLe(c)), o !== i.length; + } + function ULe(e) { + return !!e.options; + } + function mye(e, t, n, i, s, o, c, _) { + var u; + i = Vl(i); + const m = Xi(s || "", i); + if (o.includes(m)) + return c.push(Ho(p.Circularity_detected_while_resolving_configuration_Colon_0, [...o, m].join(" -> "))), { raw: e || kre(t, c) }; + const g = e ? VLe(e, n, i, s, c) : qLe(t, n, i, s, c); + if ((u = g.options) != null && u.paths && (g.options.pathsBasePath = i), g.extendedConfigPath) { + o = o.concat([m]); + const T = { options: {} }; + rs(g.extendedConfigPath) ? h(T, g.extendedConfigPath) : g.extendedConfigPath.forEach((C) => h(T, C)), T.include && (g.raw.include = T.include), T.exclude && (g.raw.exclude = T.exclude), T.files && (g.raw.files = T.files), g.raw.compileOnSave === void 0 && T.compileOnSave && (g.raw.compileOnSave = T.compileOnSave), t && T.extendedSourceFiles && (t.extendedSourceFiles = Ki(T.extendedSourceFiles.keys())), g.options = eS(T.options, g.options), g.watchOptions = g.watchOptions && T.watchOptions ? S(T, g.watchOptions) : g.watchOptions || T.watchOptions; + } + return g; + function h(T, C) { + const D = HLe(t, C, n, o, c, _, T); + if (D && ULe(D)) { + const w = D.raw; + let A; + const O = (F) => { + g.raw[F] || w[F] && (T[F] = gr(w[F], (R) => Uz(R) || q_(R) ? R : Ln( + A || (A = s4(Hn(C), i, Wl(n.useCaseSensitiveFileNames))), + R + ))); + }; + O("include"), O("exclude"), O("files"), w.compileOnSave !== void 0 && (T.compileOnSave = w.compileOnSave), eS(T.options, D.options), T.watchOptions = T.watchOptions && D.watchOptions ? S(T, D.watchOptions) : T.watchOptions || D.watchOptions; + } + } + function S(T, C) { + return T.watchOptionsCopied ? eS(T.watchOptions, C) : (T.watchOptionsCopied = !0, eS({}, T.watchOptions, C)); + } + } + function VLe(e, t, n, i, s) { + ro(e, "excludes") && s.push(Ho(p.Unknown_option_excludes_Did_you_mean_exclude)); + const o = Sye(e.compilerOptions, n, s, i), c = Tye(e.typeAcquisition, n, s, i), _ = $Le(e.watchOptions, n, s); + e.compileOnSave = GLe(e, n, s); + const u = e.extends || e.extends === "" ? gye(e.extends, t, n, i, s) : void 0; + return { raw: e, options: o, watchOptions: _, typeAcquisition: c, extendedConfigPath: u }; + } + function gye(e, t, n, i, s, o, c, _) { + let u; + const m = i ? oye(i, n) : n; + if (rs(e)) + u = hye( + e, + t, + m, + s, + c, + _ + ); + else if (os(e)) { + u = []; + for (let g = 0; g < e.length; g++) { + const h = e[g]; + rs(h) ? u = Pr( + u, + hye( + h, + t, + m, + s, + c?.elements[g], + _ + ) + ) : zS(zF.element, e, n, s, o, c?.elements[g], _); + } + } else + zS(zF, e, n, s, o, c, _); + return u; + } + function qLe(e, t, n, i, s) { + const o = bye(i); + let c, _, u, m; + const g = LLe(), h = tye( + e, + s, + { rootOptions: g, onPropertySet: S } + ); + return c || (c = qz(i)), m && h && h.compilerOptions === void 0 && s.push(ep(e, m[0], p._0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file, _x(m[0]))), { raw: h, options: o, watchOptions: _, typeAcquisition: c, extendedConfigPath: u }; + function S(T, C, D, w, A) { + if (A && A !== zF && (C = zS(A, C, n, s, D, D.initializer, e)), w?.name) + if (A) { + let O; + w === Z0e ? O = o : w === K0e ? O = _ ?? (_ = {}) : w === eye ? O = c ?? (c = qz(i)) : E.fail("Unknown option"), O[A.name] = C; + } else T && w?.extraKeyDiagnostics && (w.elementOptions ? s.push(yre( + T, + w.extraKeyDiagnostics, + /*unknownOptionErrorText*/ + void 0, + D.name, + e + )) : s.push(ep(e, D.name, w.extraKeyDiagnostics.unknownOptionDiagnostic, T))); + else w === g && (A === zF ? u = gye(C, t, n, i, s, D, D.initializer, e) : A || (T === "excludes" && s.push(ep(e, D.name, p.Unknown_option_excludes_Did_you_mean_exclude)), Pn(lre, (O) => O.name === T) && (m = Pr(m, D.name)))); + } + } + function hye(e, t, n, i, s, o) { + if (e = Vl(e), q_(e) || Vi(e, "./") || Vi(e, "../")) { + let _ = Xi(e, n); + if (!t.fileExists(_) && !Eo( + _, + ".json" + /* Json */ + ) && (_ = `${_}.json`, !t.fileExists(_))) { + i.push(xv(o, s, p.File_0_not_found, e)); + return; + } + return _; + } + const c = Hre(e, Ln(n, "tsconfig.json"), t); + if (c.resolvedModule) + return c.resolvedModule.resolvedFileName; + e === "" ? i.push(xv(o, s, p.Compiler_option_0_cannot_be_given_an_empty_string, "extends")) : i.push(xv(o, s, p.File_0_not_found, e)); + } + function HLe(e, t, n, i, s, o, c) { + const _ = n.useCaseSensitiveFileNames ? t : Dy(t); + let u, m, g; + if (o && (u = o.get(_)) ? { extendedResult: m, extendedConfig: g } = u : (m = Tre(t, (h) => n.readFile(h)), m.parseDiagnostics.length || (g = mye( + /*json*/ + void 0, + m, + n, + Hn(t), + Vc(t), + i, + s, + o + )), o && o.set(_, { extendedResult: m, extendedConfig: g })), e && ((c.extendedSourceFiles ?? (c.extendedSourceFiles = /* @__PURE__ */ new Set())).add(m.fileName), m.extendedSourceFiles)) + for (const h of m.extendedSourceFiles) + c.extendedSourceFiles.add(h); + if (m.parseDiagnostics.length) { + s.push(...m.parseDiagnostics); + return; + } + return g; + } + function GLe(e, t, n) { + if (!ro(e, ore.name)) + return !1; + const i = zS(ore, e.compileOnSave, t, n); + return typeof i == "boolean" && i; + } + function yye(e, t, n) { + const i = []; + return { options: Sye(e, t, i, n), errors: i }; + } + function vye(e, t, n) { + const i = []; + return { options: Tye(e, t, i, n), errors: i }; + } + function bye(e) { + return e && Vc(e) === "jsconfig.json" ? { allowJs: !0, maxNodeModuleJsDepth: 2, allowSyntheticDefaultImports: !0, skipLibCheck: !0, noEmit: !0 } : {}; + } + function Sye(e, t, n, i) { + const s = bye(i); + return Dre(G0e(), e, t, s, JF, n), i && (s.configFilePath = Vl(i)), s; + } + function qz(e) { + return { enable: !!e && Vc(e) === "jsconfig.json", include: [], exclude: [] }; + } + function Tye(e, t, n, i) { + const s = qz(i); + return Dre(Y0e(), e, t, s, U0e, n), s; + } + function $Le(e, t, n) { + return Dre( + X0e(), + e, + t, + /*defaultOptions*/ + void 0, + jz, + n + ); + } + function Dre(e, t, n, i, s, o) { + if (t) { + for (const c in t) { + const _ = e.get(c); + _ ? (i || (i = {}))[_.name] = zS(_, t[c], n, o) : o.push(yre(c, s)); + } + return i; + } + } + function xv(e, t, n, ...i) { + return e && t ? ep(e, t, n, ...i) : Ho(n, ...i); + } + function zS(e, t, n, i, s, o, c) { + if (e.isCommandLineOnly) { + i.push(xv(c, s?.name, p.Option_0_can_only_be_specified_on_command_line, e.name)); + return; + } + if (rye(e, t)) { + const _ = e.type; + if (_ === "list" && os(t)) + return kye(e, t, n, i, s, o, c); + if (_ === "listOrElement") + return os(t) ? kye(e, t, n, i, s, o, c) : zS(e.element, t, n, i, s, o, c); + if (!rs(e.type)) + return xye(e, t, i, o, c); + const u = tk(e, t, i, o, c); + return MN(u) ? u : XLe(e, n, u); + } else + i.push(xv(c, o, p.Compiler_option_0_requires_a_value_of_type_1, e.name, Bz(e))); + } + function XLe(e, t, n) { + return e.isFilePath && (n = Vl(n), n = Uz(n) ? n : Xi(n, t), n === "" && (n = ".")), n; + } + function tk(e, t, n, i, s) { + var o; + if (MN(t)) return; + const c = (o = e.extraValidation) == null ? void 0 : o.call(e, t); + if (!c) return t; + n.push(xv(s, i, ...c)); + } + function xye(e, t, n, i, s) { + if (MN(t)) return; + const o = t.toLowerCase(), c = e.type.get(o); + if (c !== void 0) + return tk(e, c, n, i, s); + n.push(j0e(e, (_, ...u) => xv(s, i, _, ...u))); + } + function kye(e, t, n, i, s, o, c) { + return kn(gr(t, (_, u) => zS(e.element, _, n, i, s, o?.elements[u], c)), (_) => e.listPreserveFalsyValues ? !0 : !!_); + } + var QLe = /(?:^|\/)\*\*\/?$/, YLe = /^[^*?]*(?=\/[^/]*[*?])/; + function FD(e, t, n, i, s = He) { + t = Hs(t); + const o = Wl(i.useCaseSensitiveFileNames), c = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), { validatedFilesSpec: m, validatedIncludeSpecs: g, validatedExcludeSpecs: h } = e, S = tD(n, s), T = Z3(n, S); + if (m) + for (const A of m) { + const O = Xi(A, t); + c.set(o(O), O); + } + let C; + if (g && g.length > 0) + for (const A of i.readDirectory( + t, + Dp(T), + h, + g, + /*depth*/ + void 0 + )) { + if (Bo( + A, + ".json" + /* Json */ + )) { + if (!C) { + const R = g.filter((V) => Eo( + V, + ".json" + /* Json */ + )), W = gr(L5(R, t, "files"), (V) => `^${V}$`); + C = W ? W.map((V) => A0(V, i.useCaseSensitiveFileNames)) : He; + } + if (ec(C, (R) => R.test(A)) !== -1) { + const R = o(A); + !c.has(R) && !u.has(R) && u.set(R, A); + } + continue; + } + if (eMe(A, c, _, S, o)) + continue; + tMe(A, _, S, o); + const O = o(A); + !c.has(O) && !_.has(O) && _.set(O, A); + } + const D = Ki(c.values()), w = Ki(_.values()); + return D.concat(w, Ki(u.values())); + } + function wre(e, t, n, i, s) { + const { validatedFilesSpec: o, validatedIncludeSpecs: c, validatedExcludeSpecs: _ } = t; + if (!Ir(c) || !Ir(_)) return !1; + n = Hs(n); + const u = Wl(i); + if (o) { + for (const m of o) + if (u(Xi(m, n)) === e) return !1; + } + return XF(e, _, i, s, n); + } + function Cye(e) { + const t = Vi(e, "**/") ? 0 : e.indexOf("/**/"); + return t === -1 ? !1 : (Eo(e, "/..") ? e.length : e.lastIndexOf("/../")) > t; + } + function $F(e, t, n, i) { + return XF( + e, + kn(t, (s) => !Cye(s)), + n, + i + ); + } + function XF(e, t, n, i, s) { + const o = eD(t, Ln(Hs(i), s), "exclude"), c = o && A0(o, n); + return c ? c.test(e) ? !0 : !_C(e) && c.test(il(e)) : !1; + } + function Eye(e, t, n, i, s) { + return e.filter((c) => { + if (!rs(c)) return !1; + const _ = Pre(c, n); + return _ !== void 0 && t.push(o(..._)), _ === void 0; + }); + function o(c, _) { + const u = j7(i, s, _); + return xv(i, u, c, _); + } + } + function Pre(e, t) { + if (E.assert(typeof e == "string"), t && QLe.test(e)) + return [p.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, e]; + if (Cye(e)) + return [p.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, e]; + } + function ZLe({ validatedIncludeSpecs: e, validatedExcludeSpecs: t }, n, i) { + const s = eD(t, n, "exclude"), o = s && new RegExp(s, i ? "" : "i"), c = {}, _ = /* @__PURE__ */ new Map(); + if (e !== void 0) { + const u = []; + for (const m of e) { + const g = Hs(Ln(n, m)); + if (o && o.test(g)) + continue; + const h = KLe(g, i); + if (h) { + const { key: S, path: T, flags: C } = h, D = _.get(S), w = D !== void 0 ? c[D] : void 0; + (w === void 0 || w < C) && (c[D !== void 0 ? D : T] = C, D === void 0 && _.set(S, T), C === 1 && u.push(S)); + } + } + for (const m in c) + if (ro(c, m)) + for (const g of u) { + const h = Nre(m, i); + h !== g && Zf(g, h, n, !i) && delete c[m]; + } + } + return c; + } + function Nre(e, t) { + return t ? e : Dy(e); + } + function KLe(e, t) { + const n = YLe.exec(e); + if (n) { + const i = e.indexOf("?"), s = e.indexOf("*"), o = e.lastIndexOf(jo); + return { + key: Nre(n[0], t), + path: n[0], + flags: i !== -1 && i < o || s !== -1 && s < o ? 1 : 0 + /* None */ + }; + } + if (hJ(e.substring(e.lastIndexOf(jo) + 1))) { + const i = X1(e); + return { + key: Nre(i, t), + path: i, + flags: 1 + /* Recursive */ + }; + } + } + function eMe(e, t, n, i, s) { + const o = lr(i, (c) => vc(e, c) ? c : void 0); + if (!o) + return !1; + for (const c of o) { + if (Bo(e, c) && (c !== ".ts" || !Bo( + e, + ".d.ts" + /* Dts */ + ))) + return !1; + const _ = s(Oh(e, c)); + if (t.has(_) || n.has(_)) { + if (c === ".d.ts" && (Bo( + e, + ".js" + /* Js */ + ) || Bo( + e, + ".jsx" + /* Jsx */ + ))) + continue; + return !0; + } + } + return !1; + } + function tMe(e, t, n, i) { + const s = lr(n, (o) => vc(e, o) ? o : void 0); + if (s) + for (let o = s.length - 1; o >= 0; o--) { + const c = s[o]; + if (Bo(e, c)) + return; + const _ = i(Oh(e, c)); + t.delete(_); + } + } + function Are(e) { + const t = {}; + for (const n in e) + if (ro(e, n)) { + const i = Lz(n); + i !== void 0 && (t[n] = Ire(e[n], i)); + } + return t; + } + function Ire(e, t) { + if (e === void 0) return e; + switch (t.type) { + case "object": + return ""; + case "string": + return ""; + case "number": + return typeof e == "number" ? e : ""; + case "boolean": + return typeof e == "boolean" ? e : ""; + case "listOrElement": + if (!os(e)) return Ire(e, t.element); + // fall through to list + case "list": + const n = t.element; + return os(e) ? Li(e, (i) => Ire(i, n)) : ""; + default: + return al(t.type, (i, s) => { + if (i === e) + return s; + }); + } + } + function Fre(e) { + switch (e.type) { + case "number": + return 1; + case "boolean": + return !0; + case "string": + const t = e.defaultValueDescription; + return e.isFilePath ? `./${t && typeof t == "string" ? t : ""}` : ""; + case "list": + return []; + case "listOrElement": + return Fre(e.element); + case "object": + return {}; + default: + const n = pP(e.type.keys()); + return n !== void 0 ? n : E.fail("Expected 'option.type' to have entries."); + } + } + function Yi(e, t, ...n) { + e.trace(Dx(t, ...n)); + } + function a1(e, t) { + return !!e.traceResolution && t.trace !== void 0; + } + function rk(e, t, n) { + let i; + if (t && e) { + const s = e.contents.packageJsonContent; + typeof s.name == "string" && typeof s.version == "string" && (i = { + name: s.name, + subModuleName: t.path.slice(e.packageDirectory.length + jo.length), + version: s.version, + peerDependencies: xMe(e, n) + }); + } + return t && { path: t.path, extension: t.ext, packageId: i, resolvedUsingTsExtension: t.resolvedUsingTsExtension }; + } + function Hz(e) { + return rk( + /*packageInfo*/ + void 0, + e, + /*state*/ + void 0 + ); + } + function Dye(e) { + if (e) + return E.assert(e.packageId === void 0), { path: e.path, ext: e.extension, resolvedUsingTsExtension: e.resolvedUsingTsExtension }; + } + function QF(e) { + const t = []; + return e & 1 && t.push("TypeScript"), e & 2 && t.push("JavaScript"), e & 4 && t.push("Declaration"), e & 8 && t.push("JSON"), t.join(", "); + } + function rMe(e) { + const t = []; + return e & 1 && t.push(...Y3), e & 2 && t.push(...GC), e & 4 && t.push(...z5), e & 8 && t.push( + ".json" + /* Json */ + ), t; + } + function Ore(e) { + if (e) + return E.assert(U5(e.extension)), { fileName: e.path, packageId: e.packageId }; + } + function wye(e, t, n, i, s, o, c, _, u) { + if (!c.resultFromCache && !c.compilerOptions.preserveSymlinks && t && n && !t.originalPath && !vl(e)) { + const { resolvedFileName: m, originalPath: g } = Nye(t.path, c.host, c.traceEnabled); + g && (t = { ...t, path: m, originalPath: g }); + } + return Pye( + t, + n, + i, + s, + o, + c.resultFromCache, + _, + u + ); + } + function Pye(e, t, n, i, s, o, c, _) { + return o ? c?.isReadonly ? { + ...o, + failedLookupLocations: Lre(o.failedLookupLocations, n), + affectingLocations: Lre(o.affectingLocations, i), + resolutionDiagnostics: Lre(o.resolutionDiagnostics, s) + } : (o.failedLookupLocations = m6(o.failedLookupLocations, n), o.affectingLocations = m6(o.affectingLocations, i), o.resolutionDiagnostics = m6(o.resolutionDiagnostics, s), o) : { + resolvedModule: e && { + resolvedFileName: e.path, + originalPath: e.originalPath === !0 ? void 0 : e.originalPath, + extension: e.extension, + isExternalLibraryImport: t, + packageId: e.packageId, + resolvedUsingTsExtension: !!e.resolvedUsingTsExtension + }, + failedLookupLocations: OD(n), + affectingLocations: OD(i), + resolutionDiagnostics: OD(s), + alternateResult: _ + }; + } + function OD(e) { + return e.length ? e : void 0; + } + function m6(e, t) { + return t?.length ? e?.length ? (e.push(...t), e) : t : e; + } + function Lre(e, t) { + return e?.length ? t.length ? [...e, ...t] : e.slice() : OD(t); + } + function Mre(e, t, n, i) { + if (!ro(e, t)) { + i.traceEnabled && Yi(i.host, p.package_json_does_not_have_a_0_field, t); + return; + } + const s = e[t]; + if (typeof s !== n || s === null) { + i.traceEnabled && Yi(i.host, p.Expected_type_of_0_field_in_package_json_to_be_1_got_2, t, n, s === null ? "null" : typeof s); + return; + } + return s; + } + function Gz(e, t, n, i) { + const s = Mre(e, t, "string", i); + if (s === void 0) + return; + if (!s) { + i.traceEnabled && Yi(i.host, p.package_json_had_a_falsy_0_field, t); + return; + } + const o = Hs(Ln(n, s)); + return i.traceEnabled && Yi(i.host, p.package_json_has_0_field_1_that_references_2, t, s, o), o; + } + function nMe(e, t, n) { + return Gz(e, "typings", t, n) || Gz(e, "types", t, n); + } + function iMe(e, t, n) { + return Gz(e, "tsconfig", t, n); + } + function sMe(e, t, n) { + return Gz(e, "main", t, n); + } + function aMe(e, t) { + const n = Mre(e, "typesVersions", "object", t); + if (n !== void 0) + return t.traceEnabled && Yi(t.host, p.package_json_has_a_typesVersions_field_with_version_specific_path_mappings), n; + } + function oMe(e, t) { + const n = aMe(e, t); + if (n === void 0) return; + if (t.traceEnabled) + for (const c in n) + ro(n, c) && !JI.tryParse(c) && Yi(t.host, p.package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range, c); + const i = YF(n); + if (!i) { + t.traceEnabled && Yi(t.host, p.package_json_does_not_have_a_typesVersions_entry_that_matches_version_0, UE); + return; + } + const { version: s, paths: o } = i; + if (typeof o != "object") { + t.traceEnabled && Yi(t.host, p.Expected_type_of_0_field_in_package_json_to_be_1_got_2, `typesVersions['${s}']`, "object", typeof o); + return; + } + return i; + } + var Rre; + function YF(e) { + Rre || (Rre = new yd(Xf)); + for (const t in e) { + if (!ro(e, t)) continue; + const n = JI.tryParse(t); + if (n !== void 0 && n.test(Rre)) + return { version: t, paths: e[t] }; + } + } + function LD(e, t) { + if (e.typeRoots) + return e.typeRoots; + let n; + if (e.configFilePath ? n = Hn(e.configFilePath) : t.getCurrentDirectory && (n = t.getCurrentDirectory()), n !== void 0) + return cMe(n); + } + function cMe(e) { + let t; + return a4(Hs(e), (n) => { + const i = Ln(n, lMe); + (t ?? (t = [])).push(i); + }), t; + } + var lMe = Ln("node_modules", "@types"); + function uMe(e, t, n) { + const i = typeof n.useCaseSensitiveFileNames == "function" ? n.useCaseSensitiveFileNames() : n.useCaseSensitiveFileNames; + return xh(e, t, !i) === 0; + } + function Nye(e, t, n) { + const i = Bye(e, t, n), s = uMe(e, i, t); + return { + // If the fileName and realpath are differing only in casing prefer fileName so that we can issue correct errors for casing under forceConsistentCasingInFileNames + resolvedFileName: s ? e : i, + originalPath: s ? void 0 : e + }; + } + function Aye(e, t, n) { + const i = Eo(e, "/node_modules/@types") || Eo(e, "/node_modules/@types/") ? Yye(t, n) : t; + return Ln(e, i); + } + function jre(e, t, n, i, s, o, c) { + E.assert(typeof e == "string", "Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself."); + const _ = a1(n, i); + s && (n = s.commandLine.options); + const u = t ? Hn(t) : void 0; + let m = u ? o?.getFromDirectoryCache(e, c, u, s) : void 0; + if (!m && u && !vl(e) && (m = o?.getFromNonRelativeNameCache(e, c, u, s)), m) + return _ && (Yi(i, p.Resolving_type_reference_directive_0_containing_file_1, e, t), s && Yi(i, p.Using_compiler_options_of_project_reference_redirect_0, s.sourceFile.fileName), Yi(i, p.Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1, e, u), W(m)), m; + const g = LD(n, i); + _ && (t === void 0 ? g === void 0 ? Yi(i, p.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set, e) : Yi(i, p.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1, e, g) : g === void 0 ? Yi(i, p.Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set, e, t) : Yi(i, p.Resolving_type_reference_directive_0_containing_file_1_root_directory_2, e, t, g), s && Yi(i, p.Using_compiler_options_of_project_reference_redirect_0, s.sourceFile.fileName)); + const h = [], S = []; + let T = Bre(n); + c !== void 0 && (T |= 30); + const C = Su(n); + c === 99 && 3 <= C && C <= 99 && (T |= 32); + const D = T & 8 ? o1(n, c) : [], w = [], A = { + compilerOptions: n, + host: i, + traceEnabled: _, + failedLookupLocations: h, + affectingLocations: S, + packageJsonInfoCache: o, + features: T, + conditions: D, + requestContainingDirectory: u, + reportDiagnostic: (U) => void w.push(U), + isConfigLookup: !1, + candidateIsFromPackageJsonField: !1, + resolvedPackageDirectory: !1 + }; + let O = V(), F = !0; + O || (O = $(), F = !1); + let R; + if (O) { + const { fileName: U, packageId: _e } = O; + let Z = U, J; + n.preserveSymlinks || ({ resolvedFileName: Z, originalPath: J } = Nye(U, i, _)), R = { + primary: F, + resolvedFileName: Z, + originalPath: J, + packageId: _e, + isExternalLibraryImport: c1(U) + }; + } + return m = { + resolvedTypeReferenceDirective: R, + failedLookupLocations: OD(h), + affectingLocations: OD(S), + resolutionDiagnostics: OD(w) + }, u && o && !o.isReadonly && (o.getOrCreateCacheForDirectory(u, s).set( + e, + /*mode*/ + c, + m + ), vl(e) || o.getOrCreateCacheForNonRelativeName(e, c, s).set(u, m)), _ && W(m), m; + function W(U) { + var _e; + (_e = U.resolvedTypeReferenceDirective) != null && _e.resolvedFileName ? U.resolvedTypeReferenceDirective.packageId ? Yi(i, p.Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3, e, U.resolvedTypeReferenceDirective.resolvedFileName, K1(U.resolvedTypeReferenceDirective.packageId), U.resolvedTypeReferenceDirective.primary) : Yi(i, p.Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2, e, U.resolvedTypeReferenceDirective.resolvedFileName, U.resolvedTypeReferenceDirective.primary) : Yi(i, p.Type_reference_directive_0_was_not_resolved, e); + } + function V() { + if (g && g.length) + return _ && Yi(i, p.Resolving_with_primary_search_path_0, g.join(", ")), Dc(g, (U) => { + const _e = Aye(U, e, A), Z = xd(U, i); + if (!Z && _ && Yi(i, p.Directory_0_does_not_exist_skipping_all_lookups_in_it, U), n.typeRoots) { + const J = y6(4, _e, !Z, A); + if (J) { + const re = BN(J.path), te = re ? US( + re, + /*onlyRecordFailures*/ + !1, + A + ) : void 0; + return Ore(rk(te, J, A)); + } + } + return Ore( + $re(4, _e, !Z, A) + ); + }); + _ && Yi(i, p.Root_directory_cannot_be_determined_skipping_primary_search_paths); + } + function $() { + const U = t && Hn(t); + if (U !== void 0) { + let _e; + if (!n.typeRoots || !Eo(t, YD)) + if (_ && Yi(i, p.Looking_up_in_node_modules_folder_initial_location_0, U), vl(e)) { + const { path: Z } = jye(U, e); + _e = Yz( + 4, + Z, + /*onlyRecordFailures*/ + !1, + A, + /*considerPackageJson*/ + !0 + ); + } else { + const Z = Gye( + 4, + e, + U, + A, + /*cache*/ + void 0, + /*redirectedReference*/ + void 0 + ); + _e = Z && Z.value; + } + else _ && Yi(i, p.Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_node_modules_folder); + return Ore(_e); + } else + _ && Yi(i, p.Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder); + } + } + function Bre(e) { + let t = 0; + switch (Su(e)) { + case 3: + t = 30; + break; + case 99: + t = 30; + break; + case 100: + t = 30; + break; + } + return e.resolvePackageJsonExports ? t |= 8 : e.resolvePackageJsonExports === !1 && (t &= -9), e.resolvePackageJsonImports ? t |= 2 : e.resolvePackageJsonImports === !1 && (t &= -3), t; + } + function o1(e, t) { + const n = Su(e); + if (t === void 0) { + if (n === 100) + t = 99; + else if (n === 2) + return []; + } + const i = t === 99 ? ["import"] : ["require"]; + return e.noDtsResolution || i.push("types"), n !== 100 && i.push("node"), Wi(i, e.customConditions); + } + function $z(e, t, n, i, s) { + const o = RD(s?.getPackageJsonInfoCache(), i, n); + return sg(i, t, (c) => { + if (Vc(c) !== "node_modules") { + const _ = Ln(c, "node_modules"), u = Ln(_, e); + return US( + u, + /*onlyRecordFailures*/ + !1, + o + ); + } + }); + } + function ZF(e, t) { + if (e.types) + return e.types; + const n = []; + if (t.directoryExists && t.getDirectories) { + const i = LD(e, t); + if (i) { + for (const s of i) + if (t.directoryExists(s)) + for (const o of t.getDirectories(s)) { + const c = Hs(o), _ = Ln(s, c, "package.json"); + if (!(t.fileExists(_) && WC(_, t).typings === null)) { + const m = Vc(c); + m.charCodeAt(0) !== 46 && n.push(m); + } + } + } + } + return n; + } + function KF(e) { + return !!e?.contents; + } + function Jre(e) { + return !!e && !e.contents; + } + function zre(e) { + var t; + if (e === null || typeof e != "object") + return "" + e; + if (os(e)) + return `[${(t = e.map((i) => zre(i))) == null ? void 0 : t.join(",")}]`; + let n = "{"; + for (const i in e) + ro(e, i) && (n += `${i}: ${zre(e[i])}`); + return n + "}"; + } + function Xz(e, t) { + return t.map((n) => zre(I5(e, n))).join("|") + `|${e.pathsBasePath}`; + } + function Iye(e, t) { + const n = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(); + let s = /* @__PURE__ */ new Map(); + return e && n.set(e, s), { + getMapOfCacheRedirects: o, + getOrCreateMapOfCacheRedirects: c, + update: _, + clear: m, + getOwnMap: () => s + }; + function o(h) { + return h ? u( + h.commandLine.options, + /*create*/ + !1 + ) : s; + } + function c(h) { + return h ? u( + h.commandLine.options, + /*create*/ + !0 + ) : s; + } + function _(h) { + e !== h && (e ? s = u( + h, + /*create*/ + !0 + ) : n.set(h, s), e = h); + } + function u(h, S) { + let T = n.get(h); + if (T) return T; + const C = g(h); + if (T = i.get(C), !T) { + if (e) { + const D = g(e); + D === C ? T = s : i.has(D) || i.set(D, s); + } + S && (T ?? (T = /* @__PURE__ */ new Map())), T && i.set(C, T); + } + return T && n.set(h, T), T; + } + function m() { + const h = e && t.get(e); + s.clear(), n.clear(), t.clear(), i.clear(), e && (h && t.set(e, h), n.set(e, s)); + } + function g(h) { + let S = t.get(h); + return S || t.set(h, S = Xz(h, Nz)), S; + } + } + function _Me(e, t) { + let n; + return { getPackageJsonInfo: i, setPackageJsonInfo: s, clear: o, getInternalMap: c }; + function i(_) { + return n?.get(oo(_, e, t)); + } + function s(_, u) { + (n || (n = /* @__PURE__ */ new Map())).set(oo(_, e, t), u); + } + function o() { + n = void 0; + } + function c() { + return n; + } + } + function Fye(e, t, n, i) { + const s = e.getOrCreateMapOfCacheRedirects(t); + let o = s.get(n); + return o || (o = i(), s.set(n, o)), o; + } + function fMe(e, t, n, i) { + const s = Iye(n, i); + return { + getFromDirectoryCache: u, + getOrCreateCacheForDirectory: _, + clear: o, + update: c, + directoryToModuleNameMap: s + }; + function o() { + s.clear(); + } + function c(m) { + s.update(m); + } + function _(m, g) { + const h = oo(m, e, t); + return Fye(s, g, h, () => g6()); + } + function u(m, g, h, S) { + var T, C; + const D = oo(h, e, t); + return (C = (T = s.getMapOfCacheRedirects(S)) == null ? void 0 : T.get(D)) == null ? void 0 : C.get(m, g); + } + } + function MD(e, t) { + return t === void 0 ? e : `${t}|${e}`; + } + function g6() { + const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), n = { + get(s, o) { + return e.get(i(s, o)); + }, + set(s, o, c) { + return e.set(i(s, o), c), n; + }, + delete(s, o) { + return e.delete(i(s, o)), n; + }, + has(s, o) { + return e.has(i(s, o)); + }, + forEach(s) { + return e.forEach((o, c) => { + const [_, u] = t.get(c); + return s(o, _, u); + }); + }, + size() { + return e.size; + } + }; + return n; + function i(s, o) { + const c = MD(s, o); + return t.set(c, [s, o]), c; + } + } + function pMe(e) { + return e.resolvedModule && (e.resolvedModule.originalPath || e.resolvedModule.resolvedFileName); + } + function dMe(e) { + return e.resolvedTypeReferenceDirective && (e.resolvedTypeReferenceDirective.originalPath || e.resolvedTypeReferenceDirective.resolvedFileName); + } + function mMe(e, t, n, i, s) { + const o = Iye(n, s); + return { + getFromNonRelativeNameCache: u, + getOrCreateCacheForNonRelativeName: m, + clear: c, + update: _ + }; + function c() { + o.clear(); + } + function _(h) { + o.update(h); + } + function u(h, S, T, C) { + var D, w; + return E.assert(!vl(h)), (w = (D = o.getMapOfCacheRedirects(C)) == null ? void 0 : D.get(MD(h, S))) == null ? void 0 : w.get(T); + } + function m(h, S, T) { + return E.assert(!vl(h)), Fye(o, T, MD(h, S), g); + } + function g() { + const h = /* @__PURE__ */ new Map(); + return { get: S, set: T }; + function S(D) { + return h.get(oo(D, e, t)); + } + function T(D, w) { + const A = oo(D, e, t); + if (h.has(A)) + return; + h.set(A, w); + const O = i(w), F = O && C(A, O); + let R = A; + for (; R !== F; ) { + const W = Hn(R); + if (W === R || h.has(W)) + break; + h.set(W, w), R = W; + } + } + function C(D, w) { + const A = oo(Hn(w), e, t); + let O = 0; + const F = Math.min(D.length, A.length); + for (; O < F && D.charCodeAt(O) === A.charCodeAt(O); ) + O++; + if (O === D.length && (A.length === O || A[O] === jo)) + return D; + const R = Xm(D); + if (O < R) + return; + const W = D.lastIndexOf(jo, O - 1); + if (W !== -1) + return D.substr(0, Math.max(W, R)); + } + } + } + function Oye(e, t, n, i, s, o) { + o ?? (o = /* @__PURE__ */ new Map()); + const c = fMe( + e, + t, + n, + o + ), _ = mMe( + e, + t, + n, + s, + o + ); + return i ?? (i = _Me(e, t)), { + ...i, + ...c, + ..._, + clear: u, + update: g, + getPackageJsonInfoCache: () => i, + clearAllExceptPackageJsonInfoCache: m, + optionsToRedirectsKey: o + }; + function u() { + m(), i.clear(); + } + function m() { + c.clear(), _.clear(); + } + function g(h) { + c.update(h), _.update(h); + } + } + function h6(e, t, n, i, s) { + const o = Oye( + e, + t, + n, + i, + pMe, + s + ); + return o.getOrCreateCacheForModuleName = (c, _, u) => o.getOrCreateCacheForNonRelativeName(c, _, u), o; + } + function eO(e, t, n, i, s) { + return Oye( + e, + t, + n, + i, + dMe, + s + ); + } + function Qz(e) { + return { moduleResolution: 2, traceResolution: e.traceResolution }; + } + function tO(e, t, n, i, s) { + return WS(e, t, Qz(n), i, s); + } + function Lye(e, t, n, i) { + const s = Hn(t); + return n.getFromDirectoryCache( + e, + i, + s, + /*redirectedReference*/ + void 0 + ); + } + function WS(e, t, n, i, s, o, c) { + const _ = a1(n, i); + o && (n = o.commandLine.options), _ && (Yi(i, p.Resolving_module_0_from_1, e, t), o && Yi(i, p.Using_compiler_options_of_project_reference_redirect_0, o.sourceFile.fileName)); + const u = Hn(t); + let m = s?.getFromDirectoryCache(e, c, u, o); + if (m) + _ && Yi(i, p.Resolution_for_module_0_was_found_in_cache_from_location_1, e, u); + else { + let g = n.moduleResolution; + switch (g === void 0 ? (g = Su(n), _ && Yi(i, p.Module_resolution_kind_is_not_specified_using_0, r4[g])) : _ && Yi(i, p.Explicitly_specified_module_resolution_kind_Colon_0, r4[g]), g) { + case 3: + m = vMe(e, t, n, i, s, o, c); + break; + case 99: + m = bMe(e, t, n, i, s, o, c); + break; + case 2: + m = qre(e, t, n, i, s, o, c ? o1(n, c) : void 0); + break; + case 1: + m = Yre(e, t, n, i, s, o); + break; + case 100: + m = Vre(e, t, n, i, s, o, c ? o1(n, c) : void 0); + break; + default: + return E.fail(`Unexpected moduleResolution: ${g}`); + } + s && !s.isReadonly && (s.getOrCreateCacheForDirectory(u, o).set(e, c, m), vl(e) || s.getOrCreateCacheForNonRelativeName(e, c, o).set(u, m)); + } + return _ && (m.resolvedModule ? m.resolvedModule.packageId ? Yi(i, p.Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2, e, m.resolvedModule.resolvedFileName, K1(m.resolvedModule.packageId)) : Yi(i, p.Module_name_0_was_successfully_resolved_to_1, e, m.resolvedModule.resolvedFileName) : Yi(i, p.Module_name_0_was_not_resolved, e)), m; + } + function Mye(e, t, n, i, s) { + const o = gMe(e, t, i, s); + return o ? o.value : vl(t) ? hMe(e, t, n, i, s) : yMe(e, t, i, s); + } + function gMe(e, t, n, i) { + const { baseUrl: s, paths: o } = i.compilerOptions; + if (o && !lf(t)) { + i.traceEnabled && (s && Yi(i.host, p.baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1, s, t), Yi(i.host, p.paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0, t)); + const c = u5(i.compilerOptions, i.host), _ = tN(o); + return Xre( + e, + t, + c, + o, + _, + n, + /*onlyRecordFailures*/ + !1, + i + ); + } + } + function hMe(e, t, n, i, s) { + if (!s.compilerOptions.rootDirs) + return; + s.traceEnabled && Yi(s.host, p.rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0, t); + const o = Hs(Ln(n, t)); + let c, _; + for (const u of s.compilerOptions.rootDirs) { + let m = Hs(u); + Eo(m, jo) || (m += jo); + const g = Vi(o, m) && (_ === void 0 || _.length < m.length); + s.traceEnabled && Yi(s.host, p.Checking_if_0_is_the_longest_matching_prefix_for_1_2, m, o, g), g && (_ = m, c = u); + } + if (_) { + s.traceEnabled && Yi(s.host, p.Longest_matching_prefix_for_0_is_1, o, _); + const u = o.substr(_.length); + s.traceEnabled && Yi(s.host, p.Loading_0_from_the_root_dir_1_candidate_location_2, u, _, o); + const m = i(e, o, !xd(n, s.host), s); + if (m) + return m; + s.traceEnabled && Yi(s.host, p.Trying_other_entries_in_rootDirs); + for (const g of s.compilerOptions.rootDirs) { + if (g === c) + continue; + const h = Ln(Hs(g), u); + s.traceEnabled && Yi(s.host, p.Loading_0_from_the_root_dir_1_candidate_location_2, u, g, h); + const S = Hn(h), T = i(e, h, !xd(S, s.host), s); + if (T) + return T; + } + s.traceEnabled && Yi(s.host, p.Module_resolution_using_rootDirs_has_failed); + } + } + function yMe(e, t, n, i) { + const { baseUrl: s } = i.compilerOptions; + if (!s) + return; + i.traceEnabled && Yi(i.host, p.baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1, s, t); + const o = Hs(Ln(s, t)); + return i.traceEnabled && Yi(i.host, p.Resolving_module_name_0_relative_to_base_url_1_2, t, s, o), n(e, o, !xd(Hn(o), i.host), i); + } + function Wre(e, t, n) { + const { resolvedModule: i, failedLookupLocations: s } = SMe(e, t, n); + if (!i) + throw new Error(`Could not resolve JS module '${e}' starting at '${t}'. Looked in: ${s?.join(", ")}`); + return i.resolvedFileName; + } + var Ure = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Imports = 2] = "Imports", e[e.SelfName = 4] = "SelfName", e[e.Exports = 8] = "Exports", e[e.ExportsPatternTrailers = 16] = "ExportsPatternTrailers", e[e.AllFeatures = 30] = "AllFeatures", e[e.Node16Default = 30] = "Node16Default", e[ + e.NodeNextDefault = 30 + /* AllFeatures */ + ] = "NodeNextDefault", e[e.BundlerDefault = 30] = "BundlerDefault", e[e.EsmMode = 32] = "EsmMode", e))(Ure || {}); + function vMe(e, t, n, i, s, o, c) { + return Rye( + 30, + e, + t, + n, + i, + s, + o, + c + ); + } + function bMe(e, t, n, i, s, o, c) { + return Rye( + 30, + e, + t, + n, + i, + s, + o, + c + ); + } + function Rye(e, t, n, i, s, o, c, _, u) { + const m = Hn(n), g = _ === 99 ? 32 : 0; + let h = i.noDtsResolution ? 3 : 7; + return Ub(i) && (h |= 8), jN( + e | g, + t, + m, + i, + s, + o, + h, + /*isConfigLookup*/ + !1, + c, + u + ); + } + function SMe(e, t, n) { + return jN( + 0, + e, + t, + { moduleResolution: 2, allowJs: !0 }, + n, + /*cache*/ + void 0, + 2, + /*isConfigLookup*/ + !1, + /*redirectedReference*/ + void 0, + /*conditions*/ + void 0 + ); + } + function Vre(e, t, n, i, s, o, c) { + const _ = Hn(t); + let u = n.noDtsResolution ? 3 : 7; + return Ub(n) && (u |= 8), jN( + Bre(n), + e, + _, + n, + i, + s, + u, + /*isConfigLookup*/ + !1, + o, + c + ); + } + function qre(e, t, n, i, s, o, c, _) { + let u; + return _ ? u = 8 : n.noDtsResolution ? (u = 3, Ub(n) && (u |= 8)) : u = Ub(n) ? 15 : 7, jN(c ? 30 : 0, e, Hn(t), n, i, s, u, !!_, o, c); + } + function Hre(e, t, n) { + return jN( + 30, + e, + Hn(t), + { + moduleResolution: 99 + /* NodeNext */ + }, + n, + /*cache*/ + void 0, + 8, + /*isConfigLookup*/ + !0, + /*redirectedReference*/ + void 0, + /*conditions*/ + void 0 + ); + } + function jN(e, t, n, i, s, o, c, _, u, m) { + var g, h, S, T, C; + const D = a1(i, s), w = [], A = [], O = Su(i); + m ?? (m = o1( + i, + O === 100 || O === 2 ? void 0 : e & 32 ? 99 : 1 + /* CommonJS */ + )); + const F = [], R = { + compilerOptions: i, + host: s, + traceEnabled: D, + failedLookupLocations: w, + affectingLocations: A, + packageJsonInfoCache: o, + features: e, + conditions: m ?? He, + requestContainingDirectory: n, + reportDiagnostic: (U) => void F.push(U), + isConfigLookup: _, + candidateIsFromPackageJsonField: !1, + resolvedPackageDirectory: !1 + }; + D && HC(O) && Yi(s, p.Resolving_in_0_mode_with_conditions_1, e & 32 ? "ESM" : "CJS", R.conditions.map((U) => `'${U}'`).join(", ")); + let W; + if (O === 2) { + const U = c & 5, _e = c & -6; + W = U && $(U, R) || _e && $(_e, R) || void 0; + } else + W = $(c, R); + let V; + if (R.resolvedPackageDirectory && !_ && !vl(t)) { + const U = W?.value && c & 5 && !Vye(5, W.value.resolved.extension); + if ((g = W?.value) != null && g.isExternalLibraryImport && U && e & 8 && m?.includes("import")) { + l1(R, p.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update); + const _e = { + ...R, + features: R.features & -9, + reportDiagnostic: Ja + }, Z = $(c & 5, _e); + (h = Z?.value) != null && h.isExternalLibraryImport && (V = Z.value.resolved.path); + } else if ((!W?.value || U) && O === 2) { + l1(R, p.Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_need_configuration_update); + const _e = { + ...R.compilerOptions, + moduleResolution: 100 + /* Bundler */ + }, Z = { + ...R, + compilerOptions: _e, + features: 30, + conditions: o1(_e), + reportDiagnostic: Ja + }, J = $(c & 5, Z); + (S = J?.value) != null && S.isExternalLibraryImport && (V = J.value.resolved.path); + } + } + return wye( + t, + (T = W?.value) == null ? void 0 : T.resolved, + (C = W?.value) == null ? void 0 : C.isExternalLibraryImport, + w, + A, + F, + R, + o, + V + ); + function $(U, _e) { + const J = Mye(U, t, n, (re, te, ie, le) => Yz( + re, + te, + ie, + le, + /*considerPackageJson*/ + !0 + ), _e); + if (J) + return If({ resolved: J, isExternalLibraryImport: c1(J.path) }); + if (vl(t)) { + const { path: re, parts: te } = jye(n, t), ie = Yz( + U, + re, + /*onlyRecordFailures*/ + !1, + _e, + /*considerPackageJson*/ + !0 + ); + return ie && If({ resolved: ie, isExternalLibraryImport: as(te, "node_modules") }); + } else { + if (e & 2 && Vi(t, "#")) { + const te = DMe(U, t, n, _e, o, u); + if (te) + return te.value && { value: { resolved: te.value, isExternalLibraryImport: !1 } }; + } + if (e & 4) { + const te = EMe(U, t, n, _e, o, u); + if (te) + return te.value && { value: { resolved: te.value, isExternalLibraryImport: !1 } }; + } + if (t.includes(":")) { + D && Yi(s, p.Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1, t, QF(U)); + return; + } + D && Yi(s, p.Loading_module_0_from_node_modules_folder_target_file_types_Colon_1, t, QF(U)); + let re = Gye(U, t, n, _e, o, u); + return U & 4 && (re ?? (re = Kye(t, _e))), re && { value: re.value && { resolved: re.value, isExternalLibraryImport: !0 } }; + } + } + } + function jye(e, t) { + const n = Ln(e, t), i = Ul(n), s = Co(i); + return { path: s === "." || s === ".." ? il(Hs(n)) : Hs(n), parts: i }; + } + function Bye(e, t, n) { + if (!t.realpath) + return e; + const i = Hs(t.realpath(e)); + return n && Yi(t, p.Resolving_real_path_for_0_result_1, e, i), i; + } + function Yz(e, t, n, i, s) { + if (i.traceEnabled && Yi(i.host, p.Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1, t, QF(e)), !Ay(t)) { + if (!n) { + const c = Hn(t); + xd(c, i.host) || (i.traceEnabled && Yi(i.host, p.Directory_0_does_not_exist_skipping_all_lookups_in_it, c), n = !0); + } + const o = y6(e, t, n, i); + if (o) { + const c = s ? BN(o.path) : void 0, _ = c ? US( + c, + /*onlyRecordFailures*/ + !1, + i + ) : void 0; + return rk(_, o, i); + } + } + if (n || xd(t, i.host) || (i.traceEnabled && Yi(i.host, p.Directory_0_does_not_exist_skipping_all_lookups_in_it, t), n = !0), !(i.features & 32)) + return $re(e, t, n, i, s); + } + var Kg = "/node_modules/"; + function c1(e) { + return e.includes(Kg); + } + function BN(e, t) { + const n = Hs(e), i = n.lastIndexOf(Kg); + if (i === -1) + return; + const s = i + Kg.length; + let o = Jye(n, s, t); + return n.charCodeAt(s) === 64 && (o = Jye(n, o, t)), n.slice(0, o); + } + function Jye(e, t, n) { + const i = e.indexOf(jo, t + 1); + return i === -1 ? n ? e.length : t : i; + } + function Gre(e, t, n, i) { + return Hz(y6(e, t, n, i)); + } + function y6(e, t, n, i) { + const s = zye(e, t, n, i); + if (s) + return s; + if (!(i.features & 32)) { + const o = Wye(t, e, "", n, i); + if (o) + return o; + } + } + function zye(e, t, n, i) { + if (!Vc(t).includes(".")) + return; + let o = $u(t); + o === t && (o = t.substring(0, t.lastIndexOf("."))); + const c = t.substring(o.length); + return i.traceEnabled && Yi(i.host, p.File_name_0_has_a_1_extension_stripping_it, t, c), Wye(o, e, c, n, i); + } + function Zz(e, t, n, i, s) { + if (e & 1 && vc(t, Y3) || e & 4 && vc(t, z5)) { + const o = Kz(t, i, s), c = v5(t); + return o !== void 0 ? { path: t, ext: c, resolvedUsingTsExtension: n ? !Eo(n, c) : void 0 } : void 0; + } + return s.isConfigLookup && e === 8 && Bo( + t, + ".json" + /* Json */ + ) ? Kz(t, i, s) !== void 0 ? { path: t, ext: ".json", resolvedUsingTsExtension: void 0 } : void 0 : zye(e, t, i, s); + } + function Wye(e, t, n, i, s) { + if (!i) { + const c = Hn(e); + c && (i = !xd(c, s.host)); + } + switch (n) { + case ".mjs": + case ".mts": + case ".d.mts": + return t & 1 && o( + ".mts", + n === ".mts" || n === ".d.mts" + /* Dmts */ + ) || t & 4 && o( + ".d.mts", + n === ".mts" || n === ".d.mts" + /* Dmts */ + ) || t & 2 && o( + ".mjs" + /* Mjs */ + ) || void 0; + case ".cjs": + case ".cts": + case ".d.cts": + return t & 1 && o( + ".cts", + n === ".cts" || n === ".d.cts" + /* Dcts */ + ) || t & 4 && o( + ".d.cts", + n === ".cts" || n === ".d.cts" + /* Dcts */ + ) || t & 2 && o( + ".cjs" + /* Cjs */ + ) || void 0; + case ".json": + return t & 4 && o(".d.json.ts") || t & 8 && o( + ".json" + /* Json */ + ) || void 0; + case ".tsx": + case ".jsx": + return t & 1 && (o( + ".tsx", + n === ".tsx" + /* Tsx */ + ) || o( + ".ts", + n === ".tsx" + /* Tsx */ + )) || t & 4 && o( + ".d.ts", + n === ".tsx" + /* Tsx */ + ) || t & 2 && (o( + ".jsx" + /* Jsx */ + ) || o( + ".js" + /* Js */ + )) || void 0; + case ".ts": + case ".d.ts": + case ".js": + case "": + return t & 1 && (o( + ".ts", + n === ".ts" || n === ".d.ts" + /* Dts */ + ) || o( + ".tsx", + n === ".ts" || n === ".d.ts" + /* Dts */ + )) || t & 4 && o( + ".d.ts", + n === ".ts" || n === ".d.ts" + /* Dts */ + ) || t & 2 && (o( + ".js" + /* Js */ + ) || o( + ".jsx" + /* Jsx */ + )) || s.isConfigLookup && o( + ".json" + /* Json */ + ) || void 0; + default: + return t & 4 && !fl(e + n) && o(`.d${n}.ts`) || void 0; + } + function o(c, _) { + const u = Kz(e + c, i, s); + return u === void 0 ? void 0 : { path: u, ext: c, resolvedUsingTsExtension: !s.candidateIsFromPackageJsonField && _ }; + } + } + function Kz(e, t, n) { + var i; + if (!((i = n.compilerOptions.moduleSuffixes) != null && i.length)) + return Uye(e, t, n); + const s = $g(e) ?? "", o = s ? eN(e, s) : e; + return lr(n.compilerOptions.moduleSuffixes, (c) => Uye(o + c + s, t, n)); + } + function Uye(e, t, n) { + var i; + if (!t) { + if (n.host.fileExists(e)) + return n.traceEnabled && Yi(n.host, p.File_0_exists_use_it_as_a_name_resolution_result, e), e; + n.traceEnabled && Yi(n.host, p.File_0_does_not_exist, e); + } + (i = n.failedLookupLocations) == null || i.push(e); + } + function $re(e, t, n, i, s = !0) { + const o = s ? US(t, n, i) : void 0, c = o && o.contents.packageJsonContent, _ = o && rO(o, i); + return rk(o, tW(e, t, n, i, c, _), i); + } + function eW(e, t, n, i, s) { + if (!s && e.contents.resolvedEntrypoints !== void 0) + return e.contents.resolvedEntrypoints; + let o; + const c = 5 | (s ? 2 : 0), _ = Bre(t), u = RD(i?.getPackageJsonInfoCache(), n, t); + u.conditions = o1(t), u.requestContainingDirectory = e.packageDirectory; + const m = tW( + c, + e.packageDirectory, + /*onlyRecordFailures*/ + !1, + u, + e.contents.packageJsonContent, + rO(e, u) + ); + if (o = Pr(o, m?.path), _ & 8 && e.contents.packageJsonContent.exports) { + const g = hb( + [o1( + t, + 99 + /* ESNext */ + ), o1( + t, + 1 + /* CommonJS */ + )], + Ef + ); + for (const h of g) { + const S = { ...u, failedLookupLocations: [], conditions: h, host: n }, T = TMe( + e, + e.contents.packageJsonContent.exports, + S, + c + ); + if (T) + for (const C of T) + o = Sh(o, C.path); + } + } + return e.contents.resolvedEntrypoints = o || !1; + } + function TMe(e, t, n, i) { + let s; + if (os(t)) + for (const c of t) + o(c); + else if (typeof t == "object" && t !== null && iO(t)) + for (const c in t) + o(t[c]); + else + o(t); + return s; + function o(c) { + var _, u; + if (typeof c == "string" && Vi(c, "./")) + if (c.includes("*") && n.host.readDirectory) { + if (c.indexOf("*") !== c.lastIndexOf("*")) + return !1; + n.host.readDirectory( + e.packageDirectory, + rMe(i), + /*excludes*/ + void 0, + [ + $I(DS(c, "**/*"), ".*") + ] + ).forEach((m) => { + s = Sh(s, { + path: m, + ext: ZT(m), + resolvedUsingTsExtension: void 0 + }); + }); + } else { + const m = Ul(c).slice(2); + if (m.includes("..") || m.includes(".") || m.includes("node_modules")) + return !1; + const g = Ln(e.packageDirectory, c), h = Xi(g, (u = (_ = n.host).getCurrentDirectory) == null ? void 0 : u.call(_)), S = Zz( + i, + h, + c, + /*onlyRecordFailures*/ + !1, + n + ); + if (S) + return s = Sh(s, S, (T, C) => T.path === C.path), !0; + } + else if (Array.isArray(c)) { + for (const m of c) + if (o(m)) + return !0; + } else if (typeof c == "object" && c !== null) + return lr(Zd(c), (m) => { + if (m === "default" || as(n.conditions, m) || JN(n.conditions, m)) + return o(c[m]), !0; + }); + } + } + function RD(e, t, n) { + return { + host: t, + compilerOptions: n, + traceEnabled: a1(n, t), + failedLookupLocations: void 0, + affectingLocations: void 0, + packageJsonInfoCache: e, + features: 0, + conditions: He, + requestContainingDirectory: void 0, + reportDiagnostic: Ja, + isConfigLookup: !1, + candidateIsFromPackageJsonField: !1, + resolvedPackageDirectory: !1 + }; + } + function jD(e, t) { + return sg( + t.host, + e, + (n) => US( + n, + /*onlyRecordFailures*/ + !1, + t + ) + ); + } + function rO(e, t) { + return e.contents.versionPaths === void 0 && (e.contents.versionPaths = oMe(e.contents.packageJsonContent, t) || !1), e.contents.versionPaths || void 0; + } + function xMe(e, t) { + return e.contents.peerDependencies === void 0 && (e.contents.peerDependencies = kMe(e, t) || !1), e.contents.peerDependencies || void 0; + } + function kMe(e, t) { + const n = Mre(e.contents.packageJsonContent, "peerDependencies", "object", t); + if (n === void 0) return; + t.traceEnabled && Yi(t.host, p.package_json_has_a_peerDependencies_field); + const i = Bye(e.packageDirectory, t.host, t.traceEnabled), s = i.substring(0, i.lastIndexOf("node_modules") + 12) + jo; + let o = ""; + for (const c in n) + if (ro(n, c)) { + const _ = US( + s + c, + /*onlyRecordFailures*/ + !1, + t + ); + if (_) { + const u = _.contents.packageJsonContent.version; + o += `+${c}@${u}`, t.traceEnabled && Yi(t.host, p.Found_peerDependency_0_with_1_version, c, u); + } else + t.traceEnabled && Yi(t.host, p.Failed_to_find_peerDependency_0, c); + } + return o; + } + function US(e, t, n) { + var i, s, o, c, _, u; + const { host: m, traceEnabled: g } = n, h = Ln(e, "package.json"); + if (t) { + (i = n.failedLookupLocations) == null || i.push(h); + return; + } + const S = (s = n.packageJsonInfoCache) == null ? void 0 : s.getPackageJsonInfo(h); + if (S !== void 0) { + if (KF(S)) + return g && Yi(m, p.File_0_exists_according_to_earlier_cached_lookups, h), (o = n.affectingLocations) == null || o.push(h), S.packageDirectory === e ? S : { packageDirectory: e, contents: S.contents }; + S.directoryExists && g && Yi(m, p.File_0_does_not_exist_according_to_earlier_cached_lookups, h), (c = n.failedLookupLocations) == null || c.push(h); + return; + } + const T = xd(e, m); + if (T && m.fileExists(h)) { + const C = WC(h, m); + g && Yi(m, p.Found_package_json_at_0, h); + const D = { packageDirectory: e, contents: { packageJsonContent: C, versionPaths: void 0, resolvedEntrypoints: void 0, peerDependencies: void 0 } }; + return n.packageJsonInfoCache && !n.packageJsonInfoCache.isReadonly && n.packageJsonInfoCache.setPackageJsonInfo(h, D), (_ = n.affectingLocations) == null || _.push(h), D; + } else + T && g && Yi(m, p.File_0_does_not_exist, h), n.packageJsonInfoCache && !n.packageJsonInfoCache.isReadonly && n.packageJsonInfoCache.setPackageJsonInfo(h, { packageDirectory: e, directoryExists: T }), (u = n.failedLookupLocations) == null || u.push(h); + } + function tW(e, t, n, i, s, o) { + let c; + s && (i.isConfigLookup ? c = iMe(s, t, i) : c = e & 4 && nMe(s, t, i) || e & 7 && sMe(s, t, i) || void 0); + const _ = (S, T, C, D) => { + const w = Zz( + S, + T, + /*packageJsonValue*/ + void 0, + C, + D + ); + if (w) + return Hz(w); + const A = S === 4 ? 5 : S, O = D.features, F = D.candidateIsFromPackageJsonField; + D.candidateIsFromPackageJsonField = !0, s?.type !== "module" && (D.features &= -33); + const R = Yz( + A, + T, + C, + D, + /*considerPackageJson*/ + !1 + ); + return D.features = O, D.candidateIsFromPackageJsonField = F, R; + }, u = c ? !xd(Hn(c), i.host) : void 0, m = n || !xd(t, i.host), g = Ln(t, i.isConfigLookup ? "tsconfig" : "index"); + if (o && (!c || Zf(t, c))) { + const S = Df( + t, + c || g, + /*ignoreCase*/ + !1 + ); + i.traceEnabled && Yi(i.host, p.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2, o.version, Xf, S); + const T = tN(o.paths), C = Xre(e, S, t, o.paths, T, _, u || m, i); + if (C) + return Dye(C.value); + } + const h = c && Dye(_(e, c, u, i)); + if (h) return h; + if (!(i.features & 32)) + return y6(e, g, m, i); + } + function Vye(e, t) { + return e & 2 && (t === ".js" || t === ".jsx" || t === ".mjs" || t === ".cjs") || e & 1 && (t === ".ts" || t === ".tsx" || t === ".mts" || t === ".cts") || e & 4 && (t === ".d.ts" || t === ".d.mts" || t === ".d.cts") || e & 8 && t === ".json" || !1; + } + function nO(e) { + let t = e.indexOf(jo); + return e[0] === "@" && (t = e.indexOf(jo, t + 1)), t === -1 ? { packageName: e, rest: "" } : { packageName: e.slice(0, t), rest: e.slice(t + 1) }; + } + function iO(e) { + return Ri(Zd(e), (t) => Vi(t, ".")); + } + function CMe(e) { + return !at(Zd(e), (t) => Vi(t, ".")); + } + function EMe(e, t, n, i, s, o) { + var c, _; + const u = Xi(n, (_ = (c = i.host).getCurrentDirectory) == null ? void 0 : _.call(c)), m = jD(u, i); + if (!m || !m.contents.packageJsonContent.exports || typeof m.contents.packageJsonContent.name != "string") + return; + const g = Ul(t), h = Ul(m.contents.packageJsonContent.name); + if (!Ri(h, (w, A) => g[A] === w)) + return; + const S = g.slice(h.length), T = Ir(S) ? `.${jo}${S.join(jo)}` : "."; + if (Zy(i.compilerOptions) && !c1(n)) + return rW(m, e, T, i, s, o); + const C = e & 5, D = e & -6; + return rW(m, C, T, i, s, o) || rW(m, D, T, i, s, o); + } + function rW(e, t, n, i, s, o) { + if (e.contents.packageJsonContent.exports) { + if (n === ".") { + let c; + if (typeof e.contents.packageJsonContent.exports == "string" || Array.isArray(e.contents.packageJsonContent.exports) || typeof e.contents.packageJsonContent.exports == "object" && CMe(e.contents.packageJsonContent.exports) ? c = e.contents.packageJsonContent.exports : ro(e.contents.packageJsonContent.exports, ".") && (c = e.contents.packageJsonContent.exports["."]), c) + return Hye( + t, + i, + s, + o, + n, + e, + /*isImports*/ + !1 + )( + c, + "", + /*pattern*/ + !1, + "." + ); + } else if (iO(e.contents.packageJsonContent.exports)) { + if (typeof e.contents.packageJsonContent.exports != "object") + return i.traceEnabled && Yi(i.host, p.Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1, n, e.packageDirectory), If( + /*value*/ + void 0 + ); + const c = qye( + t, + i, + s, + o, + n, + e.contents.packageJsonContent.exports, + e, + /*isImports*/ + !1 + ); + if (c) + return c; + } + return i.traceEnabled && Yi(i.host, p.Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1, n, e.packageDirectory), If( + /*value*/ + void 0 + ); + } + } + function DMe(e, t, n, i, s, o) { + var c, _; + if (t === "#" || Vi(t, "#/")) + return i.traceEnabled && Yi(i.host, p.Invalid_import_specifier_0_has_no_possible_resolutions, t), If( + /*value*/ + void 0 + ); + const u = Xi(n, (_ = (c = i.host).getCurrentDirectory) == null ? void 0 : _.call(c)), m = jD(u, i); + if (!m) + return i.traceEnabled && Yi(i.host, p.Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve, u), If( + /*value*/ + void 0 + ); + if (!m.contents.packageJsonContent.imports) + return i.traceEnabled && Yi(i.host, p.package_json_scope_0_has_no_imports_defined, m.packageDirectory), If( + /*value*/ + void 0 + ); + const g = qye( + e, + i, + s, + o, + t, + m.contents.packageJsonContent.imports, + m, + /*isImports*/ + !0 + ); + return g || (i.traceEnabled && Yi(i.host, p.Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1, t, m.packageDirectory), If( + /*value*/ + void 0 + )); + } + function nW(e, t) { + const n = e.indexOf("*"), i = t.indexOf("*"), s = n === -1 ? e.length : n + 1, o = i === -1 ? t.length : i + 1; + return s > o ? -1 : o > s || n === -1 ? 1 : i === -1 || e.length > t.length ? -1 : t.length > e.length ? 1 : 0; + } + function qye(e, t, n, i, s, o, c, _) { + const u = Hye(e, t, n, i, s, c, _); + if (!Eo(s, jo) && !s.includes("*") && ro(o, s)) { + const h = o[s]; + return u( + h, + /*subpath*/ + "", + /*pattern*/ + !1, + s + ); + } + const m = W_(kn(Zd(o), (h) => wMe(h) || Eo(h, "/")), nW); + for (const h of m) + if (t.features & 16 && g(h, s)) { + const S = o[h], T = h.indexOf("*"), C = s.substring(h.substring(0, T).length, s.length - (h.length - 1 - T)); + return u( + S, + C, + /*pattern*/ + !0, + h + ); + } else if (Eo(h, "*") && Vi(s, h.substring(0, h.length - 1))) { + const S = o[h], T = s.substring(h.length - 1); + return u( + S, + T, + /*pattern*/ + !0, + h + ); + } else if (Vi(s, h)) { + const S = o[h], T = s.substring(h.length); + return u( + S, + T, + /*pattern*/ + !1, + h + ); + } + function g(h, S) { + if (Eo(h, "*")) return !1; + const T = h.indexOf("*"); + return T === -1 ? !1 : Vi(S, h.substring(0, T)) && Eo(S, h.substring(T + 1)); + } + } + function wMe(e) { + const t = e.indexOf("*"); + return t !== -1 && t === e.lastIndexOf("*"); + } + function Hye(e, t, n, i, s, o, c) { + return _; + function _(u, m, g, h) { + if (typeof u == "string") { + if (!g && m.length > 0 && !Eo(u, "/")) + return t.traceEnabled && Yi(t.host, p.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, o.packageDirectory, s), If( + /*value*/ + void 0 + ); + if (!Vi(u, "./")) { + if (c && !Vi(u, "../") && !Vi(u, "/") && !q_(u)) { + const W = g ? u.replace(/\*/g, m) : u + m; + l1(t, p.Using_0_subpath_1_with_target_2, "imports", h, W), l1(t, p.Resolving_module_0_from_1, W, o.packageDirectory + "/"); + const V = jN( + t.features, + W, + o.packageDirectory + "/", + t.compilerOptions, + t.host, + n, + e, + /*isConfigLookup*/ + !1, + i, + t.conditions + ); + return If( + V.resolvedModule ? { + path: V.resolvedModule.resolvedFileName, + extension: V.resolvedModule.extension, + packageId: V.resolvedModule.packageId, + originalPath: V.resolvedModule.originalPath, + resolvedUsingTsExtension: V.resolvedModule.resolvedUsingTsExtension + } : void 0 + ); + } + return t.traceEnabled && Yi(t.host, p.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, o.packageDirectory, s), If( + /*value*/ + void 0 + ); + } + const w = (lf(u) ? Ul(u).slice(1) : Ul(u)).slice(1); + if (w.includes("..") || w.includes(".") || w.includes("node_modules")) + return t.traceEnabled && Yi(t.host, p.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, o.packageDirectory, s), If( + /*value*/ + void 0 + ); + const A = Ln(o.packageDirectory, u), O = Ul(m); + if (O.includes("..") || O.includes(".") || O.includes("node_modules")) + return t.traceEnabled && Yi(t.host, p.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, o.packageDirectory, s), If( + /*value*/ + void 0 + ); + t.traceEnabled && Yi(t.host, p.Using_0_subpath_1_with_target_2, c ? "imports" : "exports", h, g ? u.replace(/\*/g, m) : u + m); + const F = S(g ? A.replace(/\*/g, m) : A + m), R = C(F, m, Ln(o.packageDirectory, "package.json"), c); + return R || If(rk(o, Zz( + e, + F, + u, + /*onlyRecordFailures*/ + !1, + t + ), t)); + } else if (typeof u == "object" && u !== null) + if (Array.isArray(u)) { + if (!Ir(u)) + return t.traceEnabled && Yi(t.host, p.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, o.packageDirectory, s), If( + /*value*/ + void 0 + ); + for (const D of u) { + const w = _(D, m, g, h); + if (w) + return w; + } + } else { + l1(t, p.Entering_conditional_exports); + for (const D of Zd(u)) + if (D === "default" || t.conditions.includes(D) || JN(t.conditions, D)) { + l1(t, p.Matched_0_condition_1, c ? "imports" : "exports", D); + const w = u[D], A = _(w, m, g, h); + if (A) + return l1(t, p.Resolved_under_condition_0, D), l1(t, p.Exiting_conditional_exports), A; + l1(t, p.Failed_to_resolve_under_condition_0, D); + } else + l1(t, p.Saw_non_matching_condition_0, D); + l1(t, p.Exiting_conditional_exports); + return; + } + else if (u === null) + return t.traceEnabled && Yi(t.host, p.package_json_scope_0_explicitly_maps_specifier_1_to_null, o.packageDirectory, s), If( + /*value*/ + void 0 + ); + return t.traceEnabled && Yi(t.host, p.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, o.packageDirectory, s), If( + /*value*/ + void 0 + ); + function S(D) { + var w, A; + return D === void 0 ? D : Xi(D, (A = (w = t.host).getCurrentDirectory) == null ? void 0 : A.call(w)); + } + function T(D, w) { + return il(Ln(D, w)); + } + function C(D, w, A, O) { + var F, R, W, V; + if (!t.isConfigLookup && (t.compilerOptions.declarationDir || t.compilerOptions.outDir) && !D.includes("/node_modules/") && (!t.compilerOptions.configFile || Zf(o.packageDirectory, S(t.compilerOptions.configFile.fileName), !iW(t)))) { + const U = Nh({ useCaseSensitiveFileNames: () => iW(t) }), _e = []; + if (t.compilerOptions.rootDir || t.compilerOptions.composite && t.compilerOptions.configFilePath) { + const Z = S(XD(t.compilerOptions, () => [], ((R = (F = t.host).getCurrentDirectory) == null ? void 0 : R.call(F)) || "", U)); + _e.push(Z); + } else if (t.requestContainingDirectory) { + const Z = S(Ln(t.requestContainingDirectory, "index.ts")), J = S(XD(t.compilerOptions, () => [Z, S(A)], ((V = (W = t.host).getCurrentDirectory) == null ? void 0 : V.call(W)) || "", U)); + _e.push(J); + let re = il(J); + for (; re && re.length > 1; ) { + const te = Ul(re); + te.pop(); + const ie = T0(te); + _e.unshift(ie), re = il(ie); + } + } + _e.length > 1 && t.reportDiagnostic(Ho( + O ? p.The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate : p.The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate, + w === "" ? "." : w, + // replace empty string with `.` - the reverse of the operation done when entries are built - so main entrypoint errors don't look weird + A + )); + for (const Z of _e) { + const J = $(Z); + for (const re of J) + if (Zf(re, D, !iW(t))) { + const te = D.slice(re.length + 1), ie = Ln(Z, te), le = [ + ".mjs", + ".cjs", + ".js", + ".json", + ".d.mts", + ".d.cts", + ".d.ts" + /* Dts */ + ]; + for (const Te of le) + if (Bo(ie, Te)) { + const q = JB(ie); + for (const me of q) { + if (!Vye(e, me)) continue; + const Ce = TP(ie, me, Te, !iW(t)); + if (t.host.fileExists(Ce)) + return If(rk(o, Zz( + e, + Ce, + /*packageJsonValue*/ + void 0, + /*onlyRecordFailures*/ + !1, + t + ), t)); + } + } + } + } + } + return; + function $(U) { + var _e, Z; + const J = t.compilerOptions.configFile ? ((Z = (_e = t.host).getCurrentDirectory) == null ? void 0 : Z.call(_e)) || "" : U, re = []; + return t.compilerOptions.declarationDir && re.push(S(T(J, t.compilerOptions.declarationDir))), t.compilerOptions.outDir && t.compilerOptions.outDir !== t.compilerOptions.declarationDir && re.push(S(T(J, t.compilerOptions.outDir))), re; + } + } + } + } + function JN(e, t) { + if (!e.includes("types") || !Vi(t, "types@")) return !1; + const n = JI.tryParse(t.substring(6)); + return n ? n.test(Xf) : !1; + } + function Gye(e, t, n, i, s, o) { + return $ye( + e, + t, + n, + i, + /*typesScopeOnly*/ + !1, + s, + o + ); + } + function PMe(e, t, n) { + return $ye( + 4, + e, + t, + n, + /*typesScopeOnly*/ + !0, + /*cache*/ + void 0, + /*redirectedReference*/ + void 0 + ); + } + function $ye(e, t, n, i, s, o, c) { + const _ = i.features === 0 ? void 0 : i.features & 32 ? 99 : 1, u = e & 5, m = e & -6; + if (u) { + l1(i, p.Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0, QF(u)); + const h = g(u); + if (h) return h; + } + if (m && !s) + return l1(i, p.Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0, QF(m)), g(m); + function g(h) { + return sg( + i.host, + Vl(n), + (S) => { + if (Vc(S) !== "node_modules") { + const T = Zye(o, t, _, S, c, i); + return T || If(Xye(h, t, S, i, s, o, c)); + } + } + ); + } + } + function sg(e, t, n) { + var i; + const s = (i = e?.getGlobalTypingsCacheLocation) == null ? void 0 : i.call(e); + return a4(t, (o) => { + const c = n(o); + if (c !== void 0) return c; + if (o === s) return !1; + }) || void 0; + } + function Xye(e, t, n, i, s, o, c) { + const _ = Ln(n, "node_modules"), u = xd(_, i.host); + if (!u && i.traceEnabled && Yi(i.host, p.Directory_0_does_not_exist_skipping_all_lookups_in_it, _), !s) { + const m = Qye(e, t, _, u, i, o, c); + if (m) + return m; + } + if (e & 4) { + const m = Ln(_, "@types"); + let g = u; + return u && !xd(m, i.host) && (i.traceEnabled && Yi(i.host, p.Directory_0_does_not_exist_skipping_all_lookups_in_it, m), g = !1), Qye(4, Yye(t, i), m, g, i, o, c); + } + } + function Qye(e, t, n, i, s, o, c) { + var _, u; + const m = Hs(Ln(n, t)), { packageName: g, rest: h } = nO(t), S = Ln(n, g); + let T, C = US(m, !i, s); + if (h !== "" && C && (!(s.features & 8) || !ro(((_ = T = US(S, !i, s)) == null ? void 0 : _.contents.packageJsonContent) ?? He, "exports"))) { + const A = y6(e, m, !i, s); + if (A) + return Hz(A); + const O = tW( + e, + m, + !i, + s, + C.contents.packageJsonContent, + rO(C, s) + ); + return rk(C, O, s); + } + const D = (A, O, F, R) => { + let W = (h || !(R.features & 32)) && y6(A, O, F, R) || tW( + A, + O, + F, + R, + C && C.contents.packageJsonContent, + C && rO(C, R) + ); + return !W && C && (C.contents.packageJsonContent.exports === void 0 || C.contents.packageJsonContent.exports === null) && R.features & 32 && (W = y6(A, Ln(O, "index.js"), F, R)), rk(C, W, R); + }; + if (h !== "" && (C = T ?? US(S, !i, s)), C && (s.resolvedPackageDirectory = !0), C && C.contents.packageJsonContent.exports && s.features & 8) + return (u = rW(C, e, Ln(".", h), s, o, c)) == null ? void 0 : u.value; + const w = h !== "" && C ? rO(C, s) : void 0; + if (w) { + s.traceEnabled && Yi(s.host, p.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2, w.version, Xf, h); + const A = i && xd(S, s.host), O = tN(w.paths), F = Xre(e, h, S, w.paths, O, D, !A, s); + if (F) + return F.value; + } + return D(e, m, !i, s); + } + function Xre(e, t, n, i, s, o, c, _) { + const u = kJ(s, t); + if (u) { + const m = rs(u) ? void 0 : eQ(u, t), g = rs(u) ? u : KX(u); + return _.traceEnabled && Yi(_.host, p.Module_name_0_matched_pattern_1, t, g), { value: lr(i[g], (S) => { + const T = m ? DS(S, m) : S, C = Hs(Ln(n, T)); + _.traceEnabled && Yi(_.host, p.Trying_substitution_0_candidate_module_location_Colon_1, S, T); + const D = $g(S); + if (D !== void 0) { + const w = Kz(C, c, _); + if (w !== void 0) + return Hz({ path: w, ext: D, resolvedUsingTsExtension: void 0 }); + } + return o(e, C, c || !xd(Hn(C), _.host), _); + }) }; + } + } + var Qre = "__"; + function Yye(e, t) { + const n = v6(e); + return t.traceEnabled && n !== e && Yi(t.host, p.Scoped_package_detected_looking_in_0, n), n; + } + function sO(e) { + return `@types/${v6(e)}`; + } + function v6(e) { + if (Vi(e, "@")) { + const t = e.replace(jo, Qre); + if (t !== e) + return t.slice(1); + } + return e; + } + function BD(e) { + const t = XE(e, "@types/"); + return t !== e ? zN(t) : e; + } + function zN(e) { + return e.includes(Qre) ? "@" + e.replace(Qre, jo) : e; + } + function Zye(e, t, n, i, s, o) { + const c = e && e.getFromNonRelativeNameCache(t, n, i, s); + if (c) + return o.traceEnabled && Yi(o.host, p.Resolution_for_module_0_was_found_in_cache_from_location_1, t, i), o.resultFromCache = c, { + value: c.resolvedModule && { + path: c.resolvedModule.resolvedFileName, + originalPath: c.resolvedModule.originalPath || !0, + extension: c.resolvedModule.extension, + packageId: c.resolvedModule.packageId, + resolvedUsingTsExtension: c.resolvedModule.resolvedUsingTsExtension + } + }; + } + function Yre(e, t, n, i, s, o) { + const c = a1(n, i), _ = [], u = [], m = Hn(t), g = [], h = { + compilerOptions: n, + host: i, + traceEnabled: c, + failedLookupLocations: _, + affectingLocations: u, + packageJsonInfoCache: s, + features: 0, + conditions: [], + requestContainingDirectory: m, + reportDiagnostic: (C) => void g.push(C), + isConfigLookup: !1, + candidateIsFromPackageJsonField: !1, + resolvedPackageDirectory: !1 + }, S = T( + 5 + /* Declaration */ + ) || T(2 | (n.resolveJsonModule ? 8 : 0)); + return wye( + e, + S && S.value, + S?.value && c1(S.value.path), + _, + u, + g, + h, + s + ); + function T(C) { + const D = Mye(C, e, m, Gre, h); + if (D) + return { value: D }; + if (vl(e)) { + const w = Hs(Ln(m, e)); + return If(Gre( + C, + w, + /*onlyRecordFailures*/ + !1, + h + )); + } else { + const w = sg( + h.host, + m, + (A) => { + const O = Zye( + s, + e, + /*mode*/ + void 0, + A, + o, + h + ); + if (O) + return O; + const F = Hs(Ln(A, e)); + return If(Gre( + C, + F, + /*onlyRecordFailures*/ + !1, + h + )); + } + ); + if (w) return w; + if (C & 5) { + let A = PMe(e, m, h); + return C & 4 && (A ?? (A = Kye(e, h))), A; + } + } + } + } + function Kye(e, t) { + if (t.compilerOptions.typeRoots) + for (const n of t.compilerOptions.typeRoots) { + const i = Aye(n, e, t), s = xd(n, t.host); + !s && t.traceEnabled && Yi(t.host, p.Directory_0_does_not_exist_skipping_all_lookups_in_it, n); + const o = y6(4, i, !s, t); + if (o) { + const _ = BN(o.path), u = _ ? US( + _, + /*onlyRecordFailures*/ + !1, + t + ) : void 0; + return If(rk(u, o, t)); + } + const c = $re(4, i, !s, t); + if (c) return If(c); + } + } + function b6(e, t) { + return lee(e) || !!t && fl(t); + } + function Zre(e, t, n, i, s, o) { + const c = a1(n, i); + c && Yi(i, p.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2, t, e, s); + const _ = [], u = [], m = [], g = { + compilerOptions: n, + host: i, + traceEnabled: c, + failedLookupLocations: _, + affectingLocations: u, + packageJsonInfoCache: o, + features: 0, + conditions: [], + requestContainingDirectory: void 0, + reportDiagnostic: (S) => void m.push(S), + isConfigLookup: !1, + candidateIsFromPackageJsonField: !1, + resolvedPackageDirectory: !1 + }, h = Xye( + 4, + e, + s, + g, + /*typesScopeOnly*/ + !1, + /*cache*/ + void 0, + /*redirectedReference*/ + void 0 + ); + return Pye( + h, + /*isExternalLibraryImport*/ + !0, + _, + u, + m, + g.resultFromCache, + /*cache*/ + void 0 + ); + } + function If(e) { + return e !== void 0 ? { value: e } : void 0; + } + function l1(e, t, ...n) { + e.traceEnabled && Yi(e.host, t, ...n); + } + function iW(e) { + return e.host.useCaseSensitiveFileNames ? typeof e.host.useCaseSensitiveFileNames == "boolean" ? e.host.useCaseSensitiveFileNames : e.host.useCaseSensitiveFileNames() : !0; + } + var Kre = /* @__PURE__ */ ((e) => (e[e.NonInstantiated = 0] = "NonInstantiated", e[e.Instantiated = 1] = "Instantiated", e[e.ConstEnumOnly = 2] = "ConstEnumOnly", e))(Kre || {}); + function jh(e, t) { + return e.body && !e.body.parent && (Fa(e.body, e), lv( + e.body, + /*incremental*/ + !1 + )), e.body ? ene(e.body, t) : 1; + } + function ene(e, t = /* @__PURE__ */ new Map()) { + const n = Aa(e); + if (t.has(n)) + return t.get(n) || 0; + t.set(n, void 0); + const i = NMe(e, t); + return t.set(n, i), i; + } + function NMe(e, t) { + switch (e.kind) { + // 1. interface declarations, type alias declarations + case 264: + case 265: + return 0; + // 2. const enum declarations + case 266: + if (ev(e)) + return 2; + break; + // 3. non-exported import declarations + case 272: + case 271: + if (!$n( + e, + 32 + /* Export */ + )) + return 0; + break; + // 4. Export alias declarations pointing at only uninstantiated modules or things uninstantiated modules contain + case 278: + const n = e; + if (!n.moduleSpecifier && n.exportClause && n.exportClause.kind === 279) { + let i = 0; + for (const s of n.exportClause.elements) { + const o = AMe(s, t); + if (o > i && (i = o), i === 1) + return i; + } + return i; + } + break; + // 5. other uninstantiated module declarations. + case 268: { + let i = 0; + return ms(e, (s) => { + const o = ene(s, t); + switch (o) { + case 0: + return; + case 2: + i = 2; + return; + case 1: + return i = 1, !0; + default: + E.assertNever(o); + } + }), i; + } + case 267: + return jh(e, t); + case 80: + if (e.flags & 4096) + return 0; + } + return 1; + } + function AMe(e, t) { + const n = e.propertyName || e.name; + if (n.kind !== 80) + return 1; + let i = e.parent; + for (; i; ) { + if (ks(i) || dm(i) || Ei(i)) { + const s = i.statements; + let o; + for (const c of s) + if (FP(c, n)) { + c.parent || (Fa(c, i), lv( + c, + /*incremental*/ + !1 + )); + const _ = ene(c, t); + if ((o === void 0 || _ > o) && (o = _), o === 1) + return o; + c.kind === 271 && (o = 1); + } + if (o !== void 0) + return o; + } + i = i.parent; + } + return 1; + } + var tne = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.IsContainer = 1] = "IsContainer", e[e.IsBlockScopedContainer = 2] = "IsBlockScopedContainer", e[e.IsControlFlowContainer = 4] = "IsControlFlowContainer", e[e.IsFunctionLike = 8] = "IsFunctionLike", e[e.IsFunctionExpression = 16] = "IsFunctionExpression", e[e.HasLocals = 32] = "HasLocals", e[e.IsInterface = 64] = "IsInterface", e[e.IsObjectLiteralOrClassExpressionMethodOrAccessor = 128] = "IsObjectLiteralOrClassExpressionMethodOrAccessor", e))(tne || {}); + function ag(e, t, n) { + return E.attachFlowNodeDebugInfo({ flags: e, id: 0, node: t, antecedent: n }); + } + var IMe = /* @__PURE__ */ FMe(); + function rne(e, t) { + Qo("beforeBind"), IMe(e, t), Qo("afterBind"), Yf("Bind", "beforeBind", "afterBind"); + } + function FMe() { + var e, t, n, i, s, o, c, _, u, m, g, h, S, T, C, D, w, A, O, F, R, W, V, $, U = !1, _e = 0, Z, J, re = ag( + 1, + /*node*/ + void 0, + /*antecedent*/ + void 0 + ), te = ag( + 1, + /*node*/ + void 0, + /*antecedent*/ + void 0 + ), ie = fe(); + return Te; + function le(j, Ne, ...Tt) { + return ep(Cr(j) || e, j, Ne, ...Tt); + } + function Te(j, Ne) { + var Tt, Ar; + e = j, t = Ne, n = pa(t), $ = q(e, Ne), J = /* @__PURE__ */ new Set(), _e = 0, Z = $l.getSymbolConstructor(), E.attachFlowNodeDebugInfo(re), E.attachFlowNodeDebugInfo(te), e.locals || ((Tt = nn) == null || Tt.push( + nn.Phase.Bind, + "bindSourceFile", + { path: e.path }, + /*separateBeginAndEnd*/ + !0 + ), pr(e), (Ar = nn) == null || Ar.pop(), e.symbolCount = _e, e.classifiableNames = J, eu(), hs()), e = void 0, t = void 0, n = void 0, i = void 0, s = void 0, o = void 0, c = void 0, _ = void 0, u = void 0, g = void 0, m = !1, h = void 0, S = void 0, T = void 0, C = void 0, D = void 0, w = void 0, A = void 0, F = void 0, R = !1, W = !1, U = !1, V = 0; + } + function q(j, Ne) { + return lu(Ne, "alwaysStrict") && !j.isDeclarationFile ? !0 : !!j.externalModuleIndicator; + } + function me(j, Ne) { + return _e++, new Z(j, Ne); + } + function Ce(j, Ne, Tt) { + j.flags |= Tt, Ne.symbol = j, j.declarations = Sh(j.declarations, Ne), Tt & 1955 && !j.exports && (j.exports = Us()), Tt & 6240 && !j.members && (j.members = Us()), j.constEnumOnlyModule && j.flags & 304 && (j.constEnumOnlyModule = !1), Tt & 111551 && v3(j, Ne); + } + function Ee(j) { + if (j.kind === 277) + return j.isExportEquals ? "export=" : "default"; + const Ne = is(j); + if (Ne) { + if (Ou(j)) { + const Tt = rp(Ne); + return eg(j) ? "__global" : `"${Tt}"`; + } + if (Ne.kind === 167) { + const Tt = Ne.expression; + if (wf(Tt)) + return Zo(Tt.text); + if (n5(Tt)) + return Xs(Tt.operator) + Tt.operand.text; + E.fail("Only computed properties with literal names have declaration names"); + } + if (Ni(Ne)) { + const Tt = Al(j); + if (!Tt) + return; + const Ar = Tt.symbol; + return P3(Ar, Ne.escapedText); + } + return wd(Ne) ? Ix(Ne) : am(Ne) ? z4(Ne) : void 0; + } + switch (j.kind) { + case 176: + return "__constructor"; + case 184: + case 179: + case 323: + return "__call"; + case 185: + case 180: + return "__new"; + case 181: + return "__index"; + case 278: + return "__export"; + case 307: + return "export="; + case 226: + if (Sc(j) === 2) + return "export="; + E.fail("Unknown binary declaration kind"); + break; + case 317: + return gx(j) ? "__new" : "__call"; + case 169: + return E.assert(j.parent.kind === 317, "Impossible parameter parent kind", () => `parent is: ${E.formatSyntaxKind(j.parent.kind)}, expected JSDocFunctionType`), "arg" + j.parent.parameters.indexOf(j); + } + } + function oe(j) { + return Hl(j) ? co(j.name) : Pi(E.checkDefined(Ee(j))); + } + function ke(j, Ne, Tt, Ar, ei, Ss, _s) { + E.assert(_s || !Ph(Tt)); + const ps = $n( + Tt, + 2048 + /* Default */ + ) || Tu(Tt) && Km(Tt.name), ja = _s ? "__computed" : ps && Ne ? "default" : Ee(Tt); + let xa; + if (ja === void 0) + xa = me( + 0, + "__missing" + /* Missing */ + ); + else if (xa = j.get(ja), Ar & 2885600 && J.add(ja), !xa) + j.set(ja, xa = me(0, ja)), Ss && (xa.isReplaceableByMethod = !0); + else { + if (Ss && !xa.isReplaceableByMethod) + return xa; + if (xa.flags & ei) { + if (xa.isReplaceableByMethod) + j.set(ja, xa = me(0, ja)); + else if (!(Ar & 3 && xa.flags & 67108864)) { + Hl(Tt) && Fa(Tt.name, Tt); + let Ro = xa.flags & 2 ? p.Cannot_redeclare_block_scoped_variable_0 : p.Duplicate_identifier_0, O_ = !0; + (xa.flags & 384 || Ar & 384) && (Ro = p.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations, O_ = !1); + let Ld = !1; + Ir(xa.declarations) && (ps || xa.declarations && xa.declarations.length && Tt.kind === 277 && !Tt.isExportEquals) && (Ro = p.A_module_cannot_have_multiple_default_exports, O_ = !1, Ld = !0); + const km = []; + jp(Tt) && tc(Tt.type) && $n( + Tt, + 32 + /* Export */ + ) && xa.flags & 2887656 && km.push(le(Tt, p.Did_you_mean_0, `export type { ${Pi(Tt.name.escapedText)} }`)); + const Cm = is(Tt) || Tt; + lr(xa.declarations, (rh, pp) => { + const ld = is(rh) || rh, xo = O_ ? le(ld, Ro, oe(rh)) : le(ld, Ro); + e.bindDiagnostics.push( + Ld ? Bs(xo, le(Cm, pp === 0 ? p.Another_export_default_is_here : p.and_here)) : xo + ), Ld && km.push(le(ld, p.The_first_export_default_is_here)); + }); + const G0 = O_ ? le(Cm, Ro, oe(Tt)) : le(Cm, Ro); + e.bindDiagnostics.push(Bs(G0, ...km)), xa = me(0, ja); + } + } + } + return Ce(xa, Tt, Ar), xa.parent ? E.assert(xa.parent === Ne, "Existing symbol parent should match new one") : xa.parent = Ne, xa; + } + function ue(j, Ne, Tt) { + const Ar = !!(Q1(j) & 32) || it(j); + if (Ne & 2097152) + return j.kind === 281 || j.kind === 271 && Ar ? ke(s.symbol.exports, s.symbol, j, Ne, Tt) : (E.assertNode(s, Ym), ke( + s.locals, + /*parent*/ + void 0, + j, + Ne, + Tt + )); + if (Fp(j) && E.assert(an(j)), !Ou(j) && (Ar || s.flags & 128)) { + if (!Ym(s) || !s.locals || $n( + j, + 2048 + /* Default */ + ) && !Ee(j)) + return ke(s.symbol.exports, s.symbol, j, Ne, Tt); + const ei = Ne & 111551 ? 1048576 : 0, Ss = ke( + s.locals, + /*parent*/ + void 0, + j, + ei, + Tt + ); + return Ss.exportSymbol = ke(s.symbol.exports, s.symbol, j, Ne, Tt), j.localSymbol = Ss, Ss; + } else + return E.assertNode(s, Ym), ke( + s.locals, + /*parent*/ + void 0, + j, + Ne, + Tt + ); + } + function it(j) { + if (j.parent && Lc(j) && (j = j.parent), !Fp(j)) return !1; + if (!yN(j) && j.fullName) return !0; + const Ne = is(j); + return Ne ? !!(J3(Ne.parent) && jf(Ne.parent) || bl(Ne.parent) && Q1(Ne.parent) & 32) : !1; + } + function Oe(j, Ne) { + const Tt = s, Ar = o, ei = c; + if (Ne & 1 ? (j.kind !== 219 && (o = s), s = c = j, Ne & 32 && (s.locals = Us(), Vt(s))) : Ne & 2 && (c = j, Ne & 32 && (c.locals = void 0)), Ne & 4) { + const Ss = h, _s = S, ps = T, ja = C, xa = A, Ro = F, O_ = R, Ld = Ne & 16 && !$n( + j, + 1024 + /* Async */ + ) && !j.asteriskToken && !!Ab(j) || j.kind === 175; + Ld || (h = ag( + 2, + /*node*/ + void 0, + /*antecedent*/ + void 0 + ), Ne & 144 && (h.node = j)), C = Ld || j.kind === 176 || an(j) && (j.kind === 262 || j.kind === 218) ? Dt() : void 0, A = void 0, S = void 0, T = void 0, F = void 0, R = !1, Ae(j), j.flags &= -5633, !(h.flags & 1) && Ne & 8 && Ap(j.body) && (j.flags |= 512, R && (j.flags |= 1024), j.endFlowNode = h), j.kind === 307 && (j.flags |= V, j.endFlowNode = h), C && (qn(C, h), h = jr(C), (j.kind === 176 || j.kind === 175 || an(j) && (j.kind === 262 || j.kind === 218)) && (j.returnFlowNode = h)), Ld || (h = Ss), S = _s, T = ps, C = ja, A = xa, F = Ro, R = O_; + } else Ne & 64 ? (m = !1, Ae(j), E.assertNotNode(j, Me), j.flags = m ? j.flags | 256 : j.flags & -257) : Ae(j); + s = Tt, o = Ar, c = ei; + } + function xe(j) { + he(j, (Ne) => Ne.kind === 262 ? pr(Ne) : void 0), he(j, (Ne) => Ne.kind !== 262 ? pr(Ne) : void 0); + } + function he(j, Ne = pr) { + j !== void 0 && lr(j, Ne); + } + function ne(j) { + ms(j, pr, he); + } + function Ae(j) { + const Ne = U; + if (U = !1, ii(j)) { + ne(j), En(j), U = Ne; + return; + } + switch (j.kind >= 243 && j.kind <= 259 && (!t.allowUnreachableCode || j.kind === 253) && (j.flowNode = h), j.kind) { + case 247: + Cs(j); + break; + case 246: + Ks(j); + break; + case 248: + xr(j); + break; + case 249: + case 250: + gs(j); + break; + case 245: + Qe(j); + break; + case 253: + case 257: + Ct(j); + break; + case 252: + case 251: + K(j); + break; + case 258: + Ie(j); + break; + case 255: + $e(j); + break; + case 269: + Ke(j); + break; + case 296: + Je(j); + break; + case 244: + Ye(j); + break; + case 256: + yt(j); + break; + case 224: + rn(j); + break; + case 225: + ye(j); + break; + case 226: + if (P0(j)) { + U = Ne, ft(j); + return; + } + ie(j); + break; + case 220: + L(j); + break; + case 227: + ve(j); + break; + case 260: + lt(j); + break; + case 211: + case 212: + Zt(j); + break; + case 213: + fr(j); + break; + case 235: + Pt(j); + break; + case 346: + case 338: + case 340: + Gt(j); + break; + case 351: + Rr(j); + break; + // In source files and blocks, bind functions first to match hoisting that occurs at runtime + case 307: { + xe(j.statements), pr(j.endOfFileToken); + break; + } + case 241: + case 268: + xe(j.statements); + break; + case 208: + zt(j); + break; + case 169: + de(j); + break; + case 210: + case 209: + case 303: + case 230: + U = Ne; + // falls through + default: + ne(j); + break; + } + En(j), U = Ne; + } + function De(j) { + switch (j.kind) { + case 80: + case 110: + return !0; + case 211: + case 212: + return Ue(j); + case 213: + return bt(j); + case 217: + if (r2(j)) + return !1; + // fallthrough + case 235: + return De(j.expression); + case 226: + return er(j); + case 224: + return j.operator === 54 && De(j.operand); + case 221: + return De(j.expression); + } + return !1; + } + function we(j) { + switch (j.kind) { + case 80: + case 110: + case 108: + case 236: + return !0; + case 211: + case 217: + case 235: + return we(j.expression); + case 212: + return (wf(j.argumentExpression) || _o(j.argumentExpression)) && we(j.expression); + case 226: + return j.operatorToken.kind === 28 && we(j.right) || Ah(j.operatorToken.kind) && u_(j.left); + } + return !1; + } + function Ue(j) { + return we(j) || vu(j) && Ue(j.expression); + } + function bt(j) { + if (j.arguments) { + for (const Ne of j.arguments) + if (Ue(Ne)) + return !0; + } + return !!(j.expression.kind === 211 && Ue(j.expression.expression)); + } + function Lt(j, Ne) { + return e6(j) && Nr(j.expression) && Na(Ne); + } + function er(j) { + switch (j.operatorToken.kind) { + case 64: + case 76: + case 77: + case 78: + return Ue(j.left); + case 35: + case 36: + case 37: + case 38: + return Nr(j.left) || Nr(j.right) || Lt(j.right, j.left) || Lt(j.left, j.right) || b4(j.right) && De(j.left) || b4(j.left) && De(j.right); + case 104: + return Nr(j.left); + case 103: + return De(j.right); + case 28: + return De(j.right); + } + return !1; + } + function Nr(j) { + switch (j.kind) { + case 217: + return Nr(j.expression); + case 226: + switch (j.operatorToken.kind) { + case 64: + return Nr(j.left); + case 28: + return Nr(j.right); + } + } + return Ue(j); + } + function Dt() { + return ag( + 4, + /*node*/ + void 0, + /*antecedent*/ + void 0 + ); + } + function Qt() { + return ag( + 8, + /*node*/ + void 0, + /*antecedent*/ + void 0 + ); + } + function Wr(j, Ne, Tt) { + return ag(1024, { target: j, antecedents: Ne }, Tt); + } + function yr(j) { + j.flags |= j.flags & 2048 ? 4096 : 2048; + } + function qn(j, Ne) { + !(Ne.flags & 1) && !as(j.antecedent, Ne) && ((j.antecedent || (j.antecedent = [])).push(Ne), yr(Ne)); + } + function Bt(j, Ne, Tt) { + return Ne.flags & 1 ? Ne : Tt ? (Tt.kind === 112 && j & 64 || Tt.kind === 97 && j & 32) && !o7(Tt) && !Dj(Tt.parent) ? re : De(Tt) ? (yr(Ne), ag(j, Tt, Ne)) : Ne : j & 32 ? Ne : re; + } + function bi(j, Ne, Tt, Ar) { + return yr(j), ag(128, { switchStatement: Ne, clauseStart: Tt, clauseEnd: Ar }, j); + } + function pi(j, Ne, Tt) { + yr(Ne), W = !0; + const Ar = ag(j, Tt, Ne); + return A && qn(A, Ar), Ar; + } + function Xn(j, Ne) { + return yr(j), W = !0, ag(512, Ne, j); + } + function jr(j) { + const Ne = j.antecedent; + return Ne ? Ne.length === 1 ? Ne[0] : j : re; + } + function di(j) { + const Ne = j.parent; + switch (Ne.kind) { + case 245: + case 247: + case 246: + return Ne.expression === j; + case 248: + case 227: + return Ne.condition === j; + } + return !1; + } + function Re(j) { + for (; ; ) + if (j.kind === 217) + j = j.expression; + else if (j.kind === 224 && j.operator === 54) + j = j.operand; + else + return j3(j); + } + function gt(j) { + return $B(za(j)); + } + function tr(j) { + for (; Yu(j.parent) || pv(j.parent) && j.parent.operator === 54; ) + j = j.parent; + return !di(j) && !Re(j.parent) && !(vu(j.parent) && j.parent.expression === j); + } + function qr(j, Ne, Tt, Ar) { + const ei = D, Ss = w; + D = Tt, w = Ar, j(Ne), D = ei, w = Ss; + } + function Bn(j, Ne, Tt) { + qr(pr, j, Ne, Tt), (!j || !gt(j) && !Re(j) && !(vu(j) && m4(j))) && (qn(Ne, Bt(32, h, j)), qn(Tt, Bt(64, h, j))); + } + function wn(j, Ne, Tt) { + const Ar = S, ei = T; + S = Ne, T = Tt, pr(j), S = Ar, T = ei; + } + function ki(j, Ne) { + let Tt = F; + for (; Tt && j.parent.kind === 256; ) + Tt.continueTarget = Ne, Tt = Tt.next, j = j.parent; + return Ne; + } + function Cs(j) { + const Ne = ki(j, Qt()), Tt = Dt(), Ar = Dt(); + qn(Ne, h), h = Ne, Bn(j.expression, Tt, Ar), h = jr(Tt), wn(j.statement, Ar, Ne), qn(Ne, h), h = jr(Ar); + } + function Ks(j) { + const Ne = Qt(), Tt = ki(j, Dt()), Ar = Dt(); + qn(Ne, h), h = Ne, wn(j.statement, Ar, Tt), qn(Tt, h), h = jr(Tt), Bn(j.expression, Ne, Ar), h = jr(Ar); + } + function xr(j) { + const Ne = ki(j, Qt()), Tt = Dt(), Ar = Dt(); + pr(j.initializer), qn(Ne, h), h = Ne, Bn(j.condition, Tt, Ar), h = jr(Tt), wn(j.statement, Ar, Ne), pr(j.incrementor), qn(Ne, h), h = jr(Ar); + } + function gs(j) { + const Ne = ki(j, Qt()), Tt = Dt(); + pr(j.expression), qn(Ne, h), h = Ne, j.kind === 250 && pr(j.awaitModifier), qn(Tt, h), pr(j.initializer), j.initializer.kind !== 261 && Et(j.initializer), wn(j.statement, Tt, Ne), qn(Ne, h), h = jr(Tt); + } + function Qe(j) { + const Ne = Dt(), Tt = Dt(), Ar = Dt(); + Bn(j.expression, Ne, Tt), h = jr(Ne), pr(j.thenStatement), qn(Ar, h), h = jr(Tt), pr(j.elseStatement), qn(Ar, h), h = jr(Ar); + } + function Ct(j) { + pr(j.expression), j.kind === 253 && (R = !0, C && qn(C, h)), h = re, W = !0; + } + function ee(j) { + for (let Ne = F; Ne; Ne = Ne.next) + if (Ne.name === j) + return Ne; + } + function Ve(j, Ne, Tt) { + const Ar = j.kind === 252 ? Ne : Tt; + Ar && (qn(Ar, h), h = re, W = !0); + } + function K(j) { + if (pr(j.label), j.label) { + const Ne = ee(j.label.escapedText); + Ne && (Ne.referenced = !0, Ve(j, Ne.breakTarget, Ne.continueTarget)); + } else + Ve(j, S, T); + } + function Ie(j) { + const Ne = C, Tt = A, Ar = Dt(), ei = Dt(); + let Ss = Dt(); + if (j.finallyBlock && (C = ei), qn(Ss, h), A = Ss, pr(j.tryBlock), qn(Ar, h), j.catchClause && (h = jr(Ss), Ss = Dt(), qn(Ss, h), A = Ss, pr(j.catchClause), qn(Ar, h)), C = Ne, A = Tt, j.finallyBlock) { + const _s = Dt(); + _s.antecedent = Wi(Wi(Ar.antecedent, Ss.antecedent), ei.antecedent), h = _s, pr(j.finallyBlock), h.flags & 1 ? h = re : (C && ei.antecedent && qn(C, Wr(_s, ei.antecedent, h)), A && Ss.antecedent && qn(A, Wr(_s, Ss.antecedent, h)), h = Ar.antecedent ? Wr(_s, Ar.antecedent, h) : re); + } else + h = jr(Ar); + } + function $e(j) { + const Ne = Dt(); + pr(j.expression); + const Tt = S, Ar = O; + S = Ne, O = h, pr(j.caseBlock), qn(Ne, h); + const ei = lr( + j.caseBlock.clauses, + (Ss) => Ss.kind === 297 + /* DefaultClause */ + ); + j.possiblyExhaustive = !ei && !Ne.antecedent, ei || qn(Ne, bi(O, j, 0, 0)), S = Tt, O = Ar, h = jr(Ne); + } + function Ke(j) { + const Ne = j.clauses, Tt = j.parent.expression.kind === 112 || De(j.parent.expression); + let Ar = re; + for (let ei = 0; ei < Ne.length; ei++) { + const Ss = ei; + for (; !Ne[ei].statements.length && ei + 1 < Ne.length; ) + Ar === re && (h = O), pr(Ne[ei]), ei++; + const _s = Dt(); + qn(_s, Tt ? bi(O, j.parent, Ss, ei + 1) : O), qn(_s, Ar), h = jr(_s); + const ps = Ne[ei]; + pr(ps), Ar = h, !(h.flags & 1) && ei !== Ne.length - 1 && t.noFallthroughCasesInSwitch && (ps.fallthroughFlowNode = h); + } + } + function Je(j) { + const Ne = h; + h = O, pr(j.expression), h = Ne, he(j.statements); + } + function Ye(j) { + pr(j.expression), _t(j.expression); + } + function _t(j) { + if (j.kind === 213) { + const Ne = j; + Ne.expression.kind !== 108 && B3(Ne.expression) && (h = Xn(h, Ne)); + } + } + function yt(j) { + const Ne = Dt(); + F = { + next: F, + name: j.label.escapedText, + breakTarget: Ne, + continueTarget: void 0, + referenced: !1 + }, pr(j.label), pr(j.statement), !F.referenced && !t.allowUnusedLabels && Kt(fee(t), j.label, p.Unused_label), F = F.next, qn(Ne, h), h = jr(Ne); + } + function We(j) { + j.kind === 226 && j.operatorToken.kind === 64 ? Et(j.left) : Et(j); + } + function Et(j) { + if (we(j)) + h = pi(16, h, j); + else if (j.kind === 209) + for (const Ne of j.elements) + Ne.kind === 230 ? Et(Ne.expression) : We(Ne); + else if (j.kind === 210) + for (const Ne of j.properties) + Ne.kind === 303 ? We(Ne.initializer) : Ne.kind === 304 ? Et(Ne.name) : Ne.kind === 305 && Et(Ne.expression); + } + function Xt(j, Ne, Tt) { + const Ar = Dt(); + j.operatorToken.kind === 56 || j.operatorToken.kind === 77 ? Bn(j.left, Ar, Tt) : Bn(j.left, Ne, Ar), h = jr(Ar), pr(j.operatorToken), q4(j.operatorToken.kind) ? (qr(pr, j.right, Ne, Tt), Et(j.left), qn(Ne, Bt(32, h, j)), qn(Tt, Bt(64, h, j))) : Bn(j.right, Ne, Tt); + } + function rn(j) { + if (j.operator === 54) { + const Ne = D; + D = w, w = Ne, ne(j), w = D, D = Ne; + } else + ne(j), (j.operator === 46 || j.operator === 47) && Et(j.operand); + } + function ye(j) { + ne(j), (j.operator === 46 || j.operator === 47) && Et(j.operand); + } + function ft(j) { + U ? (U = !1, pr(j.operatorToken), pr(j.right), U = !0, pr(j.left)) : (U = !0, pr(j.left), U = !1, pr(j.operatorToken), pr(j.right)), Et(j.left); + } + function fe() { + return AF( + j, + Ne, + Tt, + Ar, + ei, + /*foldState*/ + void 0 + ); + function j(_s, ps) { + if (ps) { + ps.stackIndex++, Fa(_s, i); + const xa = $; + ba(_s); + const Ro = i; + i = _s, ps.skip = !1, ps.inStrictModeStack[ps.stackIndex] = xa, ps.parentStack[ps.stackIndex] = Ro; + } else + ps = { + stackIndex: 0, + skip: !1, + inStrictModeStack: [void 0], + parentStack: [void 0] + }; + const ja = _s.operatorToken.kind; + if (g5(ja) || q4(ja)) { + if (tr(_s)) { + const xa = Dt(), Ro = h, O_ = W; + W = !1, Xt(_s, xa, xa), h = W ? jr(xa) : Ro, W || (W = O_); + } else + Xt(_s, D, w); + ps.skip = !0; + } + return ps; + } + function Ne(_s, ps, ja) { + if (!ps.skip) { + const xa = Ss(_s); + return ja.operatorToken.kind === 28 && _t(_s), xa; + } + } + function Tt(_s, ps, ja) { + ps.skip || pr(_s); + } + function Ar(_s, ps, ja) { + if (!ps.skip) { + const xa = Ss(_s); + return ja.operatorToken.kind === 28 && _t(_s), xa; + } + } + function ei(_s, ps) { + if (!ps.skip) { + const Ro = _s.operatorToken.kind; + if (Ah(Ro) && !$y(_s) && (Et(_s.left), Ro === 64 && _s.left.kind === 212)) { + const O_ = _s.left; + Nr(O_.expression) && (h = pi(256, h, _s)); + } + } + const ja = ps.inStrictModeStack[ps.stackIndex], xa = ps.parentStack[ps.stackIndex]; + ja !== void 0 && ($ = ja), xa !== void 0 && (i = xa), ps.skip = !1, ps.stackIndex--; + } + function Ss(_s) { + if (_s && fn(_s) && !P0(_s)) + return _s; + pr(_s); + } + } + function L(j) { + ne(j), j.expression.kind === 211 && Et(j.expression); + } + function ve(j) { + const Ne = Dt(), Tt = Dt(), Ar = Dt(), ei = h, Ss = W; + W = !1, Bn(j.condition, Ne, Tt), h = jr(Ne), pr(j.questionToken), pr(j.whenTrue), qn(Ar, h), h = jr(Tt), pr(j.colonToken), pr(j.whenFalse), qn(Ar, h), h = W ? jr(Ar) : ei, W || (W = Ss); + } + function X(j) { + const Ne = ul(j) ? void 0 : j.name; + if (Ds(Ne)) + for (const Tt of Ne.elements) + X(Tt); + else + h = pi(16, h, j); + } + function lt(j) { + ne(j), (j.initializer || _S(j.parent.parent)) && X(j); + } + function zt(j) { + pr(j.dotDotDotToken), pr(j.propertyName), st(j.initializer), pr(j.name); + } + function de(j) { + he(j.modifiers), pr(j.dotDotDotToken), pr(j.questionToken), pr(j.type), st(j.initializer), pr(j.name); + } + function st(j) { + if (!j) + return; + const Ne = h; + if (pr(j), Ne === re || Ne === h) + return; + const Tt = Dt(); + qn(Tt, Ne), qn(Tt, h), h = jr(Tt); + } + function Gt(j) { + pr(j.tagName), j.kind !== 340 && j.fullName && (Fa(j.fullName, j), lv( + j.fullName, + /*incremental*/ + !1 + )), typeof j.comment != "string" && he(j.comment); + } + function Xr(j) { + ne(j); + const Ne = nv(j); + Ne && Ne.kind !== 174 && Ce( + Ne.symbol, + Ne, + 32 + /* Class */ + ); + } + function Rr(j) { + pr(j.tagName), pr(j.moduleSpecifier), pr(j.attributes), typeof j.comment != "string" && he(j.comment); + } + function Jr(j, Ne, Tt) { + qr(pr, j, Ne, Tt), (!vu(j) || m4(j)) && (qn(Ne, Bt(32, h, j)), qn(Tt, Bt(64, h, j))); + } + function tt(j) { + switch (j.kind) { + case 211: + pr(j.questionDotToken), pr(j.name); + break; + case 212: + pr(j.questionDotToken), pr(j.argumentExpression); + break; + case 213: + pr(j.questionDotToken), he(j.typeArguments), he(j.arguments); + break; + } + } + function ut(j, Ne, Tt) { + const Ar = d4(j) ? Dt() : void 0; + Jr(j.expression, Ar || Ne, Tt), Ar && (h = jr(Ar)), qr(tt, j, Ne, Tt), m4(j) && (qn(Ne, Bt(32, h, j)), qn(Tt, Bt(64, h, j))); + } + function Mt(j) { + if (tr(j)) { + const Ne = Dt(), Tt = h, Ar = W; + ut(j, Ne, Ne), h = W ? jr(Ne) : Tt, W || (W = Ar); + } else + ut(j, D, w); + } + function Pt(j) { + vu(j) ? Mt(j) : ne(j); + } + function Zt(j) { + vu(j) ? Mt(j) : ne(j); + } + function fr(j) { + if (vu(j)) + Mt(j); + else { + const Ne = za(j.expression); + Ne.kind === 218 || Ne.kind === 219 ? (he(j.typeArguments), he(j.arguments), pr(j.expression)) : (ne(j), j.expression.kind === 108 && (h = Xn(h, j))); + } + if (j.expression.kind === 211) { + const Ne = j.expression; + Me(Ne.name) && Nr(Ne.expression) && NB(Ne.name) && (h = pi(256, h, j)); + } + } + function Vt(j) { + _ && (_.nextContainer = j), _ = j; + } + function ir(j, Ne, Tt) { + switch (s.kind) { + // Modules, source files, and classes need specialized handling for how their + // members are declared (for example, a member of a class will go into a specific + // symbol table depending on if it is static or not). We defer to specialized + // handlers to take care of declaring these child members. + case 267: + return ue(j, Ne, Tt); + case 307: + return _r(j, Ne, Tt); + case 231: + case 263: + return Tr(j, Ne, Tt); + case 266: + return ke(s.symbol.exports, s.symbol, j, Ne, Tt); + case 187: + case 322: + case 210: + case 264: + case 292: + return ke(s.symbol.members, s.symbol, j, Ne, Tt); + case 184: + case 185: + case 179: + case 180: + case 323: + case 181: + case 174: + case 173: + case 176: + case 177: + case 178: + case 262: + case 218: + case 219: + case 317: + case 175: + case 265: + case 200: + return s.locals && E.assertNode(s, Ym), ke( + s.locals, + /*parent*/ + void 0, + j, + Ne, + Tt + ); + } + } + function Tr(j, Ne, Tt) { + return Vs(j) ? ke(s.symbol.exports, s.symbol, j, Ne, Tt) : ke(s.symbol.members, s.symbol, j, Ne, Tt); + } + function _r(j, Ne, Tt) { + return el(e) ? ue(j, Ne, Tt) : ke( + e.locals, + /*parent*/ + void 0, + j, + Ne, + Tt + ); + } + function Ot(j) { + const Ne = Ei(j) ? j : jn(j.body, dm); + return !!Ne && Ne.statements.some((Tt) => wc(Tt) || Io(Tt)); + } + function mi(j) { + j.flags & 33554432 && !Ot(j) ? j.flags |= 128 : j.flags &= -129; + } + function Js(j) { + if (mi(j), Ou(j)) + if ($n( + j, + 32 + /* Export */ + ) && wt(j, p.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible), eB(j)) + Ms(j); + else { + let Ne; + if (j.name.kind === 11) { + const { text: Ar } = j.name; + Ne = Px(Ar), Ne === void 0 && wt(j.name, p.Pattern_0_can_have_at_most_one_Asterisk_character, Ar); + } + const Tt = ir( + j, + 512, + 110735 + /* ValueModuleExcludes */ + ); + e.patternAmbientModules = Pr(e.patternAmbientModules, Ne && !rs(Ne) ? { pattern: Ne, symbol: Tt } : void 0); + } + else { + const Ne = Ms(j); + if (Ne !== 0) { + const { symbol: Tt } = j; + Tt.constEnumOnlyModule = !(Tt.flags & 304) && Ne === 2 && Tt.constEnumOnlyModule !== !1; + } + } + } + function Ms(j) { + const Ne = jh(j), Tt = Ne !== 0; + return ir( + j, + Tt ? 512 : 1024, + Tt ? 110735 : 0 + /* NamespaceModuleExcludes */ + ), Ne; + } + function Ns(j) { + const Ne = me(131072, Ee(j)); + Ce( + Ne, + j, + 131072 + /* Signature */ + ); + const Tt = me( + 2048, + "__type" + /* Type */ + ); + Ce( + Tt, + j, + 2048 + /* TypeLiteral */ + ), Tt.members = Us(), Tt.members.set(Ne.escapedName, Ne); + } + function kc(j) { + return ri( + j, + 4096, + "__object" + /* Object */ + ); + } + function Wo(j) { + return ri( + j, + 4096, + "__jsxAttributes" + /* JSXAttributes */ + ); + } + function sc(j, Ne, Tt) { + return ir(j, Ne, Tt); + } + function ri(j, Ne, Tt) { + const Ar = me(Ne, Tt); + return Ne & 106508 && (Ar.parent = s.symbol), Ce(Ar, j, Ne), Ar; + } + function zs(j, Ne, Tt) { + switch (c.kind) { + case 267: + ue(j, Ne, Tt); + break; + case 307: + if ($_(s)) { + ue(j, Ne, Tt); + break; + } + // falls through + default: + E.assertNode(c, Ym), c.locals || (c.locals = Us(), Vt(c)), ke( + c.locals, + /*parent*/ + void 0, + j, + Ne, + Tt + ); + } + } + function eu() { + if (!u) + return; + const j = s, Ne = _, Tt = c, Ar = i, ei = h; + for (const Ss of u) { + const _s = Ss.parent.parent; + s = A7(_s) || e, c = Sd(_s) || e, h = ag( + 2, + /*node*/ + void 0, + /*antecedent*/ + void 0 + ), i = Ss, pr(Ss.typeExpression); + const ps = is(Ss); + if ((yN(Ss) || !Ss.fullName) && ps && J3(ps.parent)) { + const ja = jf(ps.parent); + if (ja) { + F_( + e.symbol, + ps.parent, + ja, + !!ur(ps, (Ro) => Tn(Ro) && Ro.name.escapedText === "prototype"), + /*containerIsClass*/ + !1 + ); + const xa = s; + switch (h3(ps.parent)) { + case 1: + case 2: + $_(e) ? s = e : s = void 0; + break; + case 4: + s = ps.parent.expression; + break; + case 3: + s = ps.parent.expression.name; + break; + case 5: + s = i2(e, ps.parent.expression) ? e : Tn(ps.parent.expression) ? ps.parent.expression.name : ps.parent.expression; + break; + case 0: + return E.fail("Shouldn't have detected typedef or enum on non-assignment declaration"); + } + s && ue( + Ss, + 524288, + 788968 + /* TypeAliasExcludes */ + ), s = xa; + } + } else yN(Ss) || !Ss.fullName || Ss.fullName.kind === 80 ? (i = Ss.parent, zs( + Ss, + 524288, + 788968 + /* TypeAliasExcludes */ + )) : pr(Ss.fullName); + } + s = j, _ = Ne, c = Tt, i = Ar, h = ei; + } + function hs() { + if (g === void 0) + return; + const j = s, Ne = _, Tt = c, Ar = i, ei = h; + for (const Ss of g) { + const _s = Ob(Ss), ps = _s ? A7(_s) : void 0, ja = _s ? Sd(_s) : void 0; + s = ps || e, c = ja || e, h = ag( + 2, + /*node*/ + void 0, + /*antecedent*/ + void 0 + ), i = Ss, pr(Ss.importClause); + } + s = j, _ = Ne, c = Tt, i = Ar, h = ei; + } + function Bu(j) { + if (!e.parseDiagnostics.length && !(j.flags & 33554432) && !(j.flags & 16777216) && !TK(j)) { + const Ne = aS(j); + if (Ne === void 0) + return; + $ && Ne >= 119 && Ne <= 127 ? e.bindDiagnostics.push(le(j, Yc(j), co(j))) : Ne === 135 ? el(e) && z7(j) ? e.bindDiagnostics.push(le(j, p.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module, co(j))) : j.flags & 65536 && e.bindDiagnostics.push(le(j, p.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, co(j))) : Ne === 127 && j.flags & 16384 && e.bindDiagnostics.push(le(j, p.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, co(j))); + } + } + function Yc(j) { + return Al(j) ? p.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode : e.externalModuleIndicator ? p.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode : p.Identifier_expected_0_is_a_reserved_word_in_strict_mode; + } + function Sl(j) { + j.escapedText === "#constructor" && (e.parseDiagnostics.length || e.bindDiagnostics.push(le(j, p.constructor_is_a_reserved_word, co(j)))); + } + function Zi(j) { + $ && u_(j.left) && Ah(j.operatorToken.kind) && qt(j, j.left); + } + function Gs(j) { + $ && j.variableDeclaration && qt(j, j.variableDeclaration.name); + } + function Ca(j) { + if ($ && j.expression.kind === 80) { + const Ne = dS(e, j.expression); + e.bindDiagnostics.push(ol(e, Ne.start, Ne.length, p.delete_cannot_be_called_on_an_identifier_in_strict_mode)); + } + } + function Oi(j) { + return Me(j) && (j.escapedText === "eval" || j.escapedText === "arguments"); + } + function qt(j, Ne) { + if (Ne && Ne.kind === 80) { + const Tt = Ne; + if (Oi(Tt)) { + const Ar = dS(e, Ne); + e.bindDiagnostics.push(ol(e, Ar.start, Ar.length, Qa(j), An(Tt))); + } + } + } + function Qa(j) { + return Al(j) ? p.Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode : e.externalModuleIndicator ? p.Invalid_use_of_0_Modules_are_automatically_in_strict_mode : p.Invalid_use_of_0_in_strict_mode; + } + function Mc(j) { + $ && !(j.flags & 33554432) && qt(j, j.name); + } + function Ol(j) { + return Al(j) ? p.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definitions_are_automatically_in_strict_mode : e.externalModuleIndicator ? p.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_automatically_in_strict_mode : p.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5; + } + function Ll(j) { + if (n < 2 && c.kind !== 307 && c.kind !== 267 && !bC(c)) { + const Ne = dS(e, j); + e.bindDiagnostics.push(ol(e, Ne.start, Ne.length, Ol(j))); + } + } + function To(j) { + $ && qt(j, j.operand); + } + function ge(j) { + $ && (j.operator === 46 || j.operator === 47) && qt(j, j.operand); + } + function G(j) { + $ && wt(j, p.with_statements_are_not_allowed_in_strict_mode); + } + function rt(j) { + $ && pa(t) >= 2 && (yZ(j.statement) || pc(j.statement)) && wt(j.label, p.A_label_is_not_allowed_here); + } + function wt(j, Ne, ...Tt) { + const Ar = rm(e, j.pos); + e.bindDiagnostics.push(ol(e, Ar.start, Ar.length, Ne, ...Tt)); + } + function Kt(j, Ne, Tt) { + Yr(j, Ne, Ne, Tt); + } + function Yr(j, Ne, Tt, Ar) { + Mn(j, { pos: Vy(Ne, e), end: Tt.end }, Ar); + } + function Mn(j, Ne, Tt) { + const Ar = ol(e, Ne.pos, Ne.end - Ne.pos, Tt); + j ? e.bindDiagnostics.push(Ar) : e.bindSuggestionDiagnostics = Pr(e.bindSuggestionDiagnostics, { + ...Ar, + category: 2 + /* Suggestion */ + }); + } + function pr(j) { + if (!j) + return; + Fa(j, i), nn && (j.tracingPath = e.path); + const Ne = $; + if (ba(j), j.kind > 165) { + const Tt = i; + i = j; + const Ar = sW(j); + Ar === 0 ? Ae(j) : Oe(j, Ar), i = Tt; + } else { + const Tt = i; + j.kind === 1 && (i = j), En(j), i = Tt; + } + $ = Ne; + } + function En(j) { + if (uf(j)) + if (an(j)) + for (const Ne of j.jsDoc) + pr(Ne); + else + for (const Ne of j.jsDoc) + Fa(Ne, j), lv( + Ne, + /*incremental*/ + !1 + ); + } + function Ji(j) { + if (!$) + for (const Ne of j) { + if (!nm(Ne)) + return; + if (hi(Ne)) { + $ = !0; + return; + } + } + } + function hi(j) { + const Ne = Db(e, j.expression); + return Ne === '"use strict"' || Ne === "'use strict'"; + } + function ba(j) { + switch (j.kind) { + /* Strict mode checks */ + case 80: + if (j.flags & 4096) { + let _s = j.parent; + for (; _s && !Fp(_s); ) + _s = _s.parent; + zs( + _s, + 524288, + 788968 + /* TypeAliasExcludes */ + ); + break; + } + // falls through + case 110: + return h && (ct(j) || i.kind === 304) && (j.flowNode = h), Bu(j); + case 166: + h && q7(j) && (j.flowNode = h); + break; + case 236: + case 108: + j.flowNode = h; + break; + case 81: + return Sl(j); + case 211: + case 212: + const Ne = j; + h && we(Ne) && (Ne.flowNode = h), pK(Ne) && Do(Ne), an(Ne) && e.commonJsModuleIndicator && Wg(Ne) && !aO(c, "module") && ke( + e.locals, + /*parent*/ + void 0, + Ne.expression, + 134217729, + 111550 + /* FunctionScopedVariableExcludes */ + ); + break; + case 226: + switch (Sc(j)) { + case 1: + Fe(j); + break; + case 2: + Ft(j); + break; + case 3: + Va(j.left, j); + break; + case 6: + ml(j); + break; + case 4: + Ti(j); + break; + case 5: + const _s = j.left.expression; + if (an(j) && Me(_s)) { + const ps = aO(c, _s.escapedText); + if (W7(ps?.valueDeclaration)) { + Ti(j); + break; + } + } + df(j); + break; + case 0: + break; + default: + E.fail("Unknown binary expression special property assignment kind"); + } + return Zi(j); + case 299: + return Gs(j); + case 220: + return Ca(j); + case 225: + return To(j); + case 224: + return ge(j); + case 254: + return G(j); + case 256: + return rt(j); + case 197: + m = !0; + return; + case 182: + break; + // Binding the children will handle everything + case 168: + return Hr(j); + case 169: + return Q(j); + case 260: + return ug(j); + case 208: + return j.flowNode = h, ug(j); + case 172: + case 171: + return Mo(j); + case 303: + case 304: + return jt( + j, + 4, + 0 + /* PropertyExcludes */ + ); + case 306: + return jt( + j, + 8, + 900095 + /* EnumMemberExcludes */ + ); + case 179: + case 180: + case 181: + return ir( + j, + 131072, + 0 + /* None */ + ); + case 174: + case 173: + return jt( + j, + 8192 | (j.questionToken ? 16777216 : 0), + Ip(j) ? 0 : 103359 + /* MethodExcludes */ + ); + case 262: + return et(j); + case 176: + return ir( + j, + 16384, + /*symbolExcludes:*/ + 0 + /* None */ + ); + case 177: + return jt( + j, + 32768, + 46015 + /* GetAccessorExcludes */ + ); + case 178: + return jt( + j, + 65536, + 78783 + /* SetAccessorExcludes */ + ); + case 184: + case 317: + case 323: + case 185: + return Ns(j); + case 187: + case 322: + case 200: + return dc(j); + case 332: + return Xr(j); + case 210: + return kc(j); + case 218: + case 219: + return Rt(j); + case 213: + switch (Sc(j)) { + case 7: + return mo(j); + case 8: + return Rl(j); + case 9: + return gc(j); + case 0: + break; + // Nothing to do + default: + return E.fail("Unknown call expression assignment declaration kind"); + } + an(j) && y_(j); + break; + // Members of classes, interfaces, and modules + case 231: + case 263: + return $ = !0, cd(j); + case 264: + return zs( + j, + 64, + 788872 + /* InterfaceExcludes */ + ); + case 265: + return zs( + j, + 524288, + 788968 + /* TypeAliasExcludes */ + ); + case 266: + return hf(j); + case 267: + return Js(j); + // Jsx-attributes + case 292: + return Wo(j); + case 291: + return sc( + j, + 4, + 0 + /* PropertyExcludes */ + ); + // Imports and exports + case 271: + case 274: + case 276: + case 281: + return ir( + j, + 2097152, + 2097152 + /* AliasExcludes */ + ); + case 270: + return ac(j); + case 273: + return dl(j); + case 278: + return Vp(j); + case 277: + return Uo(j); + case 307: + return Ji(j.statements), mc(); + case 241: + if (!bC(j.parent)) + return; + // falls through + case 268: + return Ji(j.statements); + case 341: + if (j.parent.kind === 323) + return Q(j); + if (j.parent.kind !== 322) + break; + // falls through + case 348: + const ei = j, Ss = ei.isBracketed || ei.typeExpression && ei.typeExpression.type.kind === 316 ? 16777220 : 4; + return ir( + ei, + Ss, + 0 + /* PropertyExcludes */ + ); + case 346: + case 338: + case 340: + return (u || (u = [])).push(j); + case 339: + return pr(j.typeExpression); + case 351: + return (g || (g = [])).push(j); + } + } + function Mo(j) { + const Ne = l_(j), Tt = Ne ? 98304 : 4, Ar = Ne ? 13247 : 0; + return jt(j, Tt | (j.questionToken ? 16777216 : 0), Ar); + } + function dc(j) { + return ri( + j, + 2048, + "__type" + /* Type */ + ); + } + function mc() { + if (mi(e), el(e)) + Rc(); + else if (tp(e)) { + Rc(); + const j = e.symbol; + ke( + e.symbol.exports, + e.symbol, + e, + 4, + -1 + /* All */ + ), e.symbol = j; + } + } + function Rc() { + ri(e, 512, `"${$u(e.fileName)}"`); + } + function Uo(j) { + if (!s.symbol || !s.symbol.exports) + ri(j, 111551, Ee(j)); + else { + const Ne = D3(j) ? 2097152 : 4, Tt = ke( + s.symbol.exports, + s.symbol, + j, + Ne, + -1 + /* All */ + ); + j.isExportEquals && v3(Tt, j); + } + } + function ac(j) { + at(j.modifiers) && e.bindDiagnostics.push(le(j, p.Modifiers_cannot_appear_here)); + const Ne = Ei(j.parent) ? el(j.parent) ? j.parent.isDeclarationFile ? void 0 : p.Global_module_exports_may_only_appear_in_declaration_files : p.Global_module_exports_may_only_appear_in_module_files : p.Global_module_exports_may_only_appear_at_top_level; + Ne ? e.bindDiagnostics.push(le(j, Ne)) : (e.symbol.globalExports = e.symbol.globalExports || Us(), ke( + e.symbol.globalExports, + e.symbol, + j, + 2097152, + 2097152 + /* AliasExcludes */ + )); + } + function Vp(j) { + !s.symbol || !s.symbol.exports ? ri(j, 8388608, Ee(j)) : j.exportClause ? ig(j.exportClause) && (Fa(j.exportClause, j), ke( + s.symbol.exports, + s.symbol, + j.exportClause, + 2097152, + 2097152 + /* AliasExcludes */ + )) : ke( + s.symbol.exports, + s.symbol, + j, + 8388608, + 0 + /* None */ + ); + } + function dl(j) { + j.name && ir( + j, + 2097152, + 2097152 + /* AliasExcludes */ + ); + } + function Ml(j) { + return e.externalModuleIndicator && e.externalModuleIndicator !== !0 ? !1 : (e.commonJsModuleIndicator || (e.commonJsModuleIndicator = j, e.externalModuleIndicator || Rc()), !0); + } + function Rl(j) { + if (!Ml(j)) + return; + const Ne = gf( + j.arguments[0], + /*parent*/ + void 0, + (Tt, Ar) => (Ar && Ce( + Ar, + Tt, + 67110400 + /* Assignment */ + ), Ar) + ); + Ne && ke( + Ne.exports, + Ne, + j, + 1048580, + 0 + /* None */ + ); + } + function Fe(j) { + if (!Ml(j)) + return; + const Ne = gf( + j.left.expression, + /*parent*/ + void 0, + (Tt, Ar) => (Ar && Ce( + Ar, + Tt, + 67110400 + /* Assignment */ + ), Ar) + ); + if (Ne) { + const Ar = e5(j.right) && (hS(j.left.expression) || Wg(j.left.expression)) ? 2097152 : 1048580; + Fa(j.left, j), ke( + Ne.exports, + Ne, + j.left, + Ar, + 0 + /* None */ + ); + } + } + function Ft(j) { + if (!Ml(j)) + return; + const Ne = m3(j.right); + if (ZB(Ne) || s === e && i2(e, Ne)) + return; + if (oa(Ne) && Ri(Ne.properties, _u)) { + lr(Ne.properties, Br); + return; + } + const Tt = D3(j) ? 2097152 : 1049092, Ar = ke( + e.symbol.exports, + e.symbol, + j, + Tt | 67108864, + 0 + /* None */ + ); + v3(Ar, j); + } + function Br(j) { + ke( + e.symbol.exports, + e.symbol, + j, + 69206016, + 0 + /* None */ + ); + } + function Ti(j) { + if (E.assert(an(j)), fn(j) && Tn(j.left) && Ni(j.left.name) || Tn(j) && Ni(j.name)) + return; + const Tt = Lu( + j, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + switch (Tt.kind) { + case 262: + case 218: + let Ar = Tt.symbol; + if (fn(Tt.parent) && Tt.parent.operatorToken.kind === 64) { + const _s = Tt.parent.left; + Fb(_s) && Qy(_s.expression) && (Ar = t_(_s.expression.expression, o)); + } + Ar && Ar.valueDeclaration && (Ar.members = Ar.members || Us(), Ph(j) ? Sa(j, Ar, Ar.members) : ke( + Ar.members, + Ar, + j, + 67108868, + 0 + /* Property */ + ), Ce( + Ar, + Ar.valueDeclaration, + 32 + /* Class */ + )); + break; + case 176: + case 172: + case 174: + case 177: + case 178: + case 175: + const ei = Tt.parent, Ss = Vs(Tt) ? ei.symbol.exports : ei.symbol.members; + Ph(j) ? Sa(j, ei.symbol, Ss) : ke( + Ss, + ei.symbol, + j, + 67108868, + 0, + /*isReplaceableByMethod*/ + !0 + ); + break; + case 307: + if (Ph(j)) + break; + Tt.commonJsModuleIndicator ? ke( + Tt.symbol.exports, + Tt.symbol, + j, + 1048580, + 0 + /* None */ + ) : ir( + j, + 1, + 111550 + /* FunctionScopedVariableExcludes */ + ); + break; + // Namespaces are not allowed in javascript files, so do nothing here + case 267: + break; + default: + E.failBadSyntaxKind(Tt); + } + } + function Sa(j, Ne, Tt) { + ke( + Tt, + Ne, + j, + 4, + 0, + /*isReplaceableByMethod*/ + !0, + /*isComputedName*/ + !0 + ), to(j, Ne); + } + function to(j, Ne) { + Ne && (Ne.assignmentDeclarationMembers || (Ne.assignmentDeclarationMembers = /* @__PURE__ */ new Map())).set(Aa(j), j); + } + function Do(j) { + j.expression.kind === 110 ? Ti(j) : Fb(j) && j.parent.parent.kind === 307 && (Qy(j.expression) ? Va(j, j.parent) : Rf(j)); + } + function ml(j) { + Fa(j.left, j), Fa(j.right, j), fp( + j.left.expression, + j.left, + /*isPrototypeProperty*/ + !1, + /*containerIsClass*/ + !0 + ); + } + function gc(j) { + const Ne = t_(j.arguments[0].expression); + Ne && Ne.valueDeclaration && Ce( + Ne, + Ne.valueDeclaration, + 32 + /* Class */ + ), mf( + j, + Ne, + /*isPrototypeProperty*/ + !0 + ); + } + function Va(j, Ne) { + const Tt = j.expression, Ar = Tt.expression; + Fa(Ar, Tt), Fa(Tt, j), Fa(j, Ne), fp( + Ar, + j, + /*isPrototypeProperty*/ + !0, + /*containerIsClass*/ + !0 + ); + } + function mo(j) { + let Ne = t_(j.arguments[0]); + const Tt = j.parent.parent.kind === 307; + Ne = F_( + Ne, + j.arguments[0], + Tt, + /*isPrototypeProperty*/ + !1, + /*containerIsClass*/ + !1 + ), mf( + j, + Ne, + /*isPrototypeProperty*/ + !1 + ); + } + function df(j) { + var Ne; + const Tt = t_(j.left.expression, c) || t_(j.left.expression, s); + if (!an(j) && !dK(Tt)) + return; + const Ar = VC(j.left); + if (!(Me(Ar) && ((Ne = aO(s, Ar.escapedText)) == null ? void 0 : Ne.flags) & 2097152)) + if (Fa(j.left, j), Fa(j.right, j), Me(j.left.expression) && s === e && i2(e, j.left.expression)) + Fe(j); + else if (Ph(j)) { + ri( + j, + 67108868, + "__computed" + /* Computed */ + ); + const ei = F_( + Tt, + j.left.expression, + jf(j.left), + /*isPrototypeProperty*/ + !1, + /*containerIsClass*/ + !1 + ); + to(j, ei); + } else + Rf(Ws(j.left, vS)); + } + function Rf(j) { + E.assert(!Me(j)), Fa(j.expression, j), fp( + j.expression, + j, + /*isPrototypeProperty*/ + !1, + /*containerIsClass*/ + !1 + ); + } + function F_(j, Ne, Tt, Ar, ei) { + return j?.flags & 2097152 || (Tt && !Ar && (j = gf(Ne, j, (ps, ja, xa) => { + if (ja) + return Ce(ja, ps, 67110400), ja; + { + const Ro = xa ? xa.exports : e.jsGlobalAugmentations || (e.jsGlobalAugmentations = Us()); + return ke(Ro, xa, ps, 67110400, 110735); + } + })), ei && j && j.valueDeclaration && Ce( + j, + j.valueDeclaration, + 32 + /* Class */ + )), j; + } + function mf(j, Ne, Tt) { + if (!Ne || !th(Ne)) + return; + const Ar = Tt ? Ne.members || (Ne.members = Us()) : Ne.exports || (Ne.exports = Us()); + let ei = 0, Ss = 0; + Ka(fx(j)) ? (ei = 8192, Ss = 103359) : Fs(j) && yS(j) && (at(j.arguments[2].properties, (_s) => { + const ps = is(_s); + return !!ps && Me(ps) && An(ps) === "set"; + }) && (ei |= 65540, Ss |= 78783), at(j.arguments[2].properties, (_s) => { + const ps = is(_s); + return !!ps && Me(ps) && An(ps) === "get"; + }) && (ei |= 32772, Ss |= 46015)), ei === 0 && (ei = 4, Ss = 0), ke( + Ar, + Ne, + j, + ei | 67108864, + Ss & -67108865 + /* Assignment */ + ); + } + function jf(j) { + return fn(j.parent) ? od(j.parent).parent.kind === 307 : j.parent.parent.kind === 307; + } + function fp(j, Ne, Tt, Ar) { + let ei = t_(j, c) || t_(j, s); + const Ss = jf(Ne); + ei = F_(ei, Ne.expression, Ss, Tt, Ar), mf(Ne, ei, Tt); + } + function th(j) { + if (j.flags & 1072) + return !0; + const Ne = j.valueDeclaration; + if (Ne && Fs(Ne)) + return !!fx(Ne); + let Tt = Ne ? Kn(Ne) ? Ne.initializer : fn(Ne) ? Ne.right : Tn(Ne) && fn(Ne.parent) ? Ne.parent.right : void 0 : void 0; + if (Tt = Tt && m3(Tt), Tt) { + const Ar = Qy(Kn(Ne) ? Ne.name : fn(Ne) ? Ne.left : Ne); + return !!rv(fn(Tt) && (Tt.operatorToken.kind === 57 || Tt.operatorToken.kind === 61) ? Tt.right : Tt, Ar); + } + return !1; + } + function od(j) { + for (; fn(j.parent); ) + j = j.parent; + return j.parent; + } + function t_(j, Ne = s) { + if (Me(j)) + return aO(Ne, j.escapedText); + { + const Tt = t_(j.expression); + return Tt && Tt.exports && Tt.exports.get(wh(j)); + } + } + function gf(j, Ne, Tt) { + if (i2(e, j)) + return e.symbol; + if (Me(j)) + return Tt(j, t_(j), Ne); + { + const Ar = gf(j.expression, Ne, Tt), ei = g3(j); + return Ni(ei) && E.fail("unexpected PrivateIdentifier"), Tt(ei, Ar && Ar.exports && Ar.exports.get(wh(j)), Ar); + } + } + function y_(j) { + !e.commonJsModuleIndicator && __( + j, + /*requireStringLiteralLikeArgument*/ + !1 + ) && Ml(j); + } + function cd(j) { + if (j.kind === 263) + zs( + j, + 32, + 899503 + /* ClassExcludes */ + ); + else { + const ei = j.name ? j.name.escapedText : "__class"; + ri(j, 32, ei), j.name && J.add(j.name.escapedText); + } + const { symbol: Ne } = j, Tt = me(4194308, "prototype"), Ar = Ne.exports.get(Tt.escapedName); + Ar && (j.name && Fa(j.name, j), e.bindDiagnostics.push(le(Ar.declarations[0], p.Duplicate_identifier_0, _c(Tt)))), Ne.exports.set(Tt.escapedName, Tt), Tt.parent = Ne; + } + function hf(j) { + return ev(j) ? zs( + j, + 128, + 899967 + /* ConstEnumExcludes */ + ) : zs( + j, + 256, + 899327 + /* RegularEnumExcludes */ + ); + } + function ug(j) { + if ($ && qt(j, j.name), !Ds(j.name)) { + const Ne = j.kind === 260 ? j : j.parent.parent; + an(j) && Ib(Ne) && !Y1(j) && !(Q1(j) & 32) ? ir( + j, + 2097152, + 2097152 + /* AliasExcludes */ + ) : Yj(j) ? zs( + j, + 2, + 111551 + /* BlockScopedVariableExcludes */ + ) : av(j) ? ir( + j, + 1, + 111551 + /* ParameterExcludes */ + ) : ir( + j, + 1, + 111550 + /* FunctionScopedVariableExcludes */ + ); + } + } + function Q(j) { + if (!(j.kind === 341 && s.kind !== 323) && ($ && !(j.flags & 33554432) && qt(j, j.name), Ds(j.name) ? ri(j, 1, "__" + j.parent.parameters.indexOf(j)) : ir( + j, + 1, + 111551 + /* ParameterExcludes */ + ), H_(j, j.parent))) { + const Ne = j.parent.parent; + ke( + Ne.symbol.members, + Ne.symbol, + j, + 4 | (j.questionToken ? 16777216 : 0), + 0 + /* PropertyExcludes */ + ); + } + } + function et(j) { + !e.isDeclarationFile && !(j.flags & 33554432) && J4(j) && (V |= 4096), Mc(j), $ ? (Ll(j), zs( + j, + 16, + 110991 + /* FunctionExcludes */ + )) : ir( + j, + 16, + 110991 + /* FunctionExcludes */ + ); + } + function Rt(j) { + !e.isDeclarationFile && !(j.flags & 33554432) && J4(j) && (V |= 4096), h && (j.flowNode = h), Mc(j); + const Ne = j.name ? j.name.escapedText : "__function"; + return ri(j, 16, Ne); + } + function jt(j, Ne, Tt) { + return !e.isDeclarationFile && !(j.flags & 33554432) && J4(j) && (V |= 4096), h && R7(j) && (j.flowNode = h), Ph(j) ? ri( + j, + Ne, + "__computed" + /* Computed */ + ) : ir(j, Ne, Tt); + } + function Er(j) { + const Ne = ur(j, (Tt) => Tt.parent && Xb(Tt.parent) && Tt.parent.extendsType === Tt); + return Ne && Ne.parent; + } + function Hr(j) { + if (Bp(j.parent)) { + const Ne = K7(j.parent); + Ne ? (E.assertNode(Ne, Ym), Ne.locals ?? (Ne.locals = Us()), ke( + Ne.locals, + /*parent*/ + void 0, + j, + 262144, + 526824 + /* TypeParameterExcludes */ + )) : ir( + j, + 262144, + 526824 + /* TypeParameterExcludes */ + ); + } else if (j.parent.kind === 195) { + const Ne = Er(j.parent); + Ne ? (E.assertNode(Ne, Ym), Ne.locals ?? (Ne.locals = Us()), ke( + Ne.locals, + /*parent*/ + void 0, + j, + 262144, + 526824 + /* TypeParameterExcludes */ + )) : ri(j, 262144, Ee(j)); + } else + ir( + j, + 262144, + 526824 + /* TypeParameterExcludes */ + ); + } + function xn(j) { + const Ne = jh(j); + return Ne === 1 || Ne === 2 && Yy(t); + } + function ii(j) { + if (!(h.flags & 1)) + return !1; + if (h === re && // report error on all statements except empty ones + (qP(j) && j.kind !== 242 || // report error on class declarations + j.kind === 263 || // report errors on enums with preserved emit + e1e(j, t) || // report error on instantiated modules + j.kind === 267 && xn(j)) && (h = te, !t.allowUnreachableCode)) { + const Tt = _ee(t) && !(j.flags & 33554432) && (!pc(j) || !!(Ch(j.declarationList) & 7) || j.declarationList.declarations.some((Ar) => !!Ar.initializer)); + OMe(j, t, (Ar, ei) => Yr(Tt, Ar, ei, p.Unreachable_code_detected)); + } + return !0; + } + } + function e1e(e, t) { + return e.kind === 266 && (!ev(e) || Yy(t)); + } + function OMe(e, t, n) { + if (xi(e) && i(e) && ks(e.parent)) { + const { statements: o } = e.parent, c = CJ(o, e); + yR(c, i, (_, u) => n(c[_], c[u - 1])); + } else + n(e, e); + function i(o) { + return !Tc(o) && !s(o) && // `var x;` may declare a variable used above + !(pc(o) && !(Ch(o) & 7) && o.declarationList.declarations.some((c) => !c.initializer)); + } + function s(o) { + switch (o.kind) { + case 264: + case 265: + return !0; + case 267: + return jh(o) !== 1; + case 266: + return !e1e(o, t); + default: + return !1; + } + } + } + function i2(e, t) { + let n = 0; + const i = mP(); + for (i.enqueue(t); !i.isEmpty() && n < 100; ) { + if (n++, t = i.dequeue(), hS(t) || Wg(t)) + return !0; + if (Me(t)) { + const s = aO(e, t.escapedText); + if (s && s.valueDeclaration && Kn(s.valueDeclaration) && s.valueDeclaration.initializer) { + const o = s.valueDeclaration.initializer; + i.enqueue(o), Cl( + o, + /*excludeCompoundAssignment*/ + !0 + ) && (i.enqueue(o.left), i.enqueue(o.right)); + } + } + } + return !1; + } + function sW(e) { + switch (e.kind) { + case 231: + case 263: + case 266: + case 210: + case 187: + case 322: + case 292: + return 1; + case 264: + return 65; + case 267: + case 265: + case 200: + case 181: + return 33; + case 307: + return 37; + case 177: + case 178: + case 174: + if (R7(e)) + return 173; + // falls through + case 176: + case 262: + case 173: + case 179: + case 323: + case 317: + case 184: + case 180: + case 185: + case 175: + return 45; + case 218: + case 219: + return 61; + case 268: + return 4; + case 172: + return e.initializer ? 4 : 0; + case 299: + case 248: + case 249: + case 250: + case 269: + return 34; + case 241: + return vs(e.parent) || nc(e.parent) ? 0 : 34; + } + return 0; + } + function aO(e, t) { + var n, i, s, o; + const c = (i = (n = jn(e, Ym)) == null ? void 0 : n.locals) == null ? void 0 : i.get(t); + if (c) + return c.exportSymbol ?? c; + if (Ei(e) && e.jsGlobalAugmentations && e.jsGlobalAugmentations.has(t)) + return e.jsGlobalAugmentations.get(t); + if (bd(e)) + return (o = (s = e.symbol) == null ? void 0 : s.exports) == null ? void 0 : o.get(t); + } + function nne(e, t, n, i, s, o, c, _, u, m) { + return g; + function g(h = () => !0) { + const S = [], T = []; + return { + walkType: (_e) => { + try { + return C(_e), { visitedTypes: GT(S), visitedSymbols: GT(T) }; + } finally { + Ep(S), Ep(T); + } + }, + walkSymbol: (_e) => { + try { + return U(_e), { visitedTypes: GT(S), visitedSymbols: GT(T) }; + } finally { + Ep(S), Ep(T); + } + } + }; + function C(_e) { + if (!(!_e || S[_e.id] || (S[_e.id] = _e, U(_e.symbol)))) { + if (_e.flags & 524288) { + const J = _e, re = J.objectFlags; + re & 4 && D(_e), re & 32 && R(_e), re & 3 && V(_e), re & 24 && $(J); + } + _e.flags & 262144 && w(_e), _e.flags & 3145728 && A(_e), _e.flags & 4194304 && O(_e), _e.flags & 8388608 && F(_e); + } + } + function D(_e) { + C(_e.target), lr(m(_e), C); + } + function w(_e) { + C(_(_e)); + } + function A(_e) { + lr(_e.types, C); + } + function O(_e) { + C(_e.type); + } + function F(_e) { + C(_e.objectType), C(_e.indexType), C(_e.constraint); + } + function R(_e) { + C(_e.typeParameter), C(_e.constraintType), C(_e.templateType), C(_e.modifiersType); + } + function W(_e) { + const Z = t(_e); + Z && C(Z.type), lr(_e.typeParameters, C); + for (const J of _e.parameters) + U(J); + C(e(_e)), C(n(_e)); + } + function V(_e) { + $(_e), lr(_e.typeParameters, C), lr(i(_e), C), C(_e.thisType); + } + function $(_e) { + const Z = s(_e); + for (const J of Z.indexInfos) + C(J.keyType), C(J.type); + for (const J of Z.callSignatures) + W(J); + for (const J of Z.constructSignatures) + W(J); + for (const J of Z.properties) + U(J); + } + function U(_e) { + if (!_e) + return !1; + const Z = Zs(_e); + if (T[Z]) + return !1; + if (T[Z] = _e, !h(_e)) + return !0; + const J = o(_e); + return C(J), _e.exports && _e.exports.forEach(U), lr(_e.declarations, (re) => { + if (re.type && re.type.kind === 186) { + const te = re.type, ie = c(u(te.exprName)); + U(ie); + } + }), !1; + } + } + } + var Bh = {}; + Ec(Bh, { + RelativePreference: () => t1e, + countPathComponents: () => lO, + forEachFileNameOfModule: () => o1e, + getLocalModuleSpecifierBetweenFileNames: () => JMe, + getModuleSpecifier: () => RMe, + getModuleSpecifierPreferences: () => WN, + getModuleSpecifiers: () => i1e, + getModuleSpecifiersWithCacheInfo: () => s1e, + getNodeModulesPackageName: () => jMe, + tryGetJSExtensionForFile: () => oW, + tryGetModuleSpecifiersFromCache: () => BMe, + tryGetRealFileNameForNonJsDeclarationFileName: () => f1e, + updateModuleSpecifier: () => MMe + }); + var LMe = Kd((e) => { + try { + let t = e.indexOf("/"); + if (t !== 0) + return new RegExp(e); + const n = e.lastIndexOf("/"); + if (t === n) + return new RegExp(e); + for (; (t = e.indexOf("/", t + 1)) !== n; ) + if (e[t - 1] !== "\\") + return new RegExp(e); + const i = e.substring(n + 1).replace(/[^iu]/g, ""); + return e = e.substring(1, n), new RegExp(e, i); + } catch { + return; + } + }), t1e = /* @__PURE__ */ ((e) => (e[e.Relative = 0] = "Relative", e[e.NonRelative = 1] = "NonRelative", e[e.Shortest = 2] = "Shortest", e[e.ExternalNonRelative = 3] = "ExternalNonRelative", e))(t1e || {}); + function WN({ importModuleSpecifierPreference: e, importModuleSpecifierEnding: t, autoImportSpecifierExcludeRegexes: n }, i, s, o, c) { + const _ = u(); + return { + excludeRegexes: n, + relativePreference: c !== void 0 ? vl(c) ? 0 : 1 : e === "relative" ? 0 : e === "non-relative" ? 1 : e === "project-relative" ? 3 : 2, + getAllowedEndingsInPreferredOrder: (m) => { + const g = cW(o, i, s), h = m !== g ? u(m) : _, S = Su(s); + if ((m ?? g) === 99 && 3 <= S && S <= 99) + return b6(s, o.fileName) ? [ + 3, + 2 + /* JsExtension */ + ] : [ + 2 + /* JsExtension */ + ]; + if (Su(s) === 1) + return h === 2 ? [ + 2, + 1 + /* Index */ + ] : [ + 1, + 2 + /* JsExtension */ + ]; + const T = b6(s, o.fileName); + switch (h) { + case 2: + return T ? [ + 2, + 3, + 0, + 1 + /* Index */ + ] : [ + 2, + 0, + 1 + /* Index */ + ]; + case 3: + return [ + 3, + 0, + 2, + 1 + /* Index */ + ]; + case 1: + return T ? [ + 1, + 0, + 3, + 2 + /* JsExtension */ + ] : [ + 1, + 0, + 2 + /* JsExtension */ + ]; + case 0: + return T ? [ + 0, + 1, + 3, + 2 + /* JsExtension */ + ] : [ + 0, + 1, + 2 + /* JsExtension */ + ]; + default: + E.assertNever(h); + } + } + }; + function u(m) { + if (c !== void 0) { + if (Gg(c)) return 2; + if (Eo(c, "/index")) return 1; + } + return Tee( + t, + m ?? cW(o, i, s), + s, + zg(o) ? o : void 0 + ); + } + } + function MMe(e, t, n, i, s, o, c = {}) { + const _ = r1e(e, t, n, i, s, WN({}, s, e, t, o), {}, c); + if (_ !== o) + return _; + } + function RMe(e, t, n, i, s, o = {}) { + return r1e(e, t, n, i, s, WN({}, s, e, t), {}, o); + } + function jMe(e, t, n, i, s, o = {}) { + const c = cO(t.fileName, i), _ = c1e(c, n, i, s, e, o); + return Dc(_, (u) => ane( + u, + c, + t, + i, + e, + s, + /*packageNameOnly*/ + !0, + o.overrideImportMode + )); + } + function r1e(e, t, n, i, s, o, c, _ = {}) { + const u = cO(n, s), m = c1e(u, i, s, c, e, _); + return Dc(m, (g) => ane( + g, + u, + t, + s, + e, + c, + /*packageNameOnly*/ + void 0, + _.overrideImportMode + )) || ine(i, u, e, s, _.overrideImportMode || cW(t, s, e), o); + } + function BMe(e, t, n, i, s = {}) { + const o = n1e( + e, + t, + n, + i, + s + ); + return o[1] && { kind: o[0], moduleSpecifiers: o[1], computedWithoutCache: !1 }; + } + function n1e(e, t, n, i, s = {}) { + var o; + const c = $P(e); + if (!c) + return He; + const _ = (o = n.getModuleSpecifierCache) == null ? void 0 : o.call(n), u = _?.get(t.path, c.path, i, s); + return [u?.kind, u?.moduleSpecifiers, c, u?.modulePaths, _]; + } + function i1e(e, t, n, i, s, o, c = {}) { + return s1e( + e, + t, + n, + i, + s, + o, + c, + /*forAutoImport*/ + !1 + ).moduleSpecifiers; + } + function s1e(e, t, n, i, s, o, c = {}, _) { + let u = !1; + const m = qMe(e, t); + if (m) + return { + kind: "ambient", + moduleSpecifiers: _ && oO(m, o.autoImportSpecifierExcludeRegexes) ? He : [m], + computedWithoutCache: u + }; + let [g, h, S, T, C] = n1e( + e, + i, + s, + o, + c + ); + if (h) return { kind: g, moduleSpecifiers: h, computedWithoutCache: u }; + if (!S) return { kind: void 0, moduleSpecifiers: He, computedWithoutCache: u }; + u = !0, T || (T = l1e(cO(i.fileName, s), S.originalFileName, s, n, c)); + const D = zMe( + T, + n, + i, + s, + o, + c, + _ + ); + return C?.set(i.path, S.path, o, c, D.kind, T, D.moduleSpecifiers), D; + } + function JMe(e, t, n, i, s, o = {}) { + const c = cO(e.fileName, i), _ = o.overrideImportMode ?? e.impliedNodeFormat; + return ine( + t, + c, + n, + i, + _, + WN(s, i, n, e) + ); + } + function zMe(e, t, n, i, s, o = {}, c) { + const _ = cO(n.fileName, i), u = WN(s, i, t, n), m = zg(n) && lr(e, (D) => lr( + i.getFileIncludeReasons().get(oo(D.path, i.getCurrentDirectory(), _.getCanonicalFileName)), + (w) => { + if (w.kind !== 3 || w.file !== n.path) return; + const A = i.getModeForResolutionAtIndex(n, w.index), O = o.overrideImportMode ?? i.getDefaultResolutionModeForFile(n); + if (A !== O && A !== void 0 && O !== void 0) + return; + const F = sA(n, w.index).text; + return u.relativePreference !== 1 || !lf(F) ? F : void 0; + } + )); + if (m) + return { kind: void 0, moduleSpecifiers: [m], computedWithoutCache: !0 }; + const g = at(e, (D) => D.isInNodeModules); + let h, S, T, C; + for (const D of e) { + const w = D.isInNodeModules ? ane( + D, + _, + n, + i, + t, + s, + /*packageNameOnly*/ + void 0, + o.overrideImportMode + ) : void 0; + if (w && !(c && oO(w, u.excludeRegexes)) && (h = Pr(h, w), D.isRedirect)) + return { kind: "node_modules", moduleSpecifiers: h, computedWithoutCache: !0 }; + const A = ine( + D.path, + _, + t, + i, + o.overrideImportMode || n.impliedNodeFormat, + u, + /*pathsOnly*/ + D.isRedirect || !!w + ); + !A || c && oO(A, u.excludeRegexes) || (D.isRedirect ? T = Pr(T, A) : cj(A) ? c1(A) ? C = Pr(C, A) : S = Pr(S, A) : (c || !g || D.isInNodeModules) && (C = Pr(C, A))); + } + return S?.length ? { kind: "paths", moduleSpecifiers: S, computedWithoutCache: !0 } : T?.length ? { kind: "redirect", moduleSpecifiers: T, computedWithoutCache: !0 } : h?.length ? { kind: "node_modules", moduleSpecifiers: h, computedWithoutCache: !0 } : { kind: "relative", moduleSpecifiers: C ?? He, computedWithoutCache: !0 }; + } + function oO(e, t) { + return at(t, (n) => { + var i; + return !!((i = LMe(n)) != null && i.test(e)); + }); + } + function cO(e, t) { + e = Xi(e, t.getCurrentDirectory()); + const n = Wl(t.useCaseSensitiveFileNames ? t.useCaseSensitiveFileNames() : !0), i = Hn(e); + return { + getCanonicalFileName: n, + importingSourceFileName: e, + sourceDirectory: i, + canonicalSourceDirectory: n(i) + }; + } + function ine(e, t, n, i, s, { getAllowedEndingsInPreferredOrder: o, relativePreference: c, excludeRegexes: _ }, u) { + const { baseUrl: m, paths: g, rootDirs: h } = n; + if (u && !g) + return; + const { sourceDirectory: S, canonicalSourceDirectory: T, getCanonicalFileName: C } = t, D = o(s), w = h && $Me(h, e, S, C, D, n) || UN(iS(Df(S, e, C)), D, n); + if (!m && !g && !G3(n) || c === 0) + return u ? void 0 : w; + const A = Xi(u5(n, i) || m, i.getCurrentDirectory()), O = one(e, A, C); + if (!O) + return u ? void 0 : w; + const F = u ? void 0 : GMe( + e, + S, + n, + i, + s, + QMe(D) + ), R = u || F === void 0 ? g && u1e(O, g, D, A, C, i, n) : void 0; + if (u) + return R; + const W = F ?? (R === void 0 && m !== void 0 ? UN(O, D, n) : R); + if (!W) + return w; + const V = oO(w, _), $ = oO(W, _); + if (!V && $) + return w; + if (V && !$ || c === 1 && !lf(W)) + return W; + if (c === 3 && !lf(W)) { + const U = n.configFilePath ? oo(Hn(n.configFilePath), i.getCurrentDirectory(), t.getCanonicalFileName) : t.getCanonicalFileName(i.getCurrentDirectory()), _e = oo(e, U, C), Z = Vi(T, U), J = Vi(_e, U); + if (Z && !J || !Z && J) + return W; + const re = sne(i, Hn(_e)), te = sne(i, S), ie = !xS(i); + return WMe(re, te, ie) ? w : W; + } + return p1e(W) || lO(w) < lO(W) ? w : W; + } + function WMe(e, t, n) { + return e === t ? !0 : e === void 0 || t === void 0 ? !1 : xh(e, t, n) === 0; + } + function lO(e) { + let t = 0; + for (let n = Vi(e, "./") ? 2 : 0; n < e.length; n++) + e.charCodeAt(n) === 47 && t++; + return t; + } + function a1e(e, t) { + return $1(t.isRedirect, e.isRedirect) || K3(e.path, t.path); + } + function sne(e, t) { + return e.getNearestAncestorDirectoryWithPackageJson ? e.getNearestAncestorDirectoryWithPackageJson(t) : sg( + e, + t, + (n) => e.fileExists(Ln(n, "package.json")) ? n : void 0 + ); + } + function o1e(e, t, n, i, s) { + var o; + const c = Nh(n), _ = n.getCurrentDirectory(), u = n.isSourceOfProjectReferenceRedirect(t) ? n.getProjectReferenceRedirect(t) : void 0, m = oo(t, _, c), g = n.redirectTargetsMap.get(m) || He, S = [...u ? [u] : He, t, ...g].map((A) => Xi(A, _)); + let T = !Ri(S, cD); + if (!i) { + const A = lr(S, (O) => !(T && cD(O)) && s(O, u === O)); + if (A) return A; + } + const C = (o = n.getSymlinkCache) == null ? void 0 : o.call(n).getSymlinkedDirectoriesByRealpath(), D = Xi(t, _); + return C && sg( + n, + Hn(D), + (A) => { + const O = C.get(il(oo(A, _, c))); + if (O) + return _j(e, A, c) ? !1 : lr(S, (F) => { + if (!_j(F, A, c)) + return; + const R = Df(A, F, c); + for (const W of O) { + const V = Iy(W, R), $ = s(V, F === u); + if (T = !0, $) return $; + } + }); + } + ) || (i ? lr(S, (A) => T && cD(A) ? void 0 : s(A, A === u)) : void 0); + } + function c1e(e, t, n, i, s, o = {}) { + var c; + const _ = oo(e.importingSourceFileName, n.getCurrentDirectory(), Nh(n)), u = oo(t, n.getCurrentDirectory(), Nh(n)), m = (c = n.getModuleSpecifierCache) == null ? void 0 : c.call(n); + if (m) { + const h = m.get(_, u, i, o); + if (h?.modulePaths) return h.modulePaths; + } + const g = l1e(e, t, n, s, o); + return m && m.setModulePaths(_, u, i, o, g), g; + } + var UMe = ["dependencies", "peerDependencies", "optionalDependencies"]; + function VMe(e) { + let t; + for (const n of UMe) { + const i = e[n]; + i && typeof i == "object" && (t = Wi(t, Zd(i))); + } + return t; + } + function l1e(e, t, n, i, s) { + var o, c; + const _ = (o = n.getModuleResolutionCache) == null ? void 0 : o.call(n), u = (c = n.getSymlinkCache) == null ? void 0 : c.call(n); + if (_ && u && n.readFile && !c1(e.importingSourceFileName)) { + E.type(n); + const h = RD(_.getPackageJsonInfoCache(), n, {}), S = jD(Hn(e.importingSourceFileName), h); + if (S) { + const T = VMe(S.contents.packageJsonContent); + for (const C of T || He) { + const D = WS( + C, + Ln(S.packageDirectory, "package.json"), + i, + n, + _, + /*redirectedReference*/ + void 0, + s.overrideImportMode + ); + u.setSymlinksFromResolution(D.resolvedModule); + } + } + } + const m = /* @__PURE__ */ new Map(); + o1e( + e.importingSourceFileName, + t, + n, + /*preferSymlinks*/ + !0, + (h, S) => { + const T = c1(h); + m.set(h, { path: e.getCanonicalFileName(h), isRedirect: S, isInNodeModules: T }); + } + ); + const g = []; + for (let h = e.canonicalSourceDirectory; m.size !== 0; ) { + const S = il(h); + let T; + m.forEach(({ path: D, isRedirect: w, isInNodeModules: A }, O) => { + Vi(D, S) && ((T || (T = [])).push({ path: O, isRedirect: w, isInNodeModules: A }), m.delete(O)); + }), T && (T.length > 1 && T.sort(a1e), g.push(...T)); + const C = Hn(h); + if (C === h) break; + h = C; + } + if (m.size) { + const h = Ki( + m.entries(), + ([S, { isRedirect: T, isInNodeModules: C }]) => ({ path: S, isRedirect: T, isInNodeModules: C }) + ); + h.length > 1 && h.sort(a1e), g.push(...h); + } + return g; + } + function qMe(e, t) { + var n; + const i = (n = e.declarations) == null ? void 0 : n.find( + (c) => Kj(c) && (!Pb(c) || !vl(rp(c.name))) + ); + if (i) + return i.name.text; + const o = Li(e.declarations, (c) => { + var _, u, m, g; + if (!Lc(c)) return; + const h = D(c); + if (!((_ = h?.parent) != null && _.parent && dm(h.parent) && Ou(h.parent.parent) && Ei(h.parent.parent.parent))) return; + const S = (g = (m = (u = h.parent.parent.symbol.exports) == null ? void 0 : u.get("export=")) == null ? void 0 : m.valueDeclaration) == null ? void 0 : g.expression; + if (!S) return; + const T = t.getSymbolAtLocation(S); + if (!T) return; + if ((T?.flags & 2097152 ? t.getAliasedSymbol(T) : T) === c.symbol) return h.parent.parent; + function D(w) { + for (; w.flags & 8; ) + w = w.parent; + return w; + } + })[0]; + if (o) + return o.name.text; + } + function u1e(e, t, n, i, s, o, c) { + for (const u in t) + for (const m of t[u]) { + const g = Hs(m), h = one(g, i, s) ?? g, S = h.indexOf("*"), T = n.map((C) => ({ + ending: C, + value: UN(e, [C], c) + })); + if ($g(h) && T.push({ ending: void 0, value: e }), S !== -1) { + const C = h.substring(0, S), D = h.substring(S + 1); + for (const { ending: w, value: A } of T) + if (A.length >= C.length + D.length && Vi(A, C) && Eo(A, D) && _({ ending: w, value: A })) { + const O = A.substring(C.length, A.length - D.length); + if (!lf(O)) + return DS(u, O); + } + } else if (at(T, (C) => C.ending !== 0 && h === C.value) || at(T, (C) => C.ending === 0 && h === C.value && _(C))) + return u; + } + function _({ ending: u, value: m }) { + return u !== 0 || m === UN(e, [u], c, o); + } + } + function uO(e, t, n, i, s, o, c, _, u, m) { + if (typeof o == "string") { + const g = !xS(t), h = () => t.getCommonSourceDirectory(), S = u && MW(n, e, g, h), T = u && LW(n, e, g, h), C = Xi( + Ln(i, o), + /*currentDirectory*/ + void 0 + ), D = ES(n) ? $u(n) + oW(n, e) : void 0, w = m && bee(n); + switch (_) { + case 0: + if (D && xh(D, C, g) === 0 || xh(n, C, g) === 0 || S && xh(S, C, g) === 0 || T && xh(T, C, g) === 0) + return { moduleFileToTry: s }; + break; + case 1: + if (w && Zf(n, C, g)) { + const R = Df( + C, + n, + /*ignoreCase*/ + !1 + ); + return { moduleFileToTry: Xi( + Ln(Ln(s, o), R), + /*currentDirectory*/ + void 0 + ) }; + } + if (D && Zf(C, D, g)) { + const R = Df( + C, + D, + /*ignoreCase*/ + !1 + ); + return { moduleFileToTry: Xi( + Ln(Ln(s, o), R), + /*currentDirectory*/ + void 0 + ) }; + } + if (!w && Zf(C, n, g)) { + const R = Df( + C, + n, + /*ignoreCase*/ + !1 + ); + return { moduleFileToTry: Xi( + Ln(Ln(s, o), R), + /*currentDirectory*/ + void 0 + ) }; + } + if (S && Zf(C, S, g)) { + const R = Df( + C, + S, + /*ignoreCase*/ + !1 + ); + return { moduleFileToTry: Ln(s, R) }; + } + if (T && Zf(C, T, g)) { + const R = $I(Df( + C, + T, + /*ignoreCase*/ + !1 + ), aW(T, e)); + return { moduleFileToTry: Ln(s, R) }; + } + break; + case 2: + const A = C.indexOf("*"), O = C.slice(0, A), F = C.slice(A + 1); + if (w && Vi(n, O, g) && Eo(n, F, g)) { + const R = n.slice(O.length, n.length - F.length); + return { moduleFileToTry: DS(s, R) }; + } + if (D && Vi(D, O, g) && Eo(D, F, g)) { + const R = D.slice(O.length, D.length - F.length); + return { moduleFileToTry: DS(s, R) }; + } + if (!w && Vi(n, O, g) && Eo(n, F, g)) { + const R = n.slice(O.length, n.length - F.length); + return { moduleFileToTry: DS(s, R) }; + } + if (S && Vi(S, O, g) && Eo(S, F, g)) { + const R = S.slice(O.length, S.length - F.length); + return { moduleFileToTry: DS(s, R) }; + } + if (T && Vi(T, O, g) && Eo(T, F, g)) { + const R = T.slice(O.length, T.length - F.length), W = DS(s, R), V = oW(T, e); + return V ? { moduleFileToTry: $I(W, V) } : void 0; + } + break; + } + } else { + if (Array.isArray(o)) + return lr(o, (g) => uO(e, t, n, i, s, g, c, _, u, m)); + if (typeof o == "object" && o !== null) { + for (const g of Zd(o)) + if (g === "default" || c.indexOf(g) >= 0 || JN(c, g)) { + const h = o[g], S = uO(e, t, n, i, s, h, c, _, u, m); + if (S) + return S; + } + } + } + } + function HMe(e, t, n, i, s, o, c) { + return typeof o == "object" && o !== null && !Array.isArray(o) && iO(o) ? lr(Zd(o), (_) => { + const u = Xi( + Ln(s, _), + /*currentDirectory*/ + void 0 + ), m = Eo(_, "/") ? 1 : _.includes("*") ? 2 : 0; + return uO( + e, + t, + n, + i, + u, + o[_], + c, + m, + /*isImports*/ + !1, + /*preferTsExtension*/ + !1 + ); + }) : uO( + e, + t, + n, + i, + s, + o, + c, + 0, + /*isImports*/ + !1, + /*preferTsExtension*/ + !1 + ); + } + function GMe(e, t, n, i, s, o) { + var c, _, u; + if (!i.readFile || !G3(n)) + return; + const m = sne(i, t); + if (!m) + return; + const g = Ln(m, "package.json"), h = (_ = (c = i.getPackageJsonInfoCache) == null ? void 0 : c.call(i)) == null ? void 0 : _.getPackageJsonInfo(g); + if (Jre(h) || !i.fileExists(g)) + return; + const S = h?.contents.packageJsonContent || b5(i.readFile(g)), T = S?.imports; + if (!T) + return; + const C = o1(n, s); + return (u = lr(Zd(T), (D) => { + if (!Vi(D, "#") || D === "#" || Vi(D, "#/")) return; + const w = Eo(D, "/") ? 1 : D.includes("*") ? 2 : 0; + return uO( + n, + i, + e, + m, + D, + T[D], + C, + w, + /*isImports*/ + !0, + o + ); + })) == null ? void 0 : u.moduleFileToTry; + } + function $Me(e, t, n, i, s, o) { + const c = _1e(t, e, i); + if (c === void 0) + return; + const _ = _1e(n, e, i), u = na(_, (g) => gr(c, (h) => iS(Df(g, h, i)))), m = PR(u, K3); + if (m) + return UN(m, s, o); + } + function ane({ path: e, isRedirect: t }, { getCanonicalFileName: n, canonicalSourceDirectory: i }, s, o, c, _, u, m) { + if (!o.fileExists || !o.readFile) + return; + const g = $5(e); + if (!g) + return; + const S = WN(_, o, c, s).getAllowedEndingsInPreferredOrder(); + let T = e, C = !1; + if (!u) { + let R = g.packageRootIndex, W; + for (; ; ) { + const { moduleFileToTry: V, packageRootPath: $, blockedByExports: U, verbatimFromExports: _e } = F(R); + if (Su(c) !== 1) { + if (U) + return; + if (_e) + return V; + } + if ($) { + T = $, C = !0; + break; + } + if (W || (W = V), R = e.indexOf(jo, R + 1), R === -1) { + T = UN(W, S, c, o); + break; + } + } + } + if (t && !C) + return; + const D = o.getGlobalTypingsCacheLocation && o.getGlobalTypingsCacheLocation(), w = n(T.substring(0, g.topLevelNodeModulesIndex)); + if (!(Vi(i, w) || D && Vi(n(D), w))) + return; + const A = T.substring(g.topLevelPackageNameIndex + 1), O = BD(A); + return Su(c) === 1 && O === A ? void 0 : O; + function F(R) { + var W, V; + const $ = e.substring(0, R), U = Ln($, "package.json"); + let _e = e, Z = !1; + const J = (V = (W = o.getPackageJsonInfoCache) == null ? void 0 : W.call(o)) == null ? void 0 : V.getPackageJsonInfo(U); + if (KF(J) || J === void 0 && o.fileExists(U)) { + const re = J?.contents.packageJsonContent || b5(o.readFile(U)), te = m || cW(s, o, c); + if (H3(c)) { + const Te = $.substring(g.topLevelPackageNameIndex + 1), q = BD(Te), me = o1(c, te), Ce = re?.exports ? HMe( + c, + o, + e, + $, + q, + re.exports, + me + ) : void 0; + if (Ce) + return { ...Ce, verbatimFromExports: !0 }; + if (re?.exports) + return { moduleFileToTry: e, blockedByExports: !0 }; + } + const ie = re?.typesVersions ? YF(re.typesVersions) : void 0; + if (ie) { + const Te = e.slice($.length + 1), q = u1e( + Te, + ie.paths, + S, + $, + n, + o, + c + ); + q === void 0 ? Z = !0 : _e = Ln($, q); + } + const le = re?.typings || re?.types || re?.main || "index.js"; + if (rs(le) && !(Z && kJ(tN(ie.paths), le))) { + const Te = oo(le, $, n), q = n(_e); + if ($u(Te) === $u(q)) + return { packageRootPath: $, moduleFileToTry: _e }; + if (re?.type !== "module" && !vc(q, W5) && Vi(q, Te) && Hn(q) === X1(Te) && $u(Vc(q)) === "index") + return { packageRootPath: $, moduleFileToTry: _e }; + } + } else { + const re = n(_e.substring(g.packageRootIndex + 1)); + if (re === "index.d.ts" || re === "index.js" || re === "index.ts" || re === "index.tsx") + return { moduleFileToTry: _e, packageRootPath: $ }; + } + return { moduleFileToTry: _e }; + } + } + function XMe(e, t) { + if (!e.fileExists) return; + const n = Dp(tD({ allowJs: !0 }, [{ extension: "node", isMixedContent: !1 }, { + extension: "json", + isMixedContent: !1, + scriptKind: 6 + /* JSON */ + }])); + for (const i of n) { + const s = t + i; + if (e.fileExists(s)) + return s; + } + } + function _1e(e, t, n) { + return Li(t, (i) => { + const s = one(e, i, n); + return s !== void 0 && p1e(s) ? void 0 : s; + }); + } + function UN(e, t, n, i) { + if (vc(e, [ + ".json", + ".mjs", + ".cjs" + /* Cjs */ + ])) + return e; + const s = $u(e); + if (e === s) + return e; + const o = t.indexOf( + 2 + /* JsExtension */ + ), c = t.indexOf( + 3 + /* TsExtension */ + ); + if (vc(e, [ + ".mts", + ".cts" + /* Cts */ + ]) && c !== -1 && c < o) + return e; + if (vc(e, [ + ".d.mts", + ".mts", + ".d.cts", + ".cts" + /* Cts */ + ])) + return s + aW(e, n); + if (!vc(e, [ + ".d.ts" + /* Dts */ + ]) && vc(e, [ + ".ts" + /* Ts */ + ]) && e.includes(".d.")) + return f1e(e); + switch (t[0]) { + case 0: + const _ = lC(s, "/index"); + return i && _ !== s && XMe(i, _) ? s : _; + case 1: + return s; + case 2: + return s + aW(e, n); + case 3: + if (fl(e)) { + const u = t.findIndex( + (m) => m === 0 || m === 1 + /* Index */ + ); + return u !== -1 && u < o ? s : s + aW(e, n); + } + return e; + default: + return E.assertNever(t[0]); + } + } + function f1e(e) { + const t = Vc(e); + if (!Eo( + e, + ".ts" + /* Ts */ + ) || !t.includes(".d.") || vc(t, [ + ".d.ts" + /* Dts */ + ])) return; + const n = eN( + e, + ".ts" + /* Ts */ + ), i = n.substring(n.lastIndexOf(".")); + return n.substring(0, n.indexOf(".d.")) + i; + } + function aW(e, t) { + return oW(e, t) ?? E.fail(`Extension ${nD(e)} is unsupported:: FileName:: ${e}`); + } + function oW(e, t) { + const n = $g(e); + switch (n) { + case ".ts": + case ".d.ts": + return ".js"; + case ".tsx": + return t.jsx === 1 ? ".jsx" : ".js"; + case ".js": + case ".jsx": + case ".json": + return n; + case ".d.mts": + case ".mts": + case ".mjs": + return ".mjs"; + case ".d.cts": + case ".cts": + case ".cjs": + return ".cjs"; + default: + return; + } + } + function one(e, t, n) { + const i = KT( + t, + e, + t, + n, + /*isAbsolutePathAnUrl*/ + !1 + ); + return q_(i) ? void 0 : i; + } + function p1e(e) { + return Vi(e, ".."); + } + function cW(e, t, n) { + return zg(e) ? t.getDefaultResolutionModeForFile(e) : IO(e, n); + } + function QMe(e) { + const t = e.indexOf( + 3 + /* TsExtension */ + ); + return t > -1 && t < e.indexOf( + 2 + /* JsExtension */ + ); + } + var cne = /^".+"$/, lW = "(anonymous)", d1e = 1, m1e = 1, g1e = 1, h1e = 1, uW = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.TypeofEQString = 1] = "TypeofEQString", e[e.TypeofEQNumber = 2] = "TypeofEQNumber", e[e.TypeofEQBigInt = 4] = "TypeofEQBigInt", e[e.TypeofEQBoolean = 8] = "TypeofEQBoolean", e[e.TypeofEQSymbol = 16] = "TypeofEQSymbol", e[e.TypeofEQObject = 32] = "TypeofEQObject", e[e.TypeofEQFunction = 64] = "TypeofEQFunction", e[e.TypeofEQHostObject = 128] = "TypeofEQHostObject", e[e.TypeofNEString = 256] = "TypeofNEString", e[e.TypeofNENumber = 512] = "TypeofNENumber", e[e.TypeofNEBigInt = 1024] = "TypeofNEBigInt", e[e.TypeofNEBoolean = 2048] = "TypeofNEBoolean", e[e.TypeofNESymbol = 4096] = "TypeofNESymbol", e[e.TypeofNEObject = 8192] = "TypeofNEObject", e[e.TypeofNEFunction = 16384] = "TypeofNEFunction", e[e.TypeofNEHostObject = 32768] = "TypeofNEHostObject", e[e.EQUndefined = 65536] = "EQUndefined", e[e.EQNull = 131072] = "EQNull", e[e.EQUndefinedOrNull = 262144] = "EQUndefinedOrNull", e[e.NEUndefined = 524288] = "NEUndefined", e[e.NENull = 1048576] = "NENull", e[e.NEUndefinedOrNull = 2097152] = "NEUndefinedOrNull", e[e.Truthy = 4194304] = "Truthy", e[e.Falsy = 8388608] = "Falsy", e[e.IsUndefined = 16777216] = "IsUndefined", e[e.IsNull = 33554432] = "IsNull", e[e.IsUndefinedOrNull = 50331648] = "IsUndefinedOrNull", e[e.All = 134217727] = "All", e[e.BaseStringStrictFacts = 3735041] = "BaseStringStrictFacts", e[e.BaseStringFacts = 12582401] = "BaseStringFacts", e[e.StringStrictFacts = 16317953] = "StringStrictFacts", e[e.StringFacts = 16776705] = "StringFacts", e[e.EmptyStringStrictFacts = 12123649] = "EmptyStringStrictFacts", e[ + e.EmptyStringFacts = 12582401 + /* BaseStringFacts */ + ] = "EmptyStringFacts", e[e.NonEmptyStringStrictFacts = 7929345] = "NonEmptyStringStrictFacts", e[e.NonEmptyStringFacts = 16776705] = "NonEmptyStringFacts", e[e.BaseNumberStrictFacts = 3734786] = "BaseNumberStrictFacts", e[e.BaseNumberFacts = 12582146] = "BaseNumberFacts", e[e.NumberStrictFacts = 16317698] = "NumberStrictFacts", e[e.NumberFacts = 16776450] = "NumberFacts", e[e.ZeroNumberStrictFacts = 12123394] = "ZeroNumberStrictFacts", e[ + e.ZeroNumberFacts = 12582146 + /* BaseNumberFacts */ + ] = "ZeroNumberFacts", e[e.NonZeroNumberStrictFacts = 7929090] = "NonZeroNumberStrictFacts", e[e.NonZeroNumberFacts = 16776450] = "NonZeroNumberFacts", e[e.BaseBigIntStrictFacts = 3734276] = "BaseBigIntStrictFacts", e[e.BaseBigIntFacts = 12581636] = "BaseBigIntFacts", e[e.BigIntStrictFacts = 16317188] = "BigIntStrictFacts", e[e.BigIntFacts = 16775940] = "BigIntFacts", e[e.ZeroBigIntStrictFacts = 12122884] = "ZeroBigIntStrictFacts", e[ + e.ZeroBigIntFacts = 12581636 + /* BaseBigIntFacts */ + ] = "ZeroBigIntFacts", e[e.NonZeroBigIntStrictFacts = 7928580] = "NonZeroBigIntStrictFacts", e[e.NonZeroBigIntFacts = 16775940] = "NonZeroBigIntFacts", e[e.BaseBooleanStrictFacts = 3733256] = "BaseBooleanStrictFacts", e[e.BaseBooleanFacts = 12580616] = "BaseBooleanFacts", e[e.BooleanStrictFacts = 16316168] = "BooleanStrictFacts", e[e.BooleanFacts = 16774920] = "BooleanFacts", e[e.FalseStrictFacts = 12121864] = "FalseStrictFacts", e[ + e.FalseFacts = 12580616 + /* BaseBooleanFacts */ + ] = "FalseFacts", e[e.TrueStrictFacts = 7927560] = "TrueStrictFacts", e[e.TrueFacts = 16774920] = "TrueFacts", e[e.SymbolStrictFacts = 7925520] = "SymbolStrictFacts", e[e.SymbolFacts = 16772880] = "SymbolFacts", e[e.ObjectStrictFacts = 7888800] = "ObjectStrictFacts", e[e.ObjectFacts = 16736160] = "ObjectFacts", e[e.FunctionStrictFacts = 7880640] = "FunctionStrictFacts", e[e.FunctionFacts = 16728e3] = "FunctionFacts", e[e.VoidFacts = 9830144] = "VoidFacts", e[e.UndefinedFacts = 26607360] = "UndefinedFacts", e[e.NullFacts = 42917664] = "NullFacts", e[e.EmptyObjectStrictFacts = 83427327] = "EmptyObjectStrictFacts", e[e.EmptyObjectFacts = 83886079] = "EmptyObjectFacts", e[e.UnknownFacts = 83886079] = "UnknownFacts", e[e.AllTypeofNE = 556800] = "AllTypeofNE", e[e.OrFactsMask = 8256] = "OrFactsMask", e[e.AndFactsMask = 134209471] = "AndFactsMask", e))(uW || {}), lne = new Map(Object.entries({ + string: 256, + number: 512, + bigint: 1024, + boolean: 2048, + symbol: 4096, + undefined: 524288, + object: 8192, + function: 16384 + /* TypeofNEFunction */ + })), _W = /* @__PURE__ */ ((e) => (e[e.Normal = 0] = "Normal", e[e.Contextual = 1] = "Contextual", e[e.Inferential = 2] = "Inferential", e[e.SkipContextSensitive = 4] = "SkipContextSensitive", e[e.SkipGenericFunctions = 8] = "SkipGenericFunctions", e[e.IsForSignatureHelp = 16] = "IsForSignatureHelp", e[e.RestBindingElement = 32] = "RestBindingElement", e[e.TypeOnly = 64] = "TypeOnly", e))(_W || {}), fW = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.BivariantCallback = 1] = "BivariantCallback", e[e.StrictCallback = 2] = "StrictCallback", e[e.IgnoreReturnTypes = 4] = "IgnoreReturnTypes", e[e.StrictArity = 8] = "StrictArity", e[e.StrictTopSignature = 16] = "StrictTopSignature", e[e.Callback = 3] = "Callback", e))(fW || {}), YMe = RI(v1e, KMe), pW = new Map(Object.entries({ + Uppercase: 0, + Lowercase: 1, + Capitalize: 2, + Uncapitalize: 3, + NoInfer: 4 + /* NoInfer */ + })), y1e = class { + }; + function ZMe() { + this.flags = 0; + } + function Aa(e) { + return e.id || (e.id = m1e, m1e++), e.id; + } + function Zs(e) { + return e.id || (e.id = d1e, d1e++), e.id; + } + function dW(e, t) { + const n = jh(e); + return n === 1 || t && n === 2; + } + function une(e) { + var t = [], n = (r) => { + t.push(r); + }, i, s, o = $l.getSymbolConstructor(), c = $l.getTypeConstructor(), _ = $l.getSignatureConstructor(), u = 0, m = 0, g = 0, h = 0, S = 0, T = 0, C, D, w = !1, A = Us(), O = [ + 1 + /* Covariant */ + ], F = e.getCompilerOptions(), R = pa(F), W = Ru(F), V = !!F.experimentalDecorators, $ = $3(F), U = pJ(F), _e = wx(F), Z = lu(F, "strictNullChecks"), J = lu(F, "strictFunctionTypes"), re = lu(F, "strictBindCallApply"), te = lu(F, "strictPropertyInitialization"), ie = lu(F, "strictBuiltinIteratorReturn"), le = lu(F, "noImplicitAny"), Te = lu(F, "noImplicitThis"), q = lu(F, "useUnknownInCatchVariables"), me = F.exactOptionalPropertyTypes, Ce = !!F.noUncheckedSideEffectImports, Ee = Aot(), oe = f_t(), ke = RL(), ue = dse(F, ke.syntacticBuilderResolver), it = Bee({ + evaluateElementAccessExpression: rut, + evaluateEntityNameExpression: m7e + }), Oe = Us(), xe = ca(4, "undefined"); + xe.declarations = []; + var he = ca( + 1536, + "globalThis", + 8 + /* Readonly */ + ); + he.exports = Oe, he.declarations = [], Oe.set(he.escapedName, he); + var ne = ca(4, "arguments"), Ae = ca(4, "require"), De = F.verbatimModuleSyntax ? "verbatimModuleSyntax" : "isolatedModules", we = !F.verbatimModuleSyntax, Ue, bt, Lt = 0, er, Nr = 0, Dt = MJ({ + compilerOptions: F, + requireSymbol: Ae, + argumentsSymbol: ne, + globals: Oe, + getSymbolOfDeclaration: dn, + error: je, + getRequiresScopeChangeCache: S2, + setRequiresScopeChangeCache: x1, + lookup: fu, + onPropertyWithInvalidInitializer: go, + onFailedToResolveSymbol: T2, + onSuccessfullyResolvedSymbol: Vv + }), Qt = MJ({ + compilerOptions: F, + requireSymbol: Ae, + argumentsSymbol: ne, + globals: Oe, + getSymbolOfDeclaration: dn, + error: je, + getRequiresScopeChangeCache: S2, + setRequiresScopeChangeCache: x1, + lookup: Zst + }); + const Wr = { + getNodeCount: () => qu(e.getSourceFiles(), (r, a) => r + a.nodeCount, 0), + getIdentifierCount: () => qu(e.getSourceFiles(), (r, a) => r + a.identifierCount, 0), + getSymbolCount: () => qu(e.getSourceFiles(), (r, a) => r + a.symbolCount, m), + getTypeCount: () => u, + getInstantiationCount: () => g, + getRelationCacheSizes: () => ({ + assignable: bf.size, + identity: b_.size, + subtype: pg.size, + strictSubtype: Jf.size + }), + isUndefinedSymbol: (r) => r === xe, + isArgumentsSymbol: (r) => r === ne, + isUnknownSymbol: (r) => r === Ve, + getMergedSymbol: Oa, + symbolIsValue: lh, + getDiagnostics: x7e, + getGlobalDiagnostics: Dut, + getRecursionIdentity: f$, + getUnmatchedProperties: Mpe, + getTypeOfSymbolAtLocation: (r, a) => { + const l = ls(a); + return l ? dit(r, l) : We; + }, + getTypeOfSymbol: en, + getSymbolsOfParameterPropertyDeclaration: (r, a) => { + const l = ls(r, Ii); + return l === void 0 ? E.fail("Cannot get symbols of a synthetic parameter that cannot be resolved to a parse-tree node.") : (E.assert(H_(l, l.parent)), ry(l, Zo(a))); + }, + getDeclaredTypeOfSymbol: ko, + getPropertiesOfType: qa, + getPropertyOfType: (r, a) => Ys(r, Zo(a)), + getPrivateIdentifierPropertyOfType: (r, a, l) => { + const f = ls(l); + if (!f) + return; + const d = Zo(a), y = LM(d, f); + return y ? G$(r, y) : void 0; + }, + getTypeOfPropertyOfType: (r, a) => Pc(r, Zo(a)), + getIndexInfoOfType: (r, a) => ph(r, a === 0 ? de : st), + getIndexInfosOfType: du, + getIndexInfosOfIndexSymbol: zG, + getSignaturesOfType: Ps, + getIndexTypeOfType: (r, a) => nb(r, a === 0 ? de : st), + getIndexType: (r) => Bm(r), + getBaseTypes: wo, + getBaseTypeOfLiteralType: _0, + getWidenedType: cf, + getWidenedLiteralType: cb, + fillMissingTypeArguments: fy, + getTypeFromTypeNode: (r) => { + const a = ls(r, fi); + return a ? wi(a) : We; + }, + getParameterType: Gd, + getParameterIdentifierInfoAtPosition: Hat, + getPromisedTypeOfPromise: gI, + getAwaitedType: (r) => tC(r), + getReturnTypeOfSignature: Ba, + isNullableType: OM, + getNullableType: hM, + getNonNullableType: f0, + getNonOptionalType: g$, + getTypeArguments: Po, + typeToTypeNode: ke.typeToTypeNode, + typePredicateToTypePredicateNode: ke.typePredicateToTypePredicateNode, + indexInfoToIndexSignatureDeclaration: ke.indexInfoToIndexSignatureDeclaration, + signatureToSignatureDeclaration: ke.signatureToSignatureDeclaration, + symbolToEntityName: ke.symbolToEntityName, + symbolToExpression: ke.symbolToExpression, + symbolToNode: ke.symbolToNode, + symbolToTypeParameterDeclarations: ke.symbolToTypeParameterDeclarations, + symbolToParameterDeclaration: ke.symbolToParameterDeclaration, + typeParameterToDeclaration: ke.typeParameterToDeclaration, + getSymbolsInScope: (r, a) => { + const l = ls(r); + return l ? wut(l, a) : []; + }, + getSymbolAtLocation: (r) => { + const a = ls(r); + return a ? Cp( + a, + /*ignoreErrors*/ + !0 + ) : void 0; + }, + getIndexInfosAtLocation: (r) => { + const a = ls(r); + return a ? Mut(a) : void 0; + }, + getShorthandAssignmentValueSymbol: (r) => { + const a = ls(r); + return a ? Rut(a) : void 0; + }, + getExportSpecifierLocalTargetSymbol: (r) => { + const a = ls(r, Tu); + return a ? jut(a) : void 0; + }, + getExportSymbolOfSymbol(r) { + return Oa(r.exportSymbol || r); + }, + getTypeAtLocation: (r) => { + const a = ls(r); + return a ? nC(a) : We; + }, + getTypeOfAssignmentPattern: (r) => { + const a = ls(r, S4); + return a && TX(a) || We; + }, + getPropertySymbolOfDestructuringAssignment: (r) => { + const a = ls(r, Me); + return a ? But(a) : void 0; + }, + signatureToString: (r, a, l, f) => eb(r, ls(a), l, f), + typeToString: (r, a, l) => $r(r, ls(a), l), + symbolToString: (r, a, l, f) => Ui(r, ls(a), l, f), + typePredicateToString: (r, a, l) => Lm(r, ls(a), l), + writeSignature: (r, a, l, f, d) => eb(r, ls(a), l, f, d), + writeType: (r, a, l, f) => $r(r, ls(a), l, f), + writeSymbol: (r, a, l, f, d) => Ui(r, ls(a), l, f, d), + writeTypePredicate: (r, a, l, f) => Lm(r, ls(a), l, f), + getAugmentedPropertiesOfType: Eme, + getRootSymbols: A7e, + getSymbolOfExpando: K$, + getContextualType: (r, a) => { + const l = ls(r, ct); + if (l) + return a & 4 ? Bt(l, () => a_(l, a)) : a_(l, a); + }, + getContextualTypeForObjectLiteralElement: (r) => { + const a = ls(r, Eh); + return a ? _de( + a, + /*contextFlags*/ + void 0 + ) : void 0; + }, + getContextualTypeForArgumentAtIndex: (r, a) => { + const l = ls(r, Cb); + return l && cde(l, a); + }, + getContextualTypeForJsxAttribute: (r) => { + const a = ls(r, m7); + return a && HAe( + a, + /*contextFlags*/ + void 0 + ); + }, + isContextSensitive: $f, + getTypeOfPropertyOfContextualType: ub, + getFullyQualifiedName: oy, + getResolvedSignature: (r, a, l) => bi( + r, + a, + l, + 0 + /* Normal */ + ), + getCandidateSignaturesForStringLiteralCompletions: yr, + getResolvedSignatureForSignatureHelp: (r, a, l) => qn(r, () => bi( + r, + a, + l, + 16 + /* IsForSignatureHelp */ + )), + getExpandedParameters: dfe, + hasEffectiveRestParameter: wg, + containsArgumentsReference: Pfe, + getConstantValue: (r) => { + const a = ls(r, R7e); + return a ? wme(a) : void 0; + }, + isValidPropertyAccess: (r, a) => { + const l = ls(r, _Z); + return !!l && tat(l, Zo(a)); + }, + isValidPropertyAccessForCompletions: (r, a, l) => { + const f = ls(r, Tn); + return !!f && x8e(f, a, l); + }, + getSignatureFromDeclaration: (r) => { + const a = ls(r, vs); + return a ? Gf(a) : void 0; + }, + isImplementationOfOverload: (r) => { + const a = ls(r, vs); + return a ? L7e(a) : void 0; + }, + getImmediateAliasedSymbol: J$, + getAliasedSymbol: Pl, + getEmitResolver: ih, + requiresAddingImplicitUndefined: aR, + getExportsOfModule: _T, + getExportsAndPropertiesOfModule: fT, + forEachExportAndPropertyOfModule: pT, + getSymbolWalker: nne( + Pet, + bp, + Ba, + wo, + Vd, + en, + Nu, + s_, + w_, + Po + ), + getAmbientModules: eft, + getJsxIntrinsicTagNamesAt: Lst, + isOptionalParameter: (r) => { + const a = ls(r, Ii); + return a ? O8(a) : !1; + }, + tryGetMemberInModuleExports: (r, a) => dT(Zo(r), a), + tryGetMemberInModuleExportsAndProperties: (r, a) => $v(Zo(r), a), + tryFindAmbientModule: (r) => QPe( + r, + /*withAugmentations*/ + !0 + ), + getApparentType: Uu, + getUnionType: Qn, + isTypeAssignableTo: Ls, + createAnonymousType: Ea, + createSignature: fh, + createSymbol: ca, + createIndexInfo: Cg, + getAnyType: () => Je, + getStringType: () => de, + getStringLiteralType: x_, + getNumberType: () => st, + getNumberLiteralType: gd, + getBigIntType: () => Gt, + getBigIntLiteralType: iM, + createPromiseType: qM, + createArrayType: mu, + getElementTypeOfArrayType: gM, + getBooleanType: () => ut, + getFalseType: (r) => r ? Xr : Rr, + getTrueType: (r) => r ? Jr : tt, + getVoidType: () => Pt, + getUndefinedType: () => ft, + getNullType: () => lt, + getESSymbolType: () => Mt, + getNeverType: () => Zt, + getOptionalType: () => X, + getPromiseType: () => ZL( + /*reportErrors*/ + !1 + ), + getPromiseLikeType: () => b3e( + /*reportErrors*/ + !1 + ), + getAnyAsyncIterableType: () => { + const r = KL( + /*reportErrors*/ + !1 + ); + if (r !== Oi) + return a0(r, [Je, Je, Je]); + }, + isSymbolAccessible: Qp, + isArrayType: Tp, + isTupleType: ga, + isArrayLikeType: my, + isEmptyAnonymousObjectType: Dg, + isTypeInvalidDueToUnionDiscriminant: cet, + getExactOptionalProperties: Wrt, + getAllPossiblePropertiesOfTypes: uet, + getSuggestedSymbolForNonexistentProperty: Cde, + getSuggestedSymbolForNonexistentJSXAttribute: v8e, + getSuggestedSymbolForNonexistentSymbol: (r, a, l) => S8e(r, Zo(a), l), + getSuggestedSymbolForNonexistentModule: Ede, + getSuggestedSymbolForNonexistentClassMember: y8e, + getBaseConstraintOfType: iu, + getDefaultFromTypeParameter: (r) => r && r.flags & 262144 ? j2(r) : void 0, + resolveName(r, a, l, f) { + return Dt( + a, + Zo(r), + l, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1, + f + ); + }, + getJsxNamespace: (r) => Pi(Dm(r)), + getJsxFragmentFactory: (r) => { + const a = Ame(r); + return a && Pi(w_(a).escapedText); + }, + getAccessibleSymbolChain: Wu, + getTypePredicateOfSignature: bp, + resolveExternalModuleName: (r) => { + const a = ls(r, ct); + return a && Pu( + a, + a, + /*ignoreErrors*/ + !0 + ); + }, + resolveExternalModuleSymbol: M_, + tryGetThisTypeAt: (r, a, l) => { + const f = ls(r); + return f && ide(f, a, l); + }, + getTypeArgumentConstraint: (r) => { + const a = ls(r, fi); + return a && uct(a); + }, + getSuggestionDiagnostics: (r, a) => { + const l = ls(r, Ei) || E.fail("Could not determine parsed source file."); + if ($C(l, F, e)) + return He; + let f; + try { + return i = a, kme(l), E.assert(!!(yn(l).flags & 1)), f = Nn(f, b1.getDiagnostics(l.fileName)), zIe(T7e(l), (d, y, x) => { + !lx(d) && !S7e(y, !!(d.flags & 33554432)) && (f || (f = [])).push({ + ...x, + category: 2 + /* Suggestion */ + }); + }), f || He; + } finally { + i = void 0; + } + }, + runWithCancellationToken: (r, a) => { + try { + return i = r, a(Wr); + } finally { + i = void 0; + } + }, + getLocalTypeParametersOfClassOrInterfaceOrTypeAlias: zd, + isDeclarationVisible: dd, + isPropertyAccessible: wde, + getTypeOnlyAliasDeclaration: Jd, + getMemberOverrideModifierStatus: qlt, + isTypeParameterPossiblyReferenced: oM, + typeHasCallOrConstructSignatures: xX, + getSymbolFlags: pu + }; + function yr(r, a) { + const l = /* @__PURE__ */ new Set(), f = []; + Bt(a, () => bi( + r, + f, + /*argumentCount*/ + void 0, + 0 + /* Normal */ + )); + for (const d of f) + l.add(d); + f.length = 0, qn(a, () => bi( + r, + f, + /*argumentCount*/ + void 0, + 0 + /* Normal */ + )); + for (const d of f) + l.add(d); + return Ki(l); + } + function qn(r, a) { + if (r = ur(r, Mj), r) { + const l = [], f = []; + for (; r; ) { + const y = yn(r); + if (l.push([y, y.resolvedSignature]), y.resolvedSignature = void 0, Ky(r)) { + const x = Ci(dn(r)), I = x.type; + f.push([x, I]), x.type = void 0; + } + r = ur(r.parent, Mj); + } + const d = a(); + for (const [y, x] of l) + y.resolvedSignature = x; + for (const [y, x] of f) + y.type = x; + return d; + } + return a(); + } + function Bt(r, a) { + const l = ur(r, Cb); + if (l) { + let d = r; + do + yn(d).skipDirectInference = !0, d = d.parent; + while (d && d !== l); + } + w = !0; + const f = qn(r, a); + if (w = !1, l) { + let d = r; + do + yn(d).skipDirectInference = void 0, d = d.parent; + while (d && d !== l); + } + return f; + } + function bi(r, a, l, f) { + const d = ls(r, Cb); + Ue = l; + const y = d ? ME(d, a, f) : void 0; + return Ue = void 0, y; + } + var pi = /* @__PURE__ */ new Map(), Xn = /* @__PURE__ */ new Map(), jr = /* @__PURE__ */ new Map(), di = /* @__PURE__ */ new Map(), Re = /* @__PURE__ */ new Map(), gt = /* @__PURE__ */ new Map(), tr = /* @__PURE__ */ new Map(), qr = /* @__PURE__ */ new Map(), Bn = /* @__PURE__ */ new Map(), wn = /* @__PURE__ */ new Map(), ki = /* @__PURE__ */ new Map(), Cs = /* @__PURE__ */ new Map(), Ks = /* @__PURE__ */ new Map(), xr = /* @__PURE__ */ new Map(), gs = /* @__PURE__ */ new Map(), Qe = [], Ct = /* @__PURE__ */ new Map(), ee = /* @__PURE__ */ new Set(), Ve = ca(4, "unknown"), K = ca( + 0, + "__resolving__" + /* Resolving */ + ), Ie = /* @__PURE__ */ new Map(), $e = /* @__PURE__ */ new Map(), Ke = /* @__PURE__ */ new Set(), Je = Bc(1, "any"), Ye = Bc(1, "any", 262144, "auto"), _t = Bc( + 1, + "any", + /*objectFlags*/ + void 0, + "wildcard" + ), yt = Bc( + 1, + "any", + /*objectFlags*/ + void 0, + "blocked string" + ), We = Bc(1, "error"), Et = Bc(1, "unresolved"), Xt = Bc(1, "any", 65536, "non-inferrable"), rn = Bc(1, "intrinsic"), ye = Bc(2, "unknown"), ft = Bc(32768, "undefined"), fe = Z ? ft : Bc(32768, "undefined", 65536, "widening"), L = Bc( + 32768, + "undefined", + /*objectFlags*/ + void 0, + "missing" + ), ve = me ? L : ft, X = Bc( + 32768, + "undefined", + /*objectFlags*/ + void 0, + "optional" + ), lt = Bc(65536, "null"), zt = Z ? lt : Bc(65536, "null", 65536, "widening"), de = Bc(4, "string"), st = Bc(8, "number"), Gt = Bc(64, "bigint"), Xr = Bc( + 512, + "false", + /*objectFlags*/ + void 0, + "fresh" + ), Rr = Bc(512, "false"), Jr = Bc( + 512, + "true", + /*objectFlags*/ + void 0, + "fresh" + ), tt = Bc(512, "true"); + Jr.regularType = tt, Jr.freshType = Jr, tt.regularType = tt, tt.freshType = Jr, Xr.regularType = Rr, Xr.freshType = Xr, Rr.regularType = Rr, Rr.freshType = Xr; + var ut = Qn([Rr, tt]), Mt = Bc(4096, "symbol"), Pt = Bc(16384, "void"), Zt = Bc(131072, "never"), fr = Bc(131072, "never", 262144, "silent"), Vt = Bc( + 131072, + "never", + /*objectFlags*/ + void 0, + "implicit" + ), ir = Bc( + 131072, + "never", + /*objectFlags*/ + void 0, + "unreachable" + ), Tr = Bc(67108864, "object"), _r = Qn([de, st]), Ot = Qn([de, st, Mt]), mi = Qn([st, Gt]), Js = Qn([de, st, ut, Gt, lt, ft]), Ms = DT(["", ""], [st]), Ns = aM((r) => r.flags & 262144 ? drt(r) : r, () => "(restrictive mapper)"), kc = aM((r) => r.flags & 262144 ? _t : r, () => "(permissive mapper)"), Wo = Bc( + 131072, + "never", + /*objectFlags*/ + void 0, + "unique literal" + ), sc = aM((r) => r.flags & 262144 ? Wo : r, () => "(unique literal mapper)"), ri, zs = aM((r) => (ri && (r === Ll || r === To || r === ge) && ri( + /*onlyUnreliable*/ + !0 + ), r), () => "(unmeasurable reporter)"), eu = aM((r) => (ri && (r === Ll || r === To || r === ge) && ri( + /*onlyUnreliable*/ + !1 + ), r), () => "(unreliable reporter)"), hs = Ea( + /*symbol*/ + void 0, + A, + He, + He, + He + ), Bu = Ea( + /*symbol*/ + void 0, + A, + He, + He, + He + ); + Bu.objectFlags |= 2048; + var Yc = Ea( + /*symbol*/ + void 0, + A, + He, + He, + He + ); + Yc.objectFlags |= 141440; + var Sl = ca( + 2048, + "__type" + /* Type */ + ); + Sl.members = Us(); + var Zi = Ea(Sl, A, He, He, He), Gs = Ea( + /*symbol*/ + void 0, + A, + He, + He, + He + ), Ca = Z ? Qn([ft, lt, Gs]) : ye, Oi = Ea( + /*symbol*/ + void 0, + A, + He, + He, + He + ); + Oi.instantiations = /* @__PURE__ */ new Map(); + var qt = Ea( + /*symbol*/ + void 0, + A, + He, + He, + He + ); + qt.objectFlags |= 262144; + var Qa = Ea( + /*symbol*/ + void 0, + A, + He, + He, + He + ), Mc = Ea( + /*symbol*/ + void 0, + A, + He, + He, + He + ), Ol = Ea( + /*symbol*/ + void 0, + A, + He, + He, + He + ), Ll = sr(), To = sr(); + To.constraint = Ll; + var ge = sr(), G = sr(), rt = sr(); + rt.constraint = G; + var wt = L8(1, "<>", 0, Je), Kt = fh( + /*declaration*/ + void 0, + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + He, + Je, + /*resolvedTypePredicate*/ + void 0, + 0, + 0 + /* None */ + ), Yr = fh( + /*declaration*/ + void 0, + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + He, + We, + /*resolvedTypePredicate*/ + void 0, + 0, + 0 + /* None */ + ), Mn = fh( + /*declaration*/ + void 0, + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + He, + Je, + /*resolvedTypePredicate*/ + void 0, + 0, + 0 + /* None */ + ), pr = fh( + /*declaration*/ + void 0, + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + He, + fr, + /*resolvedTypePredicate*/ + void 0, + 0, + 0 + /* None */ + ), En = Cg( + st, + de, + /*isReadonly*/ + !0 + ), Ji = /* @__PURE__ */ new Map(), hi = { + get yieldType() { + return E.fail("Not supported"); + }, + get returnType() { + return E.fail("Not supported"); + }, + get nextType() { + return E.fail("Not supported"); + } + }, ba = fb(Je, Je, Je), Mo = { + iterableCacheKey: "iterationTypesOfAsyncIterable", + iteratorCacheKey: "iterationTypesOfAsyncIterator", + iteratorSymbolName: "asyncIterator", + getGlobalIteratorType: Het, + getGlobalIterableType: KL, + getGlobalIterableIteratorType: S3e, + getGlobalIteratorObjectType: $et, + getGlobalGeneratorType: Xet, + getGlobalBuiltinIteratorTypes: Get, + resolveIterationType: (r, a) => tC(r, a, p.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member), + mustHaveANextMethodDiagnostic: p.An_async_iterator_must_have_a_next_method, + mustBeAMethodDiagnostic: p.The_0_property_of_an_async_iterator_must_be_a_method, + mustHaveAValueDiagnostic: p.The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property + }, dc = { + iterableCacheKey: "iterationTypesOfIterable", + iteratorCacheKey: "iterationTypesOfIterator", + iteratorSymbolName: "iterator", + getGlobalIteratorType: Qet, + getGlobalIterableType: XG, + getGlobalIterableIteratorType: T3e, + getGlobalIteratorObjectType: Zet, + getGlobalGeneratorType: Ket, + getGlobalBuiltinIteratorTypes: Yet, + resolveIterationType: (r, a) => r, + mustHaveANextMethodDiagnostic: p.An_iterator_must_have_a_next_method, + mustBeAMethodDiagnostic: p.The_0_property_of_an_iterator_must_be_a_method, + mustHaveAValueDiagnostic: p.The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property + }, mc, Rc = /* @__PURE__ */ new Map(), Uo = /* @__PURE__ */ new Map(), ac, Vp, dl, Ml, Rl, Fe, Ft, Br, Ti, Sa, to, Do, ml, gc, Va, mo, df, Rf, F_, mf, jf, fp, th, od, t_, gf, y_, cd, hf, ug, Q, et, Rt, jt, Er, Hr, xn, ii, j, Ne, Tt, Ar, ei, Ss, _s, ps, ja, xa, Ro, O_, Ld, km, Cm, G0, rh, pp, ld, xo, yf, qh, v_, nh = /* @__PURE__ */ new Map(), _g = 0, Md = 0, Em = 0, $0 = !1, m1 = 0, dp, g1, mp, Rd = [], Hh = [], h1 = [], ud = 0, Rv = [], y1 = [], X0 = [], Le = 0, Ge = x_(""), St = gd(0), rr = iM({ negative: !1, base10Value: "0" }), vr = [], Gr = [], Dr = [], cn = 0, ai = !1, hn = 0, ji = 10, Gn = [], ta = [], Cc = [], r_ = [], vf = [], Bf = [], n_ = [], i_ = [], jv = [], Bv = [], fg = [], Q0 = [], Gh = [], jd = [], $h = [], v1 = [], Xh = [], nT = [], b2 = [], Jv = 0, Pa = F3(), b1 = F3(), eE = mt(), Y0, Z0, pg = /* @__PURE__ */ new Map(), Jf = /* @__PURE__ */ new Map(), bf = /* @__PURE__ */ new Map(), L_ = /* @__PURE__ */ new Map(), b_ = /* @__PURE__ */ new Map(), zv = /* @__PURE__ */ new Map(), tE = [ + [".mts", ".mjs"], + [".ts", ".js"], + [".cts", ".cjs"], + [".mjs", ".mjs"], + [".js", ".js"], + [".cjs", ".cjs"], + [".tsx", F.jsx === 1 ? ".jsx" : ".js"], + [".jsx", ".jsx"], + [".json", ".json"] + ]; + return p_t(), Wr; + function Tl(r) { + return !Tn(r) || !Me(r.name) || !Tn(r.expression) && !Me(r.expression) ? !1 : Me(r.expression) ? An(r.expression) === "Symbol" && Nu(r.expression) === (DE( + "Symbol", + 1160127, + /*diagnostic*/ + void 0 + ) || Ve) : Me(r.expression.expression) ? An(r.expression.name) === "Symbol" && An(r.expression.expression) === "globalThis" && Nu(r.expression.expression) === he : !1; + } + function Bd(r) { + return r ? gs.get(r) : void 0; + } + function K0(r, a) { + return r && gs.set(r, a), a; + } + function Dm(r) { + if (r) { + const a = Cr(r); + if (a) + if (sd(r)) { + if (a.localJsxFragmentNamespace) + return a.localJsxFragmentNamespace; + const l = a.pragmas.get("jsxfrag"); + if (l) { + const d = os(l) ? l[0] : l; + if (a.localJsxFragmentFactory = Kx(d.arguments.factory, R), Xe(a.localJsxFragmentFactory, tu, Hu), a.localJsxFragmentFactory) + return a.localJsxFragmentNamespace = w_(a.localJsxFragmentFactory).escapedText; + } + const f = Ame(r); + if (f) + return a.localJsxFragmentFactory = f, a.localJsxFragmentNamespace = w_(f).escapedText; + } else { + const l = Ck(a); + if (l) + return a.localJsxNamespace = l; + } + } + return Y0 || (Y0 = "React", F.jsxFactory ? (Z0 = Kx(F.jsxFactory, R), Xe(Z0, tu), Z0 && (Y0 = w_(Z0).escapedText)) : F.reactNamespace && (Y0 = Zo(F.reactNamespace))), Z0 || (Z0 = N.createQualifiedName(N.createIdentifier(Pi(Y0)), "createElement")), Y0; + } + function Ck(r) { + if (r.localJsxNamespace) + return r.localJsxNamespace; + const a = r.pragmas.get("jsx"); + if (a) { + const l = os(a) ? a[0] : a; + if (r.localJsxFactory = Kx(l.arguments.factory, R), Xe(r.localJsxFactory, tu, Hu), r.localJsxFactory) + return r.localJsxNamespace = w_(r.localJsxFactory).escapedText; + } + } + function tu(r) { + return Cd(r, -1, -1), kr( + r, + tu, + /*context*/ + void 0 + ); + } + function ih(r, a, l) { + return l || x7e(r, a), oe; + } + function zf(r, a, ...l) { + const f = r ? tn(r, a, ...l) : Ho(a, ...l), d = Pa.lookup(f); + return d || (Pa.add(f), f); + } + function qp(r, a, l, ...f) { + const d = je(a, l, ...f); + return d.skippedOn = r, d; + } + function wm(r, a, ...l) { + return r ? tn(r, a, ...l) : Ho(a, ...l); + } + function je(r, a, ...l) { + const f = wm(r, a, ...l); + return Pa.add(f), f; + } + function Qh(r, a) { + r ? Pa.add(a) : b1.add({ + ...a, + category: 2 + /* Suggestion */ + }); + } + function dg(r, a, l, ...f) { + if (a.pos < 0 || a.end < 0) { + if (!r) + return; + const d = Cr(a); + Qh(r, "message" in l ? ol(d, 0, 0, l, ...f) : oB(d, l)); + return; + } + Qh(r, "message" in l ? tn(a, l, ...f) : Jg(Cr(a), a, l)); + } + function S1(r, a, l, ...f) { + const d = je(r, l, ...f); + if (a) { + const y = tn(r, p.Did_you_forget_to_use_await); + Bs(d, y); + } + return d; + } + function iT(r, a) { + const l = Array.isArray(r) ? lr(r, xj) : xj(r); + return l && Bs( + a, + tn(l, p.The_declaration_was_marked_as_deprecated_here) + ), b1.add(a), a; + } + function Yh(r) { + const a = af(r); + return a && Ir(r.declarations) > 1 ? a.flags & 64 ? at(r.declarations, T1) : Ri(r.declarations, T1) : !!r.valueDeclaration && T1(r.valueDeclaration) || Ir(r.declarations) && Ri(r.declarations, T1); + } + function T1(r) { + return !!(Z2(r) & 536870912); + } + function Zh(r, a, l) { + const f = tn(r, p._0_is_deprecated, l); + return iT(a, f); + } + function sT(r, a, l, f) { + const d = l ? tn(r, p.The_signature_0_of_1_is_deprecated, f, l) : tn(r, p._0_is_deprecated, f); + return iT(a, d); + } + function ca(r, a, l) { + m++; + const f = new o(r | 33554432, a); + return f.links = new y1e(), f.links.checkFlags = l || 0, f; + } + function _d(r, a) { + const l = ca(1, r); + return l.links.type = a, l; + } + function ey(r, a) { + const l = ca(4, r); + return l.links.type = a, l; + } + function sf(r) { + let a = 0; + return r & 2 && (a |= 111551), r & 1 && (a |= 111550), r & 4 && (a |= 0), r & 8 && (a |= 900095), r & 16 && (a |= 110991), r & 32 && (a |= 899503), r & 64 && (a |= 788872), r & 256 && (a |= 899327), r & 128 && (a |= 899967), r & 512 && (a |= 110735), r & 8192 && (a |= 103359), r & 32768 && (a |= 46015), r & 65536 && (a |= 78783), r & 262144 && (a |= 526824), r & 524288 && (a |= 788968), r & 2097152 && (a |= 2097152), a; + } + function Kh(r, a) { + a.mergeId || (a.mergeId = g1e, g1e++), Gn[a.mergeId] = r; + } + function mg(r) { + const a = ca(r.flags, r.escapedName); + return a.declarations = r.declarations ? r.declarations.slice() : [], a.parent = r.parent, r.valueDeclaration && (a.valueDeclaration = r.valueDeclaration), r.constEnumOnlyModule && (a.constEnumOnlyModule = !0), r.members && (a.members = new Map(r.members)), r.exports && (a.exports = new Map(r.exports)), Kh(a, r), a; + } + function Pm(r, a, l = !1) { + if (!(r.flags & sf(a.flags)) || (a.flags | r.flags) & 67108864) { + if (a === r) + return r; + if (!(r.flags & 33554432)) { + const y = jc(r); + if (y === Ve) + return a; + if (!(y.flags & sf(a.flags)) || (a.flags | y.flags) & 67108864) + r = mg(y); + else + return f(r, a), a; + } + a.flags & 512 && r.flags & 512 && r.constEnumOnlyModule && !a.constEnumOnlyModule && (r.constEnumOnlyModule = !1), r.flags |= a.flags, a.valueDeclaration && v3(r, a.valueDeclaration), Nn(r.declarations, a.declarations), a.members && (r.members || (r.members = Us()), Nm(r.members, a.members, l)), a.exports && (r.exports || (r.exports = Us()), Nm(r.exports, a.exports, l, r)), l || Kh(r, a); + } else r.flags & 1024 ? r !== he && je( + a.declarations && is(a.declarations[0]), + p.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity, + Ui(r) + ) : f(r, a); + return r; + function f(y, x) { + const I = !!(y.flags & 384 || x.flags & 384), M = !!(y.flags & 2 || x.flags & 2), z = I ? p.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations : M ? p.Cannot_redeclare_block_scoped_variable_0 : p.Duplicate_identifier_0, Y = x.declarations && Cr(x.declarations[0]), Se = y.declarations && Cr(y.declarations[0]), pe = k4(Y, F.checkJs), Ze = k4(Se, F.checkJs), dt = Ui(x); + if (Y && Se && mc && !I && Y !== Se) { + const ht = xh(Y.path, Se.path) === -1 ? Y : Se, or = ht === Y ? Se : Y, nr = HE(mc, `${ht.path}|${or.path}`, () => ({ firstFile: ht, secondFile: or, conflictingSymbols: /* @__PURE__ */ new Map() })), Kr = HE(nr.conflictingSymbols, dt, () => ({ isBlockScoped: M, firstFileLocations: [], secondFileLocations: [] })); + pe || d(Kr.firstFileLocations, x), Ze || d(Kr.secondFileLocations, y); + } else + pe || Wv(x, z, dt, y), Ze || Wv(y, z, dt, x); + } + function d(y, x) { + if (x.declarations) + for (const I of x.declarations) + Qf(y, I); + } + } + function Wv(r, a, l, f) { + lr(r.declarations, (d) => { + ty(d, a, l, f.declarations); + }); + } + function ty(r, a, l, f) { + const d = (rv( + r, + /*isPrototypeAssignment*/ + !1 + ) ? mB(r) : is(r)) || r, y = zf(d, a, l); + for (const x of f || He) { + const I = (rv( + x, + /*isPrototypeAssignment*/ + !1 + ) ? mB(x) : is(x)) || x; + if (I === d) continue; + y.relatedInformation = y.relatedInformation || []; + const M = tn(I, p._0_was_also_declared_here, l), z = tn(I, p.and_here); + Ir(y.relatedInformation) >= 5 || at( + y.relatedInformation, + (Y) => Z4(Y, z) === 0 || Z4(Y, M) === 0 + /* EqualTo */ + ) || Bs(y, Ir(y.relatedInformation) ? z : M); + } + } + function Uv(r, a) { + if (!r?.size) return a; + if (!a?.size) return r; + const l = Us(); + return Nm(l, r), Nm(l, a), l; + } + function Nm(r, a, l = !1, f) { + a.forEach((d, y) => { + const x = r.get(y), I = x ? Pm(x, d, l) : Oa(d); + f && x && (I.parent = f), r.set(y, I); + }); + } + function e0(r) { + var a, l, f; + const d = r.parent; + if (((a = d.symbol.declarations) == null ? void 0 : a[0]) !== d) { + E.assert(d.symbol.declarations.length > 1); + return; + } + if (eg(d)) + Nm(Oe, d.symbol.exports); + else { + const y = r.parent.parent.flags & 33554432 ? void 0 : p.Invalid_module_name_in_augmentation_module_0_cannot_be_found; + let x = Fk( + r, + r, + y, + /*ignoreErrors*/ + !1, + /*isForAugmentation*/ + !0 + ); + if (!x) + return; + if (x = M_(x), x.flags & 1920) + if (at(Vp, (I) => x === I.symbol)) { + const I = Pm( + d.symbol, + x, + /*unidirectional*/ + !0 + ); + dl || (dl = /* @__PURE__ */ new Map()), dl.set(r.text, I); + } else { + if ((l = x.exports) != null && l.get( + "__export" + /* ExportStar */ + ) && ((f = d.symbol.exports) != null && f.size)) { + const I = pfe( + x, + "resolvedExports" + /* resolvedExports */ + ); + for (const [M, z] of Ki(d.symbol.exports.entries())) + I.has(M) && !x.exports.has(M) && Pm(I.get(M), z); + } + Pm(x, d.symbol); + } + else + je(r, p.Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity, r.text); + } + } + function rE() { + const r = xe.escapedName, a = Oe.get(r); + a ? lr(a.declarations, (l) => { + Nx(l) || Pa.add(tn(l, p.Declaration_name_conflicts_with_built_in_global_identifier_0, Pi(r))); + }) : Oe.set(r, xe); + } + function Ci(r) { + if (r.flags & 33554432) return r.links; + const a = Zs(r); + return ta[a] ?? (ta[a] = new y1e()); + } + function yn(r) { + const a = Aa(r); + return Cc[a] || (Cc[a] = new ZMe()); + } + function fu(r, a, l) { + if (l) { + const f = Oa(r.get(a)); + if (f && (f.flags & l || f.flags & 2097152 && pu(f) & l)) + return f; + } + } + function ry(r, a) { + const l = r.parent, f = r.parent.parent, d = fu( + l.locals, + a, + 111551 + /* Value */ + ), y = fu( + Sg(f.symbol), + a, + 111551 + /* Value */ + ); + return d && y ? [d, y] : E.fail("There should exist two symbols, one as property declaration and one as parameter declaration"); + } + function ny(r, a) { + const l = Cr(r), f = Cr(a), d = Sd(r); + if (l !== f) { + if (W && (l.externalModuleIndicator || f.externalModuleIndicator) || !F.outFile || vx(a) || r.flags & 33554432 || x(a, r)) + return !0; + const M = e.getSourceFiles(); + return M.indexOf(l) <= M.indexOf(f); + } + if (a.flags & 16777216 || vx(a) || Upe(a)) + return !0; + if (r.pos <= a.pos && !(ss(r) && o3(a.parent) && !r.initializer && !r.exclamationToken)) { + if (r.kind === 208) { + const M = sv( + a, + 208 + /* BindingElement */ + ); + return M ? ur(M, ma) !== ur(r, ma) || r.pos < M.pos : ny(sv( + r, + 260 + /* VariableDeclaration */ + ), a); + } else { + if (r.kind === 260) + return !y(r, a); + if (Zn(r)) { + const M = ur(a, (z) => z === r ? "quit" : fa(z) ? z.parent.parent === r : !V && ll(z) && (z.parent === r || fc(z.parent) && z.parent.parent === r || MP(z.parent) && z.parent.parent === r || ss(z.parent) && z.parent.parent === r || Ii(z.parent) && z.parent.parent.parent === r)); + return M ? !V && ll(M) ? !!ur(a, (z) => z === M ? "quit" : vs(z) && !Ab(z)) : !1 : !0; + } else { + if (ss(r)) + return !I( + r, + a, + /*stopAtAnyPropertyDeclaration*/ + !1 + ); + if (H_(r, r.parent)) + return !(U && Al(r) === Al(a) && x(a, r)); + } + } + return !0; + } + if (a.parent.kind === 281 || a.parent.kind === 277 && a.parent.isExportEquals || a.kind === 277 && a.isExportEquals) + return !0; + if (x(a, r)) + return U && Al(r) && (ss(r) || H_(r, r.parent)) ? !I( + r, + a, + /*stopAtAnyPropertyDeclaration*/ + !0 + ) : !0; + return !1; + function y(M, z) { + switch (M.parent.parent.kind) { + case 243: + case 248: + case 250: + if (wu(z, M, d)) + return !0; + break; + } + const Y = M.parent.parent; + return _S(Y) && wu(z, Y.expression, d); + } + function x(M, z) { + return !!ur(M, (Y) => { + if (Y === d) + return "quit"; + if (vs(Y)) + return !0; + if (nc(Y)) + return z.pos < M.pos; + const Se = jn(Y.parent, ss); + if (Se && Se.initializer === Y) { + if (Vs(Y.parent)) { + if (z.kind === 174) + return !0; + if (ss(z) && Al(M) === Al(z)) { + const Ze = z.name; + if (Me(Ze) || Ni(Ze)) { + const dt = en(dn(z)), ht = kn(z.parent.members, nc); + if (Ylt(Ze, dt, ht, z.parent.pos, Y.pos)) + return !0; + } + } + } else if (!(z.kind === 172 && !Vs(z)) || Al(M) !== Al(z)) + return !0; + } + return !1; + }); + } + function I(M, z, Y) { + return z.end > M.end ? !1 : ur(z, (pe) => { + if (pe === M) + return "quit"; + switch (pe.kind) { + case 219: + return !0; + case 172: + return Y && (ss(M) && pe.parent === M.parent || H_(M, M.parent) && pe.parent === M.parent.parent) ? "quit" : !0; + case 241: + switch (pe.parent.kind) { + case 177: + case 174: + case 178: + return !0; + default: + return !1; + } + default: + return !1; + } + }) === void 0; + } + } + function S2(r) { + return yn(r).declarationRequiresScopeChange; + } + function x1(r, a) { + yn(r).declarationRequiresScopeChange = a; + } + function go(r, a, l, f) { + return U ? !1 : (r && !f && x2(r, a, a) || je( + r, + r && l.type && PP(l.type, r.pos) ? p.Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor : p.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, + co(l.name), + Hp(a) + ), !0); + } + function T2(r, a, l, f) { + const d = rs(a) ? a : a.escapedText; + n(() => { + if (!r || r.parent.kind !== 324 && !x2(r, d, a) && !nE(r) && !gn(r, d, l) && !iy(r, d) && !sE(r, d, l) && !Ek(r, d, l) && !Ju(r, d, l)) { + let y, x; + if (a && (x = Qst(a), x && je(r, f, Hp(a), x)), !x && hn < ji && (y = S8e(r, d, l), y?.valueDeclaration && Ou(y.valueDeclaration) && eg(y.valueDeclaration) && (y = void 0), y)) { + const M = Ui(y), z = xde( + r, + y, + /*excludeClasses*/ + !1 + ), Y = l === 1920 || a && typeof a != "string" && no(a) ? p.Cannot_find_namespace_0_Did_you_mean_1 : z ? p.Could_not_find_name_0_Did_you_mean_1 : p.Cannot_find_name_0_Did_you_mean_1, Se = wm(r, Y, Hp(a), M); + Se.canonicalHead = GZ(f, Hp(a)), Qh(!z, Se), y.valueDeclaration && Bs( + Se, + tn(y.valueDeclaration, p._0_is_declared_here, M) + ); + } + !y && !x && a && je(r, f, Hp(a)), hn++; + } + }); + } + function Vv(r, a, l, f, d, y) { + n(() => { + var x; + const I = a.escapedName, M = f && Ei(f) && $_(f); + if (r && (l & 2 || (l & 32 || l & 384) && (l & 111551) === 111551)) { + const z = gl(a); + (z.flags & 2 || z.flags & 32 || z.flags & 384) && Dk(z, r); + } + if (M && (l & 111551) === 111551 && !(r.flags & 16777216)) { + const z = Oa(a); + Ir(z.declarations) && Ri(z.declarations, (Y) => hN(Y) || Ei(Y) && !!Y.symbol.globalExports) && dg(!F.allowUmdGlobalAccess, r, p._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead, Pi(I)); + } + if (d && !y && (l & 111551) === 111551) { + const z = Oa(OG(a)), Y = om(d); + z === dn(d) ? je(r, p.Parameter_0_cannot_reference_itself, co(d.name)) : z.valueDeclaration && z.valueDeclaration.pos > d.pos && Y.parent.locals && fu(Y.parent.locals, z.escapedName, l) === z && je(r, p.Parameter_0_cannot_reference_identifier_1_declared_after_it, co(d.name), co(r)); + } + if (r && l & 111551 && a.flags & 2097152 && !(a.flags & 111551) && !cv(r)) { + const z = Jd( + a, + 111551 + /* Value */ + ); + if (z) { + const Y = z.kind === 281 || z.kind === 278 || z.kind === 280 ? p._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type : p._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type, Se = Pi(I); + k1( + je(r, Y, Se), + z, + Se + ); + } + } + if (F.isolatedModules && a && M && (l & 111551) === 111551) { + const Y = fu(Oe, I, l) === a && Ei(f) && f.locals && fu( + f.locals, + I, + -111552 + /* Value */ + ); + if (Y) { + const Se = (x = Y.declarations) == null ? void 0 : x.find( + (pe) => pe.kind === 276 || pe.kind === 273 || pe.kind === 274 || pe.kind === 271 + /* ImportEqualsDeclaration */ + ); + Se && !yC(Se) && je(Se, p.Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled, Pi(I)); + } + } + }); + } + function k1(r, a, l) { + return a ? Bs( + r, + tn( + a, + a.kind === 281 || a.kind === 278 || a.kind === 280 ? p._0_was_exported_here : p._0_was_imported_here, + l + ) + ) : r; + } + function Hp(r) { + return rs(r) ? Pi(r) : co(r); + } + function x2(r, a, l) { + if (!Me(r) || r.escapedText !== a || k7e(r) || vx(r)) + return !1; + const f = Lu( + r, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + let d = f; + for (; d; ) { + if (Zn(d.parent)) { + const y = dn(d.parent); + if (!y) + break; + const x = en(y); + if (Ys(x, a)) + return je(r, p.Cannot_find_name_0_Did_you_mean_the_static_member_1_0, Hp(l), Ui(y)), !0; + if (d === f && !Vs(d)) { + const I = ko(y).thisType; + if (Ys(I, a)) + return je(r, p.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0, Hp(l)), !0; + } + } + d = d.parent; + } + return !1; + } + function nE(r) { + const a = iE(r); + return a && oc( + a, + 64, + /*ignoreErrors*/ + !0 + ) ? (je(r, p.Cannot_extend_an_interface_0_Did_you_mean_implements, qo(a)), !0) : !1; + } + function iE(r) { + switch (r.kind) { + case 80: + case 211: + return r.parent ? iE(r.parent) : void 0; + case 233: + if (_o(r.expression)) + return r.expression; + // falls through + default: + return; + } + } + function gn(r, a, l) { + const f = 1920 | (an(r) ? 111551 : 0); + if (l === f) { + const d = jc(Dt( + r, + a, + 788968 & ~f, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + )), y = r.parent; + if (d) { + if (Xu(y)) { + E.assert(y.left === r, "Should only be resolving left side of qualified name as a namespace"); + const x = y.right.escapedText; + if (Ys(ko(d), x)) + return je( + y, + p.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1, + Pi(a), + Pi(x) + ), !0; + } + return je(r, p._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here, Pi(a)), !0; + } + } + return !1; + } + function Ju(r, a, l) { + if (l & 788584) { + const f = jc(Dt( + r, + a, + 111127, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + )); + if (f && !(f.flags & 1920)) + return je(r, p._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0, Pi(a)), !0; + } + return !1; + } + function cs(r) { + return r === "any" || r === "string" || r === "number" || r === "boolean" || r === "never" || r === "unknown"; + } + function iy(r, a) { + return cs(a) && r.parent.kind === 281 ? (je(r, p.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, a), !0) : !1; + } + function Ek(r, a, l) { + if (l & 111551) { + if (cs(a)) { + const y = r.parent.parent; + if (y && y.parent && Z_(y)) { + const x = y.token, I = y.parent.kind; + I === 264 && x === 96 ? je(r, p.An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types, Pi(a)) : I === 263 && x === 96 ? je(r, p.A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values, Pi(a)) : I === 263 && x === 119 && je(r, p.A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types, Pi(a)); + } else + je(r, p._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, Pi(a)); + return !0; + } + const f = jc(Dt( + r, + a, + 788544, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + )), d = f && pu(f); + if (f && d !== void 0 && !(d & 111551)) { + const y = Pi(a); + return un(a) ? je(r, p._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later, y) : qv(r, f) ? je(r, p._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0, y, y === "K" ? "P" : "K") : je(r, p._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, y), !0; + } + } + return !1; + } + function qv(r, a) { + const l = ur(r.parent, (f) => fa(f) || m_(f) ? !1 : Qu(f) || "quit"); + if (l && l.members.length === 1) { + const f = ko(a); + return !!(f.flags & 1048576) && fI( + f, + 384, + /*strict*/ + !0 + ); + } + return !1; + } + function un(r) { + switch (r) { + case "Promise": + case "Symbol": + case "Map": + case "WeakMap": + case "Set": + case "WeakSet": + return !0; + } + return !1; + } + function sE(r, a, l) { + if (l & 111127) { + if (jc(Dt( + r, + a, + 1024, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + ))) + return je( + r, + p.Cannot_use_namespace_0_as_a_value, + Pi(a) + ), !0; + } else if (l & 788544 && jc(Dt( + r, + a, + 1536, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + ))) + return je(r, p.Cannot_use_namespace_0_as_a_type, Pi(a)), !0; + return !1; + } + function Dk(r, a) { + var l; + if (E.assert(!!(r.flags & 2 || r.flags & 32 || r.flags & 384)), r.flags & 67108881 && r.flags & 32) + return; + const f = (l = r.declarations) == null ? void 0 : l.find( + (d) => Yj(d) || Zn(d) || d.kind === 266 + /* EnumDeclaration */ + ); + if (f === void 0) return E.fail("checkResolvedBlockScopedVariable could not find block-scoped declaration"); + if (!(f.flags & 33554432) && !ny(f, a)) { + let d; + const y = co(is(f)); + r.flags & 2 ? d = je(a, p.Block_scoped_variable_0_used_before_its_declaration, y) : r.flags & 32 ? d = je(a, p.Class_0_used_before_its_declaration, y) : r.flags & 256 ? d = je(a, p.Enum_0_used_before_its_declaration, y) : (E.assert(!!(r.flags & 128)), Mp(F) && (d = je(a, p.Enum_0_used_before_its_declaration, y))), d && Bs(d, tn(f, p._0_is_declared_here, y)); + } + } + function wu(r, a, l) { + return !!a && !!ur(r, (f) => f === a || (f === l || vs(f) && (!Ab(f) || Oc(f) & 3) ? "quit" : !1)); + } + function Am(r) { + switch (r.kind) { + case 271: + return r; + case 273: + return r.parent; + case 274: + return r.parent.parent; + case 276: + return r.parent.parent.parent; + default: + return; + } + } + function ru(r) { + return r.declarations && gb(r.declarations, sh); + } + function sh(r) { + return r.kind === 271 || r.kind === 270 || r.kind === 273 && !!r.name || r.kind === 274 || r.kind === 280 || r.kind === 276 || r.kind === 281 || r.kind === 277 && D3(r) || fn(r) && Sc(r) === 2 && D3(r) || vo(r) && fn(r.parent) && r.parent.left === r && r.parent.operatorToken.kind === 64 && k2(r.parent.right) || r.kind === 304 || r.kind === 303 && k2(r.initializer) || r.kind === 260 && Ib(r) || r.kind === 208 && Ib(r.parent.parent); + } + function k2(r) { + return e5(r) || po(r) && Um(r); + } + function C1(r, a) { + const l = N2(r); + if (l) { + const d = VC(l.expression).arguments[0]; + return Me(l.name) ? jc(Ys(YPe(d), l.name.escapedText)) : void 0; + } + if (Kn(r) || r.moduleReference.kind === 283) { + const d = Pu( + r, + dB(r) || A4(r) + ), y = M_(d); + return $p( + r, + d, + y, + /*overwriteEmpty*/ + !1 + ), y; + } + const f = Nk(r.moduleReference, a); + return Wf(r, f), f; + } + function Wf(r, a) { + if ($p( + r, + /*immediateTarget*/ + void 0, + a, + /*overwriteEmpty*/ + !1 + ) && !r.isTypeOnly) { + const l = Jd(dn(r)), f = l.kind === 281 || l.kind === 278, d = f ? p.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type : p.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type, y = f ? p._0_was_exported_here : p._0_was_imported_here, x = l.kind === 278 ? "*" : qy(l.name); + Bs(je(r.moduleReference, d), tn(l, y, x)); + } + } + function gp(r, a, l, f) { + const d = r.exports.get( + "export=" + /* ExportEquals */ + ), y = d ? Ys( + en(d), + a, + /*skipObjectFunctionPropertyAugment*/ + !0 + ) : r.exports.get(a), x = jc(y, f); + return $p( + l, + y, + x, + /*overwriteEmpty*/ + !1 + ), x; + } + function Gp(r) { + return Io(r) && !r.isExportEquals || $n( + r, + 2048 + /* Default */ + ) || Tu(r) || ig(r); + } + function gg(r) { + return Na(r) ? e.getEmitSyntaxForUsageLocation(Cr(r), r) : void 0; + } + function C2(r, a) { + return r === 99 && a === 1; + } + function t0(r, a) { + if (100 <= W && W <= 199 && gg(r) === 99) { + a ?? (a = Pu( + r, + r, + /*ignoreErrors*/ + !0 + )); + const f = a && $P(a); + return f && (tp(f) || OF(f.fileName) === ".d.json.ts"); + } + return !1; + } + function E2(r, a, l, f) { + const d = r && gg(f); + if (r && d !== void 0) { + const y = e.getImpliedNodeFormatForEmit(r); + if (d === 99 && y === 1 && 100 <= W && W <= 199) + return !0; + if (d === 99 && y === 99) + return !1; + } + if (!_e) + return !1; + if (!r || r.isDeclarationFile) { + const y = gp( + a, + "default", + /*sourceNode*/ + void 0, + /*dontResolveAlias*/ + !0 + ); + return !(y && at(y.declarations, Gp) || gp( + a, + Zo("__esModule"), + /*sourceNode*/ + void 0, + l + )); + } + return Gu(r) ? typeof r.externalModuleIndicator != "object" && !gp( + a, + Zo("__esModule"), + /*sourceNode*/ + void 0, + l + ) : w1(a); + } + function Hv(r, a) { + const l = Pu(r, r.parent.moduleSpecifier); + if (l) + return aT(l, r, a); + } + function aT(r, a, l) { + var f; + let d; + YP(r) ? d = r : d = gp(r, "default", a, l); + const y = (f = r.declarations) == null ? void 0 : f.find(Ei), x = D2(a); + if (!x) + return d; + const I = t0(x, r), M = E2(y, r, l, x); + if (!d && !M && !I) + if (w1(r) && !_e) { + const z = W >= 5 ? "allowSyntheticDefaultImports" : "esModuleInterop", Se = r.exports.get( + "export=" + /* ExportEquals */ + ).valueDeclaration, pe = je(a.name, p.Module_0_can_only_be_default_imported_using_the_1_flag, Ui(r), z); + Se && Bs( + pe, + tn( + Se, + p.This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag, + z + ) + ); + } else id(a) ? w2(r, a) : ah(r, r, a, jy(a) && a.propertyName || a.name); + else if (M || I) { + const z = M_(r, l) || jc(r, l); + return $p( + a, + r, + z, + /*overwriteEmpty*/ + !1 + ), z; + } + return $p( + a, + d, + /*finalTarget*/ + void 0, + /*overwriteEmpty*/ + !1 + ), d; + } + function D2(r) { + switch (r.kind) { + case 273: + return r.parent.moduleSpecifier; + case 271: + return Mh(r.moduleReference) ? r.moduleReference.expression : void 0; + case 274: + return r.parent.parent.moduleSpecifier; + case 276: + return r.parent.parent.parent.moduleSpecifier; + case 281: + return r.parent.parent.moduleSpecifier; + default: + return E.assertNever(r); + } + } + function w2(r, a) { + var l, f, d; + if ((l = r.exports) != null && l.has(a.symbol.escapedName)) + je( + a.name, + p.Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead, + Ui(r), + Ui(a.symbol) + ); + else { + const y = je(a.name, p.Module_0_has_no_default_export, Ui(r)), x = (f = r.exports) == null ? void 0 : f.get( + "__export" + /* ExportStar */ + ); + if (x) { + const I = (d = x.declarations) == null ? void 0 : d.find( + (M) => { + var z, Y; + return !!(wc(M) && M.moduleSpecifier && ((Y = (z = Pu(M, M.moduleSpecifier)) == null ? void 0 : z.exports) != null && Y.has( + "default" + /* Default */ + ))); + } + ); + I && Bs(y, tn(I, p.export_Asterisk_does_not_re_export_a_default)); + } + } + } + function Im(r, a) { + const l = r.parent.parent.moduleSpecifier, f = Pu(r, l), d = D1( + f, + l, + a, + /*suppressInteropError*/ + !1 + ); + return $p( + r, + f, + d, + /*overwriteEmpty*/ + !1 + ), d; + } + function wk(r, a) { + const l = r.parent.moduleSpecifier, f = l && Pu(r, l), d = l && D1( + f, + l, + a, + /*suppressInteropError*/ + !1 + ); + return $p( + r, + f, + d, + /*overwriteEmpty*/ + !1 + ), d; + } + function oT(r, a) { + if (r === Ve && a === Ve) + return Ve; + if (r.flags & 790504) + return r; + const l = ca(r.flags | a.flags, r.escapedName); + return E.assert(r.declarations || a.declarations), l.declarations = hb(Wi(r.declarations, a.declarations), wy), l.parent = r.parent || a.parent, r.valueDeclaration && (l.valueDeclaration = r.valueDeclaration), a.members && (l.members = new Map(a.members)), r.exports && (l.exports = new Map(r.exports)), l; + } + function sy(r, a, l, f) { + var d; + if (r.flags & 1536) { + const y = zu(r).get(a), x = jc(y, f), I = (d = Ci(r).typeOnlyExportStarMap) == null ? void 0 : d.get(a); + return $p( + l, + y, + x, + /*overwriteEmpty*/ + !1, + I, + a + ), x; + } + } + function P2(r, a) { + if (r.flags & 3) { + const l = r.valueDeclaration.type; + if (l) + return jc(Ys(wi(l), a)); + } + } + function fd(r, a, l = !1) { + var f; + const d = dB(r) || r.moduleSpecifier, y = Pu(r, d), x = !Tn(a) && a.propertyName || a.name; + if (!Me(x) && x.kind !== 11) + return; + const I = wb(x), z = D1( + y, + d, + /*dontResolveAlias*/ + !1, + I === "default" && _e + ); + if (z && (I || x.kind === 11)) { + if (YP(y)) + return y; + let Y; + y && y.exports && y.exports.get( + "export=" + /* ExportEquals */ + ) ? Y = Ys( + en(z), + I, + /*skipObjectFunctionPropertyAugment*/ + !0 + ) : Y = P2(z, I), Y = jc(Y, l); + let Se = sy(z, I, a, l); + if (Se === void 0 && I === "default") { + const Ze = (f = y.declarations) == null ? void 0 : f.find(Ei); + (t0(d, y) || E2(Ze, y, l, d)) && (Se = M_(y, l) || jc(y, l)); + } + const pe = Se && Y && Se !== Y ? oT(Y, Se) : Se || Y; + return jy(a) && t0(d, y) && I !== "default" ? je(x, p.Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0, uC[W]) : pe || ah(y, z, r, x), pe; + } + } + function ah(r, a, l, f) { + var d; + const y = oy(r, l), x = co(f), I = Me(f) ? Ede(f, a) : void 0; + if (I !== void 0) { + const M = Ui(I), z = je(f, p._0_has_no_exported_member_named_1_Did_you_mean_2, y, x, M); + I.valueDeclaration && Bs(z, tn(I.valueDeclaration, p._0_is_declared_here, M)); + } else + (d = r.exports) != null && d.has( + "default" + /* Default */ + ) ? je( + f, + p.Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead, + y, + x + ) : oh(l, f, x, r, y); + } + function oh(r, a, l, f, d) { + var y, x; + const I = (x = (y = jn(f.valueDeclaration, Ym)) == null ? void 0 : y.locals) == null ? void 0 : x.get(wb(a)), M = f.exports; + if (I) { + const z = M?.get( + "export=" + /* ExportEquals */ + ); + if (z) + pd(z, I) ? E1(r, a, l, d) : je(a, p.Module_0_has_no_exported_member_1, d, l); + else { + const Y = M ? Pn(wfe(M), (pe) => !!pd(pe, I)) : void 0, Se = Y ? je(a, p.Module_0_declares_1_locally_but_it_is_exported_as_2, d, l, Ui(Y)) : je(a, p.Module_0_declares_1_locally_but_it_is_not_exported, d, l); + I.declarations && Bs(Se, ...gr(I.declarations, (pe, Ze) => tn(pe, Ze === 0 ? p._0_is_declared_here : p.and_here, l))); + } + } else + je(a, p.Module_0_has_no_exported_member_1, d, l); + } + function E1(r, a, l, f) { + if (W >= 5) { + const d = Hg(F) ? p._0_can_only_be_imported_by_using_a_default_import : p._0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import; + je(a, d, l); + } else if (an(r)) { + const d = Hg(F) ? p._0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import : p._0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import; + je(a, d, l); + } else { + const d = Hg(F) ? p._0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import : p._0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import; + je(a, d, l, l, f); + } + } + function wl(r, a) { + if (ju(r) && Km(r.propertyName || r.name)) { + const x = D2(r), I = x && Pu(r, x); + if (I) + return aT(I, r, a); + } + const l = ma(r) ? om(r) : r.parent.parent.parent, f = N2(l), d = fd(l, f || r, a), y = r.propertyName || r.name; + return f && d && Me(y) ? jc(Ys(en(d), y.escapedText), a) : ($p( + r, + /*immediateTarget*/ + void 0, + d, + /*overwriteEmpty*/ + !1 + ), d); + } + function N2(r) { + if (Kn(r) && r.initializer && Tn(r.initializer)) + return r.initializer; + } + function ch(r, a) { + if (bd(r.parent)) { + const l = M_(r.parent.symbol, a); + return $p( + r, + /*immediateTarget*/ + void 0, + l, + /*overwriteEmpty*/ + !1 + ), l; + } + } + function A2(r, a, l) { + const f = r.propertyName || r.name; + if (Km(f)) { + const y = D2(r), x = y && Pu(r, y); + if (x) + return aT(x, r, !!l); + } + const d = r.parent.parent.moduleSpecifier ? fd(r.parent.parent, r, l) : f.kind === 11 ? void 0 : ( + // Skip for invalid syntax like this: export { "x" } + oc( + f, + a, + /*ignoreErrors*/ + !1, + l + ) + ); + return $p( + r, + /*immediateTarget*/ + void 0, + d, + /*overwriteEmpty*/ + !1 + ), d; + } + function Pk(r, a) { + const l = Io(r) ? r.expression : r.right, f = Fm(l, a); + return $p( + r, + /*immediateTarget*/ + void 0, + f, + /*overwriteEmpty*/ + !1 + ), f; + } + function Fm(r, a) { + if (Gc(r)) + return uc(r).symbol; + if (!Hu(r) && !_o(r)) + return; + const l = oc( + r, + 901119, + /*ignoreErrors*/ + !0, + a + ); + return l || (uc(r), yn(r).resolvedSymbol); + } + function aE(r, a) { + if (fn(r.parent) && r.parent.left === r && r.parent.operatorToken.kind === 64) + return Fm(r.parent.right, a); + } + function ay(r, a = !1) { + switch (r.kind) { + case 271: + case 260: + return C1(r, a); + case 273: + return Hv(r, a); + case 274: + return Im(r, a); + case 280: + return wk(r, a); + case 276: + case 208: + return wl(r, a); + case 281: + return A2(r, 901119, a); + case 277: + case 226: + return Pk(r, a); + case 270: + return ch(r, a); + case 304: + return oc( + r.name, + 901119, + /*ignoreErrors*/ + !0, + a + ); + case 303: + return Fm(r.initializer, a); + case 212: + case 211: + return aE(r, a); + default: + return E.fail(); + } + } + function cT(r, a = 901119) { + return r ? (r.flags & (2097152 | a)) === 2097152 || !!(r.flags & 2097152 && r.flags & 67108864) : !1; + } + function jc(r, a) { + return !a && cT(r) ? Pl(r) : r; + } + function Pl(r) { + E.assert((r.flags & 2097152) !== 0, "Should only get Alias here."); + const a = Ci(r); + if (a.aliasTarget) + a.aliasTarget === K && (a.aliasTarget = Ve); + else { + a.aliasTarget = K; + const l = ru(r); + if (!l) return E.fail(); + const f = ay(l); + a.aliasTarget === K ? a.aliasTarget = f || Ve : je(l, p.Circular_definition_of_import_alias_0, Ui(r)); + } + return a.aliasTarget; + } + function Gv(r) { + if (Ci(r).aliasTarget !== K) + return Pl(r); + } + function pu(r, a, l) { + const f = a && Jd(r), d = f && wc(f), y = f && (d ? Pu( + f.moduleSpecifier, + f.moduleSpecifier, + /*ignoreErrors*/ + !0 + ) : Pl(f.symbol)), x = d && y ? Uf(y) : void 0; + let I = l ? 0 : r.flags, M; + for (; r.flags & 2097152; ) { + const z = gl(Pl(r)); + if (!d && z === y || x?.get(z.escapedName) === z) + break; + if (z === Ve) + return -1; + if (z === r || M?.has(z)) + break; + z.flags & 2097152 && (M ? M.add(z) : M = /* @__PURE__ */ new Set([r, z])), I |= z.flags, r = z; + } + return I; + } + function $p(r, a, l, f, d, y) { + if (!r || Tn(r)) return !1; + const x = dn(r); + if (x0(r)) { + const M = Ci(x); + return M.typeOnlyDeclaration = r, !0; + } + if (d) { + const M = Ci(x); + return M.typeOnlyDeclaration = d, x.escapedName !== y && (M.typeOnlyExportStarName = y), !0; + } + const I = Ci(x); + return oE(I, a, f) || oE(I, l, f); + } + function oE(r, a, l) { + var f; + if (a && (r.typeOnlyDeclaration === void 0 || l && r.typeOnlyDeclaration === !1)) { + const d = ((f = a.exports) == null ? void 0 : f.get( + "export=" + /* ExportEquals */ + )) ?? a, y = d.declarations && Pn(d.declarations, x0); + r.typeOnlyDeclaration = y ?? Ci(d).typeOnlyDeclaration ?? !1; + } + return !!r.typeOnlyDeclaration; + } + function Jd(r, a) { + var l; + if (!(r.flags & 2097152)) + return; + const f = Ci(r); + if (f.typeOnlyDeclaration === void 0) { + f.typeOnlyDeclaration = !1; + const d = jc(r); + $p( + (l = r.declarations) == null ? void 0 : l[0], + ru(r) && J$(r), + d, + /*overwriteEmpty*/ + !0 + ); + } + if (a === void 0) + return f.typeOnlyDeclaration || void 0; + if (f.typeOnlyDeclaration) { + const d = f.typeOnlyDeclaration.kind === 278 ? jc(Uf(f.typeOnlyDeclaration.symbol.parent).get(f.typeOnlyExportStarName || r.escapedName)) : Pl(f.typeOnlyDeclaration.symbol); + return pu(d) & a ? f.typeOnlyDeclaration : void 0; + } + } + function Nk(r, a) { + return r.kind === 80 && H4(r) && (r = r.parent), r.kind === 80 || r.parent.kind === 166 ? oc( + r, + 1920, + /*ignoreErrors*/ + !1, + a + ) : (E.assert( + r.parent.kind === 271 + /* ImportEqualsDeclaration */ + ), oc( + r, + 901119, + /*ignoreErrors*/ + !1, + a + )); + } + function oy(r, a) { + return r.parent ? oy(r.parent, a) + "." + Ui(r) : Ui( + r, + a, + /*meaning*/ + void 0, + 36 + /* AllowAnyNodeKind */ + ); + } + function Ak(r) { + for (; Xu(r.parent); ) + r = r.parent; + return r; + } + function Ik(r) { + let a = w_(r), l = Dt( + a, + a, + 111551, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !0 + ); + if (l) { + for (; Xu(a.parent); ) { + const f = en(l); + if (l = Ys(f, a.parent.right.escapedText), !l) + return; + a = a.parent; + } + return l; + } + } + function oc(r, a, l, f, d) { + if (tc(r)) + return; + const y = 1920 | (an(r) ? a & 111551 : 0); + let x; + if (r.kind === 80) { + const I = a === y || no(r) ? p.Cannot_find_namespace_0 : XNe(w_(r)), M = an(r) && !no(r) ? lT(r, a) : void 0; + if (x = Oa(Dt( + d || r, + r, + a, + l || M ? void 0 : I, + /*isUse*/ + !0, + /*excludeGlobals*/ + !1 + )), !x) + return Oa(M); + } else if (r.kind === 166 || r.kind === 211) { + const I = r.kind === 166 ? r.left : r.expression, M = r.kind === 166 ? r.right : r.name; + let z = oc( + I, + y, + l, + /*dontResolveAlias*/ + !1, + d + ); + if (!z || tc(M)) + return; + if (z === Ve) + return z; + if (z.valueDeclaration && an(z.valueDeclaration) && Su(F) !== 100 && Kn(z.valueDeclaration) && z.valueDeclaration.initializer && H8e(z.valueDeclaration.initializer)) { + const Y = z.valueDeclaration.initializer.arguments[0], Se = Pu(Y, Y); + if (Se) { + const pe = M_(Se); + pe && (z = pe); + } + } + if (x = Oa(fu(zu(z), M.escapedText, a)), !x && z.flags & 2097152 && (x = Oa(fu(zu(Pl(z)), M.escapedText, a))), !x) { + if (!l) { + const Y = oy(z), Se = co(M), pe = Ede(M, z); + if (pe) { + je(M, p._0_has_no_exported_member_named_1_Did_you_mean_2, Y, Se, Ui(pe)); + return; + } + const Ze = Xu(r) && Ak(r); + if (Ml && a & 788968 && Ze && !e6(Ze.parent) && Ik(Ze)) { + je( + Ze, + p._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0, + G_(Ze) + ); + return; + } + if (a & 1920 && Xu(r.parent)) { + const ht = Oa(fu( + zu(z), + M.escapedText, + 788968 + /* Type */ + )); + if (ht) { + je( + r.parent.right, + p.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1, + Ui(ht), + Pi(r.parent.right.escapedText) + ); + return; + } + } + je(M, p.Namespace_0_has_no_exported_member_1, Y, Se); + } + return; + } + } else + E.assertNever(r, "Unknown entity name kind."); + return !no(r) && Hu(r) && (x.flags & 2097152 || r.parent.kind === 277) && $p( + kB(r), + x, + /*finalTarget*/ + void 0, + /*overwriteEmpty*/ + !0 + ), x.flags & a || f ? x : Pl(x); + } + function lT(r, a) { + if (HG(r.parent)) { + const l = cE(r.parent); + if (l) + return Dt( + l, + r, + a, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !0 + ); + } + } + function cE(r) { + if (ur(r, (d) => SC(d) || d.flags & 16777216 ? Fp(d) : "quit")) + return; + const l = Ob(r); + if (l && El(l) && y3(l.expression)) { + const d = dn(l.expression.left); + if (d) + return cy(d); + } + if (l && po(l) && y3(l.parent) && El(l.parent.parent)) { + const d = dn(l.parent.left); + if (d) + return cy(d); + } + if (l && (Ip(l) || Xc(l)) && fn(l.parent.parent) && Sc(l.parent.parent) === 6) { + const d = dn(l.parent.parent.left); + if (d) + return cy(d); + } + const f = iv(r); + if (f && vs(f)) { + const d = dn(f); + return d && d.valueDeclaration; + } + } + function cy(r) { + const a = r.parent.valueDeclaration; + return a ? (I4(a) ? fx(a) : fS(a) ? F4(a) : void 0) || a : void 0; + } + function lE(r) { + const a = r.valueDeclaration; + if (!a || !an(a) || r.flags & 524288 || rv( + a, + /*isPrototypeAssignment*/ + !1 + )) + return; + const l = Kn(a) ? F4(a) : fx(a); + if (l) { + const f = R_(l); + if (f) + return Mde(f, r); + } + } + function Pu(r, a, l) { + const d = Su(F) === 1 ? p.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option : p.Cannot_find_module_0_or_its_corresponding_type_declarations; + return Fk(r, a, l ? void 0 : d, l); + } + function Fk(r, a, l, f = !1, d = !1) { + return Na(a) ? uT(r, a.text, l, f ? void 0 : a, d) : void 0; + } + function uT(r, a, l, f, d = !1) { + var y, x, I, M, z, Y, Se, pe, Ze, dt, ht; + if (f && Vi(a, "@types/")) { + const vn = p.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1, Ts = XE(a, "@types/"); + je(f, vn, Ts, a); + } + const or = QPe( + a, + /*withAugmentations*/ + !0 + ); + if (or) + return or; + const nr = Cr(r), Kr = Na(r) ? r : ((y = Lc(r) ? r : r.parent && Lc(r.parent) && r.parent.name === r ? r.parent : void 0) == null ? void 0 : y.name) || ((x = Dh(r) ? r : void 0) == null ? void 0 : x.argument.literal) || (Kn(r) && r.initializer && __( + r.initializer, + /*requireStringLiteralLikeArgument*/ + !0 + ) ? r.initializer.arguments[0] : void 0) || ((I = ur(r, _f)) == null ? void 0 : I.arguments[0]) || ((M = ur(r, U_(zo, ym, wc))) == null ? void 0 : M.moduleSpecifier) || ((z = ur(r, tv)) == null ? void 0 : z.moduleReference.expression), Vr = Kr && Na(Kr) ? e.getModeForUsageLocation(nr, Kr) : e.getDefaultResolutionModeForFile(nr), cr = Su(F), Yt = (Y = e.getResolvedModule(nr, a, Vr)) == null ? void 0 : Y.resolvedModule, pn = f && Yt && sU(F, Yt, nr), zn = Yt && (!pn || pn === p.Module_0_was_resolved_to_1_but_jsx_is_not_set) && e.getSourceFile(Yt.resolvedFileName); + if (zn) { + if (pn && je(f, pn, a, Yt.resolvedFileName), Yt.resolvedUsingTsExtension && fl(a)) { + const vn = ((Se = ur(r, zo)) == null ? void 0 : Se.importClause) || ur(r, U_(_l, wc)); + (f && vn && !vn.isTypeOnly || ur(r, _f)) && je( + f, + p.A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead, + ci(E.checkDefined(v5(a))) + ); + } else if (Yt.resolvedUsingTsExtension && !b6(F, nr.fileName)) { + const vn = ((pe = ur(r, zo)) == null ? void 0 : pe.importClause) || ur(r, U_(_l, wc)); + if (f && !(vn?.isTypeOnly || ur(r, Ed))) { + const Ts = E.checkDefined(v5(a)); + je(f, p.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled, Ts); + } + } else if (F.rewriteRelativeImportExtensions && !(r.flags & 33554432) && !fl(a) && !Dh(r) && !aZ(r)) { + const vn = S3(a, F); + if (!Yt.resolvedUsingTsExtension && vn) + je( + f, + p.This_relative_import_path_is_unsafe_to_rewrite_because_it_looks_like_a_file_name_but_actually_resolves_to_0, + fC(Xi(nr.fileName, e.getCurrentDirectory()), Yt.resolvedFileName, Nh(e)) + ); + else if (Yt.resolvedUsingTsExtension && !vn && Rb(zn, e)) + je( + f, + p.This_import_uses_a_0_extension_to_resolve_to_an_input_TypeScript_file_but_will_not_be_rewritten_during_emit_because_it_is_not_a_relative_path, + ZT(a) + ); + else if (Yt.resolvedUsingTsExtension && vn) { + const Ts = e.getResolvedProjectReferenceToRedirect(zn.path); + if (Ts) { + const bs = !e.useCaseSensitiveFileNames(), No = e.getCommonSourceDirectory(), ns = HS(Ts.commandLine, bs), xl = Df(No, ns, bs), Ko = Df(F.outDir || No, Ts.commandLine.options.outDir || ns, bs); + xl !== Ko && je( + f, + p.This_import_path_is_unsafe_to_rewrite_because_it_resolves_to_another_project_and_the_relative_path_between_the_projects_output_files_is_not_the_same_as_the_relative_path_between_its_input_files + ); + } + } + } + if (zn.symbol) { + if (f && Yt.isExternalLibraryImport && !rD(Yt.extension) && I2( + /*isError*/ + !1, + f, + nr, + Vr, + Yt, + a + ), f && (cr === 3 || cr === 99)) { + const vn = nr.impliedNodeFormat === 1 && !ur(r, _f) || !!ur(r, _l), Ts = ur(r, (bs) => Ed(bs) || wc(bs) || zo(bs) || ym(bs)); + if (vn && zn.impliedNodeFormat === 99 && !Ree(Ts)) + if (ur(r, _l)) + je(f, p.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead, a); + else { + let bs; + const No = $g(nr.fileName); + (No === ".ts" || No === ".js" || No === ".tsx" || No === ".jsx") && (bs = qj(nr)); + const ns = Ts?.kind === 272 && ((Ze = Ts.importClause) != null && Ze.isTypeOnly) ? p.Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute : Ts?.kind === 205 ? p.Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute : p.The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead; + Pa.add(Jg( + Cr(f), + f, + fs(bs, ns, a) + )); + } + } + return Oa(zn.symbol); + } + f && l && !RJ(f) && je(f, p.File_0_is_not_a_module, zn.fileName); + return; + } + if (Vp) { + const vn = FR(Vp, (Ts) => Ts.pattern, a); + if (vn) { + const Ts = dl && dl.get(a); + return Oa(Ts || vn.symbol); + } + } + if (!f) + return; + if (Yt && !rD(Yt.extension) && pn === void 0 || pn === p.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type) { + if (d) { + const vn = p.Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented; + je(f, vn, a, Yt.resolvedFileName); + } else + I2( + /*isError*/ + le && !!l, + f, + nr, + Vr, + Yt, + a + ); + return; + } + if (l) { + if (Yt) { + const vn = e.getProjectReferenceRedirect(Yt.resolvedFileName); + if (vn) { + je(f, p.Output_file_0_has_not_been_built_from_source_file_1, vn, Yt.resolvedFileName); + return; + } + } + if (pn) + je(f, pn, a, Yt.resolvedFileName); + else { + const vn = lf(a) && !_C(a), Ts = cr === 3 || cr === 99; + if (!Ub(F) && Bo( + a, + ".json" + /* Json */ + ) && cr !== 1 && N5(F)) + je(f, p.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, a); + else if (Vr === 99 && Ts && vn) { + const bs = Xi(a, Hn(nr.path)), No = (dt = tE.find(([ns, xl]) => e.fileExists(bs + ns))) == null ? void 0 : dt[1]; + No ? je(f, p.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0, a + No) : je(f, p.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path); + } else if ((ht = e.getResolvedModule(nr, a, Vr)) != null && ht.alternateResult) { + const bs = k7(nr, e, a, Vr, a); + dg( + /*isError*/ + !0, + f, + fs(bs, l, a) + ); + } else + je(f, l, a); + } + } + return; + function ci(vn) { + const Ts = eN(a, vn); + if (X3(W) || Vr === 99) { + const bs = fl(a) && b6(F); + return Ts + (vn === ".mts" || vn === ".d.mts" ? bs ? ".mts" : ".mjs" : vn === ".cts" || vn === ".d.mts" ? bs ? ".cts" : ".cjs" : bs ? ".ts" : ".js"); + } + return Ts; + } + } + function I2(r, a, l, f, { packageId: d, resolvedFileName: y }, x) { + if (RJ(a)) + return; + let I; + !vl(x) && d && (I = k7(l, e, x, f, d.name)), dg( + r, + a, + fs( + I, + p.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type, + x, + y + ) + ); + } + function M_(r, a) { + if (r?.exports) { + const l = jc(r.exports.get( + "export=" + /* ExportEquals */ + ), a), f = Ok(Oa(l), Oa(r)); + return Oa(f) || r; + } + } + function Ok(r, a) { + if (!r || r === Ve || r === a || a.exports.size === 1 || r.flags & 2097152) + return r; + const l = Ci(r); + if (l.cjsExportMerged) + return l.cjsExportMerged; + const f = r.flags & 33554432 ? r : mg(r); + return f.flags = f.flags | 512, f.exports === void 0 && (f.exports = Us()), a.exports.forEach((d, y) => { + y !== "export=" && f.exports.set(y, f.exports.has(y) ? Pm(f.exports.get(y), d) : d); + }), f === r && (Ci(f).resolvedExports = void 0, Ci(f).resolvedMembers = void 0), Ci(f).cjsExportMerged = f, l.cjsExportMerged = f; + } + function D1(r, a, l, f) { + var d; + const y = M_(r, l); + if (!l && y) { + if (!f && !(y.flags & 1539) && !Lo( + y, + 307 + /* SourceFile */ + )) { + const I = W >= 5 ? "allowSyntheticDefaultImports" : "esModuleInterop"; + return je(a, p.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export, I), y; + } + const x = a.parent; + if (zo(x) && OC(x) || _f(x)) { + const I = _f(x) ? x.arguments[0] : x.moduleSpecifier, M = en(y), z = V8e(M, y, r, I); + if (z) + return hp(y, z, x); + const Y = (d = r?.declarations) == null ? void 0 : d.find(Ei), Se = Y && C2(gg(I), e.getImpliedNodeFormatForEmit(Y)); + if (Hg(F) || Se) { + let pe = XL( + M, + 0 + /* Call */ + ); + if ((!pe || !pe.length) && (pe = XL( + M, + 1 + /* Construct */ + )), pe && pe.length || Ys( + M, + "default", + /*skipObjectFunctionPropertyAugment*/ + !0 + ) || Se) { + const Ze = M.flags & 3670016 ? q8e(M, y, r, I) : Rde(y, y.parent); + return hp(y, Ze, x); + } + } + } + } + return y; + } + function hp(r, a, l) { + const f = ca(r.flags, r.escapedName); + f.declarations = r.declarations ? r.declarations.slice() : [], f.parent = r.parent, f.links.target = r, f.links.originatingImport = l, r.valueDeclaration && (f.valueDeclaration = r.valueDeclaration), r.constEnumOnlyModule && (f.constEnumOnlyModule = !0), r.members && (f.members = new Map(r.members)), r.exports && (f.exports = new Map(r.exports)); + const d = Vd(a); + return f.links.type = Ea(f, d.members, He, He, d.indexInfos), f; + } + function w1(r) { + return r.exports.get( + "export=" + /* ExportEquals */ + ) !== void 0; + } + function _T(r) { + return wfe(Uf(r)); + } + function fT(r) { + const a = _T(r), l = M_(r); + if (l !== r) { + const f = en(l); + mT(f) && Nn(a, qa(f)); + } + return a; + } + function pT(r, a) { + Uf(r).forEach((d, y) => { + Yn(y) || a(d, y); + }); + const f = M_(r); + if (f !== r) { + const d = en(f); + mT(d) && oet(d, (y, x) => { + a(y, x); + }); + } + } + function dT(r, a) { + const l = Uf(a); + if (l) + return l.get(r); + } + function $v(r, a) { + const l = dT(r, a); + if (l) + return l; + const f = M_(a); + if (f === a) + return; + const d = en(f); + return mT(d) ? Ys(d, r) : void 0; + } + function mT(r) { + return !(r.flags & 402784252 || Cn(r) & 1 || // `isArrayOrTupleLikeType` is too expensive to use in this auto-imports hot path + Tp(r) || ga(r)); + } + function zu(r) { + return r.flags & 6256 ? pfe( + r, + "resolvedExports" + /* resolvedExports */ + ) : r.flags & 1536 ? Uf(r) : r.exports || A; + } + function Uf(r) { + const a = Ci(r); + if (!a.resolvedExports) { + const { exports: l, typeOnlyExportStarMap: f } = Lk(r); + a.resolvedExports = l, a.typeOnlyExportStarMap = f; + } + return a.resolvedExports; + } + function uE(r, a, l, f) { + a && a.forEach((d, y) => { + if (y === "default") return; + const x = r.get(y); + if (!x) + r.set(y, d), l && f && l.set(y, { + specifierText: qo(f.moduleSpecifier) + }); + else if (l && f && x && jc(x) !== jc(d)) { + const I = l.get(y); + I.exportsWithDuplicate ? I.exportsWithDuplicate.push(f) : I.exportsWithDuplicate = [f]; + } + }); + } + function Lk(r) { + const a = []; + let l; + const f = /* @__PURE__ */ new Set(); + r = M_(r); + const d = y(r) || A; + return l && f.forEach((x) => l.delete(x)), { + exports: d, + typeOnlyExportStarMap: l + }; + function y(x, I, M) { + if (!M && x?.exports && x.exports.forEach((Se, pe) => f.add(pe)), !(x && x.exports && Qf(a, x))) + return; + const z = new Map(x.exports), Y = x.exports.get( + "__export" + /* ExportStar */ + ); + if (Y) { + const Se = Us(), pe = /* @__PURE__ */ new Map(); + if (Y.declarations) + for (const Ze of Y.declarations) { + const dt = Pu(Ze, Ze.moduleSpecifier), ht = y(dt, Ze, M || Ze.isTypeOnly); + uE( + Se, + ht, + pe, + Ze + ); + } + pe.forEach(({ exportsWithDuplicate: Ze }, dt) => { + if (!(dt === "export=" || !(Ze && Ze.length) || z.has(dt))) + for (const ht of Ze) + Pa.add(tn( + ht, + p.Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity, + pe.get(dt).specifierText, + Pi(dt) + )); + }), uE(z, Se); + } + return I?.isTypeOnly && (l ?? (l = /* @__PURE__ */ new Map()), z.forEach( + (Se, pe) => l.set( + pe, + I + ) + )), z; + } + } + function Oa(r) { + let a; + return r && r.mergeId && (a = Gn[r.mergeId]) ? a : r; + } + function dn(r) { + return Oa(r.symbol && OG(r.symbol)); + } + function R_(r) { + return bd(r) ? dn(r) : void 0; + } + function af(r) { + return Oa(r.parent && OG(r.parent)); + } + function gT(r) { + var a, l; + return (((a = r.valueDeclaration) == null ? void 0 : a.kind) === 219 || ((l = r.valueDeclaration) == null ? void 0 : l.kind) === 218) && R_(r.valueDeclaration.parent) || r; + } + function Mk(r, a) { + const l = Cr(a), f = Aa(l), d = Ci(r); + let y; + if (d.extendedContainersByFile && (y = d.extendedContainersByFile.get(f))) + return y; + if (l && l.imports) { + for (const I of l.imports) { + if (no(I)) continue; + const M = Pu( + a, + I, + /*ignoreErrors*/ + !0 + ); + !M || !Xv(M, r) || (y = Pr(y, M)); + } + if (Ir(y)) + return (d.extendedContainersByFile || (d.extendedContainersByFile = /* @__PURE__ */ new Map())).set(f, y), y; + } + if (d.extendedContainers) + return d.extendedContainers; + const x = e.getSourceFiles(); + for (const I of x) { + if (!el(I)) continue; + const M = dn(I); + Xv(M, r) && (y = Pr(y, M)); + } + return d.extendedContainers = y || He; + } + function Rk(r, a, l) { + const f = af(r); + if (f && !(r.flags & 262144)) + return M(f); + const d = Li(r.declarations, (Y) => { + if (!Ou(Y) && Y.parent) { + if (A1(Y.parent)) + return dn(Y.parent); + if (dm(Y.parent) && Y.parent.parent && M_(dn(Y.parent.parent)) === r) + return dn(Y.parent.parent); + } + if (Gc(Y) && fn(Y.parent) && Y.parent.operatorToken.kind === 64 && vo(Y.parent.left) && _o(Y.parent.left.expression)) + return Wg(Y.parent.left) || hS(Y.parent.left.expression) ? dn(Cr(Y)) : (uc(Y.parent.left.expression), yn(Y.parent.left.expression).resolvedSymbol); + }); + if (!Ir(d)) + return; + const y = Li(d, (Y) => Xv(Y, r) ? Y : void 0); + let x = [], I = []; + for (const Y of y) { + const [Se, ...pe] = M(Y); + x = Pr(x, Se), I = Nn(I, pe); + } + return Wi(x, I); + function M(Y) { + const Se = Li(Y.declarations, z), pe = a && Mk(r, a), Ze = P1(Y, l); + if (a && Y.flags & uh(l) && Wu( + Y, + a, + 1920, + /*useOnlyExternalAliasing*/ + !1 + )) + return Pr(Wi(Wi([Y], Se), pe), Ze); + const dt = !(Y.flags & uh(l)) && Y.flags & 788968 && ko(Y).flags & 524288 && l === 111551 ? r0(a, (or) => al(or, (nr) => { + if (nr.flags & uh(l) && en(nr) === ko(Y)) + return nr; + })) : void 0; + let ht = dt ? [dt, ...Se, Y] : [...Se, Y]; + return ht = Pr(ht, Ze), ht = Nn(ht, pe), ht; + } + function z(Y) { + return f && hT(Y, f); + } + } + function P1(r, a) { + const l = !!Ir(r.declarations) && ya(r.declarations); + if (a & 111551 && l && l.parent && Kn(l.parent) && (oa(l) && l === l.parent.initializer || Qu(l) && l === l.parent.type)) + return dn(l.parent); + } + function hT(r, a) { + const l = Kv(r), f = l && l.exports && l.exports.get( + "export=" + /* ExportEquals */ + ); + return f && pd(f, a) ? l : void 0; + } + function Xv(r, a) { + if (r === af(a)) + return a; + const l = r.exports && r.exports.get( + "export=" + /* ExportEquals */ + ); + if (l && pd(l, a)) + return r; + const f = zu(r), d = f.get(a.escapedName); + return d && pd(d, a) ? d : al(f, (y) => { + if (pd(y, a)) + return y; + }); + } + function pd(r, a) { + if (Oa(jc(Oa(r))) === Oa(jc(Oa(a)))) + return r; + } + function gl(r) { + return Oa(r && (r.flags & 1048576) !== 0 && r.exportSymbol || r); + } + function lh(r, a) { + return !!(r.flags & 111551 || r.flags & 2097152 && pu(r, !a) & 111551); + } + function Om(r) { + var a; + const l = new c(Wr, r); + return u++, l.id = u, (a = nn) == null || a.recordType(l), l; + } + function Xp(r, a) { + const l = Om(r); + return l.symbol = a, l; + } + function _E(r) { + return new c(Wr, r); + } + function Bc(r, a, l = 0, f) { + k(a, f); + const d = Om(r); + return d.intrinsicName = a, d.debugIntrinsicName = f, d.objectFlags = l | 524288 | 2097152 | 33554432 | 16777216, d; + } + function k(r, a) { + const l = `${r},${a ?? ""}`; + Ke.has(l) && E.fail(`Duplicate intrinsic type name ${r}${a ? ` (${a})` : ""}; you may need to pass a name to createIntrinsicType.`), Ke.add(l); + } + function ce(r, a) { + const l = Xp(524288, a); + return l.objectFlags = r, l.members = void 0, l.properties = void 0, l.callSignatures = void 0, l.constructSignatures = void 0, l.indexInfos = void 0, l; + } + function mt() { + return Qn(Ki(lne.keys(), x_)); + } + function sr(r) { + return Xp(262144, r); + } + function Yn(r) { + return r.charCodeAt(0) === 95 && r.charCodeAt(1) === 95 && r.charCodeAt(2) !== 95 && r.charCodeAt(2) !== 64 && r.charCodeAt(2) !== 35; + } + function zi(r) { + let a; + return r.forEach((l, f) => { + Qi(l, f) && (a || (a = [])).push(l); + }), a || He; + } + function Qi(r, a) { + return !Yn(a) && lh(r); + } + function ds(r) { + const a = zi(r), l = JG(r); + return l ? Wi(a, [l]) : a; + } + function ws(r, a, l, f, d) { + const y = r; + return y.members = a, y.properties = He, y.callSignatures = l, y.constructSignatures = f, y.indexInfos = d, a !== A && (y.properties = zi(a)), y; + } + function Ea(r, a, l, f, d) { + return ws(ce(16, r), a, l, f, d); + } + function nu(r) { + if (r.constructSignatures.length === 0) return r; + if (r.objectTypeWithoutAbstractConstructSignatures) return r.objectTypeWithoutAbstractConstructSignatures; + const a = kn(r.constructSignatures, (f) => !(f.flags & 4)); + if (r.constructSignatures === a) return r; + const l = Ea( + r.symbol, + r.members, + r.callSignatures, + at(a) ? a : He, + r.indexInfos + ); + return r.objectTypeWithoutAbstractConstructSignatures = l, l.objectTypeWithoutAbstractConstructSignatures = l, l; + } + function r0(r, a) { + let l; + for (let f = r; f; f = f.parent) { + if (Ym(f) && f.locals && !E0(f) && (l = a( + f.locals, + /*ignoreQualification*/ + void 0, + /*isLocalNameLookup*/ + !0, + f + ))) + return l; + switch (f.kind) { + case 307: + if (!$_(f)) + break; + // falls through + case 267: + const d = dn(f); + if (l = a( + d?.exports || A, + /*ignoreQualification*/ + void 0, + /*isLocalNameLookup*/ + !0, + f + )) + return l; + break; + case 263: + case 231: + case 264: + let y; + if ((dn(f).members || A).forEach((x, I) => { + x.flags & 788968 && (y || (y = Us())).set(I, x); + }), y && (l = a( + y, + /*ignoreQualification*/ + void 0, + /*isLocalNameLookup*/ + !1, + f + ))) + return l; + break; + } + } + return a( + Oe, + /*ignoreQualification*/ + void 0, + /*isLocalNameLookup*/ + !0 + ); + } + function uh(r) { + return r === 111551 ? 111551 : 1920; + } + function Wu(r, a, l, f, d = /* @__PURE__ */ new Map()) { + if (!(r && !jk(r))) + return; + const y = Ci(r), x = y.accessibleChainCache || (y.accessibleChainCache = /* @__PURE__ */ new Map()), I = r0(a, (nr, Kr, Vr, cr) => cr), M = `${f ? 0 : 1}|${I ? Aa(I) : 0}|${l}`; + if (x.has(M)) + return x.get(M); + const z = Zs(r); + let Y = d.get(z); + Y || d.set(z, Y = []); + const Se = r0(a, pe); + return x.set(M, Se), Se; + function pe(nr, Kr, Vr) { + if (!Qf(Y, nr)) + return; + const cr = ht(nr, Kr, Vr); + return Y.pop(), cr; + } + function Ze(nr, Kr) { + return !Qv(nr, a, Kr) || // If symbol needs qualification, make sure that parent is accessible, if it is then this symbol is accessible too + !!Wu(nr.parent, a, uh(Kr), f, d); + } + function dt(nr, Kr, Vr) { + return (r === (Kr || nr) || Oa(r) === Oa(Kr || nr)) && // if the symbolFromSymbolTable is not external module (it could be if it was determined as ambient external module and would be in globals table) + // and if symbolFromSymbolTable or alias resolution matches the symbol, + // check the symbol can be qualified, it is only then this symbol is accessible + !at(nr.declarations, A1) && (Vr || Ze(Oa(nr), l)); + } + function ht(nr, Kr, Vr) { + return dt( + nr.get(r.escapedName), + /*resolvedAliasSymbol*/ + void 0, + Kr + ) ? [r] : al(nr, (Yt) => { + if (Yt.flags & 2097152 && Yt.escapedName !== "export=" && Yt.escapedName !== "default" && !(k5(Yt) && a && el(Cr(a))) && (!f || at(Yt.declarations, tv)) && (!Vr || !at(Yt.declarations, lK)) && (Kr || !Lo( + Yt, + 281 + /* ExportSpecifier */ + ))) { + const pn = Pl(Yt), zn = or(Yt, pn, Kr); + if (zn) + return zn; + } + if (Yt.escapedName === r.escapedName && Yt.exportSymbol && dt( + Oa(Yt.exportSymbol), + /*resolvedAliasSymbol*/ + void 0, + Kr + )) + return [r]; + }) || (nr === Oe ? or(he, he, Kr) : void 0); + } + function or(nr, Kr, Vr) { + if (dt(nr, Kr, Vr)) + return [nr]; + const cr = zu(Kr), Yt = cr && pe( + cr, + /*ignoreQualification*/ + !0 + ); + if (Yt && Ze(nr, uh(l))) + return [nr].concat(Yt); + } + } + function Qv(r, a, l) { + let f = !1; + return r0(a, (d) => { + let y = Oa(d.get(r.escapedName)); + if (!y) + return !1; + if (y === r) + return !0; + const x = y.flags & 2097152 && !Lo( + y, + 281 + /* ExportSpecifier */ + ); + return y = x ? Pl(y) : y, (x ? pu(y) : y.flags) & l ? (f = !0, !0) : !1; + }), f; + } + function jk(r) { + if (r.declarations && r.declarations.length) { + for (const a of r.declarations) + switch (a.kind) { + case 172: + case 174: + case 177: + case 178: + continue; + default: + return !1; + } + return !0; + } + return !1; + } + function F2(r, a) { + return N1( + r, + a, + 788968, + /*shouldComputeAliasesToMakeVisible*/ + !1, + /*allowModules*/ + !0 + ).accessibility === 0; + } + function Yv(r, a) { + return N1( + r, + a, + 111551, + /*shouldComputeAliasesToMakeVisible*/ + !1, + /*allowModules*/ + !0 + ).accessibility === 0; + } + function yT(r, a, l) { + return N1( + r, + a, + l, + /*shouldComputeAliasesToMakeVisible*/ + !1, + /*allowModules*/ + !1 + ).accessibility === 0; + } + function Zv(r, a, l, f, d, y) { + if (!Ir(r)) return; + let x, I = !1; + for (const M of r) { + const z = Wu( + M, + a, + f, + /*useOnlyExternalAliasing*/ + !1 + ); + if (z) { + x = M; + const pe = Fw(z[0], d); + if (pe) + return pe; + } + if (y && at(M.declarations, A1)) { + if (d) { + I = !0; + continue; + } + return { + accessibility: 0 + /* Accessible */ + }; + } + const Y = Rk(M, a, f), Se = Zv(Y, a, l, l === M ? uh(f) : f, d, y); + if (Se) + return Se; + } + if (I) + return { + accessibility: 0 + /* Accessible */ + }; + if (x) + return { + accessibility: 1, + errorSymbolName: Ui(l, a, f), + errorModuleName: x !== l ? Ui( + x, + a, + 1920 + /* Namespace */ + ) : void 0 + }; + } + function Qp(r, a, l, f) { + return N1( + r, + a, + l, + f, + /*allowModules*/ + !0 + ); + } + function N1(r, a, l, f, d) { + if (r && a) { + const y = Zv([r], a, r, l, f, d); + if (y) + return y; + const x = lr(r.declarations, Kv); + if (x) { + const I = Kv(a); + if (x !== I) + return { + accessibility: 2, + errorSymbolName: Ui(r, a, l), + errorModuleName: Ui(x), + errorNode: an(a) ? a : void 0 + }; + } + return { + accessibility: 1, + errorSymbolName: Ui(r, a, l) + }; + } + return { + accessibility: 0 + /* Accessible */ + }; + } + function Kv(r) { + const a = ur(r, b8); + return a && dn(a); + } + function b8(r) { + return Ou(r) || r.kind === 307 && $_(r); + } + function A1(r) { + return P7(r) || r.kind === 307 && $_(r); + } + function Fw(r, a) { + let l; + if (!Ri(kn( + r.declarations, + (y) => y.kind !== 80 + /* Identifier */ + ), f)) + return; + return { accessibility: 0, aliasesToMakeVisible: l }; + function f(y) { + var x, I; + if (!dd(y)) { + const M = Am(y); + if (M && !$n( + M, + 32 + /* Export */ + ) && // import clause without export + dd(M.parent)) + return d(y, M); + if (Kn(y) && pc(y.parent.parent) && !$n( + y.parent.parent, + 32 + /* Export */ + ) && // unexported variable statement + dd(y.parent.parent.parent)) + return d(y, y.parent.parent); + if (N7(y) && !$n( + y, + 32 + /* Export */ + ) && dd(y.parent)) + return d(y, y); + if (ma(y)) { + if (r.flags & 2097152 && an(y) && ((x = y.parent) != null && x.parent) && Kn(y.parent.parent) && ((I = y.parent.parent.parent) != null && I.parent) && pc(y.parent.parent.parent.parent) && !$n( + y.parent.parent.parent.parent, + 32 + /* Export */ + ) && y.parent.parent.parent.parent.parent && dd(y.parent.parent.parent.parent.parent)) + return d(y, y.parent.parent.parent.parent); + if (r.flags & 2) { + const z = ur(y, pc); + return $n( + z, + 32 + /* Export */ + ) ? !0 : dd(z.parent) ? d(y, z) : !1; + } + } + return !1; + } + return !0; + } + function d(y, x) { + return a && (yn(y).isVisible = !0, l = Sh(l, x)), !0; + } + } + function S8(r) { + let a; + return r.parent.kind === 186 || r.parent.kind === 233 && !im(r.parent) || r.parent.kind === 167 || r.parent.kind === 182 && r.parent.parameterName === r ? a = 1160127 : r.kind === 166 || r.kind === 211 || r.parent.kind === 271 || r.parent.kind === 166 && r.parent.left === r || r.parent.kind === 211 && r.parent.expression === r || r.parent.kind === 212 && r.parent.expression === r ? a = 1920 : a = 788968, a; + } + function T8(r, a, l = !0) { + const f = S8(r), d = w_(r), y = Dt( + a, + d.escapedText, + f, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + ); + return y && y.flags & 262144 && f & 788968 ? { + accessibility: 0 + /* Accessible */ + } : !y && Xy(d) && Qp( + dn(Lu( + d, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + )), + d, + f, + /*shouldComputeAliasesToMakeVisible*/ + !1 + ).accessibility === 0 ? { + accessibility: 0 + /* Accessible */ + } : y ? Fw(y, l) || { + accessibility: 1, + errorSymbolName: qo(d), + errorNode: d + } : { + accessibility: 3, + errorSymbolName: qo(d), + errorNode: d + }; + } + function Ui(r, a, l, f = 4, d) { + let y = 70221824, x = 0; + f & 2 && (y |= 128), f & 1 && (y |= 512), f & 8 && (y |= 16384), f & 32 && (x |= 4), f & 16 && (x |= 1); + const I = f & 4 ? ke.symbolToNode : ke.symbolToEntityName; + return d ? M(d).getText() : kC(M); + function M(z) { + const Y = I(r, l, a, y, x), Se = a?.kind === 307 ? sie() : o2(), pe = a && Cr(a); + return Se.writeNode( + 4, + Y, + /*sourceFile*/ + pe, + z + ), z; + } + } + function eb(r, a, l = 0, f, d) { + return d ? y(d).getText() : kC(y); + function y(x) { + let I; + l & 262144 ? I = f === 1 ? 185 : 184 : I = f === 1 ? 180 : 179; + const M = ke.signatureToSignatureDeclaration( + r, + I, + a, + pE(l) | 70221824 | 512 + /* WriteTypeParametersInQualifiedName */ + ), z = zW(), Y = a && Cr(a); + return z.writeNode( + 4, + M, + /*sourceFile*/ + Y, + RB(x) + ), x; + } + } + function $r(r, a, l = 1064960, f = M3("")) { + const d = F.noErrorTruncation || l & 1, y = ke.typeToTypeNode( + r, + a, + pE(l) | 70221824 | (d ? 1 : 0), + /*internalFlags*/ + void 0 + ); + if (y === void 0) return E.fail("should always get typenode"); + const x = r !== Et ? o2() : iie(), I = a && Cr(a); + x.writeNode( + 4, + y, + /*sourceFile*/ + I, + f + ); + const M = f.getText(), z = d ? Uj * 2 : x4 * 2; + return z && M && M.length >= z ? M.substr(0, z - 3) + "..." : M; + } + function Ow(r, a) { + let l = I1(r.symbol) ? $r(r, r.symbol.valueDeclaration) : $r(r), f = I1(a.symbol) ? $r(a, a.symbol.valueDeclaration) : $r(a); + return l === f && (l = fE(r), f = fE(a)), [l, f]; + } + function fE(r) { + return $r( + r, + /*enclosingDeclaration*/ + void 0, + 64 + /* UseFullyQualifiedType */ + ); + } + function I1(r) { + return r && !!r.valueDeclaration && ct(r.valueDeclaration) && !$f(r.valueDeclaration); + } + function pE(r = 0) { + return r & 848330095; + } + function x8(r) { + return !!r.symbol && !!(r.symbol.flags & 32) && (r === S_(r.symbol) || !!(r.flags & 524288) && !!(Cn(r) & 16777216)); + } + function dE(r) { + return wi(r); + } + function RL() { + return { + syntacticBuilderResolver: { + evaluateEntityNameExpression: m7e, + isExpandoFunctionDeclaration: M7e, + hasLateBindableName: N8, + shouldRemoveDeclaration(be, se) { + return !(be.internalFlags & 8 && _o(se.name.expression) && hd(se.name).flags & 1); + }, + createRecoveryBoundary(be) { + return Kr(be); + }, + isDefinitelyReferenceToGlobalSymbolObject: Tl, + getAllAccessorDeclarations: Nme, + requiresAddingImplicitUndefined(be, se, xt) { + var At; + switch (be.kind) { + case 172: + case 171: + case 348: + se ?? (se = dn(be)); + const dr = en(se); + return !!(se.flags & 4 && se.flags & 16777216 && Ax(be) && ((At = se.links) != null && At.mappedType) && jrt(dr)); + case 169: + case 341: + return aR(be, xt); + default: + E.assertNever(be); + } + }, + isOptionalParameter: O8, + isUndefinedIdentifierExpression(be) { + return E.assert(Td(be)), Cp(be) === xe; + }, + isEntityNameVisible(be, se, xt) { + return T8(se, be.enclosingDeclaration, xt); + }, + serializeExistingTypeNode(be, se, xt) { + return Qr(be, se, !!xt); + }, + serializeReturnTypeForSignature(be, se) { + const xt = be, At = Gf(se), dr = xt.enclosingSymbolTypes.get(Zs(dn(se))) ?? Bi(Ba(At), xt.mapper); + return DI(xt, At, dr); + }, + serializeTypeOfExpression(be, se) { + const xt = be, At = Bi(cf(w7e(se)), xt.mapper); + return M(At, xt); + }, + serializeTypeOfDeclaration(be, se, xt) { + var At; + const dr = be; + xt ?? (xt = dn(se)); + let Lr = (At = dr.enclosingSymbolTypes) == null ? void 0 : At.get(Zs(xt)); + return Lr === void 0 && (Lr = xt && !(xt.flags & 133120) ? Bi(cb(en(xt)), dr.mapper) : We), se && (Ii(se) || Af(se)) && aR(se, dr.enclosingDeclaration) && (Lr = gy(Lr)), JE(xt, dr, Lr); + }, + serializeNameOfParameter(be, se) { + return bs(dn(se), se, be); + }, + serializeEntityName(be, se) { + const xt = be, At = Cp( + se, + /*ignoreErrors*/ + !0 + ); + if (At && Yv(At, xt.enclosingDeclaration)) + return zc( + At, + xt, + 1160127 + /* ExportValue */ + ); + }, + serializeTypeName(be, se, xt, At) { + return mr(be, se, xt, At); + }, + getJsDocPropertyOverride(be, se, xt) { + const At = be, dr = Me(xt.name) ? xt.name : xt.name.right, Lr = Pc(a(At, se), dr.escapedText); + return Lr && xt.typeExpression && a(At, xt.typeExpression.type) !== Lr ? M(Lr, At) : void 0; + }, + enterNewScope(be, se) { + if (vs(se) || B0(se)) { + const xt = Gf(se), At = dfe( + xt, + /*skipUnionExpanding*/ + !0 + )[0]; + return Vr(be, se, At, xt.typeParameters); + } else { + const xt = Xb(se) ? rpe(se) : [L2(dn(se.typeParameter))]; + return Vr( + be, + se, + /*expandedParams*/ + void 0, + xt + ); + } + }, + markNodeReuse(be, se, xt) { + return l(be, se, xt); + }, + trackExistingEntityName(be, se) { + return Nt(se, be); + }, + trackComputedName(be, se) { + No(se, be.enclosingDeclaration, be); + }, + getModuleSpecifierOverride(be, se, xt) { + const At = be; + if (At.bundled || At.enclosingFile !== Cr(xt)) { + let dr = xt.text; + const Lr = yn(se).resolvedSymbol, Ur = se.isTypeOf ? 111551 : 788968, ti = Lr && Qp( + Lr, + At.enclosingDeclaration, + Ur, + /*shouldComputeAliasesToMakeVisible*/ + !1 + ).accessibility === 0 && ns( + Lr, + At, + Ur, + /*yieldModuleSymbol*/ + !0 + )[0]; + if (ti && ox(ti)) + dr = Mr(ti, At); + else { + const gi = Ime(se); + gi && (dr = Mr(gi.symbol, At)); + } + return dr.includes("/node_modules/") && (At.encounteredError = !0, At.tracker.reportLikelyUnsafeImportRequiredError && At.tracker.reportLikelyUnsafeImportRequiredError(dr)), dr; + } + }, + canReuseTypeNode(be, se) { + return Fr(be, se); + }, + canReuseTypeNodeAnnotation(be, se, xt, At, dr) { + var Lr; + const Ur = be; + if (Ur.enclosingDeclaration === void 0) return !1; + At ?? (At = dn(se)); + let ti = (Lr = Ur.enclosingSymbolTypes) == null ? void 0 : Lr.get(Zs(At)); + ti === void 0 && (At.flags & 98304 ? ti = se.kind === 178 ? ly(At) : jw(At) : SS(se) ? ti = Ba(Gf(se)) : ti = en(At)); + let gi = dE(xt); + return H(gi) ? !0 : (dr && gi && (gi = gy(gi, !Ii(se))), !!gi && EI(se, ti, gi) && Ac(xt, ti)); + } + }, + typeToTypeNode: (be, se, xt, At, dr) => d(se, xt, At, dr, (Lr) => M(be, Lr)), + typePredicateToTypePredicateNode: (be, se, xt, At, dr) => d(se, xt, At, dr, (Lr) => ci(be, Lr)), + serializeTypeForExpression: (be, se, xt, At, dr) => d(se, xt, At, dr, (Lr) => ue.serializeTypeOfExpression(be, Lr)), + serializeTypeForDeclaration: (be, se, xt, At, dr, Lr) => d(xt, At, dr, Lr, (Ur) => ue.serializeTypeOfDeclaration(be, se, Ur)), + serializeReturnTypeForSignature: (be, se, xt, At, dr) => d(se, xt, At, dr, (Lr) => ue.serializeReturnTypeForSignature(be, dn(be), Lr)), + indexInfoToIndexSignatureDeclaration: (be, se, xt, At, dr) => d(se, xt, At, dr, (Lr) => or( + be, + Lr, + /*typeNode*/ + void 0 + )), + signatureToSignatureDeclaration: (be, se, xt, At, dr, Lr) => d(xt, At, dr, Lr, (Ur) => nr(be, se, Ur)), + symbolToEntityName: (be, se, xt, At, dr, Lr) => d(xt, At, dr, Lr, (Ur) => ho( + be, + Ur, + se, + /*expectsIdentifier*/ + !1 + )), + symbolToExpression: (be, se, xt, At, dr, Lr) => d(xt, At, dr, Lr, (Ur) => zc(be, Ur, se)), + symbolToTypeParameterDeclarations: (be, se, xt, At, dr) => d(se, xt, At, dr, (Lr) => Ko(be, Lr)), + symbolToParameterDeclaration: (be, se, xt, At, dr) => d(se, xt, At, dr, (Lr) => Ts(be, Lr)), + typeParameterToDeclaration: (be, se, xt, At, dr) => d(se, xt, At, dr, (Lr) => zn(be, Lr)), + symbolTableToDeclarationStatements: (be, se, xt, At, dr) => d(se, xt, At, dr, (Lr) => bn(be, Lr)), + symbolToNode: (be, se, xt, At, dr, Lr) => d(xt, At, dr, Lr, (Ur) => f(be, Ur, se)) + }; + function a(be, se, xt) { + const At = dE(se); + if (!be.mapper) return At; + const dr = Bi(At, be.mapper); + return xt && dr !== At ? void 0 : dr; + } + function l(be, se, xt) { + if ((!no(se) || !(se.flags & 16) || !be.enclosingFile || be.enclosingFile !== Cr(Jo(se))) && (se = N.cloneNode(se)), se === xt || !xt) + return se; + let At = se.original; + for (; At && At !== xt; ) + At = At.original; + return At || Sn(se, xt), be.enclosingFile && be.enclosingFile === Cr(Jo(xt)) ? ot(se, xt) : se; + } + function f(be, se, xt) { + if (se.internalFlags & 1) { + if (be.valueDeclaration) { + const dr = is(be.valueDeclaration); + if (dr && fa(dr)) return dr; + } + const At = Ci(be).nameType; + if (At && At.flags & 9216) + return se.enclosingDeclaration = At.symbol.valueDeclaration, N.createComputedPropertyName(zc(At.symbol, se, xt)); + } + return zc(be, se, xt); + } + function d(be, se, xt, At, dr) { + const Lr = At?.trackSymbol ? At.moduleResolverHost : (xt || 0) & 4 ? eRe(e) : void 0, Ur = { + enclosingDeclaration: be, + enclosingFile: be && Cr(be), + flags: se || 0, + internalFlags: xt || 0, + tracker: void 0, + encounteredError: !1, + suppressReportInferenceFallback: !1, + reportedDiagnostic: !1, + visitedTypes: void 0, + symbolDepth: void 0, + inferTypeParameters: void 0, + approximateLength: 0, + trackedSymbols: void 0, + bundled: !!F.outFile && !!be && $_(Cr(be)), + truncating: !1, + usedSymbolNames: void 0, + remappedSymbolNames: void 0, + remappedSymbolReferences: void 0, + reverseMappedStack: void 0, + mustCreateTypeParameterSymbolList: !0, + typeParameterSymbolList: void 0, + mustCreateTypeParametersNamesLookups: !0, + typeParameterNames: void 0, + typeParameterNamesByText: void 0, + typeParameterNamesByTextNextNameCount: void 0, + enclosingSymbolTypes: /* @__PURE__ */ new Map(), + mapper: void 0 + }; + Ur.tracker = new _ne(Ur, At, Lr); + const ti = dr(Ur); + return Ur.truncating && Ur.flags & 1 && Ur.tracker.reportTruncationError(), Ur.encounteredError ? void 0 : ti; + } + function y(be, se, xt) { + const At = Zs(se), dr = be.enclosingSymbolTypes.get(At); + return be.enclosingSymbolTypes.set(At, xt), Lr; + function Lr() { + dr ? be.enclosingSymbolTypes.set(At, dr) : be.enclosingSymbolTypes.delete(At); + } + } + function x(be) { + const se = be.flags, xt = be.internalFlags; + return At; + function At() { + be.flags = se, be.internalFlags = xt; + } + } + function I(be) { + return be.truncating ? be.truncating : be.truncating = be.approximateLength > (be.flags & 1 ? Uj : x4); + } + function M(be, se) { + const xt = x(se), At = z(be, se); + return xt(), At; + } + function z(be, se) { + var xt, At; + i && i.throwIfCancellationRequested && i.throwIfCancellationRequested(); + const dr = se.flags & 8388608; + if (se.flags &= -8388609, !be) { + if (!(se.flags & 262144)) { + se.encounteredError = !0; + return; + } + return se.approximateLength += 3, N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ); + } + if (se.flags & 536870912 || (be = md(be)), be.flags & 1) + return be.aliasSymbol ? N.createTypeReferenceNode(vi(be.aliasSymbol), dt(be.aliasTypeArguments, se)) : be === Et ? Gb(N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ), 3, "unresolved") : (se.approximateLength += 3, N.createKeywordTypeNode( + be === rn ? 141 : 133 + /* AnyKeyword */ + )); + if (be.flags & 2) + return N.createKeywordTypeNode( + 159 + /* UnknownKeyword */ + ); + if (be.flags & 4) + return se.approximateLength += 6, N.createKeywordTypeNode( + 154 + /* StringKeyword */ + ); + if (be.flags & 8) + return se.approximateLength += 6, N.createKeywordTypeNode( + 150 + /* NumberKeyword */ + ); + if (be.flags & 64) + return se.approximateLength += 6, N.createKeywordTypeNode( + 163 + /* BigIntKeyword */ + ); + if (be.flags & 16 && !be.aliasSymbol) + return se.approximateLength += 7, N.createKeywordTypeNode( + 136 + /* BooleanKeyword */ + ); + if (be.flags & 1056) { + if (be.symbol.flags & 8) { + const pt = af(be.symbol), $t = Zr( + pt, + se, + 788968 + /* Type */ + ); + if (ko(pt) === be) + return $t; + const It = _c(be.symbol); + return E_( + It, + 1 + /* ES5 */ + ) ? ze( + $t, + N.createTypeReferenceNode( + It, + /*typeArguments*/ + void 0 + ) + ) : Ed($t) ? ($t.isTypeOf = !0, N.createIndexedAccessTypeNode($t, N.createLiteralTypeNode(N.createStringLiteral(It)))) : Y_($t) ? N.createIndexedAccessTypeNode(N.createTypeQueryNode($t.typeName), N.createLiteralTypeNode(N.createStringLiteral(It))) : E.fail("Unhandled type node kind returned from `symbolToTypeNode`."); + } + return Zr( + be.symbol, + se, + 788968 + /* Type */ + ); + } + if (be.flags & 128) + return se.approximateLength += be.value.length + 2, N.createLiteralTypeNode(on( + N.createStringLiteral(be.value, !!(se.flags & 268435456)), + 16777216 + /* NoAsciiEscaping */ + )); + if (be.flags & 256) { + const pt = be.value; + return se.approximateLength += ("" + pt).length, N.createLiteralTypeNode(pt < 0 ? N.createPrefixUnaryExpression(41, N.createNumericLiteral(-pt)) : N.createNumericLiteral(pt)); + } + if (be.flags & 2048) + return se.approximateLength += qb(be.value).length + 1, N.createLiteralTypeNode(N.createBigIntLiteral(be.value)); + if (be.flags & 512) + return se.approximateLength += be.intrinsicName.length, N.createLiteralTypeNode(be.intrinsicName === "true" ? N.createTrue() : N.createFalse()); + if (be.flags & 8192) { + if (!(se.flags & 1048576)) { + if (Yv(be.symbol, se.enclosingDeclaration)) + return se.approximateLength += 6, Zr( + be.symbol, + se, + 111551 + /* Value */ + ); + se.tracker.reportInaccessibleUniqueSymbolError && se.tracker.reportInaccessibleUniqueSymbolError(); + } + return se.approximateLength += 13, N.createTypeOperatorNode(158, N.createKeywordTypeNode( + 155 + /* SymbolKeyword */ + )); + } + if (be.flags & 16384) + return se.approximateLength += 4, N.createKeywordTypeNode( + 116 + /* VoidKeyword */ + ); + if (be.flags & 32768) + return se.approximateLength += 9, N.createKeywordTypeNode( + 157 + /* UndefinedKeyword */ + ); + if (be.flags & 65536) + return se.approximateLength += 4, N.createLiteralTypeNode(N.createNull()); + if (be.flags & 131072) + return se.approximateLength += 5, N.createKeywordTypeNode( + 146 + /* NeverKeyword */ + ); + if (be.flags & 4096) + return se.approximateLength += 6, N.createKeywordTypeNode( + 155 + /* SymbolKeyword */ + ); + if (be.flags & 67108864) + return se.approximateLength += 6, N.createKeywordTypeNode( + 151 + /* ObjectKeyword */ + ); + if (uD(be)) + return se.flags & 4194304 && (!se.encounteredError && !(se.flags & 32768) && (se.encounteredError = !0), (At = (xt = se.tracker).reportInaccessibleThisError) == null || At.call(xt)), se.approximateLength += 4, N.createThisTypeNode(); + if (!dr && be.aliasSymbol && (se.flags & 16384 || F2(be.aliasSymbol, se.enclosingDeclaration))) { + const pt = dt(be.aliasTypeArguments, se); + return Yn(be.aliasSymbol.escapedName) && !(be.aliasSymbol.flags & 32) ? N.createTypeReferenceNode(N.createIdentifier(""), pt) : Ir(pt) === 1 && be.aliasSymbol === Br.symbol ? N.createArrayTypeNode(pt[0]) : Zr(be.aliasSymbol, se, 788968, pt); + } + const Lr = Cn(be); + if (Lr & 4) + return E.assert(!!(be.flags & 524288)), be.node ? Rs(be, Ra) : Ra(be); + if (be.flags & 262144 || Lr & 3) { + if (be.flags & 262144 && as(se.inferTypeParameters, be)) { + se.approximateLength += _c(be.symbol).length + 6; + let $t; + const It = s_(be); + if (It) { + const ar = r3e( + be, + /*omitTypeReferences*/ + !0 + ); + ar && gh(It, ar) || (se.approximateLength += 9, $t = It && M(It, se)); + } + return N.createInferTypeNode(Yt(be, se, $t)); + } + if (se.flags & 4 && be.flags & 262144) { + const $t = Da(be, se); + return se.approximateLength += An($t).length, N.createTypeReferenceNode( + N.createIdentifier(An($t)), + /*typeArguments*/ + void 0 + ); + } + if (be.symbol) + return Zr( + be.symbol, + se, + 788968 + /* Type */ + ); + const pt = (be === G || be === rt) && D && D.symbol ? (be === rt ? "sub-" : "super-") + _c(D.symbol) : "?"; + return N.createTypeReferenceNode( + N.createIdentifier(pt), + /*typeArguments*/ + void 0 + ); + } + if (be.flags & 1048576 && be.origin && (be = be.origin), be.flags & 3145728) { + const pt = be.flags & 1048576 ? jL(be.types) : be.types; + if (Ir(pt) === 1) + return M(pt[0], se); + const $t = dt( + pt, + se, + /*isBareList*/ + !0 + ); + if ($t && $t.length > 0) + return be.flags & 1048576 ? N.createUnionTypeNode($t) : N.createIntersectionTypeNode($t); + !se.encounteredError && !(se.flags & 262144) && (se.encounteredError = !0); + return; + } + if (Lr & 48) + return E.assert(!!(be.flags & 524288)), ha(be); + if (be.flags & 4194304) { + const pt = be.type; + se.approximateLength += 6; + const $t = M(pt, se); + return N.createTypeOperatorNode(143, $t); + } + if (be.flags & 134217728) { + const pt = be.texts, $t = be.types, It = N.createTemplateHead(pt[0]), ar = N.createNodeArray( + gr($t, (zr, Un) => N.createTemplateLiteralTypeSpan( + M(zr, se), + (Un < $t.length - 1 ? N.createTemplateMiddle : N.createTemplateTail)(pt[Un + 1]) + )) + ); + return se.approximateLength += 2, N.createTemplateLiteralType(It, ar); + } + if (be.flags & 268435456) { + const pt = M(be.type, se); + return Zr(be.symbol, se, 788968, [pt]); + } + if (be.flags & 8388608) { + const pt = M(be.objectType, se), $t = M(be.indexType, se); + return se.approximateLength += 2, N.createIndexedAccessTypeNode(pt, $t); + } + if (be.flags & 16777216) + return Rs(be, (pt) => Ur(pt)); + if (be.flags & 33554432) { + const pt = M(be.baseType, se), $t = EE(be) && Rfe( + "NoInfer", + /*reportErrors*/ + !1 + ); + return $t ? Zr($t, se, 788968, [pt]) : pt; + } + return E.fail("Should be unreachable."); + function Ur(pt) { + const $t = M(pt.checkType, se); + if (se.approximateLength += 15, se.flags & 4 && pt.root.isDistributive && !(pt.checkType.flags & 262144)) { + const si = sr(ca(262144, "T")), Mi = Da(si, se), Jn = N.createTypeReferenceNode(Mi); + se.approximateLength += 37; + const In = AT(pt.root.checkType, si, pt.mapper), Hi = se.inferTypeParameters; + se.inferTypeParameters = pt.root.inferTypeParameters; + const ys = M(Bi(pt.root.extendsType, In), se); + se.inferTypeParameters = Hi; + const wa = ti(Bi(a(se, pt.root.node.trueType), In)), sa = ti(Bi(a(se, pt.root.node.falseType), In)); + return N.createConditionalTypeNode( + $t, + N.createInferTypeNode(N.createTypeParameterDeclaration( + /*modifiers*/ + void 0, + N.cloneNode(Jn.typeName) + )), + N.createConditionalTypeNode( + N.createTypeReferenceNode(N.cloneNode(Mi)), + M(pt.checkType, se), + N.createConditionalTypeNode(Jn, ys, wa, sa), + N.createKeywordTypeNode( + 146 + /* NeverKeyword */ + ) + ), + N.createKeywordTypeNode( + 146 + /* NeverKeyword */ + ) + ); + } + const It = se.inferTypeParameters; + se.inferTypeParameters = pt.root.inferTypeParameters; + const ar = M(pt.extendsType, se); + se.inferTypeParameters = It; + const zr = ti(B1(pt)), Un = ti(J1(pt)); + return N.createConditionalTypeNode($t, ar, zr, Un); + } + function ti(pt) { + var $t, It, ar; + return pt.flags & 1048576 ? ($t = se.visitedTypes) != null && $t.has(jl(pt)) ? (se.flags & 131072 || (se.encounteredError = !0, (ar = (It = se.tracker) == null ? void 0 : It.reportCyclicStructureError) == null || ar.call(It)), Y(se)) : Rs(pt, (zr) => M(zr, se)) : M(pt, se); + } + function gi(pt) { + return !!W8(pt); + } + function xs(pt) { + return !!pt.target && gi(pt.target) && !gi(pt); + } + function $i(pt) { + var $t; + E.assert(!!(pt.flags & 524288)); + const It = pt.declaration.readonlyToken ? N.createToken(pt.declaration.readonlyToken.kind) : void 0, ar = pt.declaration.questionToken ? N.createToken(pt.declaration.questionToken.kind) : void 0; + let zr, Un; + const si = !TE(pt) && !(M2(pt).flags & 2) && se.flags & 4 && !(Hf(pt).flags & 262144 && (($t = s_(Hf(pt))) == null ? void 0 : $t.flags) & 4194304); + if (TE(pt)) { + if (xs(pt) && se.flags & 4) { + const wa = sr(ca(262144, "T")), sa = Da(wa, se); + Un = N.createTypeReferenceNode(sa); + } + zr = N.createTypeOperatorNode(143, Un || M(M2(pt), se)); + } else if (si) { + const wa = sr(ca(262144, "T")), sa = Da(wa, se); + Un = N.createTypeReferenceNode(sa), zr = Un; + } else + zr = M(Hf(pt), se); + const Mi = Yt(Ud(pt), se, zr), Jn = pt.declaration.nameType ? M(uy(pt), se) : void 0, In = M(p0(s0(pt), !!(Tg(pt) & 4)), se), Hi = N.createMappedTypeNode( + It, + Mi, + Jn, + ar, + In, + /*members*/ + void 0 + ); + se.approximateLength += 10; + const ys = on( + Hi, + 1 + /* SingleLine */ + ); + if (xs(pt) && se.flags & 4) { + const wa = Bi(s_(a(se, pt.declaration.typeParameter.constraint.type)) || ye, pt.mapper); + return N.createConditionalTypeNode( + M(M2(pt), se), + N.createInferTypeNode(N.createTypeParameterDeclaration( + /*modifiers*/ + void 0, + N.cloneNode(Un.typeName), + wa.flags & 2 ? void 0 : M(wa, se) + )), + ys, + N.createKeywordTypeNode( + 146 + /* NeverKeyword */ + ) + ); + } else if (si) + return N.createConditionalTypeNode( + M(Hf(pt), se), + N.createInferTypeNode(N.createTypeParameterDeclaration( + /*modifiers*/ + void 0, + N.cloneNode(Un.typeName), + N.createTypeOperatorNode(143, M(M2(pt), se)) + )), + ys, + N.createKeywordTypeNode( + 146 + /* NeverKeyword */ + ) + ); + return ys; + } + function ha(pt) { + var $t, It; + const ar = pt.id, zr = pt.symbol; + if (zr) { + if (!!(Cn(pt) & 8388608)) { + const In = pt.node; + if ($b(In) && a(se, In) === pt) { + const Hi = ue.tryReuseExistingTypeNode(se, In); + if (Hi) + return Hi; + } + return ($t = se.visitedTypes) != null && $t.has(ar) ? Y(se) : Rs(pt, ua); + } + const Mi = x8(pt) ? 788968 : 111551; + if (Um(zr.valueDeclaration)) + return Zr(zr, se, Mi); + if (zr.flags & 32 && !wG(zr) && !(zr.valueDeclaration && Zn(zr.valueDeclaration) && se.flags & 2048 && (!$c(zr.valueDeclaration) || Qp( + zr, + se.enclosingDeclaration, + Mi, + /*shouldComputeAliasesToMakeVisible*/ + !1 + ).accessibility !== 0)) || zr.flags & 896 || Un()) + return Zr(zr, se, Mi); + if ((It = se.visitedTypes) != null && It.has(ar)) { + const Jn = BL(pt); + return Jn ? Zr( + Jn, + se, + 788968 + /* Type */ + ) : Y(se); + } else + return Rs(pt, ua); + } else + return ua(pt); + function Un() { + var si; + const Mi = !!(zr.flags & 8192) && // typeof static method + at(zr.declarations, (In) => Vs(In)), Jn = !!(zr.flags & 16) && (zr.parent || // is exported function symbol + lr( + zr.declarations, + (In) => In.parent.kind === 307 || In.parent.kind === 268 + /* ModuleBlock */ + )); + if (Mi || Jn) + return (!!(se.flags & 4096) || ((si = se.visitedTypes) == null ? void 0 : si.has(ar))) && // it is type of the symbol uses itself recursively + (!(se.flags & 8) || Yv(zr, se.enclosingDeclaration)); + } + } + function Rs(pt, $t) { + var It, ar, zr; + const Un = pt.id, si = Cn(pt) & 16 && pt.symbol && pt.symbol.flags & 32, Mi = Cn(pt) & 4 && pt.node ? "N" + Aa(pt.node) : pt.flags & 16777216 ? "N" + Aa(pt.root.node) : pt.symbol ? (si ? "+" : "") + Zs(pt.symbol) : void 0; + se.visitedTypes || (se.visitedTypes = /* @__PURE__ */ new Set()), Mi && !se.symbolDepth && (se.symbolDepth = /* @__PURE__ */ new Map()); + const Jn = se.enclosingDeclaration && yn(se.enclosingDeclaration), In = `${jl(pt)}|${se.flags}|${se.internalFlags}`; + Jn && (Jn.serializedTypes || (Jn.serializedTypes = /* @__PURE__ */ new Map())); + const Hi = (It = Jn?.serializedTypes) == null ? void 0 : It.get(In); + if (Hi) + return (ar = Hi.trackedSymbols) == null || ar.forEach( + ([C_, Yd, Sy]) => se.tracker.trackSymbol( + C_, + Yd, + Sy + ) + ), Hi.truncating && (se.truncating = !0), se.approximateLength += Hi.addedLength, Vm(Hi.node); + let ys; + if (Mi) { + if (ys = se.symbolDepth.get(Mi) || 0, ys > 10) + return Y(se); + se.symbolDepth.set(Mi, ys + 1); + } + se.visitedTypes.add(Un); + const wa = se.trackedSymbols; + se.trackedSymbols = void 0; + const sa = se.approximateLength, Ic = $t(pt), Qd = se.approximateLength - sa; + return !se.reportedDiagnostic && !se.encounteredError && ((zr = Jn?.serializedTypes) == null || zr.set(In, { + node: Ic, + truncating: se.truncating, + addedLength: Qd, + trackedSymbols: se.trackedSymbols + })), se.visitedTypes.delete(Un), Mi && se.symbolDepth.set(Mi, ys), se.trackedSymbols = wa, Ic; + function Vm(C_) { + return !no(C_) && ls(C_) === C_ ? C_ : l(se, N.cloneNode(kr( + C_, + Vm, + /*context*/ + void 0, + H1, + Vm + )), C_); + } + function H1(C_, Yd, Sy, wI, db) { + return C_ && C_.length === 0 ? ot(N.createNodeArray( + /*elements*/ + void 0, + C_.hasTrailingComma + ), C_) : Or(C_, Yd, Sy, wI, db); + } + } + function ua(pt) { + if (T_(pt) || pt.containsError) + return $i(pt); + const $t = Vd(pt); + if (!$t.properties.length && !$t.indexInfos.length) { + if (!$t.callSignatures.length && !$t.constructSignatures.length) + return se.approximateLength += 2, on( + N.createTypeLiteralNode( + /*members*/ + void 0 + ), + 1 + /* SingleLine */ + ); + if ($t.callSignatures.length === 1 && !$t.constructSignatures.length) { + const si = $t.callSignatures[0]; + return nr(si, 184, se); + } + if ($t.constructSignatures.length === 1 && !$t.callSignatures.length) { + const si = $t.constructSignatures[0]; + return nr(si, 185, se); + } + } + const It = kn($t.constructSignatures, (si) => !!(si.flags & 4)); + if (at(It)) { + const si = gr(It, (Jn) => ET(Jn)); + return $t.callSignatures.length + ($t.constructSignatures.length - It.length) + $t.indexInfos.length + // exclude `prototype` when writing a class expression as a type literal, as per + // the logic in `createTypeNodesFromResolvedType`. + (se.flags & 2048 ? b0($t.properties, (Jn) => !(Jn.flags & 4194304)) : Ir($t.properties)) && si.push(nu($t)), M(ra(si), se); + } + const ar = x(se); + se.flags |= 4194304; + const zr = Ut($t); + ar(); + const Un = N.createTypeLiteralNode(zr); + return se.approximateLength += 2, on( + Un, + se.flags & 1024 ? 0 : 1 + /* SingleLine */ + ), Un; + } + function Ra(pt) { + let $t = Po(pt); + if (pt.target === Br || pt.target === Ti) { + if (se.flags & 2) { + const zr = M($t[0], se); + return N.createTypeReferenceNode(pt.target === Br ? "Array" : "ReadonlyArray", [zr]); + } + const It = M($t[0], se), ar = N.createArrayTypeNode(It); + return pt.target === Br ? ar : N.createTypeOperatorNode(148, ar); + } else if (pt.target.objectFlags & 8) { + if ($t = Wc($t, (It, ar) => p0(It, !!(pt.target.elementFlags[ar] & 2))), $t.length > 0) { + const It = py(pt), ar = dt($t.slice(0, It), se); + if (ar) { + const { labeledElementDeclarations: zr } = pt.target; + for (let si = 0; si < ar.length; si++) { + const Mi = pt.target.elementFlags[si], Jn = zr?.[si]; + Jn ? ar[si] = N.createNamedTupleMember( + Mi & 12 ? N.createToken( + 26 + /* DotDotDotToken */ + ) : void 0, + N.createIdentifier(Pi(Wde(Jn))), + Mi & 2 ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0, + Mi & 4 ? N.createArrayTypeNode(ar[si]) : ar[si] + ) : ar[si] = Mi & 12 ? N.createRestTypeNode(Mi & 4 ? N.createArrayTypeNode(ar[si]) : ar[si]) : Mi & 2 ? N.createOptionalTypeNode(ar[si]) : ar[si]; + } + const Un = on( + N.createTupleTypeNode(ar), + 1 + /* SingleLine */ + ); + return pt.target.readonly ? N.createTypeOperatorNode(148, Un) : Un; + } + } + if (se.encounteredError || se.flags & 524288) { + const It = on( + N.createTupleTypeNode([]), + 1 + /* SingleLine */ + ); + return pt.target.readonly ? N.createTypeOperatorNode(148, It) : It; + } + se.encounteredError = !0; + return; + } else { + if (se.flags & 2048 && pt.symbol.valueDeclaration && Zn(pt.symbol.valueDeclaration) && !Yv(pt.symbol, se.enclosingDeclaration)) + return ha(pt); + { + const It = pt.target.outerTypeParameters; + let ar = 0, zr; + if (It) { + const Jn = It.length; + for (; ar < Jn; ) { + const In = ar, Hi = n3e(It[ar]); + do + ar++; + while (ar < Jn && n3e(It[ar]) === Hi); + if (!SR(It, $t, In, ar)) { + const ys = dt($t.slice(In, ar), se), wa = x(se); + se.flags |= 16; + const sa = Zr(Hi, se, 788968, ys); + wa(), zr = zr ? ze(zr, sa) : sa; + } + } + } + let Un; + if ($t.length > 0) { + let Jn = 0; + if (pt.target.typeParameters && (Jn = Math.min(pt.target.typeParameters.length, $t.length), (Mm(pt, XG( + /*reportErrors*/ + !1 + )) || Mm(pt, T3e( + /*reportErrors*/ + !1 + )) || Mm(pt, KL( + /*reportErrors*/ + !1 + )) || Mm(pt, S3e( + /*reportErrors*/ + !1 + ))) && (!pt.node || !Y_(pt.node) || !pt.node.typeArguments || pt.node.typeArguments.length < Jn))) + for (; Jn > 0; ) { + const In = $t[Jn - 1], Hi = pt.target.typeParameters[Jn - 1], ys = j2(Hi); + if (!ys || !gh(In, ys)) + break; + Jn--; + } + Un = dt($t.slice(ar, Jn), se); + } + const si = x(se); + se.flags |= 16; + const Mi = Zr(pt.symbol, se, 788968, Un); + return si(), zr ? ze(zr, Mi) : Mi; + } + } + } + function ze(pt, $t) { + if (Ed(pt)) { + let It = pt.typeArguments, ar = pt.qualifier; + ar && (Me(ar) ? It !== PS(ar) && (ar = O0(N.cloneNode(ar), It)) : It !== PS(ar.right) && (ar = N.updateQualifiedName(ar, ar.left, O0(N.cloneNode(ar.right), It)))), It = $t.typeArguments; + const zr = nt($t); + for (const Un of zr) + ar = ar ? N.createQualifiedName(ar, Un) : Un; + return N.updateImportTypeNode( + pt, + pt.argument, + pt.attributes, + ar, + It, + pt.isTypeOf + ); + } else { + let It = pt.typeArguments, ar = pt.typeName; + Me(ar) ? It !== PS(ar) && (ar = O0(N.cloneNode(ar), It)) : It !== PS(ar.right) && (ar = N.updateQualifiedName(ar, ar.left, O0(N.cloneNode(ar.right), It))), It = $t.typeArguments; + const zr = nt($t); + for (const Un of zr) + ar = N.createQualifiedName(ar, Un); + return N.updateTypeReferenceNode( + pt, + ar, + It + ); + } + } + function nt(pt) { + let $t = pt.typeName; + const It = []; + for (; !Me($t); ) + It.unshift($t.right), $t = $t.left; + return It.unshift($t), It; + } + function Ut(pt) { + if (I(se)) + return se.flags & 1 ? [dD(N.createNotEmittedTypeElement(), 3, "elided")] : [N.createPropertySignature( + /*modifiers*/ + void 0, + "...", + /*questionToken*/ + void 0, + /*type*/ + void 0 + )]; + const $t = []; + for (const zr of pt.callSignatures) + $t.push(nr(zr, 179, se)); + for (const zr of pt.constructSignatures) + zr.flags & 4 || $t.push(nr(zr, 180, se)); + for (const zr of pt.indexInfos) + $t.push(or(zr, se, pt.objectFlags & 1024 ? Y(se) : void 0)); + const It = pt.properties; + if (!It) + return $t; + let ar = 0; + for (const zr of It) { + if (ar++, se.flags & 2048) { + if (zr.flags & 4194304) + continue; + sp(zr) & 6 && se.tracker.reportPrivateInBaseOfClassExpression && se.tracker.reportPrivateInBaseOfClassExpression(Pi(zr.escapedName)); + } + if (I(se) && ar + 2 < It.length - 1) { + if (se.flags & 1) { + const Un = $t.pop(); + $t.push(dD(Un, 3, `... ${It.length - ar} more elided ...`)); + } else + $t.push(N.createPropertySignature( + /*modifiers*/ + void 0, + `... ${It.length - ar} more ...`, + /*questionToken*/ + void 0, + /*type*/ + void 0 + )); + pe(It[It.length - 1], se, $t); + break; + } + pe(zr, se, $t); + } + return $t.length ? $t : void 0; + } + } + function Y(be) { + return be.approximateLength += 3, be.flags & 1 ? Gb(N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ), 3, "elided") : N.createTypeReferenceNode( + N.createIdentifier("..."), + /*typeArguments*/ + void 0 + ); + } + function Se(be, se) { + var xt; + return !!(rc(be) & 8192) && (as(se.reverseMappedStack, be) || ((xt = se.reverseMappedStack) == null ? void 0 : xt[0]) && !(Cn(_a(se.reverseMappedStack).links.propertyType) & 16) || dr()); + function dr() { + var Lr; + if ((((Lr = se.reverseMappedStack) == null ? void 0 : Lr.length) ?? 0) < 3) + return !1; + for (let Ur = 0; Ur < 3; Ur++) + if (se.reverseMappedStack[se.reverseMappedStack.length - 1 - Ur].links.mappedType.symbol !== be.links.mappedType.symbol) + return !1; + return !0; + } + } + function pe(be, se, xt) { + var At; + const dr = !!(rc(be) & 8192), Lr = Se(be, se) ? Je : M1(be), Ur = se.enclosingDeclaration; + if (se.enclosingDeclaration = void 0, se.tracker.canTrackSymbol && P8(be.escapedName)) + if (be.declarations) { + const ua = ya(be.declarations); + if (N8(ua)) + if (fn(ua)) { + const Ra = is(ua); + Ra && fo(Ra) && J3(Ra.argumentExpression) && No(Ra.argumentExpression, Ur, se); + } else + No(ua.name.expression, Ur, se); + } else + se.tracker.reportNonSerializableProperty(Ui(be)); + se.enclosingDeclaration = be.valueDeclaration || ((At = be.declarations) == null ? void 0 : At[0]) || Ur; + const ti = Nc(be, se); + if (se.enclosingDeclaration = Ur, se.approximateLength += _c(be).length + 1, be.flags & 98304) { + const ua = ly(be); + if (Lr !== ua && !H(Lr) && !H(ua)) { + const Ra = Lo( + be, + 177 + /* GetAccessor */ + ), ze = Gf(Ra); + xt.push( + Ze( + se, + nr(ze, 177, se, { name: ti }), + Ra + ) + ); + const nt = Lo( + be, + 178 + /* SetAccessor */ + ), Ut = Gf(nt); + xt.push( + Ze( + se, + nr(Ut, 178, se, { name: ti }), + nt + ) + ); + return; + } + } + const gi = be.flags & 16777216 ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0; + if (be.flags & 8208 && !_y(Lr).length && !Xd(be)) { + const ua = Ps( + Jc(Lr, (Ra) => !(Ra.flags & 32768)), + 0 + /* Call */ + ); + for (const Ra of ua) { + const ze = nr(Ra, 173, se, { name: ti, questionToken: gi }); + xt.push(Rs(ze, Ra.declaration || be.valueDeclaration)); + } + if (ua.length || !gi) + return; + } + let xs; + Se(be, se) ? xs = Y(se) : (dr && (se.reverseMappedStack || (se.reverseMappedStack = []), se.reverseMappedStack.push(be)), xs = Lr ? pb( + se, + /*declaration*/ + void 0, + Lr, + be + ) : N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ), dr && se.reverseMappedStack.pop()); + const $i = Xd(be) ? [N.createToken( + 148 + /* ReadonlyKeyword */ + )] : void 0; + $i && (se.approximateLength += 9); + const ha = N.createPropertySignature( + $i, + ti, + gi, + xs + ); + xt.push(Rs(ha, be.valueDeclaration)); + function Rs(ua, Ra) { + var ze; + const nt = (ze = be.declarations) == null ? void 0 : ze.find( + (Ut) => Ut.kind === 348 + /* JSDocPropertyTag */ + ); + if (nt) { + const Ut = LP(nt.comment); + Ut && uv(ua, [{ kind: 3, text: `* + * ` + Ut.replace(/\n/g, ` + * `) + ` + `, pos: -1, end: -1, hasTrailingNewLine: !0 }]); + } else Ra && Ze(se, ua, Ra); + return ua; + } + } + function Ze(be, se, xt) { + return be.enclosingFile && be.enclosingFile === Cr(xt) ? Hc(se, xt) : se; + } + function dt(be, se, xt) { + if (at(be)) { + if (I(se)) + if (xt) { + if (be.length > 2) + return [ + M(be[0], se), + se.flags & 1 ? Gb(N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ), 3, `... ${be.length - 2} more elided ...`) : N.createTypeReferenceNode( + `... ${be.length - 2} more ...`, + /*typeArguments*/ + void 0 + ), + M(be[be.length - 1], se) + ]; + } else return [ + se.flags & 1 ? Gb(N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ), 3, "elided") : N.createTypeReferenceNode( + "...", + /*typeArguments*/ + void 0 + ) + ]; + const dr = !(se.flags & 64) ? wp() : void 0, Lr = []; + let Ur = 0; + for (const ti of be) { + if (Ur++, I(se) && Ur + 2 < be.length - 1) { + Lr.push( + se.flags & 1 ? Gb(N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ), 3, `... ${be.length - Ur} more elided ...`) : N.createTypeReferenceNode( + `... ${be.length - Ur} more ...`, + /*typeArguments*/ + void 0 + ) + ); + const xs = M(be[be.length - 1], se); + xs && Lr.push(xs); + break; + } + se.approximateLength += 2; + const gi = M(ti, se); + gi && (Lr.push(gi), dr && wee(gi) && dr.add(gi.typeName.escapedText, [ti, Lr.length - 1])); + } + if (dr) { + const ti = x(se); + se.flags |= 64, dr.forEach((gi) => { + if (!Pee(gi, ([xs], [$i]) => ht(xs, $i))) + for (const [xs, $i] of gi) + Lr[$i] = M(xs, se); + }), ti(); + } + return Lr; + } + } + function ht(be, se) { + return be === se || !!be.symbol && be.symbol === se.symbol || !!be.aliasSymbol && be.aliasSymbol === se.aliasSymbol; + } + function or(be, se, xt) { + const At = UZ(be) || "x", dr = M(be.keyType, se), Lr = N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + At, + /*questionToken*/ + void 0, + dr, + /*initializer*/ + void 0 + ); + return xt || (xt = M(be.type || Je, se)), !be.type && !(se.flags & 2097152) && (se.encounteredError = !0), se.approximateLength += At.length + 4, N.createIndexSignature( + be.isReadonly ? [N.createToken( + 148 + /* ReadonlyKeyword */ + )] : void 0, + [Lr], + xt + ); + } + function nr(be, se, xt, At) { + var dr; + let Lr, Ur; + const ti = dfe( + be, + /*skipUnionExpanding*/ + !0 + )[0], gi = Vr(xt, be.declaration, ti, be.typeParameters, be.parameters, be.mapper); + xt.approximateLength += 3, xt.flags & 32 && be.target && be.mapper && be.target.typeParameters ? Ur = be.target.typeParameters.map((ze) => M(Bi(ze, be.mapper), xt)) : Lr = be.typeParameters && be.typeParameters.map((ze) => zn(ze, xt)); + const xs = x(xt); + xt.flags &= -257; + const $i = (at(ti, (ze) => ze !== ti[ti.length - 1] && !!(rc(ze) & 32768)) ? be.parameters : ti).map((ze) => Ts( + ze, + xt, + se === 176 + /* Constructor */ + )), ha = xt.flags & 33554432 ? void 0 : cr(be, xt); + ha && $i.unshift(ha), xs(); + const Rs = xf(xt, be); + let ua = At?.modifiers; + if (se === 185 && be.flags & 4) { + const ze = lm(ua); + ua = N.createModifiersFromModifierFlags( + ze | 64 + /* Abstract */ + ); + } + const Ra = se === 179 ? N.createCallSignature(Lr, $i, Rs) : se === 180 ? N.createConstructSignature(Lr, $i, Rs) : se === 173 ? N.createMethodSignature(ua, At?.name ?? N.createIdentifier(""), At?.questionToken, Lr, $i, Rs) : se === 174 ? N.createMethodDeclaration( + ua, + /*asteriskToken*/ + void 0, + At?.name ?? N.createIdentifier(""), + /*questionToken*/ + void 0, + Lr, + $i, + Rs, + /*body*/ + void 0 + ) : se === 176 ? N.createConstructorDeclaration( + ua, + $i, + /*body*/ + void 0 + ) : se === 177 ? N.createGetAccessorDeclaration( + ua, + At?.name ?? N.createIdentifier(""), + $i, + Rs, + /*body*/ + void 0 + ) : se === 178 ? N.createSetAccessorDeclaration( + ua, + At?.name ?? N.createIdentifier(""), + $i, + /*body*/ + void 0 + ) : se === 181 ? N.createIndexSignature(ua, $i, Rs) : se === 317 ? N.createJSDocFunctionType($i, Rs) : se === 184 ? N.createFunctionTypeNode(Lr, $i, Rs ?? N.createTypeReferenceNode(N.createIdentifier(""))) : se === 185 ? N.createConstructorTypeNode(ua, Lr, $i, Rs ?? N.createTypeReferenceNode(N.createIdentifier(""))) : se === 262 ? N.createFunctionDeclaration( + ua, + /*asteriskToken*/ + void 0, + At?.name ? Ws(At.name, Me) : N.createIdentifier(""), + Lr, + $i, + Rs, + /*body*/ + void 0 + ) : se === 218 ? N.createFunctionExpression( + ua, + /*asteriskToken*/ + void 0, + At?.name ? Ws(At.name, Me) : N.createIdentifier(""), + Lr, + $i, + Rs, + N.createBlock([]) + ) : se === 219 ? N.createArrowFunction( + ua, + Lr, + $i, + Rs, + /*equalsGreaterThanToken*/ + void 0, + N.createBlock([]) + ) : E.assertNever(se); + if (Ur && (Ra.typeArguments = N.createNodeArray(Ur)), ((dr = be.declaration) == null ? void 0 : dr.kind) === 323 && be.declaration.parent.kind === 339) { + const ze = qo( + be.declaration.parent.parent, + /*includeTrivia*/ + !0 + ).slice(2, -2).split(/\r\n|\n|\r/).map((nt) => nt.replace(/^\s+/, " ")).join(` +`); + Gb( + Ra, + 3, + ze, + /*hasTrailingNewLine*/ + !0 + ); + } + return gi?.(), Ra; + } + function Kr(be) { + i && i.throwIfCancellationRequested && i.throwIfCancellationRequested(); + let se, xt, At = !1; + const dr = be.tracker, Lr = be.trackedSymbols; + be.trackedSymbols = void 0; + const Ur = be.encounteredError; + return be.tracker = new _ne(be, { + ...dr.inner, + reportCyclicStructureError() { + ti(() => dr.reportCyclicStructureError()); + }, + reportInaccessibleThisError() { + ti(() => dr.reportInaccessibleThisError()); + }, + reportInaccessibleUniqueSymbolError() { + ti(() => dr.reportInaccessibleUniqueSymbolError()); + }, + reportLikelyUnsafeImportRequiredError($i) { + ti(() => dr.reportLikelyUnsafeImportRequiredError($i)); + }, + reportNonSerializableProperty($i) { + ti(() => dr.reportNonSerializableProperty($i)); + }, + reportPrivateInBaseOfClassExpression($i) { + ti(() => dr.reportPrivateInBaseOfClassExpression($i)); + }, + trackSymbol($i, ha, Rs) { + return (se ?? (se = [])).push([$i, ha, Rs]), !1; + }, + moduleResolverHost: be.tracker.moduleResolverHost + }, be.tracker.moduleResolverHost), { + startRecoveryScope: gi, + finalizeBoundary: xs, + markError: ti, + hadError: () => At + }; + function ti($i) { + At = !0, $i && (xt ?? (xt = [])).push($i); + } + function gi() { + const $i = se?.length ?? 0, ha = xt?.length ?? 0; + return () => { + At = !1, se && (se.length = $i), xt && (xt.length = ha); + }; + } + function xs() { + return be.tracker = dr, be.trackedSymbols = Lr, be.encounteredError = Ur, xt?.forEach(($i) => $i()), At ? !1 : (se?.forEach( + ([$i, ha, Rs]) => be.tracker.trackSymbol( + $i, + ha, + Rs + ) + ), !0); + } + } + function Vr(be, se, xt, At, dr, Lr) { + const Ur = Tf(be); + let ti, gi; + const xs = be.enclosingDeclaration, $i = be.mapper; + if (Lr && (be.mapper = Lr), be.enclosingDeclaration && se) { + let ha = function(Rs, ua) { + E.assert(be.enclosingDeclaration); + let Ra; + yn(be.enclosingDeclaration).fakeScopeForSignatureDeclaration === Rs ? Ra = be.enclosingDeclaration : be.enclosingDeclaration.parent && yn(be.enclosingDeclaration.parent).fakeScopeForSignatureDeclaration === Rs && (Ra = be.enclosingDeclaration.parent), E.assertOptionalNode(Ra, ks); + const ze = Ra?.locals ?? Us(); + let nt, Ut; + if (ua((pt, $t) => { + if (Ra) { + const It = ze.get(pt); + It ? Ut = Pr(Ut, { name: pt, oldSymbol: It }) : nt = Pr(nt, pt); + } + ze.set(pt, $t); + }), Ra) + return function() { + lr(nt, ($t) => ze.delete($t)), lr(Ut, ($t) => ze.set($t.name, $t.oldSymbol)); + }; + { + const pt = N.createBlock(He); + yn(pt).fakeScopeForSignatureDeclaration = Rs, pt.locals = ze, Fa(pt, be.enclosingDeclaration), be.enclosingDeclaration = pt; + } + }; + ti = at(xt) ? ha( + "params", + (Rs) => { + if (xt) + for (let ua = 0; ua < xt.length; ua++) { + const Ra = xt[ua], ze = dr?.[ua]; + dr && ze !== Ra ? (Rs(Ra.escapedName, Ve), ze && Rs(ze.escapedName, Ve)) : lr(Ra.declarations, (nt) => { + if (Ii(nt) && Ds(nt.name)) + return Ut(nt.name), !0; + return; + function Ut($t) { + lr($t.elements, (It) => { + switch (It.kind) { + case 232: + return; + case 208: + return pt(It); + default: + return E.assertNever(It); + } + }); + } + function pt($t) { + if (Ds($t.name)) + return Ut($t.name); + const It = dn($t); + Rs(It.escapedName, It); + } + }) || Rs(Ra.escapedName, Ra); + } + } + ) : void 0, be.flags & 4 && at(At) && (gi = ha( + "typeParams", + (Rs) => { + for (const ua of At ?? He) { + const Ra = Da(ua, be).escapedText; + Rs(Ra, ua.symbol); + } + } + )); + } + return () => { + ti?.(), gi?.(), Ur(), be.enclosingDeclaration = xs, be.mapper = $i; + }; + } + function cr(be, se) { + if (be.thisParameter) + return Ts(be.thisParameter, se); + if (be.declaration && an(be.declaration)) { + const xt = n7(be.declaration); + if (xt && xt.typeExpression) + return N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "this", + /*questionToken*/ + void 0, + M(a(se, xt.typeExpression), se) + ); + } + } + function Yt(be, se, xt) { + const At = x(se); + se.flags &= -513; + const dr = N.createModifiersFromModifierFlags(Spe(be)), Lr = Da(be, se), Ur = j2(be), ti = Ur && M(Ur, se); + return At(), N.createTypeParameterDeclaration(dr, Lr, xt, ti); + } + function pn(be, se, xt) { + return se && a(xt, se) === be && ue.tryReuseExistingTypeNode(xt, se) || M(be, xt); + } + function zn(be, se, xt = s_(be)) { + const At = xt && pn(xt, UG(be), se); + return Yt(be, se, At); + } + function ci(be, se) { + const xt = be.kind === 2 || be.kind === 3 ? N.createToken( + 131 + /* AssertsKeyword */ + ) : void 0, At = be.kind === 1 || be.kind === 3 ? on( + N.createIdentifier(be.parameterName), + 16777216 + /* NoAsciiEscaping */ + ) : N.createThisTypeNode(), dr = be.type && M(be.type, se); + return N.createTypePredicateNode(xt, At, dr); + } + function vn(be) { + const se = Lo( + be, + 169 + /* Parameter */ + ); + if (se) + return se; + if (!Rg(be)) + return Lo( + be, + 341 + /* JSDocParameterTag */ + ); + } + function Ts(be, se, xt) { + const At = vn(be), dr = en(be), Lr = pb(se, At, dr, be), Ur = !(se.flags & 8192) && xt && At && Jp(At) ? gr(Tb(At), N.cloneNode) : void 0, gi = At && Zm(At) || rc(be) & 32768 ? N.createToken( + 26 + /* DotDotDotToken */ + ) : void 0, xs = bs(be, At, se), ha = At && O8(At) || rc(be) & 16384 ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0, Rs = N.createParameterDeclaration( + Ur, + gi, + xs, + ha, + Lr, + /*initializer*/ + void 0 + ); + return se.approximateLength += _c(be).length + 3, Rs; + } + function bs(be, se, xt) { + return se && se.name ? se.name.kind === 80 ? on( + N.cloneNode(se.name), + 16777216 + /* NoAsciiEscaping */ + ) : se.name.kind === 166 ? on( + N.cloneNode(se.name.right), + 16777216 + /* NoAsciiEscaping */ + ) : At(se.name) : _c(be); + function At(dr) { + return Lr(dr); + function Lr(Ur) { + xt.tracker.canTrackSymbol && fa(Ur) && ffe(Ur) && No(Ur.expression, xt.enclosingDeclaration, xt); + let ti = kr( + Ur, + Lr, + /*context*/ + void 0, + /*nodesVisitor*/ + void 0, + Lr + ); + return ma(ti) && (ti = N.updateBindingElement( + ti, + ti.dotDotDotToken, + ti.propertyName, + ti.name, + /*initializer*/ + void 0 + )), no(ti) || (ti = N.cloneNode(ti)), on( + ti, + 16777217 + /* NoAsciiEscaping */ + ); + } + } + } + function No(be, se, xt) { + if (!xt.tracker.canTrackSymbol) return; + const At = w_(be), dr = Dt( + At, + At.escapedText, + 1160127, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !0 + ); + dr && xt.tracker.trackSymbol( + dr, + se, + 111551 + /* Value */ + ); + } + function ns(be, se, xt, At) { + return se.tracker.trackSymbol(be, se.enclosingDeclaration, xt), xl(be, se, xt, At); + } + function xl(be, se, xt, At) { + let dr; + return !(be.flags & 262144) && (se.enclosingDeclaration || se.flags & 64) && !(se.internalFlags & 4) ? (dr = E.checkDefined(Ur( + be, + xt, + /*endOfChain*/ + !0 + )), E.assert(dr && dr.length > 0)) : dr = [be], dr; + function Ur(ti, gi, xs) { + let $i = Wu(ti, se.enclosingDeclaration, gi, !!(se.flags & 128)), ha; + if (!$i || Qv($i[0], se.enclosingDeclaration, $i.length === 1 ? gi : uh(gi))) { + const ua = Rk($i ? $i[0] : ti, se.enclosingDeclaration, gi); + if (Ir(ua)) { + ha = ua.map( + (nt) => at(nt.declarations, A1) ? Mr(nt, se) : void 0 + ); + const Ra = ua.map((nt, Ut) => Ut); + Ra.sort(Rs); + const ze = Ra.map((nt) => ua[nt]); + for (const nt of ze) { + const Ut = Ur( + nt, + uh(gi), + /*endOfChain*/ + !1 + ); + if (Ut) { + if (nt.exports && nt.exports.get( + "export=" + /* ExportEquals */ + ) && pd(nt.exports.get( + "export=" + /* ExportEquals */ + ), ti)) { + $i = Ut; + break; + } + $i = Ut.concat($i || [Xv(nt, ti) || ti]); + break; + } + } + } + } + if ($i) + return $i; + if ( + // If this is the last part of outputting the symbol, always output. The cases apply only to parent symbols. + xs || // If a parent symbol is an anonymous type, don't write it. + !(ti.flags & 6144) + ) + return !xs && !At && lr(ti.declarations, A1) ? void 0 : [ti]; + function Rs(ua, Ra) { + const ze = ha[ua], nt = ha[Ra]; + if (ze && nt) { + const Ut = lf(nt); + return lf(ze) === Ut ? lO(ze) - lO(nt) : Ut ? -1 : 1; + } + return 0; + } + } + } + function Ko(be, se) { + let xt; + return BE(be).flags & 524384 && (xt = N.createNodeArray(gr(zd(be), (dr) => zn(dr, se)))), xt; + } + function kl(be, se, xt) { + var At; + E.assert(be && 0 <= se && se < be.length); + const dr = be[se], Lr = Zs(dr); + if ((At = xt.typeParameterSymbolList) != null && At.has(Lr)) + return; + xt.mustCreateTypeParameterSymbolList && (xt.mustCreateTypeParameterSymbolList = !1, xt.typeParameterSymbolList = new Set(xt.typeParameterSymbolList)), xt.typeParameterSymbolList.add(Lr); + let Ur; + if (xt.flags & 512 && se < be.length - 1) { + const ti = dr, gi = be[se + 1]; + if (rc(gi) & 1) { + const xs = ufe( + ti.flags & 2097152 ? Pl(ti) : ti + ); + Ur = dt(gr(xs, ($i) => dy($i, gi.links.mapper)), xt); + } else + Ur = Ko(dr, xt); + } + return Ur; + } + function Sr(be) { + return Qb(be.objectType) ? Sr(be.objectType) : be; + } + function Mr(be, se, xt) { + let At = Lo( + be, + 307 + /* SourceFile */ + ); + if (!At) { + const ha = Dc(be.declarations, (Rs) => hT(Rs, be)); + ha && (At = Lo( + ha, + 307 + /* SourceFile */ + )); + } + if (At && At.moduleName !== void 0) + return At.moduleName; + if (!At && cne.test(be.escapedName)) + return be.escapedName.substring(1, be.escapedName.length - 1); + if (!se.enclosingFile || !se.tracker.moduleResolverHost) + return cne.test(be.escapedName) ? be.escapedName.substring(1, be.escapedName.length - 1) : Cr(tB(be)).fileName; + const dr = Jo(se.enclosingDeclaration), Lr = mK(dr) ? px(dr) : void 0, Ur = se.enclosingFile, ti = xt || Lr && e.getModeForUsageLocation(Ur, Lr) || Ur && e.getDefaultResolutionModeForFile(Ur), gi = MD(Ur.path, ti), xs = Ci(be); + let $i = xs.specifierCache && xs.specifierCache.get(gi); + if (!$i) { + const ha = !!F.outFile, { moduleResolverHost: Rs } = se.tracker, ua = ha ? { ...F, baseUrl: Rs.getCommonSourceDirectory() } : F; + $i = ya(i1e( + be, + Wr, + ua, + Ur, + Rs, + { + importModuleSpecifierPreference: ha ? "non-relative" : "project-relative", + importModuleSpecifierEnding: ha ? "minimal" : ti === 99 ? "js" : void 0 + }, + { overrideImportMode: xt } + )), xs.specifierCache ?? (xs.specifierCache = /* @__PURE__ */ new Map()), xs.specifierCache.set(gi, $i); + } + return $i; + } + function vi(be) { + const se = N.createIdentifier(Pi(be.escapedName)); + return be.parent ? N.createQualifiedName(vi(be.parent), se) : se; + } + function Zr(be, se, xt, At) { + const dr = ns(be, se, xt, !(se.flags & 16384)), Lr = xt === 111551; + if (at(dr[0].declarations, A1)) { + const gi = dr.length > 1 ? ti(dr, dr.length - 1, 1) : void 0, xs = At || kl(dr, 0, se), $i = Cr(Jo(se.enclosingDeclaration)), ha = $P(dr[0]); + let Rs, ua; + if ((Su(F) === 3 || Su(F) === 99) && ha?.impliedNodeFormat === 99 && ha.impliedNodeFormat !== $i?.impliedNodeFormat && (Rs = Mr( + dr[0], + se, + 99 + /* ESNext */ + ), ua = N.createImportAttributes( + N.createNodeArray([ + N.createImportAttribute( + N.createStringLiteral("resolution-mode"), + N.createStringLiteral("import") + ) + ]) + )), Rs || (Rs = Mr(dr[0], se)), !(se.flags & 67108864) && Su(F) !== 1 && Rs.includes("/node_modules/")) { + const ze = Rs; + if (Su(F) === 3 || Su(F) === 99) { + const nt = $i?.impliedNodeFormat === 99 ? 1 : 99; + Rs = Mr(dr[0], se, nt), Rs.includes("/node_modules/") ? Rs = ze : ua = N.createImportAttributes( + N.createNodeArray([ + N.createImportAttribute( + N.createStringLiteral("resolution-mode"), + N.createStringLiteral(nt === 99 ? "import" : "require") + ) + ]) + ); + } + ua || (se.encounteredError = !0, se.tracker.reportLikelyUnsafeImportRequiredError && se.tracker.reportLikelyUnsafeImportRequiredError(ze)); + } + const Ra = N.createLiteralTypeNode(N.createStringLiteral(Rs)); + if (se.approximateLength += Rs.length + 10, !gi || Hu(gi)) { + if (gi) { + const ze = Me(gi) ? gi : gi.right; + O0( + ze, + /*typeArguments*/ + void 0 + ); + } + return N.createImportTypeNode(Ra, ua, gi, xs, Lr); + } else { + const ze = Sr(gi), nt = ze.objectType.typeName; + return N.createIndexedAccessTypeNode(N.createImportTypeNode(Ra, ua, nt, xs, Lr), ze.indexType); + } + } + const Ur = ti(dr, dr.length - 1, 0); + if (Qb(Ur)) + return Ur; + if (Lr) + return N.createTypeQueryNode(Ur); + { + const gi = Me(Ur) ? Ur : Ur.right, xs = PS(gi); + return O0( + gi, + /*typeArguments*/ + void 0 + ), N.createTypeReferenceNode(Ur, xs); + } + function ti(gi, xs, $i) { + const ha = xs === gi.length - 1 ? At : kl(gi, xs, se), Rs = gi[xs], ua = gi[xs - 1]; + let Ra; + if (xs === 0) + se.flags |= 16777216, Ra = F1(Rs, se), se.approximateLength += (Ra ? Ra.length : 0) + 1, se.flags ^= 16777216; + else if (ua && zu(ua)) { + const nt = zu(ua); + al(nt, (Ut, pt) => { + if (pd(Ut, Rs) && !P8(pt) && pt !== "export=") + return Ra = Pi(pt), !0; + }); + } + if (Ra === void 0) { + const nt = Dc(Rs.declarations, is); + if (nt && fa(nt) && Hu(nt.expression)) { + const Ut = ti(gi, xs - 1, $i); + return Hu(Ut) ? N.createIndexedAccessTypeNode(N.createParenthesizedType(N.createTypeQueryNode(Ut)), N.createTypeQueryNode(nt.expression)) : Ut; + } + Ra = F1(Rs, se); + } + if (se.approximateLength += Ra.length + 1, !(se.flags & 16) && ua && Sg(ua) && Sg(ua).get(Rs.escapedName) && pd(Sg(ua).get(Rs.escapedName), Rs)) { + const nt = ti(gi, xs - 1, $i); + return Qb(nt) ? N.createIndexedAccessTypeNode(nt, N.createLiteralTypeNode(N.createStringLiteral(Ra))) : N.createIndexedAccessTypeNode(N.createTypeReferenceNode(nt, ha), N.createLiteralTypeNode(N.createStringLiteral(Ra))); + } + const ze = on( + N.createIdentifier(Ra), + 16777216 + /* NoAsciiEscaping */ + ); + if (ha && O0(ze, N.createNodeArray(ha)), ze.symbol = Rs, xs > $i) { + const nt = ti(gi, xs - 1, $i); + return Hu(nt) ? N.createQualifiedName(nt, ze) : E.fail("Impossible construct - an export of an indexed access cannot be reachable"); + } + return ze; + } + } + function ts(be, se, xt) { + const At = Dt( + se.enclosingDeclaration, + be, + 788968, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + ); + return At && At.flags & 262144 ? At !== xt.symbol : !1; + } + function Da(be, se) { + var xt, At, dr, Lr; + if (se.flags & 4 && se.typeParameterNames) { + const gi = se.typeParameterNames.get(jl(be)); + if (gi) + return gi; + } + let Ur = ho( + be.symbol, + se, + 788968, + /*expectsIdentifier*/ + !0 + ); + if (!(Ur.kind & 80)) + return N.createIdentifier("(Missing type parameter)"); + const ti = (At = (xt = be.symbol) == null ? void 0 : xt.declarations) == null ? void 0 : At[0]; + if (ti && Ao(ti) && (Ur = l(se, Ur, ti.name)), se.flags & 4) { + const gi = Ur.escapedText; + let xs = ((dr = se.typeParameterNamesByTextNextNameCount) == null ? void 0 : dr.get(gi)) || 0, $i = gi; + for (; (Lr = se.typeParameterNamesByText) != null && Lr.has($i) || ts($i, se, be); ) + xs++, $i = `${gi}_${xs}`; + if ($i !== gi) { + const ha = PS(Ur); + Ur = N.createIdentifier($i), O0(Ur, ha); + } + se.mustCreateTypeParametersNamesLookups && (se.mustCreateTypeParametersNamesLookups = !1, se.typeParameterNames = new Map(se.typeParameterNames), se.typeParameterNamesByTextNextNameCount = new Map(se.typeParameterNamesByTextNextNameCount), se.typeParameterNamesByText = new Set(se.typeParameterNamesByText)), se.typeParameterNamesByTextNextNameCount.set(gi, xs), se.typeParameterNames.set(jl(be), Ur), se.typeParameterNamesByText.add($i); + } + return Ur; + } + function ho(be, se, xt, At) { + const dr = ns(be, se, xt); + return At && dr.length !== 1 && !se.encounteredError && !(se.flags & 65536) && (se.encounteredError = !0), Lr(dr, dr.length - 1); + function Lr(Ur, ti) { + const gi = kl(Ur, ti, se), xs = Ur[ti]; + ti === 0 && (se.flags |= 16777216); + const $i = F1(xs, se); + ti === 0 && (se.flags ^= 16777216); + const ha = on( + N.createIdentifier($i), + 16777216 + /* NoAsciiEscaping */ + ); + return gi && O0(ha, N.createNodeArray(gi)), ha.symbol = xs, ti > 0 ? N.createQualifiedName(Lr(Ur, ti - 1), ha) : ha; + } + } + function zc(be, se, xt) { + const At = ns(be, se, xt); + return dr(At, At.length - 1); + function dr(Lr, Ur) { + const ti = kl(Lr, Ur, se), gi = Lr[Ur]; + Ur === 0 && (se.flags |= 16777216); + let xs = F1(gi, se); + Ur === 0 && (se.flags ^= 16777216); + let $i = xs.charCodeAt(0); + if (p3($i) && at(gi.declarations, A1)) + return N.createStringLiteral(Mr(gi, se)); + if (Ur === 0 || AJ(xs, R)) { + const ha = on( + N.createIdentifier(xs), + 16777216 + /* NoAsciiEscaping */ + ); + return ti && O0(ha, N.createNodeArray(ti)), ha.symbol = gi, Ur > 0 ? N.createPropertyAccessExpression(dr(Lr, Ur - 1), ha) : ha; + } else { + $i === 91 && (xs = xs.substring(1, xs.length - 1), $i = xs.charCodeAt(0)); + let ha; + if (p3($i) && !(gi.flags & 8) ? ha = N.createStringLiteral( + Op(xs).replace(/\\./g, (Rs) => Rs.substring(1)), + $i === 39 + /* singleQuote */ + ) : "" + +xs === xs && (ha = N.createNumericLiteral(+xs)), !ha) { + const Rs = on( + N.createIdentifier(xs), + 16777216 + /* NoAsciiEscaping */ + ); + ti && O0(Rs, N.createNodeArray(ti)), Rs.symbol = gi, ha = Rs; + } + return N.createElementAccessExpression(dr(Lr, Ur - 1), ha); + } + } + } + function Ta(be) { + const se = is(be); + return se ? fa(se) ? !!(Gi(se.expression).flags & 402653316) : fo(se) ? !!(Gi(se.argumentExpression).flags & 402653316) : ea(se) : !1; + } + function k_(be) { + const se = is(be); + return !!(se && ea(se) && (se.singleQuote || !no(se) && Vi(qo( + se, + /*includeTrivia*/ + !1 + ), "'"))); + } + function Nc(be, se) { + const xt = !!Ir(be.declarations) && Ri(be.declarations, Ta), At = !!Ir(be.declarations) && Ri(be.declarations, k_), dr = !!(be.flags & 8192), Lr = $o(be, se, At, xt, dr); + if (Lr) + return Lr; + const Ur = Pi(be.escapedName); + return G5(Ur, pa(F), At, xt, dr); + } + function $o(be, se, xt, At, dr) { + const Lr = Ci(be).nameType; + if (Lr) { + if (Lr.flags & 384) { + const Ur = "" + Lr.value; + return !E_(Ur, pa(F)) && (At || !Xg(Ur)) ? N.createStringLiteral(Ur, !!xt) : Xg(Ur) && Vi(Ur, "-") ? N.createComputedPropertyName(N.createPrefixUnaryExpression(41, N.createNumericLiteral(-Ur))) : G5(Ur, pa(F), xt, At, dr); + } + if (Lr.flags & 8192) + return N.createComputedPropertyName(zc( + Lr.symbol, + se, + 111551 + /* Value */ + )); + } + } + function Tf(be) { + const se = be.mustCreateTypeParameterSymbolList, xt = be.mustCreateTypeParametersNamesLookups; + be.mustCreateTypeParameterSymbolList = !0, be.mustCreateTypeParametersNamesLookups = !0; + const At = be.typeParameterNames, dr = be.typeParameterNamesByText, Lr = be.typeParameterNamesByTextNextNameCount, Ur = be.typeParameterSymbolList; + return () => { + be.typeParameterNames = At, be.typeParameterNamesByText = dr, be.typeParameterNamesByTextNextNameCount = Lr, be.typeParameterSymbolList = Ur, be.mustCreateTypeParameterSymbolList = se, be.mustCreateTypeParametersNamesLookups = xt; + }; + } + function yc(be, se) { + return be.declarations && Pn(be.declarations, (xt) => !!B7e(xt) && (!se || !!ur(xt, (At) => At === se))); + } + function Ac(be, se) { + if (!(Cn(se) & 4) || !Y_(be)) return !0; + GG(be); + const xt = yn(be).resolvedSymbol, At = xt && ko(xt); + return !At || At !== se.target ? !0 : Ir(be.typeArguments) >= kg(se.target.typeParameters); + } + function by(be) { + for (; yn(be).fakeScopeForSignatureDeclaration; ) + be = be.parent; + return be; + } + function JE(be, se, xt) { + return xt.flags & 8192 && xt.symbol === be && (!se.enclosingDeclaration || at(be.declarations, (dr) => Cr(dr) === se.enclosingFile)) && (se.flags |= 1048576), M(xt, se); + } + function pb(be, se, xt, At) { + var dr; + let Lr; + const Ur = se && (Ii(se) || Af(se)) && aR(se, be.enclosingDeclaration), ti = se ?? At.valueDeclaration ?? yc(At) ?? ((dr = At.declarations) == null ? void 0 : dr[0]); + if (ti) { + if (Jy(ti)) + Lr = ue.serializeTypeOfAccessor(ti, At, be); + else if (K5(ti) && !no(ti) && !(Cn(xt) & 196608)) { + const gi = y(be, At, xt); + Lr = ue.serializeTypeOfDeclaration(ti, At, be), gi(); + } + } + return Lr || (Ur && (xt = gy(xt)), Lr = JE(At, be, xt)), Lr ?? N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ); + } + function EI(be, se, xt) { + return xt === se ? !0 : be && ((m_(be) || ss(be)) && be.questionToken || Ii(be) && MG(be)) ? xp( + se, + 524288 + /* NEUndefined */ + ) === xt : !1; + } + function xf(be, se) { + const xt = be.flags & 256, At = x(be); + xt && (be.flags &= -257); + let dr; + const Lr = Ba(se); + if (!(xt && Ua(Lr))) { + if (se.declaration && !no(se.declaration)) { + const Ur = dn(se.declaration), ti = y(be, Ur, Lr); + dr = ue.serializeReturnTypeForSignature(se.declaration, Ur, be), ti(); + } + dr || (dr = DI(be, se, Lr)); + } + return !dr && !xt && (dr = N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + )), At(), dr; + } + function DI(be, se, xt) { + const At = be.suppressReportInferenceFallback; + be.suppressReportInferenceFallback = !0; + const dr = bp(se), Lr = dr ? ci(be.mapper ? oNe(dr, be.mapper) : dr, be) : M(xt, be); + return be.suppressReportInferenceFallback = At, Lr; + } + function Nt(be, se, xt = se.enclosingDeclaration) { + let At = !1; + const dr = w_(be); + if (an(be) && (hS(dr) || Wg(dr.parent) || Xu(dr.parent) && gB(dr.parent.left) && hS(dr.parent.right))) + return At = !0, { introducesError: At, node: be }; + const Lr = S8(be); + let Ur; + if (Xy(dr)) + return Ur = dn(Lu( + dr, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + )), Qp( + Ur, + dr, + Lr, + /*shouldComputeAliasesToMakeVisible*/ + !1 + ).accessibility !== 0 && (At = !0, se.tracker.reportInaccessibleThisError()), { introducesError: At, node: ti(be) }; + if (Ur = oc( + dr, + Lr, + /*ignoreErrors*/ + !0, + /*dontResolveAlias*/ + !0 + ), se.enclosingDeclaration && !(Ur && Ur.flags & 262144)) { + Ur = gl(Ur); + const gi = oc( + dr, + Lr, + /*ignoreErrors*/ + !0, + /*dontResolveAlias*/ + !0, + se.enclosingDeclaration + ); + if ( + // Check for unusable parameters symbols + gi === Ve || // If the symbol is not found, but was not found in the original scope either we probably have an error, don't reuse the node + gi === void 0 && Ur !== void 0 || // If the symbol is found both in declaration scope and in current scope then it should point to the same reference + gi && Ur && !pd(gl(gi), Ur) + ) + return gi !== Ve && se.tracker.reportInferenceFallback(be), At = !0, { introducesError: At, node: be, sym: Ur }; + Ur = gi; + } + if (Ur) + return Ur.flags & 1 && Ur.valueDeclaration && (av(Ur.valueDeclaration) || Af(Ur.valueDeclaration)) ? { introducesError: At, node: ti(be) } : (!(Ur.flags & 262144) && // Type parameters are visible in the current context if they are are resolvable + !tg(be) && Qp( + Ur, + xt, + Lr, + /*shouldComputeAliasesToMakeVisible*/ + !1 + ).accessibility !== 0 ? (se.tracker.reportInferenceFallback(be), At = !0) : se.tracker.trackSymbol(Ur, xt, Lr), { introducesError: At, node: ti(be) }); + return { introducesError: At, node: be }; + function ti(gi) { + if (gi === dr) { + const $i = ko(Ur), ha = Ur.flags & 262144 ? Da($i, se) : N.cloneNode(gi); + return ha.symbol = Ur, l(se, on( + ha, + 16777216 + /* NoAsciiEscaping */ + ), gi); + } + const xs = kr( + gi, + ($i) => ti($i), + /*context*/ + void 0 + ); + return xs !== gi && l(se, xs, gi), xs; + } + } + function mr(be, se, xt, At) { + const dr = xt ? 111551 : 788968, Lr = oc( + se, + dr, + /*ignoreErrors*/ + !0 + ); + if (!Lr) return; + const Ur = Lr.flags & 2097152 ? Pl(Lr) : Lr; + if (Qp( + Lr, + be.enclosingDeclaration, + dr, + /*shouldComputeAliasesToMakeVisible*/ + !1 + ).accessibility === 0) + return Zr(Ur, be, dr, At); + } + function Fr(be, se) { + const xt = a( + be, + se, + /*noMappedTypes*/ + !0 + ); + if (!xt) + return !1; + if (an(se) && Dh(se)) { + eNe(se); + const At = yn(se).resolvedSymbol; + return !At || !// The import type resolved using jsdoc fallback logic + (!se.isTypeOf && !(At.flags & 788968) || // The import type had type arguments autofilled by js fallback logic + !(Ir(se.typeArguments) >= kg(zd(At)))); + } + if (Y_(se)) { + if (Kp(se)) return !1; + const At = yn(se).resolvedSymbol; + if (!At) return !1; + if (At.flags & 262144) { + const dr = ko(At); + return !(be.mapper && dy(dr, be.mapper) !== dr); + } + if ($7(se)) + return Ac(se, xt) && !_3e(se) && !!(At.flags & 788968); + } + if (_v(se) && se.operator === 158 && se.type.kind === 155) { + const At = be.enclosingDeclaration && by(be.enclosingDeclaration); + return !!ur(se, (dr) => dr === At); + } + return !0; + } + function Qr(be, se, xt) { + const At = a(be, se); + if (xt && !kp(At, (dr) => !!(dr.flags & 32768)) && Fr(be, se)) { + const dr = ue.tryReuseExistingTypeNode(be, se); + if (dr) + return N.createUnionTypeNode([dr, N.createKeywordTypeNode( + 157 + /* UndefinedKeyword */ + )]); + } + return M(At, be); + } + function bn(be, se) { + var xt; + const At = NX( + N.createPropertyDeclaration, + 174, + /*useAccessors*/ + !0 + ), dr = NX( + (kt, Fn, li, ni) => N.createPropertySignature(kt, Fn, li, ni), + 173, + /*useAccessors*/ + !1 + ), Lr = se.enclosingDeclaration; + let Ur = []; + const ti = /* @__PURE__ */ new Set(), gi = [], xs = se; + se = { + ...xs, + usedSymbolNames: new Set(xs.usedSymbolNames), + remappedSymbolNames: /* @__PURE__ */ new Map(), + remappedSymbolReferences: new Map((xt = xs.remappedSymbolReferences) == null ? void 0 : xt.entries()), + tracker: void 0 + }; + const $i = { + ...xs.tracker.inner, + trackSymbol: (kt, Fn, li) => { + var ni, Vn; + if ((ni = se.remappedSymbolNames) != null && ni.has(Zs(kt))) return !1; + if (Qp( + kt, + Fn, + li, + /*shouldComputeAliasesToMakeVisible*/ + !1 + ).accessibility === 0) { + const $s = xl(kt, se, li); + if (!(kt.flags & 4)) { + const As = $s[0], Es = Cr(xs.enclosingDeclaration); + at(As.declarations, (Ha) => Cr(Ha) === Es) && si(As); + } + } else if ((Vn = xs.tracker.inner) != null && Vn.trackSymbol) + return xs.tracker.inner.trackSymbol(kt, Fn, li); + return !1; + } + }; + se.tracker = new _ne(se, $i, xs.tracker.moduleResolverHost), al(be, (kt, Fn) => { + const li = Pi(Fn); + Pg(kt, li); + }); + let ha = !se.bundled; + const Rs = be.get( + "export=" + /* ExportEquals */ + ); + return Rs && be.size > 1 && Rs.flags & 2098688 && (be = Us(), be.set("export=", Rs)), ar(be), pt(Ur); + function ua(kt) { + return !!kt && kt.kind === 80; + } + function Ra(kt) { + return pc(kt) ? kn(gr(kt.declarationList.declarations, is), ua) : kn([is(kt)], ua); + } + function ze(kt) { + const Fn = Pn(kt, Io), li = ec(kt, Lc); + let ni = li !== -1 ? kt[li] : void 0; + if (ni && Fn && Fn.isExportEquals && Me(Fn.expression) && Me(ni.name) && An(ni.name) === An(Fn.expression) && ni.body && dm(ni.body)) { + const Vn = kn(kt, (As) => !!(Mu(As) & 32)), $a = ni.name; + let $s = ni.body; + if (Ir(Vn) && (ni = N.updateModuleDeclaration( + ni, + ni.modifiers, + ni.name, + $s = N.updateModuleBlock( + $s, + N.createNodeArray([ + ...ni.body.statements, + N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createNamedExports(gr(na(Vn, (As) => Ra(As)), (As) => N.createExportSpecifier( + /*isTypeOnly*/ + !1, + /*propertyName*/ + void 0, + As + ))), + /*moduleSpecifier*/ + void 0 + ) + ]) + ) + ), kt = [...kt.slice(0, li), ni, ...kt.slice(li + 1)]), !Pn(kt, (As) => As !== ni && FP(As, $a))) { + Ur = []; + const As = !at($s.statements, (Es) => $n( + Es, + 32 + /* Export */ + ) || Io(Es) || wc(Es)); + lr($s.statements, (Es) => { + Jn( + Es, + As ? 32 : 0 + /* None */ + ); + }), kt = [...kn(kt, (Es) => Es !== ni && Es !== Fn), ...Ur]; + } + } + return kt; + } + function nt(kt) { + const Fn = kn(kt, (ni) => wc(ni) && !ni.moduleSpecifier && !!ni.exportClause && up(ni.exportClause)); + Ir(Fn) > 1 && (kt = [ + ...kn(kt, (Vn) => !wc(Vn) || !!Vn.moduleSpecifier || !Vn.exportClause), + N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createNamedExports(na(Fn, (Vn) => Ws(Vn.exportClause, up).elements)), + /*moduleSpecifier*/ + void 0 + ) + ]); + const li = kn(kt, (ni) => wc(ni) && !!ni.moduleSpecifier && !!ni.exportClause && up(ni.exportClause)); + if (Ir(li) > 1) { + const ni = oC(li, (Vn) => ea(Vn.moduleSpecifier) ? ">" + Vn.moduleSpecifier.text : ">"); + if (ni.length !== li.length) + for (const Vn of ni) + Vn.length > 1 && (kt = [ + ...kn(kt, ($a) => !Vn.includes($a)), + N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createNamedExports(na(Vn, ($a) => Ws($a.exportClause, up).elements)), + Vn[0].moduleSpecifier + ) + ]); + } + return kt; + } + function Ut(kt) { + const Fn = ec(kt, (li) => wc(li) && !li.moduleSpecifier && !li.attributes && !!li.exportClause && up(li.exportClause)); + if (Fn >= 0) { + const li = kt[Fn], ni = Li(li.exportClause.elements, (Vn) => { + if (!Vn.propertyName && Vn.name.kind !== 11) { + const $a = Vn.name, $s = II(kt), As = kn($s, (Es) => FP(kt[Es], $a)); + if (Ir(As) && Ri(As, (Es) => rN(kt[Es]))) { + for (const Es of As) + kt[Es] = $t(kt[Es]); + return; + } + } + return Vn; + }); + Ir(ni) ? kt[Fn] = N.updateExportDeclaration( + li, + li.modifiers, + li.isTypeOnly, + N.updateNamedExports( + li.exportClause, + ni + ), + li.moduleSpecifier, + li.attributes + ) : Ny(kt, Fn); + } + return kt; + } + function pt(kt) { + return kt = ze(kt), kt = nt(kt), kt = Ut(kt), Lr && (Ei(Lr) && $_(Lr) || Lc(Lr)) && (!at(kt, UP) || !dZ(kt) && at(kt, p7)) && kt.push(vN(N)), kt; + } + function $t(kt) { + const Fn = (Mu(kt) | 32) & -129; + return N.replaceModifiers(kt, Fn); + } + function It(kt) { + const Fn = Mu(kt) & -33; + return N.replaceModifiers(kt, Fn); + } + function ar(kt, Fn, li) { + Fn || gi.push(/* @__PURE__ */ new Map()), kt.forEach((ni) => { + zr( + ni, + /*isPrivate*/ + !1, + !!li + ); + }), Fn || (gi[gi.length - 1].forEach((ni) => { + zr( + ni, + /*isPrivate*/ + !0, + !!li + ); + }), gi.pop()); + } + function zr(kt, Fn, li) { + qa(en(kt)); + const ni = Oa(kt); + if (ti.has(Zs(ni))) + return; + if (ti.add(Zs(ni)), !Fn || Ir(kt.declarations) && at(kt.declarations, ($a) => !!ur($a, ($s) => $s === Lr))) { + const $a = Tf(se); + se.tracker.pushErrorFallbackNode(Pn(kt.declarations, ($s) => Cr($s) === se.enclosingFile)), Un(kt, Fn, li), se.tracker.popErrorFallbackNode(), $a(); + } + } + function Un(kt, Fn, li, ni = kt.escapedName) { + var Vn, $a, $s, As, Es, Ha; + const yo = Pi(ni), o_ = ni === "default"; + if (Fn && !(se.flags & 131072) && yx(yo) && !o_) { + se.encounteredError = !0; + return; + } + let Au = o_ && !!(kt.flags & -113 || kt.flags & 16 && Ir(qa(en(kt)))) && !(kt.flags & 2097152), zl = !Au && !Fn && yx(yo) && !o_; + (Au || zl) && (Fn = !0); + const Xo = (Fn ? 0 : 32) | (o_ && !Au ? 2048 : 0), Nl = kt.flags & 1536 && kt.flags & 7 && ni !== "export=", kf = Nl && PI(en(kt), kt); + if ((kt.flags & 8208 || kf) && Qd(en(kt), kt, Pg(kt, yo), Xo), kt.flags & 524288 && In(kt, yo, Xo), kt.flags & 98311 && ni !== "export=" && !(kt.flags & 4194304) && !(kt.flags & 32) && !(kt.flags & 8192) && !kf) + if (li) + lP(kt) && (zl = !1, Au = !1); + else { + const ou = en(kt), Zp = Pg(kt, yo); + if (ou.symbol && ou.symbol !== kt && ou.symbol.flags & 16 && at(ou.symbol.declarations, Ky) && ((Vn = ou.symbol.members) != null && Vn.size || ($a = ou.symbol.exports) != null && $a.size)) + se.remappedSymbolReferences || (se.remappedSymbolReferences = /* @__PURE__ */ new Map()), se.remappedSymbolReferences.set(Zs(ou.symbol), kt), Un(ou.symbol, Fn, li, ni), se.remappedSymbolReferences.delete(Zs(ou.symbol)); + else if (!(kt.flags & 16) && PI(ou, kt)) + Qd(ou, kt, Zp, Xo); + else { + const mb = kt.flags & 2 ? Yk(kt) ? 2 : 1 : ($s = kt.parent) != null && $s.valueDeclaration && Ei((As = kt.parent) == null ? void 0 : As.valueDeclaration) ? 2 : void 0, vh = Au || !(kt.flags & 4) ? Zp : cR(Zp, kt); + let Ng = kt.declarations && Pn(kt.declarations, (K2) => Kn(K2)); + Ng && Il(Ng.parent) && Ng.parent.declarations.length === 1 && (Ng = Ng.parent.parent); + const v0 = (Es = kt.declarations) == null ? void 0 : Es.find(Tn); + if (v0 && fn(v0.parent) && Me(v0.parent.right) && ((Ha = ou.symbol) != null && Ha.valueDeclaration) && Ei(ou.symbol.valueDeclaration)) { + const K2 = Zp === v0.parent.right.escapedText ? void 0 : v0.parent.right; + Jn( + N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createNamedExports([N.createExportSpecifier( + /*isTypeOnly*/ + !1, + K2, + Zp + )]) + ), + 0 + /* None */ + ), se.tracker.trackSymbol( + ou.symbol, + se.enclosingDeclaration, + 111551 + /* Value */ + ); + } else { + const K2 = l( + se, + N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList([ + N.createVariableDeclaration( + vh, + /*exclamationToken*/ + void 0, + pb( + se, + /*declaration*/ + void 0, + ou, + kt + ) + ) + ], mb) + ), + Ng + ); + Jn(K2, vh !== Zp ? Xo & -33 : Xo), vh !== Zp && !Fn && (Jn( + N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createNamedExports([N.createExportSpecifier( + /*isTypeOnly*/ + !1, + vh, + Zp + )]) + ), + 0 + /* None */ + ), zl = !1, Au = !1); + } + } + } + if (kt.flags & 384 && Ic(kt, yo, Xo), kt.flags & 32 && (kt.flags & 4 && kt.valueDeclaration && fn(kt.valueDeclaration.parent) && Gc(kt.valueDeclaration.parent.right) ? db(kt, Pg(kt, yo), Xo) : Sy(kt, Pg(kt, yo), Xo)), (kt.flags & 1536 && (!Nl || wa(kt)) || kf) && sa(kt, yo, Xo), kt.flags & 64 && !(kt.flags & 32) && Hi(kt, yo, Xo), kt.flags & 2097152 && db(kt, Pg(kt, yo), Xo), kt.flags & 4 && kt.escapedName === "export=" && lP(kt), kt.flags & 8388608 && kt.declarations) + for (const ou of kt.declarations) { + const Zp = Pu(ou, ou.moduleSpecifier); + Zp && Jn( + N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + ou.isTypeOnly, + /*exportClause*/ + void 0, + N.createStringLiteral(Mr(Zp, se)) + ), + 0 + /* None */ + ); + } + Au ? Jn( + N.createExportAssignment( + /*modifiers*/ + void 0, + /*isExportEquals*/ + !1, + N.createIdentifier(Pg(kt, yo)) + ), + 0 + /* None */ + ) : zl && Jn( + N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createNamedExports([N.createExportSpecifier( + /*isTypeOnly*/ + !1, + Pg(kt, yo), + yo + )]) + ), + 0 + /* None */ + ); + } + function si(kt) { + if (at(kt.declarations, av)) return; + E.assertIsDefined(gi[gi.length - 1]), cR(Pi(kt.escapedName), kt); + const Fn = !!(kt.flags & 2097152) && !at(kt.declarations, (li) => !!ur(li, wc) || ig(li) || _l(li) && !Mh(li.moduleReference)); + gi[Fn ? 0 : gi.length - 1].set(Zs(kt), kt); + } + function Mi(kt) { + return Ei(kt) && ($_(kt) || tp(kt)) || Ou(kt) && !eg(kt); + } + function Jn(kt, Fn) { + if (Jp(kt)) { + let li = 0; + const ni = se.enclosingDeclaration && (Fp(se.enclosingDeclaration) ? Cr(se.enclosingDeclaration) : se.enclosingDeclaration); + Fn & 32 && ni && (Mi(ni) || Lc(ni)) && rN(kt) && (li |= 32), ha && !(li & 32) && (!ni || !(ni.flags & 33554432)) && (Zb(kt) || pc(kt) || Tc(kt) || $c(kt) || Lc(kt)) && (li |= 128), Fn & 2048 && ($c(kt) || Yl(kt) || Tc(kt)) && (li |= 2048), li && (kt = N.replaceModifiers(kt, li | Mu(kt))); + } + Ur.push(kt); + } + function In(kt, Fn, li) { + var ni; + const Vn = hPe(kt), $a = Ci(kt).typeParameters, $s = gr($a, (Au) => zn(Au, se)), As = (ni = kt.declarations) == null ? void 0 : ni.find(Fp), Es = LP(As ? As.comment || As.parent.comment : void 0), Ha = x(se); + se.flags |= 8388608; + const yo = se.enclosingDeclaration; + se.enclosingDeclaration = As; + const o_ = As && As.typeExpression && hv(As.typeExpression) && ue.tryReuseExistingTypeNode(se, As.typeExpression.type) || M(Vn, se); + Jn( + uv( + N.createTypeAliasDeclaration( + /*modifiers*/ + void 0, + Pg(kt, Fn), + $s, + o_ + ), + Es ? [{ kind: 3, text: `* + * ` + Es.replace(/\n/g, ` + * `) + ` + `, pos: -1, end: -1, hasTrailingNewLine: !0 }] : [] + ), + li + ), Ha(), se.enclosingDeclaration = yo; + } + function Hi(kt, Fn, li) { + const ni = S_(kt), Vn = zd(kt), $a = gr(Vn, (zl) => zn(zl, se)), $s = wo(ni), As = Ir($s) ? ra($s) : void 0, Es = na(qa(ni), (zl) => AX(zl, As)), Ha = jme( + 0, + ni, + As, + 179 + /* CallSignature */ + ), yo = jme( + 1, + ni, + As, + 180 + /* ConstructSignature */ + ), o_ = e5e(ni, As), Au = Ir($s) ? [N.createHeritageClause(96, Li($s, (zl) => Bme( + zl, + 111551 + /* Value */ + )))] : void 0; + Jn( + N.createInterfaceDeclaration( + /*modifiers*/ + void 0, + Pg(kt, Fn), + $a, + Au, + [...o_, ...yo, ...Ha, ...Es] + ), + li + ); + } + function ys(kt) { + let Fn = Ki(zu(kt).values()); + const li = Oa(kt); + if (li !== kt) { + const ni = new Set(Fn); + for (const Vn of zu(li).values()) + pu(jc(Vn)) & 111551 || ni.add(Vn); + Fn = Ki(ni); + } + return kn(Fn, (ni) => C_(ni) && E_( + ni.escapedName, + 99 + /* ESNext */ + )); + } + function wa(kt) { + return Ri(ys(kt), (Fn) => !(pu(jc(Fn)) & 111551)); + } + function sa(kt, Fn, li) { + const ni = ys(kt), Vn = dP(ni, (As) => As.parent && As.parent === kt ? "real" : "merged"), $a = Vn.get("real") || He, $s = Vn.get("merged") || He; + if (Ir($a)) { + const As = Pg(kt, Fn); + H1($a, As, li, !!(kt.flags & 67108880)); + } + if (Ir($s)) { + const As = Cr(se.enclosingDeclaration), Es = Pg(kt, Fn), Ha = N.createModuleBlock([N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createNamedExports(Li(kn( + $s, + (yo) => yo.escapedName !== "export=" + /* ExportEquals */ + ), (yo) => { + var o_, Au; + const zl = Pi(yo.escapedName), Xo = Pg(yo, zl), Nl = yo.declarations && ru(yo); + if (As && (Nl ? As !== Cr(Nl) : !at(yo.declarations, (Zp) => Cr(Zp) === As))) { + (Au = (o_ = se.tracker) == null ? void 0 : o_.reportNonlocalAugmentation) == null || Au.call(o_, As, kt, yo); + return; + } + const kf = Nl && ay( + Nl, + /*dontRecursivelyResolve*/ + !0 + ); + si(kf || yo); + const ou = kf ? Pg(kf, Pi(kf.escapedName)) : Xo; + return N.createExportSpecifier( + /*isTypeOnly*/ + !1, + zl === ou ? void 0 : ou, + zl + ); + })) + )]); + Jn( + N.createModuleDeclaration( + /*modifiers*/ + void 0, + N.createIdentifier(Es), + Ha, + 32 + /* Namespace */ + ), + 0 + /* None */ + ); + } + } + function Ic(kt, Fn, li) { + Jn( + N.createEnumDeclaration( + N.createModifiersFromModifierFlags(Qde(kt) ? 4096 : 0), + Pg(kt, Fn), + gr(kn(qa(en(kt)), (ni) => !!(ni.flags & 8)), (ni) => { + const Vn = ni.declarations && ni.declarations[0] && j0(ni.declarations[0]) ? wme(ni.declarations[0]) : void 0; + return N.createEnumMember( + Pi(ni.escapedName), + Vn === void 0 ? void 0 : typeof Vn == "string" ? N.createStringLiteral(Vn) : N.createNumericLiteral(Vn) + ); + }) + ), + li + ); + } + function Qd(kt, Fn, li, ni) { + const Vn = Ps( + kt, + 0 + /* Call */ + ); + for (const $a of Vn) { + const $s = nr($a, 262, se, { name: N.createIdentifier(li) }); + Jn(l(se, $s, Vm($a)), ni); + } + if (!(Fn.flags & 1536 && Fn.exports && Fn.exports.size)) { + const $a = kn(qa(kt), C_); + H1( + $a, + li, + ni, + /*suppressNewPrivateContext*/ + !0 + ); + } + } + function Vm(kt) { + if (kt.declaration && kt.declaration.parent) { + if (fn(kt.declaration.parent) && Sc(kt.declaration.parent) === 5) + return kt.declaration.parent; + if (Kn(kt.declaration.parent) && kt.declaration.parent.parent) + return kt.declaration.parent.parent; + } + return kt.declaration; + } + function H1(kt, Fn, li, ni) { + if (Ir(kt)) { + const $a = dP(kt, (Xo) => !Ir(Xo.declarations) || at(Xo.declarations, (Nl) => Cr(Nl) === Cr(se.enclosingDeclaration)) ? "local" : "remote").get("local") || He; + let $s = bv.createModuleDeclaration( + /*modifiers*/ + void 0, + N.createIdentifier(Fn), + N.createModuleBlock([]), + 32 + /* Namespace */ + ); + Fa($s, Lr), $s.locals = Us(kt), $s.symbol = kt[0].parent; + const As = Ur; + Ur = []; + const Es = ha; + ha = !1; + const Ha = { ...se, enclosingDeclaration: $s }, yo = se; + se = Ha, ar( + Us($a), + ni, + /*propertyAsAlias*/ + !0 + ), se = yo, ha = Es; + const o_ = Ur; + Ur = As; + const Au = gr(o_, (Xo) => Io(Xo) && !Xo.isExportEquals && Me(Xo.expression) ? N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createNamedExports([N.createExportSpecifier( + /*isTypeOnly*/ + !1, + Xo.expression, + N.createIdentifier( + "default" + /* Default */ + ) + )]) + ) : Xo), zl = Ri(Au, (Xo) => $n( + Xo, + 32 + /* Export */ + )) ? gr(Au, It) : Au; + $s = N.updateModuleDeclaration( + $s, + $s.modifiers, + $s.name, + N.createModuleBlock(zl) + ), Jn($s, li); + } + } + function C_(kt) { + return !!(kt.flags & 2887656) || !(kt.flags & 4194304 || kt.escapedName === "prototype" || kt.valueDeclaration && Vs(kt.valueDeclaration) && Zn(kt.valueDeclaration.parent)); + } + function Yd(kt) { + const Fn = Li(kt, (li) => { + const ni = se.enclosingDeclaration; + se.enclosingDeclaration = li; + let Vn = li.expression; + if (_o(Vn)) { + if (Me(Vn) && An(Vn) === "") + return $a( + /*result*/ + void 0 + ); + let $s; + if ({ introducesError: $s, node: Vn } = Nt(Vn, se), $s) + return $a( + /*result*/ + void 0 + ); + } + return $a(N.createExpressionWithTypeArguments( + Vn, + gr(li.typeArguments, ($s) => ue.tryReuseExistingTypeNode(se, $s) || M(a(se, $s), se)) + )); + function $a($s) { + return se.enclosingDeclaration = ni, $s; + } + }); + if (Fn.length === kt.length) + return Fn; + } + function Sy(kt, Fn, li) { + var ni, Vn; + const $a = (ni = kt.declarations) == null ? void 0 : ni.find(Zn), $s = se.enclosingDeclaration; + se.enclosingDeclaration = $a || $s; + const As = zd(kt), Es = gr(As, (qm) => zn(qm, se)), Ha = of(S_(kt)), yo = wo(Ha), o_ = $a && MC($a), Au = o_ && Yd(o_) || Li(Ma(Ha), _ft), zl = en(kt), Xo = !!((Vn = zl.symbol) != null && Vn.valueDeclaration) && Zn(zl.symbol.valueDeclaration), Nl = Xo ? oi(zl) : Je, kf = [ + ...Ir(yo) ? [N.createHeritageClause(96, gr(yo, (qm) => uft(qm, Nl, Fn)))] : [], + ...Ir(Au) ? [N.createHeritageClause(119, Au)] : [] + ], ou = $lt(Ha, yo, qa(Ha)), Zp = kn(ou, (qm) => { + const uP = qm.valueDeclaration; + return !!uP && !(Hl(uP) && Ni(uP.name)); + }), vh = at(ou, (qm) => { + const uP = qm.valueDeclaration; + return !!uP && Hl(uP) && Ni(uP.name); + }) ? [N.createPropertyDeclaration( + /*modifiers*/ + void 0, + N.createPrivateIdentifier("#private"), + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + )] : He, Ng = na(Zp, (qm) => At( + qm, + /*isStatic*/ + !1, + yo[0] + )), v0 = na( + kn(qa(zl), (qm) => !(qm.flags & 4194304) && qm.escapedName !== "prototype" && !C_(qm)), + (qm) => At( + qm, + /*isStatic*/ + !0, + Nl + ) + ), lR = !Xo && !!kt.valueDeclaration && an(kt.valueDeclaration) && !at(Ps( + zl, + 1 + /* Construct */ + )) ? [N.createConstructorDeclaration( + N.createModifiersFromModifierFlags( + 2 + /* Private */ + ), + [], + /*body*/ + void 0 + )] : jme( + 1, + zl, + Nl, + 176 + /* Constructor */ + ), fft = e5e(Ha, yo[0]); + se.enclosingDeclaration = $s, Jn( + l( + se, + N.createClassDeclaration( + /*modifiers*/ + void 0, + Fn, + Es, + kf, + [...fft, ...v0, ...lR, ...Ng, ...vh] + ), + kt.declarations && kn(kt.declarations, (qm) => $c(qm) || Gc(qm))[0] + ), + li + ); + } + function wI(kt) { + return Dc(kt, (Fn) => { + if (ju(Fn) || Tu(Fn)) + return qy(Fn.propertyName || Fn.name); + if (fn(Fn) || Io(Fn)) { + const li = Io(Fn) ? Fn.expression : Fn.right; + if (Tn(li)) + return An(li.name); + } + if (sh(Fn)) { + const li = is(Fn); + if (li && Me(li)) + return An(li); + } + }); + } + function db(kt, Fn, li) { + var ni, Vn, $a, $s, As; + const Es = ru(kt); + if (!Es) return E.fail(); + const Ha = Oa(ay( + Es, + /*dontRecursivelyResolve*/ + !0 + )); + if (!Ha) + return; + let yo = YP(Ha) && wI(kt.declarations) || Pi(Ha.escapedName); + yo === "export=" && _e && (yo = "default"); + const o_ = Pg(Ha, yo); + switch (si(Ha), Es.kind) { + case 208: + if (((Vn = (ni = Es.parent) == null ? void 0 : ni.parent) == null ? void 0 : Vn.kind) === 260) { + const Xo = Mr(Ha.parent || Ha, se), { propertyName: Nl } = Es; + Jn( + N.createImportDeclaration( + /*modifiers*/ + void 0, + N.createImportClause( + /*isTypeOnly*/ + !1, + /*name*/ + void 0, + N.createNamedImports([N.createImportSpecifier( + /*isTypeOnly*/ + !1, + Nl && Me(Nl) ? N.createIdentifier(An(Nl)) : void 0, + N.createIdentifier(Fn) + )]) + ), + N.createStringLiteral(Xo), + /*attributes*/ + void 0 + ), + 0 + /* None */ + ); + break; + } + E.failBadSyntaxKind((($a = Es.parent) == null ? void 0 : $a.parent) || Es, "Unhandled binding element grandparent kind in declaration serialization"); + break; + case 304: + ((As = ($s = Es.parent) == null ? void 0 : $s.parent) == null ? void 0 : As.kind) === 226 && y0( + Pi(kt.escapedName), + o_ + ); + break; + case 260: + if (Tn(Es.initializer)) { + const Xo = Es.initializer, Nl = N.createUniqueName(Fn), kf = Mr(Ha.parent || Ha, se); + Jn( + N.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + Nl, + N.createExternalModuleReference(N.createStringLiteral(kf)) + ), + 0 + /* None */ + ), Jn( + N.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createIdentifier(Fn), + N.createQualifiedName(Nl, Xo.name) + ), + li + ); + break; + } + // else fall through and treat commonjs require just like import= + case 271: + if (Ha.escapedName === "export=" && at(Ha.declarations, (Xo) => Ei(Xo) && tp(Xo))) { + lP(kt); + break; + } + const Au = !(Ha.flags & 512) && !Kn(Es); + Jn( + N.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createIdentifier(Fn), + Au ? ho( + Ha, + se, + -1, + /*expectsIdentifier*/ + !1 + ) : N.createExternalModuleReference(N.createStringLiteral(Mr(Ha, se))) + ), + Au ? li : 0 + /* None */ + ); + break; + case 270: + Jn( + N.createNamespaceExportDeclaration(An(Es.name)), + 0 + /* None */ + ); + break; + case 273: { + const Xo = Mr(Ha.parent || Ha, se), Nl = se.bundled ? N.createStringLiteral(Xo) : Es.parent.moduleSpecifier, kf = zo(Es.parent) ? Es.parent.attributes : void 0, ou = ym(Es.parent); + Jn( + N.createImportDeclaration( + /*modifiers*/ + void 0, + N.createImportClause( + ou, + N.createIdentifier(Fn), + /*namedBindings*/ + void 0 + ), + Nl, + kf + ), + 0 + /* None */ + ); + break; + } + case 274: { + const Xo = Mr(Ha.parent || Ha, se), Nl = se.bundled ? N.createStringLiteral(Xo) : Es.parent.parent.moduleSpecifier, kf = ym(Es.parent.parent); + Jn( + N.createImportDeclaration( + /*modifiers*/ + void 0, + N.createImportClause( + kf, + /*name*/ + void 0, + N.createNamespaceImport(N.createIdentifier(Fn)) + ), + Nl, + Es.parent.attributes + ), + 0 + /* None */ + ); + break; + } + case 280: + Jn( + N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createNamespaceExport(N.createIdentifier(Fn)), + N.createStringLiteral(Mr(Ha, se)) + ), + 0 + /* None */ + ); + break; + case 276: { + const Xo = Mr(Ha.parent || Ha, se), Nl = se.bundled ? N.createStringLiteral(Xo) : Es.parent.parent.parent.moduleSpecifier, kf = ym(Es.parent.parent.parent); + Jn( + N.createImportDeclaration( + /*modifiers*/ + void 0, + N.createImportClause( + kf, + /*name*/ + void 0, + N.createNamedImports([ + N.createImportSpecifier( + /*isTypeOnly*/ + !1, + Fn !== yo ? N.createIdentifier(yo) : void 0, + N.createIdentifier(Fn) + ) + ]) + ), + Nl, + Es.parent.parent.parent.attributes + ), + 0 + /* None */ + ); + break; + } + case 281: + const zl = Es.parent.parent.moduleSpecifier; + if (zl) { + const Xo = Es.propertyName; + Xo && Km(Xo) && (yo = "default"); + } + y0( + Pi(kt.escapedName), + zl ? yo : o_, + zl && Na(zl) ? N.createStringLiteral(zl.text) : void 0 + ); + break; + case 277: + lP(kt); + break; + case 226: + case 211: + case 212: + kt.escapedName === "default" || kt.escapedName === "export=" ? lP(kt) : y0(Fn, o_); + break; + default: + return E.failBadSyntaxKind(Es, "Unhandled alias declaration kind in symbol serializer!"); + } + } + function y0(kt, Fn, li) { + Jn( + N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createNamedExports([N.createExportSpecifier( + /*isTypeOnly*/ + !1, + kt !== Fn ? Fn : void 0, + kt + )]), + li + ), + 0 + /* None */ + ); + } + function lP(kt) { + var Fn; + if (kt.flags & 4194304) + return !1; + const li = Pi(kt.escapedName), ni = li === "export=", $a = ni || li === "default", $s = kt.declarations && ru(kt), As = $s && ay( + $s, + /*dontRecursivelyResolve*/ + !0 + ); + if (As && Ir(As.declarations) && at(As.declarations, (Es) => Cr(Es) === Cr(Lr))) { + const Es = $s && (Io($s) || fn($s) ? CB($s) : xK($s)), Ha = Es && _o(Es) ? lut(Es) : void 0, yo = Ha && oc( + Ha, + -1, + /*ignoreErrors*/ + !0, + /*dontResolveAlias*/ + !0, + Lr + ); + (yo || As) && si(yo || As); + const o_ = se.tracker.disableTrackSymbol; + if (se.tracker.disableTrackSymbol = !0, $a) + Ur.push(N.createExportAssignment( + /*modifiers*/ + void 0, + ni, + zc( + As, + se, + -1 + /* All */ + ) + )); + else if (Ha === Es && Ha) + y0(li, An(Ha)); + else if (Es && Gc(Es)) + y0(li, Pg(As, _c(As))); + else { + const Au = cR(li, kt); + Jn( + N.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createIdentifier(Au), + ho( + As, + se, + -1, + /*expectsIdentifier*/ + !1 + ) + ), + 0 + /* None */ + ), y0(li, Au); + } + return se.tracker.disableTrackSymbol = o_, !0; + } else { + const Es = cR(li, kt), Ha = cf(en(Oa(kt))); + if (PI(Ha, kt)) + Qd( + Ha, + kt, + Es, + $a ? 0 : 32 + /* Export */ + ); + else { + const yo = ((Fn = se.enclosingDeclaration) == null ? void 0 : Fn.kind) === 267 && (!(kt.flags & 98304) || kt.flags & 65536) ? 1 : 2, o_ = N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList([ + N.createVariableDeclaration( + Es, + /*exclamationToken*/ + void 0, + pb( + se, + /*declaration*/ + void 0, + Ha, + kt + ) + ) + ], yo) + ); + Jn( + o_, + As && As.flags & 4 && As.escapedName === "export=" ? 128 : li === Es ? 32 : 0 + /* None */ + ); + } + return $a ? (Ur.push(N.createExportAssignment( + /*modifiers*/ + void 0, + ni, + N.createIdentifier(Es) + )), !0) : li !== Es ? (y0(li, Es), !0) : !1; + } + } + function PI(kt, Fn) { + var li; + const ni = Cr(se.enclosingDeclaration); + return Cn(kt) & 48 && !at((li = kt.symbol) == null ? void 0 : li.declarations, fi) && // If the type comes straight from a type node, we shouldn't try to break it up + !Ir(du(kt)) && !x8(kt) && // While a class instance is potentially representable as a NS, prefer printing a reference to the instance type and serializing the class + !!(Ir(kn(qa(kt), C_)) || Ir(Ps( + kt, + 0 + /* Call */ + ))) && !Ir(Ps( + kt, + 1 + /* Construct */ + )) && // TODO: could probably serialize as function + ns + class, now that that's OK + !yc(Fn, Lr) && !(kt.symbol && at(kt.symbol.declarations, (Vn) => Cr(Vn) !== ni)) && !at(qa(kt), (Vn) => P8(Vn.escapedName)) && !at(qa(kt), (Vn) => at(Vn.declarations, ($a) => Cr($a) !== ni)) && Ri(qa(kt), (Vn) => E_(_c(Vn), R) ? Vn.flags & 98304 ? M1(Vn) === ly(Vn) : !0 : !1); + } + function NX(kt, Fn, li) { + return function(Vn, $a, $s) { + var As, Es, Ha, yo, o_, Au; + const zl = sp(Vn), Xo = !!(zl & 2); + if ($a && Vn.flags & 2887656) + return []; + if (Vn.flags & 4194304 || Vn.escapedName === "constructor" || $s && Ys($s, Vn.escapedName) && Xd(Ys($s, Vn.escapedName)) === Xd(Vn) && (Vn.flags & 16777216) === (Ys($s, Vn.escapedName).flags & 16777216) && gh(en(Vn), Pc($s, Vn.escapedName))) + return []; + const Nl = zl & -1025 | ($a ? 256 : 0), kf = Nc(Vn, se), ou = (As = Vn.declarations) == null ? void 0 : As.find(U_(ss, Jy, Kn, m_, fn, Tn)); + if (Vn.flags & 98304 && li) { + const Zp = []; + if (Vn.flags & 65536) { + const mb = Vn.declarations && lr(Vn.declarations, (v0) => { + if (v0.kind === 178) + return v0; + if (Fs(v0) && yS(v0)) + return lr(v0.arguments[2].properties, (K2) => { + const lR = is(K2); + if (lR && Me(lR) && An(lR) === "set") + return K2; + }); + }); + E.assert(!!mb); + const vh = Ka(mb) ? Gf(mb).parameters[0] : void 0, Ng = (Es = Vn.declarations) == null ? void 0 : Es.find(Mg); + Zp.push(l( + se, + N.createSetAccessorDeclaration( + N.createModifiersFromModifierFlags(Nl), + kf, + [N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + vh ? bs(vh, vn(vh), se) : "value", + /*questionToken*/ + void 0, + Xo ? void 0 : pb(se, Ng, ly(Vn), Vn) + )], + /*body*/ + void 0 + ), + Ng ?? ou + )); + } + if (Vn.flags & 32768) { + const mb = zl & 2, vh = (Ha = Vn.declarations) == null ? void 0 : Ha.find(k0); + Zp.push(l( + se, + N.createGetAccessorDeclaration( + N.createModifiersFromModifierFlags(Nl), + kf, + [], + mb ? void 0 : pb(se, vh, en(Vn), Vn), + /*body*/ + void 0 + ), + vh ?? ou + )); + } + return Zp; + } else if (Vn.flags & 98311) + return l( + se, + kt( + N.createModifiersFromModifierFlags((Xd(Vn) ? 8 : 0) | Nl), + kf, + Vn.flags & 16777216 ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0, + Xo ? void 0 : pb(se, (yo = Vn.declarations) == null ? void 0 : yo.find(A_), ly(Vn), Vn), + // TODO: https://github.com/microsoft/TypeScript/pull/32372#discussion_r328386357 + // interface members can't have initializers, however class members _can_ + /*initializer*/ + void 0 + ), + ((o_ = Vn.declarations) == null ? void 0 : o_.find(U_(ss, Kn))) || ou + ); + if (Vn.flags & 8208) { + const Zp = en(Vn), mb = Ps( + Zp, + 0 + /* Call */ + ); + if (Nl & 2) + return l( + se, + kt( + N.createModifiersFromModifierFlags((Xd(Vn) ? 8 : 0) | Nl), + kf, + Vn.flags & 16777216 ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ), + ((Au = Vn.declarations) == null ? void 0 : Au.find(Ka)) || mb[0] && mb[0].declaration || Vn.declarations && Vn.declarations[0] + ); + const vh = []; + for (const Ng of mb) { + const v0 = nr( + Ng, + Fn, + se, + { + name: kf, + questionToken: Vn.flags & 16777216 ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0, + modifiers: Nl ? N.createModifiersFromModifierFlags(Nl) : void 0 + } + ), K2 = Ng.declaration && y3(Ng.declaration.parent) ? Ng.declaration.parent : Ng.declaration; + vh.push(l(se, v0, K2)); + } + return vh; + } + return E.fail(`Unhandled class member kind! ${Vn.__debugFlags || Vn.flags}`); + }; + } + function AX(kt, Fn) { + return dr( + kt, + /*isStatic*/ + !1, + Fn + ); + } + function jme(kt, Fn, li, ni) { + const Vn = Ps(Fn, kt); + if (kt === 1) { + if (!li && Ri(Vn, (As) => Ir(As.parameters) === 0)) + return []; + if (li) { + const As = Ps( + li, + 1 + /* Construct */ + ); + if (!Ir(As) && Ri(Vn, (Es) => Ir(Es.parameters) === 0)) + return []; + if (As.length === Vn.length) { + let Es = !1; + for (let Ha = 0; Ha < As.length; Ha++) + if (!dM( + Vn[Ha], + As[Ha], + /*partialMatch*/ + !1, + /*ignoreThisTypes*/ + !1, + /*ignoreReturnTypes*/ + !0, + V8 + )) { + Es = !0; + break; + } + if (!Es) + return []; + } + } + let $s = 0; + for (const As of Vn) + As.declaration && ($s |= bx( + As.declaration, + 6 + /* Protected */ + )); + if ($s) + return [l( + se, + N.createConstructorDeclaration( + N.createModifiersFromModifierFlags($s), + /*parameters*/ + [], + /*body*/ + void 0 + ), + Vn[0].declaration + )]; + } + const $a = []; + for (const $s of Vn) { + const As = nr($s, ni, se); + $a.push(l(se, As, $s.declaration)); + } + return $a; + } + function e5e(kt, Fn) { + const li = []; + for (const ni of du(kt)) { + if (Fn) { + const Vn = ph(Fn, ni.keyType); + if (Vn && gh(ni.type, Vn.type)) + continue; + } + li.push(or( + ni, + se, + /*typeNode*/ + void 0 + )); + } + return li; + } + function uft(kt, Fn, li) { + const ni = Bme( + kt, + 111551 + /* Value */ + ); + if (ni) + return ni; + const Vn = cR(`${li}_base`), $a = N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [ + N.createVariableDeclaration( + Vn, + /*exclamationToken*/ + void 0, + M(Fn, se) + ) + ], + 2 + /* Const */ + ) + ); + return Jn( + $a, + 0 + /* None */ + ), N.createExpressionWithTypeArguments( + N.createIdentifier(Vn), + /*typeArguments*/ + void 0 + ); + } + function Bme(kt, Fn) { + let li, ni; + if (kt.target && yT(kt.target.symbol, Lr, Fn) ? (li = gr(Po(kt), (Vn) => M(Vn, se)), ni = zc( + kt.target.symbol, + se, + 788968 + /* Type */ + )) : kt.symbol && yT(kt.symbol, Lr, Fn) && (ni = zc( + kt.symbol, + se, + 788968 + /* Type */ + )), ni) + return N.createExpressionWithTypeArguments(ni, li); + } + function _ft(kt) { + const Fn = Bme( + kt, + 788968 + /* Type */ + ); + if (Fn) + return Fn; + if (kt.symbol) + return N.createExpressionWithTypeArguments( + zc( + kt.symbol, + se, + 788968 + /* Type */ + ), + /*typeArguments*/ + void 0 + ); + } + function cR(kt, Fn) { + var li, ni; + const Vn = Fn ? Zs(Fn) : void 0; + if (Vn && se.remappedSymbolNames.has(Vn)) + return se.remappedSymbolNames.get(Vn); + Fn && (kt = t5e(Fn, kt)); + let $a = 0; + const $s = kt; + for (; (li = se.usedSymbolNames) != null && li.has(kt); ) + $a++, kt = `${$s}_${$a}`; + return (ni = se.usedSymbolNames) == null || ni.add(kt), Vn && se.remappedSymbolNames.set(Vn, kt), kt; + } + function t5e(kt, Fn) { + if (Fn === "default" || Fn === "__class" || Fn === "__function") { + const li = x(se); + se.flags |= 16777216; + const ni = F1(kt, se); + li(), Fn = ni.length > 0 && p3(ni.charCodeAt(0)) ? Op(ni) : ni; + } + return Fn === "default" ? Fn = "_default" : Fn === "export=" && (Fn = "_exports"), Fn = E_(Fn, R) && !yx(Fn) ? Fn : "_" + Fn.replace(/[^a-z0-9]/gi, "_"), Fn; + } + function Pg(kt, Fn) { + const li = Zs(kt); + return se.remappedSymbolNames.has(li) ? se.remappedSymbolNames.get(li) : (Fn = t5e(kt, Fn), se.remappedSymbolNames.set(li, Fn), Fn); + } + } + } + function Lm(r, a, l = 16384, f) { + return f ? d(f).getText() : kC(d); + function d(y) { + const x = pE(l) | 70221824 | 512, I = ke.typePredicateToTypePredicateNode(r, a, x), M = o2(), z = a && Cr(a); + return M.writeNode( + 4, + I, + /*sourceFile*/ + z, + y + ), y; + } + } + function jL(r) { + const a = []; + let l = 0; + for (let f = 0; f < r.length; f++) { + const d = r[f]; + if (l |= d.flags, !(d.flags & 98304)) { + if (d.flags & 1568) { + const y = d.flags & 512 ? ut : FG(d); + if (y.flags & 1048576) { + const x = y.types.length; + if (f + x <= r.length && Vu(r[f + x - 1]) === Vu(y.types[x - 1])) { + a.push(y), f += x - 1; + continue; + } + } + } + a.push(d); + } + } + return l & 65536 && a.push(lt), l & 32768 && a.push(ft), a || r; + } + function Lw(r) { + return r === 2 ? "private" : r === 4 ? "protected" : "public"; + } + function BL(r) { + if (r.symbol && r.symbol.flags & 2048 && r.symbol.declarations) { + const a = C3(r.symbol.declarations[0].parent); + if (jp(a)) + return dn(a); + } + } + function vT(r) { + return r && r.parent && r.parent.kind === 268 && Pb(r.parent.parent); + } + function bT(r) { + return r.kind === 307 || Ou(r); + } + function k8(r, a) { + const l = Ci(r).nameType; + if (l) { + if (l.flags & 384) { + const f = "" + l.value; + return !E_(f, pa(F)) && !Xg(f) ? `"${rg( + f, + 34 + /* doubleQuote */ + )}"` : Xg(f) && Vi(f, "-") ? `[${f}]` : f; + } + if (l.flags & 8192) + return `[${F1(l.symbol, a)}]`; + } + } + function F1(r, a) { + var l; + if ((l = a?.remappedSymbolReferences) != null && l.has(Zs(r)) && (r = a.remappedSymbolReferences.get(Zs(r))), a && r.escapedName === "default" && !(a.flags & 16384) && // If it's not the first part of an entity name, it must print as `default` + (!(a.flags & 16777216) || // if the symbol is synthesized, it will only be referenced externally it must print as `default` + !r.declarations || // if not in the same binding context (source file, module declaration), it must print as `default` + a.enclosingDeclaration && ur(r.declarations[0], bT) !== ur(a.enclosingDeclaration, bT))) + return "default"; + if (r.declarations && r.declarations.length) { + let d = Dc(r.declarations, (x) => is(x) ? x : void 0); + const y = d && is(d); + if (d && y) { + if (Fs(d) && yS(d)) + return _c(r); + if (fa(y) && !(rc(r) & 4096)) { + const x = Ci(r).nameType; + if (x && x.flags & 384) { + const I = k8(r, a); + if (I !== void 0) + return I; + } + } + return co(y); + } + if (d || (d = r.declarations[0]), d.parent && d.parent.kind === 260) + return co(d.parent.name); + switch (d.kind) { + case 231: + case 218: + case 219: + return a && !a.encounteredError && !(a.flags & 131072) && (a.encounteredError = !0), d.kind === 231 ? "(Anonymous class)" : "(Anonymous function)"; + } + } + const f = k8(r, a); + return f !== void 0 ? f : _c(r); + } + function dd(r) { + if (r) { + const l = yn(r); + return l.isVisible === void 0 && (l.isVisible = !!a()), l.isVisible; + } + return !1; + function a() { + switch (r.kind) { + case 338: + case 346: + case 340: + return !!(r.parent && r.parent.parent && r.parent.parent.parent && Ei(r.parent.parent.parent)); + case 208: + return dd(r.parent.parent); + case 260: + if (Ds(r.name) && !r.name.elements.length) + return !1; + // falls through + case 267: + case 263: + case 264: + case 265: + case 262: + case 266: + case 271: + if (Pb(r)) + return !0; + const l = ST(r); + return !(PX(r) & 32) && !(r.kind !== 271 && l.kind !== 307 && l.flags & 33554432) ? E0(l) : dd(l); + case 172: + case 171: + case 177: + case 178: + case 174: + case 173: + if (Q_( + r, + 6 + /* Protected */ + )) + return !1; + // Public properties/methods are visible if its parents are visible, so: + // falls through + case 176: + case 180: + case 179: + case 181: + case 169: + case 268: + case 184: + case 185: + case 187: + case 183: + case 188: + case 189: + case 192: + case 193: + case 196: + case 202: + return dd(r.parent); + // Default binding, import specifier and namespace import is visible + // only on demand so by default it is not visible + case 273: + case 274: + case 276: + return !1; + // Type parameters are always visible + case 168: + // Source file and namespace export are always visible + // falls through + case 307: + case 270: + return !0; + // Export assignments do not create name bindings outside the module + case 277: + return !1; + default: + return !1; + } + } + } + function mE(r, a) { + let l; + r.kind !== 11 && r.parent && r.parent.kind === 277 ? l = Dt( + r, + r, + 2998271, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + ) : r.parent.kind === 281 && (l = A2( + r.parent, + 2998271 + /* Alias */ + )); + let f, d; + return l && (d = /* @__PURE__ */ new Set(), d.add(Zs(l)), y(l.declarations)), f; + function y(x) { + lr(x, (I) => { + const M = Am(I) || I; + if (a ? yn(I).isVisible = !0 : (f = f || [], Qf(f, M)), gS(I)) { + const z = I.moduleReference, Y = w_(z), Se = Dt( + I, + Y.escapedText, + 901119, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + ); + Se && d && S0(d, Zs(Se)) && y(Se.declarations); + } + }); + } + } + function hg(r, a) { + const l = O1(r, a); + if (l >= 0) { + const { length: f } = vr; + for (let d = l; d < f; d++) + Gr[d] = !1; + return !1; + } + return vr.push(r), Gr.push( + /*items*/ + !0 + ), Dr.push(a), !0; + } + function O1(r, a) { + for (let l = vr.length - 1; l >= cn; l--) { + if (C8(vr[l], Dr[l])) + return -1; + if (vr[l] === r && Dr[l] === a) + return l; + } + return -1; + } + function C8(r, a) { + switch (a) { + case 0: + return !!Ci(r).type; + case 2: + return !!Ci(r).declaredType; + case 1: + return !!r.resolvedBaseConstructorType; + case 3: + return !!r.resolvedReturnType; + case 4: + return !!r.immediateBaseConstraint; + case 5: + return !!r.resolvedTypeArguments; + case 6: + return !!r.baseTypesResolved; + case 7: + return !!Ci(r).writeType; + case 8: + return yn(r).parameterInitializerContainsUndefined !== void 0; + } + return E.assertNever(a); + } + function yg() { + return vr.pop(), Dr.pop(), Gr.pop(); + } + function ST(r) { + return ur(om(r), (a) => { + switch (a.kind) { + case 260: + case 261: + case 276: + case 275: + case 274: + case 273: + return !1; + default: + return !0; + } + }).parent; + } + function E8(r) { + const a = ko(af(r)); + return a.typeParameters ? a0(a, gr(a.typeParameters, (l) => Je)) : a; + } + function Pc(r, a) { + const l = Ys(r, a); + return l ? en(l) : void 0; + } + function Bk(r, a) { + var l; + let f; + return Pc(r, a) || (f = (l = Wk(r, a)) == null ? void 0 : l.type) && rl( + f, + /*isProperty*/ + !0, + /*isOptional*/ + !0 + ); + } + function Ua(r) { + return r && (r.flags & 1) !== 0; + } + function H(r) { + return r === We || !!(r.flags & 1 && r.aliasSymbol); + } + function Pe(r, a) { + if (a !== 0) + return Vf( + r, + /*includeOptionality*/ + !1, + a + ); + const l = dn(r); + return l && Ci(l).type || Vf( + r, + /*includeOptionality*/ + !1, + a + ); + } + function qe(r, a, l) { + if (r = Jc(r, (M) => !(M.flags & 98304)), r.flags & 131072) + return hs; + if (r.flags & 1048576) + return Vo(r, (M) => qe(M, a, l)); + let f = Qn(gr(a, o0)); + const d = [], y = []; + for (const M of qa(r)) { + const z = Vk( + M, + 8576 + /* StringOrNumberLiteralOrUnique */ + ); + !Ls(z, f) && !(sp(M) & 6) && KG(M) ? d.push(M) : y.push(z); + } + if (PT(r) || NT(f)) { + if (y.length && (f = Qn([f, ...y])), f.flags & 131072) + return r; + const M = itt(); + return M ? CE(M, [r, f]) : We; + } + const x = Us(); + for (const M of d) + x.set(M.escapedName, spe( + M, + /*readonly*/ + !1 + )); + const I = Ea(l, x, He, He, du(r)); + return I.objectFlags |= 4194304, I; + } + function vt(r) { + return !!(r.flags & 465829888) && hc( + iu(r) || ye, + 32768 + /* Undefined */ + ); + } + function Wt(r) { + const a = kp(r, vt) ? Vo(r, (l) => l.flags & 465829888 ? xg(l) : l) : r; + return xp( + a, + 524288 + /* NEUndefined */ + ); + } + function br(r, a) { + const l = Rn(r); + return l ? m0(l, a) : a; + } + function Rn(r) { + const a = Ai(r); + if (a && L4(a) && a.flowNode) { + const l = ui(r); + if (l) { + const f = ot(bv.createStringLiteral(l), r), d = u_(a) ? a : bv.createParenthesizedExpression(a), y = ot(bv.createElementAccessExpression(d, f), r); + return Fa(f, y), Fa(y, r), d !== a && Fa(d, y), y.flowNode = a.flowNode, y; + } + } + } + function Ai(r) { + const a = r.parent.parent; + switch (a.kind) { + case 208: + case 303: + return Rn(a); + case 209: + return Rn(r.parent); + case 260: + return a.initializer; + case 226: + return a.right; + } + } + function ui(r) { + const a = r.parent; + return r.kind === 208 && a.kind === 206 ? _i(r.propertyName || r.name) : r.kind === 303 || r.kind === 304 ? _i(r.name) : "" + a.elements.indexOf(r); + } + function _i(r) { + const a = o0(r); + return a.flags & 384 ? "" + a.value : void 0; + } + function qi(r) { + const a = r.dotDotDotToken ? 32 : 0, l = Pe(r.parent.parent, a); + return l && Ya( + r, + l, + /*noTupleBoundsCheck*/ + !1 + ); + } + function Ya(r, a, l) { + if (Ua(a)) + return a; + const f = r.parent; + Z && r.flags & 33554432 && av(r) ? a = f0(a) : Z && f.parent.initializer && !Hd( + oAe(f.parent.initializer), + 65536 + /* EQUndefined */ + ) && (a = xp( + a, + 524288 + /* NEUndefined */ + )); + const d = 32 | (l || Kk(r) ? 16 : 0); + let y; + if (f.kind === 206) + if (r.dotDotDotToken) { + if (a = md(a), a.flags & 2 || !AM(a)) + return je(r, p.Rest_types_may_only_be_created_from_object_types), We; + const x = []; + for (const I of f.elements) + I.dotDotDotToken || x.push(I.propertyName || I.name); + y = qe(a, x, r.symbol); + } else { + const x = r.propertyName || r.name, I = o0(x), M = j_(a, I, d, x); + y = br(r, M); + } + else { + const x = yy(65 | (r.dotDotDotToken ? 0 : 128), a, ft, f), I = f.elements.indexOf(r); + if (r.dotDotDotToken) { + const M = Vo(a, (z) => z.flags & 58982400 ? xg(z) : z); + y = J_(M, ga) ? Vo(M, (z) => Gw(z, I)) : mu(x); + } else if (my(a)) { + const M = gd(I), z = j1(a, M, d, r.name) || We; + y = br(r, z); + } else + y = x; + } + return r.initializer ? qc(tx(r)) ? Z && !Hd( + tP( + r, + 0 + /* Normal */ + ), + 16777216 + /* IsUndefined */ + ) ? Wt(y) : y : eme(r, Qn( + [Wt(y), tP( + r, + 0 + /* Normal */ + )], + 2 + /* Subtype */ + )) : y; + } + function Za(r) { + const a = Ly(r); + if (a) + return wi(a); + } + function Ia(r) { + const a = za( + r, + /*excludeJSDocTypeAssertions*/ + !0 + ); + return a.kind === 106 || a.kind === 80 && Nu(a) === xe; + } + function yp(r) { + const a = za( + r, + /*excludeJSDocTypeAssertions*/ + !0 + ); + return a.kind === 209 && a.elements.length === 0; + } + function rl(r, a = !1, l = !0) { + return Z && l ? gy(r, a) : r; + } + function Vf(r, a, l) { + if (Kn(r) && r.parent.parent.kind === 249) { + const x = Bm(bde(Gi( + r.parent.parent.expression, + /*checkMode*/ + l + ))); + return x.flags & 4456448 ? W3e(x) : de; + } + if (Kn(r) && r.parent.parent.kind === 250) { + const x = r.parent.parent; + return tR(x) || Je; + } + if (Ds(r.parent)) + return qi(r); + const f = ss(r) && !cm(r) || m_(r) || Fte(r), d = a && Ax(r), y = qf(r); + if (Zj(r)) + return y ? Ua(y) || y === ye ? y : We : q ? ye : Je; + if (y) + return rl(y, f, d); + if ((le || an(r)) && Kn(r) && !Ds(r.name) && !(PX(r) & 32) && !(r.flags & 33554432)) { + if (!(Z2(r) & 6) && (!r.initializer || Ia(r.initializer))) + return Ye; + if (r.initializer && yp(r.initializer)) + return mo; + } + if (Ii(r)) { + if (!r.symbol) + return; + const x = r.parent; + if (x.kind === 178 && SE(x)) { + const z = Lo( + dn(r.parent), + 177 + /* GetAccessor */ + ); + if (z) { + const Y = Gf(z), Se = Lme(x); + return Se && r === Se ? (E.assert(!Se.type), en(Y.thisParameter)) : Ba(Y); + } + } + const I = Eet(x, r); + if (I) return I; + const M = r.symbol.escapedName === "this" ? sde(x) : jAe(r); + if (M) + return rl( + M, + /*isProperty*/ + !1, + d + ); + } + if (fS(r) && r.initializer) { + if (an(r) && !Ii(r)) { + const I = Mw(r, dn(r), F4(r)); + if (I) + return I; + } + const x = eme(r, tP(r, l)); + return rl(x, f, d); + } + if (ss(r) && (le || an(r))) + if (Kc(r)) { + const x = kn(r.parent.members, nc), I = x.length ? La(r.symbol, x) : Mu(r) & 128 ? _$(r.symbol) : void 0; + return I && rl( + I, + /*isProperty*/ + !0, + d + ); + } else { + const x = sN(r.parent), I = x ? Zc(r.symbol, x) : Mu(r) & 128 ? _$(r.symbol) : void 0; + return I && rl( + I, + /*isProperty*/ + !0, + d + ); + } + if (hm(r)) + return Jr; + if (Ds(r.name)) + return Jt( + r.name, + /*includePatternInType*/ + !1, + /*reportErrors*/ + !0 + ); + } + function n0(r) { + if (r.valueDeclaration && fn(r.valueDeclaration)) { + const a = Ci(r); + return a.isConstructorDeclaredProperty === void 0 && (a.isConstructorDeclaredProperty = !1, a.isConstructorDeclaredProperty = !!L1(r) && Ri(r.declarations, (l) => fn(l) && M$(l) && (l.left.kind !== 212 || wf(l.left.argumentExpression)) && !Sf( + /*declaredType*/ + void 0, + l, + r, + l + ))), a.isConstructorDeclaredProperty; + } + return !1; + } + function _h(r) { + const a = r.valueDeclaration; + return a && ss(a) && !qc(a) && !a.initializer && (le || an(a)); + } + function L1(r) { + if (r.declarations) + for (const a of r.declarations) { + const l = Lu( + a, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + if (l && (l.kind === 176 || Um(l))) + return l; + } + } + function JL(r) { + const a = Cr(r.declarations[0]), l = Pi(r.escapedName), f = r.declarations.every((y) => an(y) && vo(y) && Wg(y.expression)), d = f ? N.createPropertyAccessExpression(N.createPropertyAccessExpression(N.createIdentifier("module"), N.createIdentifier("exports")), l) : N.createPropertyAccessExpression(N.createIdentifier("exports"), l); + return f && Fa(d.expression.expression, d.expression), Fa(d.expression, d), Fa(d, a), d.flowNode = a.endFlowNode, m0(d, Ye, ft); + } + function La(r, a) { + const l = Vi(r.escapedName, "__#") ? N.createPrivateIdentifier(r.escapedName.split("@")[1]) : Pi(r.escapedName); + for (const f of a) { + const d = N.createPropertyAccessExpression(N.createThis(), l); + Fa(d.expression, d), Fa(d, f), d.flowNode = f.returnFlowNode; + const y = i0(d, r); + if (le && (y === Ye || y === mo) && je(r.valueDeclaration, p.Member_0_implicitly_has_an_1_type, Ui(r), $r(y)), !J_(y, OM)) + return SI(y); + } + } + function Zc(r, a) { + const l = Vi(r.escapedName, "__#") ? N.createPrivateIdentifier(r.escapedName.split("@")[1]) : Pi(r.escapedName), f = N.createPropertyAccessExpression(N.createThis(), l); + Fa(f.expression, f), Fa(f, a), f.flowNode = a.returnFlowNode; + const d = i0(f, r); + return le && (d === Ye || d === mo) && je(r.valueDeclaration, p.Member_0_implicitly_has_an_1_type, Ui(r), $r(d)), J_(d, OM) ? void 0 : SI(d); + } + function i0(r, a) { + const l = a?.valueDeclaration && (!_h(a) || Mu(a.valueDeclaration) & 128) && _$(a) || ft; + return m0(r, Ye, l); + } + function O2(r, a) { + const l = fx(r.valueDeclaration); + if (l) { + const I = an(l) ? Y1(l) : void 0; + return I && I.typeExpression ? wi(I.typeExpression) : r.valueDeclaration && Mw(r.valueDeclaration, r, l) || cb(uc(l)); + } + let f, d = !1, y = !1; + if (n0(r) && (f = Zc(r, L1(r))), !f) { + let I; + if (r.declarations) { + let M; + for (const z of r.declarations) { + const Y = fn(z) || Fs(z) ? z : vo(z) ? fn(z.parent) ? z.parent : z : void 0; + if (!Y) + continue; + const Se = vo(Y) ? h3(Y) : Sc(Y); + (Se === 4 || fn(Y) && M$(Y, Se)) && (v(Y) ? d = !0 : y = !0), Fs(Y) || (M = Sf(M, Y, r, z)), M || (I || (I = [])).push(fn(Y) || Fs(Y) ? tb(r, a, Y, Se) : Zt); + } + f = M; + } + if (!f) { + if (!Ir(I)) + return We; + let M = d && r.declarations ? P(I, r.declarations) : void 0; + if (y) { + const Y = _$(r); + Y && ((M || (M = [])).push(Y), d = !0); + } + const z = at(M, (Y) => !!(Y.flags & -98305)) ? M : I; + f = Qn(z); + } + } + const x = cf(rl( + f, + /*isProperty*/ + !1, + y && !d + )); + return r.valueDeclaration && an(r.valueDeclaration) && Jc(x, (I) => !!(I.flags & -98305)) === Zt ? (lb(r.valueDeclaration, Je), Je) : x; + } + function Mw(r, a, l) { + var f, d; + if (!an(r) || !l || !oa(l) || l.properties.length) + return; + const y = Us(); + for (; fn(r) || Tn(r); ) { + const M = R_(r); + (f = M?.exports) != null && f.size && Nm(y, M.exports), r = fn(r) ? r.parent : r.parent.parent; + } + const x = R_(r); + (d = x?.exports) != null && d.size && Nm(y, x.exports); + const I = Ea(a, y, He, He, He); + return I.objectFlags |= 4096, I; + } + function Sf(r, a, l, f) { + var d; + const y = qc(a.parent); + if (y) { + const x = cf(wi(y)); + if (r) + !H(r) && !H(x) && !gh(r, x) && HIe( + /*firstDeclaration*/ + void 0, + r, + f, + x + ); + else return x; + } + if ((d = l.parent) != null && d.valueDeclaration) { + const x = gT(l.parent); + if (x.valueDeclaration) { + const I = qc(x.valueDeclaration); + if (I) { + const M = Ys(wi(I), l.escapedName); + if (M) + return M1(M); + } + } + } + return r; + } + function tb(r, a, l, f) { + if (Fs(l)) { + if (a) + return en(a); + const x = uc(l.arguments[2]), I = Pc(x, "value"); + if (I) + return I; + const M = Pc(x, "get"); + if (M) { + const Y = zT(M); + if (Y) + return Ba(Y); + } + const z = Pc(x, "set"); + if (z) { + const Y = zT(z); + if (Y) + return Ude(Y); + } + return Je; + } + if (ln(l.left, l.right)) + return Je; + const d = f === 1 && (Tn(l.left) || fo(l.left)) && (Wg(l.left.expression) || Me(l.left.expression) && hS(l.left.expression)), y = a ? en(a) : d ? Vu(uc(l.right)) : cb(uc(l.right)); + if (y.flags & 524288 && f === 2 && r.escapedName === "export=") { + const x = Vd(y), I = Us(); + T7(x.members, I); + const M = I.size; + a && !a.exports && (a.exports = Us()), (a || r).exports.forEach((Y, Se) => { + var pe; + const Ze = I.get(Se); + if (Ze && Ze !== Y && !(Y.flags & 2097152)) + if (Y.flags & 111551 && Ze.flags & 111551) { + if (Y.valueDeclaration && Ze.valueDeclaration && Cr(Y.valueDeclaration) !== Cr(Ze.valueDeclaration)) { + const ht = Pi(Y.escapedName), or = ((pe = jn(Ze.valueDeclaration, Hl)) == null ? void 0 : pe.name) || Ze.valueDeclaration; + Bs( + je(Y.valueDeclaration, p.Duplicate_identifier_0, ht), + tn(or, p._0_was_also_declared_here, ht) + ), Bs( + je(or, p.Duplicate_identifier_0, ht), + tn(Y.valueDeclaration, p._0_was_also_declared_here, ht) + ); + } + const dt = ca(Y.flags | Ze.flags, Se); + dt.links.type = Qn([en(Y), en(Ze)]), dt.valueDeclaration = Ze.valueDeclaration, dt.declarations = Wi(Ze.declarations, Y.declarations), I.set(Se, dt); + } else + I.set(Se, Pm(Y, Ze)); + else + I.set(Se, Y); + }); + const z = Ea( + M !== I.size ? void 0 : x.symbol, + // Only set the type's symbol if it looks to be the same as the original type + I, + x.callSignatures, + x.constructSignatures, + x.indexInfos + ); + if (M === I.size && (y.aliasSymbol && (z.aliasSymbol = y.aliasSymbol, z.aliasTypeArguments = y.aliasTypeArguments), Cn(y) & 4)) { + z.aliasSymbol = y.symbol; + const Y = Po(y); + z.aliasTypeArguments = Ir(Y) ? Y : void 0; + } + return z.objectFlags |= QL([y]) | Cn(y) & 20608, z.symbol && z.symbol.flags & 32 && y === S_(z.symbol) && (z.objectFlags |= 16777216), z; + } + return p$(y) ? (lb(l, Va), Va) : y; + } + function ln(r, a) { + return Tn(r) && r.expression.kind === 110 && Yx(a, (l) => Bl(r, l)); + } + function v(r) { + const a = Lu( + r, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + return a.kind === 176 || a.kind === 262 || a.kind === 218 && !y3(a.parent); + } + function P(r, a) { + return E.assert(r.length === a.length), r.filter((l, f) => { + const d = a[f], y = fn(d) ? d : fn(d.parent) ? d.parent : void 0; + return y && v(y); + }); + } + function B(r, a, l) { + if (r.initializer) { + const f = Ds(r.name) ? Jt( + r.name, + /*includePatternInType*/ + !0, + /*reportErrors*/ + !1 + ) : ye; + return rl(yIe(r, tP(r, 0, f))); + } + return Ds(r.name) ? Jt(r.name, a, l) : (l && !vg(r) && lb(r, Je), a ? Xt : Je); + } + function ae(r, a, l) { + const f = Us(); + let d, y = 131200; + lr(r.elements, (I) => { + const M = I.propertyName || I.name; + if (I.dotDotDotToken) { + d = Cg( + de, + Je, + /*isReadonly*/ + !1 + ); + return; + } + const z = o0(M); + if (!ap(z)) { + y |= 512; + return; + } + const Y = op(z), Se = 4 | (I.initializer ? 16777216 : 0), pe = ca(Se, Y); + pe.links.type = B(I, a, l), f.set(pe.escapedName, pe); + }); + const x = Ea( + /*symbol*/ + void 0, + f, + He, + He, + d ? [d] : He + ); + return x.objectFlags |= y, a && (x.pattern = r, x.objectFlags |= 131072), x; + } + function Be(r, a, l) { + const f = r.elements, d = Co(f), y = d && d.kind === 208 && d.dotDotDotToken ? d : void 0; + if (f.length === 0 || f.length === 1 && y) + return R >= 2 ? E3e(Je) : Va; + const x = gr(f, (Y) => ul(Y) ? Je : B(Y, a, l)), I = AI(f, (Y) => !(Y === y || ul(Y) || Kk(Y)), f.length - 1) + 1, M = gr( + f, + (Y, Se) => Y === y ? 4 : Se >= I ? 2 : 1 + /* Required */ + ); + let z = Eg(x, M); + return a && (z = i3e(z), z.pattern = r, z.objectFlags |= 131072), z; + } + function Jt(r, a = !1, l = !1) { + a && Rv.push(r); + const f = r.kind === 206 ? ae(r, a, l) : Be(r, a, l); + return a && Rv.pop(), f; + } + function _n(r, a) { + return vp(Vf( + r, + /*includeOptionality*/ + !0, + 0 + /* Normal */ + ), r, a); + } + function es(r) { + const a = yn(r); + if (!a.resolvedType) { + const l = ca( + 4096, + "__importAttributes" + /* ImportAttributes */ + ), f = Us(); + lr(r.elements, (y) => { + const x = ca(4, Y5(y)); + x.parent = l, x.links.type = uut(y), x.links.target = x, f.set(x.escapedName, x); + }); + const d = Ea(l, f, He, He, He); + d.objectFlags |= 262272, a.resolvedType = d; + } + return a.resolvedType; + } + function io(r) { + const a = R_(r), l = Vet( + /*reportErrors*/ + !1 + ); + return l && a && a === l; + } + function vp(r, a, l) { + return r ? (r.flags & 4096 && io(a.parent) && (r = ape(a)), l && S$(a, r), r.flags & 8192 && (ma(a) || !a.type) && r.symbol !== dn(a) && (r = Mt), cf(r)) : (r = Ii(a) && a.dotDotDotToken ? Va : Je, l && (vg(a) || lb(a, r)), r); + } + function vg(r) { + const a = om(r), l = a.kind === 169 ? a.parent : a; + return QM(l); + } + function qf(r) { + const a = qc(r); + if (a) + return wi(a); + } + function gE(r) { + let a = r.valueDeclaration; + return a ? (ma(a) && (a = tx(a)), Ii(a) ? i$(a.parent) : !1) : !1; + } + function sfe(r) { + const a = Ci(r); + if (!a.type) { + const l = EG(r); + return !a.type && !gE(r) && (a.type = l), l; + } + return a.type; + } + function EG(r) { + if (r.flags & 4194304) + return E8(r); + if (r === Ae) + return Je; + if (r.flags & 134217728 && r.valueDeclaration) { + const f = dn(Cr(r.valueDeclaration)), d = ca(f.flags, "exports"); + d.declarations = f.declarations ? f.declarations.slice() : [], d.parent = r, d.links.target = f, f.valueDeclaration && (d.valueDeclaration = f.valueDeclaration), f.members && (d.members = new Map(f.members)), f.exports && (d.exports = new Map(f.exports)); + const y = Us(); + return y.set("exports", d), Ea(r, y, He, He, He); + } + E.assertIsDefined(r.valueDeclaration); + const a = r.valueDeclaration; + if (Ei(a) && tp(a)) + return a.statements.length ? cf(cb(Gi(a.statements[0].expression))) : hs; + if (Jy(a)) + return jw(r); + if (!hg( + r, + 0 + /* Type */ + )) + return r.flags & 512 && !(r.flags & 67108864) ? Bw(r) : hE(r); + let l; + if (a.kind === 277) + l = vp(qf(a) || uc(a.expression), a); + else if (fn(a) || an(a) && (Fs(a) || (Tn(a) || Y7(a)) && fn(a.parent))) + l = O2(r); + else if (Tn(a) || fo(a) || Me(a) || Na(a) || d_(a) || $c(a) || Tc(a) || fc(a) && !Ip(a) || pm(a) || Ei(a)) { + if (r.flags & 9136) + return Bw(r); + l = fn(a.parent) ? O2(r) : qf(a) || Je; + } else if (Xc(a)) + l = qf(a) || vIe(a); + else if (hm(a)) + l = qf(a) || KAe(a); + else if (_u(a)) + l = qf(a) || nP( + a.name, + 0 + /* Normal */ + ); + else if (Ip(a)) + l = qf(a) || bIe( + a, + 0 + /* Normal */ + ); + else if (Ii(a) || ss(a) || m_(a) || Kn(a) || ma(a) || h4(a)) + l = _n( + a, + /*reportErrors*/ + !0 + ); + else if (Zb(a)) + l = Bw(r); + else if (j0(a)) + l = NG(r); + else + return E.fail("Unhandled declaration kind! " + E.formatSyntaxKind(a.kind) + " for " + E.formatSymbol(r)); + return yg() ? l : r.flags & 512 && !(r.flags & 67108864) ? Bw(r) : hE(r); + } + function TT(r) { + if (r) + switch (r.kind) { + case 177: + return pf(r); + case 178: + return VB(r); + case 172: + return E.assert(cm(r)), qc(r); + } + } + function Rw(r) { + const a = TT(r); + return a && wi(a); + } + function afe(r) { + const a = Lme(r); + return a && a.symbol; + } + function ofe(r) { + return ib(Gf(r)); + } + function jw(r) { + const a = Ci(r); + if (!a.type) { + if (!hg( + r, + 0 + /* Type */ + )) + return We; + const l = Lo( + r, + 177 + /* GetAccessor */ + ), f = Lo( + r, + 178 + /* SetAccessor */ + ), d = jn(Lo( + r, + 172 + /* PropertyDeclaration */ + ), l_); + let y = l && an(l) && Za(l) || Rw(l) || Rw(f) || Rw(d) || l && l.body && tX(l) || d && _n( + d, + /*reportErrors*/ + !0 + ); + y || (f && !QM(f) ? dg(le, f, p.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation, Ui(r)) : l && !QM(l) ? dg(le, l, p.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation, Ui(r)) : d && !QM(d) && dg(le, d, p.Member_0_implicitly_has_an_1_type, Ui(r), "any"), y = Je), yg() || (TT(l) ? je(l, p._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, Ui(r)) : TT(f) || TT(d) ? je(f, p._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, Ui(r)) : l && le && je(l, p._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, Ui(r)), y = Je), a.type ?? (a.type = y); + } + return a.type; + } + function DG(r) { + const a = Ci(r); + if (!a.writeType) { + if (!hg( + r, + 7 + /* WriteType */ + )) + return We; + const l = Lo( + r, + 178 + /* SetAccessor */ + ) ?? jn(Lo( + r, + 172 + /* PropertyDeclaration */ + ), l_); + let f = Rw(l); + yg() || (TT(l) && je(l, p._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, Ui(r)), f = Je), a.writeType ?? (a.writeType = f || jw(r)); + } + return a.writeType; + } + function wG(r) { + const a = oi(S_(r)); + return a.flags & 8650752 ? a : a.flags & 2097152 ? Pn(a.types, (l) => !!(l.flags & 8650752)) : void 0; + } + function Bw(r) { + let a = Ci(r); + const l = a; + if (!a.type) { + const f = r.valueDeclaration && K$( + r.valueDeclaration, + /*allowDeclaration*/ + !1 + ); + if (f) { + const d = Mde(r, f); + d && (r = d, a = d.links); + } + l.type = a.type = PG(r); + } + return a.type; + } + function PG(r) { + const a = r.valueDeclaration; + if (r.flags & 1536 && YP(r)) + return Je; + if (a && (a.kind === 226 || vo(a) && a.parent.kind === 226)) + return O2(r); + if (r.flags & 512 && a && Ei(a) && a.commonJsModuleIndicator) { + const f = M_(r); + if (f !== r) { + if (!hg( + r, + 0 + /* Type */ + )) + return We; + const d = Oa(r.exports.get( + "export=" + /* ExportEquals */ + )), y = O2(d, d === f ? void 0 : f); + return yg() ? y : hE(r); + } + } + const l = ce(16, r); + if (r.flags & 32) { + const f = wG(r); + return f ? ra([l, f]) : l; + } else + return Z && r.flags & 16777216 ? gy( + l, + /*isProperty*/ + !0 + ) : l; + } + function NG(r) { + const a = Ci(r); + return a.type || (a.type = bPe(r)); + } + function Jk(r) { + const a = Ci(r); + if (!a.type) { + if (!hg( + r, + 0 + /* Type */ + )) + return We; + const l = Pl(r), f = r.declarations && ay( + ru(r), + /*dontRecursivelyResolve*/ + !0 + ), d = Dc(f?.declarations, (y) => Io(y) ? qf(y) : void 0); + if (a.type ?? (a.type = f?.declarations && bX(f.declarations) && r.declarations.length ? JL(f) : bX(r.declarations) ? Ye : d || (pu(l) & 111551 ? en(l) : We)), !yg()) + return hE(f ?? r), a.type ?? (a.type = We); + } + return a.type; + } + function AG(r) { + const a = Ci(r); + return a.type || (a.type = Bi(en(a.target), a.mapper)); + } + function cfe(r) { + const a = Ci(r); + return a.writeType || (a.writeType = Bi(ly(a.target), a.mapper)); + } + function hE(r) { + const a = r.valueDeclaration; + if (a) { + if (qc(a)) + return je(r.valueDeclaration, p._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, Ui(r)), We; + le && (a.kind !== 169 || a.initializer) && je(r.valueDeclaration, p._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, Ui(r)); + } else if (r.flags & 2097152) { + const l = ru(r); + l && je(l, p.Circular_definition_of_import_alias_0, Ui(r)); + } + return Je; + } + function D8(r) { + const a = Ci(r); + return a.type || (E.assertIsDefined(a.deferralParent), E.assertIsDefined(a.deferralConstituents), a.type = a.deferralParent.flags & 1048576 ? Qn(a.deferralConstituents) : ra(a.deferralConstituents)), a.type; + } + function lfe(r) { + const a = Ci(r); + return !a.writeType && a.deferralWriteConstituents && (E.assertIsDefined(a.deferralParent), E.assertIsDefined(a.deferralConstituents), a.writeType = a.deferralParent.flags & 1048576 ? Qn(a.deferralWriteConstituents) : ra(a.deferralWriteConstituents)), a.writeType; + } + function ly(r) { + const a = rc(r); + return r.flags & 4 ? a & 2 ? a & 65536 ? lfe(r) || D8(r) : ( + // NOTE: cast to TransientSymbol should be safe because only TransientSymbols can have CheckFlags.SyntheticProperty + r.links.writeType || r.links.type + ) : p0(en(r), !!(r.flags & 16777216)) : r.flags & 98304 ? a & 1 ? cfe(r) : DG(r) : en(r); + } + function en(r) { + const a = rc(r); + return a & 65536 ? D8(r) : a & 1 ? AG(r) : a & 262144 ? set(r) : a & 8192 ? Ent(r) : r.flags & 7 ? sfe(r) : r.flags & 9136 ? Bw(r) : r.flags & 8 ? NG(r) : r.flags & 98304 ? jw(r) : r.flags & 2097152 ? Jk(r) : We; + } + function M1(r) { + return p0(en(r), !!(r.flags & 16777216)); + } + function IG(r, a) { + if (r === void 0 || !(Cn(r) & 4)) + return !1; + for (const l of a) + if (r.target === l) + return !0; + return !1; + } + function Mm(r, a) { + return r !== void 0 && a !== void 0 && (Cn(r) & 4) !== 0 && r.target === a; + } + function xT(r) { + return Cn(r) & 4 ? r.target : r; + } + function yE(r, a) { + return l(r); + function l(f) { + if (Cn(f) & 7) { + const d = xT(f); + return d === a || at(wo(d), l); + } else if (f.flags & 2097152) + return at(f.types, l); + return !1; + } + } + function zL(r, a) { + for (const l of a) + r = Sh(r, L2(dn(l))); + return r; + } + function vE(r, a) { + for (; ; ) { + if (r = r.parent, r && fn(r)) { + const f = Sc(r); + if (f === 6 || f === 3) { + const d = dn(r.left); + d && d.parent && !ur(d.parent.valueDeclaration, (y) => r === y) && (r = d.parent.valueDeclaration); + } + } + if (!r) + return; + const l = r.kind; + switch (l) { + case 263: + case 231: + case 264: + case 179: + case 180: + case 173: + case 184: + case 185: + case 317: + case 262: + case 174: + case 218: + case 219: + case 265: + case 345: + case 346: + case 340: + case 338: + case 200: + case 194: { + const d = vE(r, a); + if ((l === 218 || l === 219 || Ip(r)) && $f(r)) { + const I = Uc(Ps( + en(dn(r)), + 0 + /* Call */ + )); + if (I && I.typeParameters) + return [...d || He, ...I.typeParameters]; + } + if (l === 200) + return Pr(d, L2(dn(r.typeParameter))); + if (l === 194) + return Wi(d, rpe(r)); + const y = zL(d, My(r)), x = a && (l === 263 || l === 231 || l === 264 || Um(r)) && S_(dn(r)).thisType; + return x ? Pr(y, x) : y; + } + case 341: + const f = k3(r); + f && (r = f.valueDeclaration); + break; + case 320: { + const d = vE(r, a); + return r.tags ? zL(d, na(r.tags, (y) => Bp(y) ? y.typeParameters : void 0)) : d; + } + } + } + } + function WL(r) { + var a; + const l = r.flags & 32 || r.flags & 16 ? r.valueDeclaration : (a = r.declarations) == null ? void 0 : a.find((f) => { + if (f.kind === 264) + return !0; + if (f.kind !== 260) + return !1; + const d = f.initializer; + return !!d && (d.kind === 218 || d.kind === 219); + }); + return E.assert(!!l, "Class was missing valueDeclaration -OR- non-class had no interface declarations"), vE(l); + } + function zd(r) { + if (!r.declarations) + return; + let a; + for (const l of r.declarations) + (l.kind === 264 || l.kind === 263 || l.kind === 231 || Um(l) || T3(l)) && (a = zL(a, My(l))); + return a; + } + function ufe(r) { + return Wi(WL(r), zd(r)); + } + function rb(r) { + const a = Ps( + r, + 1 + /* Construct */ + ); + if (a.length === 1) { + const l = a[0]; + if (!l.typeParameters && l.parameters.length === 1 && ku(l)) { + const f = WM(l.parameters[0]); + return Ua(f) || gM(f) === Je; + } + } + return !1; + } + function wr(r) { + if (Ps( + r, + 1 + /* Construct */ + ).length > 0) + return !0; + if (r.flags & 8650752) { + const a = iu(r); + return !!a && rb(a); + } + return !1; + } + function Dn(r) { + const a = Fh(r.symbol); + return a && sm(a); + } + function On(r, a, l) { + const f = Ir(a), d = an(l); + return kn(Ps( + r, + 1 + /* Construct */ + ), (y) => (d || f >= kg(y.typeParameters)) && f <= Ir(y.typeParameters)); + } + function yi(r, a, l) { + const f = On(r, a, l), d = gr(a, wi); + return Wc(f, (y) => at(y.typeParameters) ? M8(y, d, an(l)) : y); + } + function oi(r) { + if (!r.resolvedBaseConstructorType) { + const a = Fh(r.symbol), l = a && sm(a), f = Dn(r); + if (!f) + return r.resolvedBaseConstructorType = ft; + if (!hg( + r, + 1 + /* ResolvedBaseConstructorType */ + )) + return We; + const d = Gi(f.expression); + if (l && f !== l && (E.assert(!l.typeArguments), Gi(l.expression)), d.flags & 2621440 && Vd(d), !yg()) + return je(r.symbol.valueDeclaration, p._0_is_referenced_directly_or_indirectly_in_its_own_base_expression, Ui(r.symbol)), r.resolvedBaseConstructorType ?? (r.resolvedBaseConstructorType = We); + if (!(d.flags & 1) && d !== zt && !wr(d)) { + const y = je(f.expression, p.Type_0_is_not_a_constructor_function_type, $r(d)); + if (d.flags & 262144) { + const x = Vw(d); + let I = ye; + if (x) { + const M = Ps( + x, + 1 + /* Construct */ + ); + M[0] && (I = Ba(M[0])); + } + d.symbol.declarations && Bs(y, tn(d.symbol.declarations[0], p.Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1, Ui(d.symbol), $r(I))); + } + return r.resolvedBaseConstructorType ?? (r.resolvedBaseConstructorType = We); + } + r.resolvedBaseConstructorType ?? (r.resolvedBaseConstructorType = d); + } + return r.resolvedBaseConstructorType; + } + function Ma(r) { + let a = He; + if (r.symbol.declarations) + for (const l of r.symbol.declarations) { + const f = MC(l); + if (f) + for (const d of f) { + const y = wi(d); + H(y) || (a === He ? a = [y] : a.push(y)); + } + } + return a; + } + function so(r, a) { + je(r, p.Type_0_recursively_references_itself_as_a_base_type, $r( + a, + /*enclosingDeclaration*/ + void 0, + 2 + /* WriteArrayAsGenericType */ + )); + } + function wo(r) { + if (!r.baseTypesResolved) { + if (hg( + r, + 6 + /* ResolvedBaseTypes */ + ) && (r.objectFlags & 8 ? r.resolvedBaseTypes = [bg(r)] : r.symbol.flags & 96 ? (r.symbol.flags & 32 && Rm(r), r.symbol.flags & 64 && w8(r)) : E.fail("type must be class or interface"), !yg() && r.symbol.declarations)) + for (const a of r.symbol.declarations) + (a.kind === 263 || a.kind === 264) && so(a, r); + r.baseTypesResolved = !0; + } + return r.resolvedBaseTypes; + } + function bg(r) { + const a = Wc(r.typeParameters, (l, f) => r.elementFlags[f] & 8 ? j_(l, st) : l); + return mu(Qn(a || He), r.readonly); + } + function Rm(r) { + r.resolvedBaseTypes = Wj; + const a = Uu(oi(r)); + if (!(a.flags & 2621441)) + return r.resolvedBaseTypes = He; + const l = Dn(r); + let f; + const d = a.symbol ? ko(a.symbol) : void 0; + if (a.symbol && a.symbol.flags & 32 && Wd(d)) + f = s3e(l, a.symbol); + else if (a.flags & 1) + f = a; + else { + const x = yi(a, l.typeArguments, l); + if (!x.length) + return je(l.expression, p.No_base_constructor_has_the_specified_number_of_type_arguments), r.resolvedBaseTypes = He; + f = Ba(x[0]); + } + if (H(f)) + return r.resolvedBaseTypes = He; + const y = md(f); + if (!jm(y)) { + const x = kfe( + /*errorInfo*/ + void 0, + f + ), I = fs(x, p.Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members, $r(y)); + return Pa.add(Jg(Cr(l.expression), l.expression, I)), r.resolvedBaseTypes = He; + } + return r === y || yE(y, r) ? (je(r.symbol.valueDeclaration, p.Type_0_recursively_references_itself_as_a_base_type, $r( + r, + /*enclosingDeclaration*/ + void 0, + 2 + /* WriteArrayAsGenericType */ + )), r.resolvedBaseTypes = He) : (r.resolvedBaseTypes === Wj && (r.members = void 0), r.resolvedBaseTypes = [y]); + } + function Wd(r) { + const a = r.outerTypeParameters; + if (a) { + const l = a.length - 1, f = Po(r); + return a[l].symbol !== f[l].symbol; + } + return !0; + } + function jm(r) { + if (r.flags & 262144) { + const a = iu(r); + if (a) + return jm(a); + } + return !!(r.flags & 67633153 && !T_(r) || r.flags & 2097152 && Ri(r.types, jm)); + } + function w8(r) { + if (r.resolvedBaseTypes = r.resolvedBaseTypes || He, r.symbol.declarations) { + for (const a of r.symbol.declarations) + if (a.kind === 264 && B4(a)) + for (const l of B4(a)) { + const f = md(wi(l)); + H(f) || (jm(f) ? r !== f && !yE(f, r) ? r.resolvedBaseTypes === He ? r.resolvedBaseTypes = [f] : r.resolvedBaseTypes.push(f) : so(a, r) : je(l, p.An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members)); + } + } + } + function bE(r) { + if (!r.declarations) + return !0; + for (const a of r.declarations) + if (a.kind === 264) { + if (a.flags & 256) + return !1; + const l = B4(a); + if (l) { + for (const f of l) + if (_o(f.expression)) { + const d = oc( + f.expression, + 788968, + /*ignoreErrors*/ + !0 + ); + if (!d || !(d.flags & 64) || S_(d).thisType) + return !1; + } + } + } + return !0; + } + function S_(r) { + let a = Ci(r); + const l = a; + if (!a.declaredType) { + const f = r.flags & 32 ? 1 : 2, d = Mde(r, r.valueDeclaration && Oat(r.valueDeclaration)); + d && (r = d, a = d.links); + const y = l.declaredType = a.declaredType = ce(f, r), x = WL(r), I = zd(r); + (x || I || f === 1 || !bE(r)) && (y.objectFlags |= 4, y.typeParameters = Wi(x, I), y.outerTypeParameters = x, y.localTypeParameters = I, y.instantiations = /* @__PURE__ */ new Map(), y.instantiations.set(Yp(y.typeParameters), y), y.target = y, y.resolvedTypeArguments = y.typeParameters, y.thisType = sr(r), y.thisType.isThisType = !0, y.thisType.constraint = y); + } + return a.declaredType; + } + function hPe(r) { + var a; + const l = Ci(r); + if (!l.declaredType) { + if (!hg( + r, + 2 + /* DeclaredType */ + )) + return We; + const f = E.checkDefined((a = r.declarations) == null ? void 0 : a.find(T3), "Type alias symbol with no valid declaration found"), d = Fp(f) ? f.typeExpression : f.type; + let y = d ? wi(d) : We; + if (yg()) { + const x = zd(r); + x && (l.typeParameters = x, l.instantiations = /* @__PURE__ */ new Map(), l.instantiations.set(Yp(x), y)), y === rn && r.escapedName === "BuiltinIteratorReturn" && (y = Jfe()); + } else + y = We, f.kind === 340 ? je(f.typeExpression.type, p.Type_alias_0_circularly_references_itself, Ui(r)) : je(Hl(f) && f.name || f, p.Type_alias_0_circularly_references_itself, Ui(r)); + l.declaredType ?? (l.declaredType = y); + } + return l.declaredType; + } + function FG(r) { + return r.flags & 1056 && r.symbol.flags & 8 ? ko(af(r.symbol)) : r; + } + function yPe(r) { + const a = Ci(r); + if (!a.declaredType) { + const l = []; + if (r.declarations) { + for (const d of r.declarations) + if (d.kind === 266) { + for (const y of d.members) + if (SE(y)) { + const x = dn(y), I = UT(y).value, M = Gk( + I !== void 0 ? art(I, Zs(r), x) : vPe(x) + ); + Ci(x).declaredType = M, l.push(Vu(M)); + } + } + } + const f = l.length ? Qn( + l, + 1, + r, + /*aliasTypeArguments*/ + void 0 + ) : vPe(r); + f.flags & 1048576 && (f.flags |= 1024, f.symbol = r), a.declaredType = f; + } + return a.declaredType; + } + function vPe(r) { + const a = Xp(32, r), l = Xp(32, r); + return a.regularType = a, a.freshType = l, l.regularType = a, l.freshType = l, a; + } + function bPe(r) { + const a = Ci(r); + if (!a.declaredType) { + const l = yPe(af(r)); + a.declaredType || (a.declaredType = l); + } + return a.declaredType; + } + function L2(r) { + const a = Ci(r); + return a.declaredType || (a.declaredType = sr(r)); + } + function FKe(r) { + const a = Ci(r); + return a.declaredType || (a.declaredType = ko(Pl(r))); + } + function ko(r) { + return SPe(r) || We; + } + function SPe(r) { + if (r.flags & 96) + return S_(r); + if (r.flags & 524288) + return hPe(r); + if (r.flags & 262144) + return L2(r); + if (r.flags & 384) + return yPe(r); + if (r.flags & 8) + return bPe(r); + if (r.flags & 2097152) + return FKe(r); + } + function UL(r) { + switch (r.kind) { + case 133: + case 159: + case 154: + case 150: + case 163: + case 136: + case 155: + case 151: + case 116: + case 157: + case 146: + case 201: + return !0; + case 188: + return UL(r.elementType); + case 183: + return !r.typeArguments || r.typeArguments.every(UL); + } + return !1; + } + function OKe(r) { + const a = hC(r); + return !a || UL(a); + } + function TPe(r) { + const a = qc(r); + return a ? UL(a) : !C0(r); + } + function LKe(r) { + const a = pf(r), l = My(r); + return (r.kind === 176 || !!a && UL(a)) && r.parameters.every(TPe) && l.every(OKe); + } + function MKe(r) { + if (r.declarations && r.declarations.length === 1) { + const a = r.declarations[0]; + if (a) + switch (a.kind) { + case 172: + case 171: + return TPe(a); + case 174: + case 173: + case 176: + case 177: + case 178: + return LKe(a); + } + } + return !1; + } + function xPe(r, a, l) { + const f = Us(); + for (const d of r) + f.set(d.escapedName, l && MKe(d) ? d : upe(d, a)); + return f; + } + function kPe(r, a) { + for (const l of a) { + if (CPe(l)) + continue; + const f = r.get(l.escapedName); + (!f || f.valueDeclaration && fn(f.valueDeclaration) && !n0(f) && !sK(f.valueDeclaration)) && (r.set(l.escapedName, l), r.set(l.escapedName, l)); + } + } + function CPe(r) { + return !!r.valueDeclaration && Fu(r.valueDeclaration) && Vs(r.valueDeclaration); + } + function _fe(r) { + if (!r.declaredProperties) { + const a = r.symbol, l = Sg(a); + r.declaredProperties = zi(l), r.declaredCallSignatures = He, r.declaredConstructSignatures = He, r.declaredIndexInfos = He, r.declaredCallSignatures = B2(l.get( + "__call" + /* Call */ + )), r.declaredConstructSignatures = B2(l.get( + "__new" + /* New */ + )), r.declaredIndexInfos = t3e(a); + } + return r; + } + function ffe(r) { + return EPe(r) && ap(fa(r) ? hd(r) : uc(r.argumentExpression)); + } + function RKe(r) { + return EPe(r) && jKe(fa(r) ? hd(r) : uc(r.argumentExpression)); + } + function EPe(r) { + if (!fa(r) && !fo(r)) + return !1; + const a = fa(r) ? r.expression : r.argumentExpression; + return _o(a); + } + function jKe(r) { + return Ls(r, Ot); + } + function P8(r) { + return r.charCodeAt(0) === 95 && r.charCodeAt(1) === 95 && r.charCodeAt(2) === 64; + } + function N8(r) { + const a = is(r); + return !!a && ffe(a); + } + function DPe(r) { + const a = is(r); + return !!a && RKe(a); + } + function SE(r) { + return !Ph(r) || N8(r); + } + function BKe(r) { + return i5(r) && !ffe(r); + } + function JKe(r, a, l) { + E.assert(!!(rc(r) & 4096), "Expected a late-bound symbol."), r.flags |= l, Ci(a.symbol).lateSymbol = r, r.declarations ? a.symbol.isReplaceableByMethod || r.declarations.push(a) : r.declarations = [a], l & 111551 && (!r.valueDeclaration || r.valueDeclaration.kind !== a.kind) && (r.valueDeclaration = a); + } + function wPe(r, a, l, f) { + E.assert(!!f.symbol, "The member is expected to have a symbol."); + const d = yn(f); + if (!d.resolvedSymbol) { + d.resolvedSymbol = f.symbol; + const y = fn(f) ? f.left : f.name, x = fo(y) ? uc(y.argumentExpression) : hd(y); + if (ap(x)) { + const I = op(x), M = f.symbol.flags; + let z = l.get(I); + z || l.set(I, z = ca( + 0, + I, + 4096 + /* Late */ + )); + const Y = a && a.get(I); + if (!(r.flags & 32) && z.flags & sf(M)) { + const Se = Y ? Wi(Y.declarations, z.declarations) : z.declarations, pe = !(x.flags & 8192) && Pi(I) || co(y); + lr(Se, (Ze) => je(is(Ze) || Ze, p.Property_0_was_also_declared_here, pe)), je(y || f, p.Duplicate_property_0, pe), z = ca( + 0, + I, + 4096 + /* Late */ + ); + } + return z.links.nameType = x, JKe(z, f, M), z.parent ? E.assert(z.parent === r, "Existing symbol parent should match new one") : z.parent = r, d.resolvedSymbol = z; + } + } + return d.resolvedSymbol; + } + function zKe(r, a, l, f) { + let d = l.get( + "__index" + /* Index */ + ); + if (!d) { + const y = a?.get( + "__index" + /* Index */ + ); + y ? (d = mg(y), d.links.checkFlags |= 4096) : d = ca( + 0, + "__index", + 4096 + /* Late */ + ), l.set("__index", d); + } + d.declarations ? f.symbol.isReplaceableByMethod || d.declarations.push(f) : d.declarations = [f]; + } + function pfe(r, a) { + const l = Ci(r); + if (!l[a]) { + const f = a === "resolvedExports", d = f ? r.flags & 1536 ? Lk(r).exports : r.exports : r.members; + l[a] = d || A; + const y = Us(); + for (const M of r.declarations || He) { + const z = YZ(M); + if (z) + for (const Y of z) + f === Kc(Y) && (N8(Y) ? wPe(r, d, y, Y) : DPe(Y) && zKe(r, d, y, Y)); + } + const x = gT(r).assignmentDeclarationMembers; + if (x) { + const M = Ki(x.values()); + for (const z of M) { + const Y = Sc(z), Se = Y === 3 || fn(z) && M$(z, Y) || Y === 9 || Y === 6; + f === !Se && N8(z) && wPe(r, d, y, z); + } + } + let I = Uv(d, y); + if (r.flags & 33554432 && l.cjsExportMerged && r.declarations) + for (const M of r.declarations) { + const z = Ci(M.symbol)[a]; + if (!I) { + I = z; + continue; + } + z && z.forEach((Y, Se) => { + const pe = I.get(Se); + if (!pe) I.set(Se, Y); + else { + if (pe === Y) return; + I.set(Se, Pm(pe, Y)); + } + }); + } + l[a] = I || A; + } + return l[a]; + } + function Sg(r) { + return r.flags & 6256 ? pfe( + r, + "resolvedMembers" + /* resolvedMembers */ + ) : r.members || A; + } + function OG(r) { + if (r.flags & 106500 && r.escapedName === "__computed") { + const a = Ci(r); + if (!a.lateSymbol && at(r.declarations, N8)) { + const l = Oa(r.parent); + at(r.declarations, Kc) ? zu(l) : Sg(l); + } + return a.lateSymbol || (a.lateSymbol = r); + } + return r; + } + function of(r, a, l) { + if (Cn(r) & 4) { + const f = r.target, d = Po(r); + return Ir(f.typeParameters) === Ir(d) ? a0(f, Wi(d, [a || f.thisType])) : r; + } else if (r.flags & 2097152) { + const f = Wc(r.types, (d) => of(d, a, l)); + return f !== r.types ? ra(f) : r; + } + return l ? Uu(r) : r; + } + function PPe(r, a, l, f) { + let d, y, x, I, M; + SR(l, f, 0, l.length) ? (y = a.symbol ? Sg(a.symbol) : Us(a.declaredProperties), x = a.declaredCallSignatures, I = a.declaredConstructSignatures, M = a.declaredIndexInfos) : (d = B_(l, f), y = xPe( + a.declaredProperties, + d, + /*mappingThisOnly*/ + l.length === 1 + ), x = t$(a.declaredCallSignatures, d), I = t$(a.declaredConstructSignatures, d), M = sNe(a.declaredIndexInfos, d)); + const z = wo(a); + if (z.length) { + if (a.symbol && y === Sg(a.symbol)) { + const Se = Us(a.declaredProperties), pe = BG(a.symbol); + pe && Se.set("__index", pe), y = Se; + } + ws(r, y, x, I, M); + const Y = Co(f); + for (const Se of z) { + const pe = Y ? of(Bi(Se, d), Y) : Se; + kPe(y, qa(pe)), x = Wi(x, Ps( + pe, + 0 + /* Call */ + )), I = Wi(I, Ps( + pe, + 1 + /* Construct */ + )); + const Ze = pe !== Je ? du(pe) : [Cg( + de, + Je, + /*isReadonly*/ + !1 + )]; + M = Wi(M, kn(Ze, (dt) => !Ww(M, dt.keyType))); + } + } + ws(r, y, x, I, M); + } + function WKe(r) { + PPe(r, _fe(r), He, He); + } + function UKe(r) { + const a = _fe(r.target), l = Wi(a.typeParameters, [a.thisType]), f = Po(r), d = f.length === l.length ? f : Wi(f, [r]); + PPe(r, a, l, d); + } + function fh(r, a, l, f, d, y, x, I) { + const M = new _(Wr, I); + return M.declaration = r, M.typeParameters = a, M.parameters = f, M.thisParameter = l, M.resolvedReturnType = d, M.resolvedTypePredicate = y, M.minArgumentCount = x, M.resolvedMinArgumentCount = void 0, M.target = void 0, M.mapper = void 0, M.compositeSignatures = void 0, M.compositeKind = void 0, M; + } + function A8(r) { + const a = fh( + r.declaration, + r.typeParameters, + r.thisParameter, + r.parameters, + /*resolvedReturnType*/ + void 0, + /*resolvedTypePredicate*/ + void 0, + r.minArgumentCount, + r.flags & 167 + /* PropagatingFlags */ + ); + return a.target = r.target, a.mapper = r.mapper, a.compositeSignatures = r.compositeSignatures, a.compositeKind = r.compositeKind, a; + } + function NPe(r, a) { + const l = A8(r); + return l.compositeSignatures = a, l.compositeKind = 1048576, l.target = void 0, l.mapper = void 0, l; + } + function VKe(r, a) { + if ((r.flags & 24) === a) + return r; + r.optionalCallSignatureCache || (r.optionalCallSignatureCache = {}); + const l = a === 8 ? "inner" : "outer"; + return r.optionalCallSignatureCache[l] || (r.optionalCallSignatureCache[l] = qKe(r, a)); + } + function qKe(r, a) { + E.assert(a === 8 || a === 16, "An optional call signature can either be for an inner call chain or an outer call chain, but not both."); + const l = A8(r); + return l.flags |= a, l; + } + function dfe(r, a) { + if (ku(r)) { + const d = r.parameters.length - 1, y = r.parameters[d], x = en(y); + if (ga(x)) + return [l(x, d, y)]; + if (!a && x.flags & 1048576 && Ri(x.types, ga)) + return gr(x.types, (I) => l(I, d, y)); + } + return [r.parameters]; + function l(d, y, x) { + const I = Po(d), M = f(d, x), z = gr(I, (Y, Se) => { + const pe = M && M[Se] ? M[Se] : eP(r, y + Se, d), Ze = d.target.elementFlags[Se], dt = Ze & 12 ? 32768 : Ze & 2 ? 16384 : 0, ht = ca(1, pe, dt); + return ht.links.type = Ze & 4 ? mu(Y) : Y, ht; + }); + return Wi(r.parameters.slice(0, y), z); + } + function f(d, y) { + const x = gr(d.target.labeledElementDeclarations, (I, M) => Wde(I, M, d.target.elementFlags[M], y)); + if (x) { + const I = [], M = /* @__PURE__ */ new Set(); + for (let Y = 0; Y < x.length; Y++) { + const Se = x[Y]; + S0(M, Se) || I.push(Y); + } + const z = /* @__PURE__ */ new Map(); + for (const Y of I) { + let Se = z.get(x[Y]) ?? 1, pe; + for (; !S0(M, pe = `${x[Y]}_${Se}`); ) + Se++; + x[Y] = pe, z.set(x[Y], Se + 1); + } + } + return x; + } + } + function HKe(r) { + const a = oi(r), l = Ps( + a, + 1 + /* Construct */ + ), f = Fh(r.symbol), d = !!f && $n( + f, + 64 + /* Abstract */ + ); + if (l.length === 0) + return [fh( + /*declaration*/ + void 0, + r.localTypeParameters, + /*thisParameter*/ + void 0, + He, + r, + /*resolvedTypePredicate*/ + void 0, + 0, + d ? 4 : 0 + /* None */ + )]; + const y = Dn(r), x = an(y), I = YL(y), M = Ir(I), z = []; + for (const Y of l) { + const Se = kg(Y.typeParameters), pe = Ir(Y.typeParameters); + if (x || M >= Se && M <= pe) { + const Ze = pe ? jG(Y, fy(I, Y.typeParameters, Se, x)) : A8(Y); + Ze.typeParameters = r.localTypeParameters, Ze.resolvedReturnType = r, Ze.flags = d ? Ze.flags | 4 : Ze.flags & -5, z.push(Ze); + } + } + return z; + } + function LG(r, a, l, f, d) { + for (const y of r) + if (dM(y, a, l, f, d, l ? krt : V8)) + return y; + } + function GKe(r, a, l) { + if (a.typeParameters) { + if (l > 0) + return; + for (let d = 1; d < r.length; d++) + if (!LG( + r[d], + a, + /*partialMatch*/ + !1, + /*ignoreThisTypes*/ + !1, + /*ignoreReturnTypes*/ + !1 + )) + return; + return [a]; + } + let f; + for (let d = 0; d < r.length; d++) { + const y = d === l ? a : LG( + r[d], + a, + /*partialMatch*/ + !1, + /*ignoreThisTypes*/ + !1, + /*ignoreReturnTypes*/ + !0 + ) || LG( + r[d], + a, + /*partialMatch*/ + !0, + /*ignoreThisTypes*/ + !1, + /*ignoreReturnTypes*/ + !0 + ); + if (!y) + return; + f = Sh(f, y); + } + return f; + } + function mfe(r) { + let a, l; + for (let f = 0; f < r.length; f++) { + if (r[f].length === 0) return He; + r[f].length > 1 && (l = l === void 0 ? f : -1); + for (const d of r[f]) + if (!a || !LG( + a, + d, + /*partialMatch*/ + !1, + /*ignoreThisTypes*/ + !1, + /*ignoreReturnTypes*/ + !0 + )) { + const y = GKe(r, d, f); + if (y) { + let x = d; + if (y.length > 1) { + let I = d.thisParameter; + const M = lr(y, (z) => z.thisParameter); + if (M) { + const z = ra(Li(y, (Y) => Y.thisParameter && en(Y.thisParameter))); + I = FT(M, z); + } + x = NPe(d, y), x.thisParameter = I; + } + (a || (a = [])).push(x); + } + } + } + if (!Ir(a) && l !== -1) { + const f = r[l !== void 0 ? l : 0]; + let d = f.slice(); + for (const y of r) + if (y !== f) { + const x = y[0]; + if (E.assert(!!x, "getUnionSignatures bails early on empty signature lists and should not have empty lists on second pass"), d = x.typeParameters && at(d, (I) => !!I.typeParameters && !APe(x.typeParameters, I.typeParameters)) ? void 0 : gr(d, (I) => QKe(I, x)), !d) + break; + } + a = d; + } + return a || He; + } + function APe(r, a) { + if (Ir(r) !== Ir(a)) + return !1; + if (!r || !a) + return !0; + const l = B_(a, r); + for (let f = 0; f < r.length; f++) { + const d = r[f], y = a[f]; + if (d !== y && !gh(Vw(d) || ye, Bi(Vw(y) || ye, l))) + return !1; + } + return !0; + } + function $Ke(r, a, l) { + if (!r || !a) + return r || a; + const f = ra([en(r), Bi(en(a), l)]); + return FT(r, f); + } + function XKe(r, a, l) { + const f = z_(r), d = z_(a), y = f >= d ? r : a, x = y === r ? a : r, I = y === r ? f : d, M = wg(r) || wg(a), z = M && !wg(y), Y = new Array(I + (z ? 1 : 0)); + for (let Se = 0; Se < I; Se++) { + let pe = Q2(y, Se); + y === a && (pe = Bi(pe, l)); + let Ze = Q2(x, Se) || ye; + x === a && (Ze = Bi(Ze, l)); + const dt = ra([pe, Ze]), ht = M && !z && Se === I - 1, or = Se >= $d(y) && Se >= $d(x), nr = Se >= f ? void 0 : eP(r, Se), Kr = Se >= d ? void 0 : eP(a, Se), Vr = nr === Kr ? nr : nr ? Kr ? void 0 : nr : Kr, cr = ca( + 1 | (or && !ht ? 16777216 : 0), + Vr || `arg${Se}`, + ht ? 32768 : or ? 16384 : 0 + ); + cr.links.type = ht ? mu(dt) : dt, Y[Se] = cr; + } + if (z) { + const Se = ca( + 1, + "args", + 32768 + /* RestParameter */ + ); + Se.links.type = mu(Gd(x, I)), x === a && (Se.links.type = Bi(Se.links.type, l)), Y[I] = Se; + } + return Y; + } + function QKe(r, a) { + const l = r.typeParameters || a.typeParameters; + let f; + r.typeParameters && a.typeParameters && (f = B_(a.typeParameters, r.typeParameters)); + let d = (r.flags | a.flags) & 166; + const y = r.declaration, x = XKe(r, a, f), I = Co(x); + I && rc(I) & 32768 && (d |= 1); + const M = $Ke(r.thisParameter, a.thisParameter, f), z = Math.max(r.minArgumentCount, a.minArgumentCount), Y = fh( + y, + l, + M, + x, + /*resolvedReturnType*/ + void 0, + /*resolvedTypePredicate*/ + void 0, + z, + d + ); + return Y.compositeKind = 1048576, Y.compositeSignatures = Wi(r.compositeKind !== 2097152 && r.compositeSignatures || [r], [a]), f ? Y.mapper = r.compositeKind !== 2097152 && r.mapper && r.compositeSignatures ? q2(r.mapper, f) : f : r.compositeKind !== 2097152 && r.mapper && r.compositeSignatures && (Y.mapper = r.mapper), Y; + } + function IPe(r) { + const a = du(r[0]); + if (a) { + const l = []; + for (const f of a) { + const d = f.keyType; + Ri(r, (y) => !!ph(y, d)) && l.push(Cg(d, Qn(gr(r, (y) => nb(y, d))), at(r, (y) => ph(y, d).isReadonly))); + } + return l; + } + return He; + } + function YKe(r) { + const a = mfe(gr(r.types, (d) => d === Rl ? [Yr] : Ps( + d, + 0 + /* Call */ + ))), l = mfe(gr(r.types, (d) => Ps( + d, + 1 + /* Construct */ + ))), f = IPe(r.types); + ws(r, A, a, l, f); + } + function VL(r, a) { + return r ? a ? ra([r, a]) : r : a; + } + function FPe(r) { + const a = b0(r, (f) => Ps( + f, + 1 + /* Construct */ + ).length > 0), l = gr(r, rb); + if (a > 0 && a === b0(l, (f) => f)) { + const f = l.indexOf( + /*searchElement*/ + !0 + ); + l[f] = !1; + } + return l; + } + function ZKe(r, a, l, f) { + const d = []; + for (let y = 0; y < a.length; y++) + y === f ? d.push(r) : l[y] && d.push(Ba(Ps( + a[y], + 1 + /* Construct */ + )[0])); + return ra(d); + } + function KKe(r) { + let a, l, f; + const d = r.types, y = FPe(d), x = b0(y, (I) => I); + for (let I = 0; I < d.length; I++) { + const M = r.types[I]; + if (!y[I]) { + let z = Ps( + M, + 1 + /* Construct */ + ); + z.length && x > 0 && (z = gr(z, (Y) => { + const Se = A8(Y); + return Se.resolvedReturnType = ZKe(Ba(Y), d, y, I), Se; + })), l = OPe(l, z); + } + a = OPe(a, Ps( + M, + 0 + /* Call */ + )), f = qu(du(M), (z, Y) => LPe( + z, + Y, + /*union*/ + !1 + ), f); + } + ws(r, A, a || He, l || He, f || He); + } + function OPe(r, a) { + for (const l of a) + (!r || Ri(r, (f) => !dM( + f, + l, + /*partialMatch*/ + !1, + /*ignoreThisTypes*/ + !1, + /*ignoreReturnTypes*/ + !1, + V8 + ))) && (r = Pr(r, l)); + return r; + } + function LPe(r, a, l) { + if (r) + for (let f = 0; f < r.length; f++) { + const d = r[f]; + if (d.keyType === a.keyType) + return r[f] = Cg(d.keyType, l ? Qn([d.type, a.type]) : ra([d.type, a.type]), l ? d.isReadonly || a.isReadonly : d.isReadonly && a.isReadonly), r; + } + return Pr(r, a); + } + function eet(r) { + if (r.target) { + ws(r, A, He, He, He); + const x = xPe( + _y(r.target), + r.mapper, + /*mappingThisOnly*/ + !1 + ), I = t$(Ps( + r.target, + 0 + /* Call */ + ), r.mapper), M = t$(Ps( + r.target, + 1 + /* Construct */ + ), r.mapper), z = sNe(du(r.target), r.mapper); + ws(r, x, I, M, z); + return; + } + const a = Oa(r.symbol); + if (a.flags & 2048) { + ws(r, A, He, He, He); + const x = Sg(a), I = B2(x.get( + "__call" + /* Call */ + )), M = B2(x.get( + "__new" + /* New */ + )), z = t3e(a); + ws(r, x, I, M, z); + return; + } + let l = zu(a), f; + if (a === he) { + const x = /* @__PURE__ */ new Map(); + l.forEach((I) => { + var M; + !(I.flags & 418) && !(I.flags & 512 && ((M = I.declarations) != null && M.length) && Ri(I.declarations, Ou)) && x.set(I.escapedName, I); + }), l = x; + } + let d; + if (ws(r, l, He, He, He), a.flags & 32) { + const x = S_(a), I = oi(x); + I.flags & 11272192 ? (l = Us(ds(l)), kPe(l, qa(I))) : I === Je && (d = Cg( + de, + Je, + /*isReadonly*/ + !1 + )); + } + const y = JG(l); + if (y ? f = zG(y, Ki(l.values())) : (d && (f = Pr(f, d)), a.flags & 384 && (ko(a).flags & 32 || at(r.properties, (x) => !!(en(x).flags & 296))) && (f = Pr(f, En))), ws(r, l, He, He, f || He), a.flags & 8208 && (r.callSignatures = B2(a)), a.flags & 32) { + const x = S_(a); + let I = a.members ? B2(a.members.get( + "__constructor" + /* Constructor */ + )) : He; + a.flags & 16 && (I = Nn( + I.slice(), + Li( + r.callSignatures, + (M) => Um(M.declaration) ? fh( + M.declaration, + M.typeParameters, + M.thisParameter, + M.parameters, + x, + /*resolvedTypePredicate*/ + void 0, + M.minArgumentCount, + M.flags & 167 + /* PropagatingFlags */ + ) : void 0 + ) + )), I.length || (I = HKe(x)), r.constructSignatures = I; + } + } + function tet(r, a, l) { + return Bi(r, B_([a.indexType, a.objectType], [gd(0), Eg([l])])); + } + function ret(r) { + const a = Hf(r.mappedType); + if (!(a.flags & 1048576 || a.flags & 2097152)) + return; + const l = a.flags & 1048576 ? a.origin : a; + if (!l || !(l.flags & 2097152)) + return; + const f = ra(l.types.filter((d) => d !== r.constraintType)); + return f !== Zt ? f : void 0; + } + function net(r) { + const a = ph(r.source, de), l = Tg(r.mappedType), f = !(l & 1), d = l & 4 ? 0 : 16777216, y = a ? [Cg(de, x$(a.type, r.mappedType, r.constraintType) || ye, f && a.isReadonly)] : He, x = Us(), I = ret(r); + for (const M of qa(r.source)) { + if (I) { + const Se = Vk( + M, + 8576 + /* StringOrNumberLiteralOrUnique */ + ); + if (!Ls(Se, I)) + continue; + } + const z = 8192 | (f && Xd(M) ? 8 : 0), Y = ca(4 | M.flags & d, M.escapedName, z); + if (Y.declarations = M.declarations, Y.links.nameType = Ci(M).nameType, Y.links.propertyType = en(M), r.constraintType.type.flags & 8388608 && r.constraintType.type.objectType.flags & 262144 && r.constraintType.type.indexType.flags & 262144) { + const Se = r.constraintType.type.objectType, pe = tet(r.mappedType, r.constraintType.type, Se); + Y.links.mappedType = pe, Y.links.constraintType = Bm(Se); + } else + Y.links.mappedType = r.mappedType, Y.links.constraintType = r.constraintType; + x.set(M.escapedName, Y); + } + ws(r, x, He, He, y); + } + function qL(r) { + if (r.flags & 4194304) { + const a = Uu(r.type); + return W1(a) ? N3e(a) : Bm(a); + } + if (r.flags & 16777216) { + if (r.root.isDistributive) { + const a = r.checkType, l = qL(a); + if (l !== a) + return _pe( + r, + AT(r.root.checkType, l, r.mapper), + /*forConstraint*/ + !1 + ); + } + return r; + } + if (r.flags & 1048576) + return Vo( + r, + qL, + /*noReductions*/ + !0 + ); + if (r.flags & 2097152) { + const a = r.types; + return a.length === 2 && a[0].flags & 76 && a[1] === Zi ? r : ra(Wc(r.types, qL)); + } + return r; + } + function gfe(r) { + return rc(r) & 4096; + } + function hfe(r, a, l, f) { + for (const d of qa(r)) + f(Vk(d, a)); + if (r.flags & 1) + f(de); + else + for (const d of du(r)) + (!l || d.keyType.flags & 134217732) && f(d.keyType); + } + function iet(r) { + const a = Us(); + let l; + ws(r, A, He, He, He); + const f = Ud(r), d = Hf(r), y = r.target || r, x = uy(y), I = I8(y) !== 2, M = s0(y), z = Uu(M2(r)), Y = Tg(r); + TE(r) ? hfe( + z, + 8576, + /*stringsOnly*/ + !1, + pe + ) : RT(qL(d), pe), ws(r, a, He, He, l || He); + function pe(dt) { + const ht = x ? Bi(x, z8(r.mapper, f, dt)) : dt; + RT(ht, (or) => Ze(dt, or)); + } + function Ze(dt, ht) { + if (ap(ht)) { + const or = op(ht), nr = a.get(or); + if (nr) + nr.links.nameType = Qn([nr.links.nameType, ht]), nr.links.keyType = Qn([nr.links.keyType, dt]); + else { + const Kr = ap(dt) ? Ys(z, op(dt)) : void 0, Vr = !!(Y & 4 || !(Y & 8) && Kr && Kr.flags & 16777216), cr = !!(Y & 1 || !(Y & 2) && Kr && Xd(Kr)), Yt = Z && !Vr && Kr && Kr.flags & 16777216, pn = Kr ? gfe(Kr) : 0, zn = ca(4 | (Vr ? 16777216 : 0), or, pn | 262144 | (cr ? 8 : 0) | (Yt ? 524288 : 0)); + zn.links.mappedType = r, zn.links.nameType = ht, zn.links.keyType = dt, Kr && (zn.links.syntheticOrigin = Kr, zn.declarations = I ? Kr.declarations : void 0), a.set(or, zn); + } + } else if (WG(ht) || ht.flags & 33) { + const or = ht.flags & 5 ? de : ht.flags & 40 ? st : ht, nr = Bi(M, z8(r.mapper, f, dt)), Kr = F8(z, ht), Vr = !!(Y & 1 || !(Y & 2) && Kr?.isReadonly), cr = Cg(or, nr, Vr); + l = LPe( + l, + cr, + /*union*/ + !0 + ); + } + } + } + function set(r) { + var a; + if (!r.links.type) { + const l = r.links.mappedType; + if (!hg( + r, + 0 + /* Type */ + )) + return l.containsError = !0, We; + const f = s0(l.target || l), d = z8(l.mapper, Ud(l), r.links.keyType), y = Bi(f, d); + let x = Z && r.flags & 16777216 && !hc( + y, + 49152 + /* Void */ + ) ? gy( + y, + /*isProperty*/ + !0 + ) : r.links.checkFlags & 524288 ? y$(y) : y; + yg() || (je(C, p.Type_of_property_0_circularly_references_itself_in_mapped_type_1, Ui(r), $r(l)), x = We), (a = r.links).type ?? (a.type = x); + } + return r.links.type; + } + function Ud(r) { + return r.typeParameter || (r.typeParameter = L2(dn(r.declaration.typeParameter))); + } + function Hf(r) { + return r.constraintType || (r.constraintType = s_(Ud(r)) || We); + } + function uy(r) { + return r.declaration.nameType ? r.nameType || (r.nameType = Bi(wi(r.declaration.nameType), r.mapper)) : void 0; + } + function s0(r) { + return r.templateType || (r.templateType = r.declaration.type ? Bi(rl( + wi(r.declaration.type), + /*isProperty*/ + !0, + !!(Tg(r) & 4) + ), r.mapper) : We); + } + function MPe(r) { + return hC(r.declaration.typeParameter); + } + function TE(r) { + const a = MPe(r); + return a.kind === 198 && a.operator === 143; + } + function M2(r) { + if (!r.modifiersType) + if (TE(r)) + r.modifiersType = Bi(wi(MPe(r).type), r.mapper); + else { + const a = epe(r.declaration), l = Hf(a), f = l && l.flags & 262144 ? s_(l) : l; + r.modifiersType = f && f.flags & 4194304 ? Bi(f.type, r.mapper) : ye; + } + return r.modifiersType; + } + function Tg(r) { + const a = r.declaration; + return (a.readonlyToken ? a.readonlyToken.kind === 41 ? 2 : 1 : 0) | (a.questionToken ? a.questionToken.kind === 41 ? 8 : 4 : 0); + } + function RPe(r) { + const a = Tg(r); + return a & 8 ? -1 : a & 4 ? 1 : 0; + } + function Jw(r) { + if (Cn(r) & 32) + return RPe(r) || Jw(M2(r)); + if (r.flags & 2097152) { + const a = Jw(r.types[0]); + return Ri(r.types, (l, f) => f === 0 || Jw(l) === a) ? a : 0; + } + return 0; + } + function aet(r) { + return !!(Cn(r) & 32 && Tg(r) & 4); + } + function T_(r) { + if (Cn(r) & 32) { + const a = Hf(r); + if (NT(a)) + return !0; + const l = uy(r); + if (l && NT(Bi(l, V2(Ud(r), a)))) + return !0; + } + return !1; + } + function I8(r) { + const a = uy(r); + return a ? Ls(a, Ud(r)) ? 1 : 2 : 0; + } + function Vd(r) { + return r.members || (r.flags & 524288 ? r.objectFlags & 4 ? UKe(r) : r.objectFlags & 3 ? WKe(r) : r.objectFlags & 1024 ? net(r) : r.objectFlags & 16 ? eet(r) : r.objectFlags & 32 ? iet(r) : E.fail("Unhandled object type " + E.formatObjectFlags(r.objectFlags)) : r.flags & 1048576 ? YKe(r) : r.flags & 2097152 ? KKe(r) : E.fail("Unhandled type " + E.formatTypeFlags(r.flags))), r; + } + function _y(r) { + return r.flags & 524288 ? Vd(r).properties : He; + } + function R2(r, a) { + if (r.flags & 524288) { + const f = Vd(r).members.get(a); + if (f && lh(f)) + return f; + } + } + function HL(r) { + if (!r.resolvedProperties) { + const a = Us(); + for (const l of r.types) { + for (const f of qa(l)) + if (!a.has(f.escapedName)) { + const d = $L( + r, + f.escapedName, + /*skipObjectFunctionPropertyAugment*/ + !!(r.flags & 2097152) + ); + d && a.set(f.escapedName, d); + } + if (r.flags & 1048576 && du(l).length === 0) + break; + } + r.resolvedProperties = zi(a); + } + return r.resolvedProperties; + } + function qa(r) { + return r = zw(r), r.flags & 3145728 ? HL(r) : _y(r); + } + function oet(r, a) { + r = zw(r), r.flags & 3670016 && Vd(r).members.forEach((l, f) => { + Qi(l, f) && a(l, f); + }); + } + function cet(r, a) { + return a.properties.some((f) => { + const d = f.name && (wd(f.name) ? x_(iN(f.name)) : o0(f.name)), y = d && ap(d) ? op(d) : void 0, x = y === void 0 ? void 0 : Pc(r, y); + return !!x && G8(x) && !Ls(nC(f), x); + }); + } + function uet(r) { + const a = Qn(r); + if (!(a.flags & 1048576)) + return Eme(a); + const l = Us(); + for (const f of r) + for (const { escapedName: d } of Eme(f)) + if (!l.has(d)) { + const y = VPe(a, d); + y && l.set(d, y); + } + return Ki(l.values()); + } + function kT(r) { + return r.flags & 262144 ? s_(r) : r.flags & 8388608 ? fet(r) : r.flags & 16777216 ? JPe(r) : iu(r); + } + function s_(r) { + return GL(r) ? Vw(r) : void 0; + } + function _et(r, a) { + const l = W8(r); + return !!l && CT(l, a); + } + function CT(r, a = 0) { + var l; + return a < 5 && !!(r && (r.flags & 262144 && at((l = r.symbol) == null ? void 0 : l.declarations, (f) => $n( + f, + 4096 + /* Const */ + )) || r.flags & 3145728 && at(r.types, (f) => CT(f, a)) || r.flags & 8388608 && CT(r.objectType, a + 1) || r.flags & 16777216 && CT(JPe(r), a + 1) || r.flags & 33554432 && CT(r.baseType, a) || Cn(r) & 32 && _et(r, a) || W1(r) && ec(z2(r), (f, d) => !!(r.target.elementFlags[d] & 8) && CT(f, a)) >= 0)); + } + function fet(r) { + return GL(r) ? pet(r) : void 0; + } + function yfe(r) { + const a = c0( + r, + /*writing*/ + !1 + ); + return a !== r ? a : kT(r); + } + function pet(r) { + if (Tfe(r)) + return YG(r.objectType, r.indexType); + const a = yfe(r.indexType); + if (a && a !== r.indexType) { + const f = j1(r.objectType, a, r.accessFlags); + if (f) + return f; + } + const l = yfe(r.objectType); + if (l && l !== r.objectType) + return j1(l, r.indexType, r.accessFlags); + } + function vfe(r) { + if (!r.resolvedDefaultConstraint) { + const a = trt(r), l = J1(r); + r.resolvedDefaultConstraint = Ua(a) ? l : Ua(l) ? a : Qn([a, l]); + } + return r.resolvedDefaultConstraint; + } + function jPe(r) { + if (r.resolvedConstraintOfDistributive !== void 0) + return r.resolvedConstraintOfDistributive || void 0; + if (r.root.isDistributive && r.restrictiveInstantiation !== r) { + const a = c0( + r.checkType, + /*writing*/ + !1 + ), l = a === r.checkType ? kT(a) : a; + if (l && l !== r.checkType) { + const f = _pe( + r, + AT(r.root.checkType, l, r.mapper), + /*forConstraint*/ + !0 + ); + if (!(f.flags & 131072)) + return r.resolvedConstraintOfDistributive = f, f; + } + } + r.resolvedConstraintOfDistributive = !1; + } + function BPe(r) { + return jPe(r) || vfe(r); + } + function JPe(r) { + return GL(r) ? BPe(r) : void 0; + } + function det(r, a) { + let l, f = !1; + for (const d of r) + if (d.flags & 465829888) { + let y = kT(d); + for (; y && y.flags & 21233664; ) + y = kT(y); + y && (l = Pr(l, y), a && (l = Pr(l, d))); + } else (d.flags & 469892092 || Dg(d)) && (f = !0); + if (l && (a || f)) { + if (f) + for (const d of r) + (d.flags & 469892092 || Dg(d)) && (l = Pr(l, d)); + return _M( + ra( + l, + 2 + /* NoConstraintReduction */ + ), + /*writing*/ + !1 + ); + } + } + function iu(r) { + if (r.flags & 464781312 || W1(r)) { + const a = bfe(r); + return a !== Qa && a !== Mc ? a : void 0; + } + return r.flags & 4194304 ? Ot : void 0; + } + function xg(r) { + return iu(r) || r; + } + function GL(r) { + return bfe(r) !== Mc; + } + function bfe(r) { + if (r.resolvedBaseConstraint) + return r.resolvedBaseConstraint; + const a = []; + return r.resolvedBaseConstraint = l(r); + function l(y) { + if (!y.immediateBaseConstraint) { + if (!hg( + y, + 4 + /* ImmediateBaseConstraint */ + )) + return Mc; + let x; + const I = f$(y); + if ((a.length < 10 || a.length < 50 && !as(a, I)) && (a.push(I), x = d(c0( + y, + /*writing*/ + !1 + )), a.pop()), !yg()) { + if (y.flags & 262144) { + const M = UG(y); + if (M) { + const z = je(M, p.Type_parameter_0_has_a_circular_constraint, $r(y)); + C && !Lb(M, C) && !Lb(C, M) && Bs(z, tn(C, p.Circularity_originates_in_type_at_this_location)); + } + } + x = Mc; + } + y.immediateBaseConstraint ?? (y.immediateBaseConstraint = x || Qa); + } + return y.immediateBaseConstraint; + } + function f(y) { + const x = l(y); + return x !== Qa && x !== Mc ? x : void 0; + } + function d(y) { + if (y.flags & 262144) { + const x = Vw(y); + return y.isThisType || !x ? x : f(x); + } + if (y.flags & 3145728) { + const x = y.types, I = []; + let M = !1; + for (const z of x) { + const Y = f(z); + Y ? (Y !== z && (M = !0), I.push(Y)) : M = !0; + } + return M ? y.flags & 1048576 && I.length === x.length ? Qn(I) : y.flags & 2097152 && I.length ? ra(I) : void 0 : y; + } + if (y.flags & 4194304) + return Ot; + if (y.flags & 134217728) { + const x = y.types, I = Li(x, f); + return I.length === x.length ? DT(y.texts, I) : de; + } + if (y.flags & 268435456) { + const x = f(y.type); + return x && x !== y.type ? qk(y.symbol, x) : de; + } + if (y.flags & 8388608) { + if (Tfe(y)) + return f(YG(y.objectType, y.indexType)); + const x = f(y.objectType), I = f(y.indexType), M = x && I && j1(x, I, y.accessFlags); + return M && f(M); + } + if (y.flags & 16777216) { + const x = BPe(y); + return x && f(x); + } + if (y.flags & 33554432) + return f(Lfe(y)); + if (W1(y)) { + const x = gr(z2(y), (I, M) => { + const z = I.flags & 262144 && y.target.elementFlags[M] & 8 && f(I) || I; + return z !== I && J_(z, (Y) => ob(Y) && !W1(Y)) ? z : I; + }); + return Eg(x, y.target.elementFlags, y.target.readonly, y.target.labeledElementDeclarations); + } + return y; + } + } + function met(r, a) { + if (r === a) + return r.resolvedApparentType || (r.resolvedApparentType = of( + r, + a, + /*needApparentType*/ + !0 + )); + const l = `I${jl(r)},${jl(a)}`; + return Bd(l) ?? K0(l, of( + r, + a, + /*needApparentType*/ + !0 + )); + } + function Sfe(r) { + if (r.default) + r.default === Ol && (r.default = Mc); + else if (r.target) { + const a = Sfe(r.target); + r.default = a ? Bi(a, r.mapper) : Qa; + } else { + r.default = Ol; + const a = r.symbol && lr(r.symbol.declarations, (f) => Ao(f) && f.default), l = a ? wi(a) : Qa; + r.default === Ol && (r.default = l); + } + return r.default; + } + function j2(r) { + const a = Sfe(r); + return a !== Qa && a !== Mc ? a : void 0; + } + function get(r) { + return Sfe(r) !== Mc; + } + function zPe(r) { + return !!(r.symbol && lr(r.symbol.declarations, (a) => Ao(a) && a.default)); + } + function WPe(r) { + return r.resolvedApparentType || (r.resolvedApparentType = het(r)); + } + function het(r) { + const a = r.target ?? r, l = W8(a); + if (l && !a.declaration.nameType) { + const f = M2(r), d = T_(f) ? WPe(f) : iu(f); + if (d && J_(d, (y) => ob(y) || UPe(y))) + return Bi(a, AT(l, d, r.mapper)); + } + return r; + } + function UPe(r) { + return !!(r.flags & 2097152) && Ri(r.types, ob); + } + function Tfe(r) { + let a; + return !!(r.flags & 8388608 && Cn(a = r.objectType) & 32 && !T_(a) && NT(r.indexType) && !(Tg(a) & 8) && !a.declaration.nameType); + } + function Uu(r) { + const a = r.flags & 465829888 ? iu(r) || ye : r, l = Cn(a); + return l & 32 ? WPe(a) : l & 4 && a !== r ? of(a, r) : a.flags & 2097152 ? met(a, r) : a.flags & 402653316 ? Sa : a.flags & 296 ? to : a.flags & 2112 ? stt() : a.flags & 528 ? Do : a.flags & 12288 ? v3e() : a.flags & 67108864 ? hs : a.flags & 4194304 ? Ot : a.flags & 2 && !Z ? hs : a; + } + function zw(r) { + return md(Uu(md(r))); + } + function VPe(r, a, l) { + var f, d, y; + let x, I, M; + const z = r.flags & 1048576; + let Y, Se = 4, pe = z ? 0 : 8, Ze = !1; + for (const zn of r.types) { + const ci = Uu(zn); + if (!(H(ci) || ci.flags & 131072)) { + const vn = Ys(ci, a, l), Ts = vn ? sp(vn) : 0; + if (vn) { + if (vn.flags & 106500 && (Y ?? (Y = z ? 0 : 16777216), z ? Y |= vn.flags & 16777216 : Y &= vn.flags), !x) + x = vn; + else if (vn !== x) + if ((BE(vn) || vn) === (BE(x) || x) && Tpe( + x, + vn, + (No, ns) => No === ns ? -1 : 0 + /* False */ + ) === -1) + Ze = !!x.parent && !!Ir(zd(x.parent)); + else { + I || (I = /* @__PURE__ */ new Map(), I.set(Zs(x), x)); + const No = Zs(vn); + I.has(No) || I.set(No, vn); + } + z && Xd(vn) ? pe |= 8 : !z && !Xd(vn) && (pe &= -9), pe |= (Ts & 6 ? 0 : 256) | (Ts & 4 ? 512 : 0) | (Ts & 2 ? 1024 : 0) | (Ts & 256 ? 2048 : 0), yde(vn) || (Se = 2); + } else if (z) { + const bs = !P8(a) && Wk(ci, a); + bs ? (pe |= 32 | (bs.isReadonly ? 8 : 0), M = Pr(M, ga(ci) ? m$(ci) || ft : bs.type)) : hy(ci) && !(Cn(ci) & 2097152) ? (pe |= 32, M = Pr(M, ft)) : pe |= 16; + } + } + } + if (!x || z && (I || pe & 48) && pe & 1536 && !(I && yet(I.values()))) + return; + if (!I && !(pe & 16) && !M) + if (Ze) { + const zn = (f = jn(x, Rg)) == null ? void 0 : f.links, ci = FT(x, zn?.type); + return ci.parent = (y = (d = x.valueDeclaration) == null ? void 0 : d.symbol) == null ? void 0 : y.parent, ci.links.containingType = r, ci.links.mapper = zn?.mapper, ci.links.writeType = ly(x), ci; + } else + return x; + const dt = I ? Ki(I.values()) : [x]; + let ht, or, nr; + const Kr = []; + let Vr, cr, Yt = !1; + for (const zn of dt) { + cr ? zn.valueDeclaration && zn.valueDeclaration !== cr && (Yt = !0) : cr = zn.valueDeclaration, ht = Nn(ht, zn.declarations); + const ci = en(zn); + or || (or = ci, nr = Ci(zn).nameType); + const vn = ly(zn); + (Vr || vn !== ci) && (Vr = Pr(Vr || Kr.slice(), vn)), ci !== or && (pe |= 64), (G8(ci) || wT(ci)) && (pe |= 128), ci.flags & 131072 && ci !== Wo && (pe |= 131072), Kr.push(ci); + } + Nn(Kr, M); + const pn = ca(4 | (Y ?? 0), a, Se | pe); + return pn.links.containingType = r, !Yt && cr && (pn.valueDeclaration = cr, cr.symbol.parent && (pn.parent = cr.symbol.parent)), pn.declarations = ht, pn.links.nameType = nr, Kr.length > 2 ? (pn.links.checkFlags |= 65536, pn.links.deferralParent = r, pn.links.deferralConstituents = Kr, pn.links.deferralWriteConstituents = Vr) : (pn.links.type = z ? Qn(Kr) : ra(Kr), Vr && (pn.links.writeType = z ? Qn(Vr) : ra(Vr))), pn; + } + function qPe(r, a, l) { + var f, d, y; + let x = l ? (f = r.propertyCacheWithoutObjectFunctionPropertyAugment) == null ? void 0 : f.get(a) : (d = r.propertyCache) == null ? void 0 : d.get(a); + return x || (x = VPe(r, a, l), x && ((l ? r.propertyCacheWithoutObjectFunctionPropertyAugment || (r.propertyCacheWithoutObjectFunctionPropertyAugment = Us()) : r.propertyCache || (r.propertyCache = Us())).set(a, x), l && !(rc(x) & 48) && !((y = r.propertyCache) != null && y.get(a)) && (r.propertyCache || (r.propertyCache = Us())).set(a, x))), x; + } + function yet(r) { + let a; + for (const l of r) { + if (!l.declarations) + return; + if (!a) { + a = new Set(l.declarations); + continue; + } + if (a.forEach((f) => { + as(l.declarations, f) || a.delete(f); + }), a.size === 0) + return; + } + return a; + } + function $L(r, a, l) { + const f = qPe(r, a, l); + return f && !(rc(f) & 16) ? f : void 0; + } + function md(r) { + return r.flags & 1048576 && r.objectFlags & 16777216 ? r.resolvedReducedType || (r.resolvedReducedType = vet(r)) : r.flags & 2097152 ? (r.objectFlags & 16777216 || (r.objectFlags |= 16777216 | (at(HL(r), bet) ? 33554432 : 0)), r.objectFlags & 33554432 ? Zt : r) : r; + } + function vet(r) { + const a = Wc(r.types, md); + if (a === r.types) + return r; + const l = Qn(a); + return l.flags & 1048576 && (l.resolvedReducedType = l), l; + } + function bet(r) { + return HPe(r) || GPe(r); + } + function HPe(r) { + return !(r.flags & 16777216) && (rc(r) & 131264) === 192 && !!(en(r).flags & 131072); + } + function GPe(r) { + return !r.valueDeclaration && !!(rc(r) & 1024); + } + function xfe(r) { + return !!(r.flags & 1048576 && r.objectFlags & 16777216 && at(r.types, xfe) || r.flags & 2097152 && Tet(r)); + } + function Tet(r) { + const a = r.uniqueLiteralFilledInstantiation || (r.uniqueLiteralFilledInstantiation = Bi(r, sc)); + return md(a) !== a; + } + function kfe(r, a) { + if (a.flags & 2097152 && Cn(a) & 33554432) { + const l = Pn(HL(a), HPe); + if (l) + return fs(r, p.The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents, $r( + a, + /*enclosingDeclaration*/ + void 0, + 536870912 + /* NoTypeReduction */ + ), Ui(l)); + const f = Pn(HL(a), GPe); + if (f) + return fs(r, p.The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some, $r( + a, + /*enclosingDeclaration*/ + void 0, + 536870912 + /* NoTypeReduction */ + ), Ui(f)); + } + return r; + } + function Ys(r, a, l, f) { + var d, y; + if (r = zw(r), r.flags & 524288) { + const x = Vd(r), I = x.members.get(a); + if (I && !f && ((d = r.symbol) == null ? void 0 : d.flags) & 512 && ((y = Ci(r.symbol).typeOnlyExportStarMap) != null && y.has(a))) + return; + if (I && lh(I, f)) + return I; + if (l) return; + const M = x === qt ? Rl : x.callSignatures.length ? Fe : x.constructSignatures.length ? Ft : void 0; + if (M) { + const z = R2(M, a); + if (z) + return z; + } + return R2(Ml, a); + } + if (r.flags & 2097152) { + const x = $L( + r, + a, + /*skipObjectFunctionPropertyAugment*/ + !0 + ); + return x || (l ? void 0 : $L(r, a, l)); + } + if (r.flags & 1048576) + return $L(r, a, l); + } + function XL(r, a) { + if (r.flags & 3670016) { + const l = Vd(r); + return a === 0 ? l.callSignatures : l.constructSignatures; + } + return He; + } + function Ps(r, a) { + const l = XL(zw(r), a); + if (a === 0 && !Ir(l) && r.flags & 1048576) { + if (r.arrayFallbackSignatures) + return r.arrayFallbackSignatures; + let f; + if (J_(r, (d) => { + var y; + return !!((y = d.symbol) != null && y.parent) && xet(d.symbol.parent) && (f ? f === d.symbol.escapedName : (f = d.symbol.escapedName, !0)); + })) { + const d = Vo(r, (x) => dy(($Pe(x.symbol.parent) ? Ti : Br).typeParameters[0], x.mapper)), y = mu(d, kp(r, (x) => $Pe(x.symbol.parent))); + return r.arrayFallbackSignatures = Ps(Pc(y, f), a); + } + r.arrayFallbackSignatures = l; + } + return l; + } + function xet(r) { + return !r || !Br.symbol || !Ti.symbol ? !1 : !!pd(r, Br.symbol) || !!pd(r, Ti.symbol); + } + function $Pe(r) { + return !r || !Ti.symbol ? !1 : !!pd(r, Ti.symbol); + } + function Ww(r, a) { + return Pn(r, (l) => l.keyType === a); + } + function Cfe(r, a) { + let l, f, d; + for (const y of r) + y.keyType === de ? l = y : zk(a, y.keyType) && (f ? (d || (d = [f])).push(y) : f = y); + return d ? Cg(ye, ra(gr(d, (y) => y.type)), qu( + d, + (y, x) => y && x.isReadonly, + /*initial*/ + !0 + )) : f || (l && zk(a, de) ? l : void 0); + } + function zk(r, a) { + return Ls(r, a) || a === de && Ls(r, st) || a === st && (r === Ms || !!(r.flags & 128) && Xg(r.value)); + } + function Efe(r) { + return r.flags & 3670016 ? Vd(r).indexInfos : He; + } + function du(r) { + return Efe(zw(r)); + } + function ph(r, a) { + return Ww(du(r), a); + } + function nb(r, a) { + var l; + return (l = ph(r, a)) == null ? void 0 : l.type; + } + function Dfe(r, a) { + return du(r).filter((l) => zk(a, l.keyType)); + } + function F8(r, a) { + return Cfe(du(r), a); + } + function Wk(r, a) { + return F8(r, P8(a) ? Mt : x_(Pi(a))); + } + function XPe(r) { + var a; + let l; + for (const f of My(r)) + l = Sh(l, L2(f.symbol)); + return l?.length ? l : Tc(r) ? (a = Uw(r)) == null ? void 0 : a.typeParameters : void 0; + } + function wfe(r) { + const a = []; + return r.forEach((l, f) => { + Yn(f) || a.push(l); + }), a; + } + function QPe(r, a) { + if (vl(r)) + return; + const l = fu( + Oe, + '"' + r + '"', + 512 + /* ValueModule */ + ); + return l && a ? Oa(l) : l; + } + function MG(r) { + return mx(r) || nN(r) || Ii(r) && X5(r); + } + function O8(r) { + if (MG(r)) + return !0; + if (!Ii(r)) + return !1; + if (r.initializer) { + const l = Gf(r.parent), f = r.parent.parameters.indexOf(r); + return E.assert(f >= 0), f >= $d( + l, + 3 + /* VoidIsNonOptional */ + ); + } + const a = Ab(r.parent); + return a ? !r.type && !r.dotDotDotToken && r.parent.parameters.indexOf(r) >= Y$(a).length : !1; + } + function ket(r) { + return ss(r) && !cm(r) && r.questionToken; + } + function L8(r, a, l, f) { + return { kind: r, parameterName: a, parameterIndex: l, type: f }; + } + function kg(r) { + let a = 0; + if (r) + for (let l = 0; l < r.length; l++) + zPe(r[l]) || (a = l + 1); + return a; + } + function fy(r, a, l, f) { + const d = Ir(a); + if (!d) + return []; + const y = Ir(r); + if (f || y >= l && y <= d) { + const x = r ? r.slice() : []; + for (let M = y; M < d; M++) + x[M] = We; + const I = zpe(f); + for (let M = y; M < d; M++) { + let z = j2(a[M]); + f && z && (gh(z, ye) || gh(z, hs)) && (z = Je), x[M] = z ? Bi(z, B_(a, x)) : I; + } + return x.length = a.length, x; + } + return r && r.slice(); + } + function Gf(r) { + const a = yn(r); + if (!a.resolvedSignature) { + const l = []; + let f = 0, d = 0, y, x = an(r) ? n7(r) : void 0, I = !1; + const M = Ab(r), z = gx(r); + !M && an(r) && SS(r) && !$Y(r) && !Ly(r) && (f |= 32); + for (let dt = z ? 1 : 0; dt < r.parameters.length; dt++) { + const ht = r.parameters[dt]; + if (an(ht) && cz(ht)) { + x = ht; + continue; + } + let or = ht.symbol; + const nr = Af(ht) ? ht.typeExpression && ht.typeExpression.type : ht.type; + or && or.flags & 4 && !Ds(ht.name) && (or = Dt( + ht, + or.escapedName, + 111551, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + )), dt === 0 && or.escapedName === "this" ? (I = !0, y = ht.symbol) : l.push(or), nr && nr.kind === 201 && (f |= 2), MG(ht) || Ii(ht) && ht.initializer || Zm(ht) || M && l.length > M.arguments.length && !nr || (d = l.length); + } + if ((r.kind === 177 || r.kind === 178) && SE(r) && (!I || !y)) { + const dt = r.kind === 177 ? 178 : 177, ht = Lo(dn(r), dt); + ht && (y = afe(ht)); + } + x && x.typeExpression && (y = FT(ca( + 1, + "this" + /* This */ + ), wi(x.typeExpression))); + const Se = B0(r) ? iv(r) : r, pe = Se && Go(Se) ? S_(Oa(Se.parent.symbol)) : void 0, Ze = pe ? pe.localTypeParameters : XPe(r); + (zj(r) || an(r) && Cet(r, l)) && (f |= 1), (ZC(r) && $n( + r, + 64 + /* Abstract */ + ) || Go(r) && $n( + r.parent, + 64 + /* Abstract */ + )) && (f |= 4), a.resolvedSignature = fh( + r, + Ze, + y, + l, + /*resolvedReturnType*/ + void 0, + /*resolvedTypePredicate*/ + void 0, + d, + f + ); + } + return a.resolvedSignature; + } + function Cet(r, a) { + if (B0(r) || !Pfe(r)) + return !1; + const l = Co(r.parameters), f = l ? gC(l) : Z1(r).filter(Af), d = Dc(f, (x) => x.typeExpression && SF(x.typeExpression.type) ? x.typeExpression.type : void 0), y = ca( + 3, + "args", + 32768 + /* RestParameter */ + ); + return d ? y.links.type = mu(wi(d.type)) : (y.links.checkFlags |= 65536, y.links.deferralParent = Zt, y.links.deferralConstituents = [Va], y.links.deferralWriteConstituents = [Va]), d && a.pop(), a.push(y), !0; + } + function Uw(r) { + if (!(an(r) && Ka(r))) return; + const a = Y1(r); + return a?.typeExpression && zT(wi(a.typeExpression)); + } + function Eet(r, a) { + const l = Uw(r); + if (!l) return; + const f = r.parameters.indexOf(a); + return a.dotDotDotToken ? UM(l, f) : Gd(l, f); + } + function Det(r) { + const a = Uw(r); + return a && Ba(a); + } + function Pfe(r) { + const a = yn(r); + return a.containsArgumentsReference === void 0 && (a.flags & 512 ? a.containsArgumentsReference = !0 : a.containsArgumentsReference = l(r.body)), a.containsArgumentsReference; + function l(f) { + if (!f) return !1; + switch (f.kind) { + case 80: + return f.escapedText === ne.escapedName && kI(f) === ne; + case 172: + case 174: + case 177: + case 178: + return f.name.kind === 167 && l(f.name); + case 211: + case 212: + return l(f.expression); + case 303: + return l(f.initializer); + default: + return !AB(f) && !im(f) && !!ms(f, l); + } + } + } + function B2(r) { + if (!r || !r.declarations) return He; + const a = []; + for (let l = 0; l < r.declarations.length; l++) { + const f = r.declarations[l]; + if (vs(f)) { + if (l > 0 && f.body) { + const d = r.declarations[l - 1]; + if (f.parent === d.parent && f.kind === d.kind && f.pos === d.end) + continue; + } + if (an(f) && f.jsDoc) { + const d = SB(f); + if (Ir(d)) { + for (const y of d) { + const x = y.typeExpression; + x.type === void 0 && !Go(f) && lb(x, Je), a.push(Gf(x)); + } + continue; + } + } + a.push( + !Ky(f) && !Ip(f) && Uw(f) || Gf(f) + ); + } + } + return a; + } + function YPe(r) { + const a = Pu(r, r); + if (a) { + const l = M_(a); + if (l) + return en(l); + } + return Je; + } + function ib(r) { + if (r.thisParameter) + return en(r.thisParameter); + } + function bp(r) { + if (!r.resolvedTypePredicate) { + if (r.target) { + const a = bp(r.target); + r.resolvedTypePredicate = a ? oNe(a, r.mapper) : wt; + } else if (r.compositeSignatures) + r.resolvedTypePredicate = Ntt(r.compositeSignatures, r.compositeKind) || wt; + else { + const a = r.declaration && pf(r.declaration); + let l; + if (!a) { + const f = Uw(r.declaration); + f && r !== f && (l = bp(f)); + } + if (a || l) + r.resolvedTypePredicate = a && zx(a) ? wet(a, r) : l || wt; + else if (r.declaration && Ka(r.declaration) && (!r.resolvedReturnType || r.resolvedReturnType.flags & 16) && z_(r) > 0) { + const { declaration: f } = r; + r.resolvedTypePredicate = wt, r.resolvedTypePredicate = fot(f) || wt; + } else + r.resolvedTypePredicate = wt; + } + E.assert(!!r.resolvedTypePredicate); + } + return r.resolvedTypePredicate === wt ? void 0 : r.resolvedTypePredicate; + } + function wet(r, a) { + const l = r.parameterName, f = r.type && wi(r.type); + return l.kind === 197 ? L8( + r.assertsModifier ? 2 : 0, + /*parameterName*/ + void 0, + /*parameterIndex*/ + void 0, + f + ) : L8(r.assertsModifier ? 3 : 1, l.escapedText, ec(a.parameters, (d) => d.escapedName === l.escapedText), f); + } + function ZPe(r, a, l) { + return a !== 2097152 ? Qn(r, l) : ra(r); + } + function Ba(r) { + if (!r.resolvedReturnType) { + if (!hg( + r, + 3 + /* ResolvedReturnType */ + )) + return We; + let a = r.target ? Bi(Ba(r.target), r.mapper) : r.compositeSignatures ? Bi(ZPe( + gr(r.compositeSignatures, Ba), + r.compositeKind, + 2 + /* Subtype */ + ), r.mapper) : xE(r.declaration) || (tc(r.declaration.body) ? Je : tX(r.declaration)); + if (r.flags & 8 ? a = RNe(a) : r.flags & 16 && (a = gy(a)), !yg()) { + if (r.declaration) { + const l = pf(r.declaration); + if (l) + je(l, p.Return_type_annotation_circularly_references_itself); + else if (le) { + const f = r.declaration, d = is(f); + d ? je(d, p._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, co(d)) : je(f, p.Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions); + } + } + a = Je; + } + r.resolvedReturnType ?? (r.resolvedReturnType = a); + } + return r.resolvedReturnType; + } + function xE(r) { + if (r.kind === 176) + return S_(Oa(r.parent.symbol)); + const a = pf(r); + if (B0(r)) { + const l = LC(r); + if (l && Go(l.parent) && !a) + return S_(Oa(l.parent.parent.symbol)); + } + if (gx(r)) + return wi(r.parameters[0].type); + if (a) + return wi(a); + if (r.kind === 177 && SE(r)) { + const l = an(r) && Za(r); + if (l) + return l; + const f = Lo( + dn(r), + 178 + /* SetAccessor */ + ), d = Rw(f); + if (d) + return d; + } + return Det(r); + } + function RG(r) { + return r.compositeSignatures && at(r.compositeSignatures, RG) || !r.resolvedReturnType && O1( + r, + 3 + /* ResolvedReturnType */ + ) >= 0; + } + function Pet(r) { + return KPe(r) || Je; + } + function KPe(r) { + if (ku(r)) { + const a = en(r.parameters[r.parameters.length - 1]), l = ga(a) ? m$(a) : a; + return l && nb(l, st); + } + } + function M8(r, a, l, f) { + const d = Nfe(r, fy(a, r.typeParameters, kg(r.typeParameters), l)); + if (f) { + const y = w8e(Ba(d)); + if (y) { + const x = A8(y); + x.typeParameters = f; + const I = A8(d); + return I.resolvedReturnType = ET(x), I; + } + } + return d; + } + function Nfe(r, a) { + const l = r.instantiations || (r.instantiations = /* @__PURE__ */ new Map()), f = Yp(a); + let d = l.get(f); + return d || l.set(f, d = jG(r, a)), d; + } + function jG(r, a) { + return $k( + r, + Net(r, a), + /*eraseTypeParameters*/ + !0 + ); + } + function e3e(r) { + return Wc(r.typeParameters, (a) => a.mapper ? Bi(a, a.mapper) : a); + } + function Net(r, a) { + return B_(e3e(r), a); + } + function R8(r) { + return r.typeParameters ? r.erasedSignatureCache || (r.erasedSignatureCache = Aet(r)) : r; + } + function Aet(r) { + return $k( + r, + aNe(r.typeParameters), + /*eraseTypeParameters*/ + !0 + ); + } + function Iet(r) { + return r.typeParameters ? r.canonicalSignatureCache || (r.canonicalSignatureCache = Fet(r)) : r; + } + function Fet(r) { + return M8( + r, + gr(r.typeParameters, (a) => a.target && !s_(a.target) ? a.target : a), + an(r.declaration) + ); + } + function Oet(r) { + return r.typeParameters ? r.implementationSignatureCache || (r.implementationSignatureCache = Let(r)) : r; + } + function Let(r) { + return r.typeParameters ? $k(r, B_([], [])) : r; + } + function Met(r) { + const a = r.typeParameters; + if (a) { + if (r.baseSignatureCache) + return r.baseSignatureCache; + const l = aNe(a), f = B_(a, gr(a, (y) => s_(y) || ye)); + let d = gr(a, (y) => Bi(y, f) || ye); + for (let y = 0; y < a.length - 1; y++) + d = mh(d, f); + return d = mh(d, l), r.baseSignatureCache = $k( + r, + B_(a, d), + /*eraseTypeParameters*/ + !0 + ); + } + return r; + } + function ET(r, a) { + var l; + if (!r.isolatedSignatureType) { + const f = (l = r.declaration) == null ? void 0 : l.kind, d = f === void 0 || f === 176 || f === 180 || f === 185, y = ce(134217744, ca( + 16, + "__function" + /* Function */ + )); + r.declaration && !no(r.declaration) && (y.symbol.declarations = [r.declaration], y.symbol.valueDeclaration = r.declaration), a || (a = r.declaration && vE( + r.declaration, + /*includeThisTypes*/ + !0 + )), y.outerTypeParameters = a, y.members = A, y.properties = He, y.callSignatures = d ? He : [r], y.constructSignatures = d ? [r] : He, y.indexInfos = He, r.isolatedSignatureType = y; + } + return r.isolatedSignatureType; + } + function BG(r) { + return r.members ? JG(Sg(r)) : void 0; + } + function JG(r) { + return r.get( + "__index" + /* Index */ + ); + } + function Cg(r, a, l, f) { + return { keyType: r, type: a, isReadonly: l, declaration: f }; + } + function t3e(r) { + const a = BG(r); + return a ? zG(a, Ki(Sg(r).values())) : He; + } + function zG(r, a = r.parent ? Ki(Sg(r.parent).values()) : void 0) { + if (r.declarations) { + const l = []; + let f = !1, d = !0, y = !1, x = !0, I = !1, M = !0; + const z = []; + for (const Se of r.declarations) + if (r1(Se)) { + if (Se.parameters.length === 1) { + const pe = Se.parameters[0]; + pe.type && RT(wi(pe.type), (Ze) => { + WG(Ze) && !Ww(l, Ze) && l.push(Cg(Ze, Se.type ? wi(Se.type) : Je, Q_( + Se, + 8 + /* Readonly */ + ), Se)); + }); + } + } else if (DPe(Se)) { + const pe = fn(Se) ? Se.left : Se.name, Ze = fo(pe) ? uc(pe.argumentExpression) : hd(pe); + if (Ww(l, Ze)) + continue; + Ls(Ze, Ot) && (Ls(Ze, st) ? (f = !0, kS(Se) || (d = !1)) : Ls(Ze, Mt) ? (y = !0, kS(Se) || (x = !1)) : (I = !0, kS(Se) || (M = !1)), z.push(Se.symbol)); + } + const Y = Wi(z, kn(a, (Se) => Se !== r)); + return I && !Ww(l, de) && l.push(sI(M, 0, Y, de)), f && !Ww(l, st) && l.push(sI(d, 0, Y, st)), y && !Ww(l, Mt) && l.push(sI(x, 0, Y, Mt)), l; + } + return He; + } + function WG(r) { + return !!(r.flags & 4108) || wT(r) || !!(r.flags & 2097152) && !sb(r) && at(r.types, WG); + } + function UG(r) { + return Li(kn(r.symbol && r.symbol.declarations, Ao), hC)[0]; + } + function r3e(r, a) { + var l; + let f; + if ((l = r.symbol) != null && l.declarations) { + for (const d of r.symbol.declarations) + if (d.parent.kind === 195) { + const [y = d.parent, x] = SK(d.parent.parent); + if (x.kind === 183 && !a) { + const I = x, M = sme(I); + if (M) { + const z = I.typeArguments.indexOf(y); + if (z < M.length) { + const Y = s_(M[z]); + if (Y) { + const Se = cpe( + M, + M.map((Ze, dt) => () => cct(I, M, dt)) + ), pe = Bi(Y, Se); + pe !== r && (f = Pr(f, pe)); + } + } + } + } else if (x.kind === 169 && x.dotDotDotToken || x.kind === 191 || x.kind === 202 && x.dotDotDotToken) + f = Pr(f, mu(ye)); + else if (x.kind === 204) + f = Pr(f, de); + else if (x.kind === 168 && x.parent.kind === 200) + f = Pr(f, Ot); + else if (x.kind === 200 && x.type && za(x.type) === d.parent && x.parent.kind === 194 && x.parent.extendsType === x && x.parent.checkType.kind === 200 && x.parent.checkType.type) { + const I = x.parent.checkType, M = wi(I.type); + f = Pr(f, Bi(M, V2(L2(dn(I.typeParameter)), I.typeParameter.constraint ? wi(I.typeParameter.constraint) : Ot))); + } + } + } + return f && ra(f); + } + function Vw(r) { + if (!r.constraint) + if (r.target) { + const a = s_(r.target); + r.constraint = a ? Bi(a, r.mapper) : Qa; + } else { + const a = UG(r); + if (!a) + r.constraint = r3e(r) || Qa; + else { + let l = wi(a); + l.flags & 1 && !H(l) && (l = a.parent.parent.kind === 200 ? Ot : ye), r.constraint = l; + } + } + return r.constraint === Qa ? void 0 : r.constraint; + } + function n3e(r) { + const a = Lo( + r.symbol, + 168 + /* TypeParameter */ + ), l = Bp(a.parent) ? K7(a.parent) : a.parent; + return l && R_(l); + } + function Yp(r) { + let a = ""; + if (r) { + const l = r.length; + let f = 0; + for (; f < l; ) { + const d = r[f].id; + let y = 1; + for (; f + y < l && r[f + y].id === d + y; ) + y++; + a.length && (a += ","), a += d, y > 1 && (a += ":" + y), f += y; + } + } + return a; + } + function Uk(r, a) { + return r ? `@${Zs(r)}` + (a ? `:${Yp(a)}` : "") : ""; + } + function QL(r, a) { + let l = 0; + for (const f of r) + (a === void 0 || !(f.flags & a)) && (l |= Cn(f)); + return l & 458752; + } + function kE(r, a) { + return at(a) && r === Oi ? ye : a0(r, a); + } + function a0(r, a) { + const l = Yp(a); + let f = r.instantiations.get(l); + return f || (f = ce(4, r.symbol), r.instantiations.set(l, f), f.objectFlags |= a ? QL(a) : 0, f.target = r, f.resolvedTypeArguments = a), f; + } + function i3e(r) { + const a = Xp(r.flags, r.symbol); + return a.objectFlags = r.objectFlags, a.target = r.target, a.resolvedTypeArguments = r.resolvedTypeArguments, a; + } + function Afe(r, a, l, f, d) { + if (!f) { + f = Hk(a); + const x = wE(f); + d = l ? mh(x, l) : x; + } + const y = ce(4, r.symbol); + return y.target = r, y.node = a, y.mapper = l, y.aliasSymbol = f, y.aliasTypeArguments = d, y; + } + function Po(r) { + var a, l; + if (!r.resolvedTypeArguments) { + if (!hg( + r, + 5 + /* ResolvedTypeArguments */ + )) + return Wi(r.target.outerTypeParameters, (a = r.target.localTypeParameters) == null ? void 0 : a.map(() => We)) || He; + const f = r.node, d = f ? f.kind === 183 ? Wi(r.target.outerTypeParameters, oX(f, r.target.localTypeParameters)) : f.kind === 188 ? [wi(f.elementType)] : gr(f.elements, wi) : He; + yg() ? r.resolvedTypeArguments ?? (r.resolvedTypeArguments = r.mapper ? mh(d, r.mapper) : d) : (r.resolvedTypeArguments ?? (r.resolvedTypeArguments = Wi(r.target.outerTypeParameters, ((l = r.target.localTypeParameters) == null ? void 0 : l.map(() => We)) || He)), je( + r.node || C, + r.target.symbol ? p.Type_arguments_for_0_circularly_reference_themselves : p.Tuple_type_arguments_circularly_reference_themselves, + r.target.symbol && Ui(r.target.symbol) + )); + } + return r.resolvedTypeArguments; + } + function py(r) { + return Ir(r.target.typeParameters); + } + function s3e(r, a) { + const l = ko(Oa(a)), f = l.localTypeParameters; + if (f) { + const d = Ir(r.typeArguments), y = kg(f), x = an(r); + if (!(!le && x) && (d < y || d > f.length)) { + const z = x && Lh(r) && !Xx(r.parent), Y = y === f.length ? z ? p.Expected_0_type_arguments_provide_these_with_an_extends_tag : p.Generic_type_0_requires_1_type_argument_s : z ? p.Expected_0_1_type_arguments_provide_these_with_an_extends_tag : p.Generic_type_0_requires_between_1_and_2_type_arguments, Se = $r( + l, + /*enclosingDeclaration*/ + void 0, + 2 + /* WriteArrayAsGenericType */ + ); + if (je(r, Y, Se, y, f.length), !x) + return We; + } + if (r.kind === 183 && w3e(r, Ir(r.typeArguments) !== f.length)) + return Afe( + l, + r, + /*mapper*/ + void 0 + ); + const M = Wi(l.outerTypeParameters, fy(YL(r), f, y, x)); + return a0(l, M); + } + return J2(r, a) ? l : We; + } + function CE(r, a, l, f) { + const d = ko(r); + if (d === rn) { + const z = pW.get(r.escapedName); + if (z !== void 0 && a && a.length === 1) + return z === 4 ? Ife(a[0]) : qk(r, a[0]); + } + const y = Ci(r), x = y.typeParameters, I = Yp(a) + Uk(l, f); + let M = y.instantiations.get(I); + return M || y.instantiations.set(I, M = uNe(d, B_(x, fy(a, x, kg(x), an(r.valueDeclaration))), l, f)), M; + } + function Ret(r, a) { + if (rc(a) & 1048576) { + const d = YL(r), y = Uk(a, d); + let x = $e.get(y); + return x || (x = Bc( + 1, + "error", + /*objectFlags*/ + void 0, + `alias ${y}` + ), x.aliasSymbol = a, x.aliasTypeArguments = d, $e.set(y, x)), x; + } + const l = ko(a), f = Ci(a).typeParameters; + if (f) { + const d = Ir(r.typeArguments), y = kg(f); + if (d < y || d > f.length) + return je( + r, + y === f.length ? p.Generic_type_0_requires_1_type_argument_s : p.Generic_type_0_requires_between_1_and_2_type_arguments, + Ui(a), + y, + f.length + ), We; + const x = Hk(r); + let I = x && (a3e(a) || !a3e(x)) ? x : void 0, M; + if (I) + M = wE(I); + else if (v7(r)) { + const z = qw( + r, + 2097152, + /*ignoreErrors*/ + !0 + ); + if (z && z !== Ve) { + const Y = Pl(z); + Y && Y.flags & 524288 && (I = Y, M = YL(r) || (f ? [] : void 0)); + } + } + return CE(a, YL(r), I, M); + } + return J2(r, a) ? l : We; + } + function a3e(r) { + var a; + const l = (a = r.declarations) == null ? void 0 : a.find(T3); + return !!(l && ff(l)); + } + function jet(r) { + switch (r.kind) { + case 183: + return r.typeName; + case 233: + const a = r.expression; + if (_o(a)) + return a; + } + } + function o3e(r) { + return r.parent ? `${o3e(r.parent)}.${r.escapedName}` : r.escapedName; + } + function VG(r) { + const l = (r.kind === 166 ? r.right : r.kind === 211 ? r.name : r).escapedText; + if (l) { + const f = r.kind === 166 ? VG(r.left) : r.kind === 211 ? VG(r.expression) : void 0, d = f ? `${o3e(f)}.${l}` : l; + let y = Ie.get(d); + return y || (Ie.set(d, y = ca( + 524288, + l, + 1048576 + /* Unresolved */ + )), y.parent = f, y.links.declaredType = Et), y; + } + return Ve; + } + function qw(r, a, l) { + const f = jet(r); + if (!f) + return Ve; + const d = oc(f, a, l); + return d && d !== Ve ? d : l ? Ve : VG(f); + } + function qG(r, a) { + if (a === Ve) + return We; + if (a = lE(a) || a, a.flags & 96) + return s3e(r, a); + if (a.flags & 524288) + return Ret(r, a); + const l = SPe(a); + if (l) + return J2(r, a) ? Vu(l) : We; + if (a.flags & 111551 && HG(r)) { + const f = Bet(r, a); + return f || (qw( + r, + 788968 + /* Type */ + ), en(a)); + } + return We; + } + function Bet(r, a) { + const l = yn(r); + if (!l.resolvedJSDocType) { + const f = en(a); + let d = f; + if (a.valueDeclaration) { + const y = r.kind === 205 && r.qualifier; + f.symbol && f.symbol !== a && y && (d = qG(r, f.symbol)); + } + l.resolvedJSDocType = d; + } + return l.resolvedJSDocType; + } + function Ife(r) { + return Ffe(r) ? c3e(r, ye) : r; + } + function Ffe(r) { + return !!(r.flags & 3145728 && at(r.types, Ffe) || r.flags & 33554432 && !EE(r) && Ffe(r.baseType) || r.flags & 524288 && !Dg(r) || r.flags & 432275456 && !wT(r)); + } + function EE(r) { + return !!(r.flags & 33554432 && r.constraint.flags & 2); + } + function Ofe(r, a) { + return a.flags & 3 || a === r || r.flags & 1 ? r : c3e(r, a); + } + function c3e(r, a) { + const l = `${jl(r)}>${jl(a)}`, f = Cs.get(l); + if (f) + return f; + const d = Om( + 33554432 + /* Substitution */ + ); + return d.baseType = r, d.constraint = a, Cs.set(l, d), d; + } + function Lfe(r) { + return EE(r) ? r.baseType : ra([r.constraint, r.baseType]); + } + function l3e(r) { + return r.kind === 189 && r.elements.length === 1; + } + function u3e(r, a, l) { + return l3e(a) && l3e(l) ? u3e(r, a.elements[0], l.elements[0]) : l0(wi(a)) === l0(r) ? wi(l) : void 0; + } + function Jet(r, a) { + let l, f = !0; + for (; a && !xi(a) && a.kind !== 320; ) { + const d = a.parent; + if (d.kind === 169 && (f = !f), (f || r.flags & 8650752) && d.kind === 194 && a === d.trueType) { + const y = u3e(r, d.checkType, d.extendsType); + y && (l = Pr(l, y)); + } else if (r.flags & 262144 && d.kind === 200 && !d.nameType && a === d.type) { + const y = wi(d); + if (Ud(y) === l0(r)) { + const x = W8(y); + if (x) { + const I = s_(x); + I && J_(I, ob) && (l = Pr(l, Qn([st, Ms]))); + } + } + } + a = d; + } + return l ? Ofe(r, ra(l)) : r; + } + function HG(r) { + return !!(r.flags & 16777216) && (r.kind === 183 || r.kind === 205); + } + function J2(r, a) { + return r.typeArguments ? (je(r, p.Type_0_is_not_generic, a ? Ui(a) : r.typeName ? co(r.typeName) : lW), !1) : !0; + } + function _3e(r) { + if (Me(r.typeName)) { + const a = r.typeArguments; + switch (r.typeName.escapedText) { + case "String": + return J2(r), de; + case "Number": + return J2(r), st; + case "Boolean": + return J2(r), ut; + case "Void": + return J2(r), Pt; + case "Undefined": + return J2(r), ft; + case "Null": + return J2(r), lt; + case "Function": + case "function": + return J2(r), Rl; + case "array": + return (!a || !a.length) && !le ? Va : void 0; + case "promise": + return (!a || !a.length) && !le ? qM(Je) : void 0; + case "Object": + if (a && a.length === 2) { + if (X7(r)) { + const l = wi(a[0]), f = wi(a[1]), d = l === de || l === st ? [Cg( + l, + f, + /*isReadonly*/ + !1 + )] : He; + return Ea( + /*symbol*/ + void 0, + A, + He, + He, + d + ); + } + return Je; + } + return J2(r), le ? void 0 : Je; + } + } + } + function zet(r) { + const a = wi(r.type); + return Z ? hM( + a, + 65536 + /* Null */ + ) : a; + } + function GG(r) { + const a = yn(r); + if (!a.resolvedType) { + if (Kp(r) && Eb(r.parent)) + return a.resolvedSymbol = Ve, a.resolvedType = uc(r.parent.expression); + let l, f; + const d = 788968; + HG(r) && (f = _3e(r), f || (l = qw( + r, + d, + /*ignoreErrors*/ + !0 + ), l === Ve ? l = qw( + r, + d | 111551 + /* Value */ + ) : qw(r, d), f = qG(r, l))), f || (l = qw(r, d), f = qG(r, l)), a.resolvedSymbol = l, a.resolvedType = f; + } + return a.resolvedType; + } + function YL(r) { + return gr(r.typeArguments, wi); + } + function f3e(r) { + const a = yn(r); + if (!a.resolvedType) { + const l = X8e(r); + a.resolvedType = Vu(cf(l)); + } + return a.resolvedType; + } + function p3e(r, a) { + function l(d) { + const y = d.declarations; + if (y) + for (const x of y) + switch (x.kind) { + case 263: + case 264: + case 266: + return x; + } + } + if (!r) + return a ? Oi : hs; + const f = ko(r); + return f.flags & 524288 ? Ir(f.typeParameters) !== a ? (je(l(r), p.Global_type_0_must_have_1_type_parameter_s, _c(r), a), a ? Oi : hs) : f : (je(l(r), p.Global_type_0_must_be_a_class_or_interface_type, _c(r)), a ? Oi : hs); + } + function Mfe(r, a) { + return DE(r, 111551, a ? p.Cannot_find_global_value_0 : void 0); + } + function Rfe(r, a) { + return DE(r, 788968, a ? p.Cannot_find_global_type_0 : void 0); + } + function $G(r, a, l) { + const f = DE(r, 788968, l ? p.Cannot_find_global_type_0 : void 0); + if (f && (ko(f), Ir(Ci(f).typeParameters) !== a)) { + const d = f.declarations && Pn(f.declarations, jp); + je(d, p.Global_type_0_must_have_1_type_parameter_s, _c(f), a); + return; + } + return f; + } + function DE(r, a, l) { + return Dt( + /*location*/ + void 0, + r, + a, + l, + /*isUse*/ + !1, + /*excludeGlobals*/ + !1 + ); + } + function lc(r, a, l) { + const f = Rfe(r, l); + return f || l ? p3e(f, a) : void 0; + } + function d3e(r, a) { + let l; + for (const f of r) + l = Pr(l, lc( + f, + a, + /*reportErrors*/ + !1 + )); + return l ?? He; + } + function Wet() { + return fp || (fp = lc( + "TypedPropertyDescriptor", + /*arity*/ + 1, + /*reportErrors*/ + !0 + ) || Oi); + } + function Uet() { + return Tt || (Tt = lc( + "TemplateStringsArray", + /*arity*/ + 0, + /*reportErrors*/ + !0 + ) || hs); + } + function m3e() { + return Ar || (Ar = lc( + "ImportMeta", + /*arity*/ + 0, + /*reportErrors*/ + !0 + ) || hs); + } + function g3e() { + if (!ei) { + const r = ca(0, "ImportMetaExpression"), a = m3e(), l = ca( + 4, + "meta", + 8 + /* Readonly */ + ); + l.parent = r, l.links.type = a; + const f = Us([l]); + r.members = f, ei = Ea(r, f, He, He, He); + } + return ei; + } + function h3e(r) { + return Ss || (Ss = lc( + "ImportCallOptions", + /*arity*/ + 0, + r + )) || hs; + } + function jfe(r) { + return _s || (_s = lc( + "ImportAttributes", + /*arity*/ + 0, + r + )) || hs; + } + function y3e(r) { + return F_ || (F_ = Mfe("Symbol", r)); + } + function Vet(r) { + return mf || (mf = Rfe("SymbolConstructor", r)); + } + function v3e() { + return jf || (jf = lc( + "Symbol", + /*arity*/ + 0, + /*reportErrors*/ + !1 + )) || hs; + } + function ZL(r) { + return th || (th = lc( + "Promise", + /*arity*/ + 1, + r + )) || Oi; + } + function b3e(r) { + return od || (od = lc( + "PromiseLike", + /*arity*/ + 1, + r + )) || Oi; + } + function Bfe(r) { + return t_ || (t_ = Mfe("Promise", r)); + } + function qet(r) { + return gf || (gf = lc( + "PromiseConstructorLike", + /*arity*/ + 0, + r + )) || hs; + } + function KL(r) { + return jt || (jt = lc( + "AsyncIterable", + /*arity*/ + 3, + r + )) || Oi; + } + function Het(r) { + return Er || (Er = lc( + "AsyncIterator", + /*arity*/ + 3, + r + )) || Oi; + } + function S3e(r) { + return Hr || (Hr = lc( + "AsyncIterableIterator", + /*arity*/ + 3, + r + )) || Oi; + } + function Get() { + return ii ?? (ii = d3e(["ReadableStreamAsyncIterator"], 1)); + } + function $et(r) { + return j || (j = lc( + "AsyncIteratorObject", + /*arity*/ + 3, + r + )) || Oi; + } + function Xet(r) { + return Ne || (Ne = lc( + "AsyncGenerator", + /*arity*/ + 3, + r + )) || Oi; + } + function XG(r) { + return y_ || (y_ = lc( + "Iterable", + /*arity*/ + 3, + r + )) || Oi; + } + function Qet(r) { + return cd || (cd = lc( + "Iterator", + /*arity*/ + 3, + r + )) || Oi; + } + function T3e(r) { + return hf || (hf = lc( + "IterableIterator", + /*arity*/ + 3, + r + )) || Oi; + } + function Jfe() { + return ie ? ft : Je; + } + function Yet() { + return xn ?? (xn = d3e(["ArrayIterator", "MapIterator", "SetIterator", "StringIterator"], 1)); + } + function Zet(r) { + return ug || (ug = lc( + "IteratorObject", + /*arity*/ + 3, + r + )) || Oi; + } + function Ket(r) { + return Q || (Q = lc( + "Generator", + /*arity*/ + 3, + r + )) || Oi; + } + function ett(r) { + return et || (et = lc( + "IteratorYieldResult", + /*arity*/ + 1, + r + )) || Oi; + } + function ttt(r) { + return Rt || (Rt = lc( + "IteratorReturnResult", + /*arity*/ + 1, + r + )) || Oi; + } + function x3e(r) { + return ps || (ps = lc( + "Disposable", + /*arity*/ + 0, + r + )) || hs; + } + function rtt(r) { + return ja || (ja = lc( + "AsyncDisposable", + /*arity*/ + 0, + r + )) || hs; + } + function k3e(r, a = 0) { + const l = DE( + r, + 788968, + /*diagnostic*/ + void 0 + ); + return l && p3e(l, a); + } + function ntt() { + return xa || (xa = $G( + "Extract", + /*arity*/ + 2, + /*reportErrors*/ + !0 + ) || Ve), xa === Ve ? void 0 : xa; + } + function itt() { + return Ro || (Ro = $G( + "Omit", + /*arity*/ + 2, + /*reportErrors*/ + !0 + ) || Ve), Ro === Ve ? void 0 : Ro; + } + function zfe(r) { + return O_ || (O_ = $G( + "Awaited", + /*arity*/ + 1, + r + ) || (r ? Ve : void 0)), O_ === Ve ? void 0 : O_; + } + function stt() { + return Ld || (Ld = lc( + "BigInt", + /*arity*/ + 0, + /*reportErrors*/ + !1 + )) || hs; + } + function att(r) { + return G0 ?? (G0 = lc( + "ClassDecoratorContext", + /*arity*/ + 1, + r + )) ?? Oi; + } + function ott(r) { + return rh ?? (rh = lc( + "ClassMethodDecoratorContext", + /*arity*/ + 2, + r + )) ?? Oi; + } + function ctt(r) { + return pp ?? (pp = lc( + "ClassGetterDecoratorContext", + /*arity*/ + 2, + r + )) ?? Oi; + } + function ltt(r) { + return ld ?? (ld = lc( + "ClassSetterDecoratorContext", + /*arity*/ + 2, + r + )) ?? Oi; + } + function utt(r) { + return xo ?? (xo = lc( + "ClassAccessorDecoratorContext", + /*arity*/ + 2, + r + )) ?? Oi; + } + function _tt(r) { + return yf ?? (yf = lc( + "ClassAccessorDecoratorTarget", + /*arity*/ + 2, + r + )) ?? Oi; + } + function ftt(r) { + return qh ?? (qh = lc( + "ClassAccessorDecoratorResult", + /*arity*/ + 2, + r + )) ?? Oi; + } + function ptt(r) { + return v_ ?? (v_ = lc( + "ClassFieldDecoratorContext", + /*arity*/ + 2, + r + )) ?? Oi; + } + function dtt() { + return km || (km = Mfe( + "NaN", + /*reportErrors*/ + !1 + )); + } + function mtt() { + return Cm || (Cm = $G( + "Record", + /*arity*/ + 2, + /*reportErrors*/ + !0 + ) || Ve), Cm === Ve ? void 0 : Cm; + } + function Hw(r, a) { + return r !== Oi ? a0(r, a) : hs; + } + function C3e(r) { + return Hw(Wet(), [r]); + } + function E3e(r) { + return Hw(XG( + /*reportErrors*/ + !0 + ), [r, Pt, ft]); + } + function mu(r, a) { + return Hw(a ? Ti : Br, [r]); + } + function Wfe(r) { + switch (r.kind) { + case 190: + return 2; + case 191: + return D3e(r); + case 202: + return r.questionToken ? 2 : r.dotDotDotToken ? D3e(r) : 1; + default: + return 1; + } + } + function D3e(r) { + return sM(r.type) ? 4 : 8; + } + function gtt(r) { + const a = vtt(r.parent); + if (sM(r)) + return a ? Ti : Br; + const f = gr(r.elements, Wfe); + return Ufe(f, a, gr(r.elements, htt)); + } + function htt(r) { + return KC(r) || Ii(r) ? r : void 0; + } + function w3e(r, a) { + return !!Hk(r) || P3e(r) && (r.kind === 188 ? R1(r.elementType) : r.kind === 189 ? at(r.elements, R1) : a || at(r.typeArguments, R1)); + } + function P3e(r) { + const a = r.parent; + switch (a.kind) { + case 196: + case 202: + case 183: + case 192: + case 193: + case 199: + case 194: + case 198: + case 188: + case 189: + return P3e(a); + case 265: + return !0; + } + return !1; + } + function R1(r) { + switch (r.kind) { + case 183: + return HG(r) || !!(qw( + r, + 788968 + /* Type */ + ).flags & 524288); + case 186: + return !0; + case 198: + return r.operator !== 158 && R1(r.type); + case 196: + case 190: + case 202: + case 316: + case 314: + case 315: + case 309: + return R1(r.type); + case 191: + return r.type.kind !== 188 || R1(r.type.elementType); + case 192: + case 193: + return at(r.types, R1); + case 199: + return R1(r.objectType) || R1(r.indexType); + case 194: + return R1(r.checkType) || R1(r.extendsType) || R1(r.trueType) || R1(r.falseType); + } + return !1; + } + function ytt(r) { + const a = yn(r); + if (!a.resolvedType) { + const l = gtt(r); + if (l === Oi) + a.resolvedType = hs; + else if (!(r.kind === 189 && at(r.elements, (f) => !!(Wfe(f) & 8))) && w3e(r)) + a.resolvedType = r.kind === 189 && r.elements.length === 0 ? l : Afe( + l, + r, + /*mapper*/ + void 0 + ); + else { + const f = r.kind === 188 ? [wi(r.elementType)] : gr(r.elements, wi); + a.resolvedType = Vfe(l, f); + } + } + return a.resolvedType; + } + function vtt(r) { + return _v(r) && r.operator === 148; + } + function Eg(r, a, l = !1, f = []) { + const d = Ufe(a || gr( + r, + (y) => 1 + /* Required */ + ), l, f); + return d === Oi ? hs : r.length ? Vfe(d, r) : d; + } + function Ufe(r, a, l) { + if (r.length === 1 && r[0] & 4) + return a ? Ti : Br; + const f = gr(r, (y) => y & 1 ? "#" : y & 2 ? "?" : y & 4 ? "." : "*").join() + (a ? "R" : "") + (at(l, (y) => !!y) ? "," + gr(l, (y) => y ? Aa(y) : "_").join(",") : ""); + let d = pi.get(f); + return d || pi.set(f, d = btt(r, a, l)), d; + } + function btt(r, a, l) { + const f = r.length, d = b0(r, (Se) => !!(Se & 9)); + let y; + const x = []; + let I = 0; + if (f) { + y = new Array(f); + for (let Se = 0; Se < f; Se++) { + const pe = y[Se] = sr(), Ze = r[Se]; + if (I |= Ze, !(I & 12)) { + const dt = ca(4 | (Ze & 2 ? 16777216 : 0), "" + Se, a ? 8 : 0); + dt.links.tupleLabelDeclaration = l?.[Se], dt.links.type = pe, x.push(dt); + } + } + } + const M = x.length, z = ca(4, "length", a ? 8 : 0); + if (I & 12) + z.links.type = st; + else { + const Se = []; + for (let pe = d; pe <= f; pe++) Se.push(gd(pe)); + z.links.type = Qn(Se); + } + x.push(z); + const Y = ce( + 12 + /* Reference */ + ); + return Y.typeParameters = y, Y.outerTypeParameters = void 0, Y.localTypeParameters = y, Y.instantiations = /* @__PURE__ */ new Map(), Y.instantiations.set(Yp(Y.typeParameters), Y), Y.target = Y, Y.resolvedTypeArguments = Y.typeParameters, Y.thisType = sr(), Y.thisType.isThisType = !0, Y.thisType.constraint = Y, Y.declaredProperties = x, Y.declaredCallSignatures = He, Y.declaredConstructSignatures = He, Y.declaredIndexInfos = He, Y.elementFlags = r, Y.minLength = d, Y.fixedLength = M, Y.hasRestElement = !!(I & 12), Y.combinedFlags = I, Y.readonly = a, Y.labeledElementDeclarations = l, Y; + } + function Vfe(r, a) { + return r.objectFlags & 8 ? qfe(r, a) : a0(r, a); + } + function qfe(r, a) { + var l, f, d, y; + if (!(r.combinedFlags & 14)) + return a0(r, a); + if (r.combinedFlags & 8) { + const dt = ec(a, (ht, or) => !!(r.elementFlags[or] & 8 && ht.flags & 1179648)); + if (dt >= 0) + return tM(gr(a, (ht, or) => r.elementFlags[or] & 8 ? ht : ye)) ? Vo(a[dt], (ht) => qfe(r, kR(a, dt, ht))) : We; + } + const x = [], I = [], M = []; + let z = -1, Y = -1, Se = -1; + for (let dt = 0; dt < a.length; dt++) { + const ht = a[dt], or = r.elementFlags[dt]; + if (or & 8) + if (ht.flags & 1) + Ze(ht, 4, (l = r.labeledElementDeclarations) == null ? void 0 : l[dt]); + else if (ht.flags & 58982400 || T_(ht)) + Ze(ht, 8, (f = r.labeledElementDeclarations) == null ? void 0 : f[dt]); + else if (ga(ht)) { + const nr = z2(ht); + if (nr.length + x.length >= 1e4) + return je( + C, + im(C) ? p.Type_produces_a_tuple_type_that_is_too_large_to_represent : p.Expression_produces_a_tuple_type_that_is_too_large_to_represent + ), We; + lr(nr, (Kr, Vr) => { + var cr; + return Ze(Kr, ht.target.elementFlags[Vr], (cr = ht.target.labeledElementDeclarations) == null ? void 0 : cr[Vr]); + }); + } else + Ze(my(ht) && nb(ht, st) || We, 4, (d = r.labeledElementDeclarations) == null ? void 0 : d[dt]); + else + Ze(ht, or, (y = r.labeledElementDeclarations) == null ? void 0 : y[dt]); + } + for (let dt = 0; dt < z; dt++) + I[dt] & 2 && (I[dt] = 1); + Y >= 0 && Y < Se && (x[Y] = Qn(Wc(x.slice(Y, Se + 1), (dt, ht) => I[Y + ht] & 8 ? j_(dt, st) : dt)), x.splice(Y + 1, Se - Y), I.splice(Y + 1, Se - Y), M.splice(Y + 1, Se - Y)); + const pe = Ufe(I, r.readonly, M); + return pe === Oi ? hs : I.length ? a0(pe, x) : pe; + function Ze(dt, ht, or) { + ht & 1 && (z = I.length), ht & 4 && Y < 0 && (Y = I.length), ht & 6 && (Se = I.length), x.push(ht & 2 ? rl( + dt, + /*isProperty*/ + !0 + ) : dt), I.push(ht), M.push(or); + } + } + function Gw(r, a, l = 0) { + const f = r.target, d = py(r) - l; + return a > f.fixedLength ? ant(r) || Eg(He) : Eg( + Po(r).slice(a, d), + f.elementFlags.slice(a, d), + /*readonly*/ + !1, + f.labeledElementDeclarations && f.labeledElementDeclarations.slice(a, d) + ); + } + function N3e(r) { + return Qn(Pr(UX(r.target.fixedLength, (a) => x_("" + a)), Bm(r.target.readonly ? Ti : Br))); + } + function Stt(r, a) { + const l = ec(r.elementFlags, (f) => !(f & a)); + return l >= 0 ? l : r.elementFlags.length; + } + function j8(r, a) { + return r.elementFlags.length - AI(r.elementFlags, (l) => !(l & a)) - 1; + } + function Hfe(r) { + return r.fixedLength + j8( + r, + 3 + /* Fixed */ + ); + } + function z2(r) { + const a = Po(r), l = py(r); + return a.length === l ? a : a.slice(0, l); + } + function Ttt(r) { + return rl( + wi(r.type), + /*isProperty*/ + !0 + ); + } + function jl(r) { + return r.id; + } + function dh(r, a) { + return Cy(r, a, jl, uo) >= 0; + } + function eM(r, a) { + const l = Cy(r, a, jl, uo); + return l < 0 ? (r.splice(~l, 0, a), !0) : !1; + } + function xtt(r, a, l) { + const f = l.flags; + if (!(f & 131072)) + if (a |= f & 473694207, f & 465829888 && (a |= 33554432), f & 2097152 && Cn(l) & 67108864 && (a |= 536870912), l === _t && (a |= 8388608), H(l) && (a |= 1073741824), !Z && f & 98304) + Cn(l) & 65536 || (a |= 4194304); + else { + const d = r.length, y = d && l.id > r[d - 1].id ? ~d : Cy(r, l, jl, uo); + y < 0 && r.splice(~y, 0, l); + } + return a; + } + function A3e(r, a, l) { + let f; + for (const d of l) + d !== f && (a = d.flags & 1048576 ? A3e(r, a | (Ptt(d) ? 1048576 : 0), d.types) : xtt(r, a, d), f = d); + return a; + } + function ktt(r, a) { + var l; + if (r.length < 2) + return r; + const f = Yp(r), d = Ks.get(f); + if (d) + return d; + const y = a && at(r, (z) => !!(z.flags & 524288) && !T_(z) && mpe(Vd(z))), x = r.length; + let I = x, M = 0; + for (; I > 0; ) { + I--; + const z = r[I]; + if (y || z.flags & 469499904) { + if (z.flags & 262144 && xg(z).flags & 1048576) { + Jm(z, Qn(gr(r, (pe) => pe === z ? Zt : pe)), Jf) && Ny(r, I); + continue; + } + const Y = z.flags & 61603840 ? Pn(qa(z), (pe) => qd(en(pe))) : void 0, Se = Y && Vu(en(Y)); + for (const pe of r) + if (z !== pe) { + if (M === 1e5 && M / (x - I) * x > 1e6) { + (l = nn) == null || l.instant(nn.Phase.CheckTypes, "removeSubtypes_DepthLimit", { typeIds: r.map((dt) => dt.id) }), je(C, p.Expression_produces_a_union_type_that_is_too_complex_to_represent); + return; + } + if (M++, Y && pe.flags & 61603840) { + const Ze = Pc(pe, Y.escapedName); + if (Ze && qd(Ze) && Vu(Ze) !== Se) + continue; + } + if (Jm(z, pe, Jf) && (!(Cn(xT(z)) & 1) || !(Cn(xT(pe)) & 1) || ab(z, pe))) { + Ny(r, I); + break; + } + } + } + } + return Ks.set(f, r), r; + } + function Ctt(r, a, l) { + let f = r.length; + for (; f > 0; ) { + f--; + const d = r[f], y = d.flags; + (y & 402653312 && a & 4 || y & 256 && a & 8 || y & 2048 && a & 64 || y & 8192 && a & 4096 || l && y & 32768 && a & 16384 || U2(d) && dh(r, d.regularType)) && Ny(r, f); + } + } + function Ett(r) { + const a = kn(r, wT); + if (a.length) { + let l = r.length; + for (; l > 0; ) { + l--; + const f = r[l]; + f.flags & 128 && at(a, (d) => Dtt(f, d)) && Ny(r, l); + } + } + } + function Dtt(r, a) { + return a.flags & 134217728 ? C$(r, a) : k$(r, a); + } + function wtt(r) { + const a = []; + for (const l of r) + if (l.flags & 2097152 && Cn(l) & 67108864) { + const f = l.types[0].flags & 8650752 ? 0 : 1; + Qf(a, l.types[f]); + } + for (const l of a) { + const f = []; + for (const y of r) + if (y.flags & 2097152 && Cn(y) & 67108864) { + const x = y.types[0].flags & 8650752 ? 0 : 1; + y.types[x] === l && eM(f, y.types[1 - x]); + } + const d = iu(l); + if (J_(d, (y) => dh(f, y))) { + let y = r.length; + for (; y > 0; ) { + y--; + const x = r[y]; + if (x.flags & 2097152 && Cn(x) & 67108864) { + const I = x.types[0].flags & 8650752 ? 0 : 1; + x.types[I] === l && dh(f, x.types[1 - I]) && Ny(r, y); + } + } + eM(r, l); + } + } + } + function Ptt(r) { + return !!(r.flags & 1048576 && (r.aliasSymbol || r.origin)); + } + function I3e(r, a) { + for (const l of a) + if (l.flags & 1048576) { + const f = l.origin; + l.aliasSymbol || f && !(f.flags & 1048576) ? Qf(r, l) : f && f.flags & 1048576 && I3e(r, f.types); + } + } + function Gfe(r, a) { + const l = _E(r); + return l.types = a, l; + } + function Qn(r, a = 1, l, f, d) { + if (r.length === 0) + return Zt; + if (r.length === 1) + return r[0]; + if (r.length === 2 && !d && (r[0].flags & 1048576 || r[1].flags & 1048576)) { + const y = a === 0 ? "N" : a === 2 ? "S" : "L", x = r[0].id < r[1].id ? 0 : 1, I = r[x].id + y + r[1 - x].id + Uk(l, f); + let M = jr.get(I); + return M || (M = F3e( + r, + a, + l, + f, + /*origin*/ + void 0 + ), jr.set(I, M)), M; + } + return F3e(r, a, l, f, d); + } + function F3e(r, a, l, f, d) { + let y = []; + const x = A3e(y, 0, r); + if (a !== 0) { + if (x & 3) + return x & 1 ? x & 8388608 ? _t : x & 1073741824 ? We : Je : ye; + if (x & 32768 && y.length >= 2 && y[0] === ft && y[1] === L && Ny(y, 1), (x & 402664352 || x & 16384 && x & 32768) && Ctt(y, x, !!(a & 2)), x & 128 && x & 402653184 && Ett(y), x & 536870912 && wtt(y), a === 2 && (y = ktt(y, !!(x & 524288)), !y)) + return We; + if (y.length === 0) + return x & 65536 ? x & 4194304 ? lt : zt : x & 32768 ? x & 4194304 ? ft : fe : Zt; + } + if (!d && x & 1048576) { + const M = []; + I3e(M, r); + const z = []; + for (const Se of y) + at(M, (pe) => dh(pe.types, Se)) || z.push(Se); + if (!l && M.length === 1 && z.length === 0) + return M[0]; + if (qu(M, (Se, pe) => Se + pe.types.length, 0) + z.length === y.length) { + for (const Se of M) + eM(z, Se); + d = Gfe(1048576, z); + } + } + const I = (x & 36323331 ? 0 : 32768) | (x & 2097152 ? 16777216 : 0); + return Xfe(y, I, l, f, d); + } + function Ntt(r, a) { + let l; + const f = []; + for (const y of r) { + const x = bp(y); + if (x) { + if (x.kind !== 0 && x.kind !== 1 || l && !$fe(l, x)) + return; + l = x, f.push(x.type); + } else { + const I = a !== 2097152 ? Ba(y) : void 0; + if (I !== Xr && I !== Rr) + return; + } + } + if (!l) + return; + const d = ZPe(f, a); + return L8(l.kind, l.parameterName, l.parameterIndex, d); + } + function $fe(r, a) { + return r.kind === a.kind && r.parameterIndex === a.parameterIndex; + } + function Xfe(r, a, l, f, d) { + if (r.length === 0) + return Zt; + if (r.length === 1) + return r[0]; + const x = (d ? d.flags & 1048576 ? `|${Yp(d.types)}` : d.flags & 2097152 ? `&${Yp(d.types)}` : `#${d.type.id}|${Yp(r)}` : Yp(r)) + Uk(l, f); + let I = Xn.get(x); + return I || (I = Om( + 1048576 + /* Union */ + ), I.objectFlags = a | QL( + r, + /*excludeKinds*/ + 98304 + /* Nullable */ + ), I.types = r, I.origin = d, I.aliasSymbol = l, I.aliasTypeArguments = f, r.length === 2 && r[0].flags & 512 && r[1].flags & 512 && (I.flags |= 16, I.intrinsicName = "boolean"), Xn.set(x, I)), I; + } + function Att(r) { + const a = yn(r); + if (!a.resolvedType) { + const l = Hk(r); + a.resolvedType = Qn(gr(r.types, wi), 1, l, wE(l)); + } + return a.resolvedType; + } + function Itt(r, a, l) { + const f = l.flags; + return f & 2097152 ? O3e(r, a, l.types) : (Dg(l) ? a & 16777216 || (a |= 16777216, r.set(l.id.toString(), l)) : (f & 3 ? (l === _t && (a |= 8388608), H(l) && (a |= 1073741824)) : (Z || !(f & 98304)) && (l === L && (a |= 262144, l = ft), r.has(l.id.toString()) || (l.flags & 109472 && a & 109472 && (a |= 67108864), r.set(l.id.toString(), l))), a |= f & 473694207), a); + } + function O3e(r, a, l) { + for (const f of l) + a = Itt(r, a, Vu(f)); + return a; + } + function Ftt(r, a) { + let l = r.length; + for (; l > 0; ) { + l--; + const f = r[l]; + (f.flags & 4 && a & 402653312 || f.flags & 8 && a & 256 || f.flags & 64 && a & 2048 || f.flags & 4096 && a & 8192 || f.flags & 16384 && a & 32768 || Dg(f) && a & 470302716) && Ny(r, l); + } + } + function Ott(r, a) { + for (const l of r) + if (!dh(l.types, a)) { + if (a === L) + return dh(l.types, ft); + if (a === ft) + return dh(l.types, L); + const f = a.flags & 128 ? de : a.flags & 288 ? st : a.flags & 2048 ? Gt : a.flags & 8192 ? Mt : void 0; + if (!f || !dh(l.types, f)) + return !1; + } + return !0; + } + function Ltt(r) { + let a = r.length; + const l = kn(r, (f) => !!(f.flags & 128)); + for (; a > 0; ) { + a--; + const f = r[a]; + if (f.flags & 402653184) { + for (const d of l) + if (H2(d, f)) { + Ny(r, a); + break; + } else if (wT(f)) + return !0; + } + } + return !1; + } + function L3e(r, a) { + for (let l = 0; l < r.length; l++) + r[l] = Jc(r[l], (f) => !(f.flags & a)); + } + function Mtt(r) { + let a; + const l = ec(r, (x) => !!(Cn(x) & 32768)); + if (l < 0) + return !1; + let f = l + 1; + for (; f < r.length; ) { + const x = r[f]; + Cn(x) & 32768 ? ((a || (a = [r[l]])).push(x), Ny(r, f)) : f++; + } + if (!a) + return !1; + const d = [], y = []; + for (const x of a) + for (const I of x.types) + if (eM(d, I) && Ott(a, I)) { + if (I === ft && y.length && y[0] === L) + continue; + if (I === L && y.length && y[0] === ft) { + y[0] = L; + continue; + } + eM(y, I); + } + return r[l] = Xfe( + y, + 32768 + /* PrimitiveUnion */ + ), !0; + } + function Rtt(r, a, l, f) { + const d = Om( + 2097152 + /* Intersection */ + ); + return d.objectFlags = a | QL( + r, + /*excludeKinds*/ + 98304 + /* Nullable */ + ), d.types = r, d.aliasSymbol = l, d.aliasTypeArguments = f, d; + } + function ra(r, a = 0, l, f) { + const d = /* @__PURE__ */ new Map(), y = O3e(d, 0, r), x = Ki(d.values()); + let I = 0; + if (y & 131072) + return as(x, fr) ? fr : Zt; + if (Z && y & 98304 && y & 84410368 || y & 67108864 && y & 402783228 || y & 402653316 && y & 67238776 || y & 296 && y & 469891796 || y & 2112 && y & 469889980 || y & 12288 && y & 469879804 || y & 49152 && y & 469842940 || y & 402653184 && y & 128 && Ltt(x)) + return Zt; + if (y & 1) + return y & 8388608 ? _t : y & 1073741824 ? We : Je; + if (!Z && y & 98304) + return y & 16777216 ? Zt : y & 32768 ? ft : lt; + if ((y & 4 && y & 402653312 || y & 8 && y & 256 || y & 64 && y & 2048 || y & 4096 && y & 8192 || y & 16384 && y & 32768 || y & 16777216 && y & 470302716) && (a & 1 || Ftt(x, y)), y & 262144 && (x[x.indexOf(ft)] = L), x.length === 0) + return ye; + if (x.length === 1) + return x[0]; + if (x.length === 2 && !(a & 2)) { + const Y = x[0].flags & 8650752 ? 0 : 1, Se = x[Y], pe = x[1 - Y]; + if (Se.flags & 8650752 && (pe.flags & 469893116 && !H3e(pe) || y & 16777216)) { + const Ze = iu(Se); + if (Ze && J_(Ze, (dt) => !!(dt.flags & 469893116) || Dg(dt))) { + if (cM(Ze, pe)) + return Se; + if (!(Ze.flags & 1048576 && kp(Ze, (dt) => cM(dt, pe))) && !cM(pe, Ze)) + return Zt; + I = 67108864; + } + } + } + const M = Yp(x) + (a & 2 ? "*" : Uk(l, f)); + let z = di.get(M); + if (!z) { + if (y & 1048576) + if (Mtt(x)) + z = ra(x, a, l, f); + else if (Ri(x, (Y) => !!(Y.flags & 1048576 && Y.types[0].flags & 32768))) { + const Y = at(x, X8) ? L : ft; + L3e( + x, + 32768 + /* Undefined */ + ), z = Qn([ra(x, a), Y], 1, l, f); + } else if (Ri(x, (Y) => !!(Y.flags & 1048576 && (Y.types[0].flags & 65536 || Y.types[1].flags & 65536)))) + L3e( + x, + 65536 + /* Null */ + ), z = Qn([ra(x, a), lt], 1, l, f); + else if (x.length >= 3 && r.length > 2) { + const Y = Math.floor(x.length / 2); + z = ra([ra(x.slice(0, Y), a), ra(x.slice(Y), a)], a, l, f); + } else { + if (!tM(x)) + return We; + const Y = jtt(x, a), Se = at(Y, (pe) => !!(pe.flags & 2097152)) && Qfe(Y) > Qfe(x) ? Gfe(2097152, x) : void 0; + z = Qn(Y, 1, l, f, Se); + } + else + z = Rtt(x, I, l, f); + di.set(M, z); + } + return z; + } + function M3e(r) { + return qu(r, (a, l) => l.flags & 1048576 ? a * l.types.length : l.flags & 131072 ? 0 : a, 1); + } + function tM(r) { + var a; + const l = M3e(r); + return l >= 1e5 ? ((a = nn) == null || a.instant(nn.Phase.CheckTypes, "checkCrossProductUnion_DepthLimit", { typeIds: r.map((f) => f.id), size: l }), je(C, p.Expression_produces_a_union_type_that_is_too_complex_to_represent), !1) : !0; + } + function jtt(r, a) { + const l = M3e(r), f = []; + for (let d = 0; d < l; d++) { + const y = r.slice(); + let x = d; + for (let M = r.length - 1; M >= 0; M--) + if (r[M].flags & 1048576) { + const z = r[M].types, Y = z.length; + y[M] = z[x % Y], x = Math.floor(x / Y); + } + const I = ra(y, a); + I.flags & 131072 || f.push(I); + } + return f; + } + function R3e(r) { + return !(r.flags & 3145728) || r.aliasSymbol ? 1 : r.flags & 1048576 && r.origin ? R3e(r.origin) : Qfe(r.types); + } + function Qfe(r) { + return qu(r, (a, l) => a + R3e(l), 0); + } + function Btt(r) { + const a = yn(r); + if (!a.resolvedType) { + const l = Hk(r), f = gr(r.types, wi), d = f.length === 2 ? f.indexOf(Zi) : -1, y = d >= 0 ? f[1 - d] : ye, x = !!(y.flags & 76 || y.flags & 134217728 && wT(y)); + a.resolvedType = ra(f, x ? 1 : 0, l, wE(l)); + } + return a.resolvedType; + } + function j3e(r, a) { + const l = Om( + 4194304 + /* Index */ + ); + return l.type = r, l.indexFlags = a, l; + } + function Jtt(r) { + const a = _E( + 4194304 + /* Index */ + ); + return a.type = r, a; + } + function B3e(r, a) { + return a & 1 ? r.resolvedStringIndexType || (r.resolvedStringIndexType = j3e( + r, + 1 + /* StringsOnly */ + )) : r.resolvedIndexType || (r.resolvedIndexType = j3e( + r, + 0 + /* None */ + )); + } + function J3e(r, a) { + const l = Ud(r), f = Hf(r), d = uy(r.target || r); + if (!d && !(a & 2)) + return f; + const y = []; + if (NT(f)) { + if (TE(r)) + return B3e(r, a); + RT(f, I); + } else if (TE(r)) { + const M = Uu(M2(r)); + hfe(M, 8576, !!(a & 1), I); + } else + RT(qL(f), I); + const x = a & 2 ? Jc(Qn(y), (M) => !(M.flags & 5)) : Qn(y); + if (x.flags & 1048576 && f.flags & 1048576 && Yp(x.types) === Yp(f.types)) + return f; + return x; + function I(M) { + const z = d ? Bi(d, z8(r.mapper, l, M)) : M; + y.push(z === de ? _r : z); + } + } + function ztt(r) { + const a = Ud(r); + return l(uy(r) || a); + function l(f) { + return f.flags & 470810623 ? !0 : f.flags & 16777216 ? f.root.isDistributive && f.checkType === a : f.flags & 137363456 ? Ri(f.types, l) : f.flags & 8388608 ? l(f.objectType) && l(f.indexType) : f.flags & 33554432 ? l(f.baseType) && l(f.constraint) : f.flags & 268435456 ? l(f.type) : !1; + } + } + function o0(r) { + if (Ni(r)) + return Zt; + if (d_(r)) + return Vu(Gi(r)); + if (fa(r)) + return Vu(hd(r)); + const a = TS(r); + return a !== void 0 ? x_(Pi(a)) : ct(r) ? Vu(Gi(r)) : Zt; + } + function Vk(r, a, l) { + if (l || !(sp(r) & 6)) { + let f = Ci(OG(r)).nameType; + if (!f) { + const d = is(r.valueDeclaration); + f = r.escapedName === "default" ? x_("default") : d && o0(d) || (N3(r) ? void 0 : x_(_c(r))); + } + if (f && f.flags & a) + return f; + } + return Zt; + } + function z3e(r, a) { + return !!(r.flags & a || r.flags & 2097152 && at(r.types, (l) => z3e(l, a))); + } + function Wtt(r, a, l) { + const f = l && (Cn(r) & 7 || r.aliasSymbol) ? Jtt(r) : void 0, d = gr(qa(r), (x) => Vk(x, a)), y = gr(du(r), (x) => x !== En && z3e(x.keyType, a) ? x.keyType === de && a & 8 ? _r : x.keyType : Zt); + return Qn( + Wi(d, y), + 1, + /*aliasSymbol*/ + void 0, + /*aliasTypeArguments*/ + void 0, + f + ); + } + function Yfe(r, a = 0) { + return !!(r.flags & 58982400 || W1(r) || T_(r) && (!ztt(r) || I8(r) === 2) || r.flags & 1048576 && !(a & 4) && xfe(r) || r.flags & 2097152 && hc( + r, + 465829888 + /* Instantiable */ + ) && at(r.types, Dg)); + } + function Bm(r, a = 0) { + return r = md(r), EE(r) ? Ife(Bm(r.baseType, a)) : Yfe(r, a) ? B3e(r, a) : r.flags & 1048576 ? ra(gr(r.types, (l) => Bm(l, a))) : r.flags & 2097152 ? Qn(gr(r.types, (l) => Bm(l, a))) : Cn(r) & 32 ? J3e(r, a) : r === _t ? _t : r.flags & 2 ? Zt : r.flags & 131073 ? Ot : Wtt( + r, + (a & 2 ? 128 : 402653316) | (a & 1 ? 0 : 12584), + a === 0 + /* None */ + ); + } + function W3e(r) { + const a = ntt(); + return a ? CE(a, [r, de]) : de; + } + function Utt(r) { + const a = W3e(Bm(r)); + return a.flags & 131072 ? de : a; + } + function Vtt(r) { + const a = yn(r); + if (!a.resolvedType) + switch (r.operator) { + case 143: + a.resolvedType = Bm(wi(r.type)); + break; + case 158: + a.resolvedType = r.type.kind === 155 ? ape(C3(r.parent)) : We; + break; + case 148: + a.resolvedType = wi(r.type); + break; + default: + E.assertNever(r.operator); + } + return a.resolvedType; + } + function qtt(r) { + const a = yn(r); + return a.resolvedType || (a.resolvedType = DT( + [r.head.text, ...gr(r.templateSpans, (l) => l.literal.text)], + gr(r.templateSpans, (l) => wi(l.type)) + )), a.resolvedType; + } + function DT(r, a) { + const l = ec(a, (z) => !!(z.flags & 1179648)); + if (l >= 0) + return tM(a) ? Vo(a[l], (z) => DT(r, kR(a, l, z))) : We; + if (as(a, _t)) + return _t; + const f = [], d = []; + let y = r[0]; + if (!M(r, a)) + return de; + if (f.length === 0) + return x_(y); + if (d.push(y), Ri(d, (z) => z === "")) { + if (Ri(f, (z) => !!(z.flags & 4))) + return de; + if (f.length === 1 && wT(f[0])) + return f[0]; + } + const x = `${Yp(f)}|${gr(d, (z) => z.length).join(",")}|${d.join("")}`; + let I = wn.get(x); + return I || wn.set(x, I = Gtt(d, f)), I; + function M(z, Y) { + for (let Se = 0; Se < Y.length; Se++) { + const pe = Y[Se]; + if (pe.flags & 101248) + y += Htt(pe) || "", y += z[Se + 1]; + else if (pe.flags & 134217728) { + if (y += pe.texts[0], !M(pe.texts, pe.types)) return !1; + y += z[Se + 1]; + } else if (NT(pe) || rM(pe)) + f.push(pe), d.push(y), y = z[Se + 1]; + else + return !1; + } + return !0; + } + } + function Htt(r) { + return r.flags & 128 ? r.value : r.flags & 256 ? "" + r.value : r.flags & 2048 ? qb(r.value) : r.flags & 98816 ? r.intrinsicName : void 0; + } + function Gtt(r, a) { + const l = Om( + 134217728 + /* TemplateLiteral */ + ); + return l.texts = r, l.types = a, l; + } + function qk(r, a) { + return a.flags & 1179648 ? Vo(a, (l) => qk(r, l)) : a.flags & 128 ? x_(U3e(r, a.value)) : a.flags & 134217728 ? DT(...$tt(r, a.texts, a.types)) : ( + // Mapping> === Mapping + a.flags & 268435456 && r === a.symbol ? a : a.flags & 268435461 || NT(a) ? V3e(r, a) : ( + // This handles Mapping<`${number}`> and Mapping<`${bigint}`> + rM(a) ? V3e(r, DT(["", ""], [a])) : a + ) + ); + } + function U3e(r, a) { + switch (pW.get(r.escapedName)) { + case 0: + return a.toUpperCase(); + case 1: + return a.toLowerCase(); + case 2: + return a.charAt(0).toUpperCase() + a.slice(1); + case 3: + return a.charAt(0).toLowerCase() + a.slice(1); + } + return a; + } + function $tt(r, a, l) { + switch (pW.get(r.escapedName)) { + case 0: + return [a.map((f) => f.toUpperCase()), l.map((f) => qk(r, f))]; + case 1: + return [a.map((f) => f.toLowerCase()), l.map((f) => qk(r, f))]; + case 2: + return [a[0] === "" ? a : [a[0].charAt(0).toUpperCase() + a[0].slice(1), ...a.slice(1)], a[0] === "" ? [qk(r, l[0]), ...l.slice(1)] : l]; + case 3: + return [a[0] === "" ? a : [a[0].charAt(0).toLowerCase() + a[0].slice(1), ...a.slice(1)], a[0] === "" ? [qk(r, l[0]), ...l.slice(1)] : l]; + } + return [a, l]; + } + function V3e(r, a) { + const l = `${Zs(r)},${jl(a)}`; + let f = ki.get(l); + return f || ki.set(l, f = Xtt(r, a)), f; + } + function Xtt(r, a) { + const l = Xp(268435456, r); + return l.type = a, l; + } + function Qtt(r, a, l, f, d) { + const y = Om( + 8388608 + /* IndexedAccess */ + ); + return y.objectType = r, y.indexType = a, y.accessFlags = l, y.aliasSymbol = f, y.aliasTypeArguments = d, y; + } + function B8(r) { + if (le) + return !1; + if (Cn(r) & 4096) + return !0; + if (r.flags & 1048576) + return Ri(r.types, B8); + if (r.flags & 2097152) + return at(r.types, B8); + if (r.flags & 465829888) { + const a = bfe(r); + return a !== r && B8(a); + } + return !1; + } + function QG(r, a) { + return ap(r) ? op(r) : a && Fc(a) ? ( + // late bound names are handled in the first branch, so here we only need to handle normal names + TS(a) + ) : void 0; + } + function Zfe(r, a) { + if (a.flags & 8208) { + const l = ur(r.parent, (f) => !vo(f)) || r.parent; + return Cb(l) ? tm(l) && Me(r) && eAe(l, r) : Ri(a.declarations, (f) => !vs(f) || T1(f)); + } + return !0; + } + function q3e(r, a, l, f, d, y) { + const x = d && d.kind === 212 ? d : void 0, I = d && Ni(d) ? void 0 : QG(l, d); + if (I !== void 0) { + if (y & 256) + return ub(a, I) || Je; + const z = Ys(a, I); + if (z) { + if (y & 64 && d && z.declarations && Yh(z) && Zfe(d, z)) { + const Se = x?.argumentExpression ?? (Qb(d) ? d.indexType : d); + Zh(Se, z.declarations, I); + } + if (x) { + if (RM(z, x, T8e(x.expression, a.symbol)), uIe(x, z, Gy(x))) { + je(x.argumentExpression, p.Cannot_assign_to_0_because_it_is_a_read_only_property, Ui(z)); + return; + } + if (y & 8 && (yn(d).resolvedSymbol = z), d8e(x, z)) + return Ye; + } + const Y = y & 4 ? ly(z) : en(z); + return x && Gy(x) !== 1 ? m0(x, Y) : d && Qb(d) && X8(Y) ? Qn([Y, ft]) : Y; + } + if (J_(a, ga) && Xg(I)) { + const Y = +I; + if (d && J_(a, (Se) => !(Se.target.combinedFlags & 12)) && !(y & 16)) { + const Se = Kfe(d); + if (ga(a)) { + if (Y < 0) + return je(Se, p.A_tuple_type_cannot_be_indexed_with_a_negative_value), ft; + je(Se, p.Tuple_type_0_of_length_1_has_no_element_at_index_2, $r(a), py(a), Pi(I)); + } else + je(Se, p.Property_0_does_not_exist_on_type_1, Pi(I), $r(a)); + } + if (Y >= 0) + return M(ph(a, st)), ONe(a, Y, y & 1 ? L : void 0); + } + } + if (!(l.flags & 98304) && su( + l, + 402665900 + /* ESSymbolLike */ + )) { + if (a.flags & 131073) + return a; + const z = F8(a, l) || ph(a, de); + if (z) { + if (y & 2 && z.keyType !== st) { + x && (y & 4 ? je(x, p.Type_0_is_generic_and_can_only_be_indexed_for_reading, $r(r)) : je(x, p.Type_0_cannot_be_used_to_index_type_1, $r(l), $r(r))); + return; + } + if (d && z.keyType === de && !su( + l, + 12 + /* Number */ + )) { + const Y = Kfe(d); + return je(Y, p.Type_0_cannot_be_used_as_an_index_type, $r(l)), y & 1 ? Qn([z.type, L]) : z.type; + } + return M(z), y & 1 && !(a.symbol && a.symbol.flags & 384 && l.symbol && l.flags & 1024 && af(l.symbol) === a.symbol) ? Qn([z.type, L]) : z.type; + } + if (l.flags & 131072) + return Zt; + if (B8(a)) + return Je; + if (x && !iX(a)) { + if (hy(a)) { + if (le && l.flags & 384) + return Pa.add(tn(x, p.Property_0_does_not_exist_on_type_1, l.value, $r(a))), ft; + if (l.flags & 12) { + const Y = gr(a.properties, (Se) => en(Se)); + return Qn(Pr(Y, ft)); + } + } + if (a.symbol === he && I !== void 0 && he.exports.has(I) && he.exports.get(I).flags & 418) + je(x, p.Property_0_does_not_exist_on_type_1, Pi(I), $r(a)); + else if (le && !(y & 128)) + if (I !== void 0 && h8e(I, a)) { + const Y = $r(a); + je(x, p.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead, I, Y, Y + "[" + qo(x.argumentExpression) + "]"); + } else if (nb(a, st)) + je(x.argumentExpression, p.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number); + else { + let Y; + if (I !== void 0 && (Y = b8e(I, a))) + Y !== void 0 && je(x.argumentExpression, p.Property_0_does_not_exist_on_type_1_Did_you_mean_2, I, $r(a), Y); + else { + const Se = Kst(a, x, l); + if (Se !== void 0) + je(x, p.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1, $r(a), Se); + else { + let pe; + if (l.flags & 1024) + pe = fs( + /*details*/ + void 0, + p.Property_0_does_not_exist_on_type_1, + "[" + $r(l) + "]", + $r(a) + ); + else if (l.flags & 8192) { + const Ze = oy(l.symbol, x); + pe = fs( + /*details*/ + void 0, + p.Property_0_does_not_exist_on_type_1, + "[" + Ze + "]", + $r(a) + ); + } else l.flags & 128 || l.flags & 256 ? pe = fs( + /*details*/ + void 0, + p.Property_0_does_not_exist_on_type_1, + l.value, + $r(a) + ) : l.flags & 12 && (pe = fs( + /*details*/ + void 0, + p.No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1, + $r(l), + $r(a) + )); + pe = fs( + pe, + p.Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1, + $r(f), + $r(a) + ), Pa.add(Jg(Cr(x), x, pe)); + } + } + } + return; + } + } + if (y & 16 && hy(a)) + return ft; + if (B8(a)) + return Je; + if (d) { + const z = Kfe(d); + if (z.kind !== 10 && l.flags & 384) + je(z, p.Property_0_does_not_exist_on_type_1, "" + l.value, $r(a)); + else if (l.flags & 12) + je(z, p.Type_0_has_no_matching_index_signature_for_type_1, $r(a), $r(l)); + else { + const Y = z.kind === 10 ? "bigint" : $r(l); + je(z, p.Type_0_cannot_be_used_as_an_index_type, Y); + } + } + if (Ua(l)) + return l; + return; + function M(z) { + z && z.isReadonly && x && ($y(x) || xB(x)) && je(x, p.Index_signature_in_type_0_only_permits_reading, $r(a)); + } + } + function Kfe(r) { + return r.kind === 212 ? r.argumentExpression : r.kind === 199 ? r.indexType : r.kind === 167 ? r.expression : r; + } + function rM(r) { + if (r.flags & 2097152) { + let a = !1; + for (const l of r.types) + if (l.flags & 101248 || rM(l)) + a = !0; + else if (!(l.flags & 524288)) + return !1; + return a; + } + return !!(r.flags & 77) || wT(r); + } + function wT(r) { + return !!(r.flags & 134217728) && Ri(r.types, rM) || !!(r.flags & 268435456) && rM(r.type); + } + function H3e(r) { + return !!(r.flags & 402653184) && !wT(r); + } + function sb(r) { + return !!J8(r); + } + function PT(r) { + return !!(J8(r) & 4194304); + } + function NT(r) { + return !!(J8(r) & 8388608); + } + function J8(r) { + return r.flags & 3145728 ? (r.objectFlags & 2097152 || (r.objectFlags |= 2097152 | qu(r.types, (a, l) => a | J8(l), 0)), r.objectFlags & 12582912) : r.flags & 33554432 ? (r.objectFlags & 2097152 || (r.objectFlags |= 2097152 | J8(r.baseType) | J8(r.constraint)), r.objectFlags & 12582912) : (r.flags & 58982400 || T_(r) || W1(r) ? 4194304 : 0) | (r.flags & 63176704 || H3e(r) ? 8388608 : 0); + } + function c0(r, a) { + return r.flags & 8388608 ? Ztt(r, a) : r.flags & 16777216 ? Ktt(r, a) : r; + } + function G3e(r, a, l) { + if (r.flags & 1048576 || r.flags & 2097152 && !Yfe(r)) { + const f = gr(r.types, (d) => c0(j_(d, a), l)); + return r.flags & 2097152 || l ? ra(f) : Qn(f); + } + } + function Ytt(r, a, l) { + if (a.flags & 1048576) { + const f = gr(a.types, (d) => c0(j_(r, d), l)); + return l ? ra(f) : Qn(f); + } + } + function Ztt(r, a) { + const l = a ? "simplifiedForWriting" : "simplifiedForReading"; + if (r[l]) + return r[l] === Mc ? r : r[l]; + r[l] = Mc; + const f = c0(r.objectType, a), d = c0(r.indexType, a), y = Ytt(f, d, a); + if (y) + return r[l] = y; + if (!(d.flags & 465829888)) { + const x = G3e(f, d, a); + if (x) + return r[l] = x; + } + if (W1(f) && d.flags & 296) { + const x = Qw( + f, + d.flags & 8 ? 0 : f.target.fixedLength, + /*endSkipCount*/ + 0, + a + ); + if (x) + return r[l] = x; + } + return T_(f) && I8(f) !== 2 ? r[l] = Vo(YG(f, r.indexType), (x) => c0(x, a)) : r[l] = r; + } + function Ktt(r, a) { + const l = r.checkType, f = r.extendsType, d = B1(r), y = J1(r); + if (y.flags & 131072 && l0(d) === l0(l)) { + if (l.flags & 1 || Ls(IT(l), IT(f))) + return c0(d, a); + if ($3e(l, f)) + return Zt; + } else if (d.flags & 131072 && l0(y) === l0(l)) { + if (!(l.flags & 1) && Ls(IT(l), IT(f))) + return Zt; + if (l.flags & 1 || $3e(l, f)) + return c0(y, a); + } + return r; + } + function $3e(r, a) { + return !!(Qn([VL(r, a), Zt]).flags & 131072); + } + function YG(r, a) { + const l = B_([Ud(r)], [a]), f = q2(r.mapper, l), d = Bi(s0(r.target || r), f), y = RPe(r) > 0 || (sb(r) ? Jw(M2(r)) > 0 : ert(r, a)); + return rl( + d, + /*isProperty*/ + !0, + y + ); + } + function ert(r, a) { + const l = iu(a); + return !!l && at(qa(r), (f) => !!(f.flags & 16777216) && Ls(Vk( + f, + 8576 + /* StringOrNumberLiteralOrUnique */ + ), l)); + } + function j_(r, a, l = 0, f, d, y) { + return j1(r, a, l, f, d, y) || (f ? We : ye); + } + function X3e(r, a) { + return J_(r, (l) => { + if (l.flags & 384) { + const f = op(l); + if (Xg(f)) { + const d = +f; + return d >= 0 && d < a; + } + } + return !1; + }); + } + function j1(r, a, l = 0, f, d, y) { + if (r === _t || a === _t) + return _t; + if (r = md(r), vNe(r) && !(a.flags & 98304) && su( + a, + 12 + /* Number */ + ) && (a = de), F.noUncheckedIndexedAccess && l & 32 && (l |= 1), NT(a) || (f && f.kind !== 199 ? W1(r) && !X3e(a, Hfe(r.target)) : PT(r) && !(ga(r) && X3e(a, Hfe(r.target))) || xfe(r))) { + if (r.flags & 3) + return r; + const I = l & 1, M = r.id + "," + a.id + "," + I + Uk(d, y); + let z = Bn.get(M); + return z || Bn.set(M, z = Qtt(r, a, I, d, y)), z; + } + const x = zw(r); + if (a.flags & 1048576 && !(a.flags & 16)) { + const I = []; + let M = !1; + for (const z of a.types) { + const Y = q3e(r, x, z, a, f, l | (M ? 128 : 0)); + if (Y) + I.push(Y); + else if (f) + M = !0; + else + return; + } + return M ? void 0 : l & 4 ? ra(I, 0, d, y) : Qn(I, 1, d, y); + } + return q3e( + r, + x, + a, + a, + f, + l | 8 | 64 + /* ReportDeprecated */ + ); + } + function Q3e(r) { + const a = yn(r); + if (!a.resolvedType) { + const l = wi(r.objectType), f = wi(r.indexType), d = Hk(r); + a.resolvedType = j_(l, f, 0, r, d, wE(d)); + } + return a.resolvedType; + } + function epe(r) { + const a = yn(r); + if (!a.resolvedType) { + const l = ce(32, r.symbol); + l.declaration = r, l.aliasSymbol = Hk(r), l.aliasTypeArguments = wE(l.aliasSymbol), a.resolvedType = l, Hf(l); + } + return a.resolvedType; + } + function l0(r) { + return r.flags & 33554432 ? l0(r.baseType) : r.flags & 8388608 && (r.objectType.flags & 33554432 || r.indexType.flags & 33554432) ? j_(l0(r.objectType), l0(r.indexType)) : r; + } + function Y3e(r) { + return Wx(r) && Ir(r.elements) > 0 && !at(r.elements, (a) => fF(a) || pF(a) || KC(a) && !!(a.questionToken || a.dotDotDotToken)); + } + function Z3e(r, a) { + return sb(r) || a && ga(r) && at(z2(r), sb); + } + function tpe(r, a, l, f, d) { + let y, x, I = 0; + for (; ; ) { + if (I === 1e3) + return je(C, p.Type_instantiation_is_excessively_deep_and_possibly_infinite), We; + const z = Bi(l0(r.checkType), a), Y = Bi(r.extendsType, a); + if (z === We || Y === We) + return We; + if (z === _t || Y === _t) + return _t; + const Se = M4(r.node.checkType), pe = M4(r.node.extendsType), Ze = Y3e(Se) && Y3e(pe) && Ir(Se.elements) === Ir(pe.elements), dt = Z3e(z, Ze); + let ht; + if (r.inferTypeParameters) { + const nr = Y8( + r.inferTypeParameters, + /*signature*/ + void 0, + 0 + /* None */ + ); + a && (nr.nonFixingMapper = q2(nr.nonFixingMapper, a)), dt || d0( + nr.inferences, + z, + Y, + 1536 + /* AlwaysStrict */ + ), ht = a ? q2(nr.mapper, a) : nr.mapper; + } + const or = ht ? Bi(r.extendsType, ht) : Y; + if (!dt && !Z3e(or, Ze)) { + if (!(or.flags & 3) && (z.flags & 1 || !Ls(U8(z), U8(or)))) { + (z.flags & 1 || l && !(or.flags & 131072) && kp(U8(or), (Kr) => Ls(Kr, U8(z)))) && (x || (x = [])).push(Bi(wi(r.node.trueType), ht || a)); + const nr = wi(r.node.falseType); + if (nr.flags & 16777216) { + const Kr = nr.root; + if (Kr.node.parent === r.node && (!Kr.isDistributive || Kr.checkType === r.checkType)) { + r = Kr; + continue; + } + if (M(nr, a)) + continue; + } + y = Bi(nr, a); + break; + } + if (or.flags & 3 || Ls(IT(z), IT(or))) { + const nr = wi(r.node.trueType), Kr = ht || a; + if (M(nr, Kr)) + continue; + y = Bi(nr, Kr); + break; + } + } + y = Om( + 16777216 + /* Conditional */ + ), y.root = r, y.checkType = Bi(r.checkType, a), y.extendsType = Bi(r.extendsType, a), y.mapper = a, y.combinedMapper = ht, y.aliasSymbol = f || r.aliasSymbol, y.aliasTypeArguments = f ? d : mh(r.aliasTypeArguments, a); + break; + } + return x ? Qn(Pr(x, y)) : y; + function M(z, Y) { + if (z.flags & 16777216 && Y) { + const Se = z.root; + if (Se.outerTypeParameters) { + const pe = q2(z.mapper, Y), Ze = gr(Se.outerTypeParameters, (or) => dy(or, pe)), dt = B_(Se.outerTypeParameters, Ze), ht = Se.isDistributive ? dy(Se.checkType, dt) : void 0; + if (!ht || ht === Se.checkType || !(ht.flags & 1179648)) + return r = Se, a = dt, f = void 0, d = void 0, Se.aliasSymbol && I++, !0; + } + } + return !1; + } + } + function B1(r) { + return r.resolvedTrueType || (r.resolvedTrueType = Bi(wi(r.root.node.trueType), r.mapper)); + } + function J1(r) { + return r.resolvedFalseType || (r.resolvedFalseType = Bi(wi(r.root.node.falseType), r.mapper)); + } + function trt(r) { + return r.resolvedInferredTrueType || (r.resolvedInferredTrueType = r.combinedMapper ? Bi(wi(r.root.node.trueType), r.combinedMapper) : B1(r)); + } + function rpe(r) { + let a; + return r.locals && r.locals.forEach((l) => { + l.flags & 262144 && (a = Pr(a, ko(l))); + }), a; + } + function rrt(r) { + return r.isDistributive && (oM(r.checkType, r.node.trueType) || oM(r.checkType, r.node.falseType)); + } + function nrt(r) { + const a = yn(r); + if (!a.resolvedType) { + const l = wi(r.checkType), f = Hk(r), d = wE(f), y = vE( + r, + /*includeThisTypes*/ + !0 + ), x = d ? y : kn(y, (M) => oM(M, r)), I = { + node: r, + checkType: l, + extendsType: wi(r.extendsType), + isDistributive: !!(l.flags & 262144), + inferTypeParameters: rpe(r), + outerTypeParameters: x, + instantiations: void 0, + aliasSymbol: f, + aliasTypeArguments: d + }; + a.resolvedType = tpe( + I, + /*mapper*/ + void 0, + /*forConstraint*/ + !1 + ), x && (I.instantiations = /* @__PURE__ */ new Map(), I.instantiations.set(Yp(x), a.resolvedType)); + } + return a.resolvedType; + } + function irt(r) { + const a = yn(r); + return a.resolvedType || (a.resolvedType = L2(dn(r.typeParameter))), a.resolvedType; + } + function K3e(r) { + return Me(r) ? [r] : Pr(K3e(r.left), r.right); + } + function eNe(r) { + var a; + const l = yn(r); + if (!l.resolvedType) { + if (!Dh(r)) + return je(r.argument, p.String_literal_expected), l.resolvedSymbol = Ve, l.resolvedType = We; + const f = r.isTypeOf ? 111551 : r.flags & 16777216 ? 900095 : 788968, d = Pu(r, r.argument.literal); + if (!d) + return l.resolvedSymbol = Ve, l.resolvedType = We; + const y = !!((a = d.exports) != null && a.get( + "export=" + /* ExportEquals */ + )), x = M_( + d, + /*dontResolveAlias*/ + !1 + ); + if (tc(r.qualifier)) + if (x.flags & f) + l.resolvedType = tNe(r, l, x, f); + else { + const I = f === 111551 ? p.Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here : p.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0; + je(r, I, r.argument.literal.text), l.resolvedSymbol = Ve, l.resolvedType = We; + } + else { + const I = K3e(r.qualifier); + let M = x, z; + for (; z = I.shift(); ) { + const Y = I.length ? 1920 : f, Se = Oa(jc(M)), pe = r.isTypeOf || an(r) && y ? Ys( + en(Se), + z.escapedText, + /*skipObjectFunctionPropertyAugment*/ + !1, + /*includeTypeOnlyMembers*/ + !0 + ) : void 0, dt = (r.isTypeOf ? void 0 : fu(zu(Se), z.escapedText, Y)) ?? pe; + if (!dt) + return je(z, p.Namespace_0_has_no_exported_member_1, oy(M), co(z)), l.resolvedType = We; + yn(z).resolvedSymbol = dt, yn(z.parent).resolvedSymbol = dt, M = dt; + } + l.resolvedType = tNe(r, l, M, f); + } + } + return l.resolvedType; + } + function tNe(r, a, l, f) { + const d = jc(l); + return a.resolvedSymbol = d, f === 111551 ? Q8e(en(l), r) : qG(r, d); + } + function rNe(r) { + const a = yn(r); + if (!a.resolvedType) { + const l = Hk(r); + if (!r.symbol || Sg(r.symbol).size === 0 && !l) + a.resolvedType = Zi; + else { + let f = ce(16, r.symbol); + f.aliasSymbol = l, f.aliasTypeArguments = wE(l), RS(r) && r.isArrayType && (f = mu(f)), a.resolvedType = f; + } + } + return a.resolvedType; + } + function Hk(r) { + let a = r.parent; + for (; IS(a) || hv(a) || _v(a) && a.operator === 148; ) + a = a.parent; + return T3(a) ? dn(a) : void 0; + } + function wE(r) { + return r ? zd(r) : void 0; + } + function ZG(r) { + return !!(r.flags & 524288) && !T_(r); + } + function npe(r) { + return u0(r) || !!(r.flags & 474058748); + } + function ipe(r, a) { + if (!(r.flags & 1048576)) + return r; + if (Ri(r.types, npe)) + return Pn(r.types, u0) || hs; + const l = Pn(r.types, (y) => !npe(y)); + if (!l || Pn(r.types, (y) => y !== l && !npe(y))) + return r; + return d(l); + function d(y) { + const x = Us(); + for (const M of qa(y)) + if (!(sp(M) & 6)) { + if (KG(M)) { + const z = M.flags & 65536 && !(M.flags & 32768), Se = ca(16777220, M.escapedName, gfe(M) | (a ? 8 : 0)); + Se.links.type = z ? ft : rl( + en(M), + /*isProperty*/ + !0 + ), Se.declarations = M.declarations, Se.links.nameType = Ci(M).nameType, Se.links.syntheticOrigin = M, x.set(M.escapedName, Se); + } + } + const I = Ea(y.symbol, x, He, He, du(y)); + return I.objectFlags |= 131200, I; + } + } + function W2(r, a, l, f, d) { + if (r.flags & 1 || a.flags & 1) + return Je; + if (r.flags & 2 || a.flags & 2) + return ye; + if (r.flags & 131072) + return a; + if (a.flags & 131072) + return r; + if (r = ipe(r, d), r.flags & 1048576) + return tM([r, a]) ? Vo(r, (z) => W2(z, a, l, f, d)) : We; + if (a = ipe(a, d), a.flags & 1048576) + return tM([r, a]) ? Vo(a, (z) => W2(r, z, l, f, d)) : We; + if (a.flags & 473960444) + return r; + if (PT(r) || PT(a)) { + if (u0(r)) + return a; + if (r.flags & 2097152) { + const z = r.types, Y = z[z.length - 1]; + if (ZG(Y) && ZG(a)) + return ra(Wi(z.slice(0, z.length - 1), [W2(Y, a, l, f, d)])); + } + return ra([r, a]); + } + const y = Us(), x = /* @__PURE__ */ new Set(), I = r === hs ? du(a) : IPe([r, a]); + for (const z of qa(a)) + sp(z) & 6 ? x.add(z.escapedName) : KG(z) && y.set(z.escapedName, spe(z, d)); + for (const z of qa(r)) + if (!(x.has(z.escapedName) || !KG(z))) + if (y.has(z.escapedName)) { + const Y = y.get(z.escapedName), Se = en(Y); + if (Y.flags & 16777216) { + const pe = Wi(z.declarations, Y.declarations), Ze = 4 | z.flags & 16777216, dt = ca(Ze, z.escapedName), ht = en(z), or = y$(ht), nr = y$(Se); + dt.links.type = or === nr ? ht : Qn( + [ht, nr], + 2 + /* Subtype */ + ), dt.links.leftSpread = z, dt.links.rightSpread = Y, dt.declarations = pe, dt.links.nameType = Ci(z).nameType, y.set(z.escapedName, dt); + } + } else + y.set(z.escapedName, spe(z, d)); + const M = Ea(l, y, He, He, Wc(I, (z) => srt(z, d))); + return M.objectFlags |= 2228352 | f, M; + } + function KG(r) { + var a; + return !at(r.declarations, Fu) && (!(r.flags & 106496) || !((a = r.declarations) != null && a.some((l) => Zn(l.parent)))); + } + function spe(r, a) { + const l = r.flags & 65536 && !(r.flags & 32768); + if (!l && a === Xd(r)) + return r; + const f = 4 | r.flags & 16777216, d = ca(f, r.escapedName, gfe(r) | (a ? 8 : 0)); + return d.links.type = l ? ft : en(r), d.declarations = r.declarations, d.links.nameType = Ci(r).nameType, d.links.syntheticOrigin = r, d; + } + function srt(r, a) { + return r.isReadonly !== a ? Cg(r.keyType, r.type, a, r.declaration) : r; + } + function nM(r, a, l, f) { + const d = Xp(r, l); + return d.value = a, d.regularType = f || d, d; + } + function Gk(r) { + if (r.flags & 2976) { + if (!r.freshType) { + const a = nM(r.flags, r.value, r.symbol, r); + a.freshType = a, r.freshType = a; + } + return r.freshType; + } + return r; + } + function Vu(r) { + return r.flags & 2976 ? r.regularType : r.flags & 1048576 ? r.regularType || (r.regularType = Vo(r, Vu)) : r; + } + function U2(r) { + return !!(r.flags & 2976) && r.freshType === r; + } + function x_(r) { + let a; + return Re.get(r) || (Re.set(r, a = nM(128, r)), a); + } + function gd(r) { + let a; + return gt.get(r) || (gt.set(r, a = nM(256, r)), a); + } + function iM(r) { + let a; + const l = qb(r); + return tr.get(l) || (tr.set(l, a = nM(2048, r)), a); + } + function art(r, a, l) { + let f; + const d = `${a}${typeof r == "string" ? "@" : "#"}${r}`, y = 1024 | (typeof r == "string" ? 128 : 256); + return qr.get(d) || (qr.set(d, f = nM(y, r, l)), f); + } + function ort(r) { + if (r.literal.kind === 106) + return lt; + const a = yn(r); + return a.resolvedType || (a.resolvedType = Vu(Gi(r.literal))), a.resolvedType; + } + function crt(r) { + const a = Xp(8192, r); + return a.escapedName = `__@${a.symbol.escapedName}@${Zs(a.symbol)}`, a; + } + function ape(r) { + if (an(r) && hv(r)) { + const a = Ob(r); + a && (r = hx(a) || a); + } + if (KZ(r)) { + const a = M7(r) ? R_(r.left) : R_(r); + if (a) { + const l = Ci(a); + return l.uniqueESSymbolType || (l.uniqueESSymbolType = crt(a)); + } + } + return Mt; + } + function lrt(r) { + const a = Lu( + r, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ), l = a && a.parent; + if (l && (Zn(l) || l.kind === 264) && !Vs(a) && (!Go(a) || Lb(r, a.body))) + return S_(dn(l)).thisType; + if (l && oa(l) && fn(l.parent) && Sc(l.parent) === 6) + return S_(R_(l.parent.left).parent).thisType; + const f = r.flags & 16777216 ? nv(r) : void 0; + return f && po(f) && fn(f.parent) && Sc(f.parent) === 3 ? S_(R_(f.parent.left).parent).thisType : Um(a) && Lb(r, a.body) ? S_(dn(a)).thisType : (je(r, p.A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface), We); + } + function ope(r) { + const a = yn(r); + return a.resolvedType || (a.resolvedType = lrt(r)), a.resolvedType; + } + function nNe(r) { + return wi(sM(r.type) || r.type); + } + function sM(r) { + switch (r.kind) { + case 196: + return sM(r.type); + case 189: + if (r.elements.length === 1 && (r = r.elements[0], r.kind === 191 || r.kind === 202 && r.dotDotDotToken)) + return sM(r.type); + break; + case 188: + return r.elementType; + } + } + function urt(r) { + const a = yn(r); + return a.resolvedType || (a.resolvedType = r.dotDotDotToken ? nNe(r) : rl( + wi(r.type), + /*isProperty*/ + !0, + !!r.questionToken + )); + } + function wi(r) { + return Jet(iNe(r), r); + } + function iNe(r) { + switch (r.kind) { + case 133: + case 312: + case 313: + return Je; + case 159: + return ye; + case 154: + return de; + case 150: + return st; + case 163: + return Gt; + case 136: + return ut; + case 155: + return Mt; + case 116: + return Pt; + case 157: + return ft; + case 106: + return lt; + case 146: + return Zt; + case 151: + return r.flags & 524288 && !le ? Je : Tr; + case 141: + return rn; + case 197: + case 110: + return ope(r); + case 201: + return ort(r); + case 183: + return GG(r); + case 182: + return r.assertsModifier ? Pt : ut; + case 233: + return GG(r); + case 186: + return f3e(r); + case 188: + case 189: + return ytt(r); + case 190: + return Ttt(r); + case 192: + return Att(r); + case 193: + return Btt(r); + case 314: + return zet(r); + case 316: + return rl(wi(r.type)); + case 202: + return urt(r); + case 196: + case 315: + case 309: + return wi(r.type); + case 191: + return nNe(r); + case 318: + return Sut(r); + case 184: + case 185: + case 187: + case 322: + case 317: + case 323: + return rNe(r); + case 198: + return Vtt(r); + case 199: + return Q3e(r); + case 200: + return epe(r); + case 194: + return nrt(r); + case 195: + return irt(r); + case 203: + return qtt(r); + case 205: + return eNe(r); + // This function assumes that an identifier, qualified name, or property access expression is a type expression + // Callers should first ensure this by calling `isPartOfTypeNode` + // TODO(rbuckton): These aren't valid TypeNodes, but we treat them as such because of `isPartOfTypeNode`, which returns `true` for things that aren't `TypeNode`s. + case 80: + case 166: + case 211: + const a = Cp(r); + return a ? ko(a) : We; + default: + return We; + } + } + function e$(r, a, l) { + if (r && r.length) + for (let f = 0; f < r.length; f++) { + const d = r[f], y = l(d, a); + if (d !== y) { + const x = f === 0 ? [] : r.slice(0, f); + for (x.push(y), f++; f < r.length; f++) + x.push(l(r[f], a)); + return x; + } + } + return r; + } + function mh(r, a) { + return e$(r, a, Bi); + } + function t$(r, a) { + return e$(r, a, $k); + } + function sNe(r, a) { + return e$(r, a, Trt); + } + function B_(r, a) { + return r.length === 1 ? V2(r[0], a ? a[0] : Je) : _rt(r, a); + } + function dy(r, a) { + switch (a.kind) { + case 0: + return r === a.source ? a.target : r; + case 1: { + const f = a.sources, d = a.targets; + for (let y = 0; y < f.length; y++) + if (r === f[y]) + return d ? d[y] : Je; + return r; + } + case 2: { + const f = a.sources, d = a.targets; + for (let y = 0; y < f.length; y++) + if (r === f[y]) + return d[y](); + return r; + } + case 3: + return a.func(r); + case 4: + case 5: + const l = dy(r, a.mapper1); + return l !== r && a.kind === 4 ? Bi(l, a.mapper2) : dy(l, a.mapper2); + } + } + function V2(r, a) { + return E.attachDebugPrototypeIfDebug({ kind: 0, source: r, target: a }); + } + function _rt(r, a) { + return E.attachDebugPrototypeIfDebug({ kind: 1, sources: r, targets: a }); + } + function aM(r, a) { + return E.attachDebugPrototypeIfDebug({ kind: 3, func: r, debugInfo: E.isDebugging ? a : void 0 }); + } + function cpe(r, a) { + return E.attachDebugPrototypeIfDebug({ kind: 2, sources: r, targets: a }); + } + function r$(r, a, l) { + return E.attachDebugPrototypeIfDebug({ kind: r, mapper1: a, mapper2: l }); + } + function aNe(r) { + return B_( + r, + /*targets*/ + void 0 + ); + } + function frt(r, a) { + const l = r.inferences.slice(a); + return B_(gr(l, (f) => f.typeParameter), gr(l, () => ye)); + } + function q2(r, a) { + return r ? r$(4, r, a) : a; + } + function prt(r, a) { + return r ? r$(5, r, a) : a; + } + function AT(r, a, l) { + return l ? r$(5, V2(r, a), l) : V2(r, a); + } + function z8(r, a, l) { + return r ? r$(5, r, V2(a, l)) : V2(a, l); + } + function drt(r) { + return !r.constraint && !UG(r) || r.constraint === Qa ? r : r.restrictiveInstantiation || (r.restrictiveInstantiation = sr(r.symbol), r.restrictiveInstantiation.constraint = Qa, r.restrictiveInstantiation); + } + function lpe(r) { + const a = sr(r.symbol); + return a.target = r, a; + } + function oNe(r, a) { + return L8(r.kind, r.parameterName, r.parameterIndex, Bi(r.type, a)); + } + function $k(r, a, l) { + let f; + if (r.typeParameters && !l) { + f = gr(r.typeParameters, lpe), a = q2(B_(r.typeParameters, f), a); + for (const y of f) + y.mapper = a; + } + const d = fh( + r.declaration, + f, + r.thisParameter && upe(r.thisParameter, a), + e$(r.parameters, a, upe), + /*resolvedReturnType*/ + void 0, + /*resolvedTypePredicate*/ + void 0, + r.minArgumentCount, + r.flags & 167 + /* PropagatingFlags */ + ); + return d.target = r, d.mapper = a, d; + } + function upe(r, a) { + const l = Ci(r); + if (l.type && !U1(l.type) && (!(r.flags & 65536) || l.writeType && !U1(l.writeType))) + return r; + rc(r) & 1 && (r = l.target, a = q2(l.mapper, a)); + const f = ca(r.flags, r.escapedName, 1 | rc(r) & 53256); + return f.declarations = r.declarations, f.parent = r.parent, f.links.target = r, f.links.mapper = a, r.valueDeclaration && (f.valueDeclaration = r.valueDeclaration), l.nameType && (f.links.nameType = l.nameType), f; + } + function mrt(r, a, l, f) { + const d = r.objectFlags & 4 || r.objectFlags & 8388608 ? r.node : r.symbol.declarations[0], y = yn(d), x = r.objectFlags & 4 ? y.resolvedType : r.objectFlags & 64 ? r.target : r; + let I = r.objectFlags & 134217728 ? r.outerTypeParameters : y.outerTypeParameters; + if (!I) { + let M = vE( + d, + /*includeThisTypes*/ + !0 + ); + if (Um(d)) { + const Y = XPe(d); + M = Nn(M, Y); + } + I = M || He; + const z = r.objectFlags & 8388612 ? [d] : r.symbol.declarations; + I = (x.objectFlags & 8388612 || x.symbol.flags & 8192 || x.symbol.flags & 2048) && !x.aliasTypeArguments ? kn(I, (Y) => at(z, (Se) => oM(Y, Se))) : I, y.outerTypeParameters = I; + } + if (I.length) { + const M = q2(r.mapper, a), z = gr(I, (dt) => dy(dt, M)), Y = l || r.aliasSymbol, Se = l ? f : mh(r.aliasTypeArguments, a), pe = (r.objectFlags & 134217728 ? "S" : "") + Yp(z) + Uk(Y, Se); + x.instantiations || (x.instantiations = /* @__PURE__ */ new Map(), x.instantiations.set(Yp(I) + Uk(x.aliasSymbol, x.aliasTypeArguments), x)); + let Ze = x.instantiations.get(pe); + if (!Ze) { + if (r.objectFlags & 134217728) + return Ze = n$(r, a), x.instantiations.set(pe, Ze), Ze; + const dt = B_(I, z); + Ze = x.objectFlags & 4 ? Afe(r.target, r.node, dt, Y, Se) : x.objectFlags & 32 ? hrt(x, dt, Y, Se) : n$(x, dt, Y, Se), x.instantiations.set(pe, Ze); + const ht = Cn(Ze); + if (Ze.flags & 3899393 && !(ht & 524288)) { + const or = at(z, U1); + Cn(Ze) & 524288 || (ht & 52 ? Ze.objectFlags |= 524288 | (or ? 1048576 : 0) : Ze.objectFlags |= or ? 0 : 524288); + } + } + return Ze; + } + return r; + } + function grt(r) { + return !(r.parent.kind === 183 && r.parent.typeArguments && r === r.parent.typeName || r.parent.kind === 205 && r.parent.typeArguments && r === r.parent.qualifier); + } + function oM(r, a) { + if (r.symbol && r.symbol.declarations && r.symbol.declarations.length === 1) { + const f = r.symbol.declarations[0].parent; + for (let d = a; d !== f; d = d.parent) + if (!d || d.kind === 241 || d.kind === 194 && ms(d.extendsType, l)) + return !0; + return l(a); + } + return !0; + function l(f) { + switch (f.kind) { + case 197: + return !!r.isThisType; + case 80: + return !r.isThisType && im(f) && grt(f) && iNe(f) === r; + // use worker because we're looking for === equality + case 186: + const d = f.exprName, y = w_(d); + if (!Xy(y)) { + const x = Nu(y), I = r.symbol.declarations[0], M = I.kind === 168 ? I.parent : ( + // Type parameter is a regular type parameter, e.g. foo + r.isThisType ? I : ( + // Type parameter is the this type, and its declaration is the class declaration. + void 0 + ) + ); + if (x.declarations && M) + return at(x.declarations, (z) => Lb(z, M)) || at(f.typeArguments, l); + } + return !0; + case 174: + case 173: + return !f.type && !!f.body || at(f.typeParameters, l) || at(f.parameters, l) || !!f.type && l(f.type); + } + return !!ms(f, l); + } + } + function W8(r) { + const a = Hf(r); + if (a.flags & 4194304) { + const l = l0(a.type); + if (l.flags & 262144) + return l; + } + } + function hrt(r, a, l, f) { + const d = W8(r); + if (d) { + const x = Bi(d, a); + if (d !== x) + return _Ae(md(x), y, l, f); + } + return Bi(Hf(r), a) === _t ? _t : n$(r, a, l, f); + function y(x) { + if (x.flags & 61603843 && x !== _t && !H(x)) { + if (!r.declaration.nameType) { + let I; + if (Tp(x) || x.flags & 1 && O1( + d, + 4 + /* ImmediateBaseConstraint */ + ) < 0 && (I = s_(d)) && J_(I, ob)) + return vrt(x, r, AT(d, x, a)); + if (ga(x)) + return yrt(x, r, d, a); + if (UPe(x)) + return ra(gr(x.types, y)); + } + return n$(r, AT(d, x, a)); + } + return x; + } + } + function cNe(r, a) { + return a & 1 ? !0 : a & 2 ? !1 : r; + } + function yrt(r, a, l, f) { + const d = r.target.elementFlags, y = r.target.fixedLength, x = y ? AT(l, r, f) : f, I = gr(z2(r), (Se, pe) => { + const Ze = d[pe]; + return pe < y ? lNe(a, x_("" + pe), !!(Ze & 2), x) : Ze & 8 ? Bi(a, AT(l, Se, f)) : gM(Bi(a, AT(l, mu(Se), f))) ?? ye; + }), M = Tg(a), z = M & 4 ? gr(d, (Se) => Se & 1 ? 2 : Se) : M & 8 ? gr(d, (Se) => Se & 2 ? 1 : Se) : d, Y = cNe(r.target.readonly, Tg(a)); + return as(I, We) ? We : Eg(I, z, Y, r.target.labeledElementDeclarations); + } + function vrt(r, a, l) { + const f = lNe( + a, + st, + /*isOptional*/ + !0, + l + ); + return H(f) ? We : mu(f, cNe($w(r), Tg(a))); + } + function lNe(r, a, l, f) { + const d = z8(f, Ud(r), a), y = Bi(s0(r.target || r), d), x = Tg(r); + return Z && x & 4 && !hc( + y, + 49152 + /* Void */ + ) ? gy( + y, + /*isProperty*/ + !0 + ) : Z && x & 8 && l ? xp( + y, + 524288 + /* NEUndefined */ + ) : y; + } + function n$(r, a, l, f) { + E.assert(r.symbol, "anonymous type must have symbol to be instantiated"); + const d = ce(r.objectFlags & -1572865 | 64, r.symbol); + if (r.objectFlags & 32) { + d.declaration = r.declaration; + const y = Ud(r), x = lpe(y); + d.typeParameter = x, a = q2(V2(y, x), a), x.mapper = a; + } + return r.objectFlags & 8388608 && (d.node = r.node), r.objectFlags & 134217728 && (d.outerTypeParameters = r.outerTypeParameters), d.target = r, d.mapper = a, d.aliasSymbol = l || r.aliasSymbol, d.aliasTypeArguments = l ? f : mh(r.aliasTypeArguments, a), d.objectFlags |= d.aliasTypeArguments ? QL(d.aliasTypeArguments) : 0, d; + } + function _pe(r, a, l, f, d) { + const y = r.root; + if (y.outerTypeParameters) { + const x = gr(y.outerTypeParameters, (z) => dy(z, a)), I = (l ? "C" : "") + Yp(x) + Uk(f, d); + let M = y.instantiations.get(I); + if (!M) { + const z = B_(y.outerTypeParameters, x), Y = y.checkType, Se = y.isDistributive ? md(dy(Y, z)) : void 0; + M = Se && Y !== Se && Se.flags & 1179648 ? _Ae(Se, (pe) => tpe(y, AT(Y, pe, z), l), f, d) : tpe(y, z, l, f, d), y.instantiations.set(I, M); + } + return M; + } + return r; + } + function Bi(r, a) { + return r && a ? uNe( + r, + a, + /*aliasSymbol*/ + void 0, + /*aliasTypeArguments*/ + void 0 + ) : r; + } + function uNe(r, a, l, f) { + var d; + if (!U1(r)) + return r; + if (S === 100 || h >= 5e6) + return (d = nn) == null || d.instant(nn.Phase.CheckTypes, "instantiateType_DepthLimit", { typeId: r.id, instantiationDepth: S, instantiationCount: h }), je(C, p.Type_instantiation_is_excessively_deep_and_possibly_infinite), We; + g++, h++, S++; + const y = brt(r, a, l, f); + return S--, y; + } + function brt(r, a, l, f) { + const d = r.flags; + if (d & 262144) + return dy(r, a); + if (d & 524288) { + const y = r.objectFlags; + if (y & 52) { + if (y & 4 && !r.node) { + const x = r.resolvedTypeArguments, I = mh(x, a); + return I !== x ? Vfe(r.target, I) : r; + } + return y & 1024 ? Srt(r, a) : mrt(r, a, l, f); + } + return r; + } + if (d & 3145728) { + const y = r.flags & 1048576 ? r.origin : void 0, x = y && y.flags & 3145728 ? y.types : r.types, I = mh(x, a); + if (I === x && l === r.aliasSymbol) + return r; + const M = l || r.aliasSymbol, z = l ? f : mh(r.aliasTypeArguments, a); + return d & 2097152 || y && y.flags & 2097152 ? ra(I, 0, M, z) : Qn(I, 1, M, z); + } + if (d & 4194304) + return Bm(Bi(r.type, a)); + if (d & 134217728) + return DT(r.texts, mh(r.types, a)); + if (d & 268435456) + return qk(r.symbol, Bi(r.type, a)); + if (d & 8388608) { + const y = l || r.aliasSymbol, x = l ? f : mh(r.aliasTypeArguments, a); + return j_( + Bi(r.objectType, a), + Bi(r.indexType, a), + r.accessFlags, + /*accessNode*/ + void 0, + y, + x + ); + } + if (d & 16777216) + return _pe( + r, + q2(r.mapper, a), + /*forConstraint*/ + !1, + l, + f + ); + if (d & 33554432) { + const y = Bi(r.baseType, a); + if (EE(r)) + return Ife(y); + const x = Bi(r.constraint, a); + return y.flags & 8650752 && sb(x) ? Ofe(y, x) : x.flags & 3 || Ls(IT(y), IT(x)) ? y : y.flags & 8650752 ? Ofe(y, x) : ra([x, y]); + } + return r; + } + function Srt(r, a) { + const l = Bi(r.mappedType, a); + if (!(Cn(l) & 32)) + return r; + const f = Bi(r.constraintType, a); + if (!(f.flags & 4194304)) + return r; + const d = WNe( + Bi(r.source, a), + l, + f + ); + return d || r; + } + function U8(r) { + return r.flags & 402915327 ? r : r.permissiveInstantiation || (r.permissiveInstantiation = Bi(r, kc)); + } + function IT(r) { + return r.flags & 402915327 ? r : (r.restrictiveInstantiation || (r.restrictiveInstantiation = Bi(r, Ns), r.restrictiveInstantiation.restrictiveInstantiation = r.restrictiveInstantiation), r.restrictiveInstantiation); + } + function Trt(r, a) { + return Cg(r.keyType, Bi(r.type, a), r.isReadonly, r.declaration); + } + function $f(r) { + switch (E.assert(r.kind !== 174 || Ip(r)), r.kind) { + case 218: + case 219: + case 174: + case 262: + return _Ne(r); + case 210: + return at(r.properties, $f); + case 209: + return at(r.elements, $f); + case 227: + return $f(r.whenTrue) || $f(r.whenFalse); + case 226: + return (r.operatorToken.kind === 57 || r.operatorToken.kind === 61) && ($f(r.left) || $f(r.right)); + case 303: + return $f(r.initializer); + case 217: + return $f(r.expression); + case 292: + return at(r.properties, $f) || Dd(r.parent) && at(r.parent.parent.children, $f); + case 291: { + const { initializer: a } = r; + return !!a && $f(a); + } + case 294: { + const { expression: a } = r; + return !!a && $f(a); + } + } + return !1; + } + function _Ne(r) { + return H5(r) || xrt(r); + } + function xrt(r) { + return r.typeParameters || pf(r) || !r.body ? !1 : r.body.kind !== 241 ? $f(r.body) : !!Hy(r.body, (a) => !!a.expression && $f(a.expression)); + } + function i$(r) { + return (Ky(r) || Ip(r)) && _Ne(r); + } + function fNe(r) { + if (r.flags & 524288) { + const a = Vd(r); + if (a.constructSignatures.length || a.callSignatures.length) { + const l = ce(16, r.symbol); + return l.members = a.members, l.properties = a.properties, l.callSignatures = He, l.constructSignatures = He, l.indexInfos = He, l; + } + } else if (r.flags & 2097152) + return ra(gr(r.types, fNe)); + return r; + } + function gh(r, a) { + return Jm(r, a, b_); + } + function V8(r, a) { + return Jm(r, a, b_) ? -1 : 0; + } + function fpe(r, a) { + return Jm(r, a, bf) ? -1 : 0; + } + function krt(r, a) { + return Jm(r, a, pg) ? -1 : 0; + } + function H2(r, a) { + return Jm(r, a, pg); + } + function cM(r, a) { + return Jm(r, a, Jf); + } + function Ls(r, a) { + return Jm(r, a, bf); + } + function ab(r, a) { + return r.flags & 1048576 ? Ri(r.types, (l) => ab(l, a)) : a.flags & 1048576 ? at(a.types, (l) => ab(r, l)) : r.flags & 2097152 ? at(r.types, (l) => ab(l, a)) : r.flags & 58982400 ? ab(iu(r) || ye, a) : Dg(a) ? !!(r.flags & 67633152) : a === Ml ? !!(r.flags & 67633152) && !Dg(r) : a === Rl ? !!(r.flags & 524288) && Hpe(r) : yE(r, xT(a)) || Tp(a) && !$w(a) && ab(r, Ti); + } + function s$(r, a) { + return Jm(r, a, L_); + } + function lM(r, a) { + return s$(r, a) || s$(a, r); + } + function gu(r, a, l, f, d, y) { + return Sp(r, a, bf, l, f, d, y); + } + function z1(r, a, l, f, d, y) { + return ppe( + r, + a, + bf, + l, + f, + d, + y, + /*errorOutputContainer*/ + void 0 + ); + } + function ppe(r, a, l, f, d, y, x, I) { + return Jm(r, a, l) ? !0 : !f || !q8(d, r, a, l, y, x, I) ? Sp(r, a, l, f, y, x, I) : !1; + } + function pNe(r) { + return !!(r.flags & 16777216 || r.flags & 2097152 && at(r.types, pNe)); + } + function q8(r, a, l, f, d, y, x) { + if (!r || pNe(l)) return !1; + if (!Sp( + a, + l, + f, + /*errorNode*/ + void 0 + ) && Crt(r, a, l, f, d, y, x)) + return !0; + switch (r.kind) { + case 234: + if (!LJ(r)) + break; + // fallthrough + case 294: + case 217: + return q8(r.expression, a, l, f, d, y, x); + case 226: + switch (r.operatorToken.kind) { + case 64: + case 28: + return q8(r.right, a, l, f, d, y, x); + } + break; + case 210: + return Frt(r, a, l, f, y, x); + case 209: + return Art(r, a, l, f, y, x); + case 292: + return Nrt(r, a, l, f, y, x); + case 219: + return Ert(r, a, l, f, y, x); + } + return !1; + } + function Crt(r, a, l, f, d, y, x) { + const I = Ps( + a, + 0 + /* Call */ + ), M = Ps( + a, + 1 + /* Construct */ + ); + for (const z of [M, I]) + if (at(z, (Y) => { + const Se = Ba(Y); + return !(Se.flags & 131073) && Sp( + Se, + l, + f, + /*errorNode*/ + void 0 + ); + })) { + const Y = x || {}; + gu(a, l, r, d, y, Y); + const Se = Y.errors[Y.errors.length - 1]; + return Bs( + Se, + tn( + r, + z === M ? p.Did_you_mean_to_use_new_with_this_expression : p.Did_you_mean_to_call_this_expression + ) + ), !0; + } + return !1; + } + function Ert(r, a, l, f, d, y) { + if (ks(r.body) || at(r.parameters, y7)) + return !1; + const x = zT(a); + if (!x) + return !1; + const I = Ps( + l, + 0 + /* Call */ + ); + if (!Ir(I)) + return !1; + const M = r.body, z = Ba(x), Y = Qn(gr(I, Ba)); + if (!Sp( + z, + Y, + f, + /*errorNode*/ + void 0 + )) { + const Se = M && q8( + M, + z, + Y, + f, + /*headMessage*/ + void 0, + d, + y + ); + if (Se) + return Se; + const pe = y || {}; + if (Sp( + z, + Y, + f, + M, + /*headMessage*/ + void 0, + d, + pe + ), pe.errors) + return l.symbol && Ir(l.symbol.declarations) && Bs( + pe.errors[pe.errors.length - 1], + tn( + l.symbol.declarations[0], + p.The_expected_type_comes_from_the_return_type_of_this_signature + ) + ), !(Oc(r) & 2) && !Pc(z, "then") && Sp( + qM(z), + Y, + f, + /*errorNode*/ + void 0 + ) && Bs( + pe.errors[pe.errors.length - 1], + tn( + r, + p.Did_you_mean_to_mark_this_function_as_async + ) + ), !0; + } + return !1; + } + function dNe(r, a, l) { + const f = j1(a, l); + if (f) + return f; + if (a.flags & 1048576) { + const d = TNe(r, a); + if (d) + return j1(d, l); + } + } + function mNe(r, a) { + NM( + r, + a, + /*isCache*/ + !1 + ); + const l = nP( + r, + 1 + /* Contextual */ + ); + return nI(), l; + } + function uM(r, a, l, f, d, y) { + let x = !1; + for (const I of r) { + const { errorNode: M, innerExpression: z, nameType: Y, errorMessage: Se } = I; + let pe = dNe(a, l, Y); + if (!pe || pe.flags & 8388608) continue; + let Ze = j1(a, Y); + if (!Ze) continue; + const dt = QG( + Y, + /*accessNode*/ + void 0 + ); + if (!Sp( + Ze, + pe, + f, + /*errorNode*/ + void 0 + )) { + const ht = z && q8( + z, + Ze, + pe, + f, + /*headMessage*/ + void 0, + d, + y + ); + if (x = !0, !ht) { + const or = y || {}, nr = z ? mNe(z, Ze) : Ze; + if (me && o$(nr, pe)) { + const Kr = tn(M, p.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target, $r(nr), $r(pe)); + Pa.add(Kr), or.errors = [Kr]; + } else { + const Kr = !!(dt && (Ys(l, dt) || Ve).flags & 16777216), Vr = !!(dt && (Ys(a, dt) || Ve).flags & 16777216); + pe = p0(pe, Kr), Ze = p0(Ze, Kr && Vr), Sp(nr, pe, f, M, Se, d, or) && nr !== Ze && Sp(Ze, pe, f, M, Se, d, or); + } + if (or.errors) { + const Kr = or.errors[or.errors.length - 1], Vr = ap(Y) ? op(Y) : void 0, cr = Vr !== void 0 ? Ys(l, Vr) : void 0; + let Yt = !1; + if (!cr) { + const pn = F8(l, Y); + pn && pn.declaration && !Cr(pn.declaration).hasNoDefaultLib && (Yt = !0, Bs(Kr, tn(pn.declaration, p.The_expected_type_comes_from_this_index_signature))); + } + if (!Yt && (cr && Ir(cr.declarations) || l.symbol && Ir(l.symbol.declarations))) { + const pn = cr && Ir(cr.declarations) ? cr.declarations[0] : l.symbol.declarations[0]; + Cr(pn).hasNoDefaultLib || Bs( + Kr, + tn( + pn, + p.The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1, + Vr && !(Y.flags & 8192) ? Pi(Vr) : $r(Y), + $r(l) + ) + ); + } + } + } + } + } + return x; + } + function Drt(r, a, l, f, d, y) { + const x = Jc(l, d$), I = Jc(l, (Y) => !d$(Y)), M = I !== Zt ? mme( + 13, + 0, + I, + /*errorNode*/ + void 0 + ) : void 0; + let z = !1; + for (let Y = r.next(); !Y.done; Y = r.next()) { + const { errorNode: Se, innerExpression: pe, nameType: Ze, errorMessage: dt } = Y.value; + let ht = M; + const or = x !== Zt ? dNe(a, x, Ze) : void 0; + if (or && !(or.flags & 8388608) && (ht = M ? Qn([M, or]) : or), !ht) continue; + let nr = j1(a, Ze); + if (!nr) continue; + const Kr = QG( + Ze, + /*accessNode*/ + void 0 + ); + if (!Sp( + nr, + ht, + f, + /*errorNode*/ + void 0 + )) { + const Vr = pe && q8( + pe, + nr, + ht, + f, + /*headMessage*/ + void 0, + d, + y + ); + if (z = !0, !Vr) { + const cr = y || {}, Yt = pe ? mNe(pe, nr) : nr; + if (me && o$(Yt, ht)) { + const pn = tn(Se, p.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target, $r(Yt), $r(ht)); + Pa.add(pn), cr.errors = [pn]; + } else { + const pn = !!(Kr && (Ys(x, Kr) || Ve).flags & 16777216), zn = !!(Kr && (Ys(a, Kr) || Ve).flags & 16777216); + ht = p0(ht, pn), nr = p0(nr, pn && zn), Sp(Yt, ht, f, Se, dt, d, cr) && Yt !== nr && Sp(nr, ht, f, Se, dt, d, cr); + } + } + } + } + return z; + } + function* wrt(r) { + if (Ir(r.properties)) + for (const a of r.properties) + $x(a) || mde(iN(a.name)) || (yield { errorNode: a.name, innerExpression: a.initializer, nameType: x_(iN(a.name)) }); + } + function* Prt(r, a) { + if (!Ir(r.children)) return; + let l = 0; + for (let f = 0; f < r.children.length; f++) { + const d = r.children[f], y = gd(f - l), x = gNe(d, y, a); + x ? yield x : l++; + } + } + function gNe(r, a, l) { + switch (r.kind) { + case 294: + return { errorNode: r, innerExpression: r.expression, nameType: a }; + case 12: + if (r.containsOnlyTriviaWhiteSpaces) + break; + return { errorNode: r, innerExpression: void 0, nameType: a, errorMessage: l() }; + case 284: + case 285: + case 288: + return { errorNode: r, innerExpression: r, nameType: a }; + default: + return E.assertNever(r, "Found invalid jsx child"); + } + } + function Nrt(r, a, l, f, d, y) { + let x = uM(wrt(r), a, l, f, d, y), I; + if (Dd(r.parent) && gm(r.parent.parent)) { + const z = r.parent.parent, Y = IM(BT(r)), Se = Y === void 0 ? "children" : Pi(Y), pe = x_(Se), Ze = j_(l, pe), dt = jC(z.children); + if (!Ir(dt)) + return x; + const ht = Ir(dt) > 1; + let or, nr; + if (XG( + /*reportErrors*/ + !1 + ) !== Oi) { + const Vr = E3e(Je); + or = Jc(Ze, (cr) => Ls(cr, Vr)), nr = Jc(Ze, (cr) => !Ls(cr, Vr)); + } else + or = Jc(Ze, d$), nr = Jc(Ze, (Vr) => !d$(Vr)); + if (ht) { + if (or !== Zt) { + const Vr = Eg(z$( + z, + 0 + /* Normal */ + )), cr = Prt(z, M); + x = Drt(cr, Vr, or, f, d, y) || x; + } else if (!Jm(j_(a, pe), Ze, f)) { + x = !0; + const Vr = je( + z.openingElement.tagName, + p.This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided, + Se, + $r(Ze) + ); + y && y.skipLogging && (y.errors || (y.errors = [])).push(Vr); + } + } else if (nr !== Zt) { + const Vr = dt[0], cr = gNe(Vr, pe, M); + cr && (x = uM( + function* () { + yield cr; + }(), + a, + l, + f, + d, + y + ) || x); + } else if (!Jm(j_(a, pe), Ze, f)) { + x = !0; + const Vr = je( + z.openingElement.tagName, + p.This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided, + Se, + $r(Ze) + ); + y && y.skipLogging && (y.errors || (y.errors = [])).push(Vr); + } + } + return x; + function M() { + if (!I) { + const z = qo(r.parent.tagName), Y = IM(BT(r)), Se = Y === void 0 ? "children" : Pi(Y), pe = j_(l, x_(Se)), Ze = p._0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2; + I = { ...Ze, key: "!!ALREADY FORMATTED!!", message: Dx(Ze, z, Se, $r(pe)) }; + } + return I; + } + } + function* hNe(r, a) { + const l = Ir(r.elements); + if (l) + for (let f = 0; f < l; f++) { + if (Xw(a) && !Ys(a, "" + f)) continue; + const d = r.elements[f]; + if (ul(d)) continue; + const y = gd(f), x = Q$(d); + yield { errorNode: x, innerExpression: x, nameType: y }; + } + } + function Art(r, a, l, f, d, y) { + if (l.flags & 402915324) return !1; + if (Xw(a)) + return uM(hNe(r, l), a, l, f, d, y); + NM( + r, + l, + /*isCache*/ + !1 + ); + const x = QAe( + r, + 1, + /*forceTuple*/ + !0 + ); + return nI(), Xw(x) ? uM(hNe(r, l), x, l, f, d, y) : !1; + } + function* Irt(r) { + if (Ir(r.properties)) + for (const a of r.properties) { + if (Zg(a)) continue; + const l = Vk( + dn(a), + 8576 + /* StringOrNumberLiteralOrUnique */ + ); + if (!(!l || l.flags & 131072)) + switch (a.kind) { + case 178: + case 177: + case 174: + case 304: + yield { errorNode: a.name, innerExpression: void 0, nameType: l }; + break; + case 303: + yield { errorNode: a.name, innerExpression: a.initializer, nameType: l, errorMessage: KP(a.name) ? p.Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1 : void 0 }; + break; + default: + E.assertNever(a); + } + } + } + function Frt(r, a, l, f, d, y) { + return l.flags & 402915324 ? !1 : uM(Irt(r), a, l, f, d, y); + } + function yNe(r, a, l, f, d) { + return Sp(r, a, L_, l, f, d); + } + function Ort(r, a, l) { + return dpe( + r, + a, + 4, + /*reportErrors*/ + !1, + /*errorReporter*/ + void 0, + /*incompatibleErrorReporter*/ + void 0, + fpe, + /*reportUnreliableMarkers*/ + void 0 + ) !== 0; + } + function a$(r) { + if (!r.typeParameters && (!r.thisParameter || Ua(WM(r.thisParameter))) && r.parameters.length === 1 && ku(r)) { + const a = WM(r.parameters[0]); + return !!((Tp(a) ? Po(a)[0] : a).flags & 131073 && Ba(r).flags & 3); + } + return !1; + } + function dpe(r, a, l, f, d, y, x, I) { + if (r === a || !(l & 16 && a$(r)) && a$(a)) + return -1; + if (l & 16 && a$(r) && !a$(a)) + return 0; + const M = z_(a); + if (!wg(a) && (l & 8 ? wg(r) || z_(r) > M : $d(r) > M)) + return f && !(l & 8) && d(p.Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1, $d(r), M), 0; + r.typeParameters && r.typeParameters !== a.typeParameters && (a = Iet(a), r = P8e( + r, + a, + /*inferenceContext*/ + void 0, + x + )); + const Y = z_(r), Se = uI(r), pe = uI(a); + (Se || pe) && Bi(Se || pe, I); + const Ze = a.declaration ? a.declaration.kind : 0, dt = !(l & 3) && J && Ze !== 174 && Ze !== 173 && Ze !== 176; + let ht = -1; + const or = ib(r); + if (or && or !== Pt) { + const Vr = ib(a); + if (Vr) { + const cr = !dt && x( + or, + Vr, + /*reportErrors*/ + !1 + ) || x(Vr, or, f); + if (!cr) + return f && d(p.The_this_types_of_each_signature_are_incompatible), 0; + ht &= cr; + } + } + const nr = Se || pe ? Math.min(Y, M) : Math.max(Y, M), Kr = Se || pe ? nr - 1 : -1; + for (let Vr = 0; Vr < nr; Vr++) { + const cr = Vr === Kr ? eIe(r, Vr) : Q2(r, Vr), Yt = Vr === Kr ? eIe(a, Vr) : Q2(a, Vr); + if (cr && Yt && (cr !== Yt || l & 8)) { + const pn = l & 3 || D8e(r, Vr) ? void 0 : zT(f0(cr)), zn = l & 3 || D8e(a, Vr) ? void 0 : zT(f0(Yt)); + let vn = pn && zn && !bp(pn) && !bp(zn) && NE( + cr, + 50331648 + /* IsUndefinedOrNull */ + ) === NE( + Yt, + 50331648 + /* IsUndefinedOrNull */ + ) ? dpe(zn, pn, l & 8 | (dt ? 2 : 1), f, d, y, x, I) : !(l & 3) && !dt && x( + cr, + Yt, + /*reportErrors*/ + !1 + ) || x(Yt, cr, f); + if (vn && l & 8 && Vr >= $d(r) && Vr < $d(a) && x( + cr, + Yt, + /*reportErrors*/ + !1 + ) && (vn = 0), !vn) + return f && d(p.Types_of_parameters_0_and_1_are_incompatible, Pi(eP(r, Vr)), Pi(eP(a, Vr))), 0; + ht &= vn; + } + } + if (!(l & 4)) { + const Vr = RG(a) ? Je : a.declaration && Um(a.declaration) ? S_(Oa(a.declaration.symbol)) : Ba(a); + if (Vr === Pt || Vr === Je) + return ht; + const cr = RG(r) ? Je : r.declaration && Um(r.declaration) ? S_(Oa(r.declaration.symbol)) : Ba(r), Yt = bp(a); + if (Yt) { + const pn = bp(r); + if (pn) + ht &= Lrt(pn, Yt, f, d, x); + else if (tK(Yt) || rK(Yt)) + return f && d(p.Signature_0_must_be_a_type_predicate, eb(r)), 0; + } else + ht &= l & 1 && x( + Vr, + cr, + /*reportErrors*/ + !1 + ) || x(cr, Vr, f), !ht && f && y && y(cr, Vr); + } + return ht; + } + function Lrt(r, a, l, f, d) { + if (r.kind !== a.kind) + return l && (f(p.A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard), f(p.Type_predicate_0_is_not_assignable_to_1, Lm(r), Lm(a))), 0; + if ((r.kind === 1 || r.kind === 3) && r.parameterIndex !== a.parameterIndex) + return l && (f(p.Parameter_0_is_not_in_the_same_position_as_parameter_1, r.parameterName, a.parameterName), f(p.Type_predicate_0_is_not_assignable_to_1, Lm(r), Lm(a))), 0; + const y = r.type === a.type ? -1 : r.type && a.type ? d(r.type, a.type, l) : 0; + return y === 0 && l && f(p.Type_predicate_0_is_not_assignable_to_1, Lm(r), Lm(a)), y; + } + function Mrt(r, a) { + const l = R8(r), f = R8(a), d = Ba(l), y = Ba(f); + return y === Pt || Jm(y, d, bf) || Jm(d, y, bf) ? Ort( + l, + f + ) : !1; + } + function mpe(r) { + return r !== qt && r.properties.length === 0 && r.callSignatures.length === 0 && r.constructSignatures.length === 0 && r.indexInfos.length === 0; + } + function u0(r) { + return r.flags & 524288 ? !T_(r) && mpe(Vd(r)) : r.flags & 67108864 ? !0 : r.flags & 1048576 ? at(r.types, u0) : r.flags & 2097152 ? Ri(r.types, u0) : !1; + } + function Dg(r) { + return !!(Cn(r) & 16 && (r.members && mpe(r) || r.symbol && r.symbol.flags & 2048 && Sg(r.symbol).size === 0)); + } + function Rrt(r) { + if (Z && r.flags & 1048576) { + if (!(r.objectFlags & 33554432)) { + const a = r.types; + r.objectFlags |= 33554432 | (a.length >= 3 && a[0].flags & 32768 && a[1].flags & 65536 && at(a, Dg) ? 67108864 : 0); + } + return !!(r.objectFlags & 67108864); + } + return !1; + } + function PE(r) { + return !!((r.flags & 1048576 ? r.types[0] : r).flags & 32768); + } + function jrt(r) { + const a = r.flags & 1048576 ? r.types[0] : r; + return !!(a.flags & 32768) && a !== L; + } + function vNe(r) { + return r.flags & 524288 && !T_(r) && qa(r).length === 0 && du(r).length === 1 && !!ph(r, de) || r.flags & 3145728 && Ri(r.types, vNe) || !1; + } + function gpe(r, a, l) { + const f = r.flags & 8 ? af(r) : r, d = a.flags & 8 ? af(a) : a; + if (f === d) + return !0; + if (f.escapedName !== d.escapedName || !(f.flags & 256) || !(d.flags & 256)) + return !1; + const y = Zs(f) + "," + Zs(d), x = zv.get(y); + if (x !== void 0 && !(x & 2 && l)) + return !!(x & 1); + const I = en(d); + for (const M of qa(en(f))) + if (M.flags & 8) { + const z = Ys(I, M.escapedName); + if (!z || !(z.flags & 8)) + return l && l(p.Property_0_is_missing_in_type_1, _c(M), $r( + ko(d), + /*enclosingDeclaration*/ + void 0, + 64 + /* UseFullyQualifiedType */ + )), zv.set( + y, + 2 + /* Failed */ + ), !1; + const Y = UT(Lo( + M, + 306 + /* EnumMember */ + )).value, Se = UT(Lo( + z, + 306 + /* EnumMember */ + )).value; + if (Y !== Se) { + const pe = typeof Y == "string", Ze = typeof Se == "string"; + if (Y !== void 0 && Se !== void 0) { + if (l) { + const dt = pe ? `"${rg(Y)}"` : Y, ht = Ze ? `"${rg(Se)}"` : Se; + l(p.Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given, _c(d), _c(z), ht, dt); + } + return zv.set( + y, + 2 + /* Failed */ + ), !1; + } + if (pe || Ze) { + if (l) { + const dt = Y ?? Se; + E.assert(typeof dt == "string"); + const ht = `"${rg(dt)}"`; + l(p.One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value, _c(d), _c(z), ht); + } + return zv.set( + y, + 2 + /* Failed */ + ), !1; + } + } + } + return zv.set( + y, + 1 + /* Succeeded */ + ), !0; + } + function H8(r, a, l, f) { + const d = r.flags, y = a.flags; + return y & 1 || d & 131072 || r === _t || y & 2 && !(l === Jf && d & 1) ? !0 : y & 131072 ? !1 : !!(d & 402653316 && y & 4 || d & 128 && d & 1024 && y & 128 && !(y & 1024) && r.value === a.value || d & 296 && y & 8 || d & 256 && d & 1024 && y & 256 && !(y & 1024) && r.value === a.value || d & 2112 && y & 64 || d & 528 && y & 16 || d & 12288 && y & 4096 || d & 32 && y & 32 && r.symbol.escapedName === a.symbol.escapedName && gpe(r.symbol, a.symbol, f) || d & 1024 && y & 1024 && (d & 1048576 && y & 1048576 && gpe(r.symbol, a.symbol, f) || d & 2944 && y & 2944 && r.value === a.value && gpe(r.symbol, a.symbol, f)) || d & 32768 && (!Z && !(y & 3145728) || y & 49152) || d & 65536 && (!Z && !(y & 3145728) || y & 65536) || d & 524288 && y & 67108864 && !(l === Jf && Dg(r) && !(Cn(r) & 8192)) || (l === bf || l === L_) && (d & 1 || d & 8 && (y & 32 || y & 256 && y & 1024) || d & 256 && !(d & 1024) && (y & 32 || y & 256 && y & 1024 && r.value === a.value) || Rrt(a))); + } + function Jm(r, a, l) { + if (U2(r) && (r = r.regularType), U2(a) && (a = a.regularType), r === a) + return !0; + if (l !== b_) { + if (l === L_ && !(a.flags & 131072) && H8(a, r, l) || H8(r, a, l)) + return !0; + } else if (!((r.flags | a.flags) & 61865984)) { + if (r.flags !== a.flags) return !1; + if (r.flags & 67358815) return !0; + } + if (r.flags & 524288 && a.flags & 524288) { + const f = l.get(u$( + r, + a, + 0, + l, + /*ignoreConstraints*/ + !1 + )); + if (f !== void 0) + return !!(f & 1); + } + return r.flags & 469499904 || a.flags & 469499904 ? Sp( + r, + a, + l, + /*errorNode*/ + void 0 + ) : !1; + } + function bNe(r, a) { + return Cn(r) & 2048 && mde(a.escapedName); + } + function _M(r, a) { + for (; ; ) { + const l = U2(r) ? r.regularType : W1(r) ? zrt(r, a) : Cn(r) & 4 ? r.node ? a0(r.target, Po(r)) : kpe(r) || r : r.flags & 3145728 ? Brt(r, a) : r.flags & 33554432 ? a ? r.baseType : Lfe(r) : r.flags & 25165824 ? c0(r, a) : r; + if (l === r) return l; + r = l; + } + } + function Brt(r, a) { + const l = md(r); + if (l !== r) + return l; + if (r.flags & 2097152 && Jrt(r)) { + const f = Wc(r.types, (d) => _M(d, a)); + if (f !== r.types) + return ra(f); + } + return r; + } + function Jrt(r) { + let a = !1, l = !1; + for (const f of r.types) + if (a || (a = !!(f.flags & 465829888)), l || (l = !!(f.flags & 98304) || Dg(f)), a && l) return !0; + return !1; + } + function zrt(r, a) { + const l = z2(r), f = Wc(l, (d) => d.flags & 25165824 ? c0(d, a) : d); + return l !== f ? qfe(r.target, f) : r; + } + function Sp(r, a, l, f, d, y, x) { + var I; + let M, z, Y, Se, pe, Ze, dt = 0, ht = 0, or = 0, nr = 0, Kr = !1, Vr = 0, cr = 0, Yt, pn, zn = 16e6 - l.size >> 3; + E.assert(l !== b_ || !f, "no error reporting in identity checking"); + const ci = Zr( + r, + a, + 3, + /*reportErrors*/ + !!f, + d + ); + if (pn && No(), Kr) { + const ze = u$( + r, + a, + /*intersectionState*/ + 0, + l, + /*ignoreConstraints*/ + !1 + ); + l.set(ze, 2 | (zn <= 0 ? 32 : 64)), (I = nn) == null || I.instant(nn.Phase.CheckTypes, "checkTypeRelatedTo_DepthLimit", { sourceId: r.id, targetId: a.id, depth: ht, targetDepth: or }); + const nt = zn <= 0 ? p.Excessive_complexity_comparing_types_0_and_1 : p.Excessive_stack_depth_comparing_types_0_and_1, Ut = je(f || C, nt, $r(r), $r(a)); + x && (x.errors || (x.errors = [])).push(Ut); + } else if (M) { + if (y) { + const Ut = y(); + Ut && (oee(Ut, M), M = Ut); + } + let ze; + if (d && f && !ci && r.symbol) { + const Ut = Ci(r.symbol); + if (Ut.originatingImport && !_f(Ut.originatingImport) && Sp( + en(Ut.target), + a, + l, + /*errorNode*/ + void 0 + )) { + const $t = tn(Ut.originatingImport, p.Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead); + ze = Pr(ze, $t); + } + } + const nt = Jg(Cr(f), f, M, ze); + z && Bs(nt, ...z), x && (x.errors || (x.errors = [])).push(nt), (!x || !x.skipLogging) && Pa.add(nt); + } + return f && x && x.skipLogging && ci === 0 && E.assert(!!x.errors, "missed opportunity to interact with error."), ci !== 0; + function vn(ze) { + M = ze.errorInfo, Yt = ze.lastSkippedInfo, pn = ze.incompatibleStack, Vr = ze.overrideNextErrorInfo, cr = ze.skipParentCounter, z = ze.relatedInfo; + } + function Ts() { + return { + errorInfo: M, + lastSkippedInfo: Yt, + incompatibleStack: pn?.slice(), + overrideNextErrorInfo: Vr, + skipParentCounter: cr, + relatedInfo: z?.slice() + }; + } + function bs(ze, ...nt) { + Vr++, Yt = void 0, (pn || (pn = [])).push([ze, ...nt]); + } + function No() { + const ze = pn || []; + pn = void 0; + const nt = Yt; + if (Yt = void 0, ze.length === 1) { + ns(...ze[0]), nt && kl( + /*message*/ + void 0, + ...nt + ); + return; + } + let Ut = ""; + const pt = []; + for (; ze.length; ) { + const [$t, ...It] = ze.pop(); + switch ($t.code) { + case p.Types_of_property_0_are_incompatible.code: { + Ut.indexOf("new ") === 0 && (Ut = `(${Ut})`); + const ar = "" + It[0]; + Ut.length === 0 ? Ut = `${ar}` : E_(ar, pa(F)) ? Ut = `${Ut}.${ar}` : ar[0] === "[" && ar[ar.length - 1] === "]" ? Ut = `${Ut}${ar}` : Ut = `${Ut}[${ar}]`; + break; + } + case p.Call_signature_return_types_0_and_1_are_incompatible.code: + case p.Construct_signature_return_types_0_and_1_are_incompatible.code: + case p.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code: + case p.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code: { + if (Ut.length === 0) { + let ar = $t; + $t.code === p.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code ? ar = p.Call_signature_return_types_0_and_1_are_incompatible : $t.code === p.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code && (ar = p.Construct_signature_return_types_0_and_1_are_incompatible), pt.unshift([ar, It[0], It[1]]); + } else { + const ar = $t.code === p.Construct_signature_return_types_0_and_1_are_incompatible.code || $t.code === p.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code ? "new " : "", zr = $t.code === p.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code || $t.code === p.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code ? "" : "..."; + Ut = `${ar}${Ut}(${zr})`; + } + break; + } + case p.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target.code: { + pt.unshift([p.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target, It[0], It[1]]); + break; + } + case p.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target.code: { + pt.unshift([p.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target, It[0], It[1], It[2]]); + break; + } + default: + return E.fail(`Unhandled Diagnostic: ${$t.code}`); + } + } + Ut ? ns( + Ut[Ut.length - 1] === ")" ? p.The_types_returned_by_0_are_incompatible_between_these_types : p.The_types_of_0_are_incompatible_between_these_types, + Ut + ) : pt.shift(); + for (const [$t, ...It] of pt) { + const ar = $t.elidedInCompatabilityPyramid; + $t.elidedInCompatabilityPyramid = !1, ns($t, ...It), $t.elidedInCompatabilityPyramid = ar; + } + nt && kl( + /*message*/ + void 0, + ...nt + ); + } + function ns(ze, ...nt) { + E.assert(!!f), pn && No(), !ze.elidedInCompatabilityPyramid && (cr === 0 ? M = fs(M, ze, ...nt) : cr--); + } + function xl(ze, ...nt) { + ns(ze, ...nt), cr++; + } + function Ko(ze) { + E.assert(!!M), z ? z.push(ze) : z = [ze]; + } + function kl(ze, nt, Ut) { + pn && No(); + const [pt, $t] = Ow(nt, Ut); + let It = nt, ar = pt; + if (!(Ut.flags & 131072) && G8(nt) && !hpe(Ut) && (It = _0(nt), E.assert(!Ls(It, Ut), "generalized source shouldn't be assignable"), ar = fE(It)), (Ut.flags & 8388608 && !(nt.flags & 8388608) ? Ut.objectType.flags : Ut.flags) & 262144 && Ut !== G && Ut !== rt) { + const Un = iu(Ut); + let si; + Un && (Ls(It, Un) || (si = Ls(nt, Un))) ? ns( + p._0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2, + si ? pt : ar, + $t, + $r(Un) + ) : (M = void 0, ns( + p._0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1, + $t, + ar + )); + } + if (ze) + ze === p.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1 && me && SNe(nt, Ut).length && (ze = p.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties); + else if (l === L_) + ze = p.Type_0_is_not_comparable_to_type_1; + else if (pt === $t) + ze = p.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated; + else if (me && SNe(nt, Ut).length) + ze = p.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties; + else { + if (nt.flags & 128 && Ut.flags & 1048576) { + const Un = eat(nt, Ut); + if (Un) { + ns(p.Type_0_is_not_assignable_to_type_1_Did_you_mean_2, ar, $t, $r(Un)); + return; + } + } + ze = p.Type_0_is_not_assignable_to_type_1; + } + ns(ze, ar, $t); + } + function Sr(ze, nt) { + const Ut = I1(ze.symbol) ? $r(ze, ze.symbol.valueDeclaration) : $r(ze), pt = I1(nt.symbol) ? $r(nt, nt.symbol.valueDeclaration) : $r(nt); + (Sa === ze && de === nt || to === ze && st === nt || Do === ze && ut === nt || v3e() === ze && Mt === nt) && ns(p._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible, pt, Ut); + } + function Mr(ze, nt, Ut) { + return ga(ze) ? ze.target.readonly && mM(nt) ? (Ut && ns(p.The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1, $r(ze), $r(nt)), !1) : ob(nt) : $w(ze) && mM(nt) ? (Ut && ns(p.The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1, $r(ze), $r(nt)), !1) : ga(nt) ? Tp(ze) : !0; + } + function vi(ze, nt, Ut) { + return Zr(ze, nt, 3, Ut); + } + function Zr(ze, nt, Ut = 3, pt = !1, $t, It = 0) { + if (ze === nt) return -1; + if (ze.flags & 524288 && nt.flags & 402784252) + return l === L_ && !(nt.flags & 131072) && H8(nt, ze, l) || H8(ze, nt, l, pt ? ns : void 0) ? -1 : (pt && ts(ze, nt, ze, nt, $t), 0); + const ar = _M( + ze, + /*writing*/ + !1 + ); + let zr = _M( + nt, + /*writing*/ + !0 + ); + if (ar === zr) return -1; + if (l === b_) + return ar.flags !== zr.flags ? 0 : ar.flags & 67358815 ? -1 : (Da(ar, zr), pb( + ar, + zr, + /*reportErrors*/ + !1, + 0, + Ut + )); + if (ar.flags & 262144 && kT(ar) === zr) + return -1; + if (ar.flags & 470302716 && zr.flags & 1048576) { + const Un = zr.types, si = Un.length === 2 && Un[0].flags & 98304 ? Un[1] : Un.length === 3 && Un[0].flags & 98304 && Un[1].flags & 98304 ? Un[2] : void 0; + if (si && !(si.flags & 98304) && (zr = _M( + si, + /*writing*/ + !0 + ), ar === zr)) + return -1; + } + if (l === L_ && !(zr.flags & 131072) && H8(zr, ar, l) || H8(ar, zr, l, pt ? ns : void 0)) return -1; + if (ar.flags & 469499904 || zr.flags & 469499904) { + if (!(It & 2) && hy(ar) && Cn(ar) & 8192 && zc(ar, zr, pt)) + return pt && kl($t, ar, nt.aliasSymbol ? nt : zr), 0; + const si = (l !== L_ || qd(ar)) && !(It & 2) && ar.flags & 405405692 && ar !== Ml && zr.flags & 2621440 && vpe(zr) && (qa(ar).length > 0 || xX(ar)), Mi = !!(Cn(ar) & 2048); + if (si && !Urt(ar, zr, Mi)) { + if (pt) { + const Hi = $r(ze.aliasSymbol ? ze : ar), ys = $r(nt.aliasSymbol ? nt : zr), wa = Ps( + ar, + 0 + /* Call */ + ), sa = Ps( + ar, + 1 + /* Construct */ + ); + wa.length > 0 && Zr( + Ba(wa[0]), + zr, + 1, + /*reportErrors*/ + !1 + ) || sa.length > 0 && Zr( + Ba(sa[0]), + zr, + 1, + /*reportErrors*/ + !1 + ) ? ns(p.Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it, Hi, ys) : ns(p.Type_0_has_no_properties_in_common_with_type_1, Hi, ys); + } + return 0; + } + Da(ar, zr); + const In = ar.flags & 1048576 && ar.types.length < 4 && !(zr.flags & 1048576) || zr.flags & 1048576 && zr.types.length < 4 && !(ar.flags & 469499904) ? k_(ar, zr, pt, It) : pb(ar, zr, pt, It, Ut); + if (In) + return In; + } + return pt && ts(ze, nt, ar, zr, $t), 0; + } + function ts(ze, nt, Ut, pt, $t) { + var It, ar; + const zr = !!kpe(ze), Un = !!kpe(nt); + Ut = ze.aliasSymbol || zr ? ze : Ut, pt = nt.aliasSymbol || Un ? nt : pt; + let si = Vr > 0; + if (si && Vr--, Ut.flags & 524288 && pt.flags & 524288) { + const Mi = M; + Mr( + Ut, + pt, + /*reportErrors*/ + !0 + ), M !== Mi && (si = !!M); + } + if (Ut.flags & 524288 && pt.flags & 402784252) + Sr(Ut, pt); + else if (Ut.symbol && Ut.flags & 524288 && Ml === Ut) + ns(p.The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead); + else if (Cn(Ut) & 2048 && pt.flags & 2097152) { + const Mi = pt.types, Jn = X2(Ff.IntrinsicAttributes, f), In = X2(Ff.IntrinsicClassAttributes, f); + if (!H(Jn) && !H(In) && (as(Mi, Jn) || as(Mi, In))) + return; + } else + M = kfe(M, nt); + if (!$t && si) { + const Mi = Ts(); + kl($t, Ut, pt); + let Jn; + M && M !== Mi.errorInfo && (Jn = { code: M.code, messageText: M.messageText }), vn(Mi), Jn && M && (M.canonicalHead = Jn), Yt = [Ut, pt]; + return; + } + if (kl($t, Ut, pt), Ut.flags & 262144 && ((ar = (It = Ut.symbol) == null ? void 0 : It.declarations) != null && ar[0]) && !kT(Ut)) { + const Mi = lpe(Ut); + if (Mi.constraint = Bi(pt, V2(Ut, Mi)), GL(Mi)) { + const Jn = $r(pt, Ut.symbol.declarations[0]); + Ko(tn(Ut.symbol.declarations[0], p.This_type_parameter_might_need_an_extends_0_constraint, Jn)); + } + } + } + function Da(ze, nt) { + if (nn && ze.flags & 3145728 && nt.flags & 3145728) { + const Ut = ze, pt = nt; + if (Ut.objectFlags & pt.objectFlags & 32768) + return; + const $t = Ut.types.length, It = pt.types.length; + $t * It > 1e6 && nn.instant(nn.Phase.CheckTypes, "traceUnionsOrIntersectionsTooLarge_DepthLimit", { + sourceId: ze.id, + sourceSize: $t, + targetId: nt.id, + targetSize: It, + pos: f?.pos, + end: f?.end + }); + } + } + function ho(ze, nt) { + return Qn(qu( + ze, + (pt, $t) => { + var It; + $t = Uu($t); + const ar = $t.flags & 3145728 ? $L($t, nt) : R2($t, nt), zr = ar && en(ar) || ((It = Wk($t, nt)) == null ? void 0 : It.type) || ft; + return Pr(pt, zr); + }, + /*initial*/ + void 0 + ) || He); + } + function zc(ze, nt, Ut) { + var pt; + if (!aI(nt) || !le && Cn(nt) & 4096) + return !1; + const $t = !!(Cn(ze) & 2048); + if ((l === bf || l === L_) && (Zw(Ml, nt) || !$t && u0(nt))) + return !1; + let It = nt, ar; + nt.flags & 1048576 && (It = K7e(ze, nt, Zr) || oft(nt), ar = It.flags & 1048576 ? It.types : [It]); + for (const zr of qa(ze)) + if (Ta(zr, ze.symbol) && !bNe(ze, zr)) { + if (!V$(It, zr.escapedName, $t)) { + if (Ut) { + const Un = Jc(It, aI); + if (!f) return E.fail(); + if (e2(f) || bu(f) || bu(f.parent)) { + zr.valueDeclaration && hm(zr.valueDeclaration) && Cr(f) === Cr(zr.valueDeclaration.name) && (f = zr.valueDeclaration.name); + const si = Ui(zr), Mi = v8e(si, Un), Jn = Mi ? Ui(Mi) : void 0; + Jn ? ns(p.Property_0_does_not_exist_on_type_1_Did_you_mean_2, si, $r(Un), Jn) : ns(p.Property_0_does_not_exist_on_type_1, si, $r(Un)); + } else { + const si = ((pt = ze.symbol) == null ? void 0 : pt.declarations) && Uc(ze.symbol.declarations); + let Mi; + if (zr.valueDeclaration && ur(zr.valueDeclaration, (Jn) => Jn === si) && Cr(si) === Cr(f)) { + const Jn = zr.valueDeclaration; + E.assertNode(Jn, Eh); + const In = Jn.name; + f = In, Me(In) && (Mi = b8e(In, Un)); + } + Mi !== void 0 ? xl(p.Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2, Ui(zr), $r(Un), Mi) : xl(p.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, Ui(zr), $r(Un)); + } + } + return !0; + } + if (ar && !Zr(en(zr), ho(ar, zr.escapedName), 3, Ut)) + return Ut && bs(p.Types_of_property_0_are_incompatible, Ui(zr)), !0; + } + return !1; + } + function Ta(ze, nt) { + return ze.valueDeclaration && nt.valueDeclaration && ze.valueDeclaration.parent === nt.valueDeclaration; + } + function k_(ze, nt, Ut, pt) { + if (ze.flags & 1048576) { + if (nt.flags & 1048576) { + const $t = ze.origin; + if ($t && $t.flags & 2097152 && nt.aliasSymbol && as($t.types, nt)) + return -1; + const It = nt.origin; + if (It && It.flags & 1048576 && ze.aliasSymbol && as(It.types, ze)) + return -1; + } + return l === L_ ? yc(ze, nt, Ut && !(ze.flags & 402784252), pt) : by(ze, nt, Ut && !(ze.flags & 402784252), pt); + } + if (nt.flags & 1048576) + return $o(Q8(ze), nt, Ut && !(ze.flags & 402784252) && !(nt.flags & 402784252), pt); + if (nt.flags & 2097152) + return Tf( + ze, + nt, + Ut, + 2 + /* Target */ + ); + if (l === L_ && nt.flags & 402784252) { + const $t = Wc(ze.types, (It) => It.flags & 465829888 ? iu(It) || ye : It); + if ($t !== ze.types) { + if (ze = ra($t), ze.flags & 131072) + return 0; + if (!(ze.flags & 2097152)) + return Zr( + ze, + nt, + 1, + /*reportErrors*/ + !1 + ) || Zr( + nt, + ze, + 1, + /*reportErrors*/ + !1 + ); + } + } + return yc( + ze, + nt, + /*reportErrors*/ + !1, + 1 + /* Source */ + ); + } + function Nc(ze, nt) { + let Ut = -1; + const pt = ze.types; + for (const $t of pt) { + const It = $o( + $t, + nt, + /*reportErrors*/ + !1, + 0 + /* None */ + ); + if (!It) + return 0; + Ut &= It; + } + return Ut; + } + function $o(ze, nt, Ut, pt) { + const $t = nt.types; + if (nt.flags & 1048576) { + if (dh($t, ze)) + return -1; + if (l !== L_ && Cn(nt) & 32768 && !(ze.flags & 1024) && (ze.flags & 2688 || (l === pg || l === Jf) && ze.flags & 256)) { + const ar = ze === ze.regularType ? ze.freshType : ze.regularType, zr = ze.flags & 128 ? de : ze.flags & 256 ? st : ze.flags & 2048 ? Gt : void 0; + return zr && dh($t, zr) || ar && dh($t, ar) ? -1 : 0; + } + const It = ZNe(nt, ze); + if (It) { + const ar = Zr( + ze, + It, + 2, + /*reportErrors*/ + !1, + /*headMessage*/ + void 0, + pt + ); + if (ar) + return ar; + } + } + for (const It of $t) { + const ar = Zr( + ze, + It, + 2, + /*reportErrors*/ + !1, + /*headMessage*/ + void 0, + pt + ); + if (ar) + return ar; + } + if (Ut) { + const It = TNe(ze, nt, Zr); + It && Zr( + ze, + It, + 2, + /*reportErrors*/ + !0, + /*headMessage*/ + void 0, + pt + ); + } + return 0; + } + function Tf(ze, nt, Ut, pt) { + let $t = -1; + const It = nt.types; + for (const ar of It) { + const zr = Zr( + ze, + ar, + 2, + Ut, + /*headMessage*/ + void 0, + pt + ); + if (!zr) + return 0; + $t &= zr; + } + return $t; + } + function yc(ze, nt, Ut, pt) { + const $t = ze.types; + if (ze.flags & 1048576 && dh($t, nt)) + return -1; + const It = $t.length; + for (let ar = 0; ar < It; ar++) { + const zr = Zr( + $t[ar], + nt, + 1, + Ut && ar === It - 1, + /*headMessage*/ + void 0, + pt + ); + if (zr) + return zr; + } + return 0; + } + function Ac(ze, nt) { + return ze.flags & 1048576 && nt.flags & 1048576 && !(ze.types[0].flags & 32768) && nt.types[0].flags & 32768 ? Kw( + nt, + -32769 + /* Undefined */ + ) : nt; + } + function by(ze, nt, Ut, pt) { + let $t = -1; + const It = ze.types, ar = Ac(ze, nt); + for (let zr = 0; zr < It.length; zr++) { + const Un = It[zr]; + if (ar.flags & 1048576 && It.length >= ar.types.length && It.length % ar.types.length === 0) { + const Mi = Zr( + Un, + ar.types[zr % ar.types.length], + 3, + /*reportErrors*/ + !1, + /*headMessage*/ + void 0, + pt + ); + if (Mi) { + $t &= Mi; + continue; + } + } + const si = Zr( + Un, + nt, + 1, + Ut, + /*headMessage*/ + void 0, + pt + ); + if (!si) + return 0; + $t &= si; + } + return $t; + } + function JE(ze = He, nt = He, Ut = He, pt, $t) { + if (ze.length !== nt.length && l === b_) + return 0; + const It = ze.length <= nt.length ? ze.length : nt.length; + let ar = -1; + for (let zr = 0; zr < It; zr++) { + const Un = zr < Ut.length ? Ut[zr] : 1, si = Un & 7; + if (si !== 4) { + const Mi = ze[zr], Jn = nt[zr]; + let In = -1; + if (Un & 8 ? In = l === b_ ? Zr( + Mi, + Jn, + 3, + /*reportErrors*/ + !1 + ) : V8(Mi, Jn) : si === 1 ? In = Zr( + Mi, + Jn, + 3, + pt, + /*headMessage*/ + void 0, + $t + ) : si === 2 ? In = Zr( + Jn, + Mi, + 3, + pt, + /*headMessage*/ + void 0, + $t + ) : si === 3 ? (In = Zr( + Jn, + Mi, + 3, + /*reportErrors*/ + !1 + ), In || (In = Zr( + Mi, + Jn, + 3, + pt, + /*headMessage*/ + void 0, + $t + ))) : (In = Zr( + Mi, + Jn, + 3, + pt, + /*headMessage*/ + void 0, + $t + ), In && (In &= Zr( + Jn, + Mi, + 3, + pt, + /*headMessage*/ + void 0, + $t + ))), !In) + return 0; + ar &= In; + } + } + return ar; + } + function pb(ze, nt, Ut, pt, $t) { + var It, ar, zr; + if (Kr) + return 0; + const Un = u$( + ze, + nt, + pt, + l, + /*ignoreConstraints*/ + !1 + ), si = l.get(Un); + if (si !== void 0 && !(Ut && si & 2 && !(si & 96))) { + if (ri) { + const sa = si & 24; + sa & 8 && Bi(ze, eu), sa & 16 && Bi(ze, zs); + } + if (Ut && si & 96) { + const sa = si & 32 ? p.Excessive_complexity_comparing_types_0_and_1 : p.Excessive_stack_depth_comparing_types_0_and_1; + ns(sa, $r(ze), $r(nt)), Vr++; + } + return si & 1 ? -1 : 0; + } + if (zn <= 0) + return Kr = !0, 0; + if (!Y) + Y = [], Se = /* @__PURE__ */ new Set(), pe = [], Ze = []; + else { + if (Se.has(Un)) + return 3; + const sa = Un.startsWith("*") ? u$( + ze, + nt, + pt, + l, + /*ignoreConstraints*/ + !0 + ) : void 0; + if (sa && Se.has(sa)) + return 3; + if (ht === 100 || or === 100) + return Kr = !0, 0; + } + const Mi = dt; + Y[dt] = Un, Se.add(Un), dt++; + const Jn = nr; + $t & 1 && (pe[ht] = ze, ht++, !(nr & 1) && Qk(ze, pe, ht) && (nr |= 1)), $t & 2 && (Ze[or] = nt, or++, !(nr & 2) && Qk(nt, Ze, or) && (nr |= 2)); + let In, Hi = 0; + ri && (In = ri, ri = (sa) => (Hi |= sa ? 16 : 8, In(sa))); + let ys; + return nr === 3 ? ((It = nn) == null || It.instant(nn.Phase.CheckTypes, "recursiveTypeRelatedTo_DepthLimit", { + sourceId: ze.id, + sourceIdStack: pe.map((sa) => sa.id), + targetId: nt.id, + targetIdStack: Ze.map((sa) => sa.id), + depth: ht, + targetDepth: or + }), ys = 3) : ((ar = nn) == null || ar.push(nn.Phase.CheckTypes, "structuredTypeRelatedTo", { sourceId: ze.id, targetId: nt.id }), ys = EI(ze, nt, Ut, pt), (zr = nn) == null || zr.pop()), ri && (ri = In), $t & 1 && ht--, $t & 2 && or--, nr = Jn, ys ? (ys === -1 || ht === 0 && or === 0) && wa( + ys === -1 || ys === 3 + ) : (l.set(Un, 2 | Hi), zn--, wa( + /*markAllAsSucceeded*/ + !1 + )), ys; + function wa(sa) { + for (let Ic = Mi; Ic < dt; Ic++) + Se.delete(Y[Ic]), sa && (l.set(Y[Ic], 1 | Hi), zn--); + dt = Mi; + } + } + function EI(ze, nt, Ut, pt) { + const $t = Ts(); + let It = DI(ze, nt, Ut, pt, $t); + if (l !== b_) { + if (!It && (ze.flags & 2097152 || ze.flags & 262144 && nt.flags & 1048576)) { + const ar = det(ze.flags & 2097152 ? ze.types : [ze], !!(nt.flags & 1048576)); + ar && J_(ar, (zr) => zr !== ze) && (It = Zr( + ar, + nt, + 1, + /*reportErrors*/ + !1, + /*headMessage*/ + void 0, + pt + )); + } + It && !(pt & 2) && nt.flags & 2097152 && !PT(nt) && ze.flags & 2621440 ? (It &= se( + ze, + nt, + Ut, + /*excludedProperties*/ + void 0, + /*optionalsOnly*/ + !1, + 0 + /* None */ + ), It && hy(ze) && Cn(ze) & 8192 && (It &= ha( + ze, + nt, + /*sourceIsPrimitive*/ + !1, + Ut, + 0 + /* None */ + ))) : It && ZG(nt) && !ob(nt) && ze.flags & 2097152 && Uu(ze).flags & 3670016 && !at(ze.types, (ar) => ar === nt || !!(Cn(ar) & 262144)) && (It &= se( + ze, + nt, + Ut, + /*excludedProperties*/ + void 0, + /*optionalsOnly*/ + !0, + pt + )); + } + return It && vn($t), It; + } + function xf(ze, nt) { + const Ut = Uu(M2(nt)), pt = []; + return hfe( + Ut, + 8576, + /*stringsOnly*/ + !1, + ($t) => void pt.push(Bi(ze, z8(nt.mapper, Ud(nt), $t))) + ), Qn(pt); + } + function DI(ze, nt, Ut, pt, $t) { + let It, ar, zr = !1, Un = ze.flags; + const si = nt.flags; + if (l === b_) { + if (Un & 3145728) { + let In = Nc(ze, nt); + return In && (In &= Nc(nt, ze)), In; + } + if (Un & 4194304) + return Zr( + ze.type, + nt.type, + 3, + /*reportErrors*/ + !1 + ); + if (Un & 8388608 && (It = Zr( + ze.objectType, + nt.objectType, + 3, + /*reportErrors*/ + !1 + )) && (It &= Zr( + ze.indexType, + nt.indexType, + 3, + /*reportErrors*/ + !1 + )) || Un & 16777216 && ze.root.isDistributive === nt.root.isDistributive && (It = Zr( + ze.checkType, + nt.checkType, + 3, + /*reportErrors*/ + !1 + )) && (It &= Zr( + ze.extendsType, + nt.extendsType, + 3, + /*reportErrors*/ + !1 + )) && (It &= Zr( + B1(ze), + B1(nt), + 3, + /*reportErrors*/ + !1 + )) && (It &= Zr( + J1(ze), + J1(nt), + 3, + /*reportErrors*/ + !1 + )) || Un & 33554432 && (It = Zr( + ze.baseType, + nt.baseType, + 3, + /*reportErrors*/ + !1 + )) && (It &= Zr( + ze.constraint, + nt.constraint, + 3, + /*reportErrors*/ + !1 + ))) + return It; + if (!(Un & 524288)) + return 0; + } else if (Un & 3145728 || si & 3145728) { + if (It = k_(ze, nt, Ut, pt)) + return It; + if (!(Un & 465829888 || Un & 524288 && si & 1048576 || Un & 2097152 && si & 467402752)) + return 0; + } + if (Un & 17301504 && ze.aliasSymbol && ze.aliasTypeArguments && ze.aliasSymbol === nt.aliasSymbol && !(c$(ze) || c$(nt))) { + const In = xNe(ze.aliasSymbol); + if (In === He) + return 1; + const Hi = Ci(ze.aliasSymbol).typeParameters, ys = kg(Hi), wa = fy(ze.aliasTypeArguments, Hi, ys, an(ze.aliasSymbol.valueDeclaration)), sa = fy(nt.aliasTypeArguments, Hi, ys, an(ze.aliasSymbol.valueDeclaration)), Ic = Jn(wa, sa, In, pt); + if (Ic !== void 0) + return Ic; + } + if (FNe(ze) && !ze.target.readonly && (It = Zr( + Po(ze)[0], + nt, + 1 + /* Source */ + )) || FNe(nt) && (nt.target.readonly || mM(iu(ze) || ze)) && (It = Zr( + ze, + Po(nt)[0], + 2 + /* Target */ + ))) + return It; + if (si & 262144) { + if (Cn(ze) & 32 && !ze.declaration.nameType && Zr( + Bm(nt), + Hf(ze), + 3 + /* Both */ + ) && !(Tg(ze) & 4)) { + const In = s0(ze), Hi = j_(nt, Ud(ze)); + if (It = Zr(In, Hi, 3, Ut)) + return It; + } + if (l === L_ && Un & 262144) { + let In = s_(ze); + if (In) + for (; In && kp(In, (Hi) => !!(Hi.flags & 262144)); ) { + if (It = Zr( + In, + nt, + 1, + /*reportErrors*/ + !1 + )) + return It; + In = s_(In); + } + return 0; + } + } else if (si & 4194304) { + const In = nt.type; + if (Un & 4194304 && (It = Zr( + In, + ze.type, + 3, + /*reportErrors*/ + !1 + ))) + return It; + if (ga(In)) { + if (It = Zr(ze, N3e(In), 2, Ut)) + return It; + } else { + const Hi = yfe(In); + if (Hi) { + if (Zr(ze, Bm( + Hi, + nt.indexFlags | 4 + /* NoReducibleCheck */ + ), 2, Ut) === -1) + return -1; + } else if (T_(In)) { + const ys = uy(In), wa = Hf(In); + let sa; + if (ys && TE(In)) { + const Ic = xf(ys, In); + sa = Qn([Ic, ys]); + } else + sa = ys || wa; + if (Zr(ze, sa, 2, Ut) === -1) + return -1; + } + } + } else if (si & 8388608) { + if (Un & 8388608) { + if ((It = Zr(ze.objectType, nt.objectType, 3, Ut)) && (It &= Zr(ze.indexType, nt.indexType, 3, Ut)), It) + return It; + Ut && (ar = M); + } + if (l === bf || l === L_) { + const In = nt.objectType, Hi = nt.indexType, ys = iu(In) || In, wa = iu(Hi) || Hi; + if (!PT(ys) && !NT(wa)) { + const sa = 4 | (ys !== In ? 2 : 0), Ic = j1(ys, wa, sa); + if (Ic) { + if (Ut && ar && vn($t), It = Zr( + ze, + Ic, + 2, + Ut, + /*headMessage*/ + void 0, + pt + )) + return It; + Ut && ar && M && (M = Mi([ar]) <= Mi([M]) ? ar : M); + } + } + } + Ut && (ar = void 0); + } else if (T_(nt) && l !== b_) { + const In = !!nt.declaration.nameType, Hi = s0(nt), ys = Tg(nt); + if (!(ys & 8)) { + if (!In && Hi.flags & 8388608 && Hi.objectType === ze && Hi.indexType === Ud(nt)) + return -1; + if (!T_(ze)) { + const wa = In ? uy(nt) : Hf(nt), sa = Bm( + ze, + 2 + /* NoIndexSignatures */ + ), Ic = ys & 4, Qd = Ic ? VL(wa, sa) : void 0; + if (Ic ? !(Qd.flags & 131072) : Zr( + wa, + sa, + 3 + /* Both */ + )) { + const Vm = s0(nt), H1 = Ud(nt), C_ = Kw( + Vm, + -98305 + /* Nullable */ + ); + if (!In && C_.flags & 8388608 && C_.indexType === H1) { + if (It = Zr(ze, C_.objectType, 2, Ut)) + return It; + } else { + const Yd = In ? Qd || wa : Qd ? ra([Qd, H1]) : H1, Sy = j_(ze, Yd); + if (It = Zr(Sy, Vm, 3, Ut)) + return It; + } + } + ar = M, vn($t); + } + } + } else if (si & 16777216) { + if (Qk(nt, Ze, or, 10)) + return 3; + const In = nt; + if (!In.root.inferTypeParameters && !rrt(In.root) && !(ze.flags & 16777216 && ze.root === In.root)) { + const Hi = !Ls(U8(In.checkType), U8(In.extendsType)), ys = !Hi && Ls(IT(In.checkType), IT(In.extendsType)); + if ((It = Hi ? -1 : Zr( + ze, + B1(In), + 2, + /*reportErrors*/ + !1, + /*headMessage*/ + void 0, + pt + )) && (It &= ys ? -1 : Zr( + ze, + J1(In), + 2, + /*reportErrors*/ + !1, + /*headMessage*/ + void 0, + pt + ), It)) + return It; + } + } else if (si & 134217728) { + if (Un & 134217728) { + if (l === L_) + return Nnt(ze, nt) ? 0 : -1; + Bi(ze, zs); + } + if (C$(ze, nt)) + return -1; + } else if (nt.flags & 268435456 && !(ze.flags & 268435456) && k$(ze, nt)) + return -1; + if (Un & 8650752) { + if (!(Un & 8388608 && si & 8388608)) { + const In = kT(ze) || ye; + if (It = Zr( + In, + nt, + 1, + /*reportErrors*/ + !1, + /*headMessage*/ + void 0, + pt + )) + return It; + if (It = Zr( + of(In, ze), + nt, + 1, + Ut && In !== ye && !(si & Un & 262144), + /*headMessage*/ + void 0, + pt + )) + return It; + if (Tfe(ze)) { + const Hi = kT(ze.indexType); + if (Hi && (It = Zr(j_(ze.objectType, Hi), nt, 1, Ut))) + return It; + } + } + } else if (Un & 4194304) { + const In = Yfe(ze.type, ze.indexFlags) && Cn(ze.type) & 32; + if (It = Zr(Ot, nt, 1, Ut && !In)) + return It; + if (In) { + const Hi = ze.type, ys = uy(Hi), wa = ys && TE(Hi) ? xf(ys, Hi) : ys || Hf(Hi); + if (It = Zr(wa, nt, 1, Ut)) + return It; + } + } else if (Un & 134217728 && !(si & 524288)) { + if (!(si & 134217728)) { + const In = iu(ze); + if (In && In !== ze && (It = Zr(In, nt, 1, Ut))) + return It; + } + } else if (Un & 268435456) + if (si & 268435456) { + if (ze.symbol !== nt.symbol) + return 0; + if (It = Zr(ze.type, nt.type, 3, Ut)) + return It; + } else { + const In = iu(ze); + if (In && (It = Zr(In, nt, 1, Ut))) + return It; + } + else if (Un & 16777216) { + if (Qk(ze, pe, ht, 10)) + return 3; + if (si & 16777216) { + const ys = ze.root.inferTypeParameters; + let wa = ze.extendsType, sa; + if (ys) { + const Ic = Y8( + ys, + /*signature*/ + void 0, + 0, + vi + ); + d0( + Ic.inferences, + nt.extendsType, + wa, + 1536 + /* AlwaysStrict */ + ), wa = Bi(wa, Ic.mapper), sa = Ic.mapper; + } + if (gh(wa, nt.extendsType) && (Zr( + ze.checkType, + nt.checkType, + 3 + /* Both */ + ) || Zr( + nt.checkType, + ze.checkType, + 3 + /* Both */ + )) && ((It = Zr(Bi(B1(ze), sa), B1(nt), 3, Ut)) && (It &= Zr(J1(ze), J1(nt), 3, Ut)), It)) + return It; + } + const In = vfe(ze); + if (In && (It = Zr(In, nt, 1, Ut))) + return It; + const Hi = !(si & 16777216) && GL(ze) ? jPe(ze) : void 0; + if (Hi && (vn($t), It = Zr(Hi, nt, 1, Ut))) + return It; + } else { + if (l !== pg && l !== Jf && aet(nt) && u0(ze)) + return -1; + if (T_(nt)) + return T_(ze) && (It = Nt(ze, nt, Ut)) ? It : 0; + const In = !!(Un & 402784252); + if (l !== b_) + ze = Uu(ze), Un = ze.flags; + else if (T_(ze)) + return 0; + if (Cn(ze) & 4 && Cn(nt) & 4 && ze.target === nt.target && !ga(ze) && !(c$(ze) || c$(nt))) { + if (p$(ze)) + return -1; + const Hi = bpe(ze.target); + if (Hi === He) + return 1; + const ys = Jn(Po(ze), Po(nt), Hi, pt); + if (ys !== void 0) + return ys; + } else { + if ($w(nt) ? J_(ze, ob) : Tp(nt) && J_(ze, (Hi) => ga(Hi) && !Hi.target.readonly)) + return l !== b_ ? Zr(nb(ze, st) || Je, nb(nt, st) || Je, 3, Ut) : 0; + if (W1(ze) && ga(nt) && !W1(nt)) { + const Hi = xg(ze); + if (Hi !== ze) + return Zr(Hi, nt, 1, Ut); + } else if ((l === pg || l === Jf) && u0(nt) && Cn(nt) & 8192 && !u0(ze)) + return 0; + } + if (Un & 2621440 && si & 524288) { + const Hi = Ut && M === $t.errorInfo && !In; + if (It = se( + ze, + nt, + Hi, + /*excludedProperties*/ + void 0, + /*optionalsOnly*/ + !1, + pt + ), It && (It &= At(ze, nt, 0, Hi, pt), It && (It &= At(ze, nt, 1, Hi, pt), It && (It &= ha(ze, nt, In, Hi, pt)))), zr && It) + M = ar || M || $t.errorInfo; + else if (It) + return It; + } + if (Un & 2621440 && si & 1048576) { + const Hi = Kw( + nt, + 36175872 + /* Substitution */ + ); + if (Hi.flags & 1048576) { + const ys = mr(ze, Hi); + if (ys) + return ys; + } + } + } + return 0; + function Mi(In) { + return In ? qu(In, (Hi, ys) => Hi + 1 + Mi(ys.next), 0) : 0; + } + function Jn(In, Hi, ys, wa) { + if (It = JE(In, Hi, ys, Ut, wa)) + return It; + if (at(ys, (Ic) => !!(Ic & 24))) { + ar = void 0, vn($t); + return; + } + const sa = Hi && Vrt(Hi, ys); + if (zr = !sa, ys !== He && !sa) { + if (zr && !(Ut && at( + ys, + (Ic) => (Ic & 7) === 0 + /* Invariant */ + ))) + return 0; + ar = M, vn($t); + } + } + } + function Nt(ze, nt, Ut) { + if (l === L_ || (l === b_ ? Tg(ze) === Tg(nt) : Jw(ze) <= Jw(nt))) { + let $t; + const It = Hf(nt), ar = Bi(Hf(ze), Jw(ze) < 0 ? eu : zs); + if ($t = Zr(It, ar, 3, Ut)) { + const zr = B_([Ud(ze)], [Ud(nt)]); + if (Bi(uy(ze), zr) === Bi(uy(nt), zr)) + return $t & Zr(Bi(s0(ze), zr), s0(nt), 3, Ut); + } + } + return 0; + } + function mr(ze, nt) { + var Ut; + const pt = qa(ze), $t = YNe(pt, nt); + if (!$t) return 0; + let It = 1; + for (const Jn of $t) + if (It *= sit(M1(Jn)), It > 25) + return (Ut = nn) == null || Ut.instant(nn.Phase.CheckTypes, "typeRelatedToDiscriminatedType_DepthLimit", { sourceId: ze.id, targetId: nt.id, numCombinations: It }), 0; + const ar = new Array($t.length), zr = /* @__PURE__ */ new Set(); + for (let Jn = 0; Jn < $t.length; Jn++) { + const In = $t[Jn], Hi = M1(In); + ar[Jn] = Hi.flags & 1048576 ? Hi.types : [Hi], zr.add(In.escapedName); + } + const Un = tQ(ar), si = []; + for (const Jn of Un) { + let In = !1; + e: + for (const Hi of nt.types) { + for (let ys = 0; ys < $t.length; ys++) { + const wa = $t[ys], sa = Ys(Hi, wa.escapedName); + if (!sa) continue e; + if (wa === sa) continue; + if (!bn( + ze, + nt, + wa, + sa, + (Qd) => Jn[ys], + /*reportErrors*/ + !1, + 0, + /*skipOptional*/ + Z || l === L_ + )) + continue e; + } + Qf(si, Hi, wy), In = !0; + } + if (!In) + return 0; + } + let Mi = -1; + for (const Jn of si) + if (Mi &= se( + ze, + Jn, + /*reportErrors*/ + !1, + zr, + /*optionalsOnly*/ + !1, + 0 + /* None */ + ), Mi && (Mi &= At( + ze, + Jn, + 0, + /*reportErrors*/ + !1, + 0 + /* None */ + ), Mi && (Mi &= At( + ze, + Jn, + 1, + /*reportErrors*/ + !1, + 0 + /* None */ + ), Mi && !(ga(ze) && ga(Jn)) && (Mi &= ha( + ze, + Jn, + /*sourceIsPrimitive*/ + !1, + /*reportErrors*/ + !1, + 0 + /* None */ + )))), !Mi) + return Mi; + return Mi; + } + function Fr(ze, nt) { + if (!nt || ze.length === 0) return ze; + let Ut; + for (let pt = 0; pt < ze.length; pt++) + nt.has(ze[pt].escapedName) ? Ut || (Ut = ze.slice(0, pt)) : Ut && Ut.push(ze[pt]); + return Ut || ze; + } + function Qr(ze, nt, Ut, pt, $t) { + const It = Z && !!(rc(nt) & 48), ar = rl( + M1(nt), + /*isProperty*/ + !1, + It + ), zr = Ut(ze); + return Zr( + zr, + ar, + 3, + pt, + /*headMessage*/ + void 0, + $t + ); + } + function bn(ze, nt, Ut, pt, $t, It, ar, zr) { + const Un = sp(Ut), si = sp(pt); + if (Un & 2 || si & 2) { + if (Ut.valueDeclaration !== pt.valueDeclaration) + return It && (Un & 2 && si & 2 ? ns(p.Types_have_separate_declarations_of_a_private_property_0, Ui(pt)) : ns(p.Property_0_is_private_in_type_1_but_not_in_type_2, Ui(pt), $r(Un & 2 ? ze : nt), $r(Un & 2 ? nt : ze))), 0; + } else if (si & 4) { + if (!Xrt(Ut, pt)) + return It && ns(p.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2, Ui(pt), $r(Xk(Ut) || ze), $r(Xk(pt) || nt)), 0; + } else if (Un & 4) + return It && ns(p.Property_0_is_protected_in_type_1_but_public_in_type_2, Ui(pt), $r(ze), $r(nt)), 0; + if (l === Jf && Xd(Ut) && !Xd(pt)) + return 0; + const Mi = Qr(Ut, pt, $t, It, ar); + return Mi ? !zr && Ut.flags & 16777216 && pt.flags & 106500 && !(pt.flags & 16777216) ? (It && ns(p.Property_0_is_optional_in_type_1_but_required_in_type_2, Ui(pt), $r(ze), $r(nt)), 0) : Mi : (It && bs(p.Types_of_property_0_are_incompatible, Ui(pt)), 0); + } + function be(ze, nt, Ut, pt) { + let $t = !1; + if (Ut.valueDeclaration && Hl(Ut.valueDeclaration) && Ni(Ut.valueDeclaration.name) && ze.symbol && ze.symbol.flags & 32) { + const ar = Ut.valueDeclaration.name.escapedText, zr = P3(ze.symbol, ar); + if (zr && Ys(ze, zr)) { + const Un = N.getDeclarationName(ze.symbol.valueDeclaration), si = N.getDeclarationName(nt.symbol.valueDeclaration); + ns( + p.Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2, + Hp(ar), + Hp(Un.escapedText === "" ? lW : Un), + Hp(si.escapedText === "" ? lW : si) + ); + return; + } + } + const It = Ki(Mpe( + ze, + nt, + pt, + /*matchDiscriminantProperties*/ + !1 + )); + if ((!d || d.code !== p.Class_0_incorrectly_implements_interface_1.code && d.code !== p.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass.code) && ($t = !0), It.length === 1) { + const ar = Ui( + Ut, + /*enclosingDeclaration*/ + void 0, + 0, + 20 + /* WriteComputedProps */ + ); + ns(p.Property_0_is_missing_in_type_1_but_required_in_type_2, ar, ...Ow(ze, nt)), Ir(Ut.declarations) && Ko(tn(Ut.declarations[0], p._0_is_declared_here, ar)), $t && M && Vr++; + } else Mr( + ze, + nt, + /*reportErrors*/ + !1 + ) && (It.length > 5 ? ns(p.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more, $r(ze), $r(nt), gr(It.slice(0, 4), (ar) => Ui(ar)).join(", "), It.length - 4) : ns(p.Type_0_is_missing_the_following_properties_from_type_1_Colon_2, $r(ze), $r(nt), gr(It, (ar) => Ui(ar)).join(", ")), $t && M && Vr++); + } + function se(ze, nt, Ut, pt, $t, It) { + if (l === b_) + return xt(ze, nt, pt); + let ar = -1; + if (ga(nt)) { + if (ob(ze)) { + if (!nt.target.readonly && ($w(ze) || ga(ze) && ze.target.readonly)) + return 0; + const Jn = py(ze), In = py(nt), Hi = ga(ze) ? ze.target.combinedFlags & 4 : 4, ys = !!(nt.target.combinedFlags & 12), wa = ga(ze) ? ze.target.minLength : 0, sa = nt.target.minLength; + if (!Hi && Jn < sa) + return Ut && ns(p.Source_has_0_element_s_but_target_requires_1, Jn, sa), 0; + if (!ys && In < wa) + return Ut && ns(p.Source_has_0_element_s_but_target_allows_only_1, wa, In), 0; + if (!ys && (Hi || In < Jn)) + return Ut && (wa < sa ? ns(p.Target_requires_0_element_s_but_source_may_have_fewer, sa) : ns(p.Target_allows_only_0_element_s_but_source_may_have_more, In)), 0; + const Ic = Po(ze), Qd = Po(nt), Vm = Stt( + nt.target, + 11 + /* NonRest */ + ), H1 = j8( + nt.target, + 11 + /* NonRest */ + ); + let C_ = !!pt; + for (let Yd = 0; Yd < Jn; Yd++) { + const Sy = ga(ze) ? ze.target.elementFlags[Yd] : 4, wI = Jn - 1 - Yd, db = ys && Yd >= Vm ? In - 1 - Math.min(wI, H1) : Yd, y0 = nt.target.elementFlags[db]; + if (y0 & 8 && !(Sy & 8)) + return Ut && ns(p.Source_provides_no_match_for_variadic_element_at_position_0_in_target, db), 0; + if (Sy & 8 && !(y0 & 12)) + return Ut && ns(p.Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target, Yd, db), 0; + if (y0 & 1 && !(Sy & 1)) + return Ut && ns(p.Source_provides_no_match_for_required_element_at_position_0_in_target, db), 0; + if (C_ && ((Sy & 12 || y0 & 12) && (C_ = !1), C_ && pt?.has("" + Yd))) + continue; + const lP = p0(Ic[Yd], !!(Sy & y0 & 2)), PI = Qd[db], NX = Sy & 8 && y0 & 4 ? mu(PI) : p0(PI, !!(y0 & 2)), AX = Zr( + lP, + NX, + 3, + Ut, + /*headMessage*/ + void 0, + It + ); + if (!AX) + return Ut && (In > 1 || Jn > 1) && (ys && Yd >= Vm && wI >= H1 && Vm !== Jn - H1 - 1 ? bs(p.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target, Vm, Jn - H1 - 1, db) : bs(p.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target, Yd, db)), 0; + ar &= AX; + } + return ar; + } + if (nt.target.combinedFlags & 12) + return 0; + } + const zr = (l === pg || l === Jf) && !hy(ze) && !p$(ze) && !ga(ze), Un = Rpe( + ze, + nt, + zr, + /*matchDiscriminantProperties*/ + !1 + ); + if (Un) + return Ut && dr(ze, nt) && be(ze, nt, Un, zr), 0; + if (hy(nt)) { + for (const Jn of Fr(qa(ze), pt)) + if (!R2(nt, Jn.escapedName) && !(en(Jn).flags & 32768)) + return Ut && ns(p.Property_0_does_not_exist_on_type_1, Ui(Jn), $r(nt)), 0; + } + const si = qa(nt), Mi = ga(ze) && ga(nt); + for (const Jn of Fr(si, pt)) { + const In = Jn.escapedName; + if (!(Jn.flags & 4194304) && (!Mi || Xg(In) || In === "length") && (!$t || Jn.flags & 16777216)) { + const Hi = Ys(ze, In); + if (Hi && Hi !== Jn) { + const ys = bn(ze, nt, Hi, Jn, M1, Ut, It, l === L_); + if (!ys) + return 0; + ar &= ys; + } + } + } + return ar; + } + function xt(ze, nt, Ut) { + if (!(ze.flags & 524288 && nt.flags & 524288)) + return 0; + const pt = Fr(_y(ze), Ut), $t = Fr(_y(nt), Ut); + if (pt.length !== $t.length) + return 0; + let It = -1; + for (const ar of pt) { + const zr = R2(nt, ar.escapedName); + if (!zr) + return 0; + const Un = Tpe(ar, zr, Zr); + if (!Un) + return 0; + It &= Un; + } + return It; + } + function At(ze, nt, Ut, pt, $t) { + var It, ar; + if (l === b_) + return gi(ze, nt, Ut); + if (nt === qt || ze === qt) + return -1; + const zr = ze.symbol && Um(ze.symbol.valueDeclaration), Un = nt.symbol && Um(nt.symbol.valueDeclaration), si = Ps( + ze, + zr && Ut === 1 ? 0 : Ut + ), Mi = Ps( + nt, + Un && Ut === 1 ? 0 : Ut + ); + if (Ut === 1 && si.length && Mi.length) { + const wa = !!(si[0].flags & 4), sa = !!(Mi[0].flags & 4); + if (wa && !sa) + return pt && ns(p.Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type), 0; + if (!Ra(si[0], Mi[0], pt)) + return 0; + } + let Jn = -1; + const In = Ut === 1 ? Ur : Lr, Hi = Cn(ze), ys = Cn(nt); + if (Hi & 64 && ys & 64 && ze.symbol === nt.symbol || Hi & 4 && ys & 4 && ze.target === nt.target) { + E.assertEqual(si.length, Mi.length); + for (let wa = 0; wa < Mi.length; wa++) { + const sa = ti( + si[wa], + Mi[wa], + /*erase*/ + !0, + pt, + $t, + In(si[wa], Mi[wa]) + ); + if (!sa) + return 0; + Jn &= sa; + } + } else if (si.length === 1 && Mi.length === 1) { + const wa = l === L_, sa = ya(si), Ic = ya(Mi); + if (Jn = ti(sa, Ic, wa, pt, $t, In(sa, Ic)), !Jn && pt && Ut === 1 && Hi & ys && (((It = Ic.declaration) == null ? void 0 : It.kind) === 176 || ((ar = sa.declaration) == null ? void 0 : ar.kind) === 176)) { + const Qd = (Vm) => eb( + Vm, + /*enclosingDeclaration*/ + void 0, + 262144, + Ut + ); + return ns(p.Type_0_is_not_assignable_to_type_1, Qd(sa), Qd(Ic)), ns(p.Types_of_construct_signatures_are_incompatible), Jn; + } + } else + e: + for (const wa of Mi) { + const sa = Ts(); + let Ic = pt; + for (const Qd of si) { + const Vm = ti( + Qd, + wa, + /*erase*/ + !0, + Ic, + $t, + In(Qd, wa) + ); + if (Vm) { + Jn &= Vm, vn(sa); + continue e; + } + Ic = !1; + } + return Ic && ns(p.Type_0_provides_no_match_for_the_signature_1, $r(ze), eb( + wa, + /*enclosingDeclaration*/ + void 0, + /*flags*/ + void 0, + Ut + )), 0; + } + return Jn; + } + function dr(ze, nt) { + const Ut = XL( + ze, + 0 + /* Call */ + ), pt = XL( + ze, + 1 + /* Construct */ + ), $t = _y(ze); + return (Ut.length || pt.length) && !$t.length ? !!(Ps( + nt, + 0 + /* Call */ + ).length && Ut.length || Ps( + nt, + 1 + /* Construct */ + ).length && pt.length) : !0; + } + function Lr(ze, nt) { + return ze.parameters.length === 0 && nt.parameters.length === 0 ? (Ut, pt) => bs(p.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1, $r(Ut), $r(pt)) : (Ut, pt) => bs(p.Call_signature_return_types_0_and_1_are_incompatible, $r(Ut), $r(pt)); + } + function Ur(ze, nt) { + return ze.parameters.length === 0 && nt.parameters.length === 0 ? (Ut, pt) => bs(p.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1, $r(Ut), $r(pt)) : (Ut, pt) => bs(p.Construct_signature_return_types_0_and_1_are_incompatible, $r(Ut), $r(pt)); + } + function ti(ze, nt, Ut, pt, $t, It) { + const ar = l === pg ? 16 : l === Jf ? 24 : 0; + return dpe(Ut ? R8(ze) : ze, Ut ? R8(nt) : nt, ar, pt, ns, It, zr, zs); + function zr(Un, si, Mi) { + return Zr( + Un, + si, + 3, + Mi, + /*headMessage*/ + void 0, + $t + ); + } + } + function gi(ze, nt, Ut) { + const pt = Ps(ze, Ut), $t = Ps(nt, Ut); + if (pt.length !== $t.length) + return 0; + let It = -1; + for (let ar = 0; ar < pt.length; ar++) { + const zr = dM( + pt[ar], + $t[ar], + /*partialMatch*/ + !1, + /*ignoreThisTypes*/ + !1, + /*ignoreReturnTypes*/ + !1, + Zr + ); + if (!zr) + return 0; + It &= zr; + } + return It; + } + function xs(ze, nt, Ut, pt) { + let $t = -1; + const It = nt.keyType, ar = ze.flags & 2097152 ? HL(ze) : _y(ze); + for (const zr of ar) + if (!bNe(ze, zr) && zk(Vk( + zr, + 8576 + /* StringOrNumberLiteralOrUnique */ + ), It)) { + const Un = M1(zr), si = me || Un.flags & 32768 || It === st || !(zr.flags & 16777216) ? Un : xp( + Un, + 524288 + /* NEUndefined */ + ), Mi = Zr( + si, + nt.type, + 3, + Ut, + /*headMessage*/ + void 0, + pt + ); + if (!Mi) + return Ut && ns(p.Property_0_is_incompatible_with_index_signature, Ui(zr)), 0; + $t &= Mi; + } + for (const zr of du(ze)) + if (zk(zr.keyType, It)) { + const Un = $i(zr, nt, Ut, pt); + if (!Un) + return 0; + $t &= Un; + } + return $t; + } + function $i(ze, nt, Ut, pt) { + const $t = Zr( + ze.type, + nt.type, + 3, + Ut, + /*headMessage*/ + void 0, + pt + ); + return !$t && Ut && (ze.keyType === nt.keyType ? ns(p._0_index_signatures_are_incompatible, $r(ze.keyType)) : ns(p._0_and_1_index_signatures_are_incompatible, $r(ze.keyType), $r(nt.keyType))), $t; + } + function ha(ze, nt, Ut, pt, $t) { + if (l === b_) + return ua(ze, nt); + const It = du(nt), ar = at(It, (Un) => Un.keyType === de); + let zr = -1; + for (const Un of It) { + const si = l !== Jf && !Ut && ar && Un.type.flags & 1 ? -1 : T_(ze) && ar ? Zr(s0(ze), Un.type, 3, pt) : Rs(ze, Un, pt, $t); + if (!si) + return 0; + zr &= si; + } + return zr; + } + function Rs(ze, nt, Ut, pt) { + const $t = F8(ze, nt.keyType); + return $t ? $i($t, nt, Ut, pt) : !(pt & 1) && (l !== Jf || Cn(ze) & 8192) && v$(ze) ? xs(ze, nt, Ut, pt) : (Ut && ns(p.Index_signature_for_type_0_is_missing_in_type_1, $r(nt.keyType), $r(ze)), 0); + } + function ua(ze, nt) { + const Ut = du(ze), pt = du(nt); + if (Ut.length !== pt.length) + return 0; + for (const $t of pt) { + const It = ph(ze, $t.keyType); + if (!(It && Zr( + It.type, + $t.type, + 3 + /* Both */ + ) && It.isReadonly === $t.isReadonly)) + return 0; + } + return -1; + } + function Ra(ze, nt, Ut) { + if (!ze.declaration || !nt.declaration) + return !0; + const pt = bx( + ze.declaration, + 6 + /* NonPublicAccessibilityModifier */ + ), $t = bx( + nt.declaration, + 6 + /* NonPublicAccessibilityModifier */ + ); + return $t === 2 || $t === 4 && pt !== 2 || $t !== 4 && !pt ? !0 : (Ut && ns(p.Cannot_assign_a_0_constructor_type_to_a_1_constructor_type, Lw(pt), Lw($t)), !1); + } + } + function hpe(r) { + if (r.flags & 16) + return !1; + if (r.flags & 3145728) + return !!lr(r.types, hpe); + if (r.flags & 465829888) { + const a = kT(r); + if (a && a !== r) + return hpe(a); + } + return qd(r) || !!(r.flags & 134217728) || !!(r.flags & 268435456); + } + function SNe(r, a) { + return ga(r) && ga(a) ? He : qa(a).filter((l) => o$(Pc(r, l.escapedName), en(l))); + } + function o$(r, a) { + return !!r && !!a && hc( + r, + 32768 + /* Undefined */ + ) && !!X8(a); + } + function Wrt(r) { + return qa(r).filter((a) => X8(en(a))); + } + function TNe(r, a, l = fpe) { + return K7e(r, a, l) || nft(r, a) || ift(r, a) || sft(r, a) || aft(r, a); + } + function ype(r, a, l) { + const f = r.types, d = f.map( + (x) => x.flags & 402784252 ? 0 : -1 + /* True */ + ); + for (const [x, I] of a) { + let M = !1; + for (let z = 0; z < f.length; z++) + if (d[z]) { + const Y = Bk(f[z], I); + Y && kp(x(), (Se) => !!l(Se, Y)) ? M = !0 : d[z] = 3; + } + for (let z = 0; z < f.length; z++) + d[z] === 3 && (d[z] = M ? 0 : -1); + } + const y = as( + d, + 0 + /* False */ + ) ? Qn( + f.filter((x, I) => d[I]), + 0 + /* None */ + ) : r; + return y.flags & 131072 ? r : y; + } + function vpe(r) { + if (r.flags & 524288) { + const a = Vd(r); + return a.callSignatures.length === 0 && a.constructSignatures.length === 0 && a.indexInfos.length === 0 && a.properties.length > 0 && Ri(a.properties, (l) => !!(l.flags & 16777216)); + } + return r.flags & 33554432 ? vpe(r.baseType) : r.flags & 2097152 ? Ri(r.types, vpe) : !1; + } + function Urt(r, a, l) { + for (const f of qa(r)) + if (V$(a, f.escapedName, l)) + return !0; + return !1; + } + function bpe(r) { + return r === Br || r === Ti || r.objectFlags & 8 ? O : kNe(r.symbol, r.typeParameters); + } + function xNe(r) { + return kNe(r, Ci(r).typeParameters); + } + function kNe(r, a = He) { + var l, f; + const d = Ci(r); + if (!d.variances) { + (l = nn) == null || l.push(nn.Phase.CheckTypes, "getVariancesWorker", { arity: a.length, id: jl(ko(r)) }); + const y = ai, x = cn; + ai || (ai = !0, cn = vr.length), d.variances = He; + const I = []; + for (const M of a) { + const z = Spe(M); + let Y = z & 16384 ? z & 8192 ? 0 : 1 : z & 8192 ? 2 : void 0; + if (Y === void 0) { + let Se = !1, pe = !1; + const Ze = ri; + ri = (or) => or ? pe = !0 : Se = !0; + const dt = fM(r, M, Ll), ht = fM(r, M, To); + Y = (Ls(ht, dt) ? 1 : 0) | (Ls(dt, ht) ? 2 : 0), Y === 3 && Ls(fM(r, M, ge), dt) && (Y = 4), ri = Ze, (Se || pe) && (Se && (Y |= 8), pe && (Y |= 16)); + } + I.push(Y); + } + y || (ai = !1, cn = x), d.variances = I, (f = nn) == null || f.pop({ variances: I.map(E.formatVariance) }); + } + return d.variances; + } + function fM(r, a, l) { + const f = V2(a, l), d = ko(r); + if (H(d)) + return d; + const y = r.flags & 524288 ? CE(r, mh(Ci(r).typeParameters, f)) : a0(d, mh(d.typeParameters, f)); + return ee.add(jl(y)), y; + } + function c$(r) { + return ee.has(jl(r)); + } + function Spe(r) { + var a; + return qu( + (a = r.symbol) == null ? void 0 : a.declarations, + (l, f) => l | Mu(f), + 0 + /* None */ + ) & 28672; + } + function Vrt(r, a) { + for (let l = 0; l < a.length; l++) + if ((a[l] & 7) === 1 && r[l].flags & 16384) + return !0; + return !1; + } + function qrt(r) { + return r.flags & 262144 && !s_(r); + } + function Hrt(r) { + return !!(Cn(r) & 4) && !r.node; + } + function l$(r) { + return Hrt(r) && at(Po(r), (a) => !!(a.flags & 262144) || l$(a)); + } + function Grt(r, a, l, f) { + const d = []; + let y = ""; + const x = M(r, 0), I = M(a, 0); + return `${y}${x},${I}${l}`; + function M(z, Y = 0) { + let Se = "" + z.target.id; + for (const pe of Po(z)) { + if (pe.flags & 262144) { + if (f || qrt(pe)) { + let Ze = d.indexOf(pe); + Ze < 0 && (Ze = d.length, d.push(pe)), Se += "=" + Ze; + continue; + } + y = "*"; + } else if (Y < 4 && l$(pe)) { + Se += "<" + M(pe, Y + 1) + ">"; + continue; + } + Se += "-" + pe.id; + } + return Se; + } + } + function u$(r, a, l, f, d) { + if (f === b_ && r.id > a.id) { + const x = r; + r = a, a = x; + } + const y = l ? ":" + l : ""; + return l$(r) && l$(a) ? Grt(r, a, y, d) : `${r.id},${a.id}${y}`; + } + function pM(r, a) { + if (rc(r) & 6) { + for (const l of r.links.containingType.types) { + const f = Ys(l, r.escapedName), d = f && pM(f, a); + if (d) + return d; + } + return; + } + return a(r); + } + function Xk(r) { + return r.parent && r.parent.flags & 32 ? ko(af(r)) : void 0; + } + function _$(r) { + const a = Xk(r), l = a && wo(a)[0]; + return l && Pc(l, r.escapedName); + } + function $rt(r, a) { + return pM(r, (l) => { + const f = Xk(l); + return f ? yE(f, a) : !1; + }); + } + function Xrt(r, a) { + return !pM(a, (l) => sp(l) & 4 ? !$rt(r, Xk(l)) : !1); + } + function CNe(r, a, l) { + return pM(a, (f) => sp(f, l) & 4 ? !yE(r, Xk(f)) : !1) ? void 0 : r; + } + function Qk(r, a, l, f = 3) { + if (l >= f) { + if ((Cn(r) & 96) === 96 && (r = ENe(r)), r.flags & 2097152) + return at(r.types, (I) => Qk(I, a, l, f)); + const d = f$(r); + let y = 0, x = 0; + for (let I = 0; I < l; I++) { + const M = a[I]; + if (DNe(M, d)) { + if (M.id >= x && (y++, y >= f)) + return !0; + x = M.id; + } + } + } + return !1; + } + function ENe(r) { + let a; + for (; (Cn(r) & 96) === 96 && (a = M2(r)) && (a.symbol || a.flags & 2097152 && at(a.types, (l) => !!l.symbol)); ) + r = a; + return r; + } + function DNe(r, a) { + return (Cn(r) & 96) === 96 && (r = ENe(r)), r.flags & 2097152 ? at(r.types, (l) => DNe(l, a)) : f$(r) === a; + } + function f$(r) { + if (r.flags & 524288 && !Bpe(r)) { + if (Cn(r) & 4 && r.node) + return r.node; + if (r.symbol && !(Cn(r) & 16 && r.symbol.flags & 32)) + return r.symbol; + if (ga(r)) + return r.target; + } + if (r.flags & 262144) + return r.symbol; + if (r.flags & 8388608) { + do + r = r.objectType; + while (r.flags & 8388608); + return r; + } + return r.flags & 16777216 ? r.root : r; + } + function Qrt(r, a) { + return Tpe(r, a, V8) !== 0; + } + function Tpe(r, a, l) { + if (r === a) + return -1; + const f = sp(r) & 6, d = sp(a) & 6; + if (f !== d) + return 0; + if (f) { + if (BE(r) !== BE(a)) + return 0; + } else if ((r.flags & 16777216) !== (a.flags & 16777216)) + return 0; + return Xd(r) !== Xd(a) ? 0 : l(en(r), en(a)); + } + function Yrt(r, a, l) { + const f = z_(r), d = z_(a), y = $d(r), x = $d(a), I = wg(r), M = wg(a); + return !!(f === d && y === x && I === M || l && y <= x); + } + function dM(r, a, l, f, d, y) { + if (r === a) + return -1; + if (!Yrt(r, a, l) || Ir(r.typeParameters) !== Ir(a.typeParameters)) + return 0; + if (a.typeParameters) { + const M = B_(r.typeParameters, a.typeParameters); + for (let z = 0; z < a.typeParameters.length; z++) { + const Y = r.typeParameters[z], Se = a.typeParameters[z]; + if (!(Y === Se || y(Bi(Vw(Y), M) || ye, Vw(Se) || ye) && y(Bi(j2(Y), M) || ye, j2(Se) || ye))) + return 0; + } + r = $k( + r, + M, + /*eraseTypeParameters*/ + !0 + ); + } + let x = -1; + if (!f) { + const M = ib(r); + if (M) { + const z = ib(a); + if (z) { + const Y = y(M, z); + if (!Y) + return 0; + x &= Y; + } + } + } + const I = z_(a); + for (let M = 0; M < I; M++) { + const z = Gd(r, M), Y = Gd(a, M), Se = y(Y, z); + if (!Se) + return 0; + x &= Se; + } + if (!d) { + const M = bp(r), z = bp(a); + x &= M || z ? Zrt(M, z, y) : y(Ba(r), Ba(a)); + } + return x; + } + function Zrt(r, a, l) { + return r && a && $fe(r, a) ? r.type === a.type ? -1 : r.type && a.type ? l(r.type, a.type) : 0 : 0; + } + function Krt(r) { + let a; + for (const l of r) + if (!(l.flags & 131072)) { + const f = _0(l); + if (a ?? (a = f), f === l || f !== a) + return !1; + } + return !0; + } + function wNe(r) { + return qu(r, (a, l) => a | (l.flags & 1048576 ? wNe(l.types) : l.flags), 0); + } + function ent(r) { + if (r.length === 1) + return r[0]; + const a = Z ? Wc(r, (f) => Jc(f, (d) => !(d.flags & 98304))) : r, l = Krt(a) ? Qn(a) : qu(a, (f, d) => H2(f, d) ? d : f); + return a === r ? l : hM( + l, + wNe(r) & 98304 + /* Nullable */ + ); + } + function tnt(r) { + return qu(r, (a, l) => H2(l, a) ? l : a); + } + function Tp(r) { + return !!(Cn(r) & 4) && (r.target === Br || r.target === Ti); + } + function $w(r) { + return !!(Cn(r) & 4) && r.target === Ti; + } + function ob(r) { + return Tp(r) || ga(r); + } + function mM(r) { + return Tp(r) && !$w(r) || ga(r) && !r.target.readonly; + } + function gM(r) { + return Tp(r) ? Po(r)[0] : void 0; + } + function my(r) { + return Tp(r) || !(r.flags & 98304) && Ls(r, df); + } + function xpe(r) { + return mM(r) || !(r.flags & 98305) && Ls(r, Va); + } + function kpe(r) { + if (!(Cn(r) & 4) || !(Cn(r.target) & 3)) + return; + if (Cn(r) & 33554432) + return Cn(r) & 67108864 ? r.cachedEquivalentBaseType : void 0; + r.objectFlags |= 33554432; + const a = r.target; + if (Cn(a) & 1) { + const d = Dn(a); + if (d && d.expression.kind !== 80 && d.expression.kind !== 211) + return; + } + const l = wo(a); + if (l.length !== 1 || Sg(r.symbol).size) + return; + let f = Ir(a.typeParameters) ? Bi(l[0], B_(a.typeParameters, Po(r).slice(0, a.typeParameters.length))) : l[0]; + return Ir(Po(r)) > Ir(a.typeParameters) && (f = of(f, _a(Po(r)))), r.objectFlags |= 67108864, r.cachedEquivalentBaseType = f; + } + function PNe(r) { + return Z ? r === Vt : r === fe; + } + function p$(r) { + const a = gM(r); + return !!a && PNe(a); + } + function Xw(r) { + let a; + return ga(r) || !!Ys(r, "0") || my(r) && !!(a = Pc(r, "length")) && J_(a, (l) => !!(l.flags & 256)); + } + function d$(r) { + return my(r) || Xw(r); + } + function NNe(r, a) { + const l = Pc(r, "" + a); + if (l) + return l; + if (J_(r, ga)) + return ONe(r, a, F.noUncheckedIndexedAccess ? ft : void 0); + } + function rnt(r) { + return !(r.flags & 240544); + } + function qd(r) { + return !!(r.flags & 109472); + } + function ANe(r) { + const a = xg(r); + return a.flags & 2097152 ? at(a.types, qd) : qd(a); + } + function nnt(r) { + return r.flags & 2097152 && Pn(r.types, qd) || r; + } + function G8(r) { + return r.flags & 16 ? !0 : r.flags & 1048576 ? r.flags & 1024 ? !0 : Ri(r.types, qd) : qd(r); + } + function _0(r) { + return r.flags & 1056 ? FG(r) : r.flags & 402653312 ? de : r.flags & 256 ? st : r.flags & 2048 ? Gt : r.flags & 512 ? ut : r.flags & 1048576 ? int(r) : r; + } + function int(r) { + const a = `B${jl(r)}`; + return Bd(a) ?? K0(a, Vo(r, _0)); + } + function Cpe(r) { + return r.flags & 402653312 ? de : r.flags & 288 ? st : r.flags & 2048 ? Gt : r.flags & 512 ? ut : r.flags & 1048576 ? Vo(r, Cpe) : r; + } + function cb(r) { + return r.flags & 1056 && U2(r) ? FG(r) : r.flags & 128 && U2(r) ? de : r.flags & 256 && U2(r) ? st : r.flags & 2048 && U2(r) ? Gt : r.flags & 512 && U2(r) ? ut : r.flags & 1048576 ? Vo(r, cb) : r; + } + function INe(r) { + return r.flags & 8192 ? Mt : r.flags & 1048576 ? Vo(r, INe) : r; + } + function Epe(r, a) { + return sX(r, a) || (r = INe(cb(r))), Vu(r); + } + function snt(r, a, l) { + if (r && qd(r)) { + const f = a ? l ? gI(a) : a : void 0; + r = Epe(r, f); + } + return r; + } + function Dpe(r, a, l, f) { + if (r && qd(r)) { + const d = a ? vy(l, a, f) : void 0; + r = Epe(r, d); + } + return r; + } + function ga(r) { + return !!(Cn(r) & 4 && r.target.objectFlags & 8); + } + function W1(r) { + return ga(r) && !!(r.target.combinedFlags & 8); + } + function FNe(r) { + return W1(r) && r.target.elementFlags.length === 1; + } + function m$(r) { + return Qw(r, r.target.fixedLength); + } + function ONe(r, a, l) { + return Vo(r, (f) => { + const d = f, y = m$(d); + return y ? l && a >= Hfe(d.target) ? Qn([y, l]) : y : ft; + }); + } + function ant(r) { + const a = m$(r); + return a && mu(a); + } + function Qw(r, a, l = 0, f = !1, d = !1) { + const y = py(r) - l; + if (a < y) { + const x = Po(r), I = []; + for (let M = a; M < y; M++) { + const z = x[M]; + I.push(r.target.elementFlags[M] & 8 ? j_(z, st) : z); + } + return f ? ra(I) : Qn( + I, + d ? 0 : 1 + /* Literal */ + ); + } + } + function ont(r, a) { + return py(r) === py(a) && Ri(r.target.elementFlags, (l, f) => (l & 12) === (a.target.elementFlags[f] & 12)); + } + function LNe({ value: r }) { + return r.base10Value === "0"; + } + function MNe(r) { + return Jc(r, (a) => Hd( + a, + 4194304 + /* Truthy */ + )); + } + function cnt(r) { + return Vo(r, lnt); + } + function lnt(r) { + return r.flags & 4 ? Ge : r.flags & 8 ? St : r.flags & 64 ? rr : r === Rr || r === Xr || r.flags & 114691 || r.flags & 128 && r.value === "" || r.flags & 256 && r.value === 0 || r.flags & 2048 && LNe(r) ? r : Zt; + } + function hM(r, a) { + const l = a & ~r.flags & 98304; + return l === 0 ? r : Qn(l === 32768 ? [r, ft] : l === 65536 ? [r, lt] : [r, ft, lt]); + } + function gy(r, a = !1) { + E.assert(Z); + const l = a ? ve : ft; + return r === l || r.flags & 1048576 && r.types[0] === l ? r : Qn([r, l]); + } + function unt(r) { + return Rf || (Rf = DE( + "NonNullable", + 524288, + /*diagnostic*/ + void 0 + ) || Ve), Rf !== Ve ? CE(Rf, [r]) : ra([r, hs]); + } + function f0(r) { + return Z ? MT( + r, + 2097152 + /* NEUndefinedOrNull */ + ) : r; + } + function RNe(r) { + return Z ? Qn([r, X]) : r; + } + function g$(r) { + return Z ? D$(r, X) : r; + } + function h$(r, a, l) { + return l ? m4(a) ? gy(r) : RNe(r) : r; + } + function $8(r, a) { + return o7(a) ? f0(r) : vu(a) ? g$(r) : r; + } + function p0(r, a) { + return me && a ? D$(r, L) : r; + } + function X8(r) { + return r === L || !!(r.flags & 1048576) && r.types[0] === L; + } + function y$(r) { + return me ? D$(r, L) : xp( + r, + 524288 + /* NEUndefined */ + ); + } + function _nt(r, a) { + return (r.flags & 524) !== 0 && (a.flags & 28) !== 0; + } + function v$(r) { + const a = Cn(r); + return r.flags & 2097152 ? Ri(r.types, v$) : !!(r.symbol && r.symbol.flags & 7040 && !(r.symbol.flags & 32) && !xX(r)) || !!(a & 4194304) || !!(a & 1024 && v$(r.source)); + } + function FT(r, a) { + const l = ca( + r.flags, + r.escapedName, + rc(r) & 8 + /* Readonly */ + ); + l.declarations = r.declarations, l.parent = r.parent, l.links.type = a, l.links.target = r, r.valueDeclaration && (l.valueDeclaration = r.valueDeclaration); + const f = Ci(r).nameType; + return f && (l.links.nameType = f), l; + } + function fnt(r, a) { + const l = Us(); + for (const f of _y(r)) { + const d = en(f), y = a(d); + l.set(f.escapedName, y === d ? f : FT(f, y)); + } + return l; + } + function Q8(r) { + if (!(hy(r) && Cn(r) & 8192)) + return r; + const a = r.regularType; + if (a) + return a; + const l = r, f = fnt(r, Q8), d = Ea(l.symbol, f, l.callSignatures, l.constructSignatures, l.indexInfos); + return d.flags = l.flags, d.objectFlags |= l.objectFlags & -8193, r.regularType = d, d; + } + function jNe(r, a, l) { + return { parent: r, propertyName: a, siblings: l, resolvedProperties: void 0 }; + } + function BNe(r) { + if (!r.siblings) { + const a = []; + for (const l of BNe(r.parent)) + if (hy(l)) { + const f = R2(l, r.propertyName); + f && RT(en(f), (d) => { + a.push(d); + }); + } + r.siblings = a; + } + return r.siblings; + } + function pnt(r) { + if (!r.resolvedProperties) { + const a = /* @__PURE__ */ new Map(); + for (const l of BNe(r)) + if (hy(l) && !(Cn(l) & 2097152)) + for (const f of qa(l)) + a.set(f.escapedName, f); + r.resolvedProperties = Ki(a.values()); + } + return r.resolvedProperties; + } + function dnt(r, a) { + if (!(r.flags & 4)) + return r; + const l = en(r), f = a && jNe( + a, + r.escapedName, + /*siblings*/ + void 0 + ), d = wpe(l, f); + return d === l ? r : FT(r, d); + } + function mnt(r) { + const a = Ct.get(r.escapedName); + if (a) + return a; + const l = FT(r, ve); + return l.flags |= 16777216, Ct.set(r.escapedName, l), l; + } + function gnt(r, a) { + const l = Us(); + for (const d of _y(r)) + l.set(d.escapedName, dnt(d, a)); + if (a) + for (const d of pnt(a)) + l.has(d.escapedName) || l.set(d.escapedName, mnt(d)); + const f = Ea(r.symbol, l, He, He, Wc(du(r), (d) => Cg(d.keyType, cf(d.type), d.isReadonly))); + return f.objectFlags |= Cn(r) & 266240, f; + } + function cf(r) { + return wpe( + r, + /*context*/ + void 0 + ); + } + function wpe(r, a) { + if (Cn(r) & 196608) { + if (a === void 0 && r.widened) + return r.widened; + let l; + if (r.flags & 98305) + l = Je; + else if (hy(r)) + l = gnt(r, a); + else if (r.flags & 1048576) { + const f = a || jNe( + /*parent*/ + void 0, + /*propertyName*/ + void 0, + r.types + ), d = Wc(r.types, (y) => y.flags & 98304 ? y : wpe(y, f)); + l = Qn( + d, + at(d, u0) ? 2 : 1 + /* Literal */ + ); + } else r.flags & 2097152 ? l = ra(Wc(r.types, cf)) : ob(r) && (l = a0(r.target, Wc(Po(r), cf))); + return l && a === void 0 && (r.widened = l), l || r; + } + return r; + } + function b$(r) { + var a; + let l = !1; + if (Cn(r) & 65536) { + if (r.flags & 1048576) + if (at(r.types, u0)) + l = !0; + else + for (const f of r.types) + l || (l = b$(f)); + else if (ob(r)) + for (const f of Po(r)) + l || (l = b$(f)); + else if (hy(r)) + for (const f of _y(r)) { + const d = en(f); + if (Cn(d) & 65536 && (l = b$(d), !l)) { + const y = (a = f.declarations) == null ? void 0 : a.find((x) => { + var I; + return ((I = x.symbol.valueDeclaration) == null ? void 0 : I.parent) === r.symbol.valueDeclaration; + }); + y && (je(y, p.Object_literal_s_property_0_implicitly_has_an_1_type, Ui(f), $r(cf(d))), l = !0); + } + } + } + return l; + } + function lb(r, a, l) { + const f = $r(cf(a)); + if (an(r) && !iD(Cr(r), F)) + return; + let d; + switch (r.kind) { + case 226: + case 172: + case 171: + d = le ? p.Member_0_implicitly_has_an_1_type : p.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage; + break; + case 169: + const y = r; + if (Me(y.name)) { + const x = aS(y.name); + if ((Jx(y.parent) || pm(y.parent) || ng(y.parent)) && y.parent.parameters.includes(y) && (Dt( + y, + y.name.escapedText, + 788968, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !0 + ) || x && oJ(x))) { + const I = "arg" + y.parent.parameters.indexOf(y), M = co(y.name) + (y.dotDotDotToken ? "[]" : ""); + dg(le, r, p.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1, I, M); + return; + } + } + d = r.dotDotDotToken ? le ? p.Rest_parameter_0_implicitly_has_an_any_type : p.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage : le ? p.Parameter_0_implicitly_has_an_1_type : p.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage; + break; + case 208: + if (d = p.Binding_element_0_implicitly_has_an_1_type, !le) + return; + break; + case 317: + je(r, p.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, f); + return; + case 323: + le && o6(r.parent) && je(r.parent.tagName, p.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation, f); + return; + case 262: + case 174: + case 173: + case 177: + case 178: + case 218: + case 219: + if (le && !r.name) { + l === 3 ? je(r, p.Generator_implicitly_has_yield_type_0_Consider_supplying_a_return_type_annotation, f) : je(r, p.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, f); + return; + } + d = le ? l === 3 ? p._0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type : p._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type : p._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage; + break; + case 200: + le && je(r, p.Mapped_object_type_implicitly_has_an_any_template_type); + return; + default: + d = le ? p.Variable_0_implicitly_has_an_1_type : p.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage; + } + dg(le, r, d, co(is(r)), f); + } + function hnt(r, a) { + const l = dde(r); + if (!l) + return !0; + let f = Ba(l); + const d = Oc(r); + switch (a) { + case 1: + return d & 1 ? f = vy(1, f, !!(d & 2)) ?? f : d & 2 && (f = g0(f) ?? f), sb(f); + case 3: + const y = vy(0, f, !!(d & 2)); + return !!y && sb(y); + case 2: + const x = vy(2, f, !!(d & 2)); + return !!x && sb(x); + } + return !1; + } + function S$(r, a, l) { + n(() => { + le && Cn(a) & 65536 && (!l || Ka(r) && hnt(r, l)) && (b$(a) || lb(r, a, l)); + }); + } + function Ppe(r, a, l) { + const f = z_(r), d = z_(a), y = lI(r), x = lI(a), I = x ? d - 1 : d, M = y ? I : Math.min(f, I), z = ib(r); + if (z) { + const Y = ib(a); + Y && l(z, Y); + } + for (let Y = 0; Y < M; Y++) + l(Gd(r, Y), Gd(a, Y)); + x && l(UM( + r, + M, + /*readonly*/ + CT(x) && !kp(x, xpe) + ), x); + } + function Npe(r, a, l) { + const f = bp(a); + if (f) { + const y = bp(r); + if (y && $fe(y, f) && y.type && f.type) { + l(y.type, f.type); + return; + } + } + const d = Ba(a); + U1(d) && l(Ba(r), d); + } + function Y8(r, a, l, f) { + return Ape(r.map(Fpe), a, l, f || fpe); + } + function ynt(r, a = 0) { + return r && Ape(gr(r.inferences, JNe), r.signature, r.flags | a, r.compareTypes); + } + function Ape(r, a, l, f) { + const d = { + inferences: r, + signature: a, + flags: l, + compareTypes: f, + mapper: eu, + // initialize to a noop mapper so the context object is available, but the underlying object shape is right upon construction + nonFixingMapper: eu + }; + return d.mapper = vnt(d), d.nonFixingMapper = bnt(d), d; + } + function vnt(r) { + return cpe( + gr(r.inferences, (a) => a.typeParameter), + gr(r.inferences, (a, l) => () => (a.isFixed || (Snt(r), T$(r.inferences), a.isFixed = !0), Jpe(r, l))) + ); + } + function bnt(r) { + return cpe( + gr(r.inferences, (a) => a.typeParameter), + gr(r.inferences, (a, l) => () => Jpe(r, l)) + ); + } + function T$(r) { + for (const a of r) + a.isFixed || (a.inferredType = void 0); + } + function Ipe(r, a, l) { + (r.intraExpressionInferenceSites ?? (r.intraExpressionInferenceSites = [])).push({ node: a, type: l }); + } + function Snt(r) { + if (r.intraExpressionInferenceSites) { + for (const { node: a, type: l } of r.intraExpressionInferenceSites) { + const f = a.kind === 174 ? qAe( + a, + 2 + /* NoConstraints */ + ) : a_( + a, + 2 + /* NoConstraints */ + ); + f && d0(r.inferences, l, f); + } + r.intraExpressionInferenceSites = void 0; + } + } + function Fpe(r) { + return { + typeParameter: r, + candidates: void 0, + contraCandidates: void 0, + inferredType: void 0, + priority: void 0, + topLevel: !0, + isFixed: !1, + impliedArity: void 0 + }; + } + function JNe(r) { + return { + typeParameter: r.typeParameter, + candidates: r.candidates && r.candidates.slice(), + contraCandidates: r.contraCandidates && r.contraCandidates.slice(), + inferredType: r.inferredType, + priority: r.priority, + topLevel: r.topLevel, + isFixed: r.isFixed, + impliedArity: r.impliedArity + }; + } + function Tnt(r) { + const a = kn(r.inferences, jE); + return a.length ? Ape(gr(a, JNe), r.signature, r.flags, r.compareTypes) : void 0; + } + function Ope(r) { + return r && r.mapper; + } + function U1(r) { + const a = Cn(r); + if (a & 524288) + return !!(a & 1048576); + const l = !!(r.flags & 465829888 || r.flags & 524288 && !zNe(r) && (a & 4 && (r.node || at(Po(r), U1)) || a & 134217728 && Ir(r.outerTypeParameters) || a & 16 && r.symbol && r.symbol.flags & 14384 && r.symbol.declarations || a & 12583968) || r.flags & 3145728 && !(r.flags & 1024) && !zNe(r) && at(r.types, U1)); + return r.flags & 3899393 && (r.objectFlags |= 524288 | (l ? 1048576 : 0)), l; + } + function zNe(r) { + if (r.aliasSymbol && !r.aliasTypeArguments) { + const a = Lo( + r.aliasSymbol, + 265 + /* TypeAliasDeclaration */ + ); + return !!(a && ur(a.parent, (l) => l.kind === 307 ? !0 : l.kind === 267 ? !1 : "quit")); + } + return !1; + } + function Z8(r, a, l = 0) { + return !!(r === a || r.flags & 3145728 && at(r.types, (f) => Z8(f, a, l)) || l < 3 && r.flags & 16777216 && (Z8(B1(r), a, l + 1) || Z8(J1(r), a, l + 1))); + } + function xnt(r, a) { + const l = bp(r); + return l ? !!l.type && Z8(l.type, a) : Z8(Ba(r), a); + } + function knt(r) { + const a = Us(); + RT(r, (f) => { + if (!(f.flags & 128)) + return; + const d = Zo(f.value), y = ca(4, d); + y.links.type = Je, f.symbol && (y.declarations = f.symbol.declarations, y.valueDeclaration = f.symbol.valueDeclaration), a.set(d, y); + }); + const l = r.flags & 4 ? [Cg( + de, + hs, + /*isReadonly*/ + !1 + )] : He; + return Ea( + /*symbol*/ + void 0, + a, + He, + He, + l + ); + } + function WNe(r, a, l) { + const f = r.id + "," + a.id + "," + l.id; + if (Uo.has(f)) + return Uo.get(f); + const d = Cnt(r, a, l); + return Uo.set(f, d), d; + } + function Lpe(r) { + return !(Cn(r) & 262144) || hy(r) && at(qa(r), (a) => Lpe(en(a))) || ga(r) && at(z2(r), Lpe); + } + function Cnt(r, a, l) { + if (!(ph(r, de) || qa(r).length !== 0 && Lpe(r))) + return; + if (Tp(r)) { + const d = x$(Po(r)[0], a, l); + return d ? mu(d, $w(r)) : void 0; + } + if (ga(r)) { + const d = gr(z2(r), (x) => x$(x, a, l)); + if (!Ri(d, (x) => !!x)) + return; + const y = Tg(a) & 4 ? Wc(r.target.elementFlags, (x) => x & 2 ? 1 : x) : r.target.elementFlags; + return Eg(d, y, r.target.readonly, r.target.labeledElementDeclarations); + } + const f = ce( + 1040, + /*symbol*/ + void 0 + ); + return f.source = r, f.mappedType = a, f.constraintType = l, f; + } + function Ent(r) { + const a = Ci(r); + return a.type || (a.type = x$(r.links.propertyType, r.links.mappedType, r.links.constraintType) || ye), a.type; + } + function Dnt(r, a, l) { + const f = j_(l.type, Ud(a)), d = s0(a), y = Fpe(f); + return d0([y], r, d), UNe(y) || ye; + } + function x$(r, a, l) { + const f = r.id + "," + a.id + "," + l.id; + if (Rc.has(f)) + return Rc.get(f) || ye; + nT.push(r), b2.push(a); + const d = Jv; + Qk(r, nT, nT.length, 2) && (Jv |= 1), Qk(a, b2, b2.length, 2) && (Jv |= 2); + let y; + return Jv !== 3 && (y = Dnt(r, a, l)), nT.pop(), b2.pop(), Jv = d, Rc.set(f, y), y; + } + function* Mpe(r, a, l, f) { + const d = qa(a); + for (const y of d) + if (!CPe(y) && (l || !(y.flags & 16777216 || rc(y) & 48))) { + const x = Ys(r, y.escapedName); + if (!x) + yield y; + else if (f) { + const I = en(y); + if (I.flags & 109472) { + const M = en(x); + M.flags & 1 || Vu(M) === Vu(I) || (yield y); + } + } + } + } + function Rpe(r, a, l, f) { + return pP(Mpe(r, a, l, f)); + } + function wnt(r, a) { + return !(a.target.combinedFlags & 8) && a.target.minLength > r.target.minLength || !(a.target.combinedFlags & 12) && (!!(r.target.combinedFlags & 12) || a.target.fixedLength < r.target.fixedLength); + } + function Pnt(r, a) { + return ga(r) && ga(a) ? wnt(r, a) : !!Rpe( + r, + a, + /*requireOptionalProperties*/ + !1, + /*matchDiscriminantProperties*/ + !0 + ) && !!Rpe( + a, + r, + /*requireOptionalProperties*/ + !1, + /*matchDiscriminantProperties*/ + !1 + ); + } + function UNe(r) { + return r.candidates ? Qn( + r.candidates, + 2 + /* Subtype */ + ) : r.contraCandidates ? ra(r.contraCandidates) : void 0; + } + function jpe(r) { + return !!yn(r).skipDirectInference; + } + function VNe(r) { + return !!(r.symbol && at(r.symbol.declarations, jpe)); + } + function Nnt(r, a) { + const l = r.texts[0], f = a.texts[0], d = r.texts[r.texts.length - 1], y = a.texts[a.texts.length - 1], x = Math.min(l.length, f.length), I = Math.min(d.length, y.length); + return l.slice(0, x) !== f.slice(0, x) || d.slice(d.length - I) !== y.slice(y.length - I); + } + function qNe(r, a) { + if (r === "") return !1; + const l = +r; + return isFinite(l) && (!a || "" + l === r); + } + function Ant(r) { + return iM(wJ(r)); + } + function k$(r, a) { + if (a.flags & 1) + return !0; + if (a.flags & 134217732) + return Ls(r, a); + if (a.flags & 268435456) { + const l = []; + for (; a.flags & 268435456; ) + l.unshift(a.symbol), a = a.type; + return qu(l, (d, y) => qk(y, d), r) === r && k$(r, a); + } + return !1; + } + function HNe(r, a) { + if (a.flags & 2097152) + return Ri(a.types, (l) => l === Zi || HNe(r, l)); + if (a.flags & 4 || Ls(r, a)) + return !0; + if (r.flags & 128) { + const l = r.value; + return !!(a.flags & 8 && qNe( + l, + /*roundTripOnly*/ + !1 + ) || a.flags & 64 && q5( + l, + /*roundTripOnly*/ + !1 + ) || a.flags & 98816 && l === a.intrinsicName || a.flags & 268435456 && k$(x_(l), a) || a.flags & 134217728 && C$(r, a)); + } + if (r.flags & 134217728) { + const l = r.texts; + return l.length === 2 && l[0] === "" && l[1] === "" && Ls(r.types[0], a); + } + return !1; + } + function GNe(r, a) { + return r.flags & 128 ? $Ne([r.value], He, a) : r.flags & 134217728 ? Ef(r.texts, a.texts) ? gr(r.types, (l, f) => Ls(xg(l), xg(a.types[f])) ? l : Int(l)) : $Ne(r.texts, r.types, a) : void 0; + } + function C$(r, a) { + const l = GNe(r, a); + return !!l && Ri(l, (f, d) => HNe(f, a.types[d])); + } + function Int(r) { + return r.flags & 402653317 ? r : DT(["", ""], [r]); + } + function $Ne(r, a, l) { + const f = r.length - 1, d = r[0], y = r[f], x = l.texts, I = x.length - 1, M = x[0], z = x[I]; + if (f === 0 && d.length < M.length + z.length || !d.startsWith(M) || !y.endsWith(z)) return; + const Y = y.slice(0, y.length - z.length), Se = []; + let pe = 0, Ze = M.length; + for (let or = 1; or < I; or++) { + const nr = x[or]; + if (nr.length > 0) { + let Kr = pe, Vr = Ze; + for (; Vr = dt(Kr).indexOf(nr, Vr), !(Vr >= 0); ) { + if (Kr++, Kr === r.length) return; + Vr = 0; + } + ht(Kr, Vr), Ze += nr.length; + } else if (Ze < dt(pe).length) + ht(pe, Ze + 1); + else if (pe < f) + ht(pe + 1, 0); + else + return; + } + return ht(f, dt(f).length), Se; + function dt(or) { + return or < f ? r[or] : Y; + } + function ht(or, nr) { + const Kr = or === pe ? x_(dt(or).slice(Ze, nr)) : DT( + [r[pe].slice(Ze), ...r.slice(pe + 1, or), dt(or).slice(0, nr)], + a.slice(pe, or) + ); + Se.push(Kr), pe = or, Ze = nr; + } + } + function Fnt(r, a) { + return ga(a) && NNe(a, 0) === j_(r, gd(0)) && !Pc(a, "1"); + } + function d0(r, a, l, f = 0, d = !1) { + let y = !1, x, I = 2048, M, z, Y, Se = 0; + pe(a, l); + function pe(Sr, Mr) { + if (!(!U1(Mr) || EE(Mr))) { + if (Sr === _t || Sr === yt) { + const vi = x; + x = Sr, pe(Mr, Mr), x = vi; + return; + } + if (Sr.aliasSymbol && Sr.aliasSymbol === Mr.aliasSymbol) { + if (Sr.aliasTypeArguments) { + const vi = Ci(Sr.aliasSymbol).typeParameters, Zr = kg(vi), ts = fy(Sr.aliasTypeArguments, vi, Zr, an(Sr.aliasSymbol.valueDeclaration)), Da = fy(Mr.aliasTypeArguments, vi, Zr, an(Sr.aliasSymbol.valueDeclaration)); + Kr(ts, Da, xNe(Sr.aliasSymbol)); + } + return; + } + if (Sr === Mr && Sr.flags & 3145728) { + for (const vi of Sr.types) + pe(vi, vi); + return; + } + if (Mr.flags & 1048576) { + const [vi, Zr] = nr(Sr.flags & 1048576 ? Sr.types : [Sr], Mr.types, Ont), [ts, Da] = nr(vi, Zr, Lnt); + if (Da.length === 0) + return; + if (Mr = Qn(Da), ts.length === 0) { + Ze( + Sr, + Mr, + 1 + /* NakedTypeVariable */ + ); + return; + } + Sr = Qn(ts); + } else if (Mr.flags & 2097152 && !Ri(Mr.types, ZG) && !(Sr.flags & 1048576)) { + const [vi, Zr] = nr(Sr.flags & 2097152 ? Sr.types : [Sr], Mr.types, gh); + if (vi.length === 0 || Zr.length === 0) + return; + Sr = ra(vi), Mr = ra(Zr); + } + if (Mr.flags & 41943040) { + if (EE(Mr)) + return; + Mr = l0(Mr); + } + if (Mr.flags & 8650752) { + if (VNe(Sr)) + return; + const vi = Yt(Mr); + if (vi) { + if (Cn(Sr) & 262144 || Sr === Xt) + return; + if (!vi.isFixed) { + const ts = x || Sr; + if (ts === yt) + return; + if ((vi.priority === void 0 || f < vi.priority) && (vi.candidates = void 0, vi.contraCandidates = void 0, vi.topLevel = !0, vi.priority = f), f === vi.priority) { + if (Fnt(vi.typeParameter, ts)) + return; + d && !y ? as(vi.contraCandidates, ts) || (vi.contraCandidates = Pr(vi.contraCandidates, ts), T$(r)) : as(vi.candidates, ts) || (vi.candidates = Pr(vi.candidates, ts), T$(r)); + } + !(f & 128) && Mr.flags & 262144 && vi.topLevel && !Z8(l, Mr) && (vi.topLevel = !1, T$(r)); + } + I = Math.min(I, f); + return; + } + const Zr = c0( + Mr, + /*writing*/ + !1 + ); + if (Zr !== Mr) + pe(Sr, Zr); + else if (Mr.flags & 8388608) { + const ts = c0( + Mr.indexType, + /*writing*/ + !1 + ); + if (ts.flags & 465829888) { + const Da = G3e( + c0( + Mr.objectType, + /*writing*/ + !1 + ), + ts, + /*writing*/ + !1 + ); + Da && Da !== Mr && pe(Sr, Da); + } + } + } + if (Cn(Sr) & 4 && Cn(Mr) & 4 && (Sr.target === Mr.target || Tp(Sr) && Tp(Mr)) && !(Sr.node && Mr.node)) + Kr(Po(Sr), Po(Mr), bpe(Sr.target)); + else if (Sr.flags & 4194304 && Mr.flags & 4194304) + Vr(Sr.type, Mr.type); + else if ((G8(Sr) || Sr.flags & 4) && Mr.flags & 4194304) { + const vi = knt(Sr); + dt( + vi, + Mr.type, + 256 + /* LiteralKeyof */ + ); + } else if (Sr.flags & 8388608 && Mr.flags & 8388608) + pe(Sr.objectType, Mr.objectType), pe(Sr.indexType, Mr.indexType); + else if (Sr.flags & 268435456 && Mr.flags & 268435456) + Sr.symbol === Mr.symbol && pe(Sr.type, Mr.type); + else if (Sr.flags & 33554432) + pe(Sr.baseType, Mr), Ze( + Lfe(Sr), + Mr, + 4 + /* SubstituteSource */ + ); + else if (Mr.flags & 16777216) + or(Sr, Mr, vn); + else if (Mr.flags & 3145728) + zn(Sr, Mr.types, Mr.flags); + else if (Sr.flags & 1048576) { + const vi = Sr.types; + for (const Zr of vi) + pe(Zr, Mr); + } else if (Mr.flags & 134217728) + Ts(Sr, Mr); + else { + if (Sr = md(Sr), T_(Sr) && T_(Mr) && or(Sr, Mr, bs), !(f & 512 && Sr.flags & 467927040)) { + const vi = Uu(Sr); + if (vi !== Sr && !(vi.flags & 2621440)) + return pe(vi, Mr); + Sr = vi; + } + Sr.flags & 2621440 && or(Sr, Mr, No); + } + } + } + function Ze(Sr, Mr, vi) { + const Zr = f; + f |= vi, pe(Sr, Mr), f = Zr; + } + function dt(Sr, Mr, vi) { + const Zr = f; + f |= vi, Vr(Sr, Mr), f = Zr; + } + function ht(Sr, Mr, vi, Zr) { + const ts = f; + f |= Zr, zn(Sr, Mr, vi), f = ts; + } + function or(Sr, Mr, vi) { + const Zr = Sr.id + "," + Mr.id, ts = M && M.get(Zr); + if (ts !== void 0) { + I = Math.min(I, ts); + return; + } + (M || (M = /* @__PURE__ */ new Map())).set( + Zr, + -1 + /* Circularity */ + ); + const Da = I; + I = 2048; + const ho = Se; + (z ?? (z = [])).push(Sr), (Y ?? (Y = [])).push(Mr), Qk(Sr, z, z.length, 2) && (Se |= 1), Qk(Mr, Y, Y.length, 2) && (Se |= 2), Se !== 3 ? vi(Sr, Mr) : I = -1, Y.pop(), z.pop(), Se = ho, M.set(Zr, I), I = Math.min(I, Da); + } + function nr(Sr, Mr, vi) { + let Zr, ts; + for (const Da of Mr) + for (const ho of Sr) + vi(ho, Da) && (pe(ho, Da), Zr = Sh(Zr, ho), ts = Sh(ts, Da)); + return [ + Zr ? kn(Sr, (Da) => !as(Zr, Da)) : Sr, + ts ? kn(Mr, (Da) => !as(ts, Da)) : Mr + ]; + } + function Kr(Sr, Mr, vi) { + const Zr = Sr.length < Mr.length ? Sr.length : Mr.length; + for (let ts = 0; ts < Zr; ts++) + ts < vi.length && (vi[ts] & 7) === 2 ? Vr(Sr[ts], Mr[ts]) : pe(Sr[ts], Mr[ts]); + } + function Vr(Sr, Mr) { + d = !d, pe(Sr, Mr), d = !d; + } + function cr(Sr, Mr) { + J || f & 1024 ? Vr(Sr, Mr) : pe(Sr, Mr); + } + function Yt(Sr) { + if (Sr.flags & 8650752) { + for (const Mr of r) + if (Sr === Mr.typeParameter) + return Mr; + } + } + function pn(Sr) { + let Mr; + for (const vi of Sr) { + const Zr = vi.flags & 2097152 && Pn(vi.types, (ts) => !!Yt(ts)); + if (!Zr || Mr && Zr !== Mr) + return; + Mr = Zr; + } + return Mr; + } + function zn(Sr, Mr, vi) { + let Zr = 0; + if (vi & 1048576) { + let ts; + const Da = Sr.flags & 1048576 ? Sr.types : [Sr], ho = new Array(Da.length); + let zc = !1; + for (const Ta of Mr) + if (Yt(Ta)) + ts = Ta, Zr++; + else + for (let k_ = 0; k_ < Da.length; k_++) { + const Nc = I; + I = 2048, pe(Da[k_], Ta), I === f && (ho[k_] = !0), zc = zc || I === -1, I = Math.min(I, Nc); + } + if (Zr === 0) { + const Ta = pn(Mr); + Ta && Ze( + Sr, + Ta, + 1 + /* NakedTypeVariable */ + ); + return; + } + if (Zr === 1 && !zc) { + const Ta = na(Da, (k_, Nc) => ho[Nc] ? void 0 : k_); + if (Ta.length) { + pe(Qn(Ta), ts); + return; + } + } + } else + for (const ts of Mr) + Yt(ts) ? Zr++ : pe(Sr, ts); + if (vi & 2097152 ? Zr === 1 : Zr > 0) + for (const ts of Mr) + Yt(ts) && Ze( + Sr, + ts, + 1 + /* NakedTypeVariable */ + ); + } + function ci(Sr, Mr, vi) { + if (vi.flags & 1048576 || vi.flags & 2097152) { + let Zr = !1; + for (const ts of vi.types) + Zr = ci(Sr, Mr, ts) || Zr; + return Zr; + } + if (vi.flags & 4194304) { + const Zr = Yt(vi.type); + if (Zr && !Zr.isFixed && !VNe(Sr)) { + const ts = WNe(Sr, Mr, vi); + ts && Ze( + ts, + Zr.typeParameter, + Cn(Sr) & 262144 ? 16 : 8 + /* HomomorphicMappedType */ + ); + } + return !0; + } + if (vi.flags & 262144) { + Ze( + Bm( + Sr, + /*indexFlags*/ + Sr.pattern ? 2 : 0 + /* None */ + ), + vi, + 32 + /* MappedTypeConstraint */ + ); + const Zr = kT(vi); + if (Zr && ci(Sr, Mr, Zr)) + return !0; + const ts = gr(qa(Sr), en), Da = gr(du(Sr), (ho) => ho !== En ? ho.type : Zt); + return pe(Qn(Wi(ts, Da)), s0(Mr)), !0; + } + return !1; + } + function vn(Sr, Mr) { + if (Sr.flags & 16777216) + pe(Sr.checkType, Mr.checkType), pe(Sr.extendsType, Mr.extendsType), pe(B1(Sr), B1(Mr)), pe(J1(Sr), J1(Mr)); + else { + const vi = [B1(Mr), J1(Mr)]; + ht(Sr, vi, Mr.flags, d ? 64 : 0); + } + } + function Ts(Sr, Mr) { + const vi = GNe(Sr, Mr), Zr = Mr.types; + if (vi || Ri(Mr.texts, (ts) => ts.length === 0)) + for (let ts = 0; ts < Zr.length; ts++) { + const Da = vi ? vi[ts] : Zt, ho = Zr[ts]; + if (Da.flags & 128 && ho.flags & 8650752) { + const zc = Yt(ho), Ta = zc ? iu(zc.typeParameter) : void 0; + if (Ta && !Ua(Ta)) { + const k_ = Ta.flags & 1048576 ? Ta.types : [Ta]; + let Nc = qu(k_, ($o, Tf) => $o | Tf.flags, 0); + if (!(Nc & 4)) { + const $o = Da.value; + Nc & 296 && !qNe( + $o, + /*roundTripOnly*/ + !0 + ) && (Nc &= -297), Nc & 2112 && !q5( + $o, + /*roundTripOnly*/ + !0 + ) && (Nc &= -2113); + const Tf = qu(k_, (yc, Ac) => Ac.flags & Nc ? yc.flags & 4 ? yc : Ac.flags & 4 ? Da : yc.flags & 134217728 ? yc : Ac.flags & 134217728 && C$(Da, Ac) ? Da : yc.flags & 268435456 ? yc : Ac.flags & 268435456 && $o === U3e(Ac.symbol, $o) ? Da : yc.flags & 128 ? yc : Ac.flags & 128 && Ac.value === $o ? Ac : yc.flags & 8 ? yc : Ac.flags & 8 ? gd(+$o) : yc.flags & 32 ? yc : Ac.flags & 32 ? gd(+$o) : yc.flags & 256 ? yc : Ac.flags & 256 && Ac.value === +$o ? Ac : yc.flags & 64 ? yc : Ac.flags & 64 ? Ant($o) : yc.flags & 2048 ? yc : Ac.flags & 2048 && qb(Ac.value) === $o ? Ac : yc.flags & 16 ? yc : Ac.flags & 16 ? $o === "true" ? Jr : $o === "false" ? Xr : ut : yc.flags & 512 ? yc : Ac.flags & 512 && Ac.intrinsicName === $o ? Ac : yc.flags & 32768 ? yc : Ac.flags & 32768 && Ac.intrinsicName === $o ? Ac : yc.flags & 65536 ? yc : Ac.flags & 65536 && Ac.intrinsicName === $o ? Ac : yc : yc, Zt); + if (!(Tf.flags & 131072)) { + pe(Tf, ho); + continue; + } + } + } + } + pe(Da, ho); + } + } + function bs(Sr, Mr) { + pe(Hf(Sr), Hf(Mr)), pe(s0(Sr), s0(Mr)); + const vi = uy(Sr), Zr = uy(Mr); + vi && Zr && pe(vi, Zr); + } + function No(Sr, Mr) { + var vi, Zr; + if (Cn(Sr) & 4 && Cn(Mr) & 4 && (Sr.target === Mr.target || Tp(Sr) && Tp(Mr))) { + Kr(Po(Sr), Po(Mr), bpe(Sr.target)); + return; + } + if (T_(Sr) && T_(Mr) && bs(Sr, Mr), Cn(Mr) & 32 && !Mr.declaration.nameType) { + const ts = Hf(Mr); + if (ci(Sr, Mr, ts)) + return; + } + if (!Pnt(Sr, Mr)) { + if (ob(Sr)) { + if (ga(Mr)) { + const ts = py(Sr), Da = py(Mr), ho = Po(Mr), zc = Mr.target.elementFlags; + if (ga(Sr) && ont(Sr, Mr)) { + for (let Nc = 0; Nc < Da; Nc++) + pe(Po(Sr)[Nc], ho[Nc]); + return; + } + const Ta = ga(Sr) ? Math.min(Sr.target.fixedLength, Mr.target.fixedLength) : 0, k_ = Math.min(ga(Sr) ? j8( + Sr.target, + 3 + /* Fixed */ + ) : 0, Mr.target.combinedFlags & 12 ? j8( + Mr.target, + 3 + /* Fixed */ + ) : 0); + for (let Nc = 0; Nc < Ta; Nc++) + pe(Po(Sr)[Nc], ho[Nc]); + if (!ga(Sr) || ts - Ta - k_ === 1 && Sr.target.elementFlags[Ta] & 4) { + const Nc = Po(Sr)[Ta]; + for (let $o = Ta; $o < Da - k_; $o++) + pe(zc[$o] & 8 ? mu(Nc) : Nc, ho[$o]); + } else { + const Nc = Da - Ta - k_; + if (Nc === 2) { + if (zc[Ta] & zc[Ta + 1] & 8) { + const $o = Yt(ho[Ta]); + $o && $o.impliedArity !== void 0 && (pe(Gw(Sr, Ta, k_ + ts - $o.impliedArity), ho[Ta]), pe(Gw(Sr, Ta + $o.impliedArity, k_), ho[Ta + 1])); + } else if (zc[Ta] & 8 && zc[Ta + 1] & 4) { + const $o = (vi = Yt(ho[Ta])) == null ? void 0 : vi.typeParameter, Tf = $o && iu($o); + if (Tf && ga(Tf) && !(Tf.target.combinedFlags & 12)) { + const yc = Tf.target.fixedLength; + pe(Gw(Sr, Ta, ts - (Ta + yc)), ho[Ta]), pe(Qw(Sr, Ta + yc, k_), ho[Ta + 1]); + } + } else if (zc[Ta] & 4 && zc[Ta + 1] & 8) { + const $o = (Zr = Yt(ho[Ta + 1])) == null ? void 0 : Zr.typeParameter, Tf = $o && iu($o); + if (Tf && ga(Tf) && !(Tf.target.combinedFlags & 12)) { + const yc = Tf.target.fixedLength, Ac = ts - j8( + Mr.target, + 3 + /* Fixed */ + ), by = Ac - yc, JE = Eg( + Po(Sr).slice(by, Ac), + Sr.target.elementFlags.slice(by, Ac), + /*readonly*/ + !1, + Sr.target.labeledElementDeclarations && Sr.target.labeledElementDeclarations.slice(by, Ac) + ); + pe(Qw(Sr, Ta, k_ + yc), ho[Ta]), pe(JE, ho[Ta + 1]); + } + } + } else if (Nc === 1 && zc[Ta] & 8) { + const $o = Mr.target.elementFlags[Da - 1] & 2, Tf = Gw(Sr, Ta, k_); + Ze(Tf, ho[Ta], $o ? 2 : 0); + } else if (Nc === 1 && zc[Ta] & 4) { + const $o = Qw(Sr, Ta, k_); + $o && pe($o, ho[Ta]); + } + } + for (let Nc = 0; Nc < k_; Nc++) + pe(Po(Sr)[ts - Nc - 1], ho[Da - Nc - 1]); + return; + } + if (Tp(Mr)) { + kl(Sr, Mr); + return; + } + } + ns(Sr, Mr), xl( + Sr, + Mr, + 0 + /* Call */ + ), xl( + Sr, + Mr, + 1 + /* Construct */ + ), kl(Sr, Mr); + } + } + function ns(Sr, Mr) { + const vi = _y(Mr); + for (const Zr of vi) { + const ts = Ys(Sr, Zr.escapedName); + ts && !at(ts.declarations, jpe) && pe( + p0(en(ts), !!(ts.flags & 16777216)), + p0(en(Zr), !!(Zr.flags & 16777216)) + ); + } + } + function xl(Sr, Mr, vi) { + const Zr = Ps(Sr, vi), ts = Zr.length; + if (ts > 0) { + const Da = Ps(Mr, vi), ho = Da.length; + for (let zc = 0; zc < ho; zc++) { + const Ta = Math.max(ts - ho + zc, 0); + Ko(Met(Zr[Ta]), R8(Da[zc])); + } + } + } + function Ko(Sr, Mr) { + if (!(Sr.flags & 64)) { + const vi = y, Zr = Mr.declaration ? Mr.declaration.kind : 0; + y = y || Zr === 174 || Zr === 173 || Zr === 176, Ppe(Sr, Mr, cr), y = vi; + } + Npe(Sr, Mr, pe); + } + function kl(Sr, Mr) { + const vi = Cn(Sr) & Cn(Mr) & 32 ? 8 : 0, Zr = du(Mr); + if (v$(Sr)) + for (const ts of Zr) { + const Da = []; + for (const ho of qa(Sr)) + if (zk(Vk( + ho, + 8576 + /* StringOrNumberLiteralOrUnique */ + ), ts.keyType)) { + const zc = en(ho); + Da.push(ho.flags & 16777216 ? y$(zc) : zc); + } + for (const ho of du(Sr)) + zk(ho.keyType, ts.keyType) && Da.push(ho.type); + Da.length && Ze(Qn(Da), ts.type, vi); + } + for (const ts of Zr) { + const Da = F8(Sr, ts.keyType); + Da && Ze(Da.type, ts.type, vi); + } + } + } + function Ont(r, a) { + return a === L ? r === a : gh(r, a) || !!(a.flags & 4 && r.flags & 128 || a.flags & 8 && r.flags & 256); + } + function Lnt(r, a) { + return !!(r.flags & 524288 && a.flags & 524288 && r.symbol && r.symbol === a.symbol || r.aliasSymbol && r.aliasTypeArguments && r.aliasSymbol === a.aliasSymbol); + } + function Mnt(r) { + const a = s_(r); + return !!a && hc( + a.flags & 16777216 ? vfe(a) : a, + 406978556 + /* StringMapping */ + ); + } + function hy(r) { + return !!(Cn(r) & 128); + } + function Bpe(r) { + return !!(Cn(r) & 16512); + } + function Rnt(r) { + if (r.length > 1) { + const a = kn(r, Bpe); + if (a.length) { + const l = Qn( + a, + 2 + /* Subtype */ + ); + return Wi(kn(r, (f) => !Bpe(f)), [l]); + } + } + return r; + } + function jnt(r) { + return r.priority & 416 ? ra(r.contraCandidates) : tnt(r.contraCandidates); + } + function Bnt(r, a) { + const l = Rnt(r.candidates), f = Mnt(r.typeParameter) || CT(r.typeParameter), d = !f && r.topLevel && (r.isFixed || !xnt(a, r.typeParameter)), y = f ? Wc(l, Vu) : d ? Wc(l, cb) : l, x = r.priority & 416 ? Qn( + y, + 2 + /* Subtype */ + ) : ent(y); + return cf(x); + } + function Jpe(r, a) { + const l = r.inferences[a]; + if (!l.inferredType) { + let f, d; + if (r.signature) { + const x = l.candidates ? Bnt(l, r.signature) : void 0, I = l.contraCandidates ? jnt(l) : void 0; + if (x || I) { + const M = x && (!I || !(x.flags & 131073) && at(l.contraCandidates, (z) => Ls(x, z)) && Ri(r.inferences, (z) => z !== l && s_(z.typeParameter) !== l.typeParameter || Ri(z.candidates, (Y) => Ls(Y, x)))); + f = M ? x : I, d = M ? I : x; + } else if (r.flags & 1) + f = fr; + else { + const M = j2(l.typeParameter); + M && (f = Bi(M, prt(frt(r, a), r.nonFixingMapper))); + } + } else + f = UNe(l); + l.inferredType = f || zpe(!!(r.flags & 2)); + const y = s_(l.typeParameter); + if (y) { + const x = Bi(y, r.nonFixingMapper); + (!f || !r.compareTypes(f, of(x, f))) && (l.inferredType = d && r.compareTypes(d, of(x, d)) ? d : x); + } + } + return l.inferredType; + } + function zpe(r) { + return r ? Je : ye; + } + function Wpe(r) { + const a = []; + for (let l = 0; l < r.inferences.length; l++) + a.push(Jpe(r, l)); + return a; + } + function XNe(r) { + switch (r.escapedText) { + case "document": + case "console": + return p.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom; + case "$": + return F.types ? p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig : p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery; + case "describe": + case "suite": + case "it": + case "test": + return F.types ? p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig : p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha; + case "process": + case "require": + case "Buffer": + case "module": + return F.types ? p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig : p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode; + case "Bun": + return F.types ? p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_and_then_add_bun_to_the_types_field_in_your_tsconfig : p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun; + case "Map": + case "Set": + case "Promise": + case "Symbol": + case "WeakMap": + case "WeakSet": + case "Iterator": + case "AsyncIterator": + case "SharedArrayBuffer": + case "Atomics": + case "AsyncIterable": + case "AsyncIterableIterator": + case "AsyncGenerator": + case "AsyncGeneratorFunction": + case "BigInt": + case "Reflect": + case "BigInt64Array": + case "BigUint64Array": + return p.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later; + case "await": + if (Fs(r.parent)) + return p.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function; + // falls through + default: + return r.parent.kind === 304 ? p.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer : p.Cannot_find_name_0; + } + } + function Nu(r) { + const a = yn(r); + return a.resolvedSymbol || (a.resolvedSymbol = !tc(r) && Dt( + r, + r, + 1160127, + XNe(r), + !x5(r), + /*excludeGlobals*/ + !1 + ) || Ve), a.resolvedSymbol; + } + function Upe(r) { + return !!(r.flags & 33554432 || ur(r, (a) => Yl(a) || jp(a) || Qu(a))); + } + function yM(r, a, l, f) { + switch (r.kind) { + case 80: + if (!Jb(r)) { + const x = Nu(r); + return x !== Ve ? `${f ? Aa(f) : "-1"}|${jl(a)}|${jl(l)}|${Zs(x)}` : void 0; + } + // falls through + case 110: + return `0|${f ? Aa(f) : "-1"}|${jl(a)}|${jl(l)}`; + case 235: + case 217: + return yM(r.expression, a, l, f); + case 166: + const d = yM(r.left, a, l, f); + return d && `${d}.${r.right.escapedText}`; + case 211: + case 212: + const y = OT(r); + if (y !== void 0) { + const x = yM(r.expression, a, l, f); + return x && `${x}.${y}`; + } + if (fo(r) && Me(r.argumentExpression)) { + const x = Nu(r.argumentExpression); + if (Yk(x) || rI(x) && !tI(x)) { + const I = yM(r.expression, a, l, f); + return I && `${I}.@${Zs(x)}`; + } + } + break; + case 206: + case 207: + case 262: + case 218: + case 219: + case 174: + return `${Aa(r)}#${jl(a)}`; + } + } + function Bl(r, a) { + switch (a.kind) { + case 217: + case 235: + return Bl(r, a.expression); + case 226: + return Cl(a) && Bl(r, a.left) || fn(a) && a.operatorToken.kind === 28 && Bl(r, a.right); + } + switch (r.kind) { + case 236: + return a.kind === 236 && r.keywordToken === a.keywordToken && r.name.escapedText === a.name.escapedText; + case 80: + case 81: + return Jb(r) ? a.kind === 110 : a.kind === 80 && Nu(r) === Nu(a) || (Kn(a) || ma(a)) && gl(Nu(r)) === dn(a); + case 110: + return a.kind === 110; + case 108: + return a.kind === 108; + case 235: + case 217: + return Bl(r.expression, a); + case 211: + case 212: + const l = OT(r); + if (l !== void 0) { + const f = vo(a) ? OT(a) : void 0; + if (f !== void 0) + return f === l && Bl(r.expression, a.expression); + } + if (fo(r) && fo(a) && Me(r.argumentExpression) && Me(a.argumentExpression)) { + const f = Nu(r.argumentExpression); + if (f === Nu(a.argumentExpression) && (Yk(f) || rI(f) && !tI(f))) + return Bl(r.expression, a.expression); + } + break; + case 166: + return vo(a) && r.right.escapedText === OT(a) && Bl(r.left, a.expression); + case 226: + return fn(r) && r.operatorToken.kind === 28 && Bl(r.right, a); + } + return !1; + } + function OT(r) { + if (Tn(r)) + return r.name.escapedText; + if (fo(r)) + return Jnt(r); + if (ma(r)) { + const a = ui(r); + return a ? Zo(a) : void 0; + } + if (Ii(r)) + return "" + r.parent.parameters.indexOf(r); + } + function Vpe(r) { + return r.flags & 8192 ? r.escapedName : r.flags & 384 ? Zo("" + r.value) : void 0; + } + function Jnt(r) { + return wf(r.argumentExpression) ? Zo(r.argumentExpression.text) : _o(r.argumentExpression) ? znt(r.argumentExpression) : void 0; + } + function znt(r) { + const a = oc( + r, + 111551, + /*ignoreErrors*/ + !0 + ); + if (!a || !(Yk(a) || a.flags & 8)) return; + const l = a.valueDeclaration; + if (l === void 0) return; + const f = qf(l); + if (f) { + const d = Vpe(f); + if (d !== void 0) + return d; + } + if (fS(l) && ny(l, r)) { + const d = d3(l); + if (d) { + const y = Ds(l.parent) ? qi(l) : au(d); + return y && Vpe(y); + } + if (j0(l)) + return _x(l.name); + } + } + function QNe(r, a) { + for (; vo(r); ) + if (r = r.expression, Bl(r, a)) + return !0; + return !1; + } + function LT(r, a) { + for (; vu(r); ) + if (r = r.expression, Bl(r, a)) + return !0; + return !1; + } + function Yw(r, a) { + if (r && r.flags & 1048576) { + const l = qPe(r, a); + if (l && rc(l) & 2) + return l.links.isDiscriminantProperty === void 0 && (l.links.isDiscriminantProperty = (l.links.checkFlags & 192) === 192 && !sb(en(l))), !!l.links.isDiscriminantProperty; + } + return !1; + } + function YNe(r, a) { + let l; + for (const f of r) + if (Yw(a, f.escapedName)) { + if (l) { + l.push(f); + continue; + } + l = [f]; + } + return l; + } + function Wnt(r, a) { + const l = /* @__PURE__ */ new Map(); + let f = 0; + for (const d of r) + if (d.flags & 61603840) { + const y = Pc(d, a); + if (y) { + if (!G8(y)) + return; + let x = !1; + RT(y, (I) => { + const M = jl(Vu(I)), z = l.get(M); + z ? z !== ye && (l.set(M, ye), x = !0) : l.set(M, d); + }), x || f++; + } + } + return f >= 10 && f * 2 >= r.length ? l : void 0; + } + function vM(r) { + const a = r.types; + if (!(a.length < 10 || Cn(r) & 32768 || b0(a, (l) => !!(l.flags & 59506688)) < 10)) { + if (r.keyPropertyName === void 0) { + const l = lr(a, (d) => d.flags & 59506688 ? lr(qa(d), (y) => qd(en(y)) ? y.escapedName : void 0) : void 0), f = l && Wnt(a, l); + r.keyPropertyName = f ? l : "", r.constituentMap = f; + } + return r.keyPropertyName.length ? r.keyPropertyName : void 0; + } + } + function bM(r, a) { + var l; + const f = (l = r.constituentMap) == null ? void 0 : l.get(jl(Vu(a))); + return f !== ye ? f : void 0; + } + function ZNe(r, a) { + const l = vM(r), f = l && Pc(a, l); + return f && bM(r, f); + } + function Unt(r, a) { + const l = vM(r), f = l && Pn(a.properties, (y) => y.symbol && y.kind === 303 && y.symbol.escapedName === l && PM(y.initializer)), d = f && XM(f.initializer); + return d && bM(r, d); + } + function KNe(r, a) { + return Bl(r, a) || QNe(r, a); + } + function eAe(r, a) { + if (r.arguments) { + for (const l of r.arguments) + if (KNe(a, l) || LT(l, a)) + return !0; + } + return !!(r.expression.kind === 211 && KNe(a, r.expression.expression)); + } + function qpe(r) { + return r.id <= 0 && (r.id = h1e, h1e++), r.id; + } + function Vnt(r, a) { + if (!(r.flags & 1048576)) + return Ls(r, a); + for (const l of r.types) + if (Ls(l, a)) + return !0; + return !1; + } + function qnt(r, a) { + if (r === a) + return r; + if (a.flags & 131072) + return a; + const l = `A${jl(r)},${jl(a)}`; + return Bd(l) ?? K0(l, Hnt(r, a)); + } + function Hnt(r, a) { + const l = Jc(r, (d) => Vnt(a, d)), f = a.flags & 512 && U2(a) ? Vo(l, Gk) : l; + return Ls(a, f) ? f : r; + } + function Hpe(r) { + if (Cn(r) & 256) + return !1; + const a = Vd(r); + return !!(a.callSignatures.length || a.constructSignatures.length || a.members.get("bind") && H2(r, Rl)); + } + function NE(r, a) { + return Gpe(r, a) & a; + } + function Hd(r, a) { + return NE(r, a) !== 0; + } + function Gpe(r, a) { + r.flags & 467927040 && (r = iu(r) || ye); + const l = r.flags; + if (l & 268435460) + return Z ? 16317953 : 16776705; + if (l & 134217856) { + const f = l & 128 && r.value === ""; + return Z ? f ? 12123649 : 7929345 : f ? 12582401 : 16776705; + } + if (l & 40) + return Z ? 16317698 : 16776450; + if (l & 256) { + const f = r.value === 0; + return Z ? f ? 12123394 : 7929090 : f ? 12582146 : 16776450; + } + if (l & 64) + return Z ? 16317188 : 16775940; + if (l & 2048) { + const f = LNe(r); + return Z ? f ? 12122884 : 7928580 : f ? 12581636 : 16775940; + } + return l & 16 ? Z ? 16316168 : 16774920 : l & 528 ? Z ? r === Xr || r === Rr ? 12121864 : 7927560 : r === Xr || r === Rr ? 12580616 : 16774920 : l & 524288 ? a & (Z ? 83427327 : 83886079) ? Cn(r) & 16 && u0(r) ? Z ? 83427327 : 83886079 : Hpe(r) ? Z ? 7880640 : 16728e3 : Z ? 7888800 : 16736160 : 0 : l & 16384 ? 9830144 : l & 32768 ? 26607360 : l & 65536 ? 42917664 : l & 12288 ? Z ? 7925520 : 16772880 : l & 67108864 ? Z ? 7888800 : 16736160 : l & 131072 ? 0 : l & 1048576 ? qu( + r.types, + (f, d) => f | Gpe(d, a), + 0 + /* None */ + ) : l & 2097152 ? Gnt(r, a) : 83886079; + } + function Gnt(r, a) { + const l = hc( + r, + 402784252 + /* Primitive */ + ); + let f = 0, d = 134217727; + for (const y of r.types) + if (!(l && y.flags & 524288)) { + const x = Gpe(y, a); + f |= x, d &= x; + } + return f & 8256 | d & 134209471; + } + function xp(r, a) { + return Jc(r, (l) => Hd(l, a)); + } + function MT(r, a) { + const l = rAe(xp(Z && r.flags & 2 ? Ca : r, a)); + if (Z) + switch (a) { + case 524288: + return tAe(l, 65536, 131072, 33554432, lt); + case 1048576: + return tAe(l, 131072, 65536, 16777216, ft); + case 2097152: + case 4194304: + return Vo(l, (f) => Hd( + f, + 262144 + /* EQUndefinedOrNull */ + ) ? unt(f) : f); + } + return l; + } + function tAe(r, a, l, f, d) { + const y = NE( + r, + 50528256 + /* IsNull */ + ); + if (!(y & a)) + return r; + const x = Qn([hs, d]); + return Vo(r, (I) => Hd(I, a) ? ra([I, !(y & f) && Hd(I, l) ? x : hs]) : I); + } + function rAe(r) { + return r === Ca ? ye : r; + } + function $pe(r, a) { + return a ? Qn([Wt(r), au(a)]) : r; + } + function nAe(r, a) { + var l; + const f = o0(a); + if (!ap(f)) return We; + const d = op(f); + return Pc(r, d) || K8((l = Wk(r, d)) == null ? void 0 : l.type) || We; + } + function iAe(r, a) { + return J_(r, Xw) && NNe(r, a) || K8(yy( + 65, + r, + ft, + /*errorNode*/ + void 0 + )) || We; + } + function K8(r) { + return r && (F.noUncheckedIndexedAccess ? Qn([r, L]) : r); + } + function sAe(r) { + return mu(yy( + 65, + r, + ft, + /*errorNode*/ + void 0 + ) || We); + } + function $nt(r) { + return r.parent.kind === 209 && Xpe(r.parent) || r.parent.kind === 303 && Xpe(r.parent.parent) ? $pe(SM(r), r.right) : au(r.right); + } + function Xpe(r) { + return r.parent.kind === 226 && r.parent.left === r || r.parent.kind === 250 && r.parent.initializer === r; + } + function Xnt(r, a) { + return iAe(SM(r), r.elements.indexOf(a)); + } + function Qnt(r) { + return sAe(SM(r.parent)); + } + function aAe(r) { + return nAe(SM(r.parent), r.name); + } + function Ynt(r) { + return $pe(aAe(r), r.objectAssignmentInitializer); + } + function SM(r) { + const { parent: a } = r; + switch (a.kind) { + case 249: + return de; + case 250: + return tR(a) || We; + case 226: + return $nt(a); + case 220: + return ft; + case 209: + return Xnt(a, r); + case 230: + return Qnt(a); + case 303: + return aAe(a); + case 304: + return Ynt(a); + } + return We; + } + function Znt(r) { + const a = r.parent, l = cAe(a.parent), f = a.kind === 206 ? nAe(l, r.propertyName || r.name) : r.dotDotDotToken ? sAe(l) : iAe(l, a.elements.indexOf(r)); + return $pe(f, r.initializer); + } + function oAe(r) { + return yn(r).resolvedType || au(r); + } + function Knt(r) { + return r.initializer ? oAe(r.initializer) : r.parent.parent.kind === 249 ? de : r.parent.parent.kind === 250 && tR(r.parent.parent) || We; + } + function cAe(r) { + return r.kind === 260 ? Knt(r) : Znt(r); + } + function eit(r) { + return r.kind === 260 && r.initializer && yp(r.initializer) || r.kind !== 208 && r.parent.kind === 226 && yp(r.parent.right); + } + function G2(r) { + switch (r.kind) { + case 217: + return G2(r.expression); + case 226: + switch (r.operatorToken.kind) { + case 64: + case 76: + case 77: + case 78: + return G2(r.left); + case 28: + return G2(r.right); + } + } + return r; + } + function lAe(r) { + const { parent: a } = r; + return a.kind === 217 || a.kind === 226 && a.operatorToken.kind === 64 && a.left === r || a.kind === 226 && a.operatorToken.kind === 28 && a.right === r ? lAe(a) : r; + } + function tit(r) { + return r.kind === 296 ? Vu(au(r.expression)) : Zt; + } + function E$(r) { + const a = yn(r); + if (!a.switchTypes) { + a.switchTypes = []; + for (const l of r.caseBlock.clauses) + a.switchTypes.push(tit(l)); + } + return a.switchTypes; + } + function uAe(r) { + if (at(r.caseBlock.clauses, (l) => l.kind === 296 && !Na(l.expression))) + return; + const a = []; + for (const l of r.caseBlock.clauses) { + const f = l.kind === 296 ? l.expression.text : void 0; + a.push(f && !as(a, f) ? f : void 0); + } + return a; + } + function rit(r, a) { + return r.flags & 1048576 ? !lr(r.types, (l) => !as(a, l)) : as(a, r); + } + function Zw(r, a) { + return !!(r === a || r.flags & 131072 || a.flags & 1048576 && nit(r, a)); + } + function nit(r, a) { + if (r.flags & 1048576) { + for (const l of r.types) + if (!dh(a.types, l)) + return !1; + return !0; + } + return r.flags & 1056 && FG(r) === a ? !0 : dh(a.types, r); + } + function RT(r, a) { + return r.flags & 1048576 ? lr(r.types, a) : a(r); + } + function kp(r, a) { + return r.flags & 1048576 ? at(r.types, a) : a(r); + } + function J_(r, a) { + return r.flags & 1048576 ? Ri(r.types, a) : a(r); + } + function iit(r, a) { + return r.flags & 3145728 ? Ri(r.types, a) : a(r); + } + function Jc(r, a) { + if (r.flags & 1048576) { + const l = r.types, f = kn(l, a); + if (f === l) + return r; + const d = r.origin; + let y; + if (d && d.flags & 1048576) { + const x = d.types, I = kn(x, (M) => !!(M.flags & 1048576) || a(M)); + if (x.length - I.length === l.length - f.length) { + if (I.length === 1) + return I[0]; + y = Gfe(1048576, I); + } + } + return Xfe( + f, + r.objectFlags & 16809984, + /*aliasSymbol*/ + void 0, + /*aliasTypeArguments*/ + void 0, + y + ); + } + return r.flags & 131072 || a(r) ? r : Zt; + } + function D$(r, a) { + return Jc(r, (l) => l !== a); + } + function sit(r) { + return r.flags & 1048576 ? r.types.length : 1; + } + function Vo(r, a, l) { + if (r.flags & 131072) + return r; + if (!(r.flags & 1048576)) + return a(r); + const f = r.origin, d = f && f.flags & 1048576 ? f.types : r.types; + let y, x = !1; + for (const I of d) { + const M = I.flags & 1048576 ? Vo(I, a, l) : a(I); + x || (x = I !== M), M && (y ? y.push(M) : y = [M]); + } + return x ? y && Qn( + y, + l ? 0 : 1 + /* Literal */ + ) : r; + } + function _Ae(r, a, l, f) { + return r.flags & 1048576 && l ? Qn(gr(r.types, a), 1, l, f) : Vo(r, a); + } + function Kw(r, a) { + return Jc(r, (l) => (l.flags & a) !== 0); + } + function fAe(r, a) { + return hc( + r, + 134217804 + /* BigInt */ + ) && hc( + a, + 402655616 + /* BigIntLiteral */ + ) ? Vo(r, (l) => l.flags & 4 ? Kw( + a, + 402653316 + /* StringMapping */ + ) : wT(l) && !hc( + a, + 402653188 + /* StringMapping */ + ) ? Kw( + a, + 128 + /* StringLiteral */ + ) : l.flags & 8 ? Kw( + a, + 264 + /* NumberLiteral */ + ) : l.flags & 64 ? Kw( + a, + 2112 + /* BigIntLiteral */ + ) : l) : r; + } + function AE(r) { + return r.flags === 0; + } + function jT(r) { + return r.flags === 0 ? r.type : r; + } + function IE(r, a) { + return a ? { flags: 0, type: r.flags & 131072 ? fr : r } : r; + } + function ait(r) { + const a = ce( + 256 + /* EvolvingArray */ + ); + return a.elementType = r, a; + } + function Qpe(r) { + return Qe[r.id] || (Qe[r.id] = ait(r)); + } + function pAe(r, a) { + const l = Q8(_0(XM(a))); + return Zw(l, r.elementType) ? r : Qpe(Qn([r.elementType, l])); + } + function oit(r) { + return r.flags & 131072 ? mo : mu( + r.flags & 1048576 ? Qn( + r.types, + 2 + /* Subtype */ + ) : r + ); + } + function cit(r) { + return r.finalArrayType || (r.finalArrayType = oit(r.elementType)); + } + function TM(r) { + return Cn(r) & 256 ? cit(r) : r; + } + function lit(r) { + return Cn(r) & 256 ? r.elementType : Zt; + } + function uit(r) { + let a = !1; + for (const l of r) + if (!(l.flags & 131072)) { + if (!(Cn(l) & 256)) + return !1; + a = !0; + } + return a; + } + function dAe(r) { + const a = lAe(r), l = a.parent, f = Tn(l) && (l.name.escapedText === "length" || l.parent.kind === 213 && Me(l.name) && NB(l.name)), d = l.kind === 212 && l.expression === a && l.parent.kind === 226 && l.parent.operatorToken.kind === 64 && l.parent.left === l && !$y(l.parent) && su( + au(l.argumentExpression), + 296 + /* NumberLike */ + ); + return f || d; + } + function _it(r) { + return (Kn(r) || ss(r) || m_(r) || Ii(r)) && !!(qc(r) || an(r) && C0(r) && r.initializer && Ky(r.initializer) && pf(r.initializer)); + } + function w$(r, a) { + if (r = jc(r), r.flags & 8752) + return en(r); + if (r.flags & 7) { + if (rc(r) & 262144) { + const f = r.links.syntheticOrigin; + if (f && w$(f)) + return en(r); + } + const l = r.valueDeclaration; + if (l) { + if (_it(l)) + return en(r); + if (Kn(l) && l.parent.parent.kind === 250) { + const f = l.parent.parent, d = xM( + f.expression, + /*diagnostic*/ + void 0 + ); + if (d) { + const y = f.awaitModifier ? 15 : 13; + return yy( + y, + d, + ft, + /*errorNode*/ + void 0 + ); + } + } + a && Bs(a, tn(l, p._0_needs_an_explicit_type_annotation, Ui(r))); + } + } + } + function xM(r, a) { + if (!(r.flags & 67108864)) + switch (r.kind) { + case 80: + const l = gl(Nu(r)); + return w$(l, a); + case 110: + return Iit(r); + case 108: + return O$(r); + case 211: { + const f = xM(r.expression, a); + if (f) { + const d = r.name; + let y; + if (Ni(d)) { + if (!f.symbol) + return; + y = Ys(f, P3(f.symbol, d.escapedText)); + } else + y = Ys(f, d.escapedText); + return y && w$(y, a); + } + return; + } + case 217: + return xM(r.expression, a); + } + } + function kM(r) { + const a = yn(r); + let l = a.effectsSignature; + if (l === void 0) { + let f; + if (fn(r)) { + const x = OE(r.right); + f = Yde(x); + } else r.parent.kind === 244 ? f = xM( + r.expression, + /*diagnostic*/ + void 0 + ) : r.expression.kind !== 108 && (vu(r) ? f = zm( + $8(Gi(r.expression), r.expression), + r.expression + ) : f = OE(r.expression)); + const d = Ps( + f && Uu(f) || ye, + 0 + /* Call */ + ), y = d.length === 1 && !d[0].typeParameters ? d[0] : at(d, mAe) ? ME(r) : void 0; + l = a.effectsSignature = y && mAe(y) ? y : Yr; + } + return l === Yr ? void 0 : l; + } + function mAe(r) { + return !!(bp(r) || r.declaration && (xE(r.declaration) || ye).flags & 131072); + } + function fit(r, a) { + if (r.kind === 1 || r.kind === 3) + return a.arguments[r.parameterIndex]; + const l = za(a.expression); + return vo(l) ? za(l.expression) : void 0; + } + function pit(r) { + const a = ur(r, Fj), l = Cr(r), f = rm(l, a.statements.pos); + Pa.add(ol(l, f.start, f.length, p.The_containing_function_or_module_body_is_too_large_for_control_flow_analysis)); + } + function CM(r) { + const a = P$( + r, + /*noCacheCheck*/ + !1 + ); + return dp = r, g1 = a, a; + } + function EM(r) { + const a = za( + r, + /*excludeJSDocTypeAssertions*/ + !0 + ); + return a.kind === 97 || a.kind === 226 && (a.operatorToken.kind === 56 && (EM(a.left) || EM(a.right)) || a.operatorToken.kind === 57 && EM(a.left) && EM(a.right)); + } + function P$(r, a) { + for (; ; ) { + if (r === dp) + return g1; + const l = r.flags; + if (l & 4096) { + if (!a) { + const f = qpe(r), d = Bv[f]; + return d !== void 0 ? d : Bv[f] = P$( + r, + /*noCacheCheck*/ + !0 + ); + } + a = !1; + } + if (l & 368) + r = r.antecedent; + else if (l & 512) { + const f = kM(r.node); + if (f) { + const d = bp(f); + if (d && d.kind === 3 && !d.type) { + const y = r.node.arguments[d.parameterIndex]; + if (y && EM(y)) + return !1; + } + if (Ba(f).flags & 131072) + return !1; + } + r = r.antecedent; + } else { + if (l & 4) + return at(r.antecedent, (f) => P$( + f, + /*noCacheCheck*/ + !1 + )); + if (l & 8) { + const f = r.antecedent; + if (f === void 0 || f.length === 0) + return !1; + r = f[0]; + } else if (l & 128) { + const f = r.node; + if (f.clauseStart === f.clauseEnd && oIe(f.switchStatement)) + return !1; + r = r.antecedent; + } else if (l & 1024) { + dp = void 0; + const f = r.node.target, d = f.antecedent; + f.antecedent = r.node.antecedents; + const y = P$( + r.antecedent, + /*noCacheCheck*/ + !1 + ); + return f.antecedent = d, y; + } else + return !(l & 1); + } + } + } + function N$(r, a) { + for (; ; ) { + const l = r.flags; + if (l & 4096) { + if (!a) { + const f = qpe(r), d = fg[f]; + return d !== void 0 ? d : fg[f] = N$( + r, + /*noCacheCheck*/ + !0 + ); + } + a = !1; + } + if (l & 496) + r = r.antecedent; + else if (l & 512) { + if (r.node.expression.kind === 108) + return !0; + r = r.antecedent; + } else { + if (l & 4) + return Ri(r.antecedent, (f) => N$( + f, + /*noCacheCheck*/ + !1 + )); + if (l & 8) + r = r.antecedent[0]; + else if (l & 1024) { + const f = r.node.target, d = f.antecedent; + f.antecedent = r.node.antecedents; + const y = N$( + r.antecedent, + /*noCacheCheck*/ + !1 + ); + return f.antecedent = d, y; + } else + return !!(l & 1); + } + } + } + function Ype(r) { + switch (r.kind) { + case 110: + return !0; + case 80: + if (!Jb(r)) { + const l = Nu(r); + return Yk(l) || rI(l) && !tI(l) || !!l.valueDeclaration && po(l.valueDeclaration); + } + break; + case 211: + case 212: + return Ype(r.expression) && Xd(yn(r).resolvedSymbol || Ve); + case 206: + case 207: + const a = om(r.parent); + return Ii(a) || Fee(a) ? !Zpe(a) : Kn(a) && CI(a); + } + return !1; + } + function m0(r, a, l = a, f, d = ((y) => (y = jn(r, L4)) == null ? void 0 : y.flowNode)()) { + let y, x = !1, I = 0; + if ($0) + return We; + if (!d) + return a; + m1++; + const M = Em, z = jT(pe(d)); + Em = M; + const Y = Cn(z) & 256 && dAe(r) ? mo : TM(z); + if (Y === ir || r.parent && r.parent.kind === 235 && !(Y.flags & 131072) && xp( + Y, + 2097152 + /* NEUndefinedOrNull */ + ).flags & 131072) + return a; + return Y; + function Se() { + return x ? y : (x = !0, y = yM(r, a, l, f)); + } + function pe(Nt) { + var mr; + if (I === 2e3) + return (mr = nn) == null || mr.instant(nn.Phase.CheckTypes, "getTypeAtFlowNode_DepthLimit", { flowId: Nt.id }), $0 = !0, pit(r), We; + I++; + let Fr; + for (; ; ) { + const Qr = Nt.flags; + if (Qr & 4096) { + for (let be = M; be < Em; be++) + if (i_[be] === Nt) + return I--, jv[be]; + Fr = Nt; + } + let bn; + if (Qr & 16) { + if (bn = dt(Nt), !bn) { + Nt = Nt.antecedent; + continue; + } + } else if (Qr & 512) { + if (bn = or(Nt), !bn) { + Nt = Nt.antecedent; + continue; + } + } else if (Qr & 96) + bn = Kr(Nt); + else if (Qr & 128) + bn = Vr(Nt); + else if (Qr & 12) { + if (Nt.antecedent.length === 1) { + Nt = Nt.antecedent[0]; + continue; + } + bn = Qr & 4 ? cr(Nt) : Yt(Nt); + } else if (Qr & 256) { + if (bn = nr(Nt), !bn) { + Nt = Nt.antecedent; + continue; + } + } else if (Qr & 1024) { + const be = Nt.node.target, se = be.antecedent; + be.antecedent = Nt.node.antecedents, bn = pe(Nt.antecedent), be.antecedent = se; + } else if (Qr & 2) { + const be = Nt.node; + if (be && be !== f && r.kind !== 211 && r.kind !== 212 && !(r.kind === 110 && be.kind !== 219)) { + Nt = be.flowNode; + continue; + } + bn = l; + } else + bn = SI(a); + return Fr && (i_[Em] = Fr, jv[Em] = bn, Em++), I--, bn; + } + } + function Ze(Nt) { + const mr = Nt.node; + return Kpe( + mr.kind === 260 || mr.kind === 208 ? cAe(mr) : SM(mr), + r + ); + } + function dt(Nt) { + const mr = Nt.node; + if (Bl(r, mr)) { + if (!CM(Nt)) + return ir; + if (Gy(mr) === 2) { + const Qr = pe(Nt.antecedent); + return IE(_0(jT(Qr)), AE(Qr)); + } + if (a === Ye || a === mo) { + if (eit(mr)) + return Qpe(Zt); + const Qr = cb(Ze(Nt)); + return Ls(Qr, a) ? Qr : Va; + } + const Fr = TB(mr) ? _0(a) : a; + return Fr.flags & 1048576 ? qnt(Fr, Ze(Nt)) : Fr; + } + if (QNe(r, mr)) { + if (!CM(Nt)) + return ir; + if (Kn(mr) && (an(mr) || CI(mr))) { + const Fr = F4(mr); + if (Fr && (Fr.kind === 218 || Fr.kind === 219)) + return pe(Nt.antecedent); + } + return a; + } + if (Kn(mr) && mr.parent.parent.kind === 249 && (Bl(r, mr.parent.parent.expression) || LT(mr.parent.parent.expression, r))) + return bde(TM(jT(pe(Nt.antecedent)))); + } + function ht(Nt, mr) { + const Fr = za( + mr, + /*excludeJSDocTypeAssertions*/ + !0 + ); + if (Fr.kind === 97) + return ir; + if (Fr.kind === 226) { + if (Fr.operatorToken.kind === 56) + return ht(ht(Nt, Fr.left), Fr.right); + if (Fr.operatorToken.kind === 57) + return Qn([ht(Nt, Fr.left), ht(Nt, Fr.right)]); + } + return xf( + Nt, + Fr, + /*assumeTrue*/ + !0 + ); + } + function or(Nt) { + const mr = kM(Nt.node); + if (mr) { + const Fr = bp(mr); + if (Fr && (Fr.kind === 2 || Fr.kind === 3)) { + const Qr = pe(Nt.antecedent), bn = TM(jT(Qr)), be = Fr.type ? EI( + bn, + Fr, + Nt.node, + /*assumeTrue*/ + !0 + ) : Fr.kind === 3 && Fr.parameterIndex >= 0 && Fr.parameterIndex < Nt.node.arguments.length ? ht(bn, Nt.node.arguments[Fr.parameterIndex]) : bn; + return be === bn ? Qr : IE(be, AE(Qr)); + } + if (Ba(mr).flags & 131072) + return ir; + } + } + function nr(Nt) { + if (a === Ye || a === mo) { + const mr = Nt.node, Fr = mr.kind === 213 ? mr.expression.expression : mr.left.expression; + if (Bl(r, G2(Fr))) { + const Qr = pe(Nt.antecedent), bn = jT(Qr); + if (Cn(bn) & 256) { + let be = bn; + if (mr.kind === 213) + for (const se of mr.arguments) + be = pAe(be, se); + else { + const se = XM(mr.left.argumentExpression); + su( + se, + 296 + /* NumberLike */ + ) && (be = pAe(be, mr.right)); + } + return be === bn ? Qr : IE(be, AE(Qr)); + } + return Qr; + } + } + } + function Kr(Nt) { + const mr = pe(Nt.antecedent), Fr = jT(mr); + if (Fr.flags & 131072) + return mr; + const Qr = (Nt.flags & 32) !== 0, bn = TM(Fr), be = xf(bn, Nt.node, Qr); + return be === bn ? mr : IE(be, AE(mr)); + } + function Vr(Nt) { + const mr = za(Nt.node.switchStatement.expression), Fr = pe(Nt.antecedent); + let Qr = jT(Fr); + if (Bl(r, mr)) + Qr = ho(Qr, Nt.node); + else if (mr.kind === 221 && Bl(r, mr.expression)) + Qr = k_(Qr, Nt.node); + else if (mr.kind === 112) + Qr = Nc(Qr, Nt.node); + else { + Z && (LT(mr, r) ? Qr = Da(Qr, Nt.node, (be) => !(be.flags & 163840)) : mr.kind === 221 && LT(mr.expression, r) && (Qr = Da(Qr, Nt.node, (be) => !(be.flags & 131072 || be.flags & 128 && be.value === "undefined")))); + const bn = ci(mr, Qr); + bn && (Qr = bs(Qr, bn, Nt.node)); + } + return IE(Qr, AE(Fr)); + } + function cr(Nt) { + const mr = []; + let Fr = !1, Qr = !1, bn; + for (const be of Nt.antecedent) { + if (!bn && be.flags & 128 && be.node.clauseStart === be.node.clauseEnd) { + bn = be; + continue; + } + const se = pe(be), xt = jT(se); + if (xt === a && a === l) + return xt; + Qf(mr, xt), Zw(xt, l) || (Fr = !0), AE(se) && (Qr = !0); + } + if (bn) { + const be = pe(bn), se = jT(be); + if (!(se.flags & 131072) && !as(mr, se) && !oIe(bn.node.switchStatement)) { + if (se === a && a === l) + return se; + mr.push(se), Zw(se, l) || (Fr = !0), AE(be) && (Qr = !0); + } + } + return IE(pn( + mr, + Fr ? 2 : 1 + /* Literal */ + ), Qr); + } + function Yt(Nt) { + const mr = qpe(Nt), Fr = r_[mr] || (r_[mr] = /* @__PURE__ */ new Map()), Qr = Se(); + if (!Qr) + return a; + const bn = Fr.get(Qr); + if (bn) + return bn; + for (let dr = _g; dr < Md; dr++) + if (vf[dr] === Nt && Bf[dr] === Qr && n_[dr].length) + return IE( + pn( + n_[dr], + 1 + /* Literal */ + ), + /*incomplete*/ + !0 + ); + const be = []; + let se = !1, xt; + for (const dr of Nt.antecedent) { + let Lr; + if (!xt) + Lr = xt = pe(dr); + else { + vf[Md] = Nt, Bf[Md] = Qr, n_[Md] = be, Md++; + const ti = mp; + mp = void 0, Lr = pe(dr), mp = ti, Md--; + const gi = Fr.get(Qr); + if (gi) + return gi; + } + const Ur = jT(Lr); + if (Qf(be, Ur), Zw(Ur, l) || (se = !0), Ur === a) + break; + } + const At = pn( + be, + se ? 2 : 1 + /* Literal */ + ); + return AE(xt) ? IE( + At, + /*incomplete*/ + !0 + ) : (Fr.set(Qr, At), At); + } + function pn(Nt, mr) { + if (uit(Nt)) + return Qpe(Qn(gr(Nt, lit))); + const Fr = rAe(Qn(Wc(Nt, TM), mr)); + return Fr !== a && Fr.flags & a.flags & 1048576 && Ef(Fr.types, a.types) ? a : Fr; + } + function zn(Nt) { + if (Ds(r) || Ky(r) || Ip(r)) { + if (Me(Nt)) { + const Fr = Nu(Nt).valueDeclaration; + if (Fr && (ma(Fr) || Ii(Fr)) && r === Fr.parent && !Fr.initializer && !Fr.dotDotDotToken) + return Fr; + } + } else if (vo(Nt)) { + if (Bl(r, Nt.expression)) + return Nt; + } else if (Me(Nt)) { + const mr = Nu(Nt); + if (Yk(mr)) { + const Fr = mr.valueDeclaration; + if (Kn(Fr) && !Fr.type && Fr.initializer && vo(Fr.initializer) && Bl(r, Fr.initializer.expression)) + return Fr.initializer; + if (ma(Fr) && !Fr.initializer) { + const Qr = Fr.parent.parent; + if (Kn(Qr) && !Qr.type && Qr.initializer && (Me(Qr.initializer) || vo(Qr.initializer)) && Bl(r, Qr.initializer)) + return Fr; + } + } + } + } + function ci(Nt, mr) { + if (a.flags & 1048576 || mr.flags & 1048576) { + const Fr = zn(Nt); + if (Fr) { + const Qr = OT(Fr); + if (Qr) { + const bn = a.flags & 1048576 && Zw(mr, a) ? a : mr; + if (Yw(bn, Qr)) + return Fr; + } + } + } + } + function vn(Nt, mr, Fr) { + const Qr = OT(mr); + if (Qr === void 0) + return Nt; + const bn = vu(mr), be = Z && (bn || Lee(mr)) && hc( + Nt, + 98304 + /* Nullable */ + ); + let se = Pc(be ? xp( + Nt, + 2097152 + /* NEUndefinedOrNull */ + ) : Nt, Qr); + if (!se) + return Nt; + se = be && bn ? gy(se) : se; + const xt = Fr(se); + return Jc(Nt, (At) => { + const dr = Bk(At, Qr) || ye; + return !(dr.flags & 131072) && !(xt.flags & 131072) && lM(xt, dr); + }); + } + function Ts(Nt, mr, Fr, Qr, bn) { + if ((Fr === 37 || Fr === 38) && Nt.flags & 1048576) { + const be = vM(Nt); + if (be && be === OT(mr)) { + const se = bM(Nt, au(Qr)); + if (se) + return Fr === (bn ? 37 : 38) ? se : qd(Pc(se, be) || ye) ? D$(Nt, se) : Nt; + } + } + return vn(Nt, mr, (be) => vi(be, Fr, Qr, bn)); + } + function bs(Nt, mr, Fr) { + if (Fr.clauseStart < Fr.clauseEnd && Nt.flags & 1048576 && vM(Nt) === OT(mr)) { + const Qr = E$(Fr.switchStatement).slice(Fr.clauseStart, Fr.clauseEnd), bn = Qn(gr(Qr, (be) => bM(Nt, be) || ye)); + if (bn !== ye) + return bn; + } + return vn(Nt, mr, (Qr) => ho(Qr, Fr)); + } + function No(Nt, mr, Fr) { + if (Bl(r, mr)) + return MT( + Nt, + Fr ? 4194304 : 8388608 + /* Falsy */ + ); + Z && Fr && LT(mr, r) && (Nt = MT( + Nt, + 2097152 + /* NEUndefinedOrNull */ + )); + const Qr = ci(mr, Nt); + return Qr ? vn(Nt, Qr, (bn) => xp( + bn, + Fr ? 4194304 : 8388608 + /* Falsy */ + )) : Nt; + } + function ns(Nt, mr, Fr) { + const Qr = Ys(Nt, mr); + return Qr ? !!(Qr.flags & 16777216 || rc(Qr) & 48) || Fr : !!Wk(Nt, mr) || !Fr; + } + function xl(Nt, mr, Fr) { + const Qr = op(mr); + if (kp(Nt, (be) => ns( + be, + Qr, + /*assumeTrue*/ + !0 + ))) + return Jc(Nt, (be) => ns(be, Qr, Fr)); + if (Fr) { + const be = mtt(); + if (be) + return ra([Nt, CE(be, [mr, ye])]); + } + return Nt; + } + function Ko(Nt, mr, Fr, Qr, bn) { + return bn = bn !== (Fr.kind === 112) != (Qr !== 38 && Qr !== 36), xf(Nt, mr, bn); + } + function kl(Nt, mr, Fr) { + switch (mr.operatorToken.kind) { + case 64: + case 76: + case 77: + case 78: + return No(xf(Nt, mr.right, Fr), mr.left, Fr); + case 35: + case 36: + case 37: + case 38: + const Qr = mr.operatorToken.kind, bn = G2(mr.left), be = G2(mr.right); + if (bn.kind === 221 && Na(be)) + return Zr(Nt, bn, Qr, be, Fr); + if (be.kind === 221 && Na(bn)) + return Zr(Nt, be, Qr, bn, Fr); + if (Bl(r, bn)) + return vi(Nt, Qr, be, Fr); + if (Bl(r, be)) + return vi(Nt, Qr, bn, Fr); + Z && (LT(bn, r) ? Nt = Mr(Nt, Qr, be, Fr) : LT(be, r) && (Nt = Mr(Nt, Qr, bn, Fr))); + const se = ci(bn, Nt); + if (se) + return Ts(Nt, se, Qr, be, Fr); + const xt = ci(be, Nt); + if (xt) + return Ts(Nt, xt, Qr, bn, Fr); + if ($o(bn)) + return Tf(Nt, Qr, be, Fr); + if ($o(be)) + return Tf(Nt, Qr, bn, Fr); + if (b4(be) && !vo(bn)) + return Ko(Nt, bn, be, Qr, Fr); + if (b4(bn) && !vo(be)) + return Ko(Nt, be, bn, Qr, Fr); + break; + case 104: + return yc(Nt, mr, Fr); + case 103: + if (Ni(mr.left)) + return Sr(Nt, mr, Fr); + const At = G2(mr.right); + if (X8(Nt) && vo(r) && Bl(r.expression, At)) { + const dr = au(mr.left); + if (ap(dr) && OT(r) === op(dr)) + return xp( + Nt, + Fr ? 524288 : 65536 + /* EQUndefined */ + ); + } + if (Bl(r, At)) { + const dr = au(mr.left); + if (ap(dr)) + return xl(Nt, dr, Fr); + } + break; + case 28: + return xf(Nt, mr.right, Fr); + // Ordinarily we won't see && and || expressions in control flow analysis because the Binder breaks those + // expressions down to individual conditional control flows. However, we may encounter them when analyzing + // aliased conditional expressions. + case 56: + return Fr ? xf( + xf( + Nt, + mr.left, + /*assumeTrue*/ + !0 + ), + mr.right, + /*assumeTrue*/ + !0 + ) : Qn([xf( + Nt, + mr.left, + /*assumeTrue*/ + !1 + ), xf( + Nt, + mr.right, + /*assumeTrue*/ + !1 + )]); + case 57: + return Fr ? Qn([xf( + Nt, + mr.left, + /*assumeTrue*/ + !0 + ), xf( + Nt, + mr.right, + /*assumeTrue*/ + !0 + )]) : xf( + xf( + Nt, + mr.left, + /*assumeTrue*/ + !1 + ), + mr.right, + /*assumeTrue*/ + !1 + ); + } + return Nt; + } + function Sr(Nt, mr, Fr) { + const Qr = G2(mr.right); + if (!Bl(r, Qr)) + return Nt; + E.assertNode(mr.left, Ni); + const bn = H$(mr.left); + if (bn === void 0) + return Nt; + const be = bn.parent, se = Kc(E.checkDefined(bn.valueDeclaration, "should always have a declaration")) ? en(be) : ko(be); + return by( + Nt, + se, + Fr, + /*checkDerived*/ + !0 + ); + } + function Mr(Nt, mr, Fr, Qr) { + const bn = mr === 35 || mr === 37, be = mr === 35 || mr === 36 ? 98304 : 32768, se = au(Fr); + return bn !== Qr && J_(se, (At) => !!(At.flags & be)) || bn === Qr && J_(se, (At) => !(At.flags & (3 | be))) ? MT( + Nt, + 2097152 + /* NEUndefinedOrNull */ + ) : Nt; + } + function vi(Nt, mr, Fr, Qr) { + if (Nt.flags & 1) + return Nt; + (mr === 36 || mr === 38) && (Qr = !Qr); + const bn = au(Fr), be = mr === 35 || mr === 36; + if (bn.flags & 98304) { + if (!Z) + return Nt; + const se = be ? Qr ? 262144 : 2097152 : bn.flags & 65536 ? Qr ? 131072 : 1048576 : Qr ? 65536 : 524288; + return MT(Nt, se); + } + if (Qr) { + if (!be && (Nt.flags & 2 || kp(Nt, Dg))) { + if (bn.flags & 469893116 || Dg(bn)) + return bn; + if (bn.flags & 524288) + return Tr; + } + const se = Jc(Nt, (xt) => lM(xt, bn) || be && _nt(xt, bn)); + return fAe(se, bn); + } + return qd(bn) ? Jc(Nt, (se) => !(ANe(se) && lM(se, bn))) : Nt; + } + function Zr(Nt, mr, Fr, Qr, bn) { + (Fr === 36 || Fr === 38) && (bn = !bn); + const be = G2(mr.expression); + if (!Bl(r, be)) { + Z && LT(be, r) && bn === (Qr.text !== "undefined") && (Nt = MT( + Nt, + 2097152 + /* NEUndefinedOrNull */ + )); + const se = ci(be, Nt); + return se ? vn(Nt, se, (xt) => ts(xt, Qr, bn)) : Nt; + } + return ts(Nt, Qr, bn); + } + function ts(Nt, mr, Fr) { + return Fr ? zc(Nt, mr.text) : MT( + Nt, + lne.get(mr.text) || 32768 + /* TypeofNEHostObject */ + ); + } + function Da(Nt, { switchStatement: mr, clauseStart: Fr, clauseEnd: Qr }, bn) { + return Fr !== Qr && Ri(E$(mr).slice(Fr, Qr), bn) ? xp( + Nt, + 2097152 + /* NEUndefinedOrNull */ + ) : Nt; + } + function ho(Nt, { switchStatement: mr, clauseStart: Fr, clauseEnd: Qr }) { + const bn = E$(mr); + if (!bn.length) + return Nt; + const be = bn.slice(Fr, Qr), se = Fr === Qr || as(be, Zt); + if (Nt.flags & 2 && !se) { + let Lr; + for (let Ur = 0; Ur < be.length; Ur += 1) { + const ti = be[Ur]; + if (ti.flags & 469893116) + Lr !== void 0 && Lr.push(ti); + else if (ti.flags & 524288) + Lr === void 0 && (Lr = be.slice(0, Ur)), Lr.push(Tr); + else + return Nt; + } + return Qn(Lr === void 0 ? be : Lr); + } + const xt = Qn(be), At = xt.flags & 131072 ? Zt : fAe(Jc(Nt, (Lr) => lM(xt, Lr)), xt); + if (!se) + return At; + const dr = Jc(Nt, (Lr) => !(ANe(Lr) && as(bn, Lr.flags & 32768 ? ft : Vu(nnt(Lr))))); + return At.flags & 131072 ? dr : Qn([At, dr]); + } + function zc(Nt, mr) { + switch (mr) { + case "string": + return Ta( + Nt, + de, + 1 + /* TypeofEQString */ + ); + case "number": + return Ta( + Nt, + st, + 2 + /* TypeofEQNumber */ + ); + case "bigint": + return Ta( + Nt, + Gt, + 4 + /* TypeofEQBigInt */ + ); + case "boolean": + return Ta( + Nt, + ut, + 8 + /* TypeofEQBoolean */ + ); + case "symbol": + return Ta( + Nt, + Mt, + 16 + /* TypeofEQSymbol */ + ); + case "object": + return Nt.flags & 1 ? Nt : Qn([Ta( + Nt, + Tr, + 32 + /* TypeofEQObject */ + ), Ta( + Nt, + lt, + 131072 + /* EQNull */ + )]); + case "function": + return Nt.flags & 1 ? Nt : Ta( + Nt, + Rl, + 64 + /* TypeofEQFunction */ + ); + case "undefined": + return Ta( + Nt, + ft, + 65536 + /* EQUndefined */ + ); + } + return Ta( + Nt, + Tr, + 128 + /* TypeofEQHostObject */ + ); + } + function Ta(Nt, mr, Fr) { + return Vo(Nt, (Qr) => ( + // We first check if a constituent is a subtype of the implied type. If so, we either keep or eliminate + // the constituent based on its type facts. We use the strict subtype relation because it treats `object` + // as a subtype of `{}`, and we need the type facts check because function types are subtypes of `object`, + // but are classified as "function" according to `typeof`. + Jm(Qr, mr, Jf) ? Hd(Qr, Fr) ? Qr : Zt : ( + // We next check if the consituent is a supertype of the implied type. If so, we substitute the implied + // type. This handles top types like `unknown` and `{}`, and supertypes like `{ toString(): string }`. + H2(mr, Qr) ? mr : ( + // Neither the constituent nor the implied type is a subtype of the other, however their domains may still + // overlap. For example, an unconstrained type parameter and type `string`. If the type facts indicate + // possible overlap, we form an intersection. Otherwise, we eliminate the constituent. + Hd(Qr, Fr) ? ra([Qr, mr]) : Zt + ) + ) + )); + } + function k_(Nt, { switchStatement: mr, clauseStart: Fr, clauseEnd: Qr }) { + const bn = uAe(mr); + if (!bn) + return Nt; + const be = ec( + mr.caseBlock.clauses, + (At) => At.kind === 297 + /* DefaultClause */ + ); + if (Fr === Qr || be >= Fr && be < Qr) { + const At = aIe(Fr, Qr, bn); + return Jc(Nt, (dr) => NE(dr, At) === At); + } + const xt = bn.slice(Fr, Qr); + return Qn(gr(xt, (At) => At ? zc(Nt, At) : Zt)); + } + function Nc(Nt, { switchStatement: mr, clauseStart: Fr, clauseEnd: Qr }) { + const bn = ec( + mr.caseBlock.clauses, + (xt) => xt.kind === 297 + /* DefaultClause */ + ), be = Fr === Qr || bn >= Fr && bn < Qr; + for (let xt = 0; xt < Fr; xt++) { + const At = mr.caseBlock.clauses[xt]; + At.kind === 296 && (Nt = xf( + Nt, + At.expression, + /*assumeTrue*/ + !1 + )); + } + if (be) { + for (let xt = Qr; xt < mr.caseBlock.clauses.length; xt++) { + const At = mr.caseBlock.clauses[xt]; + At.kind === 296 && (Nt = xf( + Nt, + At.expression, + /*assumeTrue*/ + !1 + )); + } + return Nt; + } + const se = mr.caseBlock.clauses.slice(Fr, Qr); + return Qn(gr(se, (xt) => xt.kind === 296 ? xf( + Nt, + xt.expression, + /*assumeTrue*/ + !0 + ) : Zt)); + } + function $o(Nt) { + return (Tn(Nt) && An(Nt.name) === "constructor" || fo(Nt) && Na(Nt.argumentExpression) && Nt.argumentExpression.text === "constructor") && Bl(r, Nt.expression); + } + function Tf(Nt, mr, Fr, Qr) { + if (Qr ? mr !== 35 && mr !== 37 : mr !== 36 && mr !== 38) + return Nt; + const bn = au(Fr); + if (!Pme(bn) && !wr(bn)) + return Nt; + const be = Ys(bn, "prototype"); + if (!be) + return Nt; + const se = en(be), xt = Ua(se) ? void 0 : se; + if (!xt || xt === Ml || xt === Rl) + return Nt; + if (Ua(Nt)) + return xt; + return Jc(Nt, (dr) => At(dr, xt)); + function At(dr, Lr) { + return dr.flags & 524288 && Cn(dr) & 1 || Lr.flags & 524288 && Cn(Lr) & 1 ? dr.symbol === Lr.symbol : H2(dr, Lr); + } + } + function yc(Nt, mr, Fr) { + const Qr = G2(mr.left); + if (!Bl(r, Qr)) + return Fr && Z && LT(Qr, r) ? MT( + Nt, + 2097152 + /* NEUndefinedOrNull */ + ) : Nt; + const bn = mr.right, be = au(bn); + if (!ab(be, Ml)) + return Nt; + const se = kM(mr), xt = se && bp(se); + if (xt && xt.kind === 1 && xt.parameterIndex === 0) + return by( + Nt, + xt.type, + Fr, + /*checkDerived*/ + !0 + ); + if (!ab(be, Rl)) + return Nt; + const At = Vo(be, Ac); + return Ua(Nt) && (At === Ml || At === Rl) || !Fr && !(At.flags & 524288 && !Dg(At)) ? Nt : by( + Nt, + At, + Fr, + /*checkDerived*/ + !0 + ); + } + function Ac(Nt) { + const mr = Pc(Nt, "prototype"); + if (mr && !Ua(mr)) + return mr; + const Fr = Ps( + Nt, + 1 + /* Construct */ + ); + return Fr.length ? Qn(gr(Fr, (Qr) => Ba(R8(Qr)))) : hs; + } + function by(Nt, mr, Fr, Qr) { + const bn = Nt.flags & 1048576 ? `N${jl(Nt)},${jl(mr)},${(Fr ? 1 : 0) | (Qr ? 2 : 0)}` : void 0; + return Bd(bn) ?? K0(bn, JE(Nt, mr, Fr, Qr)); + } + function JE(Nt, mr, Fr, Qr) { + if (!Fr) { + if (Nt === mr) + return Zt; + if (Qr) + return Jc(Nt, (At) => !ab(At, mr)); + const xt = by( + Nt, + mr, + /*assumeTrue*/ + !0, + /*checkDerived*/ + !1 + ); + return Jc(Nt, (At) => !Zw(At, xt)); + } + if (Nt.flags & 3 || Nt === mr) + return mr; + const bn = Qr ? ab : H2, be = Nt.flags & 1048576 ? vM(Nt) : void 0, se = Vo(mr, (xt) => { + const At = be && Pc(xt, be), dr = At && bM(Nt, At), Lr = Vo( + dr || Nt, + Qr ? (Ur) => ab(Ur, xt) ? Ur : ab(xt, Ur) ? xt : Zt : (Ur) => cM(Ur, xt) ? Ur : cM(xt, Ur) ? xt : H2(Ur, xt) ? Ur : H2(xt, Ur) ? xt : Zt + ); + return Lr.flags & 131072 ? Vo(Nt, (Ur) => hc( + Ur, + 465829888 + /* Instantiable */ + ) && bn(xt, iu(Ur) || ye) ? ra([Ur, xt]) : Zt) : Lr; + }); + return se.flags & 131072 ? H2(mr, Nt) ? mr : Ls(Nt, mr) ? Nt : Ls(mr, Nt) ? mr : ra([Nt, mr]) : se; + } + function pb(Nt, mr, Fr) { + if (eAe(mr, r)) { + const Qr = Fr || !oS(mr) ? kM(mr) : void 0, bn = Qr && bp(Qr); + if (bn && (bn.kind === 0 || bn.kind === 1)) + return EI(Nt, bn, mr, Fr); + } + if (X8(Nt) && vo(r) && Tn(mr.expression)) { + const Qr = mr.expression; + if (Bl(r.expression, G2(Qr.expression)) && Me(Qr.name) && Qr.name.escapedText === "hasOwnProperty" && mr.arguments.length === 1) { + const bn = mr.arguments[0]; + if (Na(bn) && OT(r) === Zo(bn.text)) + return xp( + Nt, + Fr ? 524288 : 65536 + /* EQUndefined */ + ); + } + } + return Nt; + } + function EI(Nt, mr, Fr, Qr) { + if (mr.type && !(Ua(Nt) && (mr.type === Ml || mr.type === Rl))) { + const bn = fit(mr, Fr); + if (bn) { + if (Bl(r, bn)) + return by( + Nt, + mr.type, + Qr, + /*checkDerived*/ + !1 + ); + Z && LT(bn, r) && (Qr && !Hd( + mr.type, + 65536 + /* EQUndefined */ + ) || !Qr && J_(mr.type, OM)) && (Nt = MT( + Nt, + 2097152 + /* NEUndefinedOrNull */ + )); + const be = ci(bn, Nt); + if (be) + return vn(Nt, be, (se) => by( + se, + mr.type, + Qr, + /*checkDerived*/ + !1 + )); + } + } + return Nt; + } + function xf(Nt, mr, Fr) { + if (o7(mr) || fn(mr.parent) && (mr.parent.operatorToken.kind === 61 || mr.parent.operatorToken.kind === 78) && mr.parent.left === mr) + return DI(Nt, mr, Fr); + switch (mr.kind) { + case 80: + if (!Bl(r, mr) && T < 5) { + const Qr = Nu(mr); + if (Yk(Qr)) { + const bn = Qr.valueDeclaration; + if (bn && Kn(bn) && !bn.type && bn.initializer && Ype(r)) { + T++; + const be = xf(Nt, bn.initializer, Fr); + return T--, be; + } + } + } + // falls through + case 110: + case 108: + case 211: + case 212: + return No(Nt, mr, Fr); + case 213: + return pb(Nt, mr, Fr); + case 217: + case 235: + return xf(Nt, mr.expression, Fr); + case 226: + return kl(Nt, mr, Fr); + case 224: + if (mr.operator === 54) + return xf(Nt, mr.operand, !Fr); + break; + } + return Nt; + } + function DI(Nt, mr, Fr) { + if (Bl(r, mr)) + return MT( + Nt, + Fr ? 2097152 : 262144 + /* EQUndefinedOrNull */ + ); + const Qr = ci(mr, Nt); + return Qr ? vn(Nt, Qr, (bn) => xp( + bn, + Fr ? 2097152 : 262144 + /* EQUndefinedOrNull */ + )) : Nt; + } + } + function dit(r, a) { + if (r = gl(r), (a.kind === 80 || a.kind === 81) && (H4(a) && (a = a.parent), Td(a) && (!$y(a) || xx(a)))) { + const l = g$( + xx(a) && a.kind === 211 ? q$( + a, + /*checkMode*/ + void 0, + /*writeOnly*/ + !0 + ) : au(a) + ); + if (gl(yn(a).resolvedSymbol) === r) + return l; + } + return tg(a) && Mg(a.parent) && TT(a.parent) ? DG(a.parent.symbol) : YB(a) && xx(a.parent) ? ly(r) : M1(r); + } + function eI(r) { + return ur( + r.parent, + (a) => vs(a) && !Ab(a) || a.kind === 268 || a.kind === 307 || a.kind === 172 + /* PropertyDeclaration */ + ); + } + function mit(r) { + return (r.lastAssignmentPos !== void 0 || tI(r) && r.lastAssignmentPos !== void 0) && r.lastAssignmentPos < 0; + } + function tI(r) { + return !gAe( + r, + /*location*/ + void 0 + ); + } + function gAe(r, a) { + const l = ur(r.valueDeclaration, A$); + if (!l) + return !1; + const f = yn(l); + return f.flags & 131072 || (f.flags |= 131072, git(l) || yAe(l)), !r.lastAssignmentPos || a && Math.abs(r.lastAssignmentPos) < a.pos; + } + function Zpe(r) { + return E.assert(Kn(r) || Ii(r)), hAe(r.name); + } + function hAe(r) { + return r.kind === 80 ? tI(dn(r.parent)) : at(r.elements, (a) => a.kind !== 232 && hAe(a.name)); + } + function git(r) { + return !!ur(r.parent, (a) => A$(a) && !!(yn(a).flags & 131072)); + } + function A$(r) { + return Ka(r) || Ei(r); + } + function yAe(r) { + switch (r.kind) { + case 80: + const a = Gy(r); + if (a !== 0) { + const d = Nu(r), y = a === 1 || d.lastAssignmentPos !== void 0 && d.lastAssignmentPos < 0; + if (rI(d)) { + if (d.lastAssignmentPos === void 0 || Math.abs(d.lastAssignmentPos) !== Number.MAX_VALUE) { + const x = ur(r, A$), I = ur(d.valueDeclaration, A$); + d.lastAssignmentPos = x === I ? hit(r, d.valueDeclaration) : Number.MAX_VALUE; + } + y && d.lastAssignmentPos > 0 && (d.lastAssignmentPos *= -1); + } + } + return; + case 281: + const l = r.parent.parent, f = r.propertyName || r.name; + if (!r.isTypeOnly && !l.isTypeOnly && !l.moduleSpecifier && f.kind !== 11) { + const d = oc( + f, + 111551, + /*ignoreErrors*/ + !0, + /*dontResolveAlias*/ + !0 + ); + if (d && rI(d)) { + const y = d.lastAssignmentPos !== void 0 && d.lastAssignmentPos < 0 ? -1 : 1; + d.lastAssignmentPos = y * Number.MAX_VALUE; + } + } + return; + case 264: + case 265: + case 266: + return; + } + fi(r) || ms(r, yAe); + } + function hit(r, a) { + let l = r.pos; + for (; r && r.pos > a.pos; ) { + switch (r.kind) { + case 243: + case 244: + case 245: + case 246: + case 247: + case 248: + case 249: + case 250: + case 254: + case 255: + case 258: + case 263: + l = r.end; + } + r = r.parent; + } + return l; + } + function Yk(r) { + return r.flags & 3 && (hde(r) & 6) !== 0; + } + function rI(r) { + const a = r.valueDeclaration && om(r.valueDeclaration); + return !!a && (Ii(a) || Kn(a) && (t2(a.parent) || vAe(a))); + } + function vAe(r) { + return !!(r.parent.flags & 1) && !(Q1(r) & 32 || r.parent.parent.kind === 243 && E0(r.parent.parent.parent)); + } + function yit(r) { + const a = yn(r); + if (a.parameterInitializerContainsUndefined === void 0) { + if (!hg( + r, + 8 + /* ParameterInitializerContainsUndefined */ + )) + return hE(r.symbol), !0; + const l = !!Hd( + tP( + r, + 0 + /* Normal */ + ), + 16777216 + /* IsUndefined */ + ); + if (!yg()) + return hE(r.symbol), !0; + a.parameterInitializerContainsUndefined ?? (a.parameterInitializerContainsUndefined = l); + } + return a.parameterInitializerContainsUndefined; + } + function vit(r, a) { + return Z && a.kind === 169 && a.initializer && Hd( + r, + 16777216 + /* IsUndefined */ + ) && !yit(a) ? xp( + r, + 524288 + /* NEUndefined */ + ) : r; + } + function bit(r, a) { + const l = a.parent; + return l.kind === 211 || l.kind === 166 || l.kind === 213 && l.expression === a || l.kind === 214 && l.expression === a || l.kind === 212 && l.expression === a && !(kp(r, SAe) && NT(au(l.argumentExpression))); + } + function bAe(r) { + return r.flags & 2097152 ? at(r.types, bAe) : !!(r.flags & 465829888 && xg(r).flags & 1146880); + } + function SAe(r) { + return r.flags & 2097152 ? at(r.types, SAe) : !!(r.flags & 465829888 && !hc( + xg(r), + 98304 + /* Nullable */ + )); + } + function Sit(r, a) { + const l = (Me(r) || Tn(r) || fo(r)) && !((Dd(r.parent) || MS(r.parent)) && r.parent.tagName === r) && (a && a & 32 ? a_( + r, + 8 + /* SkipBindingPatterns */ + ) : a_( + r, + /*contextFlags*/ + void 0 + )); + return l && !sb(l); + } + function Kpe(r, a, l) { + return EE(r) && (r = r.baseType), !(l && l & 2) && kp(r, bAe) && (bit(r, a) || Sit(a, l)) ? Vo(r, xg) : r; + } + function TAe(r) { + return !!ur(r, (a) => { + const l = a.parent; + return l === void 0 ? "quit" : Io(l) ? l.expression === a && _o(a) : Tu(l) ? l.name === a || l.propertyName === a : !1; + }); + } + function Zk(r, a, l, f) { + if (we && !(r.flags & 33554432 && !m_(r) && !ss(r))) + switch (a) { + case 1: + return I$(r); + case 2: + return xAe(r, l, f); + case 3: + return kAe(r); + case 4: + return ede(r); + case 5: + return CAe(r); + case 6: + return EAe(r); + case 7: + return DAe(r); + case 8: + return wAe(r); + case 0: { + if (Me(r) && (Td(r) || _u(r.parent) || _l(r.parent) && r.parent.moduleReference === r) && IAe(r)) { + if (WP(r.parent) && (Tn(r.parent) ? r.parent.expression : r.parent.left) !== r) + return; + I$(r); + return; + } + if (WP(r)) { + let d = r; + for (; WP(d); ) { + if (im(d)) return; + d = d.parent; + } + return xAe(r); + } + return Io(r) ? kAe(r) : bu(r) || sd(r) ? ede(r) : _l(r) ? gS(r) || gX(r) ? EAe(r) : void 0 : Tu(r) ? DAe(r) : ((Ka(r) || pm(r)) && CAe(r), !F.emitDecoratorMetadata || !n2(r) || !Pf(r) || !r.modifiers || !l3(V, r, r.parent, r.parent.parent) ? void 0 : wAe(r)); + } + default: + E.assertNever(a, `Unhandled reference hint: ${a}`); + } + } + function I$(r) { + const a = Nu(r); + a && a !== ne && a !== Ve && !Jb(r) && DM(a, r); + } + function xAe(r, a, l) { + const f = Tn(r) ? r.expression : r.left; + if (Xy(f) || !Me(f)) + return; + const d = Nu(f); + if (!d || d === Ve) + return; + if (Mp(F) || Yy(F) && TAe(r)) { + DM(d, r); + return; + } + const y = l || uc(f); + if (Ua(y) || y === fr) { + DM(d, r); + return; + } + let x = a; + if (!x && !l) { + const I = Tn(r) ? r.name : r.right, M = Ni(I) && LM(I.escapedText, I), z = Gy(r), Y = Uu(z !== 0 || Sde(r) ? cf(y) : y); + x = Ni(I) ? M && G$(Y, M) || void 0 : Ys(Y, I.escapedText); + } + x && (xI(x) || x.flags & 8 && r.parent.kind === 306) || DM(d, r); + } + function kAe(r) { + if (Me(r.expression)) { + const a = r.expression, l = gl(oc( + a, + -1, + /*ignoreErrors*/ + !0, + /*dontResolveAlias*/ + !0, + r + )); + l && DM(l, a); + } + } + function ede(r) { + if (!U$(r)) { + const a = Pa && F.jsx === 2 ? p.This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found : void 0, l = Dm(r), f = bu(r) ? r.tagName : r; + let d; + if (sd(r) && l === "null" || (d = Dt( + f, + l, + F.jsx === 1 ? 111167 : 111551, + a, + /*isUse*/ + !0 + )), d && (d.isReferenced = -1, we && d.flags & 2097152 && !Jd(d) && F$(d)), sd(r)) { + const y = Cr(r), x = Ck(y); + x && Dt( + f, + x, + F.jsx === 1 ? 111167 : 111551, + a, + /*isUse*/ + !0 + ); + } + } + } + function CAe(r) { + if (R < 2 && Oc(r) & 2) { + const a = pf(r); + Tit(a); + } + } + function EAe(r) { + $n( + r, + 32 + /* Export */ + ) && PAe(r); + } + function DAe(r) { + if (!r.parent.parent.moduleSpecifier && !r.isTypeOnly && !r.parent.parent.isTypeOnly) { + const a = r.propertyName || r.name; + if (a.kind === 11) + return; + const l = Dt( + a, + a.escapedText, + 2998271, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !0 + ); + if (!(l && (l === xe || l === he || l.declarations && E0(ST(l.declarations[0]))))) { + const f = l && (l.flags & 2097152 ? Pl(l) : l); + (!f || pu(f) & 111551) && (PAe(r), I$(a)); + } + return; + } + } + function wAe(r) { + if (F.emitDecoratorMetadata) { + const a = Pn(r.modifiers, ll); + if (!a) + return; + switch (hl( + a, + 16 + /* Metadata */ + ), r.kind) { + case 263: + const l = Ug(r); + if (l) + for (const x of l.parameters) + FE(uX(x)); + break; + case 177: + case 178: + const f = r.kind === 177 ? 178 : 177, d = Lo(dn(r), f); + FE(TT(r) || d && TT(d)); + break; + case 174: + for (const x of r.parameters) + FE(uX(x)); + FE(pf(r)); + break; + case 172: + FE(qc(r)); + break; + case 169: + FE(uX(r)); + const y = r.parent; + for (const x of y.parameters) + FE(uX(x)); + FE(pf(y)); + break; + } + } + } + function DM(r, a) { + if (we && cT( + r, + /*excludes*/ + 111551 + /* Value */ + ) && !vx(a)) { + const l = Pl(r); + pu( + r, + /*excludeTypeOnlyMeanings*/ + !0 + ) & 1160127 && (Mp(F) || Yy(F) && TAe(a) || !xI(gl(l))) && F$(r); + } + } + function F$(r) { + E.assert(we); + const a = Ci(r); + if (!a.referenced) { + a.referenced = !0; + const l = ru(r); + if (!l) return E.fail(); + if (gS(l) && pu(jc(r)) & 111551) { + const f = w_(l.moduleReference); + I$(f); + } + } + } + function PAe(r) { + const a = dn(r), l = Pl(a); + l && (l === Ve || pu( + a, + /*excludeTypeOnlyMeanings*/ + !0 + ) & 111551 && !xI(l)) && F$(a); + } + function NAe(r, a) { + if (!r) return; + const l = w_(r), f = (r.kind === 80 ? 788968 : 1920) | 2097152, d = Dt( + l, + l.escapedText, + f, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !0 + ); + if (d && d.flags & 2097152) { + if (we && lh(d) && !xI(Pl(d)) && !Jd(d)) + F$(d); + else if (a && Mp(F) && Ru(F) >= 5 && !lh(d) && !at(d.declarations, x0)) { + const y = je(r, p.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled), x = Pn(d.declarations || He, sh); + x && Bs(y, tn(x, p._0_was_imported_here, An(l))); + } + } + } + function Tit(r) { + NAe( + r && c3(r), + /*forDecoratorMetadata*/ + !1 + ); + } + function FE(r) { + const a = cme(r); + a && Hu(a) && NAe( + a, + /*forDecoratorMetadata*/ + !0 + ); + } + function xit(r, a) { + var l; + const f = en(r), d = r.valueDeclaration; + if (d) { + if (ma(d) && !d.initializer && !d.dotDotDotToken && d.parent.elements.length >= 2) { + const y = d.parent.parent, x = om(y); + if (x.kind === 260 && Z2(x) & 6 || x.kind === 169) { + const I = yn(y); + if (!(I.flags & 4194304)) { + I.flags |= 4194304; + const M = Pe( + y, + 0 + /* Normal */ + ), z = M && Vo(M, xg); + if (I.flags &= -4194305, z && z.flags & 1048576 && !(x.kind === 169 && Zpe(x))) { + const Y = d.parent, Se = m0( + Y, + z, + z, + /*flowContainer*/ + void 0, + a.flowNode + ); + return Se.flags & 131072 ? Zt : Ya( + d, + Se, + /*noTupleBoundsCheck*/ + !0 + ); + } + } + } + } + if (Ii(d) && !d.type && !d.initializer && !d.dotDotDotToken) { + const y = d.parent; + if (y.parameters.length >= 2 && i$(y)) { + const x = iI(y); + if (x && x.parameters.length === 1 && ku(x)) { + const I = zw(Bi(en(x.parameters[0]), (l = $2(y)) == null ? void 0 : l.nonFixingMapper)); + if (I.flags & 1048576 && J_(I, ga) && !at(y.parameters, Zpe)) { + const M = m0( + y, + I, + I, + /*flowContainer*/ + void 0, + a.flowNode + ), z = y.parameters.indexOf(d) - (jb(y) ? 1 : 0); + return j_(M, gd(z)); + } + } + } + } + } + return f; + } + function AAe(r, a) { + if (Jb(r)) return; + if (a === ne) { + if (kde(r)) { + je(r, p.arguments_cannot_be_referenced_in_property_initializers); + return; + } + let y = ff(r); + if (y) + for (R < 2 && (y.kind === 219 ? je(r, p.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_function_expression) : $n( + y, + 1024 + /* Async */ + ) && je(r, p.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_standard_function_or_method)), yn(y).flags |= 512; y && bo(y); ) + y = ff(y), y && (yn(y).flags |= 512); + return; + } + const l = gl(a), f = Sme(l, r); + Yh(f) && Zfe(r, f) && f.declarations && Zh(r, f.declarations, r.escapedText); + const d = l.valueDeclaration; + if (d && l.flags & 32 && Zn(d) && d.name !== r) { + let y = Lu( + r, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + for (; y.kind !== 307 && y.parent !== d; ) + y = Lu( + y, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + y.kind !== 307 && (yn(d).flags |= 262144, yn(y).flags |= 262144, yn(r).flags |= 536870912); + } + wit(r, a); + } + function kit(r, a) { + if (Jb(r)) + return wM(r); + const l = Nu(r); + if (l === Ve) + return We; + if (AAe(r, l), l === ne) + return kde(r) ? We : en(l); + IAe(r) && Zk( + r, + 1 + /* Identifier */ + ); + const f = gl(l); + let d = f.valueDeclaration; + const y = d; + if (d && d.kind === 208 && as(Rv, d.parent) && ur(r, (Yt) => Yt === d.parent)) + return Xt; + let x = xit(f, r); + const I = Gy(r); + if (I) { + if (!(f.flags & 3) && !(an(r) && f.flags & 512)) { + const Yt = f.flags & 384 ? p.Cannot_assign_to_0_because_it_is_an_enum : f.flags & 32 ? p.Cannot_assign_to_0_because_it_is_a_class : f.flags & 1536 ? p.Cannot_assign_to_0_because_it_is_a_namespace : f.flags & 16 ? p.Cannot_assign_to_0_because_it_is_a_function : f.flags & 2097152 ? p.Cannot_assign_to_0_because_it_is_an_import : p.Cannot_assign_to_0_because_it_is_not_a_variable; + return je(r, Yt, Ui(l)), We; + } + if (Xd(f)) + return f.flags & 3 ? je(r, p.Cannot_assign_to_0_because_it_is_a_constant, Ui(l)) : je(r, p.Cannot_assign_to_0_because_it_is_a_read_only_property, Ui(l)), We; + } + const M = f.flags & 2097152; + if (f.flags & 3) { + if (I === 1) + return TB(r) ? _0(x) : x; + } else if (M) + d = ru(l); + else + return x; + if (!d) + return x; + x = Kpe(x, r, a); + const z = om(d).kind === 169, Y = eI(d); + let Se = eI(r); + const pe = Se !== Y, Ze = r.parent && r.parent.parent && Zg(r.parent) && Xpe(r.parent.parent), dt = l.flags & 134217728, ht = x === Ye || x === mo, or = ht && r.parent.kind === 235; + for (; Se !== Y && (Se.kind === 218 || Se.kind === 219 || R7(Se)) && (Yk(f) && x !== mo || rI(f) && gAe(f, r)); ) + Se = eI(Se); + const nr = y && Kn(y) && !y.initializer && !y.exclamationToken && vAe(y) && !mit(l), Kr = z || M || pe && !nr || Ze || dt || Cit(r, d) || x !== Ye && x !== mo && (!Z || (x.flags & 16387) !== 0 || vx(r) || Upe(r) || r.parent.kind === 281) || r.parent.kind === 235 || d.kind === 260 && d.exclamationToken || d.flags & 33554432, Vr = or ? ft : Kr ? z ? vit(x, d) : x : ht ? ft : gy(x), cr = or ? f0(m0(r, x, Vr, Se)) : m0(r, x, Vr, Se); + if (!dAe(r) && (x === Ye || x === mo)) { + if (cr === Ye || cr === mo) + return le && (je(is(d), p.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined, Ui(l), $r(cr)), je(r, p.Variable_0_implicitly_has_an_1_type, Ui(l), $r(cr))), SI(cr); + } else if (!Kr && !PE(x) && PE(cr)) + return je(r, p.Variable_0_is_used_before_being_assigned, Ui(l)), x; + return I ? _0(cr) : cr; + } + function Cit(r, a) { + if (ma(a)) { + const l = ur(r, ma); + return l && om(l) === om(a); + } + } + function IAe(r) { + var a; + const l = r.parent; + if (l) { + if (Tn(l) && l.expression === r || Tu(l) && l.isTypeOnly) + return !1; + const f = (a = l.parent) == null ? void 0 : a.parent; + if (f && wc(f) && f.isTypeOnly) + return !1; + } + return !0; + } + function Eit(r, a) { + return !!ur(r, (l) => l === a ? "quit" : vs(l) || l.parent && ss(l.parent) && !Kc(l.parent) && l.parent.initializer === l); + } + function Dit(r, a) { + return ur(r, (l) => l === a ? "quit" : l === a.initializer || l === a.condition || l === a.incrementor || l === a.statement); + } + function tde(r) { + return ur(r, (a) => !a || AB(a) ? "quit" : zy( + a, + /*lookInLabeledStatements*/ + !1 + )); + } + function wit(r, a) { + if (R >= 2 || !(a.flags & 34) || !a.valueDeclaration || Ei(a.valueDeclaration) || a.valueDeclaration.parent.kind === 299) + return; + const l = Sd(a.valueDeclaration), f = Eit(r, l), d = tde(l); + if (d) { + if (f) { + let y = !0; + if (mv(l)) { + const x = sv( + a.valueDeclaration, + 261 + /* VariableDeclarationList */ + ); + if (x && x.parent === l) { + const I = Dit(r.parent, l); + if (I) { + const M = yn(I); + M.flags |= 8192; + const z = M.capturedBlockScopeBindings || (M.capturedBlockScopeBindings = []); + Qf(z, a), I === l.initializer && (y = !1); + } + } + } + y && (yn(d).flags |= 4096); + } + if (mv(l)) { + const y = sv( + a.valueDeclaration, + 261 + /* VariableDeclarationList */ + ); + y && y.parent === l && Nit(r, l) && (yn(a.valueDeclaration).flags |= 65536); + } + yn(a.valueDeclaration).flags |= 32768; + } + f && (yn(a.valueDeclaration).flags |= 16384); + } + function Pit(r, a) { + const l = yn(r); + return !!l && as(l.capturedBlockScopeBindings, dn(a)); + } + function Nit(r, a) { + let l = r; + for (; l.parent.kind === 217; ) + l = l.parent; + let f = !1; + if ($y(l)) + f = !0; + else if (l.parent.kind === 224 || l.parent.kind === 225) { + const d = l.parent; + f = d.operator === 46 || d.operator === 47; + } + return f ? !!ur(l, (d) => d === a ? "quit" : d === a.statement) : !1; + } + function rde(r, a) { + if (yn(r).flags |= 2, a.kind === 172 || a.kind === 176) { + const l = a.parent; + yn(l).flags |= 4; + } else + yn(a).flags |= 4; + } + function FAe(r) { + return mS(r) ? r : vs(r) ? void 0 : ms(r, FAe); + } + function nde(r) { + const a = dn(r), l = ko(a); + return oi(l) === zt; + } + function OAe(r, a, l) { + const f = a.parent; + Mb(f) && !nde(f) && L4(r) && r.flowNode && !N$( + r.flowNode, + /*noCacheCheck*/ + !1 + ) && je(r, l); + } + function Ait(r, a) { + ss(a) && Kc(a) && V && a.initializer && PP(a.initializer, r.pos) && Pf(a.parent) && je(r, p.Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class); + } + function wM(r) { + const a = vx(r); + let l = Lu( + r, + /*includeArrowFunctions*/ + !0, + /*includeClassComputedPropertyName*/ + !0 + ), f = !1, d = !1; + for (l.kind === 176 && OAe(r, l, p.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class); ; ) { + if (l.kind === 219 && (l = Lu( + l, + /*includeArrowFunctions*/ + !1, + !d + ), f = !0), l.kind === 167) { + l = Lu( + l, + !f, + /*includeClassComputedPropertyName*/ + !1 + ), d = !0; + continue; + } + break; + } + if (Ait(r, l), d) + je(r, p.this_cannot_be_referenced_in_a_computed_property_name); + else + switch (l.kind) { + case 267: + je(r, p.this_cannot_be_referenced_in_a_module_or_namespace_body); + break; + case 266: + je(r, p.this_cannot_be_referenced_in_current_location); + break; + } + !a && f && R < 2 && rde(r, l); + const y = ide( + r, + /*includeGlobalThis*/ + !0, + l + ); + if (Te) { + const x = en(he); + if (y === x && f) + je(r, p.The_containing_arrow_function_captures_the_global_value_of_this); + else if (!y) { + const I = je(r, p.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation); + if (!Ei(l)) { + const M = ide(l); + M && M !== x && Bs(I, tn(l, p.An_outer_value_of_this_is_shadowed_by_this_container)); + } + } + } + return y || Je; + } + function ide(r, a = !0, l = Lu( + r, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + )) { + const f = an(r); + if (vs(l) && (!ode(r) || jb(l))) { + let d = ofe(l) || f && Oit(l); + if (!d) { + const y = Fit(l); + if (f && y) { + const x = Gi(y).symbol; + x && x.members && x.flags & 16 && (d = ko(x).thisType); + } else Um(l) && (d = ko(Oa(l.symbol)).thisType); + d || (d = sde(l)); + } + if (d) + return m0(r, d); + } + if (Zn(l.parent)) { + const d = dn(l.parent), y = Vs(l) ? en(d) : ko(d).thisType; + return m0(r, y); + } + if (Ei(l)) + if (l.commonJsModuleIndicator) { + const d = dn(l); + return d && en(d); + } else { + if (l.externalModuleIndicator) + return ft; + if (a) + return en(he); + } + } + function Iit(r) { + const a = Lu( + r, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + if (vs(a)) { + const l = Gf(a); + if (l.thisParameter) + return w$(l.thisParameter); + } + if (Zn(a.parent)) { + const l = dn(a.parent); + return Vs(a) ? en(l) : ko(l).thisType; + } + } + function Fit(r) { + if (r.kind === 218 && fn(r.parent) && Sc(r.parent) === 3) + return r.parent.left.expression.expression; + if (r.kind === 174 && r.parent.kind === 210 && fn(r.parent.parent) && Sc(r.parent.parent) === 6) + return r.parent.parent.left.expression; + if (r.kind === 218 && r.parent.kind === 303 && r.parent.parent.kind === 210 && fn(r.parent.parent.parent) && Sc(r.parent.parent.parent) === 6) + return r.parent.parent.parent.left.expression; + if (r.kind === 218 && Xc(r.parent) && Me(r.parent.name) && (r.parent.name.escapedText === "value" || r.parent.name.escapedText === "get" || r.parent.name.escapedText === "set") && oa(r.parent.parent) && Fs(r.parent.parent.parent) && r.parent.parent.parent.arguments[2] === r.parent.parent && Sc(r.parent.parent.parent) === 9) + return r.parent.parent.parent.arguments[0].expression; + if (fc(r) && Me(r.name) && (r.name.escapedText === "value" || r.name.escapedText === "get" || r.name.escapedText === "set") && oa(r.parent) && Fs(r.parent.parent) && r.parent.parent.arguments[2] === r.parent && Sc(r.parent.parent) === 9) + return r.parent.parent.arguments[0].expression; + } + function Oit(r) { + const a = n7(r); + if (a && a.typeExpression) + return wi(a.typeExpression); + const l = Uw(r); + if (l) + return ib(l); + } + function Lit(r, a) { + return !!ur(r, (l) => Ka(l) ? "quit" : l.kind === 169 && l.parent === a); + } + function O$(r) { + const a = r.parent.kind === 213 && r.parent.expression === r, l = a3( + r, + /*stopOnFunctions*/ + !0 + ); + let f = l, d = !1, y = !1; + if (!a) { + for (; f && f.kind === 219; ) + $n( + f, + 1024 + /* Async */ + ) && (y = !0), f = a3( + f, + /*stopOnFunctions*/ + !0 + ), d = R < 2; + f && $n( + f, + 1024 + /* Async */ + ) && (y = !0); + } + let x = 0; + if (!f || !Y(f)) { + const Se = ur( + r, + (pe) => pe === f ? "quit" : pe.kind === 167 + /* ComputedPropertyName */ + ); + return Se && Se.kind === 167 ? je(r, p.super_cannot_be_referenced_in_a_computed_property_name) : a ? je(r, p.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors) : !f || !f.parent || !(Zn(f.parent) || f.parent.kind === 210) ? je(r, p.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions) : je(r, p.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class), We; + } + if (!a && l.kind === 176 && OAe(r, f, p.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class), Vs(f) || a ? (x = 32, !a && R >= 2 && R <= 8 && (ss(f) || nc(f)) && WZ(r.parent, (Se) => { + (!Ei(Se) || $_(Se)) && (yn(Se).flags |= 2097152); + })) : x = 16, yn(r).flags |= x, f.kind === 174 && y && (D_(r.parent) && $y(r.parent) ? yn(f).flags |= 256 : yn(f).flags |= 128), d && rde(r.parent, f), f.parent.kind === 210) + return R < 2 ? (je(r, p.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher), We) : Je; + const I = f.parent; + if (!Mb(I)) + return je(r, p.super_can_only_be_referenced_in_a_derived_class), We; + if (nde(I)) + return a ? We : zt; + const M = ko(dn(I)), z = M && wo(M)[0]; + if (!z) + return We; + if (f.kind === 176 && Lit(r, f)) + return je(r, p.super_cannot_be_referenced_in_constructor_arguments), We; + return x === 32 ? oi(M) : of(z, M.thisType); + function Y(Se) { + return a ? Se.kind === 176 : Zn(Se.parent) || Se.parent.kind === 210 ? Vs(Se) ? Se.kind === 174 || Se.kind === 173 || Se.kind === 177 || Se.kind === 178 || Se.kind === 172 || Se.kind === 175 : Se.kind === 174 || Se.kind === 173 || Se.kind === 177 || Se.kind === 178 || Se.kind === 172 || Se.kind === 171 || Se.kind === 176 : !1; + } + } + function LAe(r) { + return (r.kind === 174 || r.kind === 177 || r.kind === 178) && r.parent.kind === 210 ? r.parent : r.kind === 218 && r.parent.kind === 303 ? r.parent.parent : void 0; + } + function MAe(r) { + return Cn(r) & 4 && r.target === gc ? Po(r)[0] : void 0; + } + function Mit(r) { + return Vo(r, (a) => a.flags & 2097152 ? lr(a.types, MAe) : MAe(a)); + } + function RAe(r, a) { + let l = r, f = a; + for (; f; ) { + const d = Mit(f); + if (d) + return d; + if (l.parent.kind !== 303) + break; + l = l.parent.parent, f = _b( + l, + /*contextFlags*/ + void 0 + ); + } + } + function sde(r) { + if (r.kind === 219) + return; + if (i$(r)) { + const l = iI(r); + if (l) { + const f = l.thisParameter; + if (f) + return en(f); + } + } + const a = an(r); + if (Te || a) { + const l = LAe(r); + if (l) { + const d = _b( + l, + /*contextFlags*/ + void 0 + ), y = RAe(l, d); + return y ? Bi(y, Ope($2(l))) : cf(d ? f0(d) : uc(l)); + } + const f = rd(r.parent); + if (Cl(f)) { + const d = f.left; + if (vo(d)) { + const { expression: y } = d; + if (a && Me(y)) { + const x = Cr(f); + if (x.commonJsModuleIndicator && Nu(y) === x.symbol) + return; + } + return cf(uc(y)); + } + } + } + } + function jAe(r) { + const a = r.parent; + if (!i$(a)) + return; + const l = Ab(a); + if (l && l.arguments) { + const d = Y$(l), y = a.parameters.indexOf(r); + if (r.dotDotDotToken) + return Ide( + d, + y, + d.length, + Je, + /*context*/ + void 0, + 0 + /* Normal */ + ); + const x = yn(l), I = x.resolvedSignature; + x.resolvedSignature = Kt; + const M = y < d.length ? cb(Gi(d[y])) : r.initializer ? void 0 : fe; + return x.resolvedSignature = I, M; + } + const f = iI(a); + if (f) { + const d = a.parameters.indexOf(r) - (jb(a) ? 1 : 0); + return r.dotDotDotToken && Co(a.parameters) === r ? UM(f, d) : Q2(f, d); + } + } + function ade(r, a) { + const l = qc(r) || (an(r) ? Q5(r) : void 0); + if (l) + return wi(l); + switch (r.kind) { + case 169: + return jAe(r); + case 208: + return Rit(r, a); + case 172: + if (Vs(r)) + return jit(r, a); + } + } + function Rit(r, a) { + const l = r.parent.parent, f = r.propertyName || r.name, d = ade(l, a) || l.kind !== 208 && l.initializer && tP( + l, + r.dotDotDotToken ? 32 : 0 + /* Normal */ + ); + if (!d || Ds(f) || KP(f)) return; + if (l.name.kind === 207) { + const x = CC(r.parent.elements, r); + return x < 0 ? void 0 : fde(d, x); + } + const y = o0(f); + if (ap(y)) { + const x = op(y); + return Pc(d, x); + } + } + function jit(r, a) { + const l = ct(r.parent) && a_(r.parent, a); + if (l) + return ub(l, dn(r).escapedName); + } + function Bit(r, a) { + const l = r.parent; + if (C0(l) && r === l.initializer) { + const f = ade(l, a); + if (f) + return f; + if (!(a & 8) && Ds(l.name) && l.name.elements.length > 0) + return Jt( + l.name, + /*includePatternInType*/ + !0, + /*reportErrors*/ + !1 + ); + } + } + function Jit(r, a) { + const l = ff(r); + if (l) { + let f = L$(l, a); + if (f) { + const d = Oc(l); + if (d & 1) { + const y = (d & 2) !== 0; + f.flags & 1048576 && (f = Jc(f, (I) => !!vy(1, I, y))); + const x = vy(1, f, (d & 2) !== 0); + if (!x) + return; + f = x; + } + if (d & 2) { + const y = Vo(f, g0); + return y && Qn([y, iIe(y)]); + } + return f; + } + } + } + function zit(r, a) { + const l = a_(r, a); + if (l) { + const f = g0(l); + return f && Qn([f, iIe(f)]); + } + } + function Wit(r, a) { + const l = ff(r); + if (l) { + const f = Oc(l); + let d = L$(l, a); + if (d) { + const y = (f & 2) !== 0; + if (!r.asteriskToken && d.flags & 1048576 && (d = Jc(d, (x) => !!vy(1, x, y))), r.asteriskToken) { + const x = vme(d, y), I = x?.yieldType ?? fr, M = a_(r, a) ?? fr, z = x?.nextType ?? ye, Y = rX( + I, + M, + z, + /*isAsyncGenerator*/ + !1 + ); + if (y) { + const Se = rX( + I, + M, + z, + /*isAsyncGenerator*/ + !0 + ); + return Qn([Y, Se]); + } + return Y; + } + return vy(0, d, y); + } + } + } + function ode(r) { + let a = !1; + for (; r.parent && !vs(r.parent); ) { + if (Ii(r.parent) && (a || r.parent.initializer === r)) + return !0; + ma(r.parent) && r.parent.initializer === r && (a = !0), r = r.parent; + } + return !1; + } + function BAe(r, a) { + const l = !!(Oc(a) & 2), f = L$( + a, + /*contextFlags*/ + void 0 + ); + if (f) + return vy(r, f, l) || void 0; + } + function L$(r, a) { + const l = xE(r); + if (l) + return l; + const f = dde(r); + if (f && !RG(f)) { + const y = Ba(f), x = Oc(r); + return x & 1 ? Jc(y, (I) => !!(I.flags & 58998787) || nme( + I, + x, + /*errorNode*/ + void 0 + )) : x & 2 ? Jc(y, (I) => !!(I.flags & 58998787) || !!iP(I)) : y; + } + const d = Ab(r); + if (d) + return a_(d, a); + } + function JAe(r, a) { + const f = Y$(r).indexOf(a); + return f === -1 ? void 0 : cde(r, f); + } + function cde(r, a) { + if (_f(r)) + return a === 0 ? de : a === 1 ? h3e( + /*reportErrors*/ + !1 + ) : Je; + const l = yn(r).resolvedSignature === Mn ? Mn : ME(r); + if (bu(r) && a === 0) + return B$(l, r); + const f = l.parameters.length - 1; + return ku(l) && a >= f ? j_( + en(l.parameters[f]), + gd(a - f), + 256 + /* Contextual */ + ) : Gd(l, a); + } + function Uit(r) { + const a = Hde(r); + return a ? ET(a) : void 0; + } + function Vit(r, a) { + if (r.parent.kind === 215) + return JAe(r.parent, a); + } + function qit(r, a) { + const l = r.parent, { left: f, operatorToken: d, right: y } = l; + switch (d.kind) { + case 64: + case 77: + case 76: + case 78: + return r === y ? Git(l) : void 0; + case 57: + case 61: + const x = a_(l, a); + return r === y && (x && x.pattern || !x && !_K(l)) ? au(f) : x; + case 56: + case 28: + return r === y ? a_(l, a) : void 0; + default: + return; + } + } + function Hit(r) { + if (bd(r) && r.symbol) + return r.symbol; + if (Me(r)) + return Nu(r); + if (Tn(r)) { + const l = au(r.expression); + return Ni(r.name) ? a(l, r.name) : Ys(l, r.name.escapedText); + } + if (fo(r)) { + const l = uc(r.argumentExpression); + if (!ap(l)) + return; + const f = au(r.expression); + return Ys(f, op(l)); + } + return; + function a(l, f) { + const d = LM(f.escapedText, f); + return d && G$(l, d); + } + } + function Git(r) { + var a, l; + const f = Sc(r); + switch (f) { + case 0: + case 4: + const d = Hit(r.left), y = d && d.valueDeclaration; + if (y && (ss(y) || m_(y))) { + const M = qc(y); + return M && Bi(wi(M), Ci(d).mapper) || (ss(y) ? y.initializer && au(r.left) : void 0); + } + return f === 0 ? au(r.left) : zAe(r); + case 5: + if (M$(r, f)) + return zAe(r); + if (!bd(r.left) || !r.left.symbol) + return au(r.left); + { + const M = r.left.symbol.valueDeclaration; + if (!M) + return; + const z = Ws(r.left, vo), Y = qc(M); + if (Y) + return wi(Y); + if (Me(z.expression)) { + const Se = z.expression, pe = Dt( + Se, + Se.escapedText, + 111551, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !0 + ); + if (pe) { + const Ze = pe.valueDeclaration && qc(pe.valueDeclaration); + if (Ze) { + const dt = wh(z); + if (dt !== void 0) + return ub(wi(Ze), dt); + } + return; + } + } + return an(M) || M === r.left ? void 0 : au(r.left); + } + case 1: + case 6: + case 3: + case 2: + let x; + f !== 2 && (x = bd(r.left) ? (a = r.left.symbol) == null ? void 0 : a.valueDeclaration : void 0), x || (x = (l = r.symbol) == null ? void 0 : l.valueDeclaration); + const I = x && qc(x); + return I ? wi(I) : void 0; + case 7: + case 8: + case 9: + return E.fail("Does not apply"); + default: + return E.assertNever(f); + } + } + function M$(r, a = Sc(r)) { + if (a === 4) + return !0; + if (!an(r) || a !== 5 || !Me(r.left.expression)) + return !1; + const l = r.left.expression.escapedText, f = Dt( + r.left, + l, + 111551, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !0, + /*excludeGlobals*/ + !0 + ); + return W7(f?.valueDeclaration); + } + function zAe(r) { + if (!r.symbol) return au(r.left); + if (r.symbol.valueDeclaration) { + const d = qc(r.symbol.valueDeclaration); + if (d) { + const y = wi(d); + if (y) + return y; + } + } + const a = Ws(r.left, vo); + if (!Ip(Lu( + a.expression, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ))) + return; + const l = wM(a.expression), f = wh(a); + return f !== void 0 && ub(l, f) || void 0; + } + function $it(r) { + return !!(rc(r) & 262144 && !r.links.type && O1( + r, + 0 + /* Type */ + ) >= 0); + } + function lde(r, a) { + if (r.flags & 16777216) { + const l = r; + return !!(md(B1(l)).flags & 131072) && l0(J1(l)) === l0(l.checkType) && Ls(a, l.extendsType); + } + return r.flags & 2097152 ? at(r.types, (l) => lde(l, a)) : !1; + } + function ub(r, a, l) { + return Vo( + r, + (f) => { + if (f.flags & 2097152) { + let d, y, x = !1; + for (const I of f.types) { + if (!(I.flags & 524288)) + continue; + if (T_(I) && I8(I) !== 2) { + const z = WAe(I, a, l); + d = ude(d, z); + continue; + } + const M = UAe(I, a); + if (!M) { + x || (y = Pr(y, I)); + continue; + } + x = !0, y = void 0, d = ude(d, M); + } + if (y) + for (const I of y) { + const M = VAe(I, a, l); + d = ude(d, M); + } + return d ? d.length === 1 ? d[0] : ra(d) : void 0; + } + if (f.flags & 524288) + return T_(f) && I8(f) !== 2 ? WAe(f, a, l) : UAe(f, a) ?? VAe(f, a, l); + }, + /*noReductions*/ + !0 + ); + } + function ude(r, a) { + return a ? Pr(r, a.flags & 1 ? ye : a) : r; + } + function WAe(r, a, l) { + const f = l || x_(Pi(a)), d = Hf(r); + if (r.nameType && lde(r.nameType, f) || lde(d, f)) + return; + const y = iu(d) || d; + if (Ls(f, y)) + return YG(r, f); + } + function UAe(r, a) { + const l = Ys(r, a); + if (!(!l || $it(l))) + return p0(en(l), !!(l.flags & 16777216)); + } + function VAe(r, a, l) { + var f; + if (ga(r) && Xg(a) && +a >= 0) { + const d = Qw( + r, + r.target.fixedLength, + /*endSkipCount*/ + 0, + /*writing*/ + !1, + /*noReductions*/ + !0 + ); + if (d) + return d; + } + return (f = Cfe(Efe(r), l || x_(Pi(a)))) == null ? void 0 : f.type; + } + function qAe(r, a) { + if (E.assert(Ip(r)), !(r.flags & 67108864)) + return _de(r, a); + } + function _de(r, a) { + const l = r.parent, f = Xc(r) && ade(r, a); + if (f) + return f; + const d = _b(l, a); + if (d) { + if (SE(r)) { + const y = dn(r); + return ub(d, y.escapedName, Ci(y).nameType); + } + if (Ph(r)) { + const y = is(r); + if (y && fa(y)) { + const x = Gi(y.expression), I = ap(x) && ub(d, op(x)); + if (I) + return I; + } + } + if (r.name) { + const y = o0(r.name); + return Vo( + d, + (x) => { + var I; + return (I = Cfe(Efe(x), y)) == null ? void 0 : I.type; + }, + /*noReductions*/ + !0 + ); + } + } + } + function Xit(r) { + let a, l; + for (let f = 0; f < r.length; f++) + lp(r[f]) && (a ?? (a = f), l = f); + return { first: a, last: l }; + } + function fde(r, a, l, f, d) { + return r && Vo( + r, + (y) => { + if (ga(y)) { + if ((f === void 0 || a < f) && a < y.target.fixedLength) + return p0(Po(y)[a], !!y.target.elementFlags[a]); + const x = l !== void 0 && (d === void 0 || a > d) ? l - a : 0, I = x > 0 && y.target.combinedFlags & 12 ? j8( + y.target, + 3 + /* Fixed */ + ) : 0; + return x > 0 && x <= I ? Po(y)[py(y) - x] : Qw( + y, + f === void 0 ? y.target.fixedLength : Math.min(y.target.fixedLength, f), + l === void 0 || d === void 0 ? I : Math.min(I, l - d), + /*writing*/ + !1, + /*noReductions*/ + !0 + ); + } + return (!f || a < f) && ub(y, "" + a) || dme( + 1, + y, + ft, + /*errorNode*/ + void 0, + /*checkAssignability*/ + !1 + ); + }, + /*noReductions*/ + !0 + ); + } + function Qit(r, a) { + const l = r.parent; + return r === l.whenTrue || r === l.whenFalse ? a_(l, a) : void 0; + } + function Yit(r, a, l) { + const f = _b(r.openingElement.attributes, l), d = IM(BT(r)); + if (!(f && !Ua(f) && d && d !== "")) + return; + const y = jC(r.children), x = y.indexOf(a), I = ub(f, d); + return I && (y.length === 1 ? I : Vo( + I, + (M) => my(M) ? j_(M, gd(x)) : M, + /*noReductions*/ + !0 + )); + } + function Zit(r, a) { + const l = r.parent; + return m7(l) ? a_(r, a) : gm(l) ? Yit(l, r, a) : void 0; + } + function HAe(r, a) { + if (hm(r)) { + const l = _b(r.parent, a); + return !l || Ua(l) ? void 0 : ub(l, _D(r.name)); + } else + return a_(r.parent, a); + } + function PM(r) { + switch (r.kind) { + case 11: + case 9: + case 10: + case 15: + case 228: + case 112: + case 97: + case 106: + case 80: + case 157: + return !0; + case 211: + case 217: + return PM(r.expression); + case 294: + return !r.expression || PM(r.expression); + } + return !1; + } + function Kit(r, a) { + const l = `D${Aa(r)},${jl(a)}`; + return Bd(l) ?? K0( + l, + Unt(a, r) ?? ype( + a, + Wi( + gr( + kn(r.properties, (f) => f.symbol ? f.kind === 303 ? PM(f.initializer) && Yw(a, f.symbol.escapedName) : f.kind === 304 ? Yw(a, f.symbol.escapedName) : !1 : !1), + (f) => [() => XM(f.kind === 303 ? f.initializer : f.name), f.symbol.escapedName] + ), + gr( + kn(qa(a), (f) => { + var d; + return !!(f.flags & 16777216) && !!((d = r?.symbol) != null && d.members) && !r.symbol.members.has(f.escapedName) && Yw(a, f.escapedName); + }), + (f) => [() => ft, f.escapedName] + ) + ), + Ls + ) + ); + } + function est(r, a) { + const l = `D${Aa(r)},${jl(a)}`, f = Bd(l); + if (f) return f; + const d = IM(BT(r)); + return K0( + l, + ype( + a, + Wi( + gr( + kn(r.properties, (y) => !!y.symbol && y.kind === 291 && Yw(a, y.symbol.escapedName) && (!y.initializer || PM(y.initializer))), + (y) => [y.initializer ? () => XM(y.initializer) : () => Jr, y.symbol.escapedName] + ), + gr( + kn(qa(a), (y) => { + var x; + if (!(y.flags & 16777216) || !((x = r?.symbol) != null && x.members)) + return !1; + const I = r.parent.parent; + return y.escapedName === d && gm(I) && jC(I.children).length ? !1 : !r.symbol.members.has(y.escapedName) && Yw(a, y.escapedName); + }), + (y) => [() => ft, y.escapedName] + ) + ), + Ls + ) + ); + } + function _b(r, a) { + const l = Ip(r) ? qAe(r, a) : a_(r, a), f = R$(l, r, a); + if (f && !(a && a & 2 && f.flags & 8650752)) { + const d = Vo( + f, + // When obtaining apparent type of *contextual* type we don't want to get apparent type of mapped types. + // That would evaluate mapped types with array or tuple type constraints too eagerly + // and thus it would prevent `getTypeOfPropertyOfContextualType` from obtaining per-position contextual type for elements of array literal expressions. + // Apparent type of other mapped types is already the mapped type itself so we can just avoid calling `getApparentType` here for all mapped types. + (y) => Cn(y) & 32 ? y : Uu(y), + /*noReductions*/ + !0 + ); + return d.flags & 1048576 && oa(r) ? Kit(r, d) : d.flags & 1048576 && e2(r) ? est(r, d) : d; + } + } + function R$(r, a, l) { + if (r && hc( + r, + 465829888 + /* Instantiable */ + )) { + const f = $2(a); + if (f && l & 1 && at(f.inferences, Wot)) + return j$(r, f.nonFixingMapper); + if (f?.returnMapper) { + const d = j$(r, f.returnMapper); + return d.flags & 1048576 && dh(d.types, Rr) && dh(d.types, tt) ? Jc(d, (y) => y !== Rr && y !== tt) : d; + } + } + return r; + } + function j$(r, a) { + return r.flags & 465829888 ? Bi(r, a) : r.flags & 1048576 ? Qn( + gr(r.types, (l) => j$(l, a)), + 0 + /* None */ + ) : r.flags & 2097152 ? ra(gr(r.types, (l) => j$(l, a))) : r; + } + function a_(r, a) { + var l; + if (r.flags & 67108864) + return; + const f = $Ae( + r, + /*includeCaches*/ + !a + ); + if (f >= 0) + return Hh[f]; + const { parent: d } = r; + switch (d.kind) { + case 260: + case 169: + case 172: + case 171: + case 208: + return Bit(r, a); + case 219: + case 253: + return Jit(r, a); + case 229: + return Wit(d, a); + case 223: + return zit(d, a); + case 213: + case 214: + return JAe(d, r); + case 170: + return Uit(d); + case 216: + case 234: + return Kp(d.type) ? a_(d, a) : wi(d.type); + case 226: + return qit(r, a); + case 303: + case 304: + return _de(d, a); + case 305: + return a_(d.parent, a); + case 209: { + const y = d, x = _b(y, a), I = CC(y.elements, r), M = (l = yn(y)).spreadIndices ?? (l.spreadIndices = Xit(y.elements)); + return fde(x, I, y.elements.length, M.first, M.last); + } + case 227: + return Qit(r, a); + case 239: + return E.assert( + d.parent.kind === 228 + /* TemplateExpression */ + ), Vit(d.parent, r); + case 217: { + if (an(d)) { + if (IJ(d)) + return wi(FJ(d)); + const y = Y1(d); + if (y && !Kp(y.typeExpression.type)) + return wi(y.typeExpression.type); + } + return a_(d, a); + } + case 235: + return a_(d, a); + case 238: + return wi(d.type); + case 277: + return qf(d); + case 294: + return Zit(d, a); + case 291: + case 293: + return HAe(d, a); + case 286: + case 285: + return ist(d, a); + case 301: + return nst(d); + } + } + function GAe(r) { + NM( + r, + a_( + r, + /*contextFlags*/ + void 0 + ), + /*isCache*/ + !0 + ); + } + function NM(r, a, l) { + Rd[ud] = r, Hh[ud] = a, h1[ud] = l, ud++; + } + function nI() { + ud--; + } + function $Ae(r, a) { + for (let l = ud - 1; l >= 0; l--) + if (r === Rd[l] && (a || !h1[l])) + return l; + return -1; + } + function tst(r, a) { + y1[Le] = r, X0[Le] = a, Le++; + } + function rst() { + Le--; + } + function $2(r) { + for (let a = Le - 1; a >= 0; a--) + if (Lb(r, y1[a])) + return X0[a]; + } + function nst(r) { + return ub(jfe( + /*reportErrors*/ + !1 + ), Y5(r)); + } + function ist(r, a) { + if (Dd(r) && a !== 4) { + const l = $Ae( + r.parent, + /*includeCaches*/ + !a + ); + if (l >= 0) + return Hh[l]; + } + return cde(r, 0); + } + function B$(r, a) { + return sd(a) || I8e(a) !== 0 ? sst(r, a) : cst(r, a); + } + function sst(r, a) { + let l = Vde(r, ye); + l = XAe(a, BT(a), l); + const f = X2(Ff.IntrinsicAttributes, a); + return H(f) || (l = VL(f, l)), l; + } + function ast(r, a) { + if (r.compositeSignatures) { + const f = []; + for (const d of r.compositeSignatures) { + const y = Ba(d); + if (Ua(y)) + return y; + const x = Pc(y, a); + if (!x) + return; + f.push(x); + } + return ra(f); + } + const l = Ba(r); + return Ua(l) ? l : Pc(l, a); + } + function ost(r) { + if (sd(r)) return W8e(r); + if (eC(r.tagName)) { + const l = s8e(r), f = Z$(r, l); + return ET(f); + } + const a = uc(r.tagName); + if (a.flags & 128) { + const l = i8e(a, r); + if (!l) + return We; + const f = Z$(r, l); + return ET(f); + } + return a; + } + function XAe(r, a, l) { + const f = Nst(a); + if (f) { + const d = ost(r), y = c8e(f, an(r), d, l); + if (y) + return y; + } + return l; + } + function cst(r, a) { + const l = BT(a), f = Ist(l); + let d = f === void 0 ? Vde(r, ye) : f === "" ? Ba(r) : ast(r, f); + if (!d) + return f && Ir(a.attributes.properties) && je(a, p.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property, Pi(f)), ye; + if (d = XAe(a, l, d), Ua(d)) + return d; + { + let y = d; + const x = X2(Ff.IntrinsicClassAttributes, a); + if (!H(x)) { + const M = zd(x.symbol), z = Ba(r); + let Y; + if (M) { + const Se = fy([z], M, kg(M), an(a)); + Y = Bi(x, B_(M, Se)); + } else Y = x; + y = VL(Y, y); + } + const I = X2(Ff.IntrinsicAttributes, a); + return H(I) || (y = VL(I, y)), y; + } + } + function lst(r) { + return lu(F, "noImplicitAny") ? qu( + r, + (a, l) => a === l || !a ? a : APe(a.typeParameters, l.typeParameters) ? fst(a, l) : void 0 + ) : void 0; + } + function ust(r, a, l) { + if (!r || !a) + return r || a; + const f = Qn([en(r), Bi(en(a), l)]); + return FT(r, f); + } + function _st(r, a, l) { + const f = z_(r), d = z_(a), y = f >= d ? r : a, x = y === r ? a : r, I = y === r ? f : d, M = wg(r) || wg(a), z = M && !wg(y), Y = new Array(I + (z ? 1 : 0)); + for (let Se = 0; Se < I; Se++) { + let pe = Q2(y, Se); + y === a && (pe = Bi(pe, l)); + let Ze = Q2(x, Se) || ye; + x === a && (Ze = Bi(Ze, l)); + const dt = Qn([pe, Ze]), ht = M && !z && Se === I - 1, or = Se >= $d(y) && Se >= $d(x), nr = Se >= f ? void 0 : eP(r, Se), Kr = Se >= d ? void 0 : eP(a, Se), Vr = nr === Kr ? nr : nr ? Kr ? void 0 : nr : Kr, cr = ca( + 1 | (or && !ht ? 16777216 : 0), + Vr || `arg${Se}`, + ht ? 32768 : or ? 16384 : 0 + ); + cr.links.type = ht ? mu(dt) : dt, Y[Se] = cr; + } + if (z) { + const Se = ca( + 1, + "args", + 32768 + /* RestParameter */ + ); + Se.links.type = mu(Gd(x, I)), x === a && (Se.links.type = Bi(Se.links.type, l)), Y[I] = Se; + } + return Y; + } + function fst(r, a) { + const l = r.typeParameters || a.typeParameters; + let f; + r.typeParameters && a.typeParameters && (f = B_(a.typeParameters, r.typeParameters)); + let d = (r.flags | a.flags) & 166; + const y = r.declaration, x = _st(r, a, f), I = Co(x); + I && rc(I) & 32768 && (d |= 1); + const M = ust(r.thisParameter, a.thisParameter, f), z = Math.max(r.minArgumentCount, a.minArgumentCount), Y = fh( + y, + l, + M, + x, + /*resolvedReturnType*/ + void 0, + /*resolvedTypePredicate*/ + void 0, + z, + d + ); + return Y.compositeKind = 2097152, Y.compositeSignatures = Wi(r.compositeKind === 2097152 && r.compositeSignatures || [r], [a]), f && (Y.mapper = r.compositeKind === 2097152 && r.mapper && r.compositeSignatures ? q2(r.mapper, f) : f), Y; + } + function pde(r, a) { + const l = Ps( + r, + 0 + /* Call */ + ), f = kn(l, (d) => !pst(d, a)); + return f.length === 1 ? f[0] : lst(f); + } + function pst(r, a) { + let l = 0; + for (; l < a.parameters.length; l++) { + const f = a.parameters[l]; + if (f.initializer || f.questionToken || f.dotDotDotToken || X5(f)) + break; + } + return a.parameters.length && Bb(a.parameters[0]) && l--, !wg(r) && z_(r) < l; + } + function dde(r) { + return Ky(r) || Ip(r) ? iI(r) : void 0; + } + function iI(r) { + E.assert(r.kind !== 174 || Ip(r)); + const a = Uw(r); + if (a) + return a; + const l = _b( + r, + 1 + /* Signature */ + ); + if (!l) + return; + if (!(l.flags & 1048576)) + return pde(l, r); + let f; + const d = l.types; + for (const y of d) { + const x = pde(y, r); + if (x) + if (!f) + f = [x]; + else if (dM( + f[0], + x, + /*partialMatch*/ + !1, + /*ignoreThisTypes*/ + !0, + /*ignoreReturnTypes*/ + !0, + V8 + )) + f.push(x); + else + return; + } + if (f) + return f.length === 1 ? f[0] : NPe(f[0], f); + } + function dst(r) { + const a = Cr(r); + if (!q1(a) && !r.isUnterminated) { + let l; + s ?? (s = Og( + 99, + /*skipTrivia*/ + !0 + )), s.setScriptTarget(a.languageVersion), s.setLanguageVariant(a.languageVariant), s.setOnError((f, d, y) => { + const x = s.getTokenEnd(); + if (f.category === 3 && l && x === l.start && d === l.length) { + const I = Cx(a.fileName, a.text, x, d, f, y); + Bs(l, I); + } else (!l || x !== l.start) && (l = ol(a, x, d, f, y), Pa.add(l)); + }), s.setText(a.text, r.pos, r.end - r.pos); + try { + return s.scan(), E.assert(s.reScanSlashToken( + /*reportErrors*/ + !0 + ) === 14, "Expected scanner to rescan RegularExpressionLiteral"), !!l; + } finally { + s.setText(""), s.setOnError( + /*onError*/ + void 0 + ); + } + } + return !1; + } + function mst(r) { + const a = yn(r); + return a.flags & 1 || (a.flags |= 1, n(() => dst(r))), ml; + } + function gst(r, a) { + R < yl.SpreadElements && hl( + r, + F.downlevelIteration ? 1536 : 1024 + /* SpreadArray */ + ); + const l = Gi(r.expression, a); + return yy(33, l, ft, r.expression); + } + function hst(r) { + return r.isSpread ? j_(r.type, st) : r.type; + } + function Kk(r) { + return r.kind === 208 && !!r.initializer || r.kind === 303 && Kk(r.initializer) || r.kind === 304 && !!r.objectAssignmentInitializer || r.kind === 226 && r.operatorToken.kind === 64; + } + function yst(r) { + const a = rd(r.parent); + return lp(a) && tm(a.parent); + } + function QAe(r, a, l) { + const f = r.elements, d = f.length, y = [], x = []; + GAe(r); + const I = $y(r), M = rP(r), z = _b( + r, + /*contextFlags*/ + void 0 + ), Y = yst(r) || !!z && kp(z, (pe) => Xw(pe) || T_(pe) && !pe.nameType && !!W8(pe.target || pe)); + let Se = !1; + for (let pe = 0; pe < d; pe++) { + const Ze = f[pe]; + if (Ze.kind === 230) { + R < yl.SpreadElements && hl( + Ze, + F.downlevelIteration ? 1536 : 1024 + /* SpreadArray */ + ); + const dt = Gi(Ze.expression, a, l); + if (my(dt)) + y.push(dt), x.push( + 8 + /* Variadic */ + ); + else if (I) { + const ht = nb(dt, st) || dme( + 65, + dt, + ft, + /*errorNode*/ + void 0, + /*checkAssignability*/ + !1 + ) || ye; + y.push(ht), x.push( + 4 + /* Rest */ + ); + } else + y.push(yy(33, dt, ft, Ze.expression)), x.push( + 4 + /* Rest */ + ); + } else if (me && Ze.kind === 232) + Se = !0, y.push(ve), x.push( + 2 + /* Optional */ + ); + else { + const dt = nP(Ze, a, l); + if (y.push(rl( + dt, + /*isProperty*/ + !0, + Se + )), x.push( + Se ? 2 : 1 + /* Required */ + ), Y && a && a & 2 && !(a & 4) && $f(Ze)) { + const ht = $2(r); + E.assert(ht), Ipe(ht, Ze, dt); + } + } + } + return nI(), I ? Eg(y, x) : YAe(l || M || Y ? Eg( + y, + x, + /*readonly*/ + M && !(z && kp(z, xpe)) + ) : mu( + y.length ? Qn( + Wc(y, (pe, Ze) => x[Ze] & 8 ? j1(pe, st) || Je : pe), + 2 + /* Subtype */ + ) : Z ? Vt : fe, + M + )); + } + function YAe(r) { + if (!(Cn(r) & 4)) + return r; + let a = r.literalType; + return a || (a = r.literalType = i3e(r), a.objectFlags |= 147456), a; + } + function vst(r) { + switch (r.kind) { + case 167: + return bst(r); + case 80: + return Xg(r.escapedText); + case 9: + case 11: + return Xg(r.text); + default: + return !1; + } + } + function bst(r) { + return su( + hd(r), + 296 + /* NumberLike */ + ); + } + function hd(r) { + const a = yn(r.expression); + if (!a.resolvedType) { + if ((Qu(r.parent.parent) || Zn(r.parent.parent) || Yl(r.parent.parent)) && fn(r.expression) && r.expression.operatorToken.kind === 103 && r.parent.kind !== 177 && r.parent.kind !== 178) + return a.resolvedType = We; + if (a.resolvedType = Gi(r.expression), ss(r.parent) && !Kc(r.parent) && Gc(r.parent.parent)) { + const l = Sd(r.parent.parent), f = tde(l); + f && (yn(f).flags |= 4096, yn(r).flags |= 32768, yn(r.parent.parent).flags |= 32768); + } + (a.resolvedType.flags & 98304 || !su( + a.resolvedType, + 402665900 + /* ESSymbolLike */ + ) && !Ls(a.resolvedType, Ot)) && je(r, p.A_computed_property_name_must_be_of_type_string_number_symbol_or_any); + } + return a.resolvedType; + } + function Sst(r) { + var a; + const l = (a = r.declarations) == null ? void 0 : a[0]; + return Xg(r.escapedName) || l && Hl(l) && vst(l.name); + } + function ZAe(r) { + var a; + const l = (a = r.declarations) == null ? void 0 : a[0]; + return N3(r) || l && Hl(l) && fa(l.name) && su( + hd(l.name), + 4096 + /* ESSymbol */ + ); + } + function sI(r, a, l, f) { + const d = []; + for (let x = a; x < l.length; x++) { + const I = l[x]; + (f === de && !ZAe(I) || f === st && Sst(I) || f === Mt && ZAe(I)) && d.push(en(l[x])); + } + const y = d.length ? Qn( + d, + 2 + /* Subtype */ + ) : ft; + return Cg(f, y, r); + } + function J$(r) { + E.assert((r.flags & 2097152) !== 0, "Should only get Alias here."); + const a = Ci(r); + if (!a.immediateTarget) { + const l = ru(r); + if (!l) return E.fail(); + a.immediateTarget = ay( + l, + /*dontRecursivelyResolve*/ + !0 + ); + } + return a.immediateTarget; + } + function Tst(r, a = 0) { + const l = $y(r); + I_t(r, l); + const f = Z ? Us() : void 0; + let d = Us(), y = [], x = hs; + GAe(r); + const I = _b( + r, + /*contextFlags*/ + void 0 + ), M = I && I.pattern && (I.pattern.kind === 206 || I.pattern.kind === 210), z = rP(r), Y = z ? 8 : 0, Se = an(r) && !H7(r), pe = Se ? kj(r) : void 0, Ze = !I && Se && !pe; + let dt = 8192, ht = !1, or = !1, nr = !1, Kr = !1; + for (const Yt of r.properties) + Yt.name && fa(Yt.name) && hd(Yt.name); + let Vr = 0; + for (const Yt of r.properties) { + let pn = dn(Yt); + const zn = Yt.name && Yt.name.kind === 167 ? hd(Yt.name) : void 0; + if (Yt.kind === 303 || Yt.kind === 304 || Ip(Yt)) { + let ci = Yt.kind === 303 ? vIe(Yt, a) : ( + // avoid resolving the left side of the ShorthandPropertyAssignment outside of the destructuring + // for error recovery purposes. For example, if a user wrote `{ a = 100 }` instead of `{ a: 100 }`. + // we don't want to say "could not find 'a'". + Yt.kind === 304 ? nP(!l && Yt.objectAssignmentInitializer ? Yt.objectAssignmentInitializer : Yt.name, a) : bIe(Yt, a) + ); + if (Se) { + const bs = Za(Yt); + bs ? (gu(ci, bs, Yt), ci = bs) : pe && pe.typeExpression && gu(ci, wi(pe.typeExpression), Yt); + } + dt |= Cn(ci) & 458752; + const vn = zn && ap(zn) ? zn : void 0, Ts = vn ? ca( + 4 | pn.flags, + op(vn), + Y | 4096 + /* Late */ + ) : ca(4 | pn.flags, pn.escapedName, Y); + if (vn && (Ts.links.nameType = vn), l && Kk(Yt)) + Ts.flags |= 16777216; + else if (M && !(Cn(I) & 512)) { + const bs = Ys(I, pn.escapedName); + bs ? Ts.flags |= bs.flags & 16777216 : ph(I, de) || je(Yt.name, p.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, Ui(pn), $r(I)); + } + if (Ts.declarations = pn.declarations, Ts.parent = pn.parent, pn.valueDeclaration && (Ts.valueDeclaration = pn.valueDeclaration), Ts.links.type = ci, Ts.links.target = pn, pn = Ts, f?.set(Ts.escapedName, Ts), I && a & 2 && !(a & 4) && (Yt.kind === 303 || Yt.kind === 174) && $f(Yt)) { + const bs = $2(r); + E.assert(bs); + const No = Yt.kind === 303 ? Yt.initializer : Yt; + Ipe(bs, No, ci); + } + } else if (Yt.kind === 305) { + R < yl.ObjectAssign && hl( + Yt, + 2 + /* Assign */ + ), y.length > 0 && (x = W2(x, cr(), r.symbol, dt, z), y = [], d = Us(), or = !1, nr = !1, Kr = !1); + const ci = md(Gi( + Yt.expression, + a & 2 + /* Inferential */ + )); + if (AM(ci)) { + const vn = ipe(ci, z); + if (f && t8e(vn, f, Yt), Vr = y.length, H(x)) + continue; + x = W2(x, vn, r.symbol, dt, z); + } else + je(Yt, p.Spread_types_may_only_be_created_from_object_types), x = We; + continue; + } else + E.assert( + Yt.kind === 177 || Yt.kind === 178 + /* SetAccessor */ + ), rC(Yt); + zn && !(zn.flags & 8576) ? Ls(zn, Ot) && (Ls(zn, st) ? nr = !0 : Ls(zn, Mt) ? Kr = !0 : or = !0, l && (ht = !0)) : d.set(pn.escapedName, pn), y.push(pn); + } + if (nI(), H(x)) + return We; + if (x !== hs) + return y.length > 0 && (x = W2(x, cr(), r.symbol, dt, z), y = [], d = Us(), or = !1, nr = !1), Vo(x, (Yt) => Yt === hs ? cr() : Yt); + return cr(); + function cr() { + const Yt = [], pn = rP(r); + or && Yt.push(sI(pn, Vr, y, de)), nr && Yt.push(sI(pn, Vr, y, st)), Kr && Yt.push(sI(pn, Vr, y, Mt)); + const zn = Ea(r.symbol, d, He, He, Yt); + return zn.objectFlags |= dt | 128 | 131072, Ze && (zn.objectFlags |= 4096), ht && (zn.objectFlags |= 512), l && (zn.pattern = r), zn; + } + } + function AM(r) { + const a = MNe(Vo(r, xg)); + return !!(a.flags & 126615553 || a.flags & 3145728 && Ri(a.types, AM)); + } + function xst(r) { + gde(r); + } + function kst(r, a) { + return rC(r), FM(r) || Je; + } + function Cst(r) { + gde(r.openingElement), eC(r.closingElement.tagName) ? W$(r.closingElement) : Gi(r.closingElement.tagName), z$(r); + } + function Est(r, a) { + return rC(r), FM(r) || Je; + } + function Dst(r) { + gde(r.openingFragment); + const a = Cr(r); + F5(F) && (F.jsxFactory || a.pragmas.has("jsx")) && !F.jsxFragmentFactory && !a.pragmas.has("jsxfrag") && je( + r, + F.jsxFactory ? p.The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option : p.An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments + ), z$(r); + const l = FM(r); + return H(l) ? Je : l; + } + function mde(r) { + return r.includes("-"); + } + function eC(r) { + return Me(r) && BC(r.escapedText) || wd(r); + } + function KAe(r, a) { + return r.initializer ? nP(r.initializer, a) : Jr; + } + function e8e(r, a = 0) { + const l = Z ? Us() : void 0; + let f = Us(), d = Bu, y = !1, x, I = !1, M = 2048; + const z = IM(BT(r)), Y = sd(r); + let Se, pe = r; + if (!Y) { + const ht = r.attributes; + Se = ht.symbol, pe = ht; + const or = a_( + ht, + 0 + /* None */ + ); + for (const nr of ht.properties) { + const Kr = nr.symbol; + if (hm(nr)) { + const Vr = KAe(nr, a); + M |= Cn(Vr) & 458752; + const cr = ca(4 | Kr.flags, Kr.escapedName); + if (cr.declarations = Kr.declarations, cr.parent = Kr.parent, Kr.valueDeclaration && (cr.valueDeclaration = Kr.valueDeclaration), cr.links.type = Vr, cr.links.target = Kr, f.set(cr.escapedName, cr), l?.set(cr.escapedName, cr), _D(nr.name) === z && (I = !0), or) { + const Yt = Ys(or, Kr.escapedName); + Yt && Yt.declarations && Yh(Yt) && Me(nr.name) && Zh(nr.name, Yt.declarations, nr.name.escapedText); + } + if (or && a & 2 && !(a & 4) && $f(nr)) { + const Yt = $2(ht); + E.assert(Yt); + const pn = nr.initializer.expression; + Ipe(Yt, pn, Vr); + } + } else { + E.assert( + nr.kind === 293 + /* JsxSpreadAttribute */ + ), f.size > 0 && (d = W2( + d, + dt(), + ht.symbol, + M, + /*readonly*/ + !1 + ), f = Us()); + const Vr = md(Gi( + nr.expression, + a & 2 + /* Inferential */ + )); + Ua(Vr) && (y = !0), AM(Vr) ? (d = W2( + d, + Vr, + ht.symbol, + M, + /*readonly*/ + !1 + ), l && t8e(Vr, l, nr)) : (je(nr.expression, p.Spread_types_may_only_be_created_from_object_types), x = x ? ra([x, Vr]) : Vr); + } + } + y || f.size > 0 && (d = W2( + d, + dt(), + ht.symbol, + M, + /*readonly*/ + !1 + )); + } + const Ze = r.parent; + if ((gm(Ze) && Ze.openingElement === r || gv(Ze) && Ze.openingFragment === r) && jC(Ze.children).length > 0) { + const ht = z$(Ze, a); + if (!y && z && z !== "") { + I && je(pe, p._0_are_specified_twice_The_attribute_named_0_will_be_overwritten, Pi(z)); + const or = Dd(r) ? _b( + r.attributes, + /*contextFlags*/ + void 0 + ) : void 0, nr = or && ub(or, z), Kr = ca(4, z); + Kr.links.type = ht.length === 1 ? ht[0] : nr && kp(nr, Xw) ? Eg(ht) : mu(Qn(ht)), Kr.valueDeclaration = N.createPropertySignature( + /*modifiers*/ + void 0, + Pi(z), + /*questionToken*/ + void 0, + /*type*/ + void 0 + ), Fa(Kr.valueDeclaration, pe), Kr.valueDeclaration.symbol = Kr; + const Vr = Us(); + Vr.set(z, Kr), d = W2( + d, + Ea(Se, Vr, He, He, He), + Se, + M, + /*readonly*/ + !1 + ); + } + } + if (y) + return Je; + if (x && d !== Bu) + return ra([x, d]); + return x || (d === Bu ? dt() : d); + function dt() { + return M |= 8192, wst(M, Se, f); + } + } + function wst(r, a, l) { + const f = Ea(a, l, He, He, He); + return f.objectFlags |= r | 8192 | 128 | 131072, f; + } + function z$(r, a) { + const l = []; + for (const f of r.children) + if (f.kind === 12) + f.containsOnlyTriviaWhiteSpaces || l.push(de); + else { + if (f.kind === 294 && !f.expression) + continue; + l.push(nP(f, a)); + } + return l; + } + function t8e(r, a, l) { + for (const f of qa(r)) + if (!(f.flags & 16777216)) { + const d = a.get(f.escapedName); + if (d) { + const y = je(d.valueDeclaration, p._0_is_specified_more_than_once_so_this_usage_will_be_overwritten, Pi(d.escapedName)); + Bs(y, tn(l, p.This_spread_always_overwrites_this_property)); + } + } + } + function Pst(r, a) { + return e8e(r.parent, a); + } + function X2(r, a) { + const l = BT(a), f = l && zu(l), d = f && fu( + f, + r, + 788968 + /* Type */ + ); + return d ? ko(d) : We; + } + function W$(r) { + const a = yn(r); + if (!a.resolvedSymbol) { + const l = X2(Ff.IntrinsicElements, r); + if (H(l)) + return le && je(r, p.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists, Pi(Ff.IntrinsicElements)), a.resolvedSymbol = Ve; + { + if (!Me(r.tagName) && !wd(r.tagName)) return E.fail(); + const f = wd(r.tagName) ? Ix(r.tagName) : r.tagName.escapedText, d = Ys(l, f); + if (d) + return a.jsxFlags |= 1, a.resolvedSymbol = d; + const y = D7e(l, x_(Pi(f))); + return y ? (a.jsxFlags |= 2, a.resolvedSymbol = y) : Bk(l, f) ? (a.jsxFlags |= 2, a.resolvedSymbol = l.symbol) : (je(r, p.Property_0_does_not_exist_on_type_1, OJ(r.tagName), "JSX." + Ff.IntrinsicElements), a.resolvedSymbol = Ve); + } + } + return a.resolvedSymbol; + } + function U$(r) { + const a = r && Cr(r), l = a && yn(a); + if (l && l.jsxImplicitImportContainer === !1) + return; + if (l && l.jsxImplicitImportContainer) + return l.jsxImplicitImportContainer; + const f = O5(Q3(F, a), F); + if (!f) + return; + const y = Su(F) === 1 ? p.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option : p.This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_for_the_appropriate_package_installed, x = cft(a, f), I = uT(x || r, f, y, r), M = I && I !== Ve ? Oa(jc(I)) : void 0; + return l && (l.jsxImplicitImportContainer = M || !1), M; + } + function BT(r) { + const a = r && yn(r); + if (a && a.jsxNamespace) + return a.jsxNamespace; + if (!a || a.jsxNamespace !== !1) { + let f = U$(r); + if (!f || f === Ve) { + const d = Dm(r); + f = Dt( + r, + d, + 1920, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + ); + } + if (f) { + const d = jc(fu( + zu(jc(f)), + Ff.JSX, + 1920 + /* Namespace */ + )); + if (d && d !== Ve) + return a && (a.jsxNamespace = d), d; + } + a && (a.jsxNamespace = !1); + } + const l = jc(DE( + Ff.JSX, + 1920, + /*diagnostic*/ + void 0 + )); + if (l !== Ve) + return l; + } + function r8e(r, a) { + const l = a && fu( + a.exports, + r, + 788968 + /* Type */ + ), f = l && ko(l), d = f && qa(f); + if (d) { + if (d.length === 0) + return ""; + if (d.length === 1) + return d[0].escapedName; + d.length > 1 && l.declarations && je(l.declarations[0], p.The_global_type_JSX_0_may_not_have_more_than_one_property, Pi(r)); + } + } + function Nst(r) { + return r && fu( + r.exports, + Ff.LibraryManagedAttributes, + 788968 + /* Type */ + ); + } + function Ast(r) { + return r && fu( + r.exports, + Ff.ElementType, + 788968 + /* Type */ + ); + } + function Ist(r) { + return r8e(Ff.ElementAttributesPropertyNameContainer, r); + } + function IM(r) { + return r8e(Ff.ElementChildrenAttributeNameContainer, r); + } + function n8e(r, a) { + if (r.flags & 4) + return [Kt]; + if (r.flags & 128) { + const d = i8e(r, a); + return d ? [Z$(a, d)] : (je(a, p.Property_0_does_not_exist_on_type_1, r.value, "JSX." + Ff.IntrinsicElements), He); + } + const l = Uu(r); + let f = Ps( + l, + 1 + /* Construct */ + ); + return f.length === 0 && (f = Ps( + l, + 0 + /* Call */ + )), f.length === 0 && l.flags & 1048576 && (f = mfe(gr(l.types, (d) => n8e(d, a)))), f; + } + function i8e(r, a) { + const l = X2(Ff.IntrinsicElements, a); + if (!H(l)) { + const f = r.value, d = Ys(l, Zo(f)); + if (d) + return en(d); + const y = nb(l, de); + return y || void 0; + } + return Je; + } + function Fst(r, a, l) { + if (r === 1) { + const d = o8e(l); + d && Sp(a, d, bf, l.tagName, p.Its_return_type_0_is_not_a_valid_JSX_element, f); + } else if (r === 0) { + const d = a8e(l); + d && Sp(a, d, bf, l.tagName, p.Its_instance_type_0_is_not_a_valid_JSX_element, f); + } else { + const d = o8e(l), y = a8e(l); + if (!d || !y) + return; + const x = Qn([d, y]); + Sp(a, x, bf, l.tagName, p.Its_element_type_0_is_not_a_valid_JSX_element, f); + } + function f() { + const d = qo(l.tagName); + return fs( + /*details*/ + void 0, + p._0_cannot_be_used_as_a_JSX_component, + d + ); + } + } + function s8e(r) { + var a; + E.assert(eC(r.tagName)); + const l = yn(r); + if (!l.resolvedJsxElementAttributesType) { + const f = W$(r); + if (l.jsxFlags & 1) + return l.resolvedJsxElementAttributesType = en(f) || We; + if (l.jsxFlags & 2) { + const d = wd(r.tagName) ? Ix(r.tagName) : r.tagName.escapedText; + return l.resolvedJsxElementAttributesType = ((a = Wk(X2(Ff.IntrinsicElements, r), d)) == null ? void 0 : a.type) || We; + } else + return l.resolvedJsxElementAttributesType = We; + } + return l.resolvedJsxElementAttributesType; + } + function a8e(r) { + const a = X2(Ff.ElementClass, r); + if (!H(a)) + return a; + } + function FM(r) { + return X2(Ff.Element, r); + } + function o8e(r) { + const a = FM(r); + if (a) + return Qn([a, lt]); + } + function Ost(r) { + const a = BT(r); + if (!a) return; + const l = Ast(a); + if (!l) return; + const f = c8e(l, an(r)); + if (!(!f || H(f))) + return f; + } + function c8e(r, a, ...l) { + const f = ko(r); + if (r.flags & 524288) { + const d = Ci(r).typeParameters; + if (Ir(d) >= l.length) { + const y = fy(l, d, l.length, a); + return Ir(y) === 0 ? f : CE(r, y); + } + } + if (Ir(f.typeParameters) >= l.length) { + const d = fy(l, f.typeParameters, l.length, a); + return a0(f, d); + } + } + function Lst(r) { + const a = X2(Ff.IntrinsicElements, r); + return a ? qa(a) : He; + } + function Mst(r) { + (F.jsx || 0) === 0 && je(r, p.Cannot_use_JSX_unless_the_jsx_flag_is_provided), FM(r) === void 0 && le && je(r, p.JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist); + } + function gde(r) { + const a = bu(r); + a && F_t(r), Mst(r), ede(r); + const l = ME(r); + if (eX(l, r), a) { + const f = r, d = Ost(f); + if (d !== void 0) { + const y = f.tagName, x = eC(y) ? x_(OJ(y)) : Gi(y); + Sp(x, d, bf, y, p.Its_type_0_is_not_a_valid_JSX_element_type, () => { + const I = qo(y); + return fs( + /*details*/ + void 0, + p._0_cannot_be_used_as_a_JSX_component, + I + ); + }); + } else + Fst(I8e(f), Ba(l), f); + } + } + function V$(r, a, l) { + if (r.flags & 524288 && (R2(r, a) || Wk(r, a) || P8(a) && ph(r, de) || l && mde(a))) + return !0; + if (r.flags & 33554432) + return V$(r.baseType, a, l); + if (r.flags & 3145728 && aI(r)) { + for (const f of r.types) + if (V$(f, a, l)) + return !0; + } + return !1; + } + function aI(r) { + return !!(r.flags & 524288 && !(Cn(r) & 512) || r.flags & 67108864 || r.flags & 33554432 && aI(r.baseType) || r.flags & 1048576 && at(r.types, aI) || r.flags & 2097152 && Ri(r.types, aI)); + } + function Rst(r, a) { + if (L_t(r), r.expression) { + const l = Gi(r.expression, a); + return r.dotDotDotToken && l !== Je && !Tp(l) && je(r, p.JSX_spread_child_must_be_an_array_type), l; + } else + return We; + } + function hde(r) { + return r.valueDeclaration ? Z2(r.valueDeclaration) : 0; + } + function yde(r) { + if (r.flags & 8192 || rc(r) & 4) + return !0; + if (an(r.valueDeclaration)) { + const a = r.valueDeclaration.parent; + return a && fn(a) && Sc(a) === 3; + } + } + function vde(r, a, l, f, d, y = !0) { + const x = y ? r.kind === 166 ? r.right : r.kind === 205 ? r : r.kind === 208 && r.propertyName ? r.propertyName : r.name : void 0; + return l8e(r, a, l, f, d, x); + } + function l8e(r, a, l, f, d, y) { + var x; + const I = sp(d, l); + if (a) { + if (R < 2 && u8e(d)) + return y && je(y, p.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword), !1; + if (I & 64) + return y && je(y, p.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression, Ui(d), $r(Xk(d))), !1; + if (!(I & 256) && ((x = d.declarations) != null && x.some(cZ))) + return y && je(y, p.Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super, Ui(d)), !1; + } + if (I & 64 && u8e(d) && (o3(r) || cK(r) || Nf(r.parent) && W7(r.parent.parent))) { + const z = Fh(af(d)); + if (z && Aut(r)) + return y && je(y, p.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor, Ui(d), rp(z.name)), !1; + } + if (!(I & 6)) + return !0; + if (I & 2) { + const z = Fh(af(d)); + return Cme(r, z) ? !0 : (y && je(y, p.Property_0_is_private_and_only_accessible_within_class_1, Ui(d), $r(Xk(d))), !1); + } + if (a) + return !0; + let M = C7e(r, (z) => { + const Y = ko(dn(z)); + return CNe(Y, d, l); + }); + return !M && (M = jst(r), M = M && CNe(M, d, l), I & 256 || !M) ? (y && je(y, p.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, Ui(d), $r(Xk(d) || f)), !1) : I & 256 ? !0 : (f.flags & 262144 && (f = f.isThisType ? s_(f) : iu(f)), !f || !yE(f, M) ? (y && je(y, p.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2, Ui(d), $r(M), $r(f)), !1) : !0); + } + function jst(r) { + const a = Bst(r); + let l = a?.type && wi(a.type); + if (l) + l.flags & 262144 && (l = s_(l)); + else { + const f = Lu( + r, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + vs(f) && (l = sde(f)); + } + if (l && Cn(l) & 7) + return xT(l); + } + function Bst(r) { + const a = Lu( + r, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + return a && vs(a) ? jb(a) : void 0; + } + function u8e(r) { + return !!pM(r, (a) => !(a.flags & 8192)); + } + function OE(r) { + return zm(Gi(r), r); + } + function OM(r) { + return Hd( + r, + 50331648 + /* IsUndefinedOrNull */ + ); + } + function bde(r) { + return OM(r) ? f0(r) : r; + } + function Jst(r, a) { + const l = _o(r) ? G_(r) : void 0; + if (r.kind === 106) { + je(r, p.The_value_0_cannot_be_used_here, "null"); + return; + } + if (l !== void 0 && l.length < 100) { + if (Me(r) && l === "undefined") { + je(r, p.The_value_0_cannot_be_used_here, "undefined"); + return; + } + je( + r, + a & 16777216 ? a & 33554432 ? p._0_is_possibly_null_or_undefined : p._0_is_possibly_undefined : p._0_is_possibly_null, + l + ); + } else + je( + r, + a & 16777216 ? a & 33554432 ? p.Object_is_possibly_null_or_undefined : p.Object_is_possibly_undefined : p.Object_is_possibly_null + ); + } + function zst(r, a) { + je( + r, + a & 16777216 ? a & 33554432 ? p.Cannot_invoke_an_object_which_is_possibly_null_or_undefined : p.Cannot_invoke_an_object_which_is_possibly_undefined : p.Cannot_invoke_an_object_which_is_possibly_null + ); + } + function _8e(r, a, l) { + if (Z && r.flags & 2) { + if (_o(a)) { + const d = G_(a); + if (d.length < 100) + return je(a, p._0_is_of_type_unknown, d), We; + } + return je(a, p.Object_is_of_type_unknown), We; + } + const f = NE( + r, + 50331648 + /* IsUndefinedOrNull */ + ); + if (f & 50331648) { + l(a, f); + const d = f0(r); + return d.flags & 229376 ? We : d; + } + return r; + } + function zm(r, a) { + return _8e(r, a, Jst); + } + function f8e(r, a) { + const l = zm(r, a); + if (l.flags & 16384) { + if (_o(a)) { + const f = G_(a); + if (Me(a) && f === "undefined") + return je(a, p.The_value_0_cannot_be_used_here, f), l; + if (f.length < 100) + return je(a, p._0_is_possibly_undefined, f), l; + } + je(a, p.Object_is_possibly_undefined); + } + return l; + } + function q$(r, a, l) { + return r.flags & 64 ? Wst(r, a) : Tde(r, r.expression, OE(r.expression), r.name, a, l); + } + function Wst(r, a) { + const l = Gi(r.expression), f = $8(l, r.expression); + return h$(Tde(r, r.expression, zm(f, r.expression), r.name, a), r, f !== l); + } + function p8e(r, a) { + const l = q7(r) && Xy(r.left) ? zm(wM(r.left), r.left) : OE(r.left); + return Tde(r, r.left, l, r.right, a); + } + function Sde(r) { + for (; r.parent.kind === 217; ) + r = r.parent; + return tm(r.parent) && r.parent.expression === r; + } + function LM(r, a) { + for (let l = J7(a); l; l = Al(l)) { + const { symbol: f } = l, d = P3(f, r), y = f.members && f.members.get(d) || f.exports && f.exports.get(d); + if (y) + return y; + } + } + function Ust(r) { + if (!Al(r)) + return hr(r, p.Private_identifiers_are_not_allowed_outside_class_bodies); + if (!yF(r.parent)) { + if (!Td(r)) + return hr(r, p.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression); + const a = fn(r.parent) && r.parent.operatorToken.kind === 103; + if (!H$(r) && !a) + return hr(r, p.Cannot_find_name_0, An(r)); + } + return !1; + } + function Vst(r) { + Ust(r); + const a = H$(r); + return a && RM( + a, + /*nodeForCheckWriteOnly*/ + void 0, + /*isSelfTypeAccess*/ + !1 + ), Je; + } + function H$(r) { + if (!Td(r)) + return; + const a = yn(r); + return a.resolvedSymbol === void 0 && (a.resolvedSymbol = LM(r.escapedText, r)), a.resolvedSymbol; + } + function G$(r, a) { + return Ys(r, a.escapedName); + } + function qst(r, a, l) { + let f; + const d = qa(r); + d && lr(d, (x) => { + const I = x.valueDeclaration; + if (I && Hl(I) && Ni(I.name) && I.name.escapedText === a.escapedText) + return f = x, !0; + }); + const y = Hp(a); + if (f) { + const x = E.checkDefined(f.valueDeclaration), I = E.checkDefined(Al(x)); + if (l?.valueDeclaration) { + const M = l.valueDeclaration, z = Al(M); + if (E.assert(!!z), ur(z, (Y) => I === Y)) { + const Y = je( + a, + p.The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling, + y, + $r(r) + ); + return Bs( + Y, + tn( + M, + p.The_shadowing_declaration_of_0_is_defined_here, + y + ), + tn( + x, + p.The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here, + y + ) + ), !0; + } + } + return je( + a, + p.Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier, + y, + Hp(I.name || lW) + ), !0; + } + return !1; + } + function d8e(r, a) { + return (n0(a) || o3(r) && _h(a)) && Lu( + r, + /*includeArrowFunctions*/ + !0, + /*includeClassComputedPropertyName*/ + !1 + ) === L1(a); + } + function Tde(r, a, l, f, d, y) { + const x = yn(a).resolvedSymbol, I = Gy(r), M = Uu(I !== 0 || Sde(r) ? cf(l) : l), z = Ua(M) || M === fr; + let Y; + if (Ni(f)) { + (R < yl.PrivateNamesAndClassStaticBlocks || R < yl.ClassAndClassElementDecorators || !$) && (I !== 0 && hl( + r, + 1048576 + /* ClassPrivateFieldSet */ + ), I !== 1 && hl( + r, + 524288 + /* ClassPrivateFieldGet */ + )); + const pe = LM(f.escapedText, f); + if (I && pe && pe.valueDeclaration && fc(pe.valueDeclaration) && hr(f, p.Cannot_assign_to_private_method_0_Private_methods_are_not_writable, An(f)), z) { + if (pe) + return H(M) ? We : M; + if (J7(f) === void 0) + return hr(f, p.Private_identifiers_are_not_allowed_outside_class_bodies), Je; + } + if (Y = pe && G$(l, pe), Y === void 0) { + if (qst(l, f, pe)) + return We; + const Ze = J7(f); + Ze && k4(Cr(Ze), F.checkJs) && hr(f, p.Private_field_0_must_be_declared_in_an_enclosing_class, An(f)); + } else + Y.flags & 65536 && !(Y.flags & 32768) && I !== 1 && je(r, p.Private_accessor_was_defined_without_a_getter); + } else { + if (z) + return Me(a) && x && Zk( + r, + 2, + /*propSymbol*/ + void 0, + l + ), H(M) ? We : M; + Y = Ys( + M, + f.escapedText, + /*skipObjectFunctionPropertyAugment*/ + iX(M), + /*includeTypeOnlyMembers*/ + r.kind === 166 + /* QualifiedName */ + ); + } + Zk(r, 2, Y, l); + let Se; + if (Y) { + const pe = Sme(Y, f); + if (Yh(pe) && Zfe(r, pe) && pe.declarations && Zh(f, pe.declarations, f.escapedText), Hst(Y, r, f), RM(Y, r, T8e(a, x)), yn(r).resolvedSymbol = Y, vde(r, a.kind === 108, xx(r), M, Y), uIe(r, Y, I)) + return je(f, p.Cannot_assign_to_0_because_it_is_a_read_only_property, An(f)), We; + Se = d8e(r, Y) ? Ye : y || x5(r) ? ly(Y) : en(Y); + } else { + const pe = !Ni(f) && (I === 0 || !PT(l) || uD(l)) ? Wk(M, f.escapedText) : void 0; + if (!(pe && pe.type)) { + const Ze = xde( + r, + l.symbol, + /*excludeClasses*/ + !0 + ); + return !Ze && B8(l) ? Je : l.symbol === he ? (he.exports.has(f.escapedText) && he.exports.get(f.escapedText).flags & 418 ? je(f, p.Property_0_does_not_exist_on_type_1, Pi(f.escapedText), $r(l)) : le && je(f, p.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature, $r(l)), Je) : (f.escapedText && !nE(r) && g8e(f, uD(l) ? M : l, Ze), We); + } + pe.isReadonly && ($y(r) || xB(r)) && je(r, p.Index_signature_in_type_0_only_permits_reading, $r(M)), Se = pe.type, F.noUncheckedIndexedAccess && Gy(r) !== 1 && (Se = Qn([Se, L])), F.noPropertyAccessFromIndexSignature && Tn(r) && je(f, p.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0, Pi(f.escapedText)), pe.declaration && T1(pe.declaration) && Zh(f, [pe.declaration], f.escapedText); + } + return m8e(r, Y, Se, f, d); + } + function xde(r, a, l) { + var f; + const d = Cr(r); + if (d && F.checkJs === void 0 && d.checkJsDirective === void 0 && (d.scriptKind === 1 || d.scriptKind === 2)) { + const y = lr(a?.declarations, Cr), x = !a?.valueDeclaration || !Zn(a.valueDeclaration) || ((f = a.valueDeclaration.heritageClauses) == null ? void 0 : f.length) || D0( + /*useLegacyDecorators*/ + !1, + a.valueDeclaration + ); + return !(d !== y && y && E0(y)) && !(l && a && a.flags & 32 && x) && !(r && l && Tn(r) && r.expression.kind === 110 && x); + } + return !1; + } + function m8e(r, a, l, f, d) { + const y = Gy(r); + if (y === 1) + return p0(l, !!(a && a.flags & 16777216)); + if (a && !(a.flags & 98311) && !(a.flags & 8192 && l.flags & 1048576) && !bX(a.declarations)) + return l; + if (l === Ye) + return i0(r, a); + l = Kpe(l, r, d); + let x = !1; + if (Z && te && vo(r) && r.expression.kind === 110) { + const M = a && a.valueDeclaration; + if (M && f7e(M) && !Vs(M)) { + const z = eI(r); + z.kind === 176 && z.parent === M.parent && !(M.flags & 33554432) && (x = !0); + } + } else Z && a && a.valueDeclaration && Tn(a.valueDeclaration) && h3(a.valueDeclaration) && eI(r) === eI(a.valueDeclaration) && (x = !0); + const I = m0(r, l, x ? gy(l) : l); + return x && !PE(l) && PE(I) ? (je(f, p.Property_0_is_used_before_being_assigned, Ui(a)), l) : y ? _0(I) : I; + } + function Hst(r, a, l) { + const { valueDeclaration: f } = r; + if (!f || Cr(a).isDeclarationFile) + return; + let d; + const y = An(l); + kde(a) && !ket(f) && !(vo(a) && vo(a.expression)) && !ny(f, l) && !(fc(f) && PX(f) & 256) && ($ || !Gst(r)) ? d = je(l, p.Property_0_is_used_before_its_initialization, y) : f.kind === 263 && a.parent.kind !== 183 && !(f.flags & 33554432) && !ny(f, l) && (d = je(l, p.Class_0_used_before_its_declaration, y)), d && Bs(d, tn(f, p._0_is_declared_here, y)); + } + function kde(r) { + return !!ur(r, (a) => { + switch (a.kind) { + case 172: + return !0; + case 303: + case 174: + case 177: + case 178: + case 305: + case 167: + case 239: + case 294: + case 291: + case 292: + case 293: + case 286: + case 233: + case 298: + return !1; + case 219: + case 244: + return ks(a.parent) && nc(a.parent.parent) ? !0 : "quit"; + default: + return Td(a) ? !1 : "quit"; + } + }); + } + function Gst(r) { + if (!(r.parent.flags & 32)) + return !1; + let a = en(r.parent); + for (; ; ) { + if (a = a.symbol && $st(a), !a) + return !1; + const l = Ys(a, r.escapedName); + if (l && l.valueDeclaration) + return !0; + } + } + function $st(r) { + const a = wo(r); + if (a.length !== 0) + return ra(a); + } + function g8e(r, a, l) { + let f, d; + if (!Ni(r) && a.flags & 1048576 && !(a.flags & 402784252)) { + for (const x of a.types) + if (!Ys(x, r.escapedText) && !Wk(x, r.escapedText)) { + f = fs(f, p.Property_0_does_not_exist_on_type_1, co(r), $r(x)); + break; + } + } + if (h8e(r.escapedText, a)) { + const x = co(r), I = $r(a); + f = fs(f, p.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead, x, I, I + "." + x); + } else { + const x = gI(a); + if (x && Ys(x, r.escapedText)) + f = fs(f, p.Property_0_does_not_exist_on_type_1, co(r), $r(a)), d = tn(r, p.Did_you_forget_to_use_await); + else { + const I = co(r), M = $r(a), z = Yst(I, a); + if (z !== void 0) + f = fs(f, p.Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later, I, M, z); + else { + const Y = Cde(r, a); + if (Y !== void 0) { + const Se = _c(Y), pe = l ? p.Property_0_may_not_exist_on_type_1_Did_you_mean_2 : p.Property_0_does_not_exist_on_type_1_Did_you_mean_2; + f = fs(f, pe, I, M, Se), d = Y.valueDeclaration && tn(Y.valueDeclaration, p._0_is_declared_here, Se); + } else { + const Se = Xst(a) ? p.Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom : p.Property_0_does_not_exist_on_type_1; + f = fs(kfe(f, a), Se, I, M); + } + } + } + } + const y = Jg(Cr(r), r, f); + d && Bs(y, d), Qh(!l || f.code !== p.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code, y); + } + function Xst(r) { + return F.lib && !F.lib.includes("dom") && iit(r, (a) => a.symbol && /^(?:EventTarget|Node|(?:HTML[a-zA-Z]*)?Element)$/.test(Pi(a.symbol.escapedName))) && u0(r); + } + function h8e(r, a) { + const l = a.symbol && Ys(en(a.symbol), r); + return l !== void 0 && !!l.valueDeclaration && Vs(l.valueDeclaration); + } + function Qst(r) { + const a = Hp(r), f = Qj().get(a); + return f && TR(f.keys()); + } + function Yst(r, a) { + const l = Uu(a).symbol; + if (!l) + return; + const f = _c(l), y = Qj().get(f); + if (y) { + for (const [x, I] of y) + if (as(I, r)) + return x; + } + } + function y8e(r, a) { + return MM( + r, + qa(a), + 106500 + /* ClassMember */ + ); + } + function Cde(r, a) { + let l = qa(a); + if (typeof r != "string") { + const f = r.parent; + Tn(f) && (l = kn(l, (d) => x8e(f, a, d))), r = An(r); + } + return MM( + r, + l, + 111551 + /* Value */ + ); + } + function v8e(r, a) { + const l = rs(r) ? r : An(r), f = qa(a); + return (l === "for" ? Pn(f, (y) => _c(y) === "htmlFor") : l === "class" ? Pn(f, (y) => _c(y) === "className") : void 0) ?? MM( + l, + f, + 111551 + /* Value */ + ); + } + function b8e(r, a) { + const l = Cde(r, a); + return l && _c(l); + } + function Zst(r, a, l) { + const f = fu(r, a, l); + if (f) return f; + let d; + return r === Oe ? d = Li( + ["string", "number", "boolean", "object", "bigint", "symbol"], + (x) => r.has(x.charAt(0).toUpperCase() + x.slice(1)) ? ca(524288, x) : void 0 + ).concat(Ki(r.values())) : d = Ki(r.values()), MM(Pi(a), d, l); + } + function S8e(r, a, l) { + return E.assert(a !== void 0, "outername should always be defined"), Qt( + r, + a, + l, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1, + /*excludeGlobals*/ + !1 + ); + } + function Ede(r, a) { + return a.exports && MM( + An(r), + _T(a), + 2623475 + /* ModuleMember */ + ); + } + function Kst(r, a, l) { + function f(x) { + const I = R2(r, x); + if (I) { + const M = zT(en(I)); + return !!M && $d(M) >= 1 && Ls(l, Gd(M, 0)); + } + return !1; + } + const d = $y(a) ? "set" : "get"; + if (!f(d)) + return; + let y = z3(a.expression); + return y === void 0 ? y = d : y += "." + d, y; + } + function eat(r, a) { + const l = a.types.filter((f) => !!(f.flags & 128)); + return Sb(r.value, l, (f) => f.value); + } + function MM(r, a, l) { + return Sb(r, a, f); + function f(d) { + const y = _c(d); + if (!Vi(y, '"')) { + if (d.flags & l) + return y; + if (d.flags & 2097152) { + const x = Gv(d); + if (x && x.flags & l) + return y; + } + } + } + } + function RM(r, a, l) { + const f = r && r.flags & 106500 && r.valueDeclaration; + if (!f) + return; + const d = Q_( + f, + 2 + /* Private */ + ), y = r.valueDeclaration && Hl(r.valueDeclaration) && Ni(r.valueDeclaration.name); + if (!(!d && !y) && !(a && x5(a) && !(r.flags & 65536))) { + if (l) { + const x = ur(a, Ka); + if (x && x.symbol === r) + return; + } + (rc(r) & 1 ? Ci(r).target : r).isReferenced = -1; + } + } + function T8e(r, a) { + return r.kind === 110 || !!a && _o(r) && a === Nu(w_(r)); + } + function tat(r, a) { + switch (r.kind) { + case 211: + return Dde(r, r.expression.kind === 108, a, cf(Gi(r.expression))); + case 166: + return Dde( + r, + /*isSuper*/ + !1, + a, + cf(Gi(r.left)) + ); + case 205: + return Dde( + r, + /*isSuper*/ + !1, + a, + wi(r) + ); + } + } + function x8e(r, a, l) { + return wde( + r, + r.kind === 211 && r.expression.kind === 108, + /*isWrite*/ + !1, + a, + l + ); + } + function Dde(r, a, l, f) { + if (Ua(f)) + return !0; + const d = Ys(f, l); + return !!d && wde( + r, + a, + /*isWrite*/ + !1, + f, + d + ); + } + function wde(r, a, l, f, d) { + if (Ua(f)) + return !0; + if (d.valueDeclaration && Fu(d.valueDeclaration)) { + const y = Al(d.valueDeclaration); + return !vu(r) && !!ur(r, (x) => x === y); + } + return l8e(r, a, l, f, d); + } + function rat(r) { + const a = r.initializer; + if (a.kind === 261) { + const l = a.declarations[0]; + if (l && !Ds(l.name)) + return dn(l); + } else if (a.kind === 80) + return Nu(a); + } + function nat(r) { + return du(r).length === 1 && !!ph(r, st); + } + function iat(r) { + const a = za(r); + if (a.kind === 80) { + const l = Nu(a); + if (l.flags & 3) { + let f = r, d = r.parent; + for (; d; ) { + if (d.kind === 249 && f === d.statement && rat(d) === l && nat(au(d.expression))) + return !0; + f = d, d = d.parent; + } + } + } + return !1; + } + function sat(r, a) { + return r.flags & 64 ? aat(r, a) : k8e(r, OE(r.expression), a); + } + function aat(r, a) { + const l = Gi(r.expression), f = $8(l, r.expression); + return h$(k8e(r, zm(f, r.expression), a), r, f !== l); + } + function k8e(r, a, l) { + const f = Gy(r) !== 0 || Sde(r) ? cf(a) : a, d = r.argumentExpression, y = Gi(d); + if (H(f) || f === fr) + return f; + if (iX(f) && !Na(d)) + return je(d, p.A_const_enum_member_can_only_be_accessed_using_a_string_literal), We; + const x = iat(d) ? st : y, I = Gy(r); + let M; + I === 0 ? M = 32 : (M = 4 | (PT(f) && !uD(f) ? 2 : 0), I === 2 && (M |= 32)); + const z = j1(f, x, M, r) || We; + return FIe(m8e(r, yn(r).resolvedSymbol, z, d, l), r); + } + function C8e(r) { + return tm(r) || fv(r) || bu(r); + } + function JT(r) { + return C8e(r) && lr(r.typeArguments, la), r.kind === 215 ? Gi(r.template) : bu(r) ? Gi(r.attributes) : fn(r) ? Gi(r.left) : tm(r) && lr(r.arguments, (a) => { + Gi(a); + }), Kt; + } + function Wm(r) { + return JT(r), Yr; + } + function oat(r, a, l) { + let f, d, y = 0, x, I = -1, M; + E.assert(!a.length); + for (const z of r) { + const Y = z.declaration && dn(z.declaration), Se = z.declaration && z.declaration.parent; + !d || Y === d ? f && Se === f ? x = x + 1 : (f = Se, x = y) : (x = y = a.length, f = Se), d = Y, T1e(z) ? (I++, M = I, y++) : M = x, a.splice(M, 0, l ? VKe(z, l) : z); + } + } + function $$(r) { + return !!r && (r.kind === 230 || r.kind === 237 && r.isSpread); + } + function Pde(r) { + return ec(r, $$); + } + function E8e(r) { + return !!(r.flags & 16384); + } + function cat(r) { + return !!(r.flags & 49155); + } + function X$(r, a, l, f = !1) { + if (sd(r)) return !0; + let d, y = !1, x = z_(l), I = $d(l); + if (r.kind === 215) + if (d = a.length, r.template.kind === 228) { + const M = _a(r.template.templateSpans); + y = tc(M.literal) || !!M.literal.isUnterminated; + } else { + const M = r.template; + E.assert( + M.kind === 15 + /* NoSubstitutionTemplateLiteral */ + ), y = !!M.isUnterminated; + } + else if (r.kind === 170) + d = O8e(r, l); + else if (r.kind === 226) + d = 1; + else if (bu(r)) { + if (y = r.attributes.end === r.end, y) + return !0; + d = I === 0 ? a.length : 1, x = a.length === 0 ? x : 1, I = Math.min(I, 1); + } else if (r.arguments) { + d = f ? a.length + 1 : a.length, y = r.arguments.end === r.end; + const M = Pde(a); + if (M >= 0) + return M >= $d(l) && (wg(l) || M < z_(l)); + } else + return E.assert( + r.kind === 214 + /* NewExpression */ + ), $d(l) === 0; + if (!wg(l) && d > x) + return !1; + if (y || d >= I) + return !0; + for (let M = d; M < I; M++) { + const z = Gd(l, M); + if (Jc(z, an(r) && !Z ? cat : E8e).flags & 131072) + return !1; + } + return !0; + } + function Nde(r, a) { + const l = Ir(r.typeParameters), f = kg(r.typeParameters); + return !at(a) || a.length >= f && a.length <= l; + } + function D8e(r, a) { + let l; + return !!(r.target && (l = Q2(r.target, a)) && sb(l)); + } + function zT(r) { + return oI( + r, + 0, + /*allowMembers*/ + !1 + ); + } + function w8e(r) { + return oI( + r, + 0, + /*allowMembers*/ + !1 + ) || oI( + r, + 1, + /*allowMembers*/ + !1 + ); + } + function oI(r, a, l) { + if (r.flags & 524288) { + const f = Vd(r); + if (l || f.properties.length === 0 && f.indexInfos.length === 0) { + if (a === 0 && f.callSignatures.length === 1 && f.constructSignatures.length === 0) + return f.callSignatures[0]; + if (a === 1 && f.constructSignatures.length === 1 && f.callSignatures.length === 0) + return f.constructSignatures[0]; + } + } + } + function P8e(r, a, l, f) { + const d = Y8(e3e(r), r, 0, f), y = lI(a), x = l && (y && y.flags & 262144 ? l.nonFixingMapper : l.mapper), I = x ? $k(a, x) : a; + return Ppe(I, r, (M, z) => { + d0(d.inferences, M, z); + }), l || Npe(a, r, (M, z) => { + d0( + d.inferences, + M, + z, + 128 + /* ReturnType */ + ); + }), M8(r, Wpe(d), an(a.declaration)); + } + function lat(r, a, l, f) { + const d = B$(a, r), y = RE(r.attributes, d, f, l); + return d0(f.inferences, y, d), Wpe(f); + } + function N8e(r) { + if (!r) + return Pt; + const a = Gi(r); + return VK(r) ? a : d4(r.parent) ? f0(a) : vu(r.parent) ? g$(a) : a; + } + function Ade(r, a, l, f, d) { + if (bu(r)) + return lat(r, a, f, d); + if (r.kind !== 170 && r.kind !== 226) { + const M = Ri(a.typeParameters, (Y) => !!j2(Y)), z = a_( + r, + M ? 8 : 0 + /* None */ + ); + if (z) { + const Y = Ba(a); + if (U1(Y)) { + const Se = $2(r); + if (!(!M && a_( + r, + 8 + /* SkipBindingPatterns */ + ) !== z)) { + const ht = Ope(ynt( + Se, + 1 + /* NoDefault */ + )), or = Bi(z, ht), nr = zT(or), Kr = nr && nr.typeParameters ? ET(Nfe(nr, nr.typeParameters)) : or; + d0( + d.inferences, + Kr, + Y, + 128 + /* ReturnType */ + ); + } + const Ze = Y8(a.typeParameters, a, d.flags), dt = Bi(z, Se && Se.returnMapper); + d0(Ze.inferences, dt, Y), d.returnMapper = at(Ze.inferences, jE) ? Ope(Tnt(Ze)) : void 0; + } + } + } + const y = uI(a), x = y ? Math.min(z_(a) - 1, l.length) : l.length; + if (y && y.flags & 262144) { + const M = Pn(d.inferences, (z) => z.typeParameter === y); + M && (M.impliedArity = ec(l, $$, x) < 0 ? l.length - x : void 0); + } + const I = ib(a); + if (I && U1(I)) { + const M = F8e(r); + d0(d.inferences, N8e(M), I); + } + for (let M = 0; M < x; M++) { + const z = l[M]; + if (z.kind !== 232) { + const Y = Gd(a, M); + if (U1(Y)) { + const Se = RE(z, Y, d, f); + d0(d.inferences, Se, Y); + } + } + } + if (y && U1(y)) { + const M = Ide(l, x, l.length, y, d, f); + d0(d.inferences, M, y); + } + return Wpe(d); + } + function A8e(r) { + return r.flags & 1048576 ? Vo(r, A8e) : r.flags & 1 || mM(iu(r) || r) ? r : ga(r) ? Eg( + z2(r), + r.target.elementFlags, + /*readonly*/ + !1, + r.target.labeledElementDeclarations + ) : Eg([r], [ + 8 + /* Variadic */ + ]); + } + function Ide(r, a, l, f, d, y) { + const x = CT(f); + if (a >= l - 1) { + const Y = r[l - 1]; + if ($$(Y)) { + const Se = Y.kind === 237 ? Y.type : RE(Y.expression, f, d, y); + return my(Se) ? A8e(Se) : mu(yy(33, Se, ft, Y.kind === 230 ? Y.expression : Y), x); + } + } + const I = [], M = [], z = []; + for (let Y = a; Y < l; Y++) { + const Se = r[Y]; + if ($$(Se)) { + const pe = Se.kind === 237 ? Se.type : Gi(Se.expression); + my(pe) ? (I.push(pe), M.push( + 8 + /* Variadic */ + )) : (I.push(yy(33, pe, ft, Se.kind === 230 ? Se.expression : Se)), M.push( + 4 + /* Rest */ + )); + } else { + const pe = ga(f) ? fde(f, Y - a, l - a) || ye : j_( + f, + gd(Y - a), + 256 + /* Contextual */ + ), Ze = RE(Se, pe, d, y), dt = x || hc( + pe, + 406978556 + /* StringMapping */ + ); + I.push(dt ? Vu(Ze) : cb(Ze)), M.push( + 1 + /* Required */ + ); + } + Se.kind === 237 && Se.tupleNameSource ? z.push(Se.tupleNameSource) : z.push(void 0); + } + return Eg(I, M, x && !kp(f, xpe), z); + } + function Fde(r, a, l, f) { + const d = an(r.declaration), y = r.typeParameters, x = fy(gr(a, wi), y, kg(y), d); + let I; + for (let M = 0; M < a.length; M++) { + E.assert(y[M] !== void 0, "Should not call checkTypeArguments with too many type arguments"); + const z = s_(y[M]); + if (z) { + const Y = l && f ? () => fs( + /*details*/ + void 0, + p.Type_0_does_not_satisfy_the_constraint_1 + ) : void 0, Se = f || p.Type_0_does_not_satisfy_the_constraint_1; + I || (I = B_(y, x)); + const pe = x[M]; + if (!gu( + pe, + of(Bi(z, I), pe), + l ? a[M] : void 0, + Se, + Y + )) + return; + } + } + return x; + } + function I8e(r) { + if (eC(r.tagName)) + return 2; + const a = Uu(Gi(r.tagName)); + return Ir(Ps( + a, + 1 + /* Construct */ + )) ? 0 : Ir(Ps( + a, + 0 + /* Call */ + )) ? 1 : 2; + } + function uat(r, a, l, f, d, y, x) { + const I = B$(a, r), M = sd(r) ? e8e(r) : RE( + r.attributes, + I, + /*inferenceContext*/ + void 0, + f + ), z = f & 4 ? Q8(M) : M; + return Y() && ppe( + z, + I, + l, + d ? sd(r) ? r : r.tagName : void 0, + sd(r) ? void 0 : r.attributes, + /*headMessage*/ + void 0, + y, + x + ); + function Y() { + var Se; + if (U$(r)) + return !0; + const pe = (Dd(r) || MS(r)) && !(eC(r.tagName) || wd(r.tagName)) ? Gi(r.tagName) : void 0; + if (!pe) + return !0; + const Ze = Ps( + pe, + 0 + /* Call */ + ); + if (!Ir(Ze)) + return !0; + const dt = j7e(r); + if (!dt) + return !0; + const ht = oc( + dt, + 111551, + /*ignoreErrors*/ + !0, + /*dontResolveAlias*/ + !1, + r + ); + if (!ht) + return !0; + const or = en(ht), nr = Ps( + or, + 0 + /* Call */ + ); + if (!Ir(nr)) + return !0; + let Kr = !1, Vr = 0; + for (const Yt of nr) { + const pn = Gd(Yt, 0), zn = Ps( + pn, + 0 + /* Call */ + ); + if (Ir(zn)) + for (const ci of zn) { + if (Kr = !0, wg(ci)) + return !0; + const vn = z_(ci); + vn > Vr && (Vr = vn); + } + } + if (!Kr) + return !0; + let cr = 1 / 0; + for (const Yt of Ze) { + const pn = $d(Yt); + pn < cr && (cr = pn); + } + if (cr <= Vr) + return !0; + if (d) { + const Yt = r.tagName, pn = tn(Yt, p.Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3, G_(Yt), cr, G_(dt), Vr), zn = (Se = Cp(Yt)) == null ? void 0 : Se.valueDeclaration; + zn && Bs(pn, tn(zn, p._0_is_declared_here, G_(Yt))), x && x.skipLogging && (x.errors || (x.errors = [])).push(pn), x.skipLogging || Pa.add(pn); + } + return !1; + } + } + function Q$(r) { + return r = za(r), hF(r) ? za(r.expression) : r; + } + function jM(r, a, l, f, d, y, x, I) { + const M = { errors: void 0, skipLogging: !0 }; + if (TZ(r)) + return uat(r, l, f, d, y, x, M) ? void 0 : (E.assert(!y || !!M.errors, "jsx should have errors when reporting errors"), M.errors || He); + const z = ib(l); + if (z && z !== Pt && !(Yb(r) || Fs(r) && D_(r.expression))) { + const dt = F8e(r), ht = N8e(dt), or = y ? dt || r : void 0, nr = p.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1; + if (!Sp(ht, z, f, or, nr, x, M)) + return E.assert(!y || !!M.errors, "this parameter should have errors when reporting errors"), M.errors || He; + } + const Y = p.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1, Se = uI(l), pe = Se ? Math.min(z_(l) - 1, a.length) : a.length; + for (let dt = 0; dt < pe; dt++) { + const ht = a[dt]; + if (ht.kind !== 232) { + const or = Gd(l, dt), nr = RE( + ht, + or, + /*inferenceContext*/ + void 0, + d + ), Kr = d & 4 ? Q8(nr) : nr, Vr = I ? Bi(Kr, I.nonFixingMapper) : Kr, cr = Q$(ht); + if (!ppe(Vr, or, f, y ? cr : void 0, cr, Y, x, M)) + return E.assert(!y || !!M.errors, "parameter should have errors when reporting errors"), Ze(ht, Vr, or), M.errors || He; + } + } + if (Se) { + const dt = Ide( + a, + pe, + a.length, + Se, + /*context*/ + void 0, + d + ), ht = a.length - pe, or = y ? ht === 0 ? r : ht === 1 ? Q$(a[pe]) : Cd(cI(r, dt), a[pe].pos, a[a.length - 1].end) : void 0; + if (!Sp( + dt, + Se, + f, + or, + Y, + /*containingMessageChain*/ + void 0, + M + )) + return E.assert(!y || !!M.errors, "rest parameter should have errors when reporting errors"), Ze(or, dt, Se), M.errors || He; + } + return; + function Ze(dt, ht, or) { + if (dt && y && M.errors && M.errors.length) { + if (iP(or)) + return; + const nr = iP(ht); + nr && Jm(nr, or, f) && Bs(M.errors[0], tn(dt, p.Did_you_forget_to_use_await)); + } + } + } + function F8e(r) { + if (r.kind === 226) + return r.right; + const a = r.kind === 213 ? r.expression : r.kind === 215 ? r.tag : r.kind === 170 && !V ? r.expression : void 0; + if (a) { + const l = xc(a); + if (vo(l)) + return l.expression; + } + } + function cI(r, a, l, f) { + const d = bv.createSyntheticExpression(a, l, f); + return ot(d, r), Fa(d, r), d; + } + function Y$(r) { + if (sd(r)) + return [cI(r, Yc)]; + if (r.kind === 215) { + const f = r.template, d = [cI(f, Uet())]; + return f.kind === 228 && lr(f.templateSpans, (y) => { + d.push(y.expression); + }), d; + } + if (r.kind === 170) + return _at(r); + if (r.kind === 226) + return [r.left]; + if (bu(r)) + return r.attributes.properties.length > 0 || Dd(r) && r.parent.children.length > 0 ? [r.attributes] : He; + const a = r.arguments || He, l = Pde(a); + if (l >= 0) { + const f = a.slice(0, l); + for (let d = l; d < a.length; d++) { + const y = a[d], x = y.kind === 230 && (Md ? Gi(y.expression) : uc(y.expression)); + x && ga(x) ? lr(z2(x), (I, M) => { + var z; + const Y = x.target.elementFlags[M], Se = cI(y, Y & 4 ? mu(I) : I, !!(Y & 12), (z = x.target.labeledElementDeclarations) == null ? void 0 : z[M]); + f.push(Se); + }) : f.push(y); + } + return f; + } + return a; + } + function _at(r) { + const a = r.expression, l = Hde(r); + if (l) { + const f = []; + for (const d of l.parameters) { + const y = en(d); + f.push(cI(a, y)); + } + return f; + } + return E.fail(); + } + function O8e(r, a) { + return F.experimentalDecorators ? fat(r, a) : ( + // Allow the runtime to oversupply arguments to an ES decorator as long as there's at least one parameter. + Math.min(Math.max(z_(a), 1), 2) + ); + } + function fat(r, a) { + switch (r.parent.kind) { + case 263: + case 231: + return 1; + case 172: + return cm(r.parent) ? 3 : 2; + case 174: + case 177: + case 178: + return a.parameters.length <= 2 ? 2 : 3; + case 169: + return 3; + default: + return E.fail(); + } + } + function L8e(r) { + const a = Cr(r), { start: l, length: f } = dS(a, Tn(r.expression) ? r.expression.name : r.expression); + return { start: l, length: f, sourceFile: a }; + } + function BM(r, a, ...l) { + if (Fs(r)) { + const { sourceFile: f, start: d, length: y } = L8e(r); + return "message" in a ? ol(f, d, y, a, ...l) : oB(f, a); + } else + return "message" in a ? tn(r, a, ...l) : Jg(Cr(r), r, a); + } + function pat(r) { + return tm(r) ? Tn(r.expression) ? r.expression.name : r.expression : fv(r) ? Tn(r.tag) ? r.tag.name : r.tag : bu(r) ? r.tagName : r; + } + function dat(r) { + if (!Fs(r) || !Me(r.expression)) return !1; + const a = Dt( + r.expression, + r.expression.escapedText, + 111551, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + ), l = a?.valueDeclaration; + if (!l || !Ii(l) || !Ky(l.parent) || !Yb(l.parent.parent) || !Me(l.parent.parent.expression)) + return !1; + const f = Bfe( + /*reportErrors*/ + !1 + ); + return f ? Cp( + l.parent.parent.expression, + /*ignoreErrors*/ + !0 + ) === f : !1; + } + function M8e(r, a, l, f) { + var d; + const y = Pde(l); + if (y > -1) + return tn(l[y], p.A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter); + let x = Number.POSITIVE_INFINITY, I = Number.NEGATIVE_INFINITY, M = Number.NEGATIVE_INFINITY, z = Number.POSITIVE_INFINITY, Y; + for (const ht of a) { + const or = $d(ht), nr = z_(ht); + or < x && (x = or, Y = ht), I = Math.max(I, nr), or < l.length && or > M && (M = or), l.length < nr && nr < z && (z = nr); + } + const Se = at(a, wg), pe = Se ? x : x < I ? x + "-" + I : x, Ze = !Se && pe === 1 && l.length === 0 && dat(r); + if (Ze && an(r)) + return BM(r, p.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments); + const dt = ll(r) ? Se ? p.The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0 : p.The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0 : Se ? p.Expected_at_least_0_arguments_but_got_1 : Ze ? p.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise : p.Expected_0_arguments_but_got_1; + if (x < l.length && l.length < I) { + if (f) { + let ht = fs( + /*details*/ + void 0, + p.No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments, + l.length, + M, + z + ); + return ht = fs(ht, f), BM(r, ht); + } + return BM(r, p.No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments, l.length, M, z); + } else if (l.length < x) { + let ht; + if (f) { + let nr = fs( + /*details*/ + void 0, + dt, + pe, + l.length + ); + nr = fs(nr, f), ht = BM(r, nr); + } else + ht = BM(r, dt, pe, l.length); + const or = (d = Y?.declaration) == null ? void 0 : d.parameters[Y.thisParameter ? l.length + 1 : l.length]; + if (or) { + const nr = Ds(or.name) ? [p.An_argument_matching_this_binding_pattern_was_not_provided] : Zm(or) ? [p.Arguments_for_the_rest_parameter_0_were_not_provided, An(w_(or.name))] : [p.An_argument_for_0_was_not_provided, or.name ? An(w_(or.name)) : l.length], Kr = tn(or, ...nr); + return Bs(ht, Kr); + } + return ht; + } else { + const ht = N.createNodeArray(l.slice(I)), or = ya(ht).pos; + let nr = _a(ht).end; + if (nr === or && nr++, Cd(ht, or, nr), f) { + let Kr = fs( + /*details*/ + void 0, + dt, + pe, + l.length + ); + return Kr = fs(Kr, f), e3(Cr(r), ht, Kr); + } + return DC(Cr(r), ht, dt, pe, l.length); + } + } + function mat(r, a, l, f) { + const d = l.length; + if (a.length === 1) { + const I = a[0], M = kg(I.typeParameters), z = Ir(I.typeParameters); + if (f) { + let Y = fs( + /*details*/ + void 0, + p.Expected_0_type_arguments_but_got_1, + M < z ? M + "-" + z : M, + d + ); + return Y = fs(Y, f), e3(Cr(r), l, Y); + } + return DC(Cr(r), l, p.Expected_0_type_arguments_but_got_1, M < z ? M + "-" + z : M, d); + } + let y = -1 / 0, x = 1 / 0; + for (const I of a) { + const M = kg(I.typeParameters), z = Ir(I.typeParameters); + M > d ? x = Math.min(x, M) : z < d && (y = Math.max(y, z)); + } + if (y !== -1 / 0 && x !== 1 / 0) { + if (f) { + let I = fs( + /*details*/ + void 0, + p.No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments, + d, + y, + x + ); + return I = fs(I, f), e3(Cr(r), l, I); + } + return DC(Cr(r), l, p.No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments, d, y, x); + } + if (f) { + let I = fs( + /*details*/ + void 0, + p.Expected_0_type_arguments_but_got_1, + y === -1 / 0 ? x : y, + d + ); + return I = fs(I, f), e3(Cr(r), l, I); + } + return DC(Cr(r), l, p.Expected_0_type_arguments_but_got_1, y === -1 / 0 ? x : y, d); + } + function LE(r, a, l, f, d, y) { + const x = r.kind === 215, I = r.kind === 170, M = bu(r), z = sd(r), Y = r.kind === 226, Se = !w && !l; + let pe, Ze, dt, ht, or = 0, nr = [], Kr; + !I && !Y && !mS(r) && !z && (Kr = r.typeArguments, (x || M || r.expression.kind !== 108) && lr(Kr, la)), nr = l || [], oat(a, nr, d), z || E.assert(nr.length, "Revert #54442 and add a testcase with whatever triggered this"); + const Vr = Y$(r), cr = nr.length === 1 && !nr[0].typeParameters; + !I && !cr && at(Vr, $f) && (or = 4); + const Yt = !!(f & 16) && r.kind === 213 && r.arguments.hasTrailingComma; + if (nr.length > 1 && (ht = zn(nr, pg, cr, Yt)), ht || (ht = zn(nr, bf, cr, Yt)), ht) + return ht; + if (ht = gat(r, nr, Vr, !!l, f), yn(r).resolvedSignature = ht, Se) { + if (!y && Y && (y = p.The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method), pe) + if (pe.length === 1 || pe.length > 3) { + const ci = pe[pe.length - 1]; + let vn; + pe.length > 3 && (vn = fs(vn, p.The_last_overload_gave_the_following_error), vn = fs(vn, p.No_overload_matches_this_call)), y && (vn = fs(vn, y)); + const Ts = jM( + r, + Vr, + ci, + bf, + 0, + /*reportErrors*/ + !0, + () => vn, + /*inferenceContext*/ + void 0 + ); + if (Ts) + for (const bs of Ts) + ci.declaration && pe.length > 3 && Bs(bs, tn(ci.declaration, p.The_last_overload_is_declared_here)), pn(ci, bs), Pa.add(bs); + else + E.fail("No error for last overload signature"); + } else { + const ci = []; + let vn = 0, Ts = Number.MAX_VALUE, bs = 0, No = 0; + for (const Sr of pe) { + const vi = jM( + r, + Vr, + Sr, + bf, + 0, + /*reportErrors*/ + !0, + () => fs( + /*details*/ + void 0, + p.Overload_0_of_1_2_gave_the_following_error, + No + 1, + nr.length, + eb(Sr) + ), + /*inferenceContext*/ + void 0 + ); + vi ? (vi.length <= Ts && (Ts = vi.length, bs = No), vn = Math.max(vn, vi.length), ci.push(vi)) : E.fail("No error for 3 or fewer overload signatures"), No++; + } + const ns = vn > 1 ? ci[bs] : Dp(ci); + E.assert(ns.length > 0, "No errors reported for 3 or fewer overload signatures"); + let xl = fs( + gr(ns, qZ), + p.No_overload_matches_this_call + ); + y && (xl = fs(xl, y)); + const Ko = [...na(ns, (Sr) => Sr.relatedInformation)]; + let kl; + if (Ri(ns, (Sr) => Sr.start === ns[0].start && Sr.length === ns[0].length && Sr.file === ns[0].file)) { + const { file: Sr, start: Mr, length: vi } = ns[0]; + kl = { file: Sr, start: Mr, length: vi, code: xl.code, category: xl.category, messageText: xl, relatedInformation: Ko }; + } else + kl = Jg(Cr(r), pat(r), xl, Ko); + pn(pe[0], kl), Pa.add(kl); + } + else if (Ze) + Pa.add(M8e(r, [Ze], Vr, y)); + else if (dt) + Fde( + dt, + r.typeArguments, + /*reportErrors*/ + !0, + y + ); + else if (!z) { + const ci = kn(a, (vn) => Nde(vn, Kr)); + ci.length === 0 ? Pa.add(mat(r, a, Kr, y)) : Pa.add(M8e(r, ci, Vr, y)); + } + } + return ht; + function pn(ci, vn) { + var Ts, bs; + const No = pe, ns = Ze, xl = dt, Ko = ((bs = (Ts = ci.declaration) == null ? void 0 : Ts.symbol) == null ? void 0 : bs.declarations) || He, Sr = Ko.length > 1 ? Pn(Ko, (Mr) => Ka(Mr) && Ap(Mr.body)) : void 0; + if (Sr) { + const Mr = Gf(Sr), vi = !Mr.typeParameters; + zn([Mr], bf, vi) && Bs(vn, tn(Sr, p.The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible)); + } + pe = No, Ze = ns, dt = xl; + } + function zn(ci, vn, Ts, bs = !1) { + var No, ns; + if (pe = void 0, Ze = void 0, dt = void 0, Ts) { + const xl = ci[0]; + if (at(Kr) || !X$(r, Vr, xl, bs)) + return; + if (jM( + r, + Vr, + xl, + vn, + 0, + /*reportErrors*/ + !1, + /*containingMessageChain*/ + void 0, + /*inferenceContext*/ + void 0 + )) { + pe = [xl]; + return; + } + return xl; + } + for (let xl = 0; xl < ci.length; xl++) { + let Ko = ci[xl]; + if (!Nde(Ko, Kr) || !X$(r, Vr, Ko, bs)) + continue; + let kl, Sr; + if (Ko.typeParameters) { + const vi = ((ns = (No = Ko.typeParameters[0].symbol.declarations) == null ? void 0 : No[0]) == null ? void 0 : ns.parent) || (Ko.declaration && Go(Ko.declaration) ? Ko.declaration.parent : Ko.declaration); + vi && ur(r, (ts) => ts === vi) && (Ko = Oet(Ko)); + let Zr; + if (at(Kr)) { + if (Zr = Fde( + Ko, + Kr, + /*reportErrors*/ + !1 + ), !Zr) { + dt = Ko; + continue; + } + } else + Sr = Y8( + Ko.typeParameters, + Ko, + /*flags*/ + an(r) ? 2 : 0 + /* None */ + ), Zr = mh(Ade(r, Ko, Vr, or | 8, Sr), Sr.nonFixingMapper), or |= Sr.flags & 4 ? 8 : 0; + if (kl = M8(Ko, Zr, an(Ko.declaration), Sr && Sr.inferredTypeParameters), uI(Ko) && !X$(r, Vr, kl, bs)) { + Ze = kl; + continue; + } + } else + kl = Ko; + if (jM( + r, + Vr, + kl, + vn, + or, + /*reportErrors*/ + !1, + /*containingMessageChain*/ + void 0, + Sr + )) { + (pe || (pe = [])).push(kl); + continue; + } + if (or) { + if (or = 0, Sr) { + const Mr = mh(Ade(r, Ko, Vr, or, Sr), Sr.mapper); + if (kl = M8(Ko, Mr, an(Ko.declaration), Sr.inferredTypeParameters), uI(Ko) && !X$(r, Vr, kl, bs)) { + Ze = kl; + continue; + } + } + if (jM( + r, + Vr, + kl, + vn, + or, + /*reportErrors*/ + !1, + /*containingMessageChain*/ + void 0, + Sr + )) { + (pe || (pe = [])).push(kl); + continue; + } + } + return ci[xl] = kl, kl; + } + } + } + function gat(r, a, l, f, d) { + return E.assert(a.length > 0), rC(r), f || a.length === 1 || a.some((y) => !!y.typeParameters) ? vat(r, a, l, d) : hat(a); + } + function hat(r) { + const a = Li(r, (M) => M.thisParameter); + let l; + a.length && (l = R8e(a, a.map(WM))); + const { min: f, max: d } = Cee(r, yat), y = []; + for (let M = 0; M < d; M++) { + const z = Li(r, (Y) => ku(Y) ? M < Y.parameters.length - 1 ? Y.parameters[M] : _a(Y.parameters) : M < Y.parameters.length ? Y.parameters[M] : void 0); + E.assert(z.length !== 0), y.push(R8e(z, Li(r, (Y) => Q2(Y, M)))); + } + const x = Li(r, (M) => ku(M) ? _a(M.parameters) : void 0); + let I = 128; + if (x.length !== 0) { + const M = mu(Qn( + Li(r, KPe), + 2 + /* Subtype */ + )); + y.push(j8e(x, M)), I |= 1; + } + return r.some(T1e) && (I |= 2), fh( + r[0].declaration, + /*typeParameters*/ + void 0, + // Before calling this we tested for `!candidates.some(c => !!c.typeParameters)`. + l, + y, + /*resolvedReturnType*/ + ra(r.map(Ba)), + /*resolvedTypePredicate*/ + void 0, + f, + I + ); + } + function yat(r) { + const a = r.parameters.length; + return ku(r) ? a - 1 : a; + } + function R8e(r, a) { + return j8e(r, Qn( + a, + 2 + /* Subtype */ + )); + } + function j8e(r, a) { + return FT(ya(r), a); + } + function vat(r, a, l, f) { + const d = Tat(a, Ue === void 0 ? l.length : Ue), y = a[d], { typeParameters: x } = y; + if (!x) + return y; + const I = C8e(r) ? r.typeArguments : void 0, M = I ? jG(y, bat(I, x, an(r))) : Sat(r, x, y, l, f); + return a[d] = M, M; + } + function bat(r, a, l) { + const f = r.map(nC); + for (; f.length > a.length; ) + f.pop(); + for (; f.length < a.length; ) + f.push(j2(a[f.length]) || s_(a[f.length]) || zpe(l)); + return f; + } + function Sat(r, a, l, f, d) { + const y = Y8( + a, + l, + /*flags*/ + an(r) ? 2 : 0 + /* None */ + ), x = Ade(r, l, f, d | 4 | 8, y); + return jG(l, x); + } + function Tat(r, a) { + let l = -1, f = -1; + for (let d = 0; d < r.length; d++) { + const y = r[d], x = z_(y); + if (wg(y) || x >= a) + return d; + x > f && (f = x, l = d); + } + return l; + } + function xat(r, a, l) { + if (r.expression.kind === 108) { + const M = O$(r.expression); + if (Ua(M)) { + for (const z of r.arguments) + Gi(z); + return Kt; + } + if (!H(M)) { + const z = sm(Al(r)); + if (z) { + const Y = yi(M, z.typeArguments, z); + return LE( + r, + Y, + a, + l, + 0 + /* None */ + ); + } + } + return JT(r); + } + let f, d = Gi(r.expression); + if (oS(r)) { + const M = $8(d, r.expression); + f = M === d ? 0 : m4(r) ? 16 : 8, d = M; + } else + f = 0; + if (d = _8e( + d, + r.expression, + zst + ), d === fr) + return pr; + const y = Uu(d); + if (H(y)) + return Wm(r); + const x = Ps( + y, + 0 + /* Call */ + ), I = Ps( + y, + 1 + /* Construct */ + ).length; + if (JM(d, y, x.length, I)) + return !H(d) && r.typeArguments && je(r, p.Untyped_function_calls_may_not_accept_type_arguments), JT(r); + if (!x.length) { + if (I) + je(r, p.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, $r(d)); + else { + let M; + if (r.arguments.length === 1) { + const z = Cr(r).text; + yu(z.charCodeAt(aa( + z, + r.expression.end, + /*stopAfterLineBreak*/ + !0 + ) - 1)) && (M = tn(r.expression, p.Are_you_missing_a_semicolon)); + } + Lde(r.expression, y, 0, M); + } + return Wm(r); + } + return l & 8 && !r.typeArguments && x.some(kat) ? (TIe(r, l), Mn) : x.some((M) => an(M.declaration) && !!Tj(M.declaration)) ? (je(r, p.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, $r(d)), Wm(r)) : LE(r, x, a, l, f); + } + function kat(r) { + return !!(r.typeParameters && Pme(Ba(r))); + } + function JM(r, a, l, f) { + return Ua(r) || Ua(a) && !!(r.flags & 262144) || !l && !f && !(a.flags & 1048576) && !(md(a).flags & 131072) && Ls(r, Rl); + } + function Cat(r, a, l) { + let f = OE(r.expression); + if (f === fr) + return pr; + if (f = Uu(f), H(f)) + return Wm(r); + if (Ua(f)) + return r.typeArguments && je(r, p.Untyped_function_calls_may_not_accept_type_arguments), JT(r); + const d = Ps( + f, + 1 + /* Construct */ + ); + if (d.length) { + if (!Eat(r, d[0])) + return Wm(r); + if (B8e(d, (I) => !!(I.flags & 4))) + return je(r, p.Cannot_create_an_instance_of_an_abstract_class), Wm(r); + const x = f.symbol && Fh(f.symbol); + return x && $n( + x, + 64 + /* Abstract */ + ) ? (je(r, p.Cannot_create_an_instance_of_an_abstract_class), Wm(r)) : LE( + r, + d, + a, + l, + 0 + /* None */ + ); + } + const y = Ps( + f, + 0 + /* Call */ + ); + if (y.length) { + const x = LE( + r, + y, + a, + l, + 0 + /* None */ + ); + return le || (x.declaration && !Um(x.declaration) && Ba(x) !== Pt && je(r, p.Only_a_void_function_can_be_called_with_the_new_keyword), ib(x) === Pt && je(r, p.A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void)), x; + } + return Lde( + r.expression, + f, + 1 + /* Construct */ + ), Wm(r); + } + function B8e(r, a) { + return os(r) ? at(r, (l) => B8e(l, a)) : r.compositeKind === 1048576 ? at(r.compositeSignatures, a) : a(r); + } + function Ode(r, a) { + const l = wo(a); + if (!Ir(l)) + return !1; + const f = l[0]; + if (f.flags & 2097152) { + const d = f.types, y = FPe(d); + let x = 0; + for (const I of f.types) { + if (!y[x] && Cn(I) & 3 && (I.symbol === r || Ode(r, I))) + return !0; + x++; + } + return !1; + } + return f.symbol === r ? !0 : Ode(r, f); + } + function Eat(r, a) { + if (!a || !a.declaration) + return !0; + const l = a.declaration, f = bx( + l, + 6 + /* NonPublicAccessibilityModifier */ + ); + if (!f || l.kind !== 176) + return !0; + const d = Fh(l.parent.symbol), y = ko(l.parent.symbol); + if (!Cme(r, d)) { + const x = Al(r); + if (x && f & 4) { + const I = nC(x); + if (Ode(l.parent.symbol, I)) + return !0; + } + return f & 2 && je(r, p.Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration, $r(y)), f & 4 && je(r, p.Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration, $r(y)), !1; + } + return !0; + } + function J8e(r, a, l) { + let f; + const d = l === 0, y = tC(a), x = y && Ps(y, l).length > 0; + if (a.flags & 1048576) { + const M = a.types; + let z = !1; + for (const Y of M) + if (Ps(Y, l).length !== 0) { + if (z = !0, f) + break; + } else if (f || (f = fs( + f, + d ? p.Type_0_has_no_call_signatures : p.Type_0_has_no_construct_signatures, + $r(Y) + ), f = fs( + f, + d ? p.Not_all_constituents_of_type_0_are_callable : p.Not_all_constituents_of_type_0_are_constructable, + $r(a) + )), z) + break; + z || (f = fs( + /*details*/ + void 0, + d ? p.No_constituent_of_type_0_is_callable : p.No_constituent_of_type_0_is_constructable, + $r(a) + )), f || (f = fs( + f, + d ? p.Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other : p.Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other, + $r(a) + )); + } else + f = fs( + f, + d ? p.Type_0_has_no_call_signatures : p.Type_0_has_no_construct_signatures, + $r(a) + ); + let I = d ? p.This_expression_is_not_callable : p.This_expression_is_not_constructable; + if (Fs(r.parent) && r.parent.arguments.length === 0) { + const { resolvedSymbol: M } = yn(r); + M && M.flags & 32768 && (I = p.This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without); + } + return { + messageChain: fs(f, I), + relatedMessage: x ? p.Did_you_forget_to_use_await : void 0 + }; + } + function Lde(r, a, l, f) { + const { messageChain: d, relatedMessage: y } = J8e(r, a, l), x = Jg(Cr(r), r, d); + if (y && Bs(x, tn(r, y)), Fs(r.parent)) { + const { start: I, length: M } = L8e(r.parent); + x.start = I, x.length = M; + } + Pa.add(x), z8e(a, l, f ? Bs(x, f) : x); + } + function z8e(r, a, l) { + if (!r.symbol) + return; + const f = Ci(r.symbol).originatingImport; + if (f && !_f(f)) { + const d = Ps(en(Ci(r.symbol).target), a); + if (!d || !d.length) return; + Bs(l, tn(f, p.Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead)); + } + } + function Dat(r, a, l) { + const f = Gi(r.tag), d = Uu(f); + if (H(d)) + return Wm(r); + const y = Ps( + d, + 0 + /* Call */ + ), x = Ps( + d, + 1 + /* Construct */ + ).length; + if (JM(f, d, y.length, x)) + return JT(r); + if (!y.length) { + if (Ql(r.parent)) { + const I = tn(r.tag, p.It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked); + return Pa.add(I), Wm(r); + } + return Lde( + r.tag, + d, + 0 + /* Call */ + ), Wm(r); + } + return LE( + r, + y, + a, + l, + 0 + /* None */ + ); + } + function wat(r) { + switch (r.parent.kind) { + case 263: + case 231: + return p.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression; + case 169: + return p.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression; + case 172: + return p.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression; + case 174: + case 177: + case 178: + return p.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression; + default: + return E.fail(); + } + } + function Pat(r, a, l) { + const f = Gi(r.expression), d = Uu(f); + if (H(d)) + return Wm(r); + const y = Ps( + d, + 0 + /* Call */ + ), x = Ps( + d, + 1 + /* Construct */ + ).length; + if (JM(f, d, y.length, x)) + return JT(r); + if (Iat(r, y) && !Yu(r.expression)) { + const M = qo( + r.expression, + /*includeTrivia*/ + !1 + ); + return je(r, p._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0, M), Wm(r); + } + const I = wat(r); + if (!y.length) { + const M = J8e( + r.expression, + d, + 0 + /* Call */ + ), z = fs(M.messageChain, I), Y = Jg(Cr(r.expression), r.expression, z); + return M.relatedMessage && Bs(Y, tn(r.expression, M.relatedMessage)), Pa.add(Y), z8e(d, 0, Y), Wm(r); + } + return LE(r, y, a, l, 0, I); + } + function Z$(r, a) { + const l = BT(r), f = l && zu(l), d = f && fu( + f, + Ff.Element, + 788968 + /* Type */ + ), y = d && ke.symbolToEntityName(d, 788968, r), x = N.createFunctionTypeNode( + /*typeParameters*/ + void 0, + [N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "props", + /*questionToken*/ + void 0, + ke.typeToTypeNode(a, r) + )], + y ? N.createTypeReferenceNode( + y, + /*typeArguments*/ + void 0 + ) : N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ) + ), I = ca(1, "props"); + return I.links.type = a, fh( + x, + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + [I], + d ? ko(d) : We, + /*resolvedTypePredicate*/ + void 0, + 1, + 0 + /* None */ + ); + } + function W8e(r) { + const a = yn(Cr(r)); + if (a.jsxFragmentType !== void 0) return a.jsxFragmentType; + const l = Dm(r); + if (l === "null") return a.jsxFragmentType = Je; + const f = Pa ? p.Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found : void 0, d = U$(r) ?? Dt( + r, + l, + F.jsx === 1 ? 111167 : 111551, + /*nameNotFoundMessage*/ + f, + /*isUse*/ + !0 + ); + if (d === void 0) return a.jsxFragmentType = We; + if (d.escapedName === mW.Fragment) return a.jsxFragmentType = en(d); + const y = d.flags & 2097152 ? Pl(d) : d, x = d && zu(y), I = x && fu( + x, + mW.Fragment, + 2 + /* BlockScopedVariable */ + ), M = I && en(I); + return a.jsxFragmentType = M === void 0 ? We : M; + } + function Nat(r, a, l) { + const f = sd(r); + let d; + if (f) + d = W8e(r); + else { + if (eC(r.tagName)) { + const I = s8e(r), M = Z$(r, I); + return z1(RE( + r.attributes, + B$(M, r), + /*inferenceContext*/ + void 0, + 0 + /* Normal */ + ), I, r.tagName, r.attributes), Ir(r.typeArguments) && (lr(r.typeArguments, la), Pa.add(DC(Cr(r), r.typeArguments, p.Expected_0_type_arguments_but_got_1, 0, Ir(r.typeArguments)))), M; + } + d = Gi(r.tagName); + } + const y = Uu(d); + if (H(y)) + return Wm(r); + const x = n8e(d, r); + return JM( + d, + y, + x.length, + /*constructSignatures*/ + 0 + ) ? JT(r) : x.length === 0 ? (f ? je(r, p.JSX_element_type_0_does_not_have_any_construct_or_call_signatures, qo(r)) : je(r.tagName, p.JSX_element_type_0_does_not_have_any_construct_or_call_signatures, qo(r.tagName)), Wm(r)) : LE( + r, + x, + a, + l, + 0 + /* None */ + ); + } + function Aat(r, a, l) { + const f = Gi(r.right); + if (!Ua(f)) { + const d = Yde(f); + if (d) { + const y = Uu(d); + if (H(y)) + return Wm(r); + const x = Ps( + y, + 0 + /* Call */ + ), I = Ps( + y, + 1 + /* Construct */ + ); + if (JM(d, y, x.length, I.length)) + return JT(r); + if (x.length) + return LE( + r, + x, + a, + l, + 0 + /* None */ + ); + } else if (!(xX(f) || H2(f, Rl))) + return je(r.right, p.The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method), Wm(r); + } + return Kt; + } + function Iat(r, a) { + return a.length && Ri(a, (l) => l.minArgumentCount === 0 && !ku(l) && l.parameters.length < O8e(r, l)); + } + function Fat(r, a, l) { + switch (r.kind) { + case 213: + return xat(r, a, l); + case 214: + return Cat(r, a, l); + case 215: + return Dat(r, a, l); + case 170: + return Pat(r, a, l); + case 289: + case 286: + case 285: + return Nat(r, a, l); + case 226: + return Aat(r, a, l); + } + E.assertNever(r, "Branch in 'resolveSignature' should be unreachable."); + } + function ME(r, a, l) { + const f = yn(r), d = f.resolvedSignature; + if (d && d !== Mn && !a) + return d; + const y = cn; + d || (cn = vr.length), f.resolvedSignature = Mn; + let x = Fat( + r, + a, + l || 0 + /* Normal */ + ); + return cn = y, x !== Mn && (f.resolvedSignature !== Mn && (x = f.resolvedSignature), f.resolvedSignature = _g === Md ? x : d), x; + } + function Um(r) { + var a; + if (!r || !an(r)) + return !1; + const l = Tc(r) || po(r) ? r : (Kn(r) || Xc(r)) && r.initializer && po(r.initializer) ? r.initializer : void 0; + if (l) { + if (Tj(r)) return !0; + if (Xc(rd(l.parent))) return !1; + const f = dn(l); + return !!((a = f?.members) != null && a.size); + } + return !1; + } + function Mde(r, a) { + var l, f; + if (a) { + const d = Ci(a); + if (!d.inferredClassSymbol || !d.inferredClassSymbol.has(Zs(r))) { + const y = Rg(r) ? r : mg(r); + return y.exports = y.exports || Us(), y.members = y.members || Us(), y.flags |= a.flags & 32, (l = a.exports) != null && l.size && Nm(y.exports, a.exports), (f = a.members) != null && f.size && Nm(y.members, a.members), (d.inferredClassSymbol || (d.inferredClassSymbol = /* @__PURE__ */ new Map())).set(Zs(y), y), y; + } + return d.inferredClassSymbol.get(Zs(r)); + } + } + function Oat(r) { + var a; + const l = r && K$( + r, + /*allowDeclaration*/ + !0 + ), f = (a = l?.exports) == null ? void 0 : a.get("prototype"), d = f?.valueDeclaration && Lat(f.valueDeclaration); + return d ? dn(d) : void 0; + } + function K$(r, a) { + if (!r.parent) + return; + let l, f; + if (Kn(r.parent) && r.parent.initializer === r) { + if (!an(r) && !(CI(r.parent) && Ka(r))) + return; + l = r.parent.name, f = r.parent; + } else if (fn(r.parent)) { + const d = r.parent, y = r.parent.operatorToken.kind; + if (y === 64 && (a || d.right === r)) + l = d.left, f = l; + else if ((y === 57 || y === 61) && (Kn(d.parent) && d.parent.initializer === d ? (l = d.parent.name, f = d.parent) : fn(d.parent) && d.parent.operatorToken.kind === 64 && (a || d.parent.right === d) && (l = d.parent.left, f = l), !l || !vS(l) || !FC(l, d.left))) + return; + } else a && Tc(r) && (l = r.name, f = r); + if (!(!f || !l || !a && !rv(r, Qy(l)))) + return R_(f); + } + function Lat(r) { + if (!r.parent) + return !1; + let a = r.parent; + for (; a && a.kind === 211; ) + a = a.parent; + if (a && fn(a) && Qy(a.left) && a.operatorToken.kind === 64) { + const l = yB(a); + return oa(l) && l; + } + } + function Mat(r, a) { + var l, f, d; + oR(r, r.typeArguments); + const y = ME( + r, + /*candidatesOutArray*/ + void 0, + a + ); + if (y === Mn) + return fr; + if (eX(y, r), r.expression.kind === 108) + return Pt; + if (r.kind === 214) { + const I = y.declaration; + if (I && I.kind !== 176 && I.kind !== 180 && I.kind !== 185 && !(B0(I) && ((f = (l = LC(I)) == null ? void 0 : l.parent) == null ? void 0 : f.kind) === 176) && !gx(I) && !Um(I)) + return le && je(r, p.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type), Je; + } + if (an(r) && H8e(r)) + return YPe(r.arguments[0]); + const x = Ba(y); + if (x.flags & 12288 && U8e(r)) + return ape(rd(r.parent)); + if (r.kind === 213 && !r.questionDotToken && r.parent.kind === 244 && x.flags & 16384 && bp(y)) { + if (!B3(r.expression)) + je(r.expression, p.Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name); + else if (!kM(r)) { + const I = je(r.expression, p.Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation); + xM(r.expression, I); + } + } + if (an(r)) { + const I = K$( + r, + /*allowDeclaration*/ + !1 + ); + if ((d = I?.exports) != null && d.size) { + const M = Ea(I, I.exports, He, He, He); + return M.objectFlags |= 4096, ra([x, M]); + } + } + return x; + } + function eX(r, a) { + if (!(r.flags & 128) && r.declaration && r.declaration.flags & 536870912) { + const l = zM(a), f = z3(U7(a)); + sT(l, r.declaration, f, eb(r)); + } + } + function zM(r) { + switch (r = za(r), r.kind) { + case 213: + case 170: + case 214: + return zM(r.expression); + case 215: + return zM(r.tag); + case 286: + case 285: + return zM(r.tagName); + case 212: + return r.argumentExpression; + case 211: + return r.name; + case 183: + const a = r; + return Xu(a.typeName) ? a.typeName.right : a; + default: + return r; + } + } + function U8e(r) { + if (!Fs(r)) return !1; + let a = r.expression; + if (Tn(a) && a.name.escapedText === "for" && (a = a.expression), !Me(a) || a.escapedText !== "Symbol") + return !1; + const l = y3e( + /*reportErrors*/ + !1 + ); + return l ? l === Dt( + a, + "Symbol", + 111551, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + ) : !1; + } + function Rat(r) { + if (rft(r), r.arguments.length === 0) + return HM(r, Je); + const a = r.arguments[0], l = uc(a), f = r.arguments.length > 1 ? uc(r.arguments[1]) : void 0; + for (let y = 2; y < r.arguments.length; ++y) + uc(r.arguments[y]); + if ((l.flags & 32768 || l.flags & 65536 || !Ls(l, de)) && je(a, p.Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0, $r(l)), f) { + const y = h3e( + /*reportErrors*/ + !0 + ); + y !== hs && gu(f, hM( + y, + 32768 + /* Undefined */ + ), r.arguments[1]); + } + const d = Pu(r, a); + if (d) { + const y = D1( + d, + a, + /*dontResolveAlias*/ + !0, + /*suppressInteropError*/ + !1 + ); + if (y) + return HM( + r, + V8e(en(y), y, d, a) || q8e(en(y), y, d, a) + ); + } + return HM(r, Je); + } + function Rde(r, a, l) { + const f = Us(), d = ca( + 2097152, + "default" + /* Default */ + ); + return d.parent = a, d.links.nameType = x_("default"), d.links.aliasTarget = jc(r), f.set("default", d), Ea(l, f, He, He, He); + } + function V8e(r, a, l, f) { + if (t0(f) && r && !H(r)) { + const y = r; + if (!y.defaultOnlyType) { + const x = Rde(a, l); + y.defaultOnlyType = x; + } + return y.defaultOnlyType; + } + } + function q8e(r, a, l, f) { + var d; + if (_e && r && !H(r)) { + const y = r; + if (!y.syntheticType) { + const x = (d = l.declarations) == null ? void 0 : d.find(Ei); + if (E2( + x, + l, + /*dontResolveAlias*/ + !1, + f + )) { + const M = ca( + 2048, + "__type" + /* Type */ + ), z = Rde(a, l, M); + M.links.type = z, y.syntheticType = AM(r) ? W2( + r, + z, + M, + /*objectFlags*/ + 0, + /*readonly*/ + !1 + ) : z; + } else + y.syntheticType = r; + } + return y.syntheticType; + } + return r; + } + function H8e(r) { + if (!__( + r, + /*requireStringLiteralLikeArgument*/ + !0 + )) + return !1; + if (!Me(r.expression)) return E.fail(); + const a = Dt( + r.expression, + r.expression.escapedText, + 111551, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !0 + ); + if (a === Ae) + return !0; + if (a.flags & 2097152) + return !1; + const l = a.flags & 16 ? 262 : a.flags & 3 ? 260 : 0; + if (l !== 0) { + const f = Lo(a, l); + return !!f && !!(f.flags & 33554432); + } + return !1; + } + function jat(r) { + P_t(r) || oR(r, r.typeArguments), R < yl.TaggedTemplates && hl( + r, + 262144 + /* MakeTemplateObject */ + ); + const a = ME(r); + return eX(a, r), Ba(a); + } + function Bat(r, a) { + if (r.kind === 216) { + const l = Cr(r); + l && vc(l.fileName, [ + ".cts", + ".mts" + /* Mts */ + ]) && hr(r, p.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead); + } + return G8e(r, a); + } + function jde(r) { + switch (r.kind) { + case 11: + case 15: + case 9: + case 10: + case 112: + case 97: + case 209: + case 210: + case 228: + return !0; + case 217: + return jde(r.expression); + case 224: + const a = r.operator, l = r.operand; + return a === 41 && (l.kind === 9 || l.kind === 10) || a === 40 && l.kind === 9; + case 211: + case 212: + const f = za(r.expression), d = _o(f) ? oc( + f, + 111551, + /*ignoreErrors*/ + !0 + ) : void 0; + return !!(d && d.flags & 384); + } + return !1; + } + function G8e(r, a) { + const { type: l, expression: f } = $8e(r), d = Gi(f, a); + if (Kp(l)) + return jde(f) || je(f, p.A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals), Vu(d); + const y = yn(r); + return y.assertionExpressionType = d, la(l), rC(r), wi(l); + } + function $8e(r) { + let a, l; + switch (r.kind) { + case 234: + case 216: + a = r.type, l = r.expression; + break; + case 217: + a = l6(r), l = r.expression; + break; + } + return { type: a, expression: l }; + } + function Jat(r) { + const { type: a } = $8e(r), l = Yu(r) ? a : r, f = yn(r); + E.assertIsDefined(f.assertionExpressionType); + const d = Q8(_0(f.assertionExpressionType)), y = wi(a); + H(y) || n(() => { + const x = cf(d); + s$(y, x) || yNe(d, y, l, p.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first); + }); + } + function zat(r) { + const a = Gi(r.expression), l = $8(a, r.expression); + return h$(f0(l), r, l !== a); + } + function Wat(r) { + return r.flags & 64 ? zat(r) : f0(Gi(r.expression)); + } + function X8e(r) { + if (W7e(r), lr(r.typeArguments, la), r.kind === 233) { + const l = rd(r.parent); + l.kind === 226 && l.operatorToken.kind === 104 && Lb(r, l.right) && je(r, p.The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression); + } + const a = r.kind === 233 ? Gi(r.expression) : Xy(r.exprName) ? wM(r.exprName) : Gi(r.exprName); + return Q8e(a, r); + } + function Q8e(r, a) { + const l = a.typeArguments; + if (r === fr || H(r) || !at(l)) + return r; + const f = yn(a); + if (f.instantiationExpressionTypes || (f.instantiationExpressionTypes = /* @__PURE__ */ new Map()), f.instantiationExpressionTypes.has(r.id)) + return f.instantiationExpressionTypes.get(r.id); + let d = !1, y; + const x = M(r); + f.instantiationExpressionTypes.set(r.id, x); + const I = d ? y : r; + return I && Pa.add(DC(Cr(a), l, p.Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable, $r(I))), x; + function M(Y) { + let Se = !1, pe = !1; + const Ze = dt(Y); + return d || (d = pe), Se && !pe && (y ?? (y = Y)), Ze; + function dt(ht) { + if (ht.flags & 524288) { + const or = Vd(ht), nr = z(or.callSignatures), Kr = z(or.constructSignatures); + if (Se || (Se = or.callSignatures.length !== 0 || or.constructSignatures.length !== 0), pe || (pe = nr.length !== 0 || Kr.length !== 0), nr !== or.callSignatures || Kr !== or.constructSignatures) { + const Vr = Ea(ca( + 0, + "__instantiationExpression" + /* InstantiationExpression */ + ), or.members, nr, Kr, or.indexInfos); + return Vr.objectFlags |= 8388608, Vr.node = a, Vr; + } + } else if (ht.flags & 58982400) { + const or = iu(ht); + if (or) { + const nr = dt(or); + if (nr !== or) + return nr; + } + } else { + if (ht.flags & 1048576) + return Vo(ht, M); + if (ht.flags & 2097152) + return ra(Wc(ht.types, dt)); + } + return ht; + } + } + function z(Y) { + const Se = kn(Y, (pe) => !!pe.typeParameters && Nde(pe, l)); + return Wc(Se, (pe) => { + const Ze = Fde( + pe, + l, + /*reportErrors*/ + !0 + ); + return Ze ? M8(pe, Ze, an(pe.declaration)) : pe; + }); + } + } + function Uat(r) { + return la(r.type), Bde(r.expression, r.type); + } + function Bde(r, a, l) { + const f = Gi(r, l), d = wi(a); + if (H(d)) + return d; + const y = ur( + a.parent, + (x) => x.kind === 238 || x.kind === 350 + /* JSDocSatisfiesTag */ + ); + return z1(f, d, y, r, p.Type_0_does_not_satisfy_the_expected_type_1), f; + } + function Vat(r) { + return q_t(r), r.keywordToken === 105 ? Jde(r) : r.keywordToken === 102 ? qat(r) : E.assertNever(r.keywordToken); + } + function Y8e(r) { + switch (r.keywordToken) { + case 102: + return g3e(); + case 105: + const a = Jde(r); + return H(a) ? We : cot(a); + default: + E.assertNever(r.keywordToken); + } + } + function Jde(r) { + const a = oK(r); + if (a) + if (a.kind === 176) { + const l = dn(a.parent); + return en(l); + } else { + const l = dn(a); + return en(l); + } + else return je(r, p.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target"), We; + } + function qat(r) { + W === 100 || W === 199 ? Cr(r).impliedNodeFormat !== 99 && je(r, p.The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output) : W < 6 && W !== 4 && je(r, p.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext); + const a = Cr(r); + return E.assert(!!(a.flags & 8388608), "Containing file is missing import meta node flag."), r.name.escapedText === "meta" ? m3e() : We; + } + function WM(r) { + const a = r.valueDeclaration; + return rl( + en(r), + /*isProperty*/ + !1, + /*isOptional*/ + !!a && (C0(a) || Ax(a)) + ); + } + function zde(r, a, l) { + switch (r.name.kind) { + case 80: { + const f = r.name.escapedText; + return r.dotDotDotToken ? l & 12 ? f : `${f}_${a}` : l & 3 ? f : `${f}_n`; + } + case 207: { + if (r.dotDotDotToken) { + const f = r.name.elements, d = jn(Co(f), ma), y = f.length - (d?.dotDotDotToken ? 1 : 0); + if (a < y) { + const x = f[a]; + if (ma(x)) + return zde(x, a, l); + } else if (d?.dotDotDotToken) + return zde(d, a - y, l); + } + break; + } + } + return `arg_${a}`; + } + function Wde(r, a = 0, l = 3, f) { + if (!r) { + const d = jn(f?.valueDeclaration, Ii); + return d ? zde(d, a, l) : `${f?.escapedName ?? "arg"}_${a}`; + } + return E.assert(Me(r.name)), r.name.escapedText; + } + function eP(r, a, l) { + var f; + const d = r.parameters.length - (ku(r) ? 1 : 0); + if (a < d) + return r.parameters[a].escapedName; + const y = r.parameters[d] || Ve, x = l || en(y); + if (ga(x)) { + const I = x.target, M = a - d, z = (f = I.labeledElementDeclarations) == null ? void 0 : f[M], Y = I.elementFlags[M]; + return Wde(z, M, Y, y); + } + return y.escapedName; + } + function Hat(r, a) { + var l; + if (((l = r.declaration) == null ? void 0 : l.kind) === 317) + return; + const f = r.parameters.length - (ku(r) ? 1 : 0); + if (a < f) { + const I = r.parameters[a], M = Z8e(I); + return M ? { + parameter: M, + parameterName: I.escapedName, + isRestParameter: !1 + } : void 0; + } + const d = r.parameters[f] || Ve, y = Z8e(d); + if (!y) + return; + const x = en(d); + if (ga(x)) { + const I = x.target.labeledElementDeclarations, M = a - f, z = I?.[M], Y = !!z?.dotDotDotToken; + return z ? (E.assert(Me(z.name)), { parameter: z.name, parameterName: z.name.escapedText, isRestParameter: Y }) : void 0; + } + if (a === f) + return { parameter: y, parameterName: d.escapedName, isRestParameter: !0 }; + } + function Z8e(r) { + return r.valueDeclaration && Ii(r.valueDeclaration) && Me(r.valueDeclaration.name) && r.valueDeclaration.name; + } + function K8e(r) { + return r.kind === 202 || Ii(r) && r.name && Me(r.name); + } + function Gat(r, a) { + const l = r.parameters.length - (ku(r) ? 1 : 0); + if (a < l) { + const y = r.parameters[a].valueDeclaration; + return y && K8e(y) ? y : void 0; + } + const f = r.parameters[l] || Ve, d = en(f); + if (ga(d)) { + const y = d.target.labeledElementDeclarations, x = a - l; + return y && y[x]; + } + return f.valueDeclaration && K8e(f.valueDeclaration) ? f.valueDeclaration : void 0; + } + function Gd(r, a) { + return Q2(r, a) || Je; + } + function Q2(r, a) { + const l = r.parameters.length - (ku(r) ? 1 : 0); + if (a < l) + return WM(r.parameters[a]); + if (ku(r)) { + const f = en(r.parameters[l]), d = a - l; + if (!ga(f) || f.target.combinedFlags & 12 || d < f.target.fixedLength) + return j_(f, gd(d)); + } + } + function UM(r, a, l) { + const f = z_(r), d = $d(r), y = lI(r); + if (y && a >= f - 1) + return a === f - 1 ? y : mu(j_(y, st)); + const x = [], I = [], M = []; + for (let z = a; z < f; z++) + !y || z < f - 1 ? (x.push(Gd(r, z)), I.push( + z < d ? 1 : 2 + /* Optional */ + )) : (x.push(y), I.push( + 8 + /* Variadic */ + )), M.push(Gat(r, z)); + return Eg(x, I, l, M); + } + function eIe(r, a) { + const l = UM(r, a), f = l && gM(l); + return f && Ua(f) ? Je : l; + } + function z_(r) { + const a = r.parameters.length; + if (ku(r)) { + const l = en(r.parameters[a - 1]); + if (ga(l)) + return a + l.target.fixedLength - (l.target.combinedFlags & 12 ? 0 : 1); + } + return a; + } + function $d(r, a) { + const l = a & 1, f = a & 2; + if (f || r.resolvedMinArgumentCount === void 0) { + let d; + if (ku(r)) { + const y = en(r.parameters[r.parameters.length - 1]); + if (ga(y)) { + const x = ec(y.target.elementFlags, (M) => !(M & 1)), I = x < 0 ? y.target.fixedLength : x; + I > 0 && (d = r.parameters.length - 1 + I); + } + } + if (d === void 0) { + if (!l && r.flags & 32) + return 0; + d = r.minArgumentCount; + } + if (f) + return d; + for (let y = d - 1; y >= 0; y--) { + const x = Gd(r, y); + if (Jc(x, E8e).flags & 131072) + break; + d = y; + } + r.resolvedMinArgumentCount = d; + } + return r.resolvedMinArgumentCount; + } + function wg(r) { + if (ku(r)) { + const a = en(r.parameters[r.parameters.length - 1]); + return !ga(a) || !!(a.target.combinedFlags & 12); + } + return !1; + } + function lI(r) { + if (ku(r)) { + const a = en(r.parameters[r.parameters.length - 1]); + if (!ga(a)) + return Ua(a) ? Va : a; + if (a.target.combinedFlags & 12) + return Gw(a, a.target.fixedLength); + } + } + function uI(r) { + const a = lI(r); + return a && !Tp(a) && !Ua(a) ? a : void 0; + } + function Ude(r) { + return Vde(r, Zt); + } + function Vde(r, a) { + return r.parameters.length > 0 ? Gd(r, 0) : a; + } + function tIe(r, a, l) { + const f = r.parameters.length - (ku(r) ? 1 : 0); + for (let d = 0; d < f; d++) { + const y = r.parameters[d].valueDeclaration, x = qc(y); + if (x) { + const I = rl( + wi(x), + /*isProperty*/ + !1, + Ax(y) + ), M = Gd(a, d); + d0(l.inferences, I, M); + } + } + } + function $at(r, a) { + if (a.typeParameters) + if (!r.typeParameters) + r.typeParameters = a.typeParameters; + else + return; + if (a.thisParameter) { + const f = r.thisParameter; + (!f || f.valueDeclaration && !f.valueDeclaration.type) && (f || (r.thisParameter = FT( + a.thisParameter, + /*type*/ + void 0 + )), VM(r.thisParameter, en(a.thisParameter))); + } + const l = r.parameters.length - (ku(r) ? 1 : 0); + for (let f = 0; f < l; f++) { + const d = r.parameters[f], y = d.valueDeclaration; + if (!qc(y)) { + let x = Q2(a, f); + if (x && y.initializer) { + let I = tP( + y, + 0 + /* Normal */ + ); + !Ls(I, x) && Ls(x, I = eme(y, I)) && (x = I); + } + VM(d, x); + } + } + if (ku(r)) { + const f = _a(r.parameters); + if (f.valueDeclaration ? !qc(f.valueDeclaration) : rc(f) & 65536) { + const d = UM(a, l); + VM(f, d); + } + } + } + function Xat(r) { + r.thisParameter && VM(r.thisParameter); + for (const a of r.parameters) + VM(a); + } + function VM(r, a) { + const l = Ci(r); + if (l.type) + a && E.assertEqual(l.type, a, "Parameter symbol already has a cached type which differs from newly assigned type"); + else { + const f = r.valueDeclaration; + l.type = rl( + a || (f ? _n( + f, + /*reportErrors*/ + !0 + ) : en(r)), + /*isProperty*/ + !1, + /*isOptional*/ + !!f && !f.initializer && Ax(f) + ), f && f.name.kind !== 80 && (l.type === ye && (l.type = Jt(f.name)), rIe(f.name, l.type)); + } + } + function rIe(r, a) { + for (const l of r.elements) + if (!ul(l)) { + const f = Ya( + l, + a, + /*noTupleBoundsCheck*/ + !1 + ); + l.name.kind === 80 ? Ci(dn(l)).type = f : rIe(l.name, f); + } + } + function Qat(r) { + return kE(att( + /*reportErrors*/ + !0 + ), [r]); + } + function Yat(r, a) { + return kE(ott( + /*reportErrors*/ + !0 + ), [r, a]); + } + function Zat(r, a) { + return kE(ctt( + /*reportErrors*/ + !0 + ), [r, a]); + } + function Kat(r, a) { + return kE(ltt( + /*reportErrors*/ + !0 + ), [r, a]); + } + function eot(r, a) { + return kE(utt( + /*reportErrors*/ + !0 + ), [r, a]); + } + function tot(r, a) { + return kE(ptt( + /*reportErrors*/ + !0 + ), [r, a]); + } + function rot(r, a, l) { + const f = `${a ? "p" : "P"}${l ? "s" : "S"}${r.id}`; + let d = xr.get(f); + if (!d) { + const y = Us(); + y.set("name", ey("name", r)), y.set("private", ey("private", a ? Jr : Xr)), y.set("static", ey("static", l ? Jr : Xr)), d = Ea( + /*symbol*/ + void 0, + y, + He, + He, + He + ), xr.set(f, d); + } + return d; + } + function nIe(r, a, l) { + const f = Kc(r), d = Ni(r.name), y = d ? x_(An(r.name)) : o0(r.name), x = fc(r) ? Yat(a, l) : cp(r) ? Zat(a, l) : A_(r) ? Kat(a, l) : l_(r) ? eot(a, l) : ss(r) ? tot(a, l) : E.failBadSyntaxKind(r), I = rot(y, d, f); + return ra([x, I]); + } + function not(r, a) { + return kE(_tt( + /*reportErrors*/ + !0 + ), [r, a]); + } + function iot(r, a) { + return kE(ftt( + /*reportErrors*/ + !0 + ), [r, a]); + } + function sot(r, a) { + const l = _d("this", r), f = _d("value", a); + return ome( + /*typeParameters*/ + void 0, + l, + [f], + a, + /*typePredicate*/ + void 0, + 1 + ); + } + function qde(r, a, l) { + const f = _d("target", r), d = _d("context", a), y = Qn([l, Pt]); + return yI( + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + [f, d], + y + ); + } + function aot(r) { + const { parent: a } = r, l = yn(a); + if (!l.decoratorSignature) + switch (l.decoratorSignature = Kt, a.kind) { + case 263: + case 231: { + const d = en(dn(a)), y = Qat(d); + l.decoratorSignature = qde(d, y, d); + break; + } + case 174: + case 177: + case 178: { + const f = a; + if (!Zn(f.parent)) break; + const d = fc(f) ? ET(Gf(f)) : nC(f), y = Kc(f) ? en(dn(f.parent)) : S_(dn(f.parent)), x = cp(f) ? MIe(d) : A_(f) ? RIe(d) : d, I = nIe(f, y, d), M = cp(f) ? MIe(d) : A_(f) ? RIe(d) : d; + l.decoratorSignature = qde(x, I, M); + break; + } + case 172: { + const f = a; + if (!Zn(f.parent)) break; + const d = nC(f), y = Kc(f) ? en(dn(f.parent)) : S_(dn(f.parent)), x = cm(f) ? not(y, d) : ft, I = nIe(f, y, d), M = cm(f) ? iot(y, d) : sot(y, d); + l.decoratorSignature = qde(x, I, M); + break; + } + } + return l.decoratorSignature === Kt ? void 0 : l.decoratorSignature; + } + function oot(r) { + const { parent: a } = r, l = yn(a); + if (!l.decoratorSignature) + switch (l.decoratorSignature = Kt, a.kind) { + case 263: + case 231: { + const d = en(dn(a)), y = _d("target", d); + l.decoratorSignature = yI( + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + [y], + Qn([d, Pt]) + ); + break; + } + case 169: { + const f = a; + if (!Go(f.parent) && !(fc(f.parent) || A_(f.parent) && Zn(f.parent.parent)) || jb(f.parent) === f) + break; + const d = jb(f.parent) ? f.parent.parameters.indexOf(f) - 1 : f.parent.parameters.indexOf(f); + E.assert(d >= 0); + const y = Go(f.parent) ? en(dn(f.parent.parent)) : P7e(f.parent), x = Go(f.parent) ? ft : N7e(f.parent), I = gd(d), M = _d("target", y), z = _d("propertyKey", x), Y = _d("parameterIndex", I); + l.decoratorSignature = yI( + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + [M, z, Y], + Pt + ); + break; + } + case 174: + case 177: + case 178: + case 172: { + const f = a; + if (!Zn(f.parent)) break; + const d = P7e(f), y = _d("target", d), x = N7e(f), I = _d("propertyKey", x), M = ss(f) ? Pt : C3e(nC(f)); + if (!ss(a) || cm(a)) { + const Y = C3e(nC(f)), Se = _d("descriptor", Y); + l.decoratorSignature = yI( + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + [y, I, Se], + Qn([M, Pt]) + ); + } else + l.decoratorSignature = yI( + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + [y, I], + Qn([M, Pt]) + ); + break; + } + } + return l.decoratorSignature === Kt ? void 0 : l.decoratorSignature; + } + function Hde(r) { + return V ? oot(r) : aot(r); + } + function qM(r) { + const a = ZL( + /*reportErrors*/ + !0 + ); + return a !== Oi ? (r = g0(sP(r)) || ye, a0(a, [r])) : ye; + } + function iIe(r) { + const a = b3e( + /*reportErrors*/ + !0 + ); + return a !== Oi ? (r = g0(sP(r)) || ye, a0(a, [r])) : ye; + } + function HM(r, a) { + const l = qM(a); + return l === ye ? (je( + r, + _f(r) ? p.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option : p.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option + ), We) : (Bfe( + /*reportErrors*/ + !0 + ) || je( + r, + _f(r) ? p.A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option : p.An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option + ), l); + } + function cot(r) { + const a = ca(0, "NewTargetExpression"), l = ca( + 4, + "target", + 8 + /* Readonly */ + ); + l.parent = a, l.links.type = r; + const f = Us([l]); + return a.members = f, Ea(a, f, He, He, He); + } + function tX(r, a) { + if (!r.body) + return We; + const l = Oc(r), f = (l & 2) !== 0, d = (l & 1) !== 0; + let y, x, I, M = Pt; + if (r.body.kind !== 241) + y = uc( + r.body, + a && a & -9 + /* SkipGenericFunctions */ + ), f && (y = sP(hI( + y, + /*withAlias*/ + !1, + /*errorNode*/ + r, + p.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member + ))); + else if (d) { + const z = cIe(r, a); + z ? z.length > 0 && (y = Qn( + z, + 2 + /* Subtype */ + )) : M = Zt; + const { yieldTypes: Y, nextTypes: Se } = lot(r, a); + x = at(Y) ? Qn( + Y, + 2 + /* Subtype */ + ) : void 0, I = at(Se) ? ra(Se) : void 0; + } else { + const z = cIe(r, a); + if (!z) + return l & 2 ? HM(r, Zt) : Zt; + if (z.length === 0) { + const Y = L$( + r, + /*contextFlags*/ + void 0 + ), Se = Y && (rR(Y, l) || Pt).flags & 32768 ? ft : Pt; + return l & 2 ? HM(r, Se) : ( + // Async function + Se + ); + } + y = Qn( + z, + 2 + /* Subtype */ + ); + } + if (y || x || I) { + if (x && S$( + r, + x, + 3 + /* GeneratorYield */ + ), y && S$( + r, + y, + 1 + /* FunctionReturn */ + ), I && S$( + r, + I, + 2 + /* GeneratorNext */ + ), y && qd(y) || x && qd(x) || I && qd(I)) { + const z = dde(r), Y = z ? z === Gf(r) ? d ? void 0 : y : R$( + Ba(z), + r, + /*contextFlags*/ + void 0 + ) : void 0; + d ? (x = Dpe(x, Y, 0, f), y = Dpe(y, Y, 1, f), I = Dpe(I, Y, 2, f)) : y = snt(y, Y, f); + } + x && (x = cf(x)), y && (y = cf(y)), I && (I = cf(I)); + } + return d ? rX( + x || Zt, + y || M, + I || BAe(2, r) || ye, + f + ) : f ? qM(y || M) : y || M; + } + function rX(r, a, l, f) { + const d = f ? Mo : dc, y = d.getGlobalGeneratorType( + /*reportErrors*/ + !1 + ); + if (r = d.resolveIterationType( + r, + /*errorNode*/ + void 0 + ) || ye, a = d.resolveIterationType( + a, + /*errorNode*/ + void 0 + ) || ye, y === Oi) { + const x = d.getGlobalIterableIteratorType( + /*reportErrors*/ + !1 + ); + return x !== Oi ? Hw(x, [r, a, l]) : (d.getGlobalIterableIteratorType( + /*reportErrors*/ + !0 + ), hs); + } + return Hw(y, [r, a, l]); + } + function lot(r, a) { + const l = [], f = [], d = (Oc(r) & 2) !== 0; + return QZ(r.body, (y) => { + const x = y.expression ? Gi(y.expression, a) : fe; + Qf(l, sIe(y, x, Je, d)); + let I; + if (y.asteriskToken) { + const M = dX( + x, + d ? 19 : 17, + y.expression + ); + I = M && M.nextType; + } else + I = a_( + y, + /*contextFlags*/ + void 0 + ); + I && Qf(f, I); + }), { yieldTypes: l, nextTypes: f }; + } + function sIe(r, a, l, f) { + const d = r.expression || r, y = r.asteriskToken ? yy(f ? 19 : 17, a, l, d) : a; + return f ? tC( + y, + d, + r.asteriskToken ? p.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member : p.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member + ) : y; + } + function aIe(r, a, l) { + let f = 0; + for (let d = 0; d < l.length; d++) { + const y = d < r || d >= a ? l[d] : void 0; + f |= y !== void 0 ? lne.get(y) || 32768 : 0; + } + return f; + } + function oIe(r) { + const a = yn(r); + if (a.isExhaustive === void 0) { + a.isExhaustive = 0; + const l = uot(r); + a.isExhaustive === 0 && (a.isExhaustive = l); + } else a.isExhaustive === 0 && (a.isExhaustive = !1); + return a.isExhaustive; + } + function uot(r) { + if (r.expression.kind === 221) { + const f = uAe(r); + if (!f) + return !1; + const d = xg(uc(r.expression.expression)), y = aIe(0, 0, f); + return d.flags & 3 ? (556800 & y) === 556800 : !kp(d, (x) => NE(x, y) === y); + } + const a = uc(r.expression); + if (!G8(a)) + return !1; + const l = E$(r); + return !l.length || at(l, rnt) ? !1 : rit(Vo(a, Vu), l); + } + function Gde(r) { + return r.endFlowNode && CM(r.endFlowNode); + } + function cIe(r, a) { + const l = Oc(r), f = []; + let d = Gde(r), y = !1; + if (Hy(r.body, (x) => { + let I = x.expression; + if (I) { + if (I = za( + I, + /*excludeJSDocTypeAssertions*/ + !0 + ), l & 2 && I.kind === 223 && (I = za( + I.expression, + /*excludeJSDocTypeAssertions*/ + !0 + )), I.kind === 213 && I.expression.kind === 80 && uc(I.expression).symbol === Oa(r.symbol) && (!Ky(r.symbol.valueDeclaration) || Ype(I.expression))) { + y = !0; + return; + } + let M = uc( + I, + a && a & -9 + /* SkipGenericFunctions */ + ); + l & 2 && (M = sP(hI( + M, + /*withAlias*/ + !1, + r, + p.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member + ))), M.flags & 131072 && (y = !0), Qf(f, M); + } else + d = !0; + }), !(f.length === 0 && !d && (y || _ot(r)))) + return Z && f.length && d && !(Um(r) && f.some((x) => x.symbol === r.symbol)) && Qf(f, ft), f; + } + function _ot(r) { + switch (r.kind) { + case 218: + case 219: + return !0; + case 174: + return r.parent.kind === 210; + default: + return !1; + } + } + function fot(r) { + switch (r.kind) { + case 176: + case 177: + case 178: + return; + } + if (Oc(r) !== 0) return; + let l; + if (r.body && r.body.kind !== 241) + l = r.body; + else if (Hy(r.body, (d) => { + if (l || !d.expression) return !0; + l = d.expression; + }) || !l || Gde(r)) return; + return pot(r, l); + } + function pot(r, a) { + if (a = za( + a, + /*excludeJSDocTypeAssertions*/ + !0 + ), !!(uc(a).flags & 16)) + return lr(r.parameters, (f, d) => { + const y = en(f.symbol); + if (!y || y.flags & 16 || !Me(f.name) || tI(f.symbol) || Zm(f)) + return; + const x = dot(r, a, f, y); + if (x) + return L8(1, Pi(f.name.escapedText), d, x); + }); + } + function dot(r, a, l, f) { + const d = L4(a) && a.flowNode || a.parent.kind === 253 && a.parent.flowNode || ag( + 2, + /*node*/ + void 0, + /*antecedent*/ + void 0 + ), y = ag(32, a, d), x = m0(l.name, f, f, r, y); + if (x === f) return; + const I = ag(64, a, d); + return m0(l.name, f, x, r, I).flags & 131072 ? x : void 0; + } + function $de(r, a) { + n(l); + return; + function l() { + const f = Oc(r), d = a && rR(a, f); + if (d && (hc( + d, + 16384 + /* Void */ + ) || d.flags & 32769) || r.kind === 173 || tc(r.body) || r.body.kind !== 241 || !Gde(r)) + return; + const y = r.flags & 1024, x = pf(r) || r; + if (d && d.flags & 131072) + je(x, p.A_function_returning_never_cannot_have_a_reachable_end_point); + else if (d && !y) + je(x, p.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value); + else if (d && Z && !Ls(ft, d)) + je(x, p.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined); + else if (F.noImplicitReturns) { + if (!d) { + if (!y) + return; + const I = Ba(Gf(r)); + if (r7e(r, I)) + return; + } + je(x, p.Not_all_code_paths_return_a_value); + } + } + } + function lIe(r, a) { + if (E.assert(r.kind !== 174 || Ip(r)), rC(r), po(r) && aP(r, r.name), a && a & 4 && $f(r)) { + if (!pf(r) && !H5(r)) { + const f = iI(r); + if (f && U1(Ba(f))) { + const d = yn(r); + if (d.contextFreeType) + return d.contextFreeType; + const y = tX(r, a), x = fh( + /*declaration*/ + void 0, + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + He, + y, + /*resolvedTypePredicate*/ + void 0, + 0, + 64 + /* IsNonInferrable */ + ), I = Ea(r.symbol, A, [x], He, He); + return I.objectFlags |= 262144, d.contextFreeType = I; + } + } + return qt; + } + return !EX(r) && r.kind === 218 && Fme(r), mot(r, a), en(dn(r)); + } + function mot(r, a) { + const l = yn(r); + if (!(l.flags & 64)) { + const f = iI(r); + if (!(l.flags & 64)) { + l.flags |= 64; + const d = Uc(Ps( + en(dn(r)), + 0 + /* Call */ + )); + if (!d) + return; + if ($f(r)) + if (f) { + const y = $2(r); + let x; + if (a && a & 2) { + tIe(d, f, y); + const I = lI(f); + I && I.flags & 262144 && (x = $k(f, y.nonFixingMapper)); + } + x || (x = y ? $k(f, y.mapper) : f), $at(d, x); + } else + Xat(d); + else if (f && !r.typeParameters && f.parameters.length > r.parameters.length) { + const y = $2(r); + a && a & 2 && tIe(d, f, y); + } + if (f && !xE(r) && !d.resolvedReturnType) { + const y = tX(r, a); + d.resolvedReturnType || (d.resolvedReturnType = y); + } + pI(r); + } + } + } + function got(r) { + E.assert(r.kind !== 174 || Ip(r)); + const a = Oc(r), l = xE(r); + if ($de(r, l), r.body) + if (pf(r) || Ba(Gf(r)), r.body.kind === 241) + la(r.body); + else { + const f = Gi(r.body), d = l && rR(l, a); + if (d) { + const y = Q$(r.body); + if ((a & 3) === 2) { + const x = hI( + f, + /*withAlias*/ + !1, + y, + p.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member + ); + z1(x, d, y, y); + } else + z1(f, d, y, y); + } + } + } + function nX(r, a, l, f = !1) { + if (!Ls(a, mi)) { + const d = f && iP(a); + return S1( + r, + !!d && Ls(d, mi), + l + ), !1; + } + return !0; + } + function hot(r) { + if (!Fs(r) || !yS(r)) + return !1; + const a = uc(r.arguments[2]); + if (Pc(a, "value")) { + const d = Ys(a, "writable"), y = d && en(d); + if (!y || y === Xr || y === Rr) + return !0; + if (d && d.valueDeclaration && Xc(d.valueDeclaration)) { + const x = d.valueDeclaration.initializer, I = Gi(x); + if (I === Xr || I === Rr) + return !0; + } + return !1; + } + return !Ys(a, "set"); + } + function Xd(r) { + return !!(rc(r) & 8 || r.flags & 4 && sp(r) & 8 || r.flags & 3 && hde(r) & 6 || r.flags & 98304 && !(r.flags & 65536) || r.flags & 8 || at(r.declarations, hot)); + } + function uIe(r, a, l) { + var f, d; + if (l === 0) + return !1; + if (Xd(a)) { + if (a.flags & 4 && vo(r) && r.expression.kind === 110) { + const y = ff(r); + if (!(y && (y.kind === 176 || Um(y)))) + return !0; + if (a.valueDeclaration) { + const x = fn(a.valueDeclaration), I = y.parent === a.valueDeclaration.parent, M = y === a.valueDeclaration.parent, z = x && ((f = a.parent) == null ? void 0 : f.valueDeclaration) === y.parent, Y = x && ((d = a.parent) == null ? void 0 : d.valueDeclaration) === y; + return !(I || M || z || Y); + } + } + return !0; + } + if (vo(r)) { + const y = za(r.expression); + if (y.kind === 80) { + const x = yn(y).resolvedSymbol; + if (x.flags & 2097152) { + const I = ru(x); + return !!I && I.kind === 274; + } + } + } + return !1; + } + function _I(r, a, l) { + const f = xc( + r, + 7 + /* Parentheses */ + ); + return f.kind !== 80 && !vo(f) ? (je(r, a), !1) : f.flags & 64 ? (je(r, l), !1) : !0; + } + function yot(r) { + Gi(r.expression); + const a = za(r.expression); + if (!vo(a)) + return je(a, p.The_operand_of_a_delete_operator_must_be_a_property_reference), ut; + Tn(a) && Ni(a.name) && je(a, p.The_operand_of_a_delete_operator_cannot_be_a_private_identifier); + const l = yn(a), f = gl(l.resolvedSymbol); + return f && (Xd(f) ? je(a, p.The_operand_of_a_delete_operator_cannot_be_a_read_only_property) : vot(a, f)), ut; + } + function vot(r, a) { + const l = en(a); + Z && !(l.flags & 131075) && !(me ? a.flags & 16777216 : Hd( + l, + 16777216 + /* IsUndefined */ + )) && je(r, p.The_operand_of_a_delete_operator_must_be_optional); + } + function bot(r) { + return Gi(r.expression), eE; + } + function Sot(r) { + return rC(r), fe; + } + function _Ie(r) { + let a = !1; + const l = B7(r); + if (l && nc(l)) { + const f = n1(r) ? p.await_expression_cannot_be_used_inside_a_class_static_block : p.await_using_statements_cannot_be_used_inside_a_class_static_block; + je(r, f), a = !0; + } else if (!(r.flags & 65536)) + if (z7(r)) { + const f = Cr(r); + if (!q1(f)) { + let d; + if (!EC(f, F)) { + d ?? (d = rm(f, r.pos)); + const y = n1(r) ? p.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module : p.await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module, x = ol(f, d.start, d.length, y); + Pa.add(x), a = !0; + } + switch (W) { + case 100: + case 199: + if (f.impliedNodeFormat === 1) { + d ?? (d = rm(f, r.pos)), Pa.add( + ol(f, d.start, d.length, p.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level) + ), a = !0; + break; + } + // fallthrough + case 7: + case 99: + case 200: + case 4: + if (R >= 4) + break; + // fallthrough + default: + d ?? (d = rm(f, r.pos)); + const y = n1(r) ? p.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher : p.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher; + Pa.add(ol(f, d.start, d.length, y)), a = !0; + break; + } + } + } else { + const f = Cr(r); + if (!q1(f)) { + const d = rm(f, r.pos), y = n1(r) ? p.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules : p.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules, x = ol(f, d.start, d.length, y); + if (l && l.kind !== 176 && !(Oc(l) & 2)) { + const I = tn(l, p.Did_you_mean_to_mark_this_function_as_async); + Bs(x, I); + } + Pa.add(x), a = !0; + } + } + return n1(r) && ode(r) && (je(r, p.await_expressions_cannot_be_used_in_a_parameter_initializer), a = !0), a; + } + function Tot(r) { + n(() => _Ie(r)); + const a = Gi(r.expression), l = hI( + a, + /*withAlias*/ + !0, + r, + p.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member + ); + return l === a && !H(l) && !(a.flags & 3) && Qh( + /*isError*/ + !1, + tn(r, p.await_has_no_effect_on_the_type_of_this_expression) + ), l; + } + function xot(r) { + const a = Gi(r.operand); + if (a === fr) + return fr; + switch (r.operand.kind) { + case 9: + switch (r.operator) { + case 41: + return Gk(gd(-r.operand.text)); + case 40: + return Gk(gd(+r.operand.text)); + } + break; + case 10: + if (r.operator === 41) + return Gk(iM({ + negative: !0, + base10Value: aD(r.operand.text) + })); + } + switch (r.operator) { + case 40: + case 41: + case 55: + return zm(a, r.operand), GM( + a, + 12288 + /* ESSymbolLike */ + ) && je(r.operand, p.The_0_operator_cannot_be_applied_to_type_symbol, Xs(r.operator)), r.operator === 40 ? (GM( + a, + 2112 + /* BigIntLike */ + ) && je(r.operand, p.Operator_0_cannot_be_applied_to_type_1, Xs(r.operator), $r(_0(a))), st) : Xde(a); + case 54: + fme(a, r.operand); + const l = NE( + a, + 12582912 + /* Falsy */ + ); + return l === 4194304 ? Xr : l === 8388608 ? Jr : ut; + case 46: + case 47: + return nX(r.operand, zm(a, r.operand), p.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type) && _I( + r.operand, + p.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access, + p.The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access + ), Xde(a); + } + return We; + } + function kot(r) { + const a = Gi(r.operand); + return a === fr ? fr : (nX( + r.operand, + zm(a, r.operand), + p.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type + ) && _I( + r.operand, + p.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access, + p.The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access + ), Xde(a)); + } + function Xde(r) { + return hc( + r, + 2112 + /* BigIntLike */ + ) ? su( + r, + 3 + /* AnyOrUnknown */ + ) || hc( + r, + 296 + /* NumberLike */ + ) ? mi : Gt : st; + } + function GM(r, a) { + if (hc(r, a)) + return !0; + const l = xg(r); + return !!l && hc(l, a); + } + function hc(r, a) { + if (r.flags & a) + return !0; + if (r.flags & 3145728) { + const l = r.types; + for (const f of l) + if (hc(f, a)) + return !0; + } + return !1; + } + function su(r, a, l) { + return r.flags & a ? !0 : l && r.flags & 114691 ? !1 : !!(a & 296) && Ls(r, st) || !!(a & 2112) && Ls(r, Gt) || !!(a & 402653316) && Ls(r, de) || !!(a & 528) && Ls(r, ut) || !!(a & 16384) && Ls(r, Pt) || !!(a & 131072) && Ls(r, Zt) || !!(a & 65536) && Ls(r, lt) || !!(a & 32768) && Ls(r, ft) || !!(a & 4096) && Ls(r, Mt) || !!(a & 67108864) && Ls(r, Tr); + } + function fI(r, a, l) { + return r.flags & 1048576 ? Ri(r.types, (f) => fI(f, a, l)) : su(r, a, l); + } + function iX(r) { + return !!(Cn(r) & 16) && !!r.symbol && Qde(r.symbol); + } + function Qde(r) { + return (r.flags & 128) !== 0; + } + function Yde(r) { + const a = ZIe("hasInstance"); + if (fI( + r, + 67108864 + /* NonPrimitive */ + )) { + const l = Ys(r, a); + if (l) { + const f = en(l); + if (f && Ps( + f, + 0 + /* Call */ + ).length !== 0) + return f; + } + } + } + function Cot(r, a, l, f, d) { + if (l === fr || f === fr) + return fr; + !Ua(l) && fI( + l, + 402784252 + /* Primitive */ + ) && je(r, p.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter), E.assert(y5(r.parent)); + const y = ME( + r.parent, + /*candidatesOutArray*/ + void 0, + d + ); + if (y === Mn) + return fr; + const x = Ba(y); + return gu(x, ut, a, p.An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression), ut; + } + function Eot(r) { + return kp(r, (a) => a === Gs || !!(a.flags & 2097152) && Dg(xg(a))); + } + function Dot(r, a, l, f) { + if (l === fr || f === fr) + return fr; + if (Ni(r)) { + if ((R < yl.PrivateNamesAndClassStaticBlocks || R < yl.ClassAndClassElementDecorators || !$) && hl( + r, + 2097152 + /* ClassPrivateFieldIn */ + ), !yn(r).resolvedSymbol && Al(r)) { + const d = xde( + r, + f.symbol, + /*excludeClasses*/ + !0 + ); + g8e(r, f, d); + } + } else + gu(zm(l, r), Ot, r); + return gu(zm(f, a), Tr, a) && Eot(f) && je(a, p.Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator, $r(f)), ut; + } + function wot(r, a, l) { + const f = r.properties; + if (Z && f.length === 0) + return zm(a, r); + for (let d = 0; d < f.length; d++) + fIe(r, a, d, f, l); + return a; + } + function fIe(r, a, l, f, d = !1) { + const y = r.properties, x = y[l]; + if (x.kind === 303 || x.kind === 304) { + const I = x.name, M = o0(I); + if (ap(M)) { + const Se = op(M), pe = Ys(a, Se); + pe && (RM(pe, x, d), vde( + x, + /*isSuper*/ + !1, + /*writing*/ + !0, + a, + pe + )); + } + const z = j_(a, M, 32 | (Kk(x) ? 16 : 0), I), Y = br(x, z); + return WT(x.kind === 304 ? x : x.initializer, Y); + } else if (x.kind === 305) + if (l < y.length - 1) + je(x, p.A_rest_element_must_be_last_in_a_destructuring_pattern); + else { + R < yl.ObjectSpreadRest && hl( + x, + 4 + /* Rest */ + ); + const I = []; + if (f) + for (const z of f) + Zg(z) || I.push(z.name); + const M = qe(a, I, a.symbol); + return sC(f, p.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma), WT(x.expression, M); + } + else + je(x, p.Property_assignment_expected); + } + function Pot(r, a, l) { + const f = r.elements; + R < yl.DestructuringAssignment && F.downlevelIteration && hl( + r, + 512 + /* Read */ + ); + const d = yy(193, a, ft, r) || We; + let y = F.noUncheckedIndexedAccess ? void 0 : d; + for (let x = 0; x < f.length; x++) { + let I = d; + r.elements[x].kind === 230 && (I = y = y ?? (yy(65, a, ft, r) || We)), pIe(r, a, x, I, l); + } + return a; + } + function pIe(r, a, l, f, d) { + const y = r.elements, x = y[l]; + if (x.kind !== 232) { + if (x.kind !== 230) { + const I = gd(l); + if (my(a)) { + const M = 32 | (Kk(x) ? 16 : 0), z = j1(a, I, M, cI(x, I)) || We, Y = Kk(x) ? xp( + z, + 524288 + /* NEUndefined */ + ) : z, Se = br(x, Y); + return WT(x, Se, d); + } + return WT(x, f, d); + } + if (l < y.length - 1) + je(x, p.A_rest_element_must_be_last_in_a_destructuring_pattern); + else { + const I = x.expression; + if (I.kind === 226 && I.operatorToken.kind === 64) + je(I.operatorToken, p.A_rest_element_cannot_have_an_initializer); + else { + sC(r.elements, p.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma); + const M = J_(a, ga) ? Vo(a, (z) => Gw(z, l)) : mu(f); + return WT(I, M, d); + } + } + } + } + function WT(r, a, l, f) { + let d; + if (r.kind === 304) { + const y = r; + y.objectAssignmentInitializer && (Z && !Hd( + Gi(y.objectAssignmentInitializer), + 16777216 + /* IsUndefined */ + ) && (a = xp( + a, + 524288 + /* NEUndefined */ + )), Fot(y.name, y.equalsToken, y.objectAssignmentInitializer, l)), d = r.name; + } else + d = r; + return d.kind === 226 && d.operatorToken.kind === 64 && (Ee(d, l), d = d.left, Z && (a = xp( + a, + 524288 + /* NEUndefined */ + ))), d.kind === 210 ? wot(d, a, f) : d.kind === 209 ? Pot(d, a, l) : Not(d, a, l); + } + function Not(r, a, l) { + const f = Gi(r, l), d = r.parent.kind === 305 ? p.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access : p.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access, y = r.parent.kind === 305 ? p.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access : p.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access; + return _I(r, d, y) && z1(a, f, r, r), vC(r) && hl( + r.parent, + 1048576 + /* ClassPrivateFieldSet */ + ), a; + } + function $M(r) { + switch (r = za(r), r.kind) { + case 80: + case 11: + case 14: + case 215: + case 228: + case 15: + case 9: + case 10: + case 112: + case 97: + case 106: + case 157: + case 218: + case 231: + case 219: + case 209: + case 210: + case 221: + case 235: + case 285: + case 284: + return !0; + case 227: + return $M(r.whenTrue) && $M(r.whenFalse); + case 226: + return Ah(r.operatorToken.kind) ? !1 : $M(r.left) && $M(r.right); + case 224: + case 225: + switch (r.operator) { + case 54: + case 40: + case 41: + case 55: + return !0; + } + return !1; + // Some forms listed here for clarity + case 222: + // Explicit opt-out + case 216: + // Not SEF, but can produce useful type warnings + case 234: + // Not SEF, but can produce useful type warnings + default: + return !1; + } + } + function Zde(r, a) { + return (a.flags & 98304) !== 0 || s$(r, a); + } + function Aot() { + const r = AF(a, l, f, d, y, x); + return (pe, Ze) => { + const dt = r(pe, Ze); + return E.assertIsDefined(dt), dt; + }; + function a(pe, Ze, dt) { + return Ze ? (Ze.stackIndex++, Ze.skip = !1, z( + Ze, + /*type*/ + void 0 + ), Se( + Ze, + /*type*/ + void 0 + )) : Ze = { + checkMode: dt, + skip: !1, + stackIndex: 0, + typeStack: [void 0, void 0] + }, an(pe) && fx(pe) ? (Ze.skip = !0, Se(Ze, Gi(pe.right, dt)), Ze) : (Iot(pe), pe.operatorToken.kind === 64 && (pe.left.kind === 210 || pe.left.kind === 209) && (Ze.skip = !0, Se(Ze, WT( + pe.left, + Gi(pe.right, dt), + dt, + pe.right.kind === 110 + /* ThisKeyword */ + ))), Ze); + } + function l(pe, Ze, dt) { + if (!Ze.skip) + return I(Ze, pe); + } + function f(pe, Ze, dt) { + if (!Ze.skip) { + const ht = Y(Ze); + E.assertIsDefined(ht), z(Ze, ht), Se( + Ze, + /*type*/ + void 0 + ); + const or = pe.kind; + if (g5(or)) { + let nr = dt.parent; + for (; nr.kind === 217 || j3(nr); ) + nr = nr.parent; + (or === 56 || dv(nr)) && _me(dt.left, ht, dv(nr) ? nr.thenStatement : void 0), R3(or) && fme(ht, dt.left); + } + } + } + function d(pe, Ze, dt) { + if (!Ze.skip) + return I(Ze, pe); + } + function y(pe, Ze) { + let dt; + if (Ze.skip) + dt = Y(Ze); + else { + const ht = M(Ze); + E.assertIsDefined(ht); + const or = Y(Ze); + E.assertIsDefined(or), dt = dIe(pe.left, pe.operatorToken, pe.right, ht, or, Ze.checkMode, pe); + } + return Ze.skip = !1, z( + Ze, + /*type*/ + void 0 + ), Se( + Ze, + /*type*/ + void 0 + ), Ze.stackIndex--, dt; + } + function x(pe, Ze, dt) { + return Se(pe, Ze), pe; + } + function I(pe, Ze) { + if (fn(Ze)) + return Ze; + Se(pe, Gi(Ze, pe.checkMode)); + } + function M(pe) { + return pe.typeStack[pe.stackIndex]; + } + function z(pe, Ze) { + pe.typeStack[pe.stackIndex] = Ze; + } + function Y(pe) { + return pe.typeStack[pe.stackIndex + 1]; + } + function Se(pe, Ze) { + pe.typeStack[pe.stackIndex + 1] = Ze; + } + } + function Iot(r) { + const { left: a, operatorToken: l, right: f } = r; + if (l.kind === 61) { + fn(a) && (a.operatorToken.kind === 57 || a.operatorToken.kind === 56) && hr(a, p._0_and_1_operations_cannot_be_mixed_without_parentheses, Xs(a.operatorToken.kind), Xs(l.kind)), fn(f) && (f.operatorToken.kind === 57 || f.operatorToken.kind === 56) && hr(f, p._0_and_1_operations_cannot_be_mixed_without_parentheses, Xs(f.operatorToken.kind), Xs(l.kind)); + const d = xc( + a, + 31 + /* All */ + ), y = Kde(d); + y !== 3 && (r.parent.kind === 226 ? je(d, p.This_binary_expression_is_never_nullish_Are_you_missing_parentheses) : y === 1 ? je(d, p.This_expression_is_always_nullish) : je(d, p.Right_operand_of_is_unreachable_because_the_left_operand_is_never_nullish)); + } + } + function Kde(r) { + switch (r = xc(r), r.kind) { + case 223: + case 213: + case 212: + case 214: + case 211: + case 229: + case 110: + return 3; + case 226: + switch (r.operatorToken.kind) { + case 64: + case 61: + case 78: + case 57: + case 76: + case 56: + case 77: + return 3; + } + return 2; + case 227: + return Kde(r.whenTrue) | Kde(r.whenFalse); + case 106: + return 1; + case 80: + return Nu(r) === xe ? 1 : 3; + } + return 2; + } + function Fot(r, a, l, f, d) { + const y = a.kind; + if (y === 64 && (r.kind === 210 || r.kind === 209)) + return WT( + r, + Gi(l, f), + f, + l.kind === 110 + /* ThisKeyword */ + ); + let x; + R3(y) ? x = TI(r, f) : x = Gi(r, f); + const I = Gi(l, f); + return dIe(r, a, l, x, I, f, d); + } + function dIe(r, a, l, f, d, y, x) { + const I = a.kind; + switch (I) { + case 42: + case 43: + case 67: + case 68: + case 44: + case 69: + case 45: + case 70: + case 41: + case 66: + case 48: + case 71: + case 49: + case 72: + case 50: + case 73: + case 52: + case 75: + case 53: + case 79: + case 51: + case 74: + if (f === fr || d === fr) + return fr; + f = zm(f, r), d = zm(d, l); + let cr; + if (f.flags & 528 && d.flags & 528 && (cr = pe(a.kind)) !== void 0) + return je(x || a, p.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead, Xs(a.kind), Xs(cr)), st; + { + const zn = nX( + r, + f, + p.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type, + /*isAwaitValid*/ + !0 + ), ci = nX( + l, + d, + p.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type, + /*isAwaitValid*/ + !0 + ); + let vn; + if (su( + f, + 3 + /* AnyOrUnknown */ + ) && su( + d, + 3 + /* AnyOrUnknown */ + ) || // Or, if neither could be bigint, implicit coercion results in a number result + !(hc( + f, + 2112 + /* BigIntLike */ + ) || hc( + d, + 2112 + /* BigIntLike */ + ))) + vn = st; + else if (M(f, d)) { + switch (I) { + case 50: + case 73: + or(); + break; + case 43: + case 68: + R < 3 && je(x, p.Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later); + } + vn = Gt; + } else + or(M), vn = We; + if (zn && ci) + switch (Ze(vn), I) { + case 48: + case 71: + case 49: + case 72: + case 50: + case 73: + const Ts = it(l); + typeof Ts.value == "number" && Math.abs(Ts.value) >= 32 && dg( + j0(rd(l.parent.parent)), + // elevate from suggestion to error within an enum member + x || a, + p.This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2, + qo(r), + Xs(I), + Ts.value % 32 + ); + break; + } + return vn; + } + case 40: + case 65: + if (f === fr || d === fr) + return fr; + !su( + f, + 402653316 + /* StringLike */ + ) && !su( + d, + 402653316 + /* StringLike */ + ) && (f = zm(f, r), d = zm(d, l)); + let Yt; + return su( + f, + 296, + /*strict*/ + !0 + ) && su( + d, + 296, + /*strict*/ + !0 + ) ? Yt = st : su( + f, + 2112, + /*strict*/ + !0 + ) && su( + d, + 2112, + /*strict*/ + !0 + ) ? Yt = Gt : su( + f, + 402653316, + /*strict*/ + !0 + ) || su( + d, + 402653316, + /*strict*/ + !0 + ) ? Yt = de : (Ua(f) || Ua(d)) && (Yt = H(f) || H(d) ? We : Je), Yt && !Se(I) ? Yt : Yt ? (I === 65 && Ze(Yt), Yt) : (or( + (ci, vn) => su(ci, 402655727) && su(vn, 402655727) + ), Je); + case 30: + case 32: + case 33: + case 34: + return Se(I) && (f = Cpe(zm(f, r)), d = Cpe(zm(d, l)), ht((zn, ci) => { + if (Ua(zn) || Ua(ci)) + return !0; + const vn = Ls(zn, mi), Ts = Ls(ci, mi); + return vn && Ts || !vn && !Ts && lM(zn, ci); + })), ut; + case 35: + case 36: + case 37: + case 38: + if (!(y && y & 64)) { + if ((Nj(r) || Nj(l)) && // only report for === and !== in JS, not == or != + (!an(r) || I === 37 || I === 38)) { + const zn = I === 35 || I === 37; + je(x, p.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value, zn ? "false" : "true"); + } + Kr(x, I, r, l), ht((zn, ci) => Zde(zn, ci) || Zde(ci, zn)); + } + return ut; + case 104: + return Cot(r, l, f, d, y); + case 103: + return Dot(r, l, f, d); + case 56: + case 77: { + const zn = Hd( + f, + 4194304 + /* Truthy */ + ) ? Qn([cnt(Z ? f : _0(d)), d]) : f; + return I === 77 && Ze(d), zn; + } + case 57: + case 76: { + const zn = Hd( + f, + 8388608 + /* Falsy */ + ) ? Qn( + [f0(MNe(f)), d], + 2 + /* Subtype */ + ) : f; + return I === 76 && Ze(d), zn; + } + case 61: + case 78: { + const zn = Hd( + f, + 262144 + /* EQUndefinedOrNull */ + ) ? Qn( + [f0(f), d], + 2 + /* Subtype */ + ) : f; + return I === 78 && Ze(d), zn; + } + case 64: + const pn = fn(r.parent) ? Sc(r.parent) : 0; + return z(pn, d), dt(pn) ? ((!(d.flags & 524288) || pn !== 2 && pn !== 6 && !u0(d) && !Hpe(d) && !(Cn(d) & 1)) && Ze(d), f) : (Ze(d), d); + case 28: + if (!F.allowUnreachableCode && $M(r) && !Y(r.parent)) { + const zn = Cr(r), ci = zn.text, vn = aa(ci, r.pos); + zn.parseDiagnostics.some((bs) => bs.code !== p.JSX_expressions_must_have_one_parent_element.code ? !1 : gj(bs, vn)) || je(r, p.Left_side_of_comma_operator_is_unused_and_has_no_side_effects); + } + return d; + default: + return E.fail(); + } + function M(cr, Yt) { + return su( + cr, + 2112 + /* BigIntLike */ + ) && su( + Yt, + 2112 + /* BigIntLike */ + ); + } + function z(cr, Yt) { + if (cr === 2) + for (const pn of _y(Yt)) { + const zn = en(pn); + if (zn.symbol && zn.symbol.flags & 32) { + const ci = pn.escapedName, vn = Dt( + pn.valueDeclaration, + ci, + 788968, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + ); + vn?.declarations && vn.declarations.some(jS) && (Wv(vn, p.Duplicate_identifier_0, Pi(ci), pn), Wv(pn, p.Duplicate_identifier_0, Pi(ci), vn)); + } + } + } + function Y(cr) { + return cr.parent.kind === 217 && d_(cr.left) && cr.left.text === "0" && (Fs(cr.parent.parent) && cr.parent.parent.expression === cr.parent || cr.parent.parent.kind === 215) && // special-case for "eval" because it's the only non-access case where an indirect call actually affects behavior. + (vo(cr.right) || Me(cr.right) && cr.right.escapedText === "eval"); + } + function Se(cr) { + const Yt = GM( + f, + 12288 + /* ESSymbolLike */ + ) ? r : GM( + d, + 12288 + /* ESSymbolLike */ + ) ? l : void 0; + return Yt ? (je(Yt, p.The_0_operator_cannot_be_applied_to_type_symbol, Xs(cr)), !1) : !0; + } + function pe(cr) { + switch (cr) { + case 52: + case 75: + return 57; + case 53: + case 79: + return 38; + case 51: + case 74: + return 56; + default: + return; + } + } + function Ze(cr) { + Ah(I) && n(Yt); + function Yt() { + let pn = f; + if (WD(a.kind) && r.kind === 211 && (pn = q$( + r, + /*checkMode*/ + void 0, + /*writeOnly*/ + !0 + )), _I(r, p.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access, p.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access)) { + let zn; + if (me && Tn(r) && hc( + cr, + 32768 + /* Undefined */ + )) { + const ci = Pc(au(r.expression), r.name.escapedText); + o$(cr, ci) && (zn = p.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target); + } + z1(cr, pn, r, l, zn); + } + } + } + function dt(cr) { + var Yt; + switch (cr) { + case 2: + return !0; + case 1: + case 5: + case 6: + case 3: + case 4: + const pn = R_(r), zn = fx(l); + return !!zn && oa(zn) && !!((Yt = pn?.exports) != null && Yt.size); + default: + return !1; + } + } + function ht(cr) { + return cr(f, d) ? !1 : (or(cr), !0); + } + function or(cr) { + let Yt = !1; + const pn = x || a; + if (cr) { + const bs = g0(f), No = g0(d); + Yt = !(bs === f && No === d) && !!(bs && No) && cr(bs, No); + } + let zn = f, ci = d; + !Yt && cr && ([zn, ci] = Oot(f, d, cr)); + const [vn, Ts] = Ow(zn, ci); + nr(pn, Yt, vn, Ts) || S1( + pn, + Yt, + p.Operator_0_cannot_be_applied_to_types_1_and_2, + Xs(a.kind), + vn, + Ts + ); + } + function nr(cr, Yt, pn, zn) { + switch (a.kind) { + case 37: + case 35: + case 38: + case 36: + return S1( + cr, + Yt, + p.This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap, + pn, + zn + ); + default: + return; + } + } + function Kr(cr, Yt, pn, zn) { + const ci = Vr(za(pn)), vn = Vr(za(zn)); + if (ci || vn) { + const Ts = je(cr, p.This_condition_will_always_return_0, Xs( + Yt === 37 || Yt === 35 ? 97 : 112 + /* TrueKeyword */ + )); + if (ci && vn) return; + const bs = Yt === 38 || Yt === 36 ? Xs( + 54 + /* ExclamationToken */ + ) : "", No = ci ? zn : pn, ns = za(No); + Bs(Ts, tn(No, p.Did_you_mean_0, `${bs}Number.isNaN(${_o(ns) ? G_(ns) : "..."})`)); + } + } + function Vr(cr) { + if (Me(cr) && cr.escapedText === "NaN") { + const Yt = dtt(); + return !!Yt && Yt === Nu(cr); + } + return !1; + } + } + function Oot(r, a, l) { + let f = r, d = a; + const y = _0(r), x = _0(a); + return l(y, x) || (f = y, d = x), [f, d]; + } + function Lot(r) { + n(Se); + const a = ff(r); + if (!a) return Je; + const l = Oc(a); + if (!(l & 1)) + return Je; + const f = (l & 2) !== 0; + r.asteriskToken && (f && R < yl.AsyncGenerators && hl( + r, + 26624 + /* AsyncDelegatorIncludes */ + ), !f && R < yl.Generators && F.downlevelIteration && hl( + r, + 256 + /* Values */ + )); + let d = xE(a); + d && d.flags & 1048576 && (d = Jc(d, (pe) => nme( + pe, + l, + /*errorNode*/ + void 0 + ))); + const y = d && vme(d, f), x = y && y.yieldType || Je, I = y && y.nextType || Je, M = r.expression ? Gi(r.expression) : fe, z = sIe(r, M, I, f); + if (d && z && z1(z, x, r.expression || r, r.expression), r.asteriskToken) + return mme(f ? 19 : 17, 1, M, r.expression) || Je; + if (d) + return vy(2, d, f) || Je; + let Y = BAe(2, a); + return Y || (Y = Je, n(() => { + if (le && !Aee(r)) { + const pe = a_( + r, + /*contextFlags*/ + void 0 + ); + (!pe || Ua(pe)) && je(r, p.yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation); + } + })), Y; + function Se() { + r.flags & 16384 || Jl(r, p.A_yield_expression_is_only_allowed_in_a_generator_body), ode(r) && je(r, p.yield_expressions_cannot_be_used_in_a_parameter_initializer); + } + } + function Mot(r, a) { + const l = TI(r.condition, a); + _me(r.condition, l, r.whenTrue); + const f = Gi(r.whenTrue, a), d = Gi(r.whenFalse, a); + return Qn( + [f, d], + 2 + /* Subtype */ + ); + } + function mIe(r) { + const a = r.parent; + return Yu(a) && mIe(a) || fo(a) && a.argumentExpression === r; + } + function Rot(r) { + const a = [r.head.text], l = []; + for (const d of r.templateSpans) { + const y = Gi(d.expression); + GM( + y, + 12288 + /* ESSymbolLike */ + ) && je(d.expression, p.Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String), a.push(d.literal.text), l.push(Ls(y, Js) ? y : de); + } + const f = r.parent.kind !== 215 && it(r).value; + return f ? Gk(x_(f)) : rP(r) || mIe(r) || kp(a_( + r, + /*contextFlags*/ + void 0 + ) || ye, jot) ? DT(a, l) : de; + } + function jot(r) { + return !!(r.flags & 134217856 || r.flags & 58982400 && hc( + iu(r) || ye, + 402653316 + /* StringLike */ + )); + } + function Bot(r) { + return e2(r) && !MS(r.parent) ? r.parent.parent : r; + } + function RE(r, a, l, f) { + const d = Bot(r); + NM( + d, + a, + /*isCache*/ + !1 + ), tst(d, l); + const y = Gi(r, f | 1 | (l ? 2 : 0)); + l && l.intraExpressionInferenceSites && (l.intraExpressionInferenceSites = void 0); + const x = hc( + y, + 2944 + /* Literal */ + ) && sX(y, R$( + a, + r, + /*contextFlags*/ + void 0 + )) ? Vu(y) : y; + return rst(), nI(), x; + } + function uc(r, a) { + if (a) + return Gi(r, a); + const l = yn(r); + if (!l.resolvedType) { + const f = _g, d = mp; + _g = Md, mp = void 0, l.resolvedType = Gi(r, a), mp = d, _g = f; + } + return l.resolvedType; + } + function gIe(r) { + return r = za( + r, + /*excludeJSDocTypeAssertions*/ + !0 + ), r.kind === 216 || r.kind === 234 || r2(r); + } + function tP(r, a, l) { + const f = d3(r); + if (an(r)) { + const y = Q5(r); + if (y) + return Bde(f, y, a); + } + const d = rme(f) || (l ? RE( + f, + l, + /*inferenceContext*/ + void 0, + a || 0 + /* Normal */ + ) : uc(f, a)); + if (Ii(ma(r) ? tx(r) : r)) { + if (r.name.kind === 206 && hy(d)) + return Jot(d, r.name); + if (r.name.kind === 207 && ga(d)) + return zot(d, r.name); + } + return d; + } + function Jot(r, a) { + let l; + for (const y of a.elements) + if (y.initializer) { + const x = hIe(y); + x && !Ys(r, x) && (l = Pr(l, y)); + } + if (!l) + return r; + const f = Us(); + for (const y of _y(r)) + f.set(y.escapedName, y); + for (const y of l) { + const x = ca(16777220, hIe(y)); + x.links.type = B( + y, + /*includePatternInType*/ + !1, + /*reportErrors*/ + !1 + ), f.set(x.escapedName, x); + } + const d = Ea(r.symbol, f, He, He, du(r)); + return d.objectFlags = r.objectFlags, d; + } + function hIe(r) { + const a = o0(r.propertyName || r.name); + return ap(a) ? op(a) : void 0; + } + function zot(r, a) { + if (r.target.combinedFlags & 12 || py(r) >= a.elements.length) + return r; + const l = a.elements, f = z2(r).slice(), d = r.target.elementFlags.slice(); + for (let y = py(r); y < l.length; y++) { + const x = l[y]; + (y < l.length - 1 || !(x.kind === 208 && x.dotDotDotToken)) && (f.push(!ul(x) && Kk(x) ? B( + x, + /*includePatternInType*/ + !1, + /*reportErrors*/ + !1 + ) : Je), d.push( + 2 + /* Optional */ + ), !ul(x) && !Kk(x) && lb(x, Je)); + } + return Eg(f, d, r.target.readonly); + } + function eme(r, a) { + const l = yIe(r, a); + if (an(r)) { + if (PNe(l)) + return lb(r, Je), Je; + if (p$(l)) + return lb(r, Va), Va; + } + return l; + } + function yIe(r, a) { + return Z2(r) & 6 || t3(r) ? a : cb(a); + } + function sX(r, a) { + if (a) { + if (a.flags & 3145728) { + const l = a.types; + return at(l, (f) => sX(r, f)); + } + if (a.flags & 58982400) { + const l = iu(a) || ye; + return hc( + l, + 4 + /* String */ + ) && hc( + r, + 128 + /* StringLiteral */ + ) || hc( + l, + 8 + /* Number */ + ) && hc( + r, + 256 + /* NumberLiteral */ + ) || hc( + l, + 64 + /* BigInt */ + ) && hc( + r, + 2048 + /* BigIntLiteral */ + ) || hc( + l, + 4096 + /* ESSymbol */ + ) && hc( + r, + 8192 + /* UniqueESSymbol */ + ) || sX(r, l); + } + return !!(a.flags & 406847616 && hc( + r, + 128 + /* StringLiteral */ + ) || a.flags & 256 && hc( + r, + 256 + /* NumberLiteral */ + ) || a.flags & 2048 && hc( + r, + 2048 + /* BigIntLiteral */ + ) || a.flags & 512 && hc( + r, + 512 + /* BooleanLiteral */ + ) || a.flags & 8192 && hc( + r, + 8192 + /* UniqueESSymbol */ + )); + } + return !1; + } + function rP(r) { + const a = r.parent; + return Eb(a) && Kp(a.type) || r2(a) && Kp(l6(a)) || jde(r) && CT(a_( + r, + 0 + /* None */ + )) || (Yu(a) || Ql(a) || lp(a)) && rP(a) || (Xc(a) || _u(a) || r6(a)) && rP(a.parent); + } + function nP(r, a, l) { + const f = Gi(r, a, l); + return rP(r) || ZZ(r) ? Vu(f) : gIe(r) ? f : Epe(f, R$( + a_( + r, + /*contextFlags*/ + void 0 + ), + r, + /*contextFlags*/ + void 0 + )); + } + function vIe(r, a) { + return r.name.kind === 167 && hd(r.name), nP(r.initializer, a); + } + function bIe(r, a) { + q7e(r), r.name.kind === 167 && hd(r.name); + const l = lIe(r, a); + return SIe(r, l, a); + } + function SIe(r, a, l) { + if (l && l & 10) { + const f = oI( + a, + 0, + /*allowMembers*/ + !0 + ), d = oI( + a, + 1, + /*allowMembers*/ + !0 + ), y = f || d; + if (y && y.typeParameters) { + const x = _b( + r, + 2 + /* NoConstraints */ + ); + if (x) { + const I = oI( + f0(x), + f ? 0 : 1, + /*allowMembers*/ + !1 + ); + if (I && !I.typeParameters) { + if (l & 8) + return TIe(r, l), qt; + const M = $2(r), z = M.signature && Ba(M.signature), Y = z && w8e(z); + if (Y && !Y.typeParameters && !Ri(M.inferences, jE)) { + const Se = qot(M, y.typeParameters), pe = Nfe(y, Se), Ze = gr(M.inferences, (dt) => Fpe(dt.typeParameter)); + if (Ppe(pe, I, (dt, ht) => { + d0( + Ze, + dt, + ht, + /*priority*/ + 0, + /*contravariant*/ + !0 + ); + }), at(Ze, jE) && (Npe(pe, I, (dt, ht) => { + d0(Ze, dt, ht); + }), !Uot(M.inferences, Ze))) + return Vot(M.inferences, Ze), M.inferredTypeParameters = Wi(M.inferredTypeParameters, Se), ET(pe); + } + return ET(P8e(y, I, M), na(X0, (Se) => Se && gr(Se.inferences, (pe) => pe.typeParameter)).slice()); + } + } + } + } + return a; + } + function TIe(r, a) { + if (a & 2) { + const l = $2(r); + l.flags |= 4; + } + } + function jE(r) { + return !!(r.candidates || r.contraCandidates); + } + function Wot(r) { + return !!(r.candidates || r.contraCandidates || zPe(r.typeParameter)); + } + function Uot(r, a) { + for (let l = 0; l < r.length; l++) + if (jE(r[l]) && jE(a[l])) + return !0; + return !1; + } + function Vot(r, a) { + for (let l = 0; l < r.length; l++) + !jE(r[l]) && jE(a[l]) && (r[l] = a[l]); + } + function qot(r, a) { + const l = []; + let f, d; + for (const y of a) { + const x = y.symbol.escapedName; + if (tme(r.inferredTypeParameters, x) || tme(l, x)) { + const I = Hot(Wi(r.inferredTypeParameters, l), x), M = ca(262144, I), z = sr(M); + z.target = y, f = Pr(f, y), d = Pr(d, z), l.push(z); + } else + l.push(y); + } + if (d) { + const y = B_(f, d); + for (const x of d) + x.mapper = y; + } + return l; + } + function tme(r, a) { + return at(r, (l) => l.symbol.escapedName === a); + } + function Hot(r, a) { + let l = a.length; + for (; l > 1 && a.charCodeAt(l - 1) >= 48 && a.charCodeAt(l - 1) <= 57; ) l--; + const f = a.slice(0, l); + for (let d = 1; ; d++) { + const y = f + d; + if (!tme(r, y)) + return y; + } + } + function xIe(r) { + const a = zT(r); + if (a && !a.typeParameters) + return Ba(a); + } + function Got(r) { + const a = Gi(r.expression), l = $8(a, r.expression), f = xIe(a); + return f && h$(f, r, l !== a); + } + function au(r) { + const a = rme(r); + if (a) + return a; + if (r.flags & 268435456 && mp) { + const d = mp[Aa(r)]; + if (d) + return d; + } + const l = m1, f = Gi( + r, + 64 + /* TypeOnly */ + ); + if (m1 !== l) { + const d = mp || (mp = []); + d[Aa(r)] = f, Nee( + r, + r.flags | 268435456 + /* TypeCached */ + ); + } + return f; + } + function rme(r) { + let a = za( + r, + /*excludeJSDocTypeAssertions*/ + !0 + ); + if (r2(a)) { + const l = l6(a); + if (!Kp(l)) + return wi(l); + } + if (a = za(r), n1(a)) { + const l = rme(a.expression); + return l ? tC(l) : void 0; + } + if (Fs(a) && a.expression.kind !== 108 && !__( + a, + /*requireStringLiteralLikeArgument*/ + !0 + ) && !U8e(a)) + return oS(a) ? Got(a) : xIe(OE(a.expression)); + if (Eb(a) && !Kp(a.type)) + return wi(a.type); + if (cS(r) || b4(r)) + return Gi(r); + } + function XM(r) { + const a = yn(r); + if (a.contextFreeType) + return a.contextFreeType; + NM( + r, + Je, + /*isCache*/ + !1 + ); + const l = a.contextFreeType = Gi( + r, + 4 + /* SkipContextSensitive */ + ); + return nI(), l; + } + function Gi(r, a, l) { + var f, d; + (f = nn) == null || f.push(nn.Phase.Check, "checkExpression", { kind: r.kind, pos: r.pos, end: r.end, path: r.tracingPath }); + const y = C; + C = r, h = 0; + const x = Qot(r, a, l), I = SIe(r, x, a); + return iX(I) && $ot(r, I), C = y, (d = nn) == null || d.pop(), I; + } + function $ot(r, a) { + const l = r.parent.kind === 211 && r.parent.expression === r || r.parent.kind === 212 && r.parent.expression === r || (r.kind === 80 || r.kind === 166) && SX(r) || r.parent.kind === 186 && r.parent.exprName === r || r.parent.kind === 281; + if (l || je(r, p.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query), F.isolatedModules || F.verbatimModuleSyntax && l && !Dt( + r, + w_(r), + 2097152, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1, + /*excludeGlobals*/ + !0 + )) { + E.assert(!!(a.symbol.flags & 128)); + const f = a.symbol.valueDeclaration, d = e.getRedirectReferenceForResolutionFromSourceOfProject(Cr(f).resolvedPath); + f.flags & 33554432 && !cv(r) && (!d || !Yy(d.commandLine.options)) && je(r, p.Cannot_access_ambient_const_enums_when_0_is_enabled, De); + } + } + function Xot(r, a) { + if (uf(r)) { + if (IJ(r)) + return Bde(r.expression, FJ(r), a); + if (r2(r)) + return G8e(r, a); + } + return Gi(r.expression, a); + } + function Qot(r, a, l) { + const f = r.kind; + if (i) + switch (f) { + case 231: + case 218: + case 219: + i.throwIfCancellationRequested(); + } + switch (f) { + case 80: + return kit(r, a); + case 81: + return Vst(r); + case 110: + return wM(r); + case 108: + return O$(r); + case 106: + return zt; + case 15: + case 11: + return jpe(r) ? yt : Gk(x_(r.text)); + case 9: + return Y7e(r), Gk(gd(+r.text)); + case 10: + return Z_t(r), Gk(iM({ + negative: !1, + base10Value: aD(r.text) + })); + case 112: + return Jr; + case 97: + return Xr; + case 228: + return Rot(r); + case 14: + return mst(r); + case 209: + return QAe(r, a, l); + case 210: + return Tst(r, a); + case 211: + return q$(r, a); + case 166: + return p8e(r, a); + case 212: + return sat(r, a); + case 213: + if (r.expression.kind === 102) + return Rat(r); + // falls through + case 214: + return Mat(r, a); + case 215: + return jat(r); + case 217: + return Xot(r, a); + case 231: + return Jlt(r); + case 218: + case 219: + return lIe(r, a); + case 221: + return bot(r); + case 216: + case 234: + return Bat(r, a); + case 235: + return Wat(r); + case 233: + return X8e(r); + case 238: + return Uat(r); + case 236: + return Vat(r); + case 220: + return yot(r); + case 222: + return Sot(r); + case 223: + return Tot(r); + case 224: + return xot(r); + case 225: + return kot(r); + case 226: + return Ee(r, a); + case 227: + return Mot(r, a); + case 230: + return gst(r, a); + case 232: + return fe; + case 229: + return Lot(r); + case 237: + return hst(r); + case 294: + return Rst(r, a); + case 284: + return Est(r); + case 285: + return kst(r); + case 288: + return Dst(r); + case 292: + return Pst(r, a); + case 286: + E.fail("Shouldn't ever directly check a JsxOpeningElement"); + } + return We; + } + function kIe(r) { + yh(r), r.expression && Jl(r.expression, p.Type_expected), la(r.constraint), la(r.default); + const a = L2(dn(r)); + iu(a), get(a) || je(r.default, p.Type_parameter_0_has_a_circular_default, $r(a)); + const l = s_(a), f = j2(a); + l && f && gu(f, of(Bi(l, V2(a, f)), f), r.default, p.Type_0_does_not_satisfy_the_constraint_1), rC(r), n(() => oP(r.name, p.Type_parameter_name_cannot_be_0)); + } + function Yot(r) { + var a, l; + if (Yl(r.parent) || Zn(r.parent) || jp(r.parent)) { + const f = L2(dn(r)), d = Spe(f) & 24576; + if (d) { + const y = dn(r.parent); + if (jp(r.parent) && !(Cn(ko(y)) & 48)) + je(r, p.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types); + else if (d === 8192 || d === 16384) { + (a = nn) == null || a.push(nn.Phase.CheckTypes, "checkTypeParameterDeferred", { parent: jl(ko(y)), id: jl(f) }); + const x = fM(y, f, d === 16384 ? rt : G), I = fM(y, f, d === 16384 ? G : rt), M = f; + D = f, gu(x, I, r, p.Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation), D = M, (l = nn) == null || l.pop(); + } + } + } + } + function CIe(r) { + yh(r), eR(r); + const a = ff(r); + $n( + r, + 31 + /* ParameterPropertyModifier */ + ) && (a.kind === 176 && Ap(a.body) || je(r, p.A_parameter_property_is_only_allowed_in_a_constructor_implementation), a.kind === 176 && Me(r.name) && r.name.escapedText === "constructor" && je(r.name, p.constructor_cannot_be_used_as_a_parameter_property_name)), !r.initializer && Ax(r) && Ds(r.name) && a.body && je(r, p.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature), r.name && Me(r.name) && (r.name.escapedText === "this" || r.name.escapedText === "new") && (a.parameters.indexOf(r) !== 0 && je(r, p.A_0_parameter_must_be_the_first_parameter, r.name.escapedText), (a.kind === 176 || a.kind === 180 || a.kind === 185) && je(r, p.A_constructor_cannot_have_a_this_parameter), a.kind === 219 && je(r, p.An_arrow_function_cannot_have_a_this_parameter), (a.kind === 177 || a.kind === 178) && je(r, p.get_and_set_accessors_cannot_declare_this_parameters)), r.dotDotDotToken && !Ds(r.name) && !Ls(md(en(r.symbol)), df) && je(r, p.A_rest_parameter_must_be_of_an_array_type); + } + function Zot(r) { + const a = Kot(r); + if (!a) { + je(r, p.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); + return; + } + const l = Gf(a), f = bp(l); + if (!f) + return; + la(r.type); + const { parameterName: d } = r; + if (f.kind !== 0 && f.kind !== 2) { + if (f.parameterIndex >= 0) { + if (ku(l) && f.parameterIndex === l.parameters.length - 1) + je(d, p.A_type_predicate_cannot_reference_a_rest_parameter); + else if (f.type) { + const y = () => fs( + /*details*/ + void 0, + p.A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type + ); + gu( + f.type, + en(l.parameters[f.parameterIndex]), + r.type, + /*headMessage*/ + void 0, + y + ); + } + } else if (d) { + let y = !1; + for (const { name: x } of a.parameters) + if (Ds(x) && EIe(x, d, f.parameterName)) { + y = !0; + break; + } + y || je(r.parameterName, p.Cannot_find_parameter_0, f.parameterName); + } + } + } + function Kot(r) { + switch (r.parent.kind) { + case 219: + case 179: + case 262: + case 218: + case 184: + case 174: + case 173: + const a = r.parent; + if (r === a.type) + return a; + } + } + function EIe(r, a, l) { + for (const f of r.elements) { + if (ul(f)) + continue; + const d = f.name; + if (d.kind === 80 && d.escapedText === l) + return je(a, p.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, l), !0; + if ((d.kind === 207 || d.kind === 206) && EIe( + d, + a, + l + )) + return !0; + } + } + function pI(r) { + r.kind === 181 ? D_t(r) : (r.kind === 184 || r.kind === 262 || r.kind === 185 || r.kind === 179 || r.kind === 176 || r.kind === 180) && EX(r); + const a = Oc(r); + a & 4 || ((a & 3) === 3 && R < yl.AsyncGenerators && hl( + r, + 6144 + /* AsyncGeneratorIncludes */ + ), (a & 3) === 2 && R < yl.AsyncFunctions && hl( + r, + 64 + /* Awaiter */ + ), a & 3 && R < yl.Generators && hl( + r, + 128 + /* Generator */ + )), nR(My(r)), Rlt(r), lr(r.parameters, CIe), r.type && la(r.type), n(l); + function l() { + Zct(r); + let f = pf(r), d = f; + if (an(r)) { + const y = Y1(r); + if (y && y.typeExpression && Y_(y.typeExpression.type)) { + const x = zT(wi(y.typeExpression)); + x && x.declaration && (f = pf(x.declaration), d = y.typeExpression.type); + } + } + if (le && !f) + switch (r.kind) { + case 180: + je(r, p.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); + break; + case 179: + je(r, p.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); + break; + } + if (f && d) { + const y = Oc(r); + if ((y & 5) === 1) { + const x = wi(f); + x === Pt ? je(d, p.A_generator_cannot_have_a_void_type_annotation) : nme(x, y, d); + } else (y & 3) === 2 && Nct(r, f, d); + } + r.kind !== 181 && r.kind !== 317 && V1(r); + } + } + function nme(r, a, l) { + const f = vy(0, r, (a & 2) !== 0) || Je, d = vy(1, r, (a & 2) !== 0) || f, y = vy(2, r, (a & 2) !== 0) || ye, x = rX(f, d, y, !!(a & 2)); + return gu(x, r, l); + } + function ect(r) { + const a = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(); + for (const y of r.members) + if (y.kind === 176) + for (const x of y.parameters) + H_(x, y) && !Ds(x.name) && d( + a, + x.name, + x.name.escapedText, + 3 + /* GetOrSetAccessor */ + ); + else { + const x = Vs(y), I = y.name; + if (!I) + continue; + const M = Ni(I), z = M && x ? 16 : 0, Y = M ? f : x ? l : a, Se = I && Rme(I); + if (Se) + switch (y.kind) { + case 177: + d(Y, I, Se, 1 | z); + break; + case 178: + d(Y, I, Se, 2 | z); + break; + case 172: + d(Y, I, Se, 3 | z); + break; + case 174: + d(Y, I, Se, 8 | z); + break; + } + } + function d(y, x, I, M) { + const z = y.get(I); + if (z) + if ((z & 16) !== (M & 16)) + je(x, p.Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name, qo(x)); + else { + const Y = !!(z & 8), Se = !!(M & 8); + Y || Se ? Y !== Se && je(x, p.Duplicate_identifier_0, qo(x)) : z & M & -17 ? je(x, p.Duplicate_identifier_0, qo(x)) : y.set(I, z | M); + } + else + y.set(I, M); + } + } + function tct(r) { + for (const a of r.members) { + const l = a.name; + if (Vs(a) && l) { + const d = Rme(l); + switch (d) { + case "name": + case "length": + case "caller": + case "arguments": + if ($) + break; + // fall through + case "prototype": + const y = p.Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1, x = F1(dn(r)); + je(l, y, d, x); + break; + } + } + } + } + function DIe(r) { + const a = /* @__PURE__ */ new Map(); + for (const l of r.members) + if (l.kind === 171) { + let f; + const d = l.name; + switch (d.kind) { + case 11: + case 9: + f = d.text; + break; + case 80: + f = An(d); + break; + default: + continue; + } + a.get(f) ? (je(is(l.symbol.valueDeclaration), p.Duplicate_identifier_0, f), je(l.name, p.Duplicate_identifier_0, f)) : a.set(f, !0); + } + } + function ime(r) { + if (r.kind === 264) { + const l = dn(r); + if (l.declarations && l.declarations.length > 0 && l.declarations[0] !== r) + return; + } + const a = BG(dn(r)); + if (a?.declarations) { + const l = /* @__PURE__ */ new Map(); + for (const f of a.declarations) + r1(f) && f.parameters.length === 1 && f.parameters[0].type && RT(wi(f.parameters[0].type), (d) => { + const y = l.get(jl(d)); + y ? y.declarations.push(f) : l.set(jl(d), { type: d, declarations: [f] }); + }); + l.forEach((f) => { + if (f.declarations.length > 1) + for (const d of f.declarations) + je(d, p.Duplicate_index_signature_for_type_0, $r(f.type)); + }); + } + } + function wIe(r) { + !yh(r) && !X_t(r) && DX(r.name), eR(r), aX(r), $n( + r, + 64 + /* Abstract */ + ) && r.kind === 172 && r.initializer && je(r, p.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract, co(r.name)); + } + function rct(r) { + return Ni(r.name) && je(r, p.Private_identifiers_are_not_allowed_outside_class_bodies), wIe(r); + } + function nct(r) { + q7e(r) || DX(r.name), fc(r) && r.asteriskToken && Me(r.name) && An(r.name) === "constructor" && je(r.name, p.Class_constructor_may_not_be_a_generator), JIe(r), $n( + r, + 64 + /* Abstract */ + ) && r.kind === 174 && r.body && je(r, p.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract, co(r.name)), Ni(r.name) && !Al(r) && je(r, p.Private_identifiers_are_not_allowed_outside_class_bodies), aX(r); + } + function aX(r) { + if (Ni(r.name) && (R < yl.PrivateNamesAndClassStaticBlocks || R < yl.ClassAndClassElementDecorators || !$)) { + for (let a = Sd(r); a; a = Sd(a)) + yn(a).flags |= 1048576; + if (Gc(r.parent)) { + const a = tde(r.parent); + a && (yn(r.name).flags |= 32768, yn(a).flags |= 4096); + } + } + } + function ict(r) { + yh(r), ms(r, la); + } + function sct(r) { + pI(r), G_t(r) || $_t(r), la(r.body); + const a = dn(r), l = Lo(a, r.kind); + if (r === l && cX(a), tc(r.body)) + return; + n(d); + return; + function f(y) { + return Fu(y) ? !0 : y.kind === 172 && !Vs(y) && !!y.initializer; + } + function d() { + const y = r.parent; + if (Mb(y)) { + rde(r.parent, y); + const x = nde(y), I = FAe(r.body); + if (I) { + if (x && je(I, p.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null), !U && (at(r.parent.members, f) || at(r.parameters, (z) => $n( + z, + 31 + /* ParameterPropertyModifier */ + )))) + if (!act(I, r.body)) + je(I, p.A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers); + else { + let z; + for (const Y of r.body.statements) { + if (El(Y) && mS(xc(Y.expression))) { + z = Y; + break; + } + if (PIe(Y)) + break; + } + z === void 0 && je(r, p.A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers); + } + } else x || je(r, p.Constructors_for_derived_classes_must_contain_a_super_call); + } + } + } + function act(r, a) { + const l = rd(r.parent); + return El(l) && l.parent === a; + } + function PIe(r) { + return r.kind === 108 || r.kind === 110 ? !0 : aK(r) ? !1 : !!ms(r, PIe); + } + function NIe(r) { + Me(r.name) && An(r.name) === "constructor" && Zn(r.parent) && je(r.name, p.Class_constructor_may_not_be_an_accessor), n(a), la(r.body), aX(r); + function a() { + if (!EX(r) && !M_t(r) && DX(r.name), YM(r), pI(r), r.kind === 177 && !(r.flags & 33554432) && Ap(r.body) && r.flags & 512 && (r.flags & 1024 || je(r.name, p.A_get_accessor_must_return_a_value)), r.name.kind === 167 && hd(r.name), SE(r)) { + const f = dn(r), d = Lo( + f, + 177 + /* GetAccessor */ + ), y = Lo( + f, + 178 + /* SetAccessor */ + ); + if (d && y && !(iC(d) & 1)) { + yn(d).flags |= 1; + const x = Mu(d), I = Mu(y); + (x & 64) !== (I & 64) && (je(d.name, p.Accessors_must_both_be_abstract_or_non_abstract), je(y.name, p.Accessors_must_both_be_abstract_or_non_abstract)), (x & 4 && !(I & 6) || x & 2 && !(I & 2)) && (je(d.name, p.A_get_accessor_must_be_at_least_as_accessible_as_the_setter), je(y.name, p.A_get_accessor_must_be_at_least_as_accessible_as_the_setter)); + } + } + const l = jw(dn(r)); + r.kind === 177 && $de(r, l); + } + } + function oct(r) { + YM(r); + } + function cct(r, a, l) { + return r.typeArguments && l < r.typeArguments.length ? wi(r.typeArguments[l]) : oX(r, a)[l]; + } + function oX(r, a) { + return fy(gr(r.typeArguments, wi), a, kg(a), an(r)); + } + function AIe(r, a) { + let l, f, d = !0; + for (let y = 0; y < a.length; y++) { + const x = s_(a[y]); + x && (l || (l = oX(r, a), f = B_(a, l)), d = d && gu( + l[y], + Bi(x, f), + r.typeArguments[y], + p.Type_0_does_not_satisfy_the_constraint_1 + )); + } + return d; + } + function lct(r, a) { + if (!H(r)) + return a.flags & 524288 && Ci(a).typeParameters || (Cn(r) & 4 ? r.target.localTypeParameters : void 0); + } + function sme(r) { + const a = wi(r); + if (!H(a)) { + const l = yn(r).resolvedSymbol; + if (l) + return lct(a, l); + } + } + function ame(r) { + if (oR(r, r.typeArguments), r.kind === 183 && !an(r) && !$7(r) && r.typeArguments && r.typeName.end !== r.typeArguments.pos) { + const a = Cr(r); + $Z(a, r.typeName.end) === 25 && Y2(r, aa(a.text, r.typeName.end), 1, p.JSDoc_types_can_only_be_used_inside_documentation_comments); + } + lr(r.typeArguments, la), IIe(r); + } + function IIe(r) { + const a = wi(r); + if (!H(a)) { + r.typeArguments && n(() => { + const f = sme(r); + f && AIe(r, f); + }); + const l = yn(r).resolvedSymbol; + l && at(l.declarations, (f) => Nx(f) && !!(f.flags & 536870912)) && Zh( + zM(r), + l.declarations, + l.escapedName + ); + } + } + function uct(r) { + const a = jn(r.parent, v7); + if (!a) return; + const l = sme(a); + if (!l) return; + const f = s_(l[a.typeArguments.indexOf(r)]); + return f && Bi(f, B_(l, oX(a, l))); + } + function _ct(r) { + f3e(r); + } + function fct(r) { + lr(r.members, la), n(a); + function a() { + const l = rNe(r); + mX(l, l.symbol), ime(r), DIe(r); + } + } + function pct(r) { + la(r.elementType); + } + function dct(r) { + let a = !1, l = !1; + for (const f of r.elements) { + let d = Wfe(f); + if (d & 8) { + const y = wi(f.type); + if (!my(y)) { + je(f, p.A_rest_element_type_must_be_an_array_type); + break; + } + (Tp(y) || ga(y) && y.target.combinedFlags & 4) && (d |= 4); + } + if (d & 4) { + if (l) { + hr(f, p.A_rest_element_cannot_follow_another_rest_element); + break; + } + l = !0; + } else if (d & 2) { + if (l) { + hr(f, p.An_optional_element_cannot_follow_a_rest_element); + break; + } + a = !0; + } else if (d & 1 && a) { + hr(f, p.A_required_element_cannot_follow_an_optional_element); + break; + } + } + lr(r.elements, la), wi(r); + } + function mct(r) { + lr(r.types, la), wi(r); + } + function FIe(r, a) { + if (!(r.flags & 8388608)) + return r; + const l = r.objectType, f = r.indexType, d = T_(l) && I8(l) === 2 ? J3e( + l, + 0 + /* None */ + ) : Bm( + l, + 0 + /* None */ + ), y = !!ph(l, st); + if (J_(f, (x) => Ls(x, d) || y && zk(x, st))) + return a.kind === 212 && $y(a) && Cn(l) & 32 && Tg(l) & 1 && je(a, p.Index_signature_in_type_0_only_permits_reading, $r(l)), r; + if (PT(l)) { + const x = QG(f, a); + if (x) { + const I = RT(Uu(l), (M) => Ys(M, x)); + if (I && sp(I) & 6) + return je(a, p.Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter, Pi(x)), We; + } + } + return je(a, p.Type_0_cannot_be_used_to_index_type_1, $r(f), $r(l)), We; + } + function gct(r) { + la(r.objectType), la(r.indexType), FIe(Q3e(r), r); + } + function hct(r) { + yct(r), la(r.typeParameter), la(r.nameType), la(r.type), r.type || lb(r, Je); + const a = epe(r), l = uy(a); + if (l) + gu(l, Ot, r.nameType); + else { + const f = Hf(a); + gu(f, Ot, hC(r.typeParameter)); + } + } + function yct(r) { + var a; + if ((a = r.members) != null && a.length) + return hr(r.members[0], p.A_mapped_type_may_not_declare_properties_or_methods); + } + function vct(r) { + ope(r); + } + function bct(r) { + j_t(r), la(r.type); + } + function Sct(r) { + ms(r, la); + } + function Tct(r) { + ur(r, (l) => l.parent && l.parent.kind === 194 && l.parent.extendsType === l) || hr(r, p.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type), la(r.typeParameter); + const a = dn(r.typeParameter); + if (a.declarations && a.declarations.length > 1) { + const l = Ci(a); + if (!l.typeParametersChecked) { + l.typeParametersChecked = !0; + const f = L2(a), d = CZ( + a, + 168 + /* TypeParameter */ + ); + if (!s7e(d, [f], (y) => [y])) { + const y = Ui(a); + for (const x of d) + je(x.name, p.All_declarations_of_0_must_have_identical_constraints, y); + } + } + } + V1(r); + } + function xct(r) { + for (const a of r.templateSpans) { + la(a.type); + const l = wi(a.type); + gu(l, Js, a.type); + } + wi(r); + } + function kct(r) { + la(r.argument), r.attributes && k6(r.attributes, hr), IIe(r); + } + function Cct(r) { + r.dotDotDotToken && r.questionToken && hr(r, p.A_tuple_member_cannot_be_both_optional_and_rest), r.type.kind === 190 && hr(r.type, p.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type), r.type.kind === 191 && hr(r.type, p.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type), la(r.type), wi(r); + } + function QM(r) { + return (Q_( + r, + 2 + /* Private */ + ) || Fu(r)) && !!(r.flags & 33554432); + } + function dI(r, a) { + let l = PX(r); + if (r.parent.kind !== 264 && r.parent.kind !== 263 && r.parent.kind !== 231 && r.flags & 33554432) { + const f = A7(r); + f && f.flags & 128 && !(l & 128) && !(dm(r.parent) && Lc(r.parent.parent) && eg(r.parent.parent)) && (l |= 32), l |= 128; + } + return l & a; + } + function cX(r) { + n(() => Ect(r)); + } + function Ect(r) { + function a(cr, Yt) { + return Yt !== void 0 && Yt.parent === cr[0].parent ? Yt : cr[0]; + } + function l(cr, Yt, pn, zn, ci) { + if ((zn ^ ci) !== 0) { + const Ts = dI(a(cr, Yt), pn); + oC(cr, (bs) => Cr(bs).fileName).forEach((bs) => { + const No = dI(a(bs, Yt), pn); + for (const ns of bs) { + const xl = dI(ns, pn) ^ Ts, Ko = dI(ns, pn) ^ No; + Ko & 32 ? je(is(ns), p.Overload_signatures_must_all_be_exported_or_non_exported) : Ko & 128 ? je(is(ns), p.Overload_signatures_must_all_be_ambient_or_non_ambient) : xl & 6 ? je(is(ns) || ns, p.Overload_signatures_must_all_be_public_private_or_protected) : xl & 64 && je(is(ns), p.Overload_signatures_must_all_be_abstract_or_non_abstract); + } + }); + } + } + function f(cr, Yt, pn, zn) { + if (pn !== zn) { + const ci = mx(a(cr, Yt)); + lr(cr, (vn) => { + mx(vn) !== ci && je(is(vn), p.Overload_signatures_must_all_be_optional_or_required); + }); + } + } + const d = 230; + let y = 0, x = d, I = !1, M = !0, z = !1, Y, Se, pe; + const Ze = r.declarations, dt = (r.flags & 16384) !== 0; + function ht(cr) { + if (cr.name && tc(cr.name)) + return; + let Yt = !1; + const pn = ms(cr.parent, (ci) => { + if (Yt) + return ci; + Yt = ci === cr; + }); + if (pn && pn.pos === cr.end && pn.kind === cr.kind) { + const ci = pn.name || pn, vn = pn.name; + if (cr.name && vn && // both are private identifiers + (Ni(cr.name) && Ni(vn) && cr.name.escapedText === vn.escapedText || // Both are computed property names + fa(cr.name) && fa(vn) && gh(hd(cr.name), hd(vn)) || // Both are literal property names that are the same. + am(cr.name) && am(vn) && z4(cr.name) === z4(vn))) { + if ((cr.kind === 174 || cr.kind === 173) && Vs(cr) !== Vs(pn)) { + const bs = Vs(cr) ? p.Function_overload_must_be_static : p.Function_overload_must_not_be_static; + je(ci, bs); + } + return; + } + if (Ap(pn.body)) { + je(ci, p.Function_implementation_name_must_be_0, co(cr.name)); + return; + } + } + const zn = cr.name || cr; + dt ? je(zn, p.Constructor_implementation_is_missing) : $n( + cr, + 64 + /* Abstract */ + ) ? je(zn, p.All_declarations_of_an_abstract_method_must_be_consecutive) : je(zn, p.Function_implementation_is_missing_or_not_immediately_following_the_declaration); + } + let or = !1, nr = !1, Kr = !1; + const Vr = []; + if (Ze) + for (const cr of Ze) { + const Yt = cr, pn = Yt.flags & 33554432, zn = Yt.parent && (Yt.parent.kind === 264 || Yt.parent.kind === 187) || pn; + if (zn && (pe = void 0), (Yt.kind === 263 || Yt.kind === 231) && !pn && (Kr = !0), Yt.kind === 262 || Yt.kind === 174 || Yt.kind === 173 || Yt.kind === 176) { + Vr.push(Yt); + const ci = dI(Yt, d); + y |= ci, x &= ci, I = I || mx(Yt), M = M && mx(Yt); + const vn = Ap(Yt.body); + vn && Y ? dt ? nr = !0 : or = !0 : pe?.parent === Yt.parent && pe.end !== Yt.pos && ht(pe), vn ? Y || (Y = Yt) : z = !0, pe = Yt, zn || (Se = Yt); + } + an(cr) && vs(cr) && cr.jsDoc && (z = Ir(SB(cr)) > 0); + } + if (nr && lr(Vr, (cr) => { + je(cr, p.Multiple_constructor_implementations_are_not_allowed); + }), or && lr(Vr, (cr) => { + je(is(cr) || cr, p.Duplicate_function_implementation); + }), Kr && !dt && r.flags & 16 && Ze) { + const cr = kn( + Ze, + (Yt) => Yt.kind === 263 + /* ClassDeclaration */ + ).map((Yt) => tn(Yt, p.Consider_adding_a_declare_modifier_to_this_class)); + lr(Ze, (Yt) => { + const pn = Yt.kind === 263 ? p.Class_declaration_cannot_implement_overload_list_for_0 : Yt.kind === 262 ? p.Function_with_bodies_can_only_merge_with_classes_that_are_ambient : void 0; + pn && Bs( + je(is(Yt) || Yt, pn, _c(r)), + ...cr + ); + }); + } + if (Se && !Se.body && !$n( + Se, + 64 + /* Abstract */ + ) && !Se.questionToken && ht(Se), z && (Ze && (l(Ze, Y, d, y, x), f(Ze, Y, I, M)), Y)) { + const cr = B2(r), Yt = Gf(Y); + for (const pn of cr) + if (!Mrt(Yt, pn)) { + const zn = pn.declaration && B0(pn.declaration) ? pn.declaration.parent.tagName : pn.declaration; + Bs( + je(zn, p.This_overload_signature_is_not_compatible_with_its_implementation_signature), + tn(Y, p.The_implementation_signature_is_declared_here) + ); + break; + } + } + } + function mI(r) { + n(() => Dct(r)); + } + function Dct(r) { + let a = r.localSymbol; + if (!a && (a = dn(r), !a.exportSymbol) || Lo(a, r.kind) !== r) + return; + let l = 0, f = 0, d = 0; + for (const z of a.declarations) { + const Y = M(z), Se = dI( + z, + 2080 + /* Default */ + ); + Se & 32 ? Se & 2048 ? d |= Y : l |= Y : f |= Y; + } + const y = l | f, x = l & f, I = d & y; + if (x || I) + for (const z of a.declarations) { + const Y = M(z), Se = is(z); + Y & I ? je(Se, p.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead, co(Se)) : Y & x && je(Se, p.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, co(Se)); + } + function M(z) { + let Y = z; + switch (Y.kind) { + case 264: + case 265: + // A jsdoc typedef and callback are, by definition, type aliases. + // falls through + case 346: + case 338: + case 340: + return 2; + case 267: + return Ou(Y) || jh(Y) !== 0 ? 5 : 4; + case 263: + case 266: + case 306: + return 3; + case 307: + return 7; + case 277: + case 226: + const Se = Y, pe = Io(Se) ? Se.expression : Se.right; + if (!_o(pe)) + return 1; + Y = pe; + // The below options all declare an Alias, which is allowed to merge with other values within the importing module. + // falls through + case 271: + case 274: + case 273: + let Ze = 0; + const dt = Pl(dn(Y)); + return lr(dt.declarations, (ht) => { + Ze |= M(ht); + }), Ze; + case 260: + case 208: + case 262: + case 276: + // https://github.com/Microsoft/TypeScript/pull/7591 + case 80: + return 1; + case 173: + case 171: + return 2; + default: + return E.failBadSyntaxKind(Y); + } + } + } + function iP(r, a, l, ...f) { + const d = gI(r, a); + return d && tC(d, a, l, ...f); + } + function gI(r, a, l) { + if (Ua(r)) + return; + const f = r; + if (f.promisedTypeOfPromise) + return f.promisedTypeOfPromise; + if (Mm(r, ZL( + /*reportErrors*/ + !1 + ))) + return f.promisedTypeOfPromise = Po(r)[0]; + if (fI( + xg(r), + 402915324 + /* Never */ + )) + return; + const d = Pc(r, "then"); + if (Ua(d)) + return; + const y = d ? Ps( + d, + 0 + /* Call */ + ) : He; + if (y.length === 0) { + a && je(a, p.A_promise_must_have_a_then_method); + return; + } + let x, I; + for (const Y of y) { + const Se = ib(Y); + Se && Se !== Pt && !Jm(r, Se, pg) ? x = Se : I = Pr(I, Y); + } + if (!I) { + E.assertIsDefined(x), l && (l.value = x), a && je(a, p.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1, $r(r), $r(x)); + return; + } + const M = xp( + Qn(gr(I, Ude)), + 2097152 + /* NEUndefinedOrNull */ + ); + if (Ua(M)) + return; + const z = Ps( + M, + 0 + /* Call */ + ); + if (z.length === 0) { + a && je(a, p.The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback); + return; + } + return f.promisedTypeOfPromise = Qn( + gr(z, Ude), + 2 + /* Subtype */ + ); + } + function hI(r, a, l, f, ...d) { + return (a ? tC(r, l, f, ...d) : g0(r, l, f, ...d)) || We; + } + function OIe(r) { + if (fI( + xg(r), + 402915324 + /* Never */ + )) + return !1; + const a = Pc(r, "then"); + return !!a && Ps( + xp( + a, + 2097152 + /* NEUndefinedOrNull */ + ), + 0 + /* Call */ + ).length > 0; + } + function lX(r) { + var a; + if (r.flags & 16777216) { + const l = zfe( + /*reportErrors*/ + !1 + ); + return !!l && r.aliasSymbol === l && ((a = r.aliasTypeArguments) == null ? void 0 : a.length) === 1; + } + return !1; + } + function sP(r) { + return r.flags & 1048576 ? Vo(r, sP) : lX(r) ? r.aliasTypeArguments[0] : r; + } + function LIe(r) { + if (Ua(r) || lX(r)) + return !1; + if (PT(r)) { + const a = iu(r); + if (a ? a.flags & 3 || u0(a) || kp(a, OIe) : hc( + r, + 8650752 + /* TypeVariable */ + )) + return !0; + } + return !1; + } + function wct(r) { + const a = zfe( + /*reportErrors*/ + !0 + ); + if (a) + return CE(a, [sP(r)]); + } + function Pct(r) { + return LIe(r) ? wct(r) ?? r : (E.assert(lX(r) || gI(r) === void 0, "type provided should not be a non-generic 'promise'-like."), r); + } + function tC(r, a, l, ...f) { + const d = g0(r, a, l, ...f); + return d && Pct(d); + } + function g0(r, a, l, ...f) { + if (Ua(r) || lX(r)) + return r; + const d = r; + if (d.awaitedTypeOfType) + return d.awaitedTypeOfType; + if (r.flags & 1048576) { + if (Xh.lastIndexOf(r.id) >= 0) { + a && je(a, p.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method); + return; + } + const I = a ? (z) => g0(z, a, l, ...f) : g0; + Xh.push(r.id); + const M = Vo(r, I); + return Xh.pop(), d.awaitedTypeOfType = M; + } + if (LIe(r)) + return d.awaitedTypeOfType = r; + const y = { value: void 0 }, x = gI( + r, + /*errorNode*/ + void 0, + y + ); + if (x) { + if (r.id === x.id || Xh.lastIndexOf(x.id) >= 0) { + a && je(a, p.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method); + return; + } + Xh.push(r.id); + const I = g0(x, a, l, ...f); + return Xh.pop(), I ? d.awaitedTypeOfType = I : void 0; + } + if (OIe(r)) { + if (a) { + E.assertIsDefined(l); + let I; + y.value && (I = fs(I, p.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1, $r(r), $r(y.value))), I = fs(I, l, ...f), Pa.add(Jg(Cr(a), a, I)); + } + return; + } + return d.awaitedTypeOfType = r; + } + function Nct(r, a, l) { + const f = wi(a); + if (R >= 2) { + if (H(f)) + return; + const y = ZL( + /*reportErrors*/ + !0 + ); + if (y !== Oi && !Mm(f, y)) { + d(p.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0, a, l, $r(g0(f) || Pt)); + return; + } + } else { + if (Zk( + r, + 5 + /* AsyncFunction */ + ), H(f)) + return; + const y = c3(a); + if (y === void 0) { + d(p.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, a, l, $r(f)); + return; + } + const x = oc( + y, + 111551, + /*ignoreErrors*/ + !0 + ), I = x ? en(x) : We; + if (H(I)) { + y.kind === 80 && y.escapedText === "Promise" && xT(f) === ZL( + /*reportErrors*/ + !1 + ) ? je(l, p.An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option) : d(p.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, a, l, G_(y)); + return; + } + const M = qet( + /*reportErrors*/ + !0 + ); + if (M === hs) { + d(p.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, a, l, G_(y)); + return; + } + const z = p.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value; + if (!gu(I, M, l, z, () => a === l ? void 0 : fs( + /*details*/ + void 0, + p.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type + ))) + return; + const Se = y && w_(y), pe = fu( + r.locals, + Se.escapedText, + 111551 + /* Value */ + ); + if (pe) { + je(pe.valueDeclaration, p.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, An(Se), G_(y)); + return; + } + } + hI( + f, + /*withAlias*/ + !1, + r, + p.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member + ); + function d(y, x, I, M) { + if (x === I) + je(I, y, M); + else { + const z = je(I, p.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type); + Bs(z, tn(x, y, M)); + } + } + } + function Act(r) { + const a = Cr(r); + if (!q1(a)) { + let l = r.expression; + if (Yu(l)) + return !1; + let f = !0, d; + for (; ; ) { + if (Lh(l) || Hx(l)) { + l = l.expression; + continue; + } + if (Fs(l)) { + f || (d = l), l.questionDotToken && (d = l.questionDotToken), l = l.expression, f = !1; + continue; + } + if (Tn(l)) { + l.questionDotToken && (d = l.questionDotToken), l = l.expression, f = !1; + continue; + } + Me(l) || (d = l); + break; + } + if (d) + return Bs( + je(r.expression, p.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator), + tn(d, p.Invalid_syntax_in_decorator) + ), !0; + } + return !1; + } + function Ict(r) { + Act(r); + const a = ME(r); + eX(a, r); + const l = Ba(a); + if (l.flags & 1) + return; + const f = Hde(r); + if (!f?.resolvedReturnType) return; + let d; + const y = f.resolvedReturnType; + switch (r.parent.kind) { + case 263: + case 231: + d = p.Decorator_function_return_type_0_is_not_assignable_to_type_1; + break; + case 172: + if (!V) { + d = p.Decorator_function_return_type_0_is_not_assignable_to_type_1; + break; + } + // falls through + case 169: + d = p.Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any; + break; + case 174: + case 177: + case 178: + d = p.Decorator_function_return_type_0_is_not_assignable_to_type_1; + break; + default: + return E.failBadSyntaxKind(r.parent); + } + gu(l, y, r.expression, d); + } + function yI(r, a, l, f, d, y = l.length, x = 0) { + const I = N.createFunctionTypeNode( + /*typeParameters*/ + void 0, + He, + N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ) + ); + return fh(I, r, a, l, f, d, y, x); + } + function ome(r, a, l, f, d, y, x) { + const I = yI(r, a, l, f, d, y, x); + return ET(I); + } + function MIe(r) { + return ome( + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + He, + r + ); + } + function RIe(r) { + const a = _d("value", r); + return ome( + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + [a], + Pt + ); + } + function cme(r) { + if (r) + switch (r.kind) { + case 193: + case 192: + return jIe(r.types); + case 194: + return jIe([r.trueType, r.falseType]); + case 196: + case 202: + return cme(r.type); + case 183: + return r.typeName; + } + } + function jIe(r) { + let a; + for (let l of r) { + for (; l.kind === 196 || l.kind === 202; ) + l = l.type; + if (l.kind === 146 || !Z && (l.kind === 201 && l.literal.kind === 106 || l.kind === 157)) + continue; + const f = cme(l); + if (!f) + return; + if (a) { + if (!Me(a) || !Me(f) || a.escapedText !== f.escapedText) + return; + } else + a = f; + } + return a; + } + function uX(r) { + const a = qc(r); + return Zm(r) ? uB(a) : a; + } + function YM(r) { + if (!n2(r) || !Pf(r) || !r.modifiers || !l3(V, r, r.parent, r.parent.parent)) + return; + const a = Pn(r.modifiers, ll); + if (a) { + V ? (hl( + a, + 8 + /* Decorate */ + ), r.kind === 169 && hl( + a, + 32 + /* Param */ + )) : R < yl.ClassAndClassElementDecorators && (hl( + a, + 8 + /* ESDecorateAndRunInitializers */ + ), $c(r) ? r.name ? a7e(r) && hl( + a, + 4194304 + /* SetFunctionName */ + ) : hl( + a, + 4194304 + /* SetFunctionName */ + ) : Gc(r) || (Ni(r.name) && (fc(r) || Jy(r) || l_(r)) && hl( + a, + 4194304 + /* SetFunctionName */ + ), fa(r.name) && hl( + a, + 8388608 + /* PropKey */ + ))), Zk( + r, + 8 + /* Decorator */ + ); + for (const l of r.modifiers) + ll(l) && Ict(l); + } + } + function Fct(r) { + n(a); + function a() { + JIe(r), Fme(r), aP(r, r.name); + } + } + function Oct(r) { + r.typeExpression || je(r.name, p.JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags), r.name && oP(r.name, p.Type_alias_name_cannot_be_0), la(r.typeExpression), nR(My(r)); + } + function Lct(r) { + la(r.constraint); + for (const a of r.typeParameters) + la(a); + } + function Mct(r) { + la(r.typeExpression); + } + function Rct(r) { + la(r.typeExpression); + const a = iv(r); + if (a) { + const l = s7(a, CF); + if (Ir(l) > 1) + for (let f = 1; f < Ir(l); f++) { + const d = l[f].tagName; + je(d, p._0_tag_already_specified, An(d)); + } + } + } + function jct(r) { + r.name && sR( + r.name, + /*ignoreErrors*/ + !0 + ); + } + function Bct(r) { + la(r.typeExpression); + } + function Jct(r) { + la(r.typeExpression); + } + function zct(r) { + n(a), pI(r); + function a() { + !r.type && !gx(r) && lb(r, Je); + } + } + function Wct(r) { + const a = iv(r); + a && bo(a) && je(r.tagName, p.An_arrow_function_cannot_have_a_this_parameter); + } + function Uct(r) { + Tme(r); + } + function Vct(r) { + const a = iv(r); + (!a || !$c(a) && !Gc(a)) && je(a, p.JSDoc_0_is_not_attached_to_a_class, An(r.tagName)); + } + function qct(r) { + const a = iv(r); + if (!a || !$c(a) && !Gc(a)) { + je(a, p.JSDoc_0_is_not_attached_to_a_class, An(r.tagName)); + return; + } + const l = Z1(a).filter(Xx); + E.assert(l.length > 0), l.length > 1 && je(l[1], p.Class_declarations_cannot_have_more_than_one_augments_or_extends_tag); + const f = BIe(r.class.expression), d = Mb(a); + if (d) { + const y = BIe(d.expression); + y && f.escapedText !== y.escapedText && je(f, p.JSDoc_0_1_does_not_match_the_extends_2_clause, An(r.tagName), An(f), An(y)); + } + } + function Hct(r) { + const a = Ob(r); + a && Fu(a) && je(r, p.An_accessibility_modifier_cannot_be_used_with_a_private_identifier); + } + function BIe(r) { + switch (r.kind) { + case 80: + return r; + case 211: + return r.name; + default: + return; + } + } + function JIe(r) { + var a; + YM(r), pI(r); + const l = Oc(r); + if (r.name && r.name.kind === 167 && hd(r.name), SE(r)) { + const y = dn(r), x = r.localSymbol || y, I = (a = x.declarations) == null ? void 0 : a.find( + // Get first non javascript function declaration + (M) => M.kind === r.kind && !(M.flags & 524288) + ); + r === I && cX(x), y.parent && cX(y); + } + const f = r.kind === 173 ? void 0 : r.body; + if (la(f), $de(r, xE(r)), n(d), an(r)) { + const y = Y1(r); + y && y.typeExpression && !pde(wi(y.typeExpression), r) && je(y.typeExpression.type, p.The_type_of_a_function_declaration_must_match_the_function_s_signature); + } + function d() { + pf(r) || (tc(f) && !QM(r) && lb(r, Je), l & 1 && Ap(f) && Ba(Gf(r))); + } + } + function V1(r) { + n(a); + function a() { + const l = Cr(r); + let f = nh.get(l.path); + f || (f = [], nh.set(l.path, f)), f.push(r); + } + } + function zIe(r, a) { + for (const l of r) + switch (l.kind) { + case 263: + case 231: + Gct(l, a), lme(l, a); + break; + case 307: + case 267: + case 241: + case 269: + case 248: + case 249: + case 250: + VIe(l, a); + break; + case 176: + case 218: + case 262: + case 219: + case 174: + case 177: + case 178: + l.body && VIe(l, a), lme(l, a); + break; + case 173: + case 179: + case 180: + case 184: + case 185: + case 265: + case 264: + lme(l, a); + break; + case 195: + $ct(l, a); + break; + default: + E.assertNever(l, "Node should not have been registered for unused identifiers check"); + } + } + function WIe(r, a, l) { + const f = is(r) || r, d = Nx(r) ? p._0_is_declared_but_never_used : p._0_is_declared_but_its_value_is_never_read; + l(r, 0, tn(f, d, a)); + } + function vI(r) { + return Me(r) && An(r).charCodeAt(0) === 95; + } + function Gct(r, a) { + for (const l of r.members) + switch (l.kind) { + case 174: + case 172: + case 177: + case 178: + if (l.kind === 178 && l.symbol.flags & 32768) + break; + const f = dn(l); + !f.isReferenced && (Q_( + l, + 2 + /* Private */ + ) || Hl(l) && Ni(l.name)) && !(l.flags & 33554432) && a(l, 0, tn(l.name, p._0_is_declared_but_its_value_is_never_read, Ui(f))); + break; + case 176: + for (const d of l.parameters) + !d.symbol.isReferenced && $n( + d, + 2 + /* Private */ + ) && a(d, 0, tn(d.name, p.Property_0_is_declared_but_its_value_is_never_read, _c(d.symbol))); + break; + case 181: + case 240: + case 175: + break; + default: + E.fail("Unexpected class member"); + } + } + function $ct(r, a) { + const { typeParameter: l } = r; + ume(l) && a(r, 1, tn(r, p._0_is_declared_but_its_value_is_never_read, An(l.name))); + } + function lme(r, a) { + const l = dn(r).declarations; + if (!l || _a(l) !== r) return; + const f = My(r), d = /* @__PURE__ */ new Set(); + for (const y of f) { + if (!ume(y)) continue; + const x = An(y.name), { parent: I } = y; + if (I.kind !== 195 && I.typeParameters.every(ume)) { + if (S0(d, I)) { + const M = Cr(I), z = Bp(I) ? EJ(I) : DJ(M, I.typeParameters), Se = I.typeParameters.length === 1 ? [p._0_is_declared_but_its_value_is_never_read, x] : [p.All_type_parameters_are_unused]; + a(y, 1, ol(M, z.pos, z.end - z.pos, ...Se)); + } + } else + a(y, 1, tn(y, p._0_is_declared_but_its_value_is_never_read, x)); + } + } + function ume(r) { + return !(Oa(r.symbol).isReferenced & 262144) && !vI(r.name); + } + function ZM(r, a, l, f) { + const d = String(f(a)), y = r.get(d); + y ? y[1].push(l) : r.set(d, [a, [l]]); + } + function UIe(r) { + return jn(om(r), Ii); + } + function Xct(r) { + return ma(r) ? Nf(r.parent) ? !!(r.propertyName && vI(r.name)) : vI(r.name) : Ou(r) || (Kn(r) && _S(r.parent.parent) || qIe(r)) && vI(r.name); + } + function VIe(r, a) { + const l = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(); + r.locals.forEach((y) => { + if (!(y.flags & 262144 ? !(y.flags & 3 && !(y.isReferenced & 3)) : y.isReferenced || y.exportSymbol) && y.declarations) { + for (const x of y.declarations) + if (!Xct(x)) + if (qIe(x)) + ZM(l, Yct(x), x, Aa); + else if (ma(x) && Nf(x.parent)) { + const I = _a(x.parent.elements); + (x === I || !_a(x.parent.elements).dotDotDotToken) && ZM(f, x.parent, x, Aa); + } else if (Kn(x)) { + const I = Z2(x) & 7, M = is(x); + (I !== 4 && I !== 6 || !M || !vI(M)) && ZM(d, x.parent, x, Aa); + } else { + const I = y.valueDeclaration && UIe(y.valueDeclaration), M = y.valueDeclaration && is(y.valueDeclaration); + I && M ? !H_(I, I.parent) && !Bb(I) && !vI(M) && (ma(x) && R0(x.parent) ? ZM(f, x.parent, x, Aa) : a(I, 1, tn(M, p._0_is_declared_but_its_value_is_never_read, _c(y)))) : WIe(x, _c(y), a); + } + } + }), l.forEach(([y, x]) => { + const I = y.parent; + if ((y.name ? 1 : 0) + (y.namedBindings ? y.namedBindings.kind === 274 ? 1 : y.namedBindings.elements.length : 0) === x.length) + a( + I, + 0, + x.length === 1 ? tn(I, p._0_is_declared_but_its_value_is_never_read, An(ya(x).name)) : tn(I, p.All_imports_in_import_declaration_are_unused) + ); + else + for (const z of x) WIe(z, An(z.name), a); + }), f.forEach(([y, x]) => { + const I = UIe(y.parent) ? 1 : 0; + if (y.elements.length === x.length) + x.length === 1 && y.parent.kind === 260 && y.parent.parent.kind === 261 ? ZM(d, y.parent.parent, y.parent, Aa) : a( + y, + I, + x.length === 1 ? tn(y, p._0_is_declared_but_its_value_is_never_read, KM(ya(x).name)) : tn(y, p.All_destructured_elements_are_unused) + ); + else + for (const M of x) + a(M, I, tn(M, p._0_is_declared_but_its_value_is_never_read, KM(M.name))); + }), d.forEach(([y, x]) => { + if (y.declarations.length === x.length) + a( + y, + 0, + x.length === 1 ? tn(ya(x).name, p._0_is_declared_but_its_value_is_never_read, KM(ya(x).name)) : tn(y.parent.kind === 243 ? y.parent : y, p.All_variables_are_unused) + ); + else + for (const I of x) + a(I, 0, tn(I, p._0_is_declared_but_its_value_is_never_read, KM(I.name))); + }); + } + function Qct() { + var r; + for (const a of v1) + if (!((r = dn(a)) != null && r.isReferenced)) { + const l = tx(a); + E.assert(av(l), "Only parameter declaration should be checked here"); + const f = tn(a.name, p._0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation, co(a.name), co(a.propertyName)); + l.type || Bs( + f, + ol(Cr(l), l.end, 0, p.We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here, co(a.propertyName)) + ), Pa.add(f); + } + } + function KM(r) { + switch (r.kind) { + case 80: + return An(r); + case 207: + case 206: + return KM(Ws(ya(r.elements), ma).name); + default: + return E.assertNever(r); + } + } + function qIe(r) { + return r.kind === 273 || r.kind === 276 || r.kind === 274; + } + function Yct(r) { + return r.kind === 273 ? r : r.kind === 274 ? r.parent : r.parent.parent; + } + function _X(r) { + if (r.kind === 241 && h0(r), Fj(r)) { + const a = $0; + lr(r.statements, la), $0 = a; + } else + lr(r.statements, la); + r.locals && V1(r); + } + function Zct(r) { + R >= 2 || !zj(r) || r.flags & 33554432 || tc(r.body) || lr(r.parameters, (a) => { + a.name && !Ds(a.name) && a.name.escapedText === ne.escapedName && qp("noEmit", a, p.Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters); + }); + } + function bI(r, a, l) { + if (a?.escapedText !== l || r.kind === 172 || r.kind === 171 || r.kind === 174 || r.kind === 173 || r.kind === 177 || r.kind === 178 || r.kind === 303 || r.flags & 33554432 || (id(r) || _l(r) || ju(r)) && x0(r)) + return !1; + const f = om(r); + return !(Ii(f) && tc(f.parent.body)); + } + function Kct(r) { + ur(r, (a) => iC(a) & 4 ? (r.kind !== 80 ? je(is(r), p.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference) : je(r, p.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference), !0) : !1); + } + function elt(r) { + ur(r, (a) => iC(a) & 8 ? (r.kind !== 80 ? je(is(r), p.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference) : je(r, p.Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference), !0) : !1); + } + function tlt(r, a) { + if (e.getEmitModuleFormatOfFile(Cr(r)) >= 5 || !a || !bI(r, a, "require") && !bI(r, a, "exports") || Lc(r) && jh(r) !== 1) + return; + const l = ST(r); + l.kind === 307 && $_(l) && qp("noEmit", a, p.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, co(a), co(a)); + } + function rlt(r, a) { + if (!a || R >= 4 || !bI(r, a, "Promise") || Lc(r) && jh(r) !== 1) + return; + const l = ST(r); + l.kind === 307 && $_(l) && l.flags & 4096 && qp("noEmit", a, p.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions, co(a), co(a)); + } + function nlt(r, a) { + R <= 8 && (bI(r, a, "WeakMap") || bI(r, a, "WeakSet")) && jd.push(r); + } + function ilt(r) { + const a = Sd(r); + iC(a) & 1048576 && (E.assert(Hl(r) && Me(r.name) && typeof r.name.escapedText == "string", "The target of a WeakMap/WeakSet collision check should be an identifier"), qp("noEmit", r, p.Compiler_reserves_name_0_when_emitting_private_identifier_downlevel, r.name.escapedText)); + } + function slt(r, a) { + a && R >= 2 && R <= 8 && bI(r, a, "Reflect") && $h.push(r); + } + function alt(r) { + let a = !1; + if (Gc(r)) { + for (const l of r.members) + if (iC(l) & 2097152) { + a = !0; + break; + } + } else if (po(r)) + iC(r) & 2097152 && (a = !0); + else { + const l = Sd(r); + l && iC(l) & 2097152 && (a = !0); + } + a && (E.assert(Hl(r) && Me(r.name), "The target of a Reflect collision check should be an identifier"), qp("noEmit", r, p.Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers, co(r.name), "Reflect")); + } + function aP(r, a) { + a && (tlt(r, a), rlt(r, a), nlt(r, a), slt(r, a), Zn(r) ? (oP(a, p.Class_name_cannot_be_0), r.flags & 33554432 || Mlt(a)) : Zb(r) && oP(a, p.Enum_name_cannot_be_0)); + } + function olt(r) { + if (Z2(r) & 7 || av(r)) + return; + const a = dn(r); + if (a.flags & 1) { + if (!Me(r.name)) return E.fail(); + const l = Dt( + r, + r.name.escapedText, + 3, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + ); + if (l && l !== a && l.flags & 2 && hde(l) & 7) { + const f = sv( + l.valueDeclaration, + 261 + /* VariableDeclarationList */ + ), d = f.parent.kind === 243 && f.parent.parent ? f.parent.parent : void 0; + if (!(d && (d.kind === 241 && vs(d.parent) || d.kind === 268 || d.kind === 267 || d.kind === 307))) { + const x = Ui(l); + je(r, p.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, x, x); + } + } + } + } + function SI(r) { + return r === Ye ? Je : r === mo ? Va : r; + } + function eR(r) { + var a; + if (YM(r), ma(r) || la(r.type), !r.name) + return; + if (r.name.kind === 167 && (hd(r.name), fS(r) && r.initializer && uc(r.initializer)), ma(r)) { + if (r.propertyName && Me(r.name) && av(r) && tc(ff(r).body)) { + v1.push(r); + return; + } + Nf(r.parent) && r.dotDotDotToken && R < yl.ObjectSpreadRest && hl( + r, + 4 + /* Rest */ + ), r.propertyName && r.propertyName.kind === 167 && hd(r.propertyName); + const d = r.parent.parent, y = r.dotDotDotToken ? 32 : 0, x = Pe(d, y), I = r.propertyName || r.name; + if (x && !Ds(I)) { + const M = o0(I); + if (ap(M)) { + const z = op(M), Y = Ys(x, z); + Y && (RM( + Y, + /*nodeForCheckWriteOnly*/ + void 0, + /*isSelfTypeAccess*/ + !1 + ), vde( + r, + !!d.initializer && d.initializer.kind === 108, + /*writing*/ + !1, + x, + Y + )); + } + } + } + if (Ds(r.name) && (r.name.kind === 207 && R < yl.BindingPatterns && F.downlevelIteration && hl( + r, + 512 + /* Read */ + ), lr(r.name.elements, la)), r.initializer && av(r) && tc(ff(r).body)) { + je(r, p.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation); + return; + } + if (Ds(r.name)) { + if (Upe(r)) + return; + const d = fS(r) && r.initializer && r.parent.parent.kind !== 249, y = !at(r.name.elements, jI(ul)); + if (d || y) { + const x = _n(r); + if (d) { + const I = uc(r.initializer); + Z && y ? f8e(I, r) : z1(I, _n(r), r, r.initializer); + } + y && (R0(r.name) ? yy(65, x, ft, r) : Z && f8e(x, r)); + } + return; + } + const l = dn(r); + if (l.flags & 2097152 && (Ib(r) || uK(r))) { + yX(r); + return; + } + r.name.kind === 10 && je(r.name, p.A_bigint_literal_cannot_be_used_as_a_property_name); + const f = SI(en(l)); + if (r === l.valueDeclaration) { + const d = fS(r) && d3(r); + if (d && !(an(r) && oa(d) && (d.properties.length === 0 || Qy(r.name)) && !!((a = l.exports) != null && a.size)) && r.parent.parent.kind !== 249) { + const x = uc(d); + z1( + x, + f, + r, + d, + /*headMessage*/ + void 0 + ); + const I = Z2(r) & 7; + if (I === 6) { + const M = rtt( + /*reportErrors*/ + !0 + ), z = x3e( + /*reportErrors*/ + !0 + ); + if (M !== hs && z !== hs) { + const Y = Qn([M, z, lt, ft]); + gu(vp(x, r), Y, d, p.The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined); + } + } else if (I === 4) { + const M = x3e( + /*reportErrors*/ + !0 + ); + if (M !== hs) { + const z = Qn([M, lt, ft]); + gu(vp(x, r), z, d, p.The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined); + } + } + } + l.declarations && l.declarations.length > 1 && at(l.declarations, (y) => y !== r && D4(y) && !GIe(y, r)) && je(r.name, p.All_declarations_of_0_must_have_identical_modifiers, co(r.name)); + } else { + const d = SI(_n(r)); + !H(f) && !H(d) && !gh(f, d) && !(l.flags & 67108864) && HIe(l.valueDeclaration, f, r, d), fS(r) && r.initializer && z1( + uc(r.initializer), + d, + r, + r.initializer, + /*headMessage*/ + void 0 + ), l.valueDeclaration && !GIe(r, l.valueDeclaration) && je(r.name, p.All_declarations_of_0_must_have_identical_modifiers, co(r.name)); + } + r.kind !== 172 && r.kind !== 171 && (mI(r), (r.kind === 260 || r.kind === 208) && olt(r), aP(r, r.name)); + } + function HIe(r, a, l, f) { + const d = is(l), y = l.kind === 172 || l.kind === 171 ? p.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2 : p.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2, x = co(d), I = je( + d, + y, + x, + $r(a), + $r(f) + ); + r && Bs(I, tn(r, p._0_was_also_declared_here, x)); + } + function GIe(r, a) { + if (r.kind === 169 && a.kind === 260 || r.kind === 260 && a.kind === 169) + return !0; + if (mx(r) !== mx(a)) + return !1; + const l = 1358; + return bx(r, l) === bx(a, l); + } + function clt(r) { + var a, l; + (a = nn) == null || a.push(nn.Phase.Check, "checkVariableDeclaration", { kind: r.kind, pos: r.pos, end: r.end, path: r.tracingPath }), U_t(r), eR(r), (l = nn) == null || l.pop(); + } + function llt(r) { + return J_t(r), eR(r); + } + function fX(r) { + const a = Ch(r) & 7; + (a === 4 || a === 6) && R < yl.UsingAndAwaitUsing && hl( + r, + 16777216 + /* AddDisposableResourceAndDisposeResources */ + ), lr(r.declarations, la); + } + function ult(r) { + !yh(r) && !Mme(r.declarationList) && V_t(r), fX(r.declarationList); + } + function _lt(r) { + h0(r), Gi(r.expression); + } + function flt(r) { + h0(r); + const a = TI(r.expression); + _me(r.expression, a, r.thenStatement), la(r.thenStatement), r.thenStatement.kind === 242 && je(r.thenStatement, p.The_body_of_an_if_statement_cannot_be_the_empty_statement), la(r.elseStatement); + } + function _me(r, a, l) { + if (!Z) return; + f(r, l); + function f(y, x) { + for (y = za(y), d(y, x); fn(y) && (y.operatorToken.kind === 57 || y.operatorToken.kind === 61); ) + y = za(y.left), d(y, x); + } + function d(y, x) { + const I = j3(y) ? za(y.right) : y; + if (Wg(I)) + return; + if (j3(I)) { + f(I, x); + return; + } + const M = I === y ? a : Gi(I); + if (M.flags & 1024 && Tn(I) && (yn(I.expression).resolvedSymbol ?? Ve).flags & 384) { + je(I, p.This_condition_will_always_return_0, M.value ? "true" : "false"); + return; + } + const z = Tn(I) && gIe(I.expression); + if (!Hd( + M, + 4194304 + /* Truthy */ + ) || z) return; + const Y = Ps( + M, + 0 + /* Call */ + ), Se = !!iP(M); + if (Y.length === 0 && !Se) + return; + const pe = Me(I) ? I : Tn(I) ? I.name : void 0, Ze = pe && Cp(pe); + if (!Ze && !Se) + return; + Ze && fn(y.parent) && dlt(y.parent, Ze) || Ze && x && plt(y, x, pe, Ze) || (Se ? S1( + I, + /*maybeMissingAwait*/ + !0, + p.This_condition_will_always_return_true_since_this_0_is_always_defined, + fE(M) + ) : je(I, p.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead)); + } + } + function plt(r, a, l, f) { + return !!ms(a, function d(y) { + if (Me(y)) { + const x = Cp(y); + if (x && x === f) { + if (Me(r) || Me(l) && fn(l.parent)) + return !0; + let I = l.parent, M = y.parent; + for (; I && M; ) { + if (Me(I) && Me(M) || I.kind === 110 && M.kind === 110) + return Cp(I) === Cp(M); + if (Tn(I) && Tn(M)) { + if (Cp(I.name) !== Cp(M.name)) + return !1; + M = M.expression, I = I.expression; + } else if (Fs(I) && Fs(M)) + M = M.expression, I = I.expression; + else + return !1; + } + } + } + return ms(y, d); + }); + } + function dlt(r, a) { + for (; fn(r) && r.operatorToken.kind === 56; ) { + if (ms(r.right, function f(d) { + if (Me(d)) { + const y = Cp(d); + if (y && y === a) + return !0; + } + return ms(d, f); + })) + return !0; + r = r.parent; + } + return !1; + } + function mlt(r) { + h0(r), la(r.statement), TI(r.expression); + } + function glt(r) { + h0(r), TI(r.expression), la(r.statement); + } + function fme(r, a) { + if (r.flags & 16384) + je(a, p.An_expression_of_type_void_cannot_be_tested_for_truthiness); + else { + const l = pme(a); + l !== 3 && je( + a, + l === 1 ? p.This_kind_of_expression_is_always_truthy : p.This_kind_of_expression_is_always_falsy + ); + } + return r; + } + function pme(r) { + switch (r = xc(r), r.kind) { + case 9: + return r.text === "0" || r.text === "1" ? 3 : 1; + case 209: + case 219: + case 10: + case 231: + case 218: + case 284: + case 285: + case 210: + case 14: + return 1; + case 222: + case 106: + return 2; + case 15: + case 11: + return r.text ? 1 : 2; + case 227: + return pme(r.whenTrue) | pme(r.whenFalse); + case 80: + return Nu(r) === xe ? 2 : 3; + } + return 3; + } + function TI(r, a) { + return fme(Gi(r, a), r); + } + function hlt(r) { + h0(r) || r.initializer && r.initializer.kind === 261 && Mme(r.initializer), r.initializer && (r.initializer.kind === 261 ? fX(r.initializer) : Gi(r.initializer)), r.condition && TI(r.condition), r.incrementor && Gi(r.incrementor), la(r.statement), r.locals && V1(r); + } + function ylt(r) { + V7e(r); + const a = B7(r); + if (r.awaitModifier ? a && nc(a) ? hr(r.awaitModifier, p.for_await_loops_cannot_be_used_inside_a_class_static_block) : (Oc(a) & 6) === 2 && R < yl.ForAwaitOf && hl( + r, + 16384 + /* ForAwaitOfIncludes */ + ) : F.downlevelIteration && R < yl.ForOf && hl( + r, + 256 + /* ForOfIncludes */ + ), r.initializer.kind === 261) + fX(r.initializer); + else { + const l = r.initializer, f = tR(r); + if (l.kind === 209 || l.kind === 210) + WT(l, f || We); + else { + const d = Gi(l); + _I( + l, + p.The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access, + p.The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access + ), f && z1(f, d, l, r.expression); + } + } + la(r.statement), r.locals && V1(r); + } + function vlt(r) { + V7e(r); + const a = bde(Gi(r.expression)); + if (r.initializer.kind === 261) { + const l = r.initializer.declarations[0]; + l && Ds(l.name) && je(l.name, p.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern), fX(r.initializer); + } else { + const l = r.initializer, f = Gi(l); + l.kind === 209 || l.kind === 210 ? je(l, p.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern) : Ls(Utt(a), f) ? _I( + l, + p.The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access, + p.The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access + ) : je(l, p.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any); + } + (a === Zt || !su( + a, + 126091264 + /* InstantiableNonPrimitive */ + )) && je(r.expression, p.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0, $r(a)), la(r.statement), r.locals && V1(r); + } + function tR(r) { + const a = r.awaitModifier ? 15 : 13; + return yy(a, OE(r.expression), ft, r.expression); + } + function yy(r, a, l, f) { + return Ua(a) ? a : dme( + r, + a, + l, + f, + /*checkAssignability*/ + !0 + ) || Je; + } + function dme(r, a, l, f, d) { + const y = (r & 2) !== 0; + if (a === Zt) { + f && hme(f, a, y); + return; + } + const x = R >= 2, I = !x && F.downlevelIteration, M = F.noUncheckedIndexedAccess && !!(r & 128); + if (x || I || y) { + const Ze = dX(a, r, x ? f : void 0); + if (d && Ze) { + const dt = r & 8 ? p.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0 : r & 32 ? p.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0 : r & 64 ? p.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0 : r & 16 ? p.Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0 : void 0; + dt && gu(l, Ze.nextType, f, dt); + } + if (Ze || x) + return M ? K8(Ze && Ze.yieldType) : Ze && Ze.yieldType; + } + let z = a, Y = !1; + if (r & 4) { + if (z.flags & 1048576) { + const Ze = a.types, dt = kn(Ze, (ht) => !(ht.flags & 402653316)); + dt !== Ze && (z = Qn( + dt, + 2 + /* Subtype */ + )); + } else z.flags & 402653316 && (z = Zt); + if (Y = z !== a, Y && z.flags & 131072) + return M ? K8(de) : de; + } + if (!my(z)) { + if (f) { + const Ze = !!(r & 4) && !Y, [dt, ht] = pe(Ze, I); + S1( + f, + ht && !!iP(z), + dt, + $r(z) + ); + } + return Y ? M ? K8(de) : de : void 0; + } + const Se = nb(z, st); + if (Y && Se) + return Se.flags & 402653316 && !F.noUncheckedIndexedAccess ? de : Qn( + M ? [Se, de, ft] : [Se, de], + 2 + /* Subtype */ + ); + return r & 128 ? K8(Se) : Se; + function pe(Ze, dt) { + var ht; + return dt ? Ze ? [p.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator, !0] : [p.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator, !0] : mme( + r, + 0, + a, + /*errorNode*/ + void 0 + ) ? [p.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher, !1] : blt((ht = a.symbol) == null ? void 0 : ht.escapedName) ? [p.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher, !0] : Ze ? [p.Type_0_is_not_an_array_type_or_a_string_type, !0] : [p.Type_0_is_not_an_array_type, !0]; + } + } + function blt(r) { + switch (r) { + case "Float32Array": + case "Float64Array": + case "Int16Array": + case "Int32Array": + case "Int8Array": + case "NodeList": + case "Uint16Array": + case "Uint32Array": + case "Uint8Array": + case "Uint8ClampedArray": + return !0; + } + return !1; + } + function mme(r, a, l, f) { + if (Ua(l)) + return; + const d = dX(l, r, f); + return d && d[S1e(a)]; + } + function fb(r = Zt, a = Zt, l = ye) { + if (r.flags & 67359327 && a.flags & 180227 && l.flags & 180227) { + const f = Yp([r, a, l]); + let d = Ji.get(f); + return d || (d = { yieldType: r, returnType: a, nextType: l }, Ji.set(f, d)), d; + } + return { yieldType: r, returnType: a, nextType: l }; + } + function $Ie(r) { + let a, l, f; + for (const d of r) + if (!(d === void 0 || d === hi)) { + if (d === ba) + return ba; + a = Pr(a, d.yieldType), l = Pr(l, d.returnType), f = Pr(f, d.nextType); + } + return a || l || f ? fb( + a && Qn(a), + l && Qn(l), + f && ra(f) + ) : hi; + } + function pX(r, a) { + return r[a]; + } + function hh(r, a, l) { + return r[a] = l; + } + function dX(r, a, l) { + var f, d; + if (Ua(r)) + return ba; + if (!(r.flags & 1048576)) { + const z = l ? { errors: void 0, skipLogging: !0 } : void 0, Y = XIe(r, a, l, z); + if (Y === hi) { + if (l) { + const Se = hme(l, r, !!(a & 2)); + z?.errors && Bs(Se, ...z.errors); + } + return; + } else if ((f = z?.errors) != null && f.length) + for (const Se of z.errors) + Pa.add(Se); + return Y; + } + const y = a & 2 ? "iterationTypesOfAsyncIterable" : "iterationTypesOfIterable", x = pX(r, y); + if (x) return x === hi ? void 0 : x; + let I; + for (const z of r.types) { + const Y = l ? { errors: void 0 } : void 0, Se = XIe(z, a, l, Y); + if (Se === hi) { + if (l) { + const pe = hme(l, r, !!(a & 2)); + Y?.errors && Bs(pe, ...Y.errors); + } + hh(r, y, hi); + return; + } else if ((d = Y?.errors) != null && d.length) + for (const pe of Y.errors) + Pa.add(pe); + I = Pr(I, Se); + } + const M = I ? $Ie(I) : hi; + return hh(r, y, M), M === hi ? void 0 : M; + } + function gme(r, a) { + if (r === hi) return hi; + if (r === ba) return ba; + const { yieldType: l, returnType: f, nextType: d } = r; + return a && zfe( + /*reportErrors*/ + !0 + ), fb( + tC(l, a) || Je, + tC(f, a) || Je, + d + ); + } + function XIe(r, a, l, f) { + if (Ua(r)) + return ba; + let d = !1; + if (a & 2) { + const y = QIe(r, Mo) || YIe(r, Mo); + if (y) + if (y === hi && l) + d = !0; + else + return a & 8 ? gme(y, l) : y; + } + if (a & 1) { + let y = QIe(r, dc) || YIe(r, dc); + if (y) + if (y === hi && l) + d = !0; + else if (a & 2) { + if (y !== hi) + return y = gme(y, l), d ? y : hh(r, "iterationTypesOfAsyncIterable", y); + } else + return y; + } + if (a & 2) { + const y = KIe(r, Mo, l, f, d); + if (y !== hi) + return y; + } + if (a & 1) { + let y = KIe(r, dc, l, f, d); + if (y !== hi) + return a & 2 ? (y = gme(y, l), d ? y : hh(r, "iterationTypesOfAsyncIterable", y)) : y; + } + return hi; + } + function QIe(r, a) { + return pX(r, a.iterableCacheKey); + } + function YIe(r, a) { + if (Mm(r, a.getGlobalIterableType( + /*reportErrors*/ + !1 + )) || Mm(r, a.getGlobalIteratorObjectType( + /*reportErrors*/ + !1 + )) || Mm(r, a.getGlobalIterableIteratorType( + /*reportErrors*/ + !1 + )) || Mm(r, a.getGlobalGeneratorType( + /*reportErrors*/ + !1 + ))) { + const [l, f, d] = Po(r); + return hh(r, a.iterableCacheKey, fb(a.resolveIterationType( + l, + /*errorNode*/ + void 0 + ) || l, a.resolveIterationType( + f, + /*errorNode*/ + void 0 + ) || f, d)); + } + if (IG(r, a.getGlobalBuiltinIteratorTypes())) { + const [l] = Po(r), f = Jfe(), d = ye; + return hh(r, a.iterableCacheKey, fb(a.resolveIterationType( + l, + /*errorNode*/ + void 0 + ) || l, a.resolveIterationType( + f, + /*errorNode*/ + void 0 + ) || f, d)); + } + } + function ZIe(r) { + const a = y3e( + /*reportErrors*/ + !1 + ), l = a && Pc(en(a), Zo(r)); + return l && ap(l) ? op(l) : `__@${r}`; + } + function KIe(r, a, l, f, d) { + const y = Ys(r, ZIe(a.iteratorSymbolName)), x = y && !(y.flags & 16777216) ? en(y) : void 0; + if (Ua(x)) + return d ? ba : hh(r, a.iterableCacheKey, ba); + const I = x ? Ps( + x, + 0 + /* Call */ + ) : void 0, M = kn(I, (Se) => $d(Se) === 0); + if (!at(M)) + return l && at(I) && gu( + r, + a.getGlobalIterableType( + /*reportErrors*/ + !0 + ), + l, + /*headMessage*/ + void 0, + /*containingMessageChain*/ + void 0, + f + ), d ? hi : hh(r, a.iterableCacheKey, hi); + const z = ra(gr(M, Ba)), Y = e7e(z, a, l, f, d) ?? hi; + return d ? Y : hh(r, a.iterableCacheKey, Y); + } + function hme(r, a, l) { + const f = l ? p.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator : p.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator, d = ( + // for (const x of Promise<...>) or [...Promise<...>] + !!iP(a) || !l && gN(r.parent) && r.parent.expression === r && KL( + /*reportErrors*/ + !1 + ) !== Oi && Ls(a, Hw(KL( + /*reportErrors*/ + !1 + ), [Je, Je, Je])) + ); + return S1(r, d, f, $r(a)); + } + function Slt(r, a, l, f) { + return e7e( + r, + a, + l, + f, + /*noCache*/ + !1 + ); + } + function e7e(r, a, l, f, d) { + if (Ua(r)) + return ba; + let y = Tlt(r, a) || xlt(r, a); + return y === hi && l && (y = void 0, d = !0), y ?? (y = Dlt(r, a, l, f, d)), y === hi ? void 0 : y; + } + function Tlt(r, a) { + return pX(r, a.iteratorCacheKey); + } + function xlt(r, a) { + if (Mm(r, a.getGlobalIterableIteratorType( + /*reportErrors*/ + !1 + )) || Mm(r, a.getGlobalIteratorType( + /*reportErrors*/ + !1 + )) || Mm(r, a.getGlobalIteratorObjectType( + /*reportErrors*/ + !1 + )) || Mm(r, a.getGlobalGeneratorType( + /*reportErrors*/ + !1 + ))) { + const [l, f, d] = Po(r); + return hh(r, a.iteratorCacheKey, fb(l, f, d)); + } + if (IG(r, a.getGlobalBuiltinIteratorTypes())) { + const [l] = Po(r), f = Jfe(), d = ye; + return hh(r, a.iteratorCacheKey, fb(l, f, d)); + } + } + function t7e(r, a) { + const l = Pc(r, "done") || Xr; + return Ls(a === 0 ? Xr : Jr, l); + } + function klt(r) { + return t7e( + r, + 0 + /* Yield */ + ); + } + function Clt(r) { + return t7e( + r, + 1 + /* Return */ + ); + } + function Elt(r) { + if (Ua(r)) + return ba; + const a = pX(r, "iterationTypesOfIteratorResult"); + if (a) + return a; + if (Mm(r, ett( + /*reportErrors*/ + !1 + ))) { + const x = Po(r)[0]; + return hh(r, "iterationTypesOfIteratorResult", fb( + x, + /*returnType*/ + void 0, + /*nextType*/ + void 0 + )); + } + if (Mm(r, ttt( + /*reportErrors*/ + !1 + ))) { + const x = Po(r)[0]; + return hh(r, "iterationTypesOfIteratorResult", fb( + /*yieldType*/ + void 0, + x, + /*nextType*/ + void 0 + )); + } + const l = Jc(r, klt), f = l !== Zt ? Pc(l, "value") : void 0, d = Jc(r, Clt), y = d !== Zt ? Pc(d, "value") : void 0; + return !f && !y ? hh(r, "iterationTypesOfIteratorResult", hi) : hh(r, "iterationTypesOfIteratorResult", fb( + f, + y || Pt, + /*nextType*/ + void 0 + )); + } + function yme(r, a, l, f, d) { + var y, x, I, M; + const z = Ys(r, l); + if (!z && l !== "next") + return; + const Y = z && !(l === "next" && z.flags & 16777216) ? l === "next" ? en(z) : xp( + en(z), + 2097152 + /* NEUndefinedOrNull */ + ) : void 0; + if (Ua(Y)) + return ba; + const Se = Y ? Ps( + Y, + 0 + /* Call */ + ) : He; + if (Se.length === 0) { + if (f) { + const cr = l === "next" ? a.mustHaveANextMethodDiagnostic : a.mustBeAMethodDiagnostic; + d ? (d.errors ?? (d.errors = []), d.errors.push(tn(f, cr, l))) : je(f, cr, l); + } + return l === "next" ? hi : void 0; + } + if (Y?.symbol && Se.length === 1) { + const cr = a.getGlobalGeneratorType( + /*reportErrors*/ + !1 + ), Yt = a.getGlobalIteratorType( + /*reportErrors*/ + !1 + ), pn = ((x = (y = cr.symbol) == null ? void 0 : y.members) == null ? void 0 : x.get(l)) === Y.symbol, zn = !pn && ((M = (I = Yt.symbol) == null ? void 0 : I.members) == null ? void 0 : M.get(l)) === Y.symbol; + if (pn || zn) { + const ci = pn ? cr : Yt, { mapper: vn } = Y; + return fb( + dy(ci.typeParameters[0], vn), + dy(ci.typeParameters[1], vn), + l === "next" ? dy(ci.typeParameters[2], vn) : void 0 + ); + } + } + let pe, Ze; + for (const cr of Se) + l !== "throw" && at(cr.parameters) && (pe = Pr(pe, Gd(cr, 0))), Ze = Pr(Ze, Ba(cr)); + let dt, ht; + if (l !== "throw") { + const cr = pe ? Qn(pe) : ye; + if (l === "next") + ht = cr; + else if (l === "return") { + const Yt = a.resolveIterationType(cr, f) || Je; + dt = Pr(dt, Yt); + } + } + let or; + const nr = Ze ? ra(Ze) : Zt, Kr = a.resolveIterationType(nr, f) || Je, Vr = Elt(Kr); + return Vr === hi ? (f && (d ? (d.errors ?? (d.errors = []), d.errors.push(tn(f, a.mustHaveAValueDiagnostic, l))) : je(f, a.mustHaveAValueDiagnostic, l)), or = Je, dt = Pr(dt, Je)) : (or = Vr.yieldType, dt = Pr(dt, Vr.returnType)), fb(or, Qn(dt), ht); + } + function Dlt(r, a, l, f, d) { + const y = $Ie([ + yme(r, a, "next", l, f), + yme(r, a, "return", l, f), + yme(r, a, "throw", l, f) + ]); + return d ? y : hh(r, a.iteratorCacheKey, y); + } + function vy(r, a, l) { + if (Ua(a)) + return; + const f = vme(a, l); + return f && f[S1e(r)]; + } + function vme(r, a) { + if (Ua(r)) + return ba; + const l = a ? 2 : 1, f = a ? Mo : dc; + return dX( + r, + l, + /*errorNode*/ + void 0 + ) || Slt( + r, + f, + /*errorNode*/ + void 0, + /*errorOutputContainer*/ + void 0 + ); + } + function wlt(r) { + h0(r) || B_t(r); + } + function rR(r, a) { + const l = !!(a & 1), f = !!(a & 2); + if (l) { + const d = vy(1, r, f); + return d ? f ? g0(sP(d)) : d : We; + } + return f ? g0(r) || We : r; + } + function r7e(r, a) { + const l = rR(a, Oc(r)); + return !!(l && (hc( + l, + 16384 + /* Void */ + ) || l.flags & 32769)); + } + function Plt(r) { + if (h0(r)) + return; + const a = B7(r); + if (a && nc(a)) { + Jl(r, p.A_return_statement_cannot_be_used_inside_a_class_static_block); + return; + } + if (!a) { + Jl(r, p.A_return_statement_can_only_be_used_within_a_function_body); + return; + } + const l = Gf(a), f = Ba(l), d = Oc(a); + if (Z || r.expression || f.flags & 131072) { + const y = r.expression ? uc(r.expression) : ft; + if (a.kind === 178) + r.expression && je(r, p.Setters_cannot_return_a_value); + else if (a.kind === 176) + r.expression && !z1(y, f, r, r.expression) && je(r, p.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); + else if (xE(a)) { + const x = rR(f, d) ?? f, I = d & 2 ? hI( + y, + /*withAlias*/ + !1, + r, + p.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member + ) : y; + x && z1(I, x, r, r.expression); + } + } else a.kind !== 176 && F.noImplicitReturns && !r7e(a, f) && je(r, p.Not_all_code_paths_return_a_value); + } + function Nlt(r) { + h0(r) || r.flags & 65536 && Jl(r, p.with_statements_are_not_allowed_in_an_async_function_block), Gi(r.expression); + const a = Cr(r); + if (!q1(a)) { + const l = rm(a, r.pos).start, f = r.statement.pos; + Y2(a, l, f - l, p.The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any); + } + } + function Alt(r) { + h0(r); + let a, l = !1; + const f = Gi(r.expression); + lr(r.caseBlock.clauses, (d) => { + d.kind === 297 && !l && (a === void 0 ? a = d : (hr(d, p.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement), l = !0)), d.kind === 296 && n(y(d)), lr(d.statements, la), F.noFallthroughCasesInSwitch && d.fallthroughFlowNode && CM(d.fallthroughFlowNode) && je(d, p.Fallthrough_case_in_switch); + function y(x) { + return () => { + const I = Gi(x.expression); + Zde(f, I) || yNe( + I, + f, + x.expression, + /*headMessage*/ + void 0 + ); + }; + } + }), r.caseBlock.locals && V1(r.caseBlock); + } + function Ilt(r) { + h0(r) || ur(r.parent, (a) => vs(a) ? "quit" : a.kind === 256 && a.label.escapedText === r.label.escapedText ? (hr(r.label, p.Duplicate_label_0, qo(r.label)), !0) : !1), la(r.statement); + } + function Flt(r) { + h0(r) || Me(r.expression) && !r.expression.escapedText && K_t(r, p.Line_break_not_permitted_here), r.expression && Gi(r.expression); + } + function Olt(r) { + h0(r), _X(r.tryBlock); + const a = r.catchClause; + if (a) { + if (a.variableDeclaration) { + const l = a.variableDeclaration; + eR(l); + const f = qc(l); + if (f) { + const d = wi(f); + d && !(d.flags & 3) && Jl(f, p.Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified); + } else if (l.initializer) + Jl(l.initializer, p.Catch_clause_variable_cannot_have_an_initializer); + else { + const d = a.block.locals; + d && jg(a.locals, (y) => { + const x = d.get(y); + x?.valueDeclaration && x.flags & 2 && hr(x.valueDeclaration, p.Cannot_redeclare_identifier_0_in_catch_clause, Pi(y)); + }); + } + } + _X(a.block); + } + r.finallyBlock && _X(r.finallyBlock); + } + function mX(r, a, l) { + const f = du(r); + if (f.length === 0) + return; + for (const y of _y(r)) + l && y.flags & 4194304 || n7e(r, y, Vk( + y, + 8576, + /*includeNonPublic*/ + !0 + ), M1(y)); + const d = a.valueDeclaration; + if (d && Zn(d)) { + for (const y of d.members) + if (!Vs(y) && !SE(y)) { + const x = dn(y); + n7e(r, x, au(y.name.expression), M1(x)); + } + } + if (f.length > 1) + for (const y of f) + Llt(r, y); + } + function n7e(r, a, l, f) { + const d = a.valueDeclaration, y = is(d); + if (y && Ni(y)) + return; + const x = Dfe(r, l), I = Cn(r) & 2 ? Lo( + r.symbol, + 264 + /* InterfaceDeclaration */ + ) : void 0, M = d && d.kind === 226 || y && y.kind === 167 ? d : void 0, z = af(a) === r.symbol ? d : void 0; + for (const Y of x) { + const Se = Y.declaration && af(dn(Y.declaration)) === r.symbol ? Y.declaration : void 0, pe = z || Se || (I && !at(wo(r), (Ze) => !!R2(Ze, a.escapedName) && !!nb(Ze, Y.keyType)) ? I : void 0); + if (pe && !Ls(f, Y.type)) { + const Ze = wm(pe, p.Property_0_of_type_1_is_not_assignable_to_2_index_type_3, Ui(a), $r(f), $r(Y.keyType), $r(Y.type)); + M && pe !== M && Bs(Ze, tn(M, p._0_is_declared_here, Ui(a))), Pa.add(Ze); + } + } + } + function Llt(r, a) { + const l = a.declaration, f = Dfe(r, a.keyType), d = Cn(r) & 2 ? Lo( + r.symbol, + 264 + /* InterfaceDeclaration */ + ) : void 0, y = l && af(dn(l)) === r.symbol ? l : void 0; + for (const x of f) { + if (x === a) continue; + const I = x.declaration && af(dn(x.declaration)) === r.symbol ? x.declaration : void 0, M = y || I || (d && !at(wo(r), (z) => !!ph(z, a.keyType) && !!nb(z, x.keyType)) ? d : void 0); + M && !Ls(a.type, x.type) && je(M, p._0_index_type_1_is_not_assignable_to_2_index_type_3, $r(a.keyType), $r(a.type), $r(x.keyType), $r(x.type)); + } + } + function oP(r, a) { + switch (r.escapedText) { + case "any": + case "unknown": + case "never": + case "number": + case "bigint": + case "boolean": + case "string": + case "symbol": + case "void": + case "object": + case "undefined": + je(r, a, r.escapedText); + } + } + function Mlt(r) { + R >= 1 && r.escapedText === "Object" && e.getEmitModuleFormatOfFile(Cr(r)) < 5 && je(r, p.Class_name_cannot_be_Object_when_targeting_ES5_with_module_0, uC[W]); + } + function Rlt(r) { + const a = kn(Z1(r), Af); + if (!Ir(a)) return; + const l = an(r), f = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set(); + if (lr(r.parameters, ({ name: x }, I) => { + Me(x) && f.add(x.escapedText), Ds(x) && d.add(I); + }), Pfe(r)) { + const x = a.length - 1, I = a[x]; + l && I && Me(I.name) && I.typeExpression && I.typeExpression.type && !f.has(I.name.escapedText) && !d.has(x) && !Tp(wi(I.typeExpression.type)) && je(I.name, p.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type, An(I.name)); + } else + lr(a, ({ name: x, isNameFirst: I }, M) => { + d.has(M) || Me(x) && f.has(x.escapedText) || (Xu(x) ? l && je(x, p.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1, G_(x), G_(x.left)) : I || dg(l, x, p.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name, An(x))); + }); + } + function nR(r) { + let a = !1; + if (r) + for (let f = 0; f < r.length; f++) { + const d = r[f]; + kIe(d), n(l(d, f)); + } + function l(f, d) { + return () => { + f.default ? (a = !0, jlt(f.default, r, d)) : a && je(f, p.Required_type_parameters_may_not_follow_optional_type_parameters); + for (let y = 0; y < d; y++) + r[y].symbol === f.symbol && je(f.name, p.Duplicate_identifier_0, co(f.name)); + }; + } + } + function jlt(r, a, l) { + f(r); + function f(d) { + if (d.kind === 183) { + const y = GG(d); + if (y.flags & 262144) + for (let x = l; x < a.length; x++) + y.symbol === dn(a[x]) && je(d, p.Type_parameter_defaults_can_only_reference_previously_declared_type_parameters); + } + ms(d, f); + } + } + function i7e(r) { + if (r.declarations && r.declarations.length === 1) + return; + const a = Ci(r); + if (!a.typeParametersChecked) { + a.typeParametersChecked = !0; + const l = Hlt(r); + if (!l || l.length <= 1) + return; + const f = ko(r); + if (!s7e(l, f.localTypeParameters, My)) { + const d = Ui(r); + for (const y of l) + je(y.name, p.All_declarations_of_0_must_have_identical_type_parameters, d); + } + } + } + function s7e(r, a, l) { + const f = Ir(a), d = kg(a); + for (const y of r) { + const x = l(y), I = x.length; + if (I < d || I > f) + return !1; + for (let M = 0; M < I; M++) { + const z = x[M], Y = a[M]; + if (z.name.escapedText !== Y.symbol.escapedName) + return !1; + const Se = hC(z), pe = Se && wi(Se), Ze = s_(Y); + if (pe && Ze && !gh(pe, Ze)) + return !1; + const dt = z.default && wi(z.default), ht = j2(Y); + if (dt && ht && !gh(dt, ht)) + return !1; + } + } + return !0; + } + function a7e(r) { + const a = !V && R < yl.ClassAndClassElementDecorators && D0( + /*useLegacyDecorators*/ + !1, + r + ), l = R < yl.PrivateNamesAndClassStaticBlocks || R < yl.ClassAndClassElementDecorators, f = !U; + if (a || l) + for (const d of r.members) { + if (a && fB( + /*useLegacyDecorators*/ + !1, + d, + r + )) + return Uc(Oy(r)) ?? r; + if (l) { + if (nc(d)) + return d; + if (Vs(d) && (Fu(d) || f && VN(d))) + return d; + } + } + } + function Blt(r) { + if (r.name) return; + const a = Wte(r); + if (!PB(a)) return; + const l = !V && R < yl.ClassAndClassElementDecorators; + let f; + l && D0( + /*useLegacyDecorators*/ + !1, + r + ) ? f = Uc(Oy(r)) ?? r : f = a7e(r), f && (hl( + f, + 4194304 + /* SetFunctionName */ + ), (Xc(a) || ss(a) || ma(a)) && fa(a.name) && hl( + f, + 8388608 + /* PropKey */ + )); + } + function Jlt(r) { + return o7e(r), rC(r), Blt(r), en(dn(r)); + } + function zlt(r) { + lr(r.members, la), V1(r); + } + function Wlt(r) { + const a = Pn(r.modifiers, ll); + V && a && at(r.members, (l) => Kc(l) && Fu(l)) && hr(a, p.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator), !r.name && !$n( + r, + 2048 + /* Default */ + ) && Jl(r, p.A_class_declaration_without_the_default_modifier_must_have_a_name), o7e(r), lr(r.members, la), V1(r); + } + function o7e(r) { + k_t(r), YM(r), aP(r, r.name), nR(My(r)), mI(r); + const a = dn(r), l = ko(a), f = of(l), d = en(a); + i7e(a), cX(a), ect(r), !!(r.flags & 33554432) || tct(r); + const x = sm(r); + if (x) { + lr(x.typeArguments, la), R < yl.Classes && hl( + x.parent, + 1 + /* Extends */ + ); + const z = Mb(r); + z && z !== x && Gi(z.expression); + const Y = wo(l); + Y.length && n(() => { + const Se = Y[0], pe = oi(l), Ze = Uu(pe); + if (Vlt(Ze, x), la(x.expression), at(x.typeArguments)) { + lr(x.typeArguments, la); + for (const ht of On(Ze, x.typeArguments, x)) + if (!AIe(x, ht.typeParameters)) + break; + } + const dt = of(Se, l.thisType); + if (gu( + f, + dt, + /*errorNode*/ + void 0 + ) ? gu(d, fNe(Ze), r.name || r, p.Class_static_side_0_incorrectly_extends_base_class_static_side_1) : u7e(r, f, dt, p.Class_0_incorrectly_extends_base_class_1), pe.flags & 8650752 && (rb(d) ? Ps( + pe, + 1 + /* Construct */ + ).some( + (or) => or.flags & 4 + /* Abstract */ + ) && !$n( + r, + 64 + /* Abstract */ + ) && je(r.name || r, p.A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract) : je(r.name || r, p.A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any)), !(Ze.symbol && Ze.symbol.flags & 32) && !(pe.flags & 8650752)) { + const ht = yi(Ze, x.typeArguments, x); + lr(ht, (or) => !Um(or.declaration) && !gh(Ba(or), Se)) && je(x.expression, p.Base_constructors_must_all_have_the_same_return_type); + } + Glt(l, Se); + }); + } + Ult(r, l, f, d); + const I = MC(r); + if (I) + for (const z of I) + (!_o(z.expression) || vu(z.expression)) && je(z.expression, p.A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments), ame(z), n(M(z)); + n(() => { + mX(l, a), mX( + d, + a, + /*isStaticIndex*/ + !0 + ), ime(r), Qlt(r); + }); + function M(z) { + return () => { + const Y = md(wi(z)); + if (!H(Y)) + if (jm(Y)) { + const Se = Y.symbol && Y.symbol.flags & 32 ? p.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass : p.Class_0_incorrectly_implements_interface_1, pe = of(Y, l.thisType); + gu( + f, + pe, + /*errorNode*/ + void 0 + ) || u7e(r, f, pe, Se); + } else + je(z, p.A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members); + }; + } + } + function Ult(r, a, l, f) { + const y = sm(r) && wo(a), x = y?.length ? of(ya(y), a.thisType) : void 0, I = oi(a); + for (const M of r.members) + HB(M) || (Go(M) && lr(M.parameters, (z) => { + H_(z, M) && c7e( + r, + f, + I, + x, + a, + l, + z, + /*memberIsParameterProperty*/ + !0 + ); + }), c7e( + r, + f, + I, + x, + a, + l, + M, + /*memberIsParameterProperty*/ + !1 + )); + } + function c7e(r, a, l, f, d, y, x, I, M = !0) { + const z = x.name && Cp(x.name) || Cp(x); + return z ? l7e( + r, + a, + l, + f, + d, + y, + m5(x), + Wb(x), + Vs(x), + I, + z, + M ? x : void 0 + ) : 0; + } + function l7e(r, a, l, f, d, y, x, I, M, z, Y, Se) { + const pe = an(r), Ze = !!(r.flags & 33554432); + if (f && (x || F.noImplicitOverride)) { + const dt = M ? a : y, ht = M ? l : f, or = Ys(dt, Y.escapedName), nr = Ys(ht, Y.escapedName), Kr = $r(f); + if (or && !nr && x) { + if (Se) { + const Vr = y8e(_c(Y), ht); + Vr ? je( + Se, + pe ? p.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1 : p.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1, + Kr, + Ui(Vr) + ) : je( + Se, + pe ? p.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0 : p.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0, + Kr + ); + } + return 2; + } else if (or && nr?.declarations && F.noImplicitOverride && !Ze) { + const Vr = at(nr.declarations, Wb); + if (x) + return 0; + if (Vr) { + if (I && Vr) + return Se && je(Se, p.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0, Kr), 1; + } else { + if (Se) { + const cr = z ? pe ? p.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0 : p.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0 : pe ? p.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0 : p.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0; + je(Se, cr, Kr); + } + return 1; + } + } + } else if (x) { + if (Se) { + const dt = $r(d); + je( + Se, + pe ? p.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class : p.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class, + dt + ); + } + return 2; + } + return 0; + } + function u7e(r, a, l, f) { + let d = !1; + for (const y of r.members) { + if (Vs(y)) + continue; + const x = y.name && Cp(y.name) || Cp(y); + if (x) { + const I = Ys(a, x.escapedName), M = Ys(l, x.escapedName); + if (I && M) { + const z = () => fs( + /*details*/ + void 0, + p.Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2, + Ui(x), + $r(a), + $r(l) + ); + gu( + en(I), + en(M), + y.name || y, + /*headMessage*/ + void 0, + z + ) || (d = !0); + } + } + } + d || gu(a, l, r.name || r, f); + } + function Vlt(r, a) { + const l = Ps( + r, + 1 + /* Construct */ + ); + if (l.length) { + const f = l[0].declaration; + if (f && Q_( + f, + 2 + /* Private */ + )) { + const d = Fh(r.symbol); + Cme(a, d) || je(a, p.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private, oy(r.symbol)); + } + } + } + function qlt(r, a, l) { + if (!a.name) + return 0; + const f = dn(r), d = ko(f), y = of(d), x = en(f), M = sm(r) && wo(d), z = M?.length ? of(ya(M), d.thisType) : void 0, Y = oi(d), Se = a.parent ? m5(a) : $n( + a, + 16 + /* Override */ + ); + return l7e( + r, + x, + Y, + z, + d, + y, + Se, + Wb(a), + Vs(a), + /*memberIsParameterProperty*/ + !1, + l + ); + } + function BE(r) { + return rc(r) & 1 ? r.links.target : r; + } + function Hlt(r) { + return kn( + r.declarations, + (a) => a.kind === 263 || a.kind === 264 + /* InterfaceDeclaration */ + ); + } + function Glt(r, a) { + var l, f, d, y, x; + const I = qa(a), M = /* @__PURE__ */ new Map(); + e: for (const z of I) { + const Y = BE(z); + if (Y.flags & 4194304) + continue; + const Se = R2(r, Y.escapedName); + if (!Se) + continue; + const pe = BE(Se), Ze = sp(Y); + if (E.assert(!!pe, "derived should point to something, even if it is the base class' declaration."), pe === Y) { + const dt = Fh(r.symbol); + if (Ze & 64 && (!dt || !$n( + dt, + 64 + /* Abstract */ + ))) { + for (const Vr of wo(r)) { + if (Vr === a) continue; + const cr = R2(Vr, Y.escapedName), Yt = cr && BE(cr); + if (Yt && Yt !== Y) + continue e; + } + const ht = $r(a), or = $r(r), nr = Ui(z), Kr = Pr((l = M.get(dt)) == null ? void 0 : l.missedProperties, nr); + M.set(dt, { baseTypeName: ht, typeName: or, missedProperties: Kr }); + } + } else { + const dt = sp(pe); + if (Ze & 2 || dt & 2) + continue; + let ht; + const or = Y.flags & 98308, nr = pe.flags & 98308; + if (or && nr) { + if ((rc(Y) & 6 ? (f = Y.declarations) != null && f.some((cr) => _7e(cr, Ze)) : (d = Y.declarations) != null && d.every((cr) => _7e(cr, Ze))) || rc(Y) & 262144 || pe.valueDeclaration && fn(pe.valueDeclaration)) + continue; + const Kr = or !== 4 && nr === 4; + if (Kr || or === 4 && nr !== 4) { + const cr = Kr ? p._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property : p._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor; + je(is(pe.valueDeclaration) || pe.valueDeclaration, cr, Ui(Y), $r(a), $r(r)); + } else if ($) { + const cr = (y = pe.declarations) == null ? void 0 : y.find((Yt) => Yt.kind === 172 && !Yt.initializer); + if (cr && !(pe.flags & 33554432) && !(Ze & 64) && !(dt & 64) && !((x = pe.declarations) != null && x.some((Yt) => !!(Yt.flags & 33554432)))) { + const Yt = sN(Fh(r.symbol)), pn = cr.name; + if (cr.exclamationToken || !Yt || !Me(pn) || !Z || !p7e(pn, r, Yt)) { + const zn = p.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration; + je(is(pe.valueDeclaration) || pe.valueDeclaration, zn, Ui(Y), $r(a)); + } + } + } + continue; + } else if (yde(Y)) { + if (yde(pe) || pe.flags & 4) + continue; + E.assert(!!(pe.flags & 98304)), ht = p.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor; + } else Y.flags & 98304 ? ht = p.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function : ht = p.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function; + je(is(pe.valueDeclaration) || pe.valueDeclaration, ht, $r(a), Ui(Y), $r(r)); + } + } + for (const [z, Y] of M) + if (Ir(Y.missedProperties) === 1) + Gc(z) ? je(z, p.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, ya(Y.missedProperties), Y.baseTypeName) : je(z, p.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2, Y.typeName, ya(Y.missedProperties), Y.baseTypeName); + else if (Ir(Y.missedProperties) > 5) { + const Se = gr(Y.missedProperties.slice(0, 4), (Ze) => `'${Ze}'`).join(", "), pe = Ir(Y.missedProperties) - 4; + Gc(z) ? je(z, p.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more, Y.baseTypeName, Se, pe) : je(z, p.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more, Y.typeName, Y.baseTypeName, Se, pe); + } else { + const Se = gr(Y.missedProperties, (pe) => `'${pe}'`).join(", "); + Gc(z) ? je(z, p.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1, Y.baseTypeName, Se) : je(z, p.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2, Y.typeName, Y.baseTypeName, Se); + } + } + function _7e(r, a) { + return a & 64 && (!ss(r) || !r.initializer) || Yl(r.parent); + } + function $lt(r, a, l) { + if (!Ir(a)) + return l; + const f = /* @__PURE__ */ new Map(); + lr(l, (d) => { + f.set(d.escapedName, d); + }); + for (const d of a) { + const y = qa(of(d, r.thisType)); + for (const x of y) { + const I = f.get(x.escapedName); + I && x.parent === I.parent && f.delete(x.escapedName); + } + } + return Ki(f.values()); + } + function Xlt(r, a) { + const l = wo(r); + if (l.length < 2) + return !0; + const f = /* @__PURE__ */ new Map(); + lr(_fe(r).declaredProperties, (y) => { + f.set(y.escapedName, { prop: y, containingType: r }); + }); + let d = !0; + for (const y of l) { + const x = qa(of(y, r.thisType)); + for (const I of x) { + const M = f.get(I.escapedName); + if (!M) + f.set(I.escapedName, { prop: I, containingType: y }); + else if (M.containingType !== r && !Qrt(M.prop, I)) { + d = !1; + const Y = $r(M.containingType), Se = $r(y); + let pe = fs( + /*details*/ + void 0, + p.Named_property_0_of_types_1_and_2_are_not_identical, + Ui(I), + Y, + Se + ); + pe = fs(pe, p.Interface_0_cannot_simultaneously_extend_types_1_and_2, $r(r), Y, Se), Pa.add(Jg(Cr(a), a, pe)); + } + } + } + return d; + } + function Qlt(r) { + if (!Z || !te || r.flags & 33554432) + return; + const a = sN(r); + for (const l of r.members) + if (!(Mu(l) & 128) && !Vs(l) && f7e(l)) { + const f = l.name; + if (Me(f) || Ni(f) || fa(f)) { + const d = en(dn(l)); + d.flags & 3 || PE(d) || (!a || !p7e(f, d, a)) && je(l.name, p.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor, co(f)); + } + } + } + function f7e(r) { + return r.kind === 172 && !Wb(r) && !r.exclamationToken && !r.initializer; + } + function Ylt(r, a, l, f, d) { + for (const y of l) + if (y.pos >= f && y.pos <= d) { + const x = N.createPropertyAccessExpression(N.createThis(), r); + Fa(x.expression, x), Fa(x, y), x.flowNode = y.returnFlowNode; + const I = m0(x, a, gy(a)); + if (!PE(I)) + return !0; + } + return !1; + } + function p7e(r, a, l) { + const f = fa(r) ? N.createElementAccessExpression(N.createThis(), r.expression) : N.createPropertyAccessExpression(N.createThis(), r); + Fa(f.expression, f), Fa(f, l), f.flowNode = l.returnFlowNode; + const d = m0(f, a, gy(a)); + return !PE(d); + } + function Zlt(r) { + yh(r) || A_t(r), wX(r.parent) || hr(r, p._0_declarations_can_only_be_declared_inside_a_block, "interface"), nR(r.typeParameters), n(() => { + oP(r.name, p.Interface_name_cannot_be_0), mI(r); + const a = dn(r); + i7e(a); + const l = Lo( + a, + 264 + /* InterfaceDeclaration */ + ); + if (r === l) { + const f = ko(a), d = of(f); + if (Xlt(f, r.name)) { + for (const y of wo(f)) + gu(d, of(y, f.thisType), r.name, p.Interface_0_incorrectly_extends_interface_1); + mX(f, a); + } + } + DIe(r); + }), lr(B4(r), (a) => { + (!_o(a.expression) || vu(a.expression)) && je(a.expression, p.An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments), ame(a); + }), lr(r.members, la), n(() => { + ime(r), V1(r); + }); + } + function Klt(r) { + if (yh(r), oP(r.name, p.Type_alias_name_cannot_be_0), wX(r.parent) || hr(r, p._0_declarations_can_only_be_declared_inside_a_block, "type"), mI(r), nR(r.typeParameters), r.type.kind === 141) { + const a = Ir(r.typeParameters); + (a === 0 ? r.name.escapedText === "BuiltinIteratorReturn" : a === 1 && pW.has(r.name.escapedText)) || je(r.type, p.The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types); + } else + la(r.type), V1(r); + } + function d7e(r) { + const a = yn(r); + if (!(a.flags & 1024)) { + a.flags |= 1024; + let l = 0, f; + for (const d of r.members) { + const y = eut(d, l, f); + yn(d).enumMemberValue = y, l = typeof y.value == "number" ? y.value + 1 : void 0, f = d; + } + } + } + function eut(r, a, l) { + if (KP(r.name)) + je(r.name, p.Computed_property_names_are_not_allowed_in_enums); + else { + const f = _x(r.name); + Xg(f) && !lD(f) && je(r.name, p.An_enum_member_cannot_have_a_numeric_name); + } + if (r.initializer) + return tut(r); + if (r.parent.flags & 33554432 && !ev(r.parent)) + return cl( + /*value*/ + void 0 + ); + if (a === void 0) + return je(r.name, p.Enum_member_must_have_initializer), cl( + /*value*/ + void 0 + ); + if (Mp(F) && l?.initializer) { + const f = UT(l); + typeof f.value == "number" && !f.resolvedOtherFiles || je( + r.name, + p.Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is_enabled + ); + } + return cl(a); + } + function tut(r) { + const a = ev(r.parent), l = r.initializer, f = it(l, r); + return f.value !== void 0 ? a && typeof f.value == "number" && !isFinite(f.value) ? je( + l, + isNaN(f.value) ? p.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN : p.const_enum_member_initializer_was_evaluated_to_a_non_finite_value + ) : Mp(F) && typeof f.value == "string" && !f.isSyntacticallyString && je( + l, + p._0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is_enabled, + `${An(r.parent.name)}.${_x(r.name)}` + ) : a ? je(l, p.const_enum_member_initializers_must_be_constant_expressions) : r.parent.flags & 33554432 ? je(l, p.In_ambient_enum_declarations_member_initializer_must_be_constant_expression) : gu(Gi(l), st, l, p.Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values), f; + } + function m7e(r, a) { + const l = oc( + r, + 111551, + /*ignoreErrors*/ + !0 + ); + if (!l) return cl( + /*value*/ + void 0 + ); + if (r.kind === 80) { + const f = r; + if (lD(f.escapedText) && l === DE( + f.escapedText, + 111551, + /*diagnostic*/ + void 0 + )) + return cl( + +f.escapedText, + /*isSyntacticallyString*/ + !1 + ); + } + if (l.flags & 8) + return a ? g7e(r, l, a) : UT(l.valueDeclaration); + if (Yk(l)) { + const f = l.valueDeclaration; + if (f && Kn(f) && !f.type && f.initializer && (!a || f !== a && ny(f, a))) { + const d = it(f.initializer, f); + return a && Cr(a) !== Cr(f) ? cl( + d.value, + /*isSyntacticallyString*/ + !1, + /*resolvedOtherFiles*/ + !0, + /*hasExternalReferences*/ + !0 + ) : cl( + d.value, + d.isSyntacticallyString, + d.resolvedOtherFiles, + /*hasExternalReferences*/ + !0 + ); + } + } + return cl( + /*value*/ + void 0 + ); + } + function rut(r, a) { + const l = r.expression; + if (_o(l) && Na(r.argumentExpression)) { + const f = oc( + l, + 111551, + /*ignoreErrors*/ + !0 + ); + if (f && f.flags & 384) { + const d = Zo(r.argumentExpression.text), y = f.exports.get(d); + if (y) + return E.assert(Cr(y.valueDeclaration) === Cr(f.valueDeclaration)), a ? g7e(r, y, a) : UT(y.valueDeclaration); + } + } + return cl( + /*value*/ + void 0 + ); + } + function g7e(r, a, l) { + const f = a.valueDeclaration; + if (!f || f === l) + return je(r, p.Property_0_is_used_before_being_assigned, Ui(a)), cl( + /*value*/ + void 0 + ); + if (!ny(f, l)) + return je(r, p.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums), cl( + /*value*/ + 0 + ); + const d = UT(f); + return l.parent !== f.parent ? cl( + d.value, + d.isSyntacticallyString, + d.resolvedOtherFiles, + /*hasExternalReferences*/ + !0 + ) : d; + } + function nut(r) { + n(() => iut(r)); + } + function iut(r) { + yh(r), aP(r, r.name), mI(r), r.members.forEach(sut), d7e(r); + const a = dn(r), l = Lo(a, r.kind); + if (r === l) { + if (a.declarations && a.declarations.length > 1) { + const d = ev(r); + lr(a.declarations, (y) => { + Zb(y) && ev(y) !== d && je(is(y), p.Enum_declarations_must_all_be_const_or_non_const); + }); + } + let f = !1; + lr(a.declarations, (d) => { + if (d.kind !== 266) + return !1; + const y = d; + if (!y.members.length) + return !1; + const x = y.members[0]; + x.initializer || (f ? je(x.name, p.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element) : f = !0); + }); + } + } + function sut(r) { + Ni(r.name) && je(r, p.An_enum_member_cannot_be_named_with_a_private_identifier), r.initializer && Gi(r.initializer); + } + function aut(r) { + const a = r.declarations; + if (a) { + for (const l of a) + if ((l.kind === 263 || l.kind === 262 && Ap(l.body)) && !(l.flags & 33554432)) + return l; + } + } + function out(r, a) { + const l = Sd(r), f = Sd(a); + return E0(l) ? E0(f) : E0(f) ? !1 : l === f; + } + function cut(r) { + r.body && (la(r.body), eg(r) || V1(r)), n(a); + function a() { + var l, f; + const d = eg(r), y = r.flags & 33554432; + d && !y && je(r.name, p.Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context); + const x = Ou(r), I = x ? p.An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file : p.A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module; + if (iR(r, I)) + return; + if (yh(r) || !y && r.name.kind === 11 && hr(r.name, p.Only_ambient_modules_can_use_quoted_names), Me(r.name) && (aP(r, r.name), !(r.flags & 2080))) { + const z = Cr(r), Y = FZ(r), Se = rm(z, Y); + b1.add( + ol(z, Se.start, Se.length, p.A_namespace_declaration_should_not_be_declared_using_the_module_keyword_Please_use_the_namespace_keyword_instead) + ); + } + mI(r); + const M = dn(r); + if (M.flags & 512 && !y && dW(r, Yy(F))) { + if (Mp(F) && !Cr(r).externalModuleIndicator && je(r.name, p.Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement, De), ((l = M.declarations) == null ? void 0 : l.length) > 1) { + const z = aut(M); + z && (Cr(r) !== Cr(z) ? je(r.name, p.A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged) : r.pos < z.pos && je(r.name, p.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged)); + const Y = Lo( + M, + 263 + /* ClassDeclaration */ + ); + Y && out(r, Y) && (yn(r).flags |= 2048); + } + if (F.verbatimModuleSyntax && r.parent.kind === 307 && e.getEmitModuleFormatOfFile(r.parent) === 1) { + const z = (f = r.modifiers) == null ? void 0 : f.find( + (Y) => Y.kind === 95 + /* ExportKeyword */ + ); + z && je(z, p.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); + } + } + if (x) + if (Pb(r)) { + if ((d || dn(r).flags & 33554432) && r.body) + for (const Y of r.body.statements) + bme(Y, d); + } else E0(r.parent) ? d ? je(r.name, p.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations) : vl(rp(r.name)) && je(r.name, p.Ambient_module_declaration_cannot_specify_relative_module_name) : d ? je(r.name, p.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations) : je(r.name, p.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces); + } + } + function bme(r, a) { + switch (r.kind) { + case 243: + for (const f of r.declarationList.declarations) + bme(f, a); + break; + case 277: + case 278: + Jl(r, p.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); + break; + case 271: + if (gS(r)) break; + // falls through + case 272: + Jl(r, p.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); + break; + case 208: + case 260: + const l = r.name; + if (Ds(l)) { + for (const f of l.elements) + bme(f, a); + break; + } + // falls through + case 263: + case 266: + case 262: + case 264: + case 267: + case 265: + if (a) + return; + break; + } + } + function lut(r) { + switch (r.kind) { + case 80: + return r; + case 166: + do + r = r.left; + while (r.kind !== 80); + return r; + case 211: + do { + if (Wg(r.expression) && !Ni(r.name)) + return r.name; + r = r.expression; + } while (r.kind !== 80); + return r; + } + } + function gX(r) { + const a = dx(r); + if (!a || tc(a)) + return !1; + if (!ea(a)) + return je(a, p.String_literal_expected), !1; + const l = r.parent.kind === 268 && Ou(r.parent.parent); + if (r.parent.kind !== 307 && !l) + return je( + a, + r.kind === 278 ? p.Export_declarations_are_not_permitted_in_a_namespace : p.Import_declarations_in_a_namespace_cannot_reference_a_module + ), !1; + if (l && vl(a.text) && !vT(r)) + return je(r, p.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name), !1; + if (!_l(r) && r.attributes) { + const f = r.attributes.token === 118 ? p.Import_attribute_values_must_be_string_literal_expressions : p.Import_assertion_values_must_be_string_literal_expressions; + let d = !1; + for (const y of r.attributes.elements) + ea(y.value) || (d = !0, je(y.value, f)); + return !d; + } + return !0; + } + function hX(r, a = !0) { + r === void 0 || r.kind !== 11 || (a ? (W === 5 || W === 6) && hr(r, p.String_literal_import_and_export_names_are_not_supported_when_the_module_flag_is_set_to_es2015_or_es2020) : hr(r, p.Identifier_expected)); + } + function yX(r) { + var a, l, f, d; + let y = dn(r); + const x = Pl(y); + if (x !== Ve) { + if (y = Oa(y.exportSymbol || y), an(r) && !(x.flags & 111551) && !x0(r)) { + const z = jy(r) ? r.propertyName || r.name : Hl(r) ? r.name : r; + if (E.assert( + r.kind !== 280 + /* NamespaceExport */ + ), r.kind === 281) { + const Y = je(z, p.Types_cannot_appear_in_export_declarations_in_JavaScript_files), Se = (l = (a = Cr(r).symbol) == null ? void 0 : a.exports) == null ? void 0 : l.get(wb(r.propertyName || r.name)); + if (Se === x) { + const pe = (f = Se.declarations) == null ? void 0 : f.find(SC); + pe && Bs( + Y, + tn( + pe, + p._0_is_automatically_exported_here, + Pi(Se.escapedName) + ) + ); + } + } else { + E.assert( + r.kind !== 260 + /* VariableDeclaration */ + ); + const Y = ur(r, U_(zo, _l)), Se = (Y && ((d = px(Y)) == null ? void 0 : d.text)) ?? "...", pe = Pi(Me(z) ? z.escapedText : y.escapedName); + je( + z, + p._0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation, + pe, + `import("${Se}").${pe}` + ); + } + return; + } + const I = pu(x), M = (y.flags & 1160127 ? 111551 : 0) | (y.flags & 788968 ? 788968 : 0) | (y.flags & 1920 ? 1920 : 0); + if (I & M) { + const z = r.kind === 281 ? p.Export_declaration_conflicts_with_exported_declaration_of_0 : p.Import_declaration_conflicts_with_local_declaration_of_0; + je(r, z, Ui(y)); + } else r.kind !== 281 && F.isolatedModules && !ur(r, x0) && y.flags & 1160127 && je( + r, + p.Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled, + Ui(y), + De + ); + if (Mp(F) && !x0(r) && !(r.flags & 33554432)) { + const z = Jd(y), Y = !(I & 111551); + if (Y || z) + switch (r.kind) { + case 273: + case 276: + case 271: { + if (F.verbatimModuleSyntax) { + E.assertIsDefined(r.name, "An ImportClause with a symbol should have a name"); + const Se = F.verbatimModuleSyntax && gS(r) ? p.An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled : Y ? p._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled : p._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled, pe = qy(r.kind === 276 && r.propertyName || r.name); + k1( + je(r, Se, pe), + Y ? void 0 : z, + pe + ); + } + Y && r.kind === 271 && Q_( + r, + 32 + /* Export */ + ) && je(r, p.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled, De); + break; + } + case 281: + if (F.verbatimModuleSyntax || Cr(z) !== Cr(r)) { + const Se = qy(r.propertyName || r.name), pe = Y ? je(r, p.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type, De) : je(r, p._0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled, Se, De); + k1(pe, Y ? void 0 : z, Se); + break; + } + } + if (F.verbatimModuleSyntax && r.kind !== 271 && !an(r) && e.getEmitModuleFormatOfFile(Cr(r)) === 1 ? je(r, p.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled) : W === 200 && r.kind !== 271 && r.kind !== 260 && e.getEmitModuleFormatOfFile(Cr(r)) === 1 && je(r, p.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve), F.verbatimModuleSyntax && !x0(r) && !(r.flags & 33554432) && I & 128) { + const Se = x.valueDeclaration, pe = e.getRedirectReferenceForResolutionFromSourceOfProject(Cr(Se).resolvedPath); + Se.flags & 33554432 && (!pe || !Yy(pe.commandLine.options)) && je(r, p.Cannot_access_ambient_const_enums_when_0_is_enabled, De); + } + } + if (ju(r)) { + const z = Sme(y, r); + Yh(z) && z.declarations && Zh(r, z.declarations, z.escapedName); + } + } + } + function Sme(r, a) { + if (!(r.flags & 2097152) || Yh(r) || !ru(r)) + return r; + const l = Pl(r); + if (l === Ve) return l; + for (; r.flags & 2097152; ) { + const f = J$(r); + if (f) { + if (f === l) break; + if (f.declarations && Ir(f.declarations)) + if (Yh(f)) { + Zh(a, f.declarations, f.escapedName); + break; + } else { + if (r === l) break; + r = f; + } + } else + break; + } + return l; + } + function vX(r) { + aP(r, r.name), yX(r), r.kind === 276 && (hX(r.propertyName), Km(r.propertyName || r.name) && Hg(F) && e.getEmitModuleFormatOfFile(Cr(r)) < 4 && hl( + r, + 131072 + /* ImportDefault */ + )); + } + function Tme(r) { + var a; + const l = r.attributes; + if (l) { + const f = jfe( + /*reportErrors*/ + !0 + ); + f !== hs && gu(es(l), hM( + f, + 32768 + /* Undefined */ + ), l); + const d = YW(r), y = k6(l, d ? hr : void 0), x = r.attributes.token === 118; + if (d && y) + return; + if ((W === 199 && r.moduleSpecifier && gg(r.moduleSpecifier)) !== 99 && W !== 99 && W !== 200) { + const z = x ? W === 199 ? p.Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls : p.Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve : W === 199 ? p.Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls : p.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve; + return hr(l, z); + } + if (ym(r) || (zo(r) ? (a = r.importClause) == null ? void 0 : a.isTypeOnly : r.isTypeOnly)) + return hr(l, x ? p.Import_attributes_cannot_be_used_with_type_only_imports_or_exports : p.Import_assertions_cannot_be_used_with_type_only_imports_or_exports); + if (y) + return hr(l, p.resolution_mode_can_only_be_set_for_type_only_imports); + } + } + function uut(r) { + return Vu(uc(r.value)); + } + function _ut(r) { + if (!iR(r, an(r) ? p.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module : p.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)) { + if (!yh(r) && r.modifiers && Jl(r, p.An_import_declaration_cannot_have_modifiers), gX(r)) { + let a; + const l = r.importClause; + l && !tft(l) ? (l.name && vX(l), l.namedBindings && (l.namedBindings.kind === 274 ? (vX(l.namedBindings), e.getEmitModuleFormatOfFile(Cr(r)) < 4 && Hg(F) && hl( + r, + 65536 + /* ImportStar */ + )) : (a = Pu(r, r.moduleSpecifier), a && lr(l.namedBindings.elements, vX))), t0(r.moduleSpecifier, a) && !fut(r) && je(r.moduleSpecifier, p.Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_module_is_set_to_0, uC[W])) : Ce && !l && Pu(r, r.moduleSpecifier); + } + Tme(r); + } + } + function fut(r) { + return !!r.attributes && r.attributes.elements.some((a) => { + var l; + return rp(a.name) === "type" && ((l = jn(a.value, Na)) == null ? void 0 : l.text) === "json"; + }); + } + function put(r) { + if (!iR(r, an(r) ? p.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module : p.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module) && (yh(r), gS(r) || gX(r))) + if (vX(r), Zk( + r, + 6 + /* ExportImportEquals */ + ), r.moduleReference.kind !== 283) { + const a = Pl(dn(r)); + if (a !== Ve) { + const l = pu(a); + if (l & 111551) { + const f = w_(r.moduleReference); + oc( + f, + 112575 + /* Namespace */ + ).flags & 1920 || je(f, p.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, co(f)); + } + l & 788968 && oP(r.name, p.Import_name_cannot_be_0); + } + r.isTypeOnly && hr(r, p.An_import_alias_cannot_use_import_type); + } else + 5 <= W && W <= 99 && !r.isTypeOnly && !(r.flags & 33554432) && hr(r, p.Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead); + } + function dut(r) { + if (!iR(r, an(r) ? p.An_export_declaration_can_only_be_used_at_the_top_level_of_a_module : p.An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)) { + if (!yh(r) && RK(r) && Jl(r, p.An_export_declaration_cannot_have_modifiers), mut(r), !r.moduleSpecifier || gX(r)) + if (r.exportClause && !ig(r.exportClause)) { + lr(r.exportClause.elements, gut); + const a = r.parent.kind === 268 && Ou(r.parent.parent), l = !a && r.parent.kind === 268 && !r.moduleSpecifier && r.flags & 33554432; + r.parent.kind !== 307 && !a && !l && je(r, p.Export_declarations_are_not_permitted_in_a_namespace); + } else { + const a = Pu(r, r.moduleSpecifier); + a && w1(a) ? je(r.moduleSpecifier, p.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk, Ui(a)) : r.exportClause && (yX(r.exportClause), hX(r.exportClause.name)), e.getEmitModuleFormatOfFile(Cr(r)) < 4 && (r.exportClause ? Hg(F) && hl( + r, + 65536 + /* ImportStar */ + ) : hl( + r, + 32768 + /* ExportStar */ + )); + } + Tme(r); + } + } + function mut(r) { + var a; + return r.isTypeOnly && ((a = r.exportClause) == null ? void 0 : a.kind) === 279 ? Z7e(r.exportClause) : !1; + } + function iR(r, a) { + const l = r.parent.kind === 307 || r.parent.kind === 268 || r.parent.kind === 267; + return l || Jl(r, a), !l; + } + function gut(r) { + yX(r); + const a = r.parent.parent.moduleSpecifier !== void 0; + if (hX(r.propertyName, a), hX(r.name), N_(F) && mE( + r.propertyName || r.name, + /*setVisibility*/ + !0 + ), a) + Hg(F) && e.getEmitModuleFormatOfFile(Cr(r)) < 4 && Km(r.propertyName || r.name) && hl( + r, + 131072 + /* ImportDefault */ + ); + else { + const l = r.propertyName || r.name; + if (l.kind === 11) + return; + const f = Dt( + l, + l.escapedText, + 2998271, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !0 + ); + f && (f === xe || f === he || f.declarations && E0(ST(f.declarations[0]))) ? je(l, p.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, An(l)) : Zk( + r, + 7 + /* ExportSpecifier */ + ); + } + } + function hut(r) { + const a = r.isExportEquals ? p.An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration : p.A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration; + if (iR(r, a)) + return; + const l = r.parent.kind === 307 ? r.parent : r.parent.parent; + if (l.kind === 267 && !Ou(l)) { + r.isExportEquals ? je(r, p.An_export_assignment_cannot_be_used_in_a_namespace) : je(r, p.A_default_export_can_only_be_used_in_an_ECMAScript_style_module); + return; + } + !yh(r) && qB(r) && Jl(r, p.An_export_assignment_cannot_have_modifiers); + const f = qc(r); + f && gu(uc(r.expression), wi(f), r.expression); + const d = !r.isExportEquals && !(r.flags & 33554432) && F.verbatimModuleSyntax && e.getEmitModuleFormatOfFile(Cr(r)) === 1; + if (r.expression.kind === 80) { + const y = r.expression, x = gl(oc( + y, + -1, + /*ignoreErrors*/ + !0, + /*dontResolveAlias*/ + !0, + r + )); + if (x) { + Zk( + r, + 3 + /* ExportAssignment */ + ); + const I = Jd( + x, + 111551 + /* Value */ + ); + if (pu(x) & 111551 ? (uc(y), !d && !(r.flags & 33554432) && F.verbatimModuleSyntax && I && je( + y, + r.isExportEquals ? p.An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration : p.An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration, + An(y) + )) : !d && !(r.flags & 33554432) && F.verbatimModuleSyntax && je( + y, + r.isExportEquals ? p.An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type : p.An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type, + An(y) + ), !d && !(r.flags & 33554432) && Mp(F) && !(x.flags & 111551)) { + const M = pu( + x, + /*excludeTypeOnlyMeanings*/ + !1, + /*excludeLocalMeanings*/ + !0 + ); + x.flags & 2097152 && M & 788968 && !(M & 111551) && (!I || Cr(I) !== Cr(r)) ? je( + y, + r.isExportEquals ? p._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported : p._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default, + An(y), + De + ) : I && Cr(I) !== Cr(r) && k1( + je( + y, + r.isExportEquals ? p._0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported : p._0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default, + An(y), + De + ), + I, + An(y) + ); + } + } else + uc(y); + N_(F) && mE( + y, + /*setVisibility*/ + !0 + ); + } else + uc(r.expression); + d && je(r, p.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled), h7e(l), r.flags & 33554432 && !_o(r.expression) && hr(r.expression, p.The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context), r.isExportEquals && (W >= 5 && W !== 200 && (r.flags & 33554432 && e.getImpliedNodeFormatForEmit(Cr(r)) === 99 || !(r.flags & 33554432) && e.getImpliedNodeFormatForEmit(Cr(r)) !== 1) ? hr(r, p.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead) : W === 4 && !(r.flags & 33554432) && hr(r, p.Export_assignment_is_not_supported_when_module_flag_is_system)); + } + function yut(r) { + return al(r.exports, (a, l) => l !== "export="); + } + function h7e(r) { + const a = dn(r), l = Ci(a); + if (!l.exportsChecked) { + const f = a.exports.get("export="); + if (f && yut(a)) { + const y = ru(f) || f.valueDeclaration; + y && !vT(y) && !an(y) && je(y, p.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); + } + const d = Uf(a); + d && d.forEach(({ declarations: y, flags: x }, I) => { + if (I === "__export" || x & 1920) + return; + const M = b0(y, RI(YMe, jI(Yl))); + if (!(x & 524288 && M <= 2) && M > 1 && !bX(y)) + for (const z of y) + v1e(z) && Pa.add(tn(z, p.Cannot_redeclare_exported_variable_0, Pi(I))); + }), l.exportsChecked = !0; + } + } + function bX(r) { + return r && r.length > 1 && r.every((a) => an(a) && vo(a) && (hS(a.expression) || Wg(a.expression))); + } + function la(r) { + if (r) { + const a = C; + C = r, h = 0, vut(r), C = a; + } + } + function vut(r) { + if (iC(r) & 8388608) + return; + x3(r) && lr(r.jsDoc, ({ comment: l, tags: f }) => { + y7e(l), lr(f, (d) => { + y7e(d.comment), an(r) && la(d); + }); + }); + const a = r.kind; + if (i) + switch (a) { + case 267: + case 263: + case 264: + case 262: + i.throwIfCancellationRequested(); + } + switch (a >= 243 && a <= 259 && L4(r) && r.flowNode && !CM(r.flowNode) && dg(F.allowUnreachableCode === !1, r, p.Unreachable_code_detected), a) { + case 168: + return kIe(r); + case 169: + return CIe(r); + case 172: + return wIe(r); + case 171: + return rct(r); + case 185: + case 184: + case 179: + case 180: + case 181: + return pI(r); + case 174: + case 173: + return nct(r); + case 175: + return ict(r); + case 176: + return sct(r); + case 177: + case 178: + return NIe(r); + case 183: + return ame(r); + case 182: + return Zot(r); + case 186: + return _ct(r); + case 187: + return fct(r); + case 188: + return pct(r); + case 189: + return dct(r); + case 192: + case 193: + return mct(r); + case 196: + case 190: + case 191: + return la(r.type); + case 197: + return vct(r); + case 198: + return bct(r); + case 194: + return Sct(r); + case 195: + return Tct(r); + case 203: + return xct(r); + case 205: + return kct(r); + case 202: + return Cct(r); + case 328: + return qct(r); + case 329: + return Vct(r); + case 346: + case 338: + case 340: + return Oct(r); + case 345: + return Lct(r); + case 344: + return Mct(r); + case 324: + case 325: + case 326: + return jct(r); + case 341: + return Bct(r); + case 348: + return Jct(r); + case 317: + zct(r); + // falls through + case 315: + case 314: + case 312: + case 313: + case 322: + v7e(r), ms(r, la); + return; + case 318: + but(r); + return; + case 309: + return la(r.type); + case 333: + case 335: + case 334: + return Hct(r); + case 350: + return Rct(r); + case 343: + return Wct(r); + case 351: + return Uct(r); + case 199: + return gct(r); + case 200: + return hct(r); + case 262: + return Fct(r); + case 241: + case 268: + return _X(r); + case 243: + return ult(r); + case 244: + return _lt(r); + case 245: + return flt(r); + case 246: + return mlt(r); + case 247: + return glt(r); + case 248: + return hlt(r); + case 249: + return vlt(r); + case 250: + return ylt(r); + case 251: + case 252: + return wlt(r); + case 253: + return Plt(r); + case 254: + return Nlt(r); + case 255: + return Alt(r); + case 256: + return Ilt(r); + case 257: + return Flt(r); + case 258: + return Olt(r); + case 260: + return clt(r); + case 208: + return llt(r); + case 263: + return Wlt(r); + case 264: + return Zlt(r); + case 265: + return Klt(r); + case 266: + return nut(r); + case 267: + return cut(r); + case 272: + return _ut(r); + case 271: + return put(r); + case 278: + return dut(r); + case 277: + return hut(r); + case 242: + case 259: + h0(r); + return; + case 282: + return oct(r); + } + } + function y7e(r) { + os(r) && lr(r, (a) => { + ax(a) && la(a); + }); + } + function v7e(r) { + if (!an(r)) + if (bF(r) || s6(r)) { + const a = Xs( + bF(r) ? 54 : 58 + /* QuestionToken */ + ), l = r.postfix ? p._0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1 : p._0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1, f = r.type, d = wi(f); + hr( + r, + l, + a, + $r( + s6(r) && !(d === Zt || d === Pt) ? Qn(Pr([d, ft], r.postfix ? void 0 : lt)) : d + ) + ); + } else + hr(r, p.JSDoc_types_can_only_be_used_inside_documentation_comments); + } + function but(r) { + v7e(r), la(r.type); + const { parent: a } = r; + if (Ii(a) && a6(a.parent)) { + _a(a.parent.parameters) !== a && je(r, p.A_rest_parameter_must_be_last_in_a_parameter_list); + return; + } + hv(a) || je(r, p.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature); + const l = r.parent.parent; + if (!Af(l)) { + je(r, p.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature); + return; + } + const f = k3(l); + if (!f) + return; + const d = nv(l); + (!d || _a(d.parameters).symbol !== f) && je(r, p.A_rest_parameter_must_be_last_in_a_parameter_list); + } + function Sut(r) { + const a = wi(r.type), { parent: l } = r, f = r.parent.parent; + if (hv(r.parent) && Af(f)) { + const d = nv(f), y = rz(f.parent.parent); + if (d || y) { + const x = Co(y ? f.parent.parent.typeExpression.parameters : d.parameters), I = k3(f); + if (!x || I && x.symbol === I && Zm(x)) + return mu(a); + } + } + return Ii(l) && a6(l.parent) ? mu(a) : rl(a); + } + function rC(r) { + const a = Cr(r), l = yn(a); + l.flags & 1 ? E.assert(!l.deferredNodes, "A type-checked file should have no deferred nodes.") : (l.deferredNodes || (l.deferredNodes = /* @__PURE__ */ new Set()), l.deferredNodes.add(r)); + } + function b7e(r) { + const a = yn(r); + a.deferredNodes && a.deferredNodes.forEach(Tut), a.deferredNodes = void 0; + } + function Tut(r) { + var a, l; + (a = nn) == null || a.push(nn.Phase.Check, "checkDeferredNode", { kind: r.kind, pos: r.pos, end: r.end, path: r.tracingPath }); + const f = C; + switch (C = r, h = 0, r.kind) { + case 213: + case 214: + case 215: + case 170: + case 286: + JT(r); + break; + case 218: + case 219: + case 174: + case 173: + got(r); + break; + case 177: + case 178: + NIe(r); + break; + case 231: + zlt(r); + break; + case 168: + Yot(r); + break; + case 285: + xst(r); + break; + case 284: + Cst(r); + break; + case 216: + case 234: + case 217: + Jat(r); + break; + case 222: + Gi(r.expression); + break; + case 226: + y5(r) && JT(r); + break; + } + C = f, (l = nn) == null || l.pop(); + } + function xut(r, a) { + var l, f; + (l = nn) == null || l.push( + nn.Phase.Check, + a ? "checkSourceFileNodes" : "checkSourceFile", + { path: r.path }, + /*separateBeginAndEnd*/ + !0 + ); + const d = a ? "beforeCheckNodes" : "beforeCheck", y = a ? "afterCheckNodes" : "afterCheck"; + Qo(d), a ? Cut(r, a) : kut(r), Qo(y), Yf("Check", d, y), (f = nn) == null || f.pop(); + } + function S7e(r, a) { + if (a) + return !1; + switch (r) { + case 0: + return !!F.noUnusedLocals; + case 1: + return !!F.noUnusedParameters; + default: + return E.assertNever(r); + } + } + function T7e(r) { + return nh.get(r.path) || He; + } + function kut(r) { + const a = yn(r); + if (!(a.flags & 1)) { + if ($C(r, F, e)) + return; + Q7e(r), Ep(Q0), Ep(Gh), Ep(jd), Ep($h), Ep(v1), a.flags & 8388608 && (Q0 = a.potentialThisCollisions, Gh = a.potentialNewTargetCollisions, jd = a.potentialWeakMapSetCollisions, $h = a.potentialReflectCollisions, v1 = a.potentialUnusedRenamedBindingElementsInTypes), lr(r.statements, la), la(r.endOfFileToken), b7e(r), $_(r) && V1(r), n(() => { + !r.isDeclarationFile && (F.noUnusedLocals || F.noUnusedParameters) && zIe(T7e(r), (l, f, d) => { + !lx(l) && S7e(f, !!(l.flags & 33554432)) && Pa.add(d); + }), r.isDeclarationFile || Qct(); + }), $_(r) && h7e(r), Q0.length && (lr(Q0, Kct), Ep(Q0)), Gh.length && (lr(Gh, elt), Ep(Gh)), jd.length && (lr(jd, ilt), Ep(jd)), $h.length && (lr($h, alt), Ep($h)), a.flags |= 1; + } + } + function Cut(r, a) { + const l = yn(r); + if (!(l.flags & 1)) { + if ($C(r, F, e)) + return; + Q7e(r), Ep(Q0), Ep(Gh), Ep(jd), Ep($h), Ep(v1), lr(a, la), b7e(r), (l.potentialThisCollisions || (l.potentialThisCollisions = [])).push(...Q0), (l.potentialNewTargetCollisions || (l.potentialNewTargetCollisions = [])).push(...Gh), (l.potentialWeakMapSetCollisions || (l.potentialWeakMapSetCollisions = [])).push(...jd), (l.potentialReflectCollisions || (l.potentialReflectCollisions = [])).push(...$h), (l.potentialUnusedRenamedBindingElementsInTypes || (l.potentialUnusedRenamedBindingElementsInTypes = [])).push( + ...v1 + ), l.flags |= 8388608; + for (const f of a) { + const d = yn(f); + d.flags |= 8388608; + } + } + } + function x7e(r, a, l) { + try { + return i = a, Eut(r, l); + } finally { + i = void 0; + } + } + function xme() { + for (const r of t) + r(); + t = []; + } + function kme(r, a) { + xme(); + const l = n; + n = (f) => f(), xut(r, a), n = l; + } + function Eut(r, a) { + if (r) { + xme(); + const l = Pa.getGlobalDiagnostics(), f = l.length; + kme(r, a); + const d = Pa.getDiagnostics(r.fileName); + if (a) + return d; + const y = Pa.getGlobalDiagnostics(); + if (y !== l) { + const x = zX(l, y, Z4); + return Wi(x, d); + } else if (f === 0 && y.length > 0) + return Wi(y, d); + return d; + } + return lr(e.getSourceFiles(), (l) => kme(l)), Pa.getDiagnostics(); + } + function Dut() { + return xme(), Pa.getGlobalDiagnostics(); + } + function wut(r, a) { + if (r.flags & 67108864) + return []; + const l = Us(); + let f = !1; + return d(), l.delete( + "this" + /* This */ + ), wfe(l); + function d() { + for (; r; ) { + switch (Ym(r) && r.locals && !E0(r) && x(r.locals, a), r.kind) { + case 307: + if (!el(r)) break; + // falls through + case 267: + I( + dn(r).exports, + a & 2623475 + /* ModuleMember */ + ); + break; + case 266: + x( + dn(r).exports, + a & 8 + /* EnumMember */ + ); + break; + case 231: + r.name && y(r.symbol, a); + // this fall-through is necessary because we would like to handle + // type parameter inside class expression similar to how we handle it in classDeclaration and interface Declaration. + // falls through + case 263: + case 264: + f || x( + Sg(dn(r)), + a & 788968 + /* Type */ + ); + break; + case 218: + r.name && y(r.symbol, a); + break; + } + eK(r) && y(ne, a), f = Vs(r), r = r.parent; + } + x(Oe, a); + } + function y(M, z) { + if (UC(M) & z) { + const Y = M.escapedName; + l.has(Y) || l.set(Y, M); + } + } + function x(M, z) { + z && M.forEach((Y) => { + y(Y, z); + }); + } + function I(M, z) { + z && M.forEach((Y) => { + !Lo( + Y, + 281 + /* ExportSpecifier */ + ) && !Lo( + Y, + 280 + /* NamespaceExport */ + ) && Y.escapedName !== "default" && y(Y, z); + }); + } + } + function Put(r) { + return r.kind === 80 && Nx(r.parent) && is(r.parent) === r; + } + function k7e(r) { + for (; r.parent.kind === 166; ) + r = r.parent; + return r.parent.kind === 183; + } + function Nut(r) { + for (; r.parent.kind === 211; ) + r = r.parent; + return r.parent.kind === 233; + } + function C7e(r, a) { + let l, f = Al(r); + for (; f && !(l = a(f)); ) + f = Al(f); + return l; + } + function Aut(r) { + return !!ur(r, (a) => Go(a) && Ap(a.body) || ss(a) ? !0 : Zn(a) || Ka(a) ? "quit" : !1); + } + function Cme(r, a) { + return !!C7e(r, (l) => l === a); + } + function Iut(r) { + for (; r.parent.kind === 166; ) + r = r.parent; + if (r.parent.kind === 271) + return r.parent.moduleReference === r ? r.parent : void 0; + if (r.parent.kind === 277) + return r.parent.expression === r ? r.parent : void 0; + } + function SX(r) { + return Iut(r) !== void 0; + } + function Fut(r) { + switch (Sc(r.parent.parent)) { + case 1: + case 3: + return R_(r.parent); + case 5: + if (Tn(r.parent) && VC(r.parent) === r) + return; + // falls through + case 4: + case 2: + return dn(r.parent.parent); + } + } + function Out(r) { + let a = r.parent; + for (; Xu(a); ) + r = a, a = a.parent; + if (a && a.kind === 205 && a.qualifier === r) + return a; + } + function Lut(r) { + if (r.expression.kind === 110) { + const a = Lu( + r, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + if (vs(a)) { + const l = LAe(a); + if (l) { + const f = _b( + l, + /*contextFlags*/ + void 0 + ), d = RAe(l, f); + return d && !Ua(d); + } + } + } + } + function E7e(r) { + if (tg(r)) + return R_(r.parent); + if (an(r) && r.parent.kind === 211 && r.parent === r.parent.parent.left && !Ni(r) && !yv(r) && !Lut(r.parent)) { + const a = Fut(r); + if (a) + return a; + } + if (r.parent.kind === 277 && _o(r)) { + const a = oc( + r, + /*all meanings*/ + 2998271, + /*ignoreErrors*/ + !0 + ); + if (a && a !== Ve) + return a; + } else if (Hu(r) && SX(r)) { + const a = sv( + r, + 271 + /* ImportEqualsDeclaration */ + ); + return E.assert(a !== void 0), Nk( + r, + /*dontResolveAlias*/ + !0 + ); + } + if (Hu(r)) { + const a = Out(r); + if (a) { + wi(a); + const l = yn(r).resolvedSymbol; + return l === Ve ? void 0 : l; + } + } + for (; UK(r); ) + r = r.parent; + if (Nut(r)) { + let a = 0; + r.parent.kind === 233 ? (a = im(r) ? 788968 : 111551, h5(r.parent) && (a |= 111551)) : a = 1920, a |= 2097152; + const l = _o(r) ? oc( + r, + a, + /*ignoreErrors*/ + !0 + ) : void 0; + if (l) + return l; + } + if (r.parent.kind === 341) + return k3(r.parent); + if (r.parent.kind === 168 && r.parent.parent.kind === 345) { + E.assert(!an(r)); + const a = hK(r.parent); + return a && a.symbol; + } + if (Td(r)) { + if (tc(r)) + return; + const a = ur(r, U_(ax, ED, yv)), l = a ? 901119 : 111551; + if (r.kind === 80) { + if (IC(r) && eC(r)) { + const d = W$(r.parent); + return d === Ve ? void 0 : d; + } + const f = oc( + r, + l, + /*ignoreErrors*/ + !0, + /*dontResolveAlias*/ + !0, + nv(r) + ); + if (!f && a) { + const d = ur(r, U_(Zn, Yl)); + if (d) + return sR( + r, + /*ignoreErrors*/ + !0, + dn(d) + ); + } + if (f && a) { + const d = Ob(r); + if (d && j0(d) && d === f.valueDeclaration) + return oc( + r, + l, + /*ignoreErrors*/ + !0, + /*dontResolveAlias*/ + !0, + Cr(d) + ) || f; + } + return f; + } else { + if (Ni(r)) + return H$(r); + if (r.kind === 211 || r.kind === 166) { + const f = yn(r); + return f.resolvedSymbol ? f.resolvedSymbol : (r.kind === 211 ? (q$( + r, + 0 + /* Normal */ + ), f.resolvedSymbol || (f.resolvedSymbol = D7e(uc(r.expression), o0(r.name)))) : p8e( + r, + 0 + /* Normal */ + ), !f.resolvedSymbol && a && Xu(r) ? sR(r) : f.resolvedSymbol); + } else if (yv(r)) + return sR(r); + } + } else if (Hu(r) && k7e(r)) { + const a = r.parent.kind === 183 ? 788968 : 1920, l = oc( + r, + a, + /*ignoreErrors*/ + !1, + /*dontResolveAlias*/ + !0 + ); + return l && l !== Ve ? l : VG(r); + } + if (r.parent.kind === 182) + return oc( + r, + /*meaning*/ + 1 + /* FunctionScopedVariable */ + ); + } + function D7e(r, a) { + const l = Dfe(r, a); + if (l.length && r.members) { + const f = JG(Vd(r).members); + if (l === du(r)) + return f; + if (f) { + const d = Ci(f), y = Li(l, (I) => I.declaration), x = gr(y, Aa).join(","); + if (d.filteredIndexSymbolCache || (d.filteredIndexSymbolCache = /* @__PURE__ */ new Map()), d.filteredIndexSymbolCache.has(x)) + return d.filteredIndexSymbolCache.get(x); + { + const I = ca( + 131072, + "__index" + /* Index */ + ); + return I.declarations = Li(l, (M) => M.declaration), I.parent = r.aliasSymbol ? r.aliasSymbol : r.symbol ? r.symbol : Cp(I.declarations[0].parent), d.filteredIndexSymbolCache.set(x, I), I; + } + } + } + } + function sR(r, a, l) { + if (Hu(r)) { + let x = oc( + r, + 901119, + a, + /*dontResolveAlias*/ + !0, + nv(r) + ); + if (!x && Me(r) && l && (x = Oa(fu(zu(l), r.escapedText, 901119))), x) + return x; + } + const f = Me(r) ? l : sR(r.left, a, l), d = Me(r) ? r.escapedText : r.right.escapedText; + if (f) { + const y = f.flags & 111551 && Ys(en(f), "prototype"), x = y ? en(y) : ko(f); + return Ys(x, d); + } + } + function Cp(r, a) { + if (Ei(r)) + return el(r) ? Oa(r.symbol) : void 0; + const { parent: l } = r, f = l.parent; + if (!(r.flags & 67108864)) { + if (b1e(r)) { + const d = dn(l); + return jy(r.parent) && r.parent.propertyName === r ? J$(d) : d; + } else if (E3(r)) + return dn(l.parent); + if (r.kind === 80) { + if (SX(r)) + return E7e(r); + if (l.kind === 208 && f.kind === 206 && r === l.propertyName) { + const d = nC(f), y = Ys(d, r.escapedText); + if (y) + return y; + } else if (SD(l) && l.name === r) + return l.keywordToken === 105 && An(r) === "target" ? Jde(l).symbol : l.keywordToken === 102 && An(r) === "meta" ? g3e().members.get("meta") : void 0; + } + switch (r.kind) { + case 80: + case 81: + case 211: + case 166: + if (!Jb(r)) + return E7e(r); + // falls through + case 110: + const d = Lu( + r, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + if (vs(d)) { + const I = Gf(d); + if (I.thisParameter) + return I.thisParameter; + } + if (V7(r)) + return Gi(r).symbol; + // falls through + case 197: + return ope(r).symbol; + case 108: + return Gi(r).symbol; + case 137: + const y = r.parent; + return y && y.kind === 176 ? y.parent.symbol : void 0; + case 11: + case 15: + if (tv(r.parent.parent) && A4(r.parent.parent) === r || (r.parent.kind === 272 || r.parent.kind === 278) && r.parent.moduleSpecifier === r || an(r) && ym(r.parent) && r.parent.moduleSpecifier === r || an(r) && __( + r.parent, + /*requireStringLiteralLikeArgument*/ + !1 + ) || _f(r.parent) || M0(r.parent) && Dh(r.parent.parent) && r.parent.parent.argument === r.parent) + return Pu(r, r, a); + if (Fs(l) && yS(l) && l.arguments[1] === r) + return dn(l); + // falls through + case 9: + const x = fo(l) ? l.argumentExpression === r ? au(l.expression) : void 0 : M0(l) && Qb(f) ? wi(f.objectType) : void 0; + return x && Ys(x, Zo(r.text)); + case 90: + case 100: + case 39: + case 86: + return R_(r.parent); + case 205: + return Dh(r) ? Cp(r.argument.literal, a) : void 0; + case 95: + return Io(r.parent) ? E.checkDefined(r.parent.symbol) : void 0; + case 102: + case 105: + return SD(r.parent) ? Y8e(r.parent).symbol : void 0; + case 104: + if (fn(r.parent)) { + const I = au(r.parent.right), M = Yde(I); + return M?.symbol ?? I.symbol; + } + return; + case 236: + return Gi(r).symbol; + case 295: + if (IC(r) && eC(r)) { + const I = W$(r.parent); + return I === Ve ? void 0 : I; + } + // falls through + default: + return; + } + } + } + function Mut(r) { + if (Me(r) && Tn(r.parent) && r.parent.name === r) { + const a = o0(r), l = au(r.parent.expression), f = l.flags & 1048576 ? l.types : [l]; + return na(f, (d) => kn(du(d), (y) => zk(a, y.keyType))); + } + } + function Rut(r) { + if (r && r.kind === 304) + return oc( + r.name, + 2208703 + /* Alias */ + ); + } + function jut(r) { + if (Tu(r)) { + const a = r.propertyName || r.name; + return r.parent.parent.moduleSpecifier ? fd(r.parent.parent, r) : a.kind === 11 ? void 0 : ( + // Skip for invalid syntax like this: export { "x" } + oc( + a, + 2998271 + /* Alias */ + ) + ); + } else + return oc( + r, + 2998271 + /* Alias */ + ); + } + function nC(r) { + if (Ei(r) && !el(r) || r.flags & 67108864) + return We; + const a = QB(r), l = a && S_(dn(a.class)); + if (im(r)) { + const f = wi(r); + return l ? of(f, l.thisType) : f; + } + if (Td(r)) + return w7e(r); + if (l && !a.isImplements) { + const f = Uc(wo(l)); + return f ? of(f, l.thisType) : We; + } + if (Nx(r)) { + const f = dn(r); + return ko(f); + } + if (Put(r)) { + const f = Cp(r); + return f ? ko(f) : We; + } + if (ma(r)) + return Vf( + r, + /*includeOptionality*/ + !0, + 0 + /* Normal */ + ) || We; + if (bl(r)) { + const f = dn(r); + return f ? en(f) : We; + } + if (b1e(r)) { + const f = Cp(r); + return f ? en(f) : We; + } + if (Ds(r)) + return Vf( + r.parent, + /*includeOptionality*/ + !0, + 0 + /* Normal */ + ) || We; + if (SX(r)) { + const f = Cp(r); + if (f) { + const d = ko(f); + return H(d) ? en(f) : d; + } + } + return SD(r.parent) && r.parent.keywordToken === r.kind ? Y8e(r.parent) : LS(r) ? jfe( + /*reportErrors*/ + !1 + ) : We; + } + function TX(r) { + if (E.assert( + r.kind === 210 || r.kind === 209 + /* ArrayLiteralExpression */ + ), r.parent.kind === 250) { + const d = tR(r.parent); + return WT(r, d || We); + } + if (r.parent.kind === 226) { + const d = au(r.parent.right); + return WT(r, d || We); + } + if (r.parent.kind === 303) { + const d = Ws(r.parent.parent, oa), y = TX(d) || We, x = CC(d.properties, r.parent); + return fIe(d, y, x); + } + const a = Ws(r.parent, Ql), l = TX(a) || We, f = yy(65, l, ft, r.parent) || We; + return pIe(a, l, a.elements.indexOf(r), f); + } + function But(r) { + const a = TX(Ws(r.parent.parent, S4)); + return a && Ys(a, r.escapedText); + } + function w7e(r) { + return H4(r) && (r = r.parent), Vu(au(r)); + } + function P7e(r) { + const a = R_(r.parent); + return Vs(r) ? en(a) : ko(a); + } + function N7e(r) { + const a = r.name; + switch (a.kind) { + case 80: + return x_(An(a)); + case 9: + case 11: + return x_(a.text); + case 167: + const l = hd(a); + return su( + l, + 12288 + /* ESSymbolLike */ + ) ? l : de; + default: + return E.fail("Unsupported property name."); + } + } + function Eme(r) { + r = Uu(r); + const a = Us(qa(r)), l = Ps( + r, + 0 + /* Call */ + ).length ? Fe : Ps( + r, + 1 + /* Construct */ + ).length ? Ft : void 0; + return l && lr(qa(l), (f) => { + a.has(f.escapedName) || a.set(f.escapedName, f); + }), zi(a); + } + function xX(r) { + return Ps( + r, + 0 + /* Call */ + ).length !== 0 || Ps( + r, + 1 + /* Construct */ + ).length !== 0; + } + function A7e(r) { + const a = Jut(r); + return a ? na(a, A7e) : [r]; + } + function Jut(r) { + if (rc(r) & 6) + return Li(Ci(r).containingType.types, (a) => Ys(a, r.escapedName)); + if (r.flags & 33554432) { + const { links: { leftSpread: a, rightSpread: l, syntheticOrigin: f } } = r; + return a ? [a, l] : f ? [f] : QT(zut(r)); + } + } + function zut(r) { + let a, l = r; + for (; l = Ci(l).target; ) + a = l; + return a; + } + function Wut(r) { + if (Fo(r)) return !1; + const a = ls(r, Me); + if (!a) return !1; + const l = a.parent; + return l ? !((Tn(l) || Xc(l)) && l.name === a) && kI(a) === ne : !1; + } + function Uut(r) { + return VP(r.parent) && r === r.parent.name; + } + function Vut(r, a) { + var l; + const f = ls(r, Me); + if (f) { + let d = kI( + f, + /*startInDeclarationContainer*/ + Uut(f) + ); + if (d) { + if (d.flags & 1048576) { + const x = Oa(d.exportSymbol); + if (!a && x.flags & 944 && !(x.flags & 3)) + return; + d = x; + } + const y = af(d); + if (y) { + if (y.flags & 512 && ((l = y.valueDeclaration) == null ? void 0 : l.kind) === 307) { + const x = y.valueDeclaration, I = Cr(f); + return x !== I ? void 0 : x; + } + return ur(f.parent, (x) => VP(x) && dn(x) === y); + } + } + } + } + function qut(r) { + const a = ite(r); + if (a) + return a; + const l = ls(r, Me); + if (l) { + const f = a_t(l); + if (cT( + f, + /*excludes*/ + 111551 + /* Value */ + ) && !Jd( + f, + 111551 + /* Value */ + )) + return ru(f); + } + } + function Hut(r) { + return r.valueDeclaration && ma(r.valueDeclaration) && tx(r.valueDeclaration).parent.kind === 299; + } + function I7e(r) { + if (r.flags & 418 && r.valueDeclaration && !Ei(r.valueDeclaration)) { + const a = Ci(r); + if (a.isDeclarationWithCollidingName === void 0) { + const l = Sd(r.valueDeclaration); + if (NZ(l) || Hut(r)) + if (Dt( + l.parent, + r.escapedName, + 111551, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + )) + a.isDeclarationWithCollidingName = !0; + else if (Dme( + r.valueDeclaration, + 16384 + /* CapturedBlockScopedBinding */ + )) { + const f = Dme( + r.valueDeclaration, + 32768 + /* BlockScopedBindingInLoop */ + ), d = zy( + l, + /*lookInLabeledStatements*/ + !1 + ), y = l.kind === 241 && zy( + l.parent, + /*lookInLabeledStatements*/ + !1 + ); + a.isDeclarationWithCollidingName = !jZ(l) && (!f || !d && !y); + } else + a.isDeclarationWithCollidingName = !1; + } + return a.isDeclarationWithCollidingName; + } + return !1; + } + function Gut(r) { + if (!Fo(r)) { + const a = ls(r, Me); + if (a) { + const l = kI(a); + if (l && I7e(l)) + return l.valueDeclaration; + } + } + } + function $ut(r) { + const a = ls(r, bl); + if (a) { + const l = dn(a); + if (l) + return I7e(l); + } + return !1; + } + function F7e(r) { + switch (E.assert(we), r.kind) { + case 271: + return kX(dn(r)); + case 273: + case 274: + case 276: + case 281: + const a = dn(r); + return !!a && kX( + a, + /*excludeTypeOnlyValues*/ + !0 + ); + case 278: + const l = r.exportClause; + return !!l && (ig(l) || at(l.elements, F7e)); + case 277: + return r.expression && r.expression.kind === 80 ? kX( + dn(r), + /*excludeTypeOnlyValues*/ + !0 + ) : !0; + } + return !1; + } + function Xut(r) { + const a = ls(r, _l); + return a === void 0 || a.parent.kind !== 307 || !gS(a) ? !1 : kX(dn(a)) && a.moduleReference && !tc(a.moduleReference); + } + function kX(r, a) { + if (!r) + return !1; + const l = Cr(r.valueDeclaration), f = l && dn(l); + M_(f); + const d = gl(Pl(r)); + return d === Ve ? !a || !Jd(r) : !!(pu( + r, + a, + /*excludeLocalMeanings*/ + !0 + ) & 111551) && (Yy(F) || !xI(d)); + } + function xI(r) { + return Qde(r) || !!r.constEnumOnlyModule; + } + function O7e(r, a) { + if (E.assert(we), sh(r)) { + const l = dn(r), f = l && Ci(l); + if (f?.referenced) + return !0; + const d = Ci(l).aliasTarget; + if (d && Mu(r) & 32 && pu(d) & 111551 && (Yy(F) || !xI(d))) + return !0; + } + return a ? !!ms(r, (l) => O7e(l, a)) : !1; + } + function L7e(r) { + if (Ap(r.body)) { + if (k0(r) || Mg(r)) return !1; + const a = dn(r), l = B2(a); + return l.length > 1 || // If there is single signature for the symbol, it is overload if that signature isn't coming from the node + // e.g.: function foo(a: string): string; + // function foo(a: any) { // This is implementation of the overloads + // return a; + // } + l.length === 1 && l[0].declaration !== r; + } + return !1; + } + function Qut(r) { + const a = B7e(r); + if (!a) return !1; + const l = wi(a); + return H(l) || PE(l); + } + function aR(r, a) { + return (Yut(r, a) || Zut(r)) && !Qut(r); + } + function Yut(r, a) { + return !Z || O8(r) || Af(r) || !r.initializer ? !1 : $n( + r, + 31 + /* ParameterPropertyModifier */ + ) ? !!a && Ka(a) : !0; + } + function Zut(r) { + return Z && O8(r) && (Af(r) || !r.initializer) && $n( + r, + 31 + /* ParameterPropertyModifier */ + ); + } + function M7e(r) { + const a = ls(r, (f) => Tc(f) || Kn(f)); + if (!a) + return !1; + let l; + if (Kn(a)) { + if (a.type || !an(a) && !CI(a)) + return !1; + const f = F4(a); + if (!f || !bd(f)) + return !1; + l = dn(f); + } else + l = dn(a); + return !l || !(l.flags & 16 | 3) ? !1 : !!al(zu(l), (f) => f.flags & 111551 && Fx(f.valueDeclaration)); + } + function Kut(r) { + const a = ls(r, Tc); + if (!a) + return He; + const l = dn(a); + return l && qa(en(l)) || He; + } + function iC(r) { + var a; + const l = r.id || 0; + return l < 0 || l >= Cc.length ? 0 : ((a = Cc[l]) == null ? void 0 : a.flags) || 0; + } + function Dme(r, a) { + return e_t(r, a), !!(iC(r) & a); + } + function e_t(r, a) { + if (!F.noCheck && sD(Cr(r), F) || yn(r).calculatedFlags & a) + return; + switch (a) { + case 16: + case 32: + return x(r); + case 128: + case 256: + case 2097152: + return y(r); + case 512: + case 8192: + case 65536: + case 262144: + return M(r); + case 536870912: + return Y(r); + case 4096: + case 32768: + case 16384: + return pe(r); + default: + return E.assertNever(a, `Unhandled node check flag calculation: ${E.formatNodeCheckFlags(a)}`); + } + function f(dt, ht) { + const or = ht(dt, dt.parent); + if (or !== "skip") + return or || Yx(dt, ht); + } + function d(dt) { + const ht = yn(dt); + if (ht.calculatedFlags & a) return "skip"; + ht.calculatedFlags |= 2097536, x(dt); + } + function y(dt) { + f(dt, d); + } + function x(dt) { + const ht = yn(dt); + ht.calculatedFlags |= 48, dt.kind === 108 && O$(dt); + } + function I(dt) { + const ht = yn(dt); + if (ht.calculatedFlags & a) return "skip"; + ht.calculatedFlags |= 336384, Y(dt); + } + function M(dt) { + f(dt, I); + } + function z(dt) { + return Td(dt) || _u(dt.parent) && (dt.parent.objectAssignmentInitializer ?? dt.parent.name) === dt; + } + function Y(dt) { + const ht = yn(dt); + if (ht.calculatedFlags |= 536870912, Me(dt) && (ht.calculatedFlags |= 49152, z(dt) && !(Tn(dt.parent) && dt.parent.name === dt))) { + const or = Nu(dt); + or && or !== Ve && AAe(dt, or); + } + } + function Se(dt) { + const ht = yn(dt); + if (ht.calculatedFlags & a) return "skip"; + ht.calculatedFlags |= 53248, Ze(dt); + } + function pe(dt) { + const ht = Sd(tg(dt) ? dt.parent : dt); + f(ht, Se); + } + function Ze(dt) { + Y(dt), fa(dt) && hd(dt), Ni(dt) && sl(dt.parent) && aX(dt.parent); + } + } + function UT(r) { + return d7e(r.parent), yn(r).enumMemberValue ?? cl( + /*value*/ + void 0 + ); + } + function R7e(r) { + switch (r.kind) { + case 306: + case 211: + case 212: + return !0; + } + return !1; + } + function wme(r) { + if (r.kind === 306) + return UT(r).value; + yn(r).resolvedSymbol || uc(r); + const a = yn(r).resolvedSymbol || (_o(r) ? oc( + r, + 111551, + /*ignoreErrors*/ + !0 + ) : void 0); + if (a && a.flags & 8) { + const l = a.valueDeclaration; + if (ev(l.parent)) + return UT(l).value; + } + } + function Pme(r) { + return !!(r.flags & 524288) && Ps( + r, + 0 + /* Call */ + ).length > 0; + } + function t_t(r, a) { + var l; + const f = ls(r, Hu); + if (!f || a && (a = ls(a), !a)) + return 0; + let d = !1; + if (Xu(f)) { + const Y = oc( + w_(f), + 111551, + /*ignoreErrors*/ + !0, + /*dontResolveAlias*/ + !0, + a + ); + d = !!((l = Y?.declarations) != null && l.every(x0)); + } + const y = oc( + f, + 111551, + /*ignoreErrors*/ + !0, + /*dontResolveAlias*/ + !0, + a + ), x = y && y.flags & 2097152 ? Pl(y) : y; + d || (d = !!(y && Jd( + y, + 111551 + /* Value */ + ))); + const I = oc( + f, + 788968, + /*ignoreErrors*/ + !0, + /*dontResolveAlias*/ + !0, + a + ), M = I && I.flags & 2097152 ? Pl(I) : I; + if (y || d || (d = !!(I && Jd( + I, + 788968 + /* Type */ + ))), x && x === M) { + const Y = Bfe( + /*reportErrors*/ + !1 + ); + if (Y && x === Y) + return 9; + const Se = en(x); + if (Se && wr(Se)) + return d ? 10 : 1; + } + if (!M) + return d ? 11 : 0; + const z = ko(M); + return H(z) ? d ? 11 : 0 : z.flags & 3 ? 11 : su( + z, + 245760 + /* Never */ + ) ? 2 : su( + z, + 528 + /* BooleanLike */ + ) ? 6 : su( + z, + 296 + /* NumberLike */ + ) ? 3 : su( + z, + 2112 + /* BigIntLike */ + ) ? 4 : su( + z, + 402653316 + /* StringLike */ + ) ? 5 : ga(z) ? 7 : su( + z, + 12288 + /* ESSymbolLike */ + ) ? 8 : Pme(z) ? 10 : Tp(z) ? 7 : 11; + } + function r_t(r, a, l, f, d) { + const y = ls(r, K5); + if (!y) + return N.createToken( + 133 + /* AnyKeyword */ + ); + const x = dn(y); + return ke.serializeTypeForDeclaration(y, x, a, l | 1024, f, d); + } + function Nme(r) { + r = ls(r, MP); + const a = r.kind === 178 ? 177 : 178, l = Lo(dn(r), a), f = l && l.pos < r.pos ? l : r, d = l && l.pos < r.pos ? r : l, y = r.kind === 178 ? r : l, x = r.kind === 177 ? r : l; + return { + firstAccessor: f, + secondAccessor: d, + setAccessor: y, + getAccessor: x + }; + } + function n_t(r, a, l, f, d) { + const y = ls(r, vs); + return y ? ke.serializeReturnTypeForSignature(y, a, l | 1024, f, d) : N.createToken( + 133 + /* AnyKeyword */ + ); + } + function i_t(r, a, l, f, d) { + const y = ls(r, ct); + return y ? ke.serializeTypeForExpression(y, a, l | 1024, f, d) : N.createToken( + 133 + /* AnyKeyword */ + ); + } + function s_t(r) { + return Oe.has(Zo(r)); + } + function kI(r, a) { + const l = yn(r).resolvedSymbol; + if (l) + return l; + let f = r; + if (a) { + const d = r.parent; + bl(d) && r === d.name && (f = ST(d)); + } + return Dt( + f, + r.escapedText, + 3257279, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !0 + ); + } + function a_t(r) { + const a = yn(r).resolvedSymbol; + return a && a !== Ve ? a : Dt( + r, + r.escapedText, + 3257279, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !0, + /*excludeGlobals*/ + void 0 + ); + } + function o_t(r) { + if (!Fo(r)) { + const a = ls(r, Me); + if (a) { + const l = kI(a); + if (l) + return gl(l).valueDeclaration; + } + } + } + function c_t(r) { + if (!Fo(r)) { + const a = ls(r, Me); + if (a) { + const l = kI(a); + if (l) + return kn(gl(l).declarations, (f) => { + switch (f.kind) { + case 260: + case 169: + case 208: + case 172: + case 303: + case 304: + case 306: + case 210: + case 262: + case 218: + case 219: + case 263: + case 231: + case 266: + case 174: + case 177: + case 178: + case 267: + return !0; + } + return !1; + }); + } + } + } + function l_t(r) { + return t3(r) || Kn(r) && CI(r) ? U2(en(dn(r))) : !1; + } + function u_t(r, a, l) { + const f = r.flags & 1056 ? ke.symbolToExpression( + r.symbol, + 111551, + a, + /*flags*/ + void 0, + /*internalFlags*/ + void 0, + l + ) : r === Jr ? N.createTrue() : r === Xr && N.createFalse(); + if (f) return f; + const d = r.value; + return typeof d == "object" ? N.createBigIntLiteral(d) : typeof d == "string" ? N.createStringLiteral(d) : d < 0 ? N.createPrefixUnaryExpression(41, N.createNumericLiteral(-d)) : N.createNumericLiteral(d); + } + function __t(r, a) { + const l = en(dn(r)); + return u_t(l, r, a); + } + function j7e(r) { + return r ? (Dm(r), Cr(r).localJsxFactory || Z0) : Z0; + } + function Ame(r) { + if (r) { + const a = Cr(r); + if (a) { + if (a.localJsxFragmentFactory) + return a.localJsxFragmentFactory; + const l = a.pragmas.get("jsxfrag"), f = os(l) ? l[0] : l; + if (f) + return a.localJsxFragmentFactory = Kx(f.arguments.factory, R), a.localJsxFragmentFactory; + } + } + if (F.jsxFragmentFactory) + return Kx(F.jsxFragmentFactory, R); + } + function B7e(r) { + const a = qc(r); + if (a) + return a; + if (r.kind === 169 && r.parent.kind === 178) { + const l = Nme(r.parent).getAccessor; + if (l) + return pf(l); + } + } + function f_t() { + return { + getReferencedExportContainer: Vut, + getReferencedImportDeclaration: qut, + getReferencedDeclarationWithCollidingName: Gut, + isDeclarationWithCollidingName: $ut, + isValueAliasDeclaration: (a) => { + const l = ls(a); + return l && we ? F7e(l) : !0; + }, + hasGlobalName: s_t, + isReferencedAliasDeclaration: (a, l) => { + const f = ls(a); + return f && we ? O7e(f, l) : !0; + }, + hasNodeCheckFlag: (a, l) => { + const f = ls(a); + return f ? Dme(f, l) : !1; + }, + isTopLevelValueImportEqualsWithEntityName: Xut, + isDeclarationVisible: dd, + isImplementationOfOverload: L7e, + requiresAddingImplicitUndefined: aR, + isExpandoFunctionDeclaration: M7e, + getPropertiesOfContainerFunction: Kut, + createTypeOfDeclaration: r_t, + createReturnTypeOfSignatureDeclaration: n_t, + createTypeOfExpression: i_t, + createLiteralConstValue: __t, + isSymbolAccessible: Qp, + isEntityNameVisible: T8, + getConstantValue: (a) => { + const l = ls(a, R7e); + return l ? wme(l) : void 0; + }, + getEnumMemberValue: (a) => { + const l = ls(a, j0); + return l ? UT(l) : void 0; + }, + collectLinkedAliases: mE, + markLinkedReferences: (a) => { + const l = ls(a); + return l && Zk( + l, + 0 + /* Unspecified */ + ); + }, + getReferencedValueDeclaration: o_t, + getReferencedValueDeclarations: c_t, + getTypeReferenceSerializationKind: t_t, + isOptionalParameter: O8, + isArgumentsLocalBinding: Wut, + getExternalModuleFileFromDeclaration: (a) => { + const l = ls(a, zZ); + return l && Ime(l); + }, + isLiteralConstDeclaration: l_t, + isLateBound: (a) => { + const l = ls(a, bl), f = l && dn(l); + return !!(f && rc(f) & 4096); + }, + getJsxFactoryEntity: j7e, + getJsxFragmentFactoryEntity: Ame, + isBindingCapturedByNode: (a, l) => { + const f = ls(a), d = ls(l); + return !!f && !!d && (Kn(d) || ma(d)) && Pit(f, d); + }, + getDeclarationStatementsForSourceFile: (a, l, f, d) => { + const y = ls(a); + E.assert(y && y.kind === 307, "Non-sourcefile node passed into getDeclarationsForSourceFile"); + const x = dn(a); + return x ? (M_(x), x.exports ? ke.symbolTableToDeclarationStatements(x.exports, a, l, f, d) : []) : a.locals ? ke.symbolTableToDeclarationStatements(a.locals, a, l, f, d) : []; + }, + isImportRequiredByAugmentation: r, + isDefinitelyReferenceToGlobalSymbolObject: Tl, + createLateBoundIndexSignatures: (a, l, f, d, y) => { + const x = a.symbol, I = du(en(x)), M = BG(x), z = M && zG(M, Ki(Sg(x).values())); + let Y; + for (const Se of [I, z]) + if (Ir(Se)) { + Y || (Y = []); + for (const pe of Se) { + if (pe.declaration) continue; + const Ze = ke.indexInfoToIndexSignatureDeclaration(pe, l, f, d, y); + Ze && Se === I && (Ze.modifiers || (Ze.modifiers = N.createNodeArray())).unshift(N.createModifier( + 126 + /* StaticKeyword */ + )), Ze && Y.push(Ze); + } + } + return Y; + } + }; + function r(a) { + const l = Cr(a); + if (!l.symbol) return !1; + const f = Ime(a); + if (!f || f === l) return !1; + const d = Uf(l.symbol); + for (const y of Ki(d.values())) + if (y.mergeId) { + const x = Oa(y); + if (x.declarations) { + for (const I of x.declarations) + if (Cr(I) === f) + return !0; + } + } + return !1; + } + } + function Ime(r) { + const a = r.kind === 267 ? jn(r.name, ea) : dx(r), l = Fk( + a, + a, + /*moduleNotFoundError*/ + void 0 + ); + if (l) + return Lo( + l, + 307 + /* SourceFile */ + ); + } + function p_t() { + for (const a of e.getSourceFiles()) + rne(a, F); + mc = /* @__PURE__ */ new Map(); + let r; + for (const a of e.getSourceFiles()) + if (!a.redirectInfo) { + if (!$_(a)) { + const l = a.locals.get("globalThis"); + if (l?.declarations) + for (const f of l.declarations) + Pa.add(tn(f, p.Declaration_name_conflicts_with_built_in_global_identifier_0, "globalThis")); + Nm(Oe, a.locals); + } + a.jsGlobalAugmentations && Nm(Oe, a.jsGlobalAugmentations), a.patternAmbientModules && a.patternAmbientModules.length && (Vp = Wi(Vp, a.patternAmbientModules)), a.moduleAugmentations.length && (r || (r = [])).push(a.moduleAugmentations), a.symbol && a.symbol.globalExports && a.symbol.globalExports.forEach((f, d) => { + Oe.has(d) || Oe.set(d, f); + }); + } + if (r) + for (const a of r) + for (const l of a) + eg(l.parent) && e0(l); + if (rE(), Ci(xe).type = fe, Ci(ne).type = lc( + "IArguments", + /*arity*/ + 0, + /*reportErrors*/ + !0 + ), Ci(Ve).type = We, Ci(he).type = ce(16, he), Br = lc( + "Array", + /*arity*/ + 1, + /*reportErrors*/ + !0 + ), Ml = lc( + "Object", + /*arity*/ + 0, + /*reportErrors*/ + !0 + ), Rl = lc( + "Function", + /*arity*/ + 0, + /*reportErrors*/ + !0 + ), Fe = re && lc( + "CallableFunction", + /*arity*/ + 0, + /*reportErrors*/ + !0 + ) || Rl, Ft = re && lc( + "NewableFunction", + /*arity*/ + 0, + /*reportErrors*/ + !0 + ) || Rl, Sa = lc( + "String", + /*arity*/ + 0, + /*reportErrors*/ + !0 + ), to = lc( + "Number", + /*arity*/ + 0, + /*reportErrors*/ + !0 + ), Do = lc( + "Boolean", + /*arity*/ + 0, + /*reportErrors*/ + !0 + ), ml = lc( + "RegExp", + /*arity*/ + 0, + /*reportErrors*/ + !0 + ), Va = mu(Je), mo = mu(Ye), mo === hs && (mo = Ea( + /*symbol*/ + void 0, + A, + He, + He, + He + )), Ti = k3e( + "ReadonlyArray", + /*arity*/ + 1 + ) || Br, df = Ti ? Hw(Ti, [Je]) : Va, gc = k3e( + "ThisType", + /*arity*/ + 1 + ), r) + for (const a of r) + for (const l of a) + eg(l.parent) || e0(l); + mc.forEach(({ firstFile: a, secondFile: l, conflictingSymbols: f }) => { + if (f.size < 8) + f.forEach(({ isBlockScoped: d, firstFileLocations: y, secondFileLocations: x }, I) => { + const M = d ? p.Cannot_redeclare_block_scoped_variable_0 : p.Duplicate_identifier_0; + for (const z of y) + ty(z, M, I, x); + for (const z of x) + ty(z, M, I, y); + }); + else { + const d = Ki(f.keys()).join(", "); + Pa.add(Bs( + tn(a, p.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0, d), + tn(l, p.Conflicts_are_in_this_file) + )), Pa.add(Bs( + tn(l, p.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0, d), + tn(a, p.Conflicts_are_in_this_file) + )); + } + }), mc = void 0; + } + function hl(r, a) { + if (F.importHelpers) { + const l = Cr(r); + if (EC(l, F) && !(r.flags & 33554432)) { + const f = m_t(l, r); + if (f !== Ve) { + const d = Ci(f); + if (d.requestedExternalEmitHelpers ?? (d.requestedExternalEmitHelpers = 0), (d.requestedExternalEmitHelpers & a) !== a) { + const y = a & ~d.requestedExternalEmitHelpers; + for (let x = 1; x <= 16777216; x <<= 1) + if (y & x) + for (const I of d_t(x)) { + const M = jc(fu( + Uf(f), + Zo(I), + 111551 + /* Value */ + )); + M ? x & 524288 ? at(B2(M), (z) => z_(z) > 3) || je(r, p.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, Wy, I, 4) : x & 1048576 ? at(B2(M), (z) => z_(z) > 4) || je(r, p.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, Wy, I, 5) : x & 1024 && (at(B2(M), (z) => z_(z) > 2) || je(r, p.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, Wy, I, 3)) : je(r, p.This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0, Wy, I); + } + } + d.requestedExternalEmitHelpers |= a; + } + } + } + } + function d_t(r) { + switch (r) { + case 1: + return ["__extends"]; + case 2: + return ["__assign"]; + case 4: + return ["__rest"]; + case 8: + return V ? ["__decorate"] : ["__esDecorate", "__runInitializers"]; + case 16: + return ["__metadata"]; + case 32: + return ["__param"]; + case 64: + return ["__awaiter"]; + case 128: + return ["__generator"]; + case 256: + return ["__values"]; + case 512: + return ["__read"]; + case 1024: + return ["__spreadArray"]; + case 2048: + return ["__await"]; + case 4096: + return ["__asyncGenerator"]; + case 8192: + return ["__asyncDelegator"]; + case 16384: + return ["__asyncValues"]; + case 32768: + return ["__exportStar"]; + case 65536: + return ["__importStar"]; + case 131072: + return ["__importDefault"]; + case 262144: + return ["__makeTemplateObject"]; + case 524288: + return ["__classPrivateFieldGet"]; + case 1048576: + return ["__classPrivateFieldSet"]; + case 2097152: + return ["__classPrivateFieldIn"]; + case 4194304: + return ["__setFunctionName"]; + case 8388608: + return ["__propKey"]; + case 16777216: + return ["__addDisposableResource", "__disposeResources"]; + case 33554432: + return ["__rewriteRelativeImportExtension"]; + default: + return E.fail("Unrecognized helper"); + } + } + function m_t(r, a) { + const l = yn(r); + return l.externalHelpersModule || (l.externalHelpersModule = uT(lft(r), Wy, p.This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found, a) || Ve), l.externalHelpersModule; + } + function yh(r) { + var a; + const l = y_t(r) || g_t(r); + if (l !== void 0) + return l; + if (Ii(r) && Bb(r)) + return Jl(r, p.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters); + const f = pc(r) ? r.declarationList.flags & 7 : 0; + let d, y, x, I, M, z = 0, Y = !1, Se = !1; + for (const pe of r.modifiers) + if (ll(pe)) { + if (l3(V, r, r.parent, r.parent.parent)) { + if (V && (r.kind === 177 || r.kind === 178)) { + const Ze = Nme(r); + if (Pf(Ze.firstAccessor) && r === Ze.secondAccessor) + return Jl(r, p.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); + } + } else return r.kind === 174 && !Ap(r.body) ? Jl(r, p.A_decorator_can_only_decorate_a_method_implementation_not_an_overload) : Jl(r, p.Decorators_are_not_valid_here); + if (z & -34849) + return hr(pe, p.Decorators_are_not_valid_here); + if (Se && z & 98303) { + E.assertIsDefined(M); + const Ze = Cr(pe); + return q1(Ze) ? !1 : (Bs( + je(pe, p.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export), + tn(M, p.Decorator_used_before_export_here) + ), !0); + } + z |= 32768, z & 98303 ? z & 32 && (Y = !0) : Se = !0, M ?? (M = pe); + } else { + if (pe.kind !== 148) { + if (r.kind === 171 || r.kind === 173) + return hr(pe, p._0_modifier_cannot_appear_on_a_type_member, Xs(pe.kind)); + if (r.kind === 181 && (pe.kind !== 126 || !Zn(r.parent))) + return hr(pe, p._0_modifier_cannot_appear_on_an_index_signature, Xs(pe.kind)); + } + if (pe.kind !== 103 && pe.kind !== 147 && pe.kind !== 87 && r.kind === 168) + return hr(pe, p._0_modifier_cannot_appear_on_a_type_parameter, Xs(pe.kind)); + switch (pe.kind) { + case 87: { + if (r.kind !== 266 && r.kind !== 168) + return hr(r, p.A_class_member_cannot_have_the_0_keyword, Xs( + 87 + /* ConstKeyword */ + )); + const ht = Bp(r.parent) && iv(r.parent) || r.parent; + if (r.kind === 168 && !(Ka(ht) || Zn(ht) || ng(ht) || ZC(ht) || Jx(ht) || dN(ht) || pm(ht))) + return hr(pe, p._0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class, Xs(pe.kind)); + break; + } + case 164: + if (z & 16) + return hr(pe, p._0_modifier_already_seen, "override"); + if (z & 128) + return hr(pe, p._0_modifier_cannot_be_used_with_1_modifier, "override", "declare"); + if (z & 8) + return hr(pe, p._0_modifier_must_precede_1_modifier, "override", "readonly"); + if (z & 512) + return hr(pe, p._0_modifier_must_precede_1_modifier, "override", "accessor"); + if (z & 1024) + return hr(pe, p._0_modifier_must_precede_1_modifier, "override", "async"); + z |= 16, I = pe; + break; + case 125: + case 124: + case 123: + const Ze = Lw(Sx(pe.kind)); + if (z & 7) + return hr(pe, p.Accessibility_modifier_already_seen); + if (z & 16) + return hr(pe, p._0_modifier_must_precede_1_modifier, Ze, "override"); + if (z & 256) + return hr(pe, p._0_modifier_must_precede_1_modifier, Ze, "static"); + if (z & 512) + return hr(pe, p._0_modifier_must_precede_1_modifier, Ze, "accessor"); + if (z & 8) + return hr(pe, p._0_modifier_must_precede_1_modifier, Ze, "readonly"); + if (z & 1024) + return hr(pe, p._0_modifier_must_precede_1_modifier, Ze, "async"); + if (r.parent.kind === 268 || r.parent.kind === 307) + return hr(pe, p._0_modifier_cannot_appear_on_a_module_or_namespace_element, Ze); + if (z & 64) + return pe.kind === 123 ? hr(pe, p._0_modifier_cannot_be_used_with_1_modifier, Ze, "abstract") : hr(pe, p._0_modifier_must_precede_1_modifier, Ze, "abstract"); + if (Fu(r)) + return hr(pe, p.An_accessibility_modifier_cannot_be_used_with_a_private_identifier); + z |= Sx(pe.kind); + break; + case 126: + if (z & 256) + return hr(pe, p._0_modifier_already_seen, "static"); + if (z & 8) + return hr(pe, p._0_modifier_must_precede_1_modifier, "static", "readonly"); + if (z & 1024) + return hr(pe, p._0_modifier_must_precede_1_modifier, "static", "async"); + if (z & 512) + return hr(pe, p._0_modifier_must_precede_1_modifier, "static", "accessor"); + if (r.parent.kind === 268 || r.parent.kind === 307) + return hr(pe, p._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static"); + if (r.kind === 169) + return hr(pe, p._0_modifier_cannot_appear_on_a_parameter, "static"); + if (z & 64) + return hr(pe, p._0_modifier_cannot_be_used_with_1_modifier, "static", "abstract"); + if (z & 16) + return hr(pe, p._0_modifier_must_precede_1_modifier, "static", "override"); + z |= 256, d = pe; + break; + case 129: + if (z & 512) + return hr(pe, p._0_modifier_already_seen, "accessor"); + if (z & 8) + return hr(pe, p._0_modifier_cannot_be_used_with_1_modifier, "accessor", "readonly"); + if (z & 128) + return hr(pe, p._0_modifier_cannot_be_used_with_1_modifier, "accessor", "declare"); + if (r.kind !== 172) + return hr(pe, p.accessor_modifier_can_only_appear_on_a_property_declaration); + z |= 512; + break; + case 148: + if (z & 8) + return hr(pe, p._0_modifier_already_seen, "readonly"); + if (r.kind !== 172 && r.kind !== 171 && r.kind !== 181 && r.kind !== 169) + return hr(pe, p.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature); + if (z & 512) + return hr(pe, p._0_modifier_cannot_be_used_with_1_modifier, "readonly", "accessor"); + z |= 8; + break; + case 95: + if (F.verbatimModuleSyntax && !(r.flags & 33554432) && r.kind !== 265 && r.kind !== 264 && // ModuleDeclaration needs to be checked that it is uninstantiated later + r.kind !== 267 && r.parent.kind === 307 && e.getEmitModuleFormatOfFile(Cr(r)) === 1) + return hr(pe, p.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); + if (z & 32) + return hr(pe, p._0_modifier_already_seen, "export"); + if (z & 128) + return hr(pe, p._0_modifier_must_precede_1_modifier, "export", "declare"); + if (z & 64) + return hr(pe, p._0_modifier_must_precede_1_modifier, "export", "abstract"); + if (z & 1024) + return hr(pe, p._0_modifier_must_precede_1_modifier, "export", "async"); + if (Zn(r.parent)) + return hr(pe, p._0_modifier_cannot_appear_on_class_elements_of_this_kind, "export"); + if (r.kind === 169) + return hr(pe, p._0_modifier_cannot_appear_on_a_parameter, "export"); + if (f === 4) + return hr(pe, p._0_modifier_cannot_appear_on_a_using_declaration, "export"); + if (f === 6) + return hr(pe, p._0_modifier_cannot_appear_on_an_await_using_declaration, "export"); + z |= 32; + break; + case 90: + const dt = r.parent.kind === 307 ? r.parent : r.parent.parent; + if (dt.kind === 267 && !Ou(dt)) + return hr(pe, p.A_default_export_can_only_be_used_in_an_ECMAScript_style_module); + if (f === 4) + return hr(pe, p._0_modifier_cannot_appear_on_a_using_declaration, "default"); + if (f === 6) + return hr(pe, p._0_modifier_cannot_appear_on_an_await_using_declaration, "default"); + if (z & 32) { + if (Y) + return hr(M, p.Decorators_are_not_valid_here); + } else return hr(pe, p._0_modifier_must_precede_1_modifier, "export", "default"); + z |= 2048; + break; + case 138: + if (z & 128) + return hr(pe, p._0_modifier_already_seen, "declare"); + if (z & 1024) + return hr(pe, p._0_modifier_cannot_be_used_in_an_ambient_context, "async"); + if (z & 16) + return hr(pe, p._0_modifier_cannot_be_used_in_an_ambient_context, "override"); + if (Zn(r.parent) && !ss(r)) + return hr(pe, p._0_modifier_cannot_appear_on_class_elements_of_this_kind, "declare"); + if (r.kind === 169) + return hr(pe, p._0_modifier_cannot_appear_on_a_parameter, "declare"); + if (f === 4) + return hr(pe, p._0_modifier_cannot_appear_on_a_using_declaration, "declare"); + if (f === 6) + return hr(pe, p._0_modifier_cannot_appear_on_an_await_using_declaration, "declare"); + if (r.parent.flags & 33554432 && r.parent.kind === 268) + return hr(pe, p.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); + if (Fu(r)) + return hr(pe, p._0_modifier_cannot_be_used_with_a_private_identifier, "declare"); + if (z & 512) + return hr(pe, p._0_modifier_cannot_be_used_with_1_modifier, "declare", "accessor"); + z |= 128, y = pe; + break; + case 128: + if (z & 64) + return hr(pe, p._0_modifier_already_seen, "abstract"); + if (r.kind !== 263 && r.kind !== 185) { + if (r.kind !== 174 && r.kind !== 172 && r.kind !== 177 && r.kind !== 178) + return hr(pe, p.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration); + if (!(r.parent.kind === 263 && $n( + r.parent, + 64 + /* Abstract */ + ))) { + const ht = r.kind === 172 ? p.Abstract_properties_can_only_appear_within_an_abstract_class : p.Abstract_methods_can_only_appear_within_an_abstract_class; + return hr(pe, ht); + } + if (z & 256) + return hr(pe, p._0_modifier_cannot_be_used_with_1_modifier, "static", "abstract"); + if (z & 2) + return hr(pe, p._0_modifier_cannot_be_used_with_1_modifier, "private", "abstract"); + if (z & 1024 && x) + return hr(x, p._0_modifier_cannot_be_used_with_1_modifier, "async", "abstract"); + if (z & 16) + return hr(pe, p._0_modifier_must_precede_1_modifier, "abstract", "override"); + if (z & 512) + return hr(pe, p._0_modifier_must_precede_1_modifier, "abstract", "accessor"); + } + if (Hl(r) && r.name.kind === 81) + return hr(pe, p._0_modifier_cannot_be_used_with_a_private_identifier, "abstract"); + z |= 64; + break; + case 134: + if (z & 1024) + return hr(pe, p._0_modifier_already_seen, "async"); + if (z & 128 || r.parent.flags & 33554432) + return hr(pe, p._0_modifier_cannot_be_used_in_an_ambient_context, "async"); + if (r.kind === 169) + return hr(pe, p._0_modifier_cannot_appear_on_a_parameter, "async"); + if (z & 64) + return hr(pe, p._0_modifier_cannot_be_used_with_1_modifier, "async", "abstract"); + z |= 1024, x = pe; + break; + case 103: + case 147: { + const ht = pe.kind === 103 ? 8192 : 16384, or = pe.kind === 103 ? "in" : "out", nr = Bp(r.parent) && (iv(r.parent) || Pn((a = LC(r.parent)) == null ? void 0 : a.tags, jS)) || r.parent; + if (r.kind !== 168 || nr && !(Yl(nr) || Zn(nr) || jp(nr) || jS(nr))) + return hr(pe, p._0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias, or); + if (z & ht) + return hr(pe, p._0_modifier_already_seen, or); + if (ht & 8192 && z & 16384) + return hr(pe, p._0_modifier_must_precede_1_modifier, "in", "out"); + z |= ht; + break; + } + } + } + return r.kind === 176 ? z & 256 ? hr(d, p._0_modifier_cannot_appear_on_a_constructor_declaration, "static") : z & 16 ? hr(I, p._0_modifier_cannot_appear_on_a_constructor_declaration, "override") : z & 1024 ? hr(x, p._0_modifier_cannot_appear_on_a_constructor_declaration, "async") : !1 : (r.kind === 272 || r.kind === 271) && z & 128 ? hr(y, p.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare") : r.kind === 169 && z & 31 && Ds(r.name) ? hr(r, p.A_parameter_property_may_not_be_declared_using_a_binding_pattern) : r.kind === 169 && z & 31 && r.dotDotDotToken ? hr(r, p.A_parameter_property_cannot_be_declared_using_a_rest_parameter) : z & 1024 ? b_t(r, x) : !1; + } + function g_t(r) { + if (!r.modifiers) return !1; + const a = h_t(r); + return a && Jl(a, p.Modifiers_cannot_appear_here); + } + function CX(r, a) { + const l = Pn(r.modifiers, ia); + return l && l.kind !== a ? l : void 0; + } + function h_t(r) { + switch (r.kind) { + case 177: + case 178: + case 176: + case 172: + case 171: + case 174: + case 173: + case 181: + case 267: + case 272: + case 271: + case 278: + case 277: + case 218: + case 219: + case 169: + case 168: + return; + case 175: + case 303: + case 304: + case 270: + case 282: + return Pn(r.modifiers, ia); + default: + if (r.parent.kind === 268 || r.parent.kind === 307) + return; + switch (r.kind) { + case 262: + return CX( + r, + 134 + /* AsyncKeyword */ + ); + case 263: + case 185: + return CX( + r, + 128 + /* AbstractKeyword */ + ); + case 231: + case 264: + case 265: + return Pn(r.modifiers, ia); + case 243: + return r.declarationList.flags & 4 ? CX( + r, + 135 + /* AwaitKeyword */ + ) : Pn(r.modifiers, ia); + case 266: + return CX( + r, + 87 + /* ConstKeyword */ + ); + default: + E.assertNever(r); + } + } + } + function y_t(r) { + const a = v_t(r); + return a && Jl(a, p.Decorators_are_not_valid_here); + } + function v_t(r) { + return vz(r) ? Pn(r.modifiers, ll) : void 0; + } + function b_t(r, a) { + switch (r.kind) { + case 174: + case 262: + case 218: + case 219: + return !1; + } + return hr(a, p._0_modifier_cannot_be_used_here, "async"); + } + function sC(r, a = p.Trailing_comma_not_allowed) { + return r && r.hasTrailingComma ? Y2(r[0], r.end - 1, 1, a) : !1; + } + function J7e(r, a) { + if (r && r.length === 0) { + const l = r.pos - 1, f = aa(a.text, r.end) + 1; + return Y2(a, l, f - l, p.Type_parameter_list_cannot_be_empty); + } + return !1; + } + function S_t(r) { + let a = !1; + const l = r.length; + for (let f = 0; f < l; f++) { + const d = r[f]; + if (d.dotDotDotToken) { + if (f !== l - 1) + return hr(d.dotDotDotToken, p.A_rest_parameter_must_be_last_in_a_parameter_list); + if (d.flags & 33554432 || sC(r, p.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma), d.questionToken) + return hr(d.questionToken, p.A_rest_parameter_cannot_be_optional); + if (d.initializer) + return hr(d.name, p.A_rest_parameter_cannot_have_an_initializer); + } else if (MG(d)) { + if (a = !0, d.questionToken && d.initializer) + return hr(d.name, p.Parameter_cannot_have_question_mark_and_initializer); + } else if (a && !d.initializer) + return hr(d.name, p.A_required_parameter_cannot_follow_an_optional_parameter); + } + } + function T_t(r) { + return kn(r, (a) => !!a.initializer || Ds(a.name) || Zm(a)); + } + function x_t(r) { + if (R >= 3) { + const a = r.body && ks(r.body) && mz(r.body.statements); + if (a) { + const l = T_t(r.parameters); + if (Ir(l)) { + lr(l, (d) => { + Bs( + je(d, p.This_parameter_is_not_allowed_with_use_strict_directive), + tn(a, p.use_strict_directive_used_here) + ); + }); + const f = l.map((d, y) => y === 0 ? tn(d, p.Non_simple_parameter_declared_here) : tn(d, p.and_here)); + return Bs(je(a, p.use_strict_directive_cannot_be_used_with_non_simple_parameter_list), ...f), !0; + } + } + } + return !1; + } + function EX(r) { + const a = Cr(r); + return yh(r) || J7e(r.typeParameters, a) || S_t(r.parameters) || C_t(r, a) || Ka(r) && x_t(r); + } + function k_t(r) { + const a = Cr(r); + return N_t(r) || J7e(r.typeParameters, a); + } + function C_t(r, a) { + if (!bo(r)) + return !1; + r.typeParameters && !(Ir(r.typeParameters) > 1 || r.typeParameters.hasTrailingComma || r.typeParameters[0].constraint) && a && vc(a.fileName, [ + ".mts", + ".cts" + /* Cts */ + ]) && hr(r.typeParameters[0], p.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint); + const { equalsGreaterThanToken: l } = r, f = js(a, l.pos).line, d = js(a, l.end).line; + return f !== d && hr(l, p.Line_terminator_not_permitted_before_arrow); + } + function E_t(r) { + const a = r.parameters[0]; + if (r.parameters.length !== 1) + return hr(a ? a.name : r, p.An_index_signature_must_have_exactly_one_parameter); + if (sC(r.parameters, p.An_index_signature_cannot_have_a_trailing_comma), a.dotDotDotToken) + return hr(a.dotDotDotToken, p.An_index_signature_cannot_have_a_rest_parameter); + if (qB(a)) + return hr(a.name, p.An_index_signature_parameter_cannot_have_an_accessibility_modifier); + if (a.questionToken) + return hr(a.questionToken, p.An_index_signature_parameter_cannot_have_a_question_mark); + if (a.initializer) + return hr(a.name, p.An_index_signature_parameter_cannot_have_an_initializer); + if (!a.type) + return hr(a.name, p.An_index_signature_parameter_must_have_a_type_annotation); + const l = wi(a.type); + return kp(l, (f) => !!(f.flags & 8576)) || sb(l) ? hr(a.name, p.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead) : J_(l, WG) ? r.type ? !1 : hr(r, p.An_index_signature_must_have_a_type_annotation) : hr(a.name, p.An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type); + } + function D_t(r) { + return yh(r) || E_t(r); + } + function w_t(r, a) { + if (a && a.length === 0) { + const l = Cr(r), f = a.pos - 1, d = aa(l.text, a.end) + 1; + return Y2(l, f, d - f, p.Type_argument_list_cannot_be_empty); + } + return !1; + } + function oR(r, a) { + return sC(a) || w_t(r, a); + } + function P_t(r) { + return r.questionDotToken || r.flags & 64 ? hr(r.template, p.Tagged_template_expressions_are_not_permitted_in_an_optional_chain) : !1; + } + function z7e(r) { + const a = r.types; + if (sC(a)) + return !0; + if (a && a.length === 0) { + const l = Xs(r.token); + return Y2(r, a.pos, 0, p._0_list_cannot_be_empty, l); + } + return at(a, W7e); + } + function W7e(r) { + return Lh(r) && vD(r.expression) && r.typeArguments ? hr(r, p.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments) : oR(r, r.typeArguments); + } + function N_t(r) { + let a = !1, l = !1; + if (!yh(r) && r.heritageClauses) + for (const f of r.heritageClauses) { + if (f.token === 96) { + if (a) + return Jl(f, p.extends_clause_already_seen); + if (l) + return Jl(f, p.extends_clause_must_precede_implements_clause); + if (f.types.length > 1) + return Jl(f.types[1], p.Classes_can_only_extend_a_single_class); + a = !0; + } else { + if (E.assert( + f.token === 119 + /* ImplementsKeyword */ + ), l) + return Jl(f, p.implements_clause_already_seen); + l = !0; + } + z7e(f); + } + } + function A_t(r) { + let a = !1; + if (r.heritageClauses) + for (const l of r.heritageClauses) { + if (l.token === 96) { + if (a) + return Jl(l, p.extends_clause_already_seen); + a = !0; + } else + return E.assert( + l.token === 119 + /* ImplementsKeyword */ + ), Jl(l, p.Interface_declaration_cannot_have_implements_clause); + z7e(l); + } + return !1; + } + function DX(r) { + if (r.kind !== 167) + return !1; + const a = r; + return a.expression.kind === 226 && a.expression.operatorToken.kind === 28 ? hr(a.expression, p.A_comma_expression_is_not_allowed_in_a_computed_property_name) : !1; + } + function Fme(r) { + if (r.asteriskToken) { + if (E.assert( + r.kind === 262 || r.kind === 218 || r.kind === 174 + /* MethodDeclaration */ + ), r.flags & 33554432) + return hr(r.asteriskToken, p.Generators_are_not_allowed_in_an_ambient_context); + if (!r.body) + return hr(r.asteriskToken, p.An_overload_signature_cannot_be_declared_as_a_generator); + } + } + function Ome(r, a) { + return !!r && hr(r, a); + } + function U7e(r, a) { + return !!r && hr(r, a); + } + function I_t(r, a) { + const l = /* @__PURE__ */ new Map(); + for (const f of r.properties) { + if (f.kind === 305) { + if (a) { + const x = za(f.expression); + if (Ql(x) || oa(x)) + return hr(f.expression, p.A_rest_element_cannot_contain_a_binding_pattern); + } + continue; + } + const d = f.name; + if (d.kind === 167 && DX(d), f.kind === 304 && !a && f.objectAssignmentInitializer && hr(f.equalsToken, p.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern), d.kind === 81 && hr(d, p.Private_identifiers_are_not_allowed_outside_class_bodies), Jp(f) && f.modifiers) + for (const x of f.modifiers) + ia(x) && (x.kind !== 134 || f.kind !== 174) && hr(x, p._0_modifier_cannot_be_used_here, qo(x)); + else if (qte(f) && f.modifiers) + for (const x of f.modifiers) + ia(x) && hr(x, p._0_modifier_cannot_be_used_here, qo(x)); + let y; + switch (f.kind) { + case 304: + case 303: + U7e(f.exclamationToken, p.A_definite_assignment_assertion_is_not_permitted_in_this_context), Ome(f.questionToken, p.An_object_member_cannot_be_declared_optional), d.kind === 9 && Y7e(d), d.kind === 10 && Qh( + /*isError*/ + !0, + tn(d, p.A_bigint_literal_cannot_be_used_as_a_property_name) + ), y = 4; + break; + case 174: + y = 8; + break; + case 177: + y = 1; + break; + case 178: + y = 2; + break; + default: + E.assertNever(f, "Unexpected syntax kind:" + f.kind); + } + if (!a) { + const x = Rme(d); + if (x === void 0) + continue; + const I = l.get(x); + if (!I) + l.set(x, y); + else if (y & 8 && I & 8) + hr(d, p.Duplicate_identifier_0, qo(d)); + else if (y & 4 && I & 4) + hr(d, p.An_object_literal_cannot_have_multiple_properties_with_the_same_name, qo(d)); + else if (y & 3 && I & 3) + if (I !== 3 && y !== I) + l.set(x, y | I); + else + return hr(d, p.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name); + else + return hr(d, p.An_object_literal_cannot_have_property_and_accessor_with_the_same_name); + } + } + } + function F_t(r) { + O_t(r.tagName), oR(r, r.typeArguments); + const a = /* @__PURE__ */ new Map(); + for (const l of r.attributes.properties) { + if (l.kind === 293) + continue; + const { name: f, initializer: d } = l, y = _D(f); + if (!a.get(y)) + a.set(y, !0); + else + return hr(f, p.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); + if (d && d.kind === 294 && !d.expression) + return hr(d, p.JSX_attributes_must_only_be_assigned_a_non_empty_expression); + } + } + function O_t(r) { + if (Tn(r) && wd(r.expression)) + return hr(r.expression, p.JSX_property_access_expressions_cannot_include_JSX_namespace_names); + if (wd(r) && F5(F) && !BC(r.namespace.escapedText)) + return hr(r, p.React_components_cannot_include_JSX_namespace_names); + } + function L_t(r) { + if (r.expression && PD(r.expression)) + return hr(r.expression, p.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array); + } + function V7e(r) { + if (h0(r)) + return !0; + if (r.kind === 250 && r.awaitModifier && !(r.flags & 65536)) { + const a = Cr(r); + if (z7(r)) { + if (!q1(a)) + switch (EC(a, F) || Pa.add(tn(r.awaitModifier, p.for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module)), W) { + case 100: + case 199: + if (a.impliedNodeFormat === 1) { + Pa.add( + tn(r.awaitModifier, p.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level) + ); + break; + } + // fallthrough + case 7: + case 99: + case 200: + case 4: + if (R >= 4) + break; + // fallthrough + default: + Pa.add( + tn(r.awaitModifier, p.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher) + ); + break; + } + } else if (!q1(a)) { + const l = tn(r.awaitModifier, p.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules), f = ff(r); + if (f && f.kind !== 176) { + E.assert((Oc(f) & 2) === 0, "Enclosing function should never be an async function."); + const d = tn(f, p.Did_you_mean_to_mark_this_function_as_async); + Bs(l, d); + } + return Pa.add(l), !0; + } + } + if (gN(r) && !(r.flags & 65536) && Me(r.initializer) && r.initializer.escapedText === "async") + return hr(r.initializer, p.The_left_hand_side_of_a_for_of_statement_may_not_be_async), !1; + if (r.initializer.kind === 261) { + const a = r.initializer; + if (!Mme(a)) { + const l = a.declarations; + if (!l.length) + return !1; + if (l.length > 1) { + const d = r.kind === 249 ? p.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : p.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; + return Jl(a.declarations[1], d); + } + const f = l[0]; + if (f.initializer) { + const d = r.kind === 249 ? p.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : p.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; + return hr(f.name, d); + } + if (f.type) { + const d = r.kind === 249 ? p.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : p.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; + return hr(f, d); + } + } + } + return !1; + } + function M_t(r) { + if (!(r.flags & 33554432) && r.parent.kind !== 187 && r.parent.kind !== 264) { + if (R < 2 && Ni(r.name)) + return hr(r.name, p.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher); + if (r.body === void 0 && !$n( + r, + 64 + /* Abstract */ + )) + return Y2(r, r.end - 1, 1, p._0_expected, "{"); + } + if (r.body) { + if ($n( + r, + 64 + /* Abstract */ + )) + return hr(r, p.An_abstract_accessor_cannot_have_an_implementation); + if (r.parent.kind === 187 || r.parent.kind === 264) + return hr(r.body, p.An_implementation_cannot_be_declared_in_ambient_contexts); + } + if (r.typeParameters) + return hr(r.name, p.An_accessor_cannot_have_type_parameters); + if (!R_t(r)) + return hr( + r.name, + r.kind === 177 ? p.A_get_accessor_cannot_have_parameters : p.A_set_accessor_must_have_exactly_one_parameter + ); + if (r.kind === 178) { + if (r.type) + return hr(r.name, p.A_set_accessor_cannot_have_a_return_type_annotation); + const a = E.checkDefined(V4(r), "Return value does not match parameter count assertion."); + if (a.dotDotDotToken) + return hr(a.dotDotDotToken, p.A_set_accessor_cannot_have_rest_parameter); + if (a.questionToken) + return hr(a.questionToken, p.A_set_accessor_cannot_have_an_optional_parameter); + if (a.initializer) + return hr(r.name, p.A_set_accessor_parameter_cannot_have_an_initializer); + } + return !1; + } + function R_t(r) { + return Lme(r) || r.parameters.length === (r.kind === 177 ? 0 : 1); + } + function Lme(r) { + if (r.parameters.length === (r.kind === 177 ? 1 : 2)) + return jb(r); + } + function j_t(r) { + if (r.operator === 158) { + if (r.type.kind !== 155) + return hr(r.type, p._0_expected, Xs( + 155 + /* SymbolKeyword */ + )); + let a = C3(r.parent); + if (an(a) && hv(a)) { + const l = Ob(a); + l && (a = hx(l) || l); + } + switch (a.kind) { + case 260: + const l = a; + if (l.name.kind !== 80) + return hr(r, p.unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name); + if (!w4(l)) + return hr(r, p.unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement); + if (!(l.parent.flags & 2)) + return hr(a.name, p.A_variable_whose_type_is_a_unique_symbol_type_must_be_const); + break; + case 172: + if (!Vs(a) || !kS(a)) + return hr(a.name, p.A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly); + break; + case 171: + if (!$n( + a, + 8 + /* Readonly */ + )) + return hr(a.name, p.A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly); + break; + default: + return hr(r, p.unique_symbol_types_are_not_allowed_here); + } + } else if (r.operator === 148 && r.type.kind !== 188 && r.type.kind !== 189) + return Jl(r, p.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types, Xs( + 155 + /* SymbolKeyword */ + )); + } + function cP(r, a) { + if (BKe(r)) + return hr(r, a); + } + function q7e(r) { + if (EX(r)) + return !0; + if (r.kind === 174) { + if (r.parent.kind === 210) { + if (r.modifiers && !(r.modifiers.length === 1 && ya(r.modifiers).kind === 134)) + return Jl(r, p.Modifiers_cannot_appear_here); + if (Ome(r.questionToken, p.An_object_member_cannot_be_declared_optional)) + return !0; + if (U7e(r.exclamationToken, p.A_definite_assignment_assertion_is_not_permitted_in_this_context)) + return !0; + if (r.body === void 0) + return Y2(r, r.end - 1, 1, p._0_expected, "{"); + } + if (Fme(r)) + return !0; + } + if (Zn(r.parent)) { + if (R < 2 && Ni(r.name)) + return hr(r.name, p.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher); + if (r.flags & 33554432) + return cP(r.name, p.A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); + if (r.kind === 174 && !r.body) + return cP(r.name, p.A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); + } else { + if (r.parent.kind === 264) + return cP(r.name, p.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); + if (r.parent.kind === 187) + return cP(r.name, p.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); + } + } + function B_t(r) { + let a = r; + for (; a; ) { + if (bC(a)) + return hr(r, p.Jump_target_cannot_cross_function_boundary); + switch (a.kind) { + case 256: + if (r.label && a.label.escapedText === r.label.escapedText) + return r.kind === 251 && !zy( + a.statement, + /*lookInLabeledStatements*/ + !0 + ) ? hr(r, p.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement) : !1; + break; + case 255: + if (r.kind === 252 && !r.label) + return !1; + break; + default: + if (zy( + a, + /*lookInLabeledStatements*/ + !1 + ) && !r.label) + return !1; + break; + } + a = a.parent; + } + if (r.label) { + const l = r.kind === 252 ? p.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : p.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; + return hr(r, l); + } else { + const l = r.kind === 252 ? p.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : p.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; + return hr(r, l); + } + } + function J_t(r) { + if (r.dotDotDotToken) { + const a = r.parent.elements; + if (r !== _a(a)) + return hr(r, p.A_rest_element_must_be_last_in_a_destructuring_pattern); + if (sC(a, p.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma), r.propertyName) + return hr(r.name, p.A_rest_element_cannot_have_a_property_name); + } + if (r.dotDotDotToken && r.initializer) + return Y2(r, r.initializer.pos - 1, 1, p.A_rest_element_cannot_have_an_initializer); + } + function H7e(r) { + return wf(r) || r.kind === 224 && r.operator === 41 && r.operand.kind === 9; + } + function z_t(r) { + return r.kind === 10 || r.kind === 224 && r.operator === 41 && r.operand.kind === 10; + } + function W_t(r) { + if ((Tn(r) || fo(r) && H7e(r.argumentExpression)) && _o(r.expression)) + return !!(uc(r).flags & 1056); + } + function G7e(r) { + const a = r.initializer; + if (a) { + const l = !(H7e(a) || W_t(a) || a.kind === 112 || a.kind === 97 || z_t(a)); + if ((t3(r) || Kn(r) && CI(r)) && !r.type) { + if (l) + return hr(a, p.A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference); + } else + return hr(a, p.Initializers_are_not_allowed_in_ambient_contexts); + } + } + function U_t(r) { + const a = Z2(r), l = a & 7; + if (Ds(r.name)) + switch (l) { + case 6: + return hr(r, p._0_declarations_may_not_have_binding_patterns, "await using"); + case 4: + return hr(r, p._0_declarations_may_not_have_binding_patterns, "using"); + } + if (r.parent.parent.kind !== 249 && r.parent.parent.kind !== 250) { + if (a & 33554432) + G7e(r); + else if (!r.initializer) { + if (Ds(r.name) && !Ds(r.parent)) + return hr(r, p.A_destructuring_declaration_must_have_an_initializer); + switch (l) { + case 6: + return hr(r, p._0_declarations_must_be_initialized, "await using"); + case 4: + return hr(r, p._0_declarations_must_be_initialized, "using"); + case 2: + return hr(r, p._0_declarations_must_be_initialized, "const"); + } + } + } + if (r.exclamationToken && (r.parent.parent.kind !== 243 || !r.type || r.initializer || a & 33554432)) { + const f = r.initializer ? p.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions : r.type ? p.A_definite_assignment_assertion_is_not_permitted_in_this_context : p.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations; + return hr(r.exclamationToken, f); + } + return e.getEmitModuleFormatOfFile(Cr(r)) < 4 && !(r.parent.parent.flags & 33554432) && $n( + r.parent.parent, + 32 + /* Export */ + ) && $7e(r.name), !!l && X7e(r.name); + } + function $7e(r) { + if (r.kind === 80) { + if (An(r) === "__esModule") + return H_t("noEmit", r, p.Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules); + } else { + const a = r.elements; + for (const l of a) + if (!ul(l)) + return $7e(l.name); + } + return !1; + } + function X7e(r) { + if (r.kind === 80) { + if (r.escapedText === "let") + return hr(r, p.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations); + } else { + const a = r.elements; + for (const l of a) + ul(l) || X7e(l.name); + } + return !1; + } + function Mme(r) { + const a = r.declarations; + if (sC(r.declarations)) + return !0; + if (!r.declarations.length) + return Y2(r, a.pos, a.end - a.pos, p.Variable_declaration_list_cannot_be_empty); + const l = r.flags & 7; + return (l === 4 || l === 6) && yF(r.parent) ? hr( + r, + l === 4 ? p.The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration : p.The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration + ) : l === 6 ? _Ie(r) : !1; + } + function wX(r) { + switch (r.kind) { + case 245: + case 246: + case 247: + case 254: + case 248: + case 249: + case 250: + return !1; + case 256: + return wX(r.parent); + } + return !0; + } + function V_t(r) { + if (!wX(r.parent)) { + const a = Z2(r.declarationList) & 7; + if (a) { + const l = a === 1 ? "let" : a === 2 ? "const" : a === 4 ? "using" : a === 6 ? "await using" : E.fail("Unknown BlockScope flag"); + return hr(r, p._0_declarations_can_only_be_declared_inside_a_block, l); + } + } + } + function q_t(r) { + const a = r.name.escapedText; + switch (r.keywordToken) { + case 105: + if (a !== "target") + return hr(r.name, p._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, Pi(r.name.escapedText), Xs(r.keywordToken), "target"); + break; + case 102: + if (a !== "meta") + return hr(r.name, p._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, Pi(r.name.escapedText), Xs(r.keywordToken), "meta"); + break; + } + } + function q1(r) { + return r.parseDiagnostics.length > 0; + } + function Jl(r, a, ...l) { + const f = Cr(r); + if (!q1(f)) { + const d = rm(f, r.pos); + return Pa.add(ol(f, d.start, d.length, a, ...l)), !0; + } + return !1; + } + function Y2(r, a, l, f, ...d) { + const y = Cr(r); + return q1(y) ? !1 : (Pa.add(ol(y, a, l, f, ...d)), !0); + } + function H_t(r, a, l, ...f) { + const d = Cr(a); + return q1(d) ? !1 : (qp(r, a, l, ...f), !0); + } + function hr(r, a, ...l) { + const f = Cr(r); + return q1(f) ? !1 : (Pa.add(tn(r, a, ...l)), !0); + } + function G_t(r) { + const a = an(r) ? d5(r) : void 0, l = r.typeParameters || a && Uc(a); + if (l) { + const f = l.pos === l.end ? l.pos : aa(Cr(r).text, l.pos); + return Y2(r, f, l.end - f, p.Type_parameters_cannot_appear_on_a_constructor_declaration); + } + } + function $_t(r) { + const a = r.type || pf(r); + if (a) + return hr(a, p.Type_annotation_cannot_appear_on_a_constructor_declaration); + } + function X_t(r) { + if (fa(r.name) && fn(r.name.expression) && r.name.expression.operatorToken.kind === 103) + return hr(r.parent.members[0], p.A_mapped_type_may_not_declare_properties_or_methods); + if (Zn(r.parent)) { + if (ea(r.name) && r.name.text === "constructor") + return hr(r.name, p.Classes_may_not_have_a_field_named_constructor); + if (cP(r.name, p.A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type)) + return !0; + if (R < 2 && Ni(r.name)) + return hr(r.name, p.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher); + if (R < 2 && l_(r)) + return hr(r.name, p.Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher); + if (l_(r) && Ome(r.questionToken, p.An_accessor_property_cannot_be_declared_optional)) + return !0; + } else if (r.parent.kind === 264) { + if (cP(r.name, p.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)) + return !0; + if (E.assertNode(r, m_), r.initializer) + return hr(r.initializer, p.An_interface_property_cannot_have_an_initializer); + } else if (Qu(r.parent)) { + if (cP(r.name, p.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)) + return !0; + if (E.assertNode(r, m_), r.initializer) + return hr(r.initializer, p.A_type_literal_property_cannot_have_an_initializer); + } + if (r.flags & 33554432 && G7e(r), ss(r) && r.exclamationToken && (!Zn(r.parent) || !r.type || r.initializer || r.flags & 33554432 || Vs(r) || Wb(r))) { + const a = r.initializer ? p.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions : r.type ? p.A_definite_assignment_assertion_is_not_permitted_in_this_context : p.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations; + return hr(r.exclamationToken, a); + } + } + function Q_t(r) { + return r.kind === 264 || r.kind === 265 || r.kind === 272 || r.kind === 271 || r.kind === 278 || r.kind === 277 || r.kind === 270 || $n( + r, + 2208 + /* Default */ + ) ? !1 : Jl(r, p.Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier); + } + function Y_t(r) { + for (const a of r.statements) + if ((bl(a) || a.kind === 243) && Q_t(a)) + return !0; + return !1; + } + function Q7e(r) { + return !!(r.flags & 33554432) && Y_t(r); + } + function h0(r) { + if (r.flags & 33554432) { + if (!yn(r).hasReportedStatementInAmbientContext && (vs(r.parent) || Jy(r.parent))) + return yn(r).hasReportedStatementInAmbientContext = Jl(r, p.An_implementation_cannot_be_declared_in_ambient_contexts); + if (r.parent.kind === 241 || r.parent.kind === 268 || r.parent.kind === 307) { + const l = yn(r.parent); + if (!l.hasReportedStatementInAmbientContext) + return l.hasReportedStatementInAmbientContext = Jl(r, p.Statements_are_not_allowed_in_ambient_contexts); + } + } + return !1; + } + function Y7e(r) { + const a = qo(r).includes("."), l = r.numericLiteralFlags & 16; + a || l || +r.text <= 2 ** 53 - 1 || Qh( + /*isError*/ + !1, + tn(r, p.Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers) + ); + } + function Z_t(r) { + return !!(!(M0(r.parent) || pv(r.parent) && M0(r.parent.parent)) && R < 7 && hr(r, p.BigInt_literals_are_not_available_when_targeting_lower_than_ES2020)); + } + function K_t(r, a, ...l) { + const f = Cr(r); + if (!q1(f)) { + const d = rm(f, r.pos); + return Pa.add(ol( + f, + Yo(d), + /*length*/ + 0, + a, + ...l + )), !0; + } + return !1; + } + function eft() { + return ac || (ac = [], Oe.forEach((r, a) => { + cne.test(a) && ac.push(r); + })), ac; + } + function tft(r) { + var a; + return r.isTypeOnly && r.name && r.namedBindings ? hr(r, p.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both) : r.isTypeOnly && ((a = r.namedBindings) == null ? void 0 : a.kind) === 275 ? Z7e(r.namedBindings) : !1; + } + function Z7e(r) { + return !!lr(r.elements, (a) => { + if (a.isTypeOnly) + return Jl( + a, + a.kind === 276 ? p.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement : p.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement + ); + }); + } + function rft(r) { + if (F.verbatimModuleSyntax && W === 1) + return hr(r, p.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); + if (W === 5) + return hr(r, p.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext); + if (r.typeArguments) + return hr(r, p.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments); + const a = r.arguments; + if (W !== 99 && W !== 199 && W !== 100 && W !== 200 && (sC(a), a.length > 1)) { + const f = a[1]; + return hr(f, p.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_nodenext_or_preserve); + } + if (a.length === 0 || a.length > 2) + return hr(r, p.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments); + const l = Pn(a, lp); + return l ? hr(l, p.Argument_of_dynamic_import_cannot_be_spread_element) : !1; + } + function nft(r, a) { + const l = Cn(r); + if (l & 20 && a.flags & 1048576) + return Pn(a.types, (f) => { + if (f.flags & 524288) { + const d = l & Cn(f); + if (d & 4) + return r.target === f.target; + if (d & 16) + return !!r.aliasSymbol && r.aliasSymbol === f.aliasSymbol; + } + return !1; + }); + } + function ift(r, a) { + if (Cn(r) & 128 && kp(a, my)) + return Pn(a.types, (l) => !my(l)); + } + function sft(r, a) { + let l = 0; + if (Ps(r, l).length > 0 || (l = 1, Ps(r, l).length > 0)) + return Pn(a.types, (d) => Ps(d, l).length > 0); + } + function aft(r, a) { + let l; + if (!(r.flags & 406978556)) { + let f = 0; + for (const d of a.types) + if (!(d.flags & 406978556)) { + const y = ra([Bm(r), Bm(d)]); + if (y.flags & 4194304) + return d; + if (qd(y) || y.flags & 1048576) { + const x = y.flags & 1048576 ? b0(y.types, qd) : 1; + x >= f && (l = d, f = x); + } + } + } + return l; + } + function oft(r) { + if (hc( + r, + 67108864 + /* NonPrimitive */ + )) { + const a = Jc(r, (l) => !(l.flags & 402784252)); + if (!(a.flags & 131072)) + return a; + } + return r; + } + function K7e(r, a, l) { + if (a.flags & 1048576 && r.flags & 2621440) { + const f = ZNe(a, r); + if (f) + return f; + const d = qa(r); + if (d) { + const y = YNe(d, a); + if (y) { + const x = ype(a, gr(y, (I) => [() => en(I), I.escapedName]), l); + if (x !== a) + return x; + } + } + } + } + function Rme(r) { + const a = TS(r); + return a || (fa(r) ? Vpe(au(r.expression)) : void 0); + } + function PX(r) { + return er === r || (er = r, Nr = Q1(r)), Nr; + } + function Z2(r) { + return bt === r || (bt = r, Lt = Ch(r)), Lt; + } + function CI(r) { + const a = Z2(r) & 7; + return a === 2 || a === 4 || a === 6; + } + function cft(r, a) { + const l = F.importHelpers ? 1 : 0, f = r?.imports[l]; + return f && E.assert(no(f) && f.text === a, `Expected sourceFile.imports[${l}] to be the synthesized JSX runtime import`), f; + } + function lft(r) { + E.assert(F.importHelpers, "Expected importHelpers to be enabled"); + const a = r.imports[0]; + return E.assert(a && no(a) && a.text === "tslib", "Expected sourceFile.imports[0] to be the synthesized tslib import"), a; + } + } + function KMe(e) { + return !Jy(e); + } + function v1e(e) { + return e.kind !== 262 && e.kind !== 174 || !!e.body; + } + function b1e(e) { + switch (e.parent.kind) { + case 276: + case 281: + return Me(e) || e.kind === 11; + default: + return tg(e); + } + } + var Ff; + ((e) => { + e.JSX = "JSX", e.IntrinsicElements = "IntrinsicElements", e.ElementClass = "ElementClass", e.ElementAttributesPropertyNameContainer = "ElementAttributesProperty", e.ElementChildrenAttributeNameContainer = "ElementChildrenAttribute", e.Element = "Element", e.ElementType = "ElementType", e.IntrinsicAttributes = "IntrinsicAttributes", e.IntrinsicClassAttributes = "IntrinsicClassAttributes", e.LibraryManagedAttributes = "LibraryManagedAttributes"; + })(Ff || (Ff = {})); + var mW; + ((e) => { + e.Fragment = "Fragment"; + })(mW || (mW = {})); + function S1e(e) { + switch (e) { + case 0: + return "yieldType"; + case 1: + return "returnType"; + case 2: + return "nextType"; + } + } + function ku(e) { + return !!(e.flags & 1); + } + function T1e(e) { + return !!(e.flags & 2); + } + function eRe(e) { + return { + getCommonSourceDirectory: e.getCommonSourceDirectory ? () => e.getCommonSourceDirectory() : () => "", + getCurrentDirectory: () => e.getCurrentDirectory(), + getSymlinkCache: Is(e, e.getSymlinkCache), + getPackageJsonInfoCache: () => { + var t; + return (t = e.getPackageJsonInfoCache) == null ? void 0 : t.call(e); + }, + useCaseSensitiveFileNames: () => e.useCaseSensitiveFileNames(), + redirectTargetsMap: e.redirectTargetsMap, + getProjectReferenceRedirect: (t) => e.getProjectReferenceRedirect(t), + isSourceOfProjectReferenceRedirect: (t) => e.isSourceOfProjectReferenceRedirect(t), + fileExists: (t) => e.fileExists(t), + getFileIncludeReasons: () => e.getFileIncludeReasons(), + readFile: e.readFile ? (t) => e.readFile(t) : void 0, + getDefaultResolutionModeForFile: (t) => e.getDefaultResolutionModeForFile(t), + getModeForResolutionAtIndex: (t, n) => e.getModeForResolutionAtIndex(t, n), + getGlobalTypingsCacheLocation: Is(e, e.getGlobalTypingsCacheLocation) + }; + } + var _ne = class l5e { + constructor(t, n, i) { + this.moduleResolverHost = void 0, this.inner = void 0, this.disableTrackSymbol = !1; + for (var s; n instanceof l5e; ) + n = n.inner; + this.inner = n, this.moduleResolverHost = i, this.context = t, this.canTrackSymbol = !!((s = this.inner) != null && s.trackSymbol); + } + trackSymbol(t, n, i) { + var s, o; + if ((s = this.inner) != null && s.trackSymbol && !this.disableTrackSymbol) { + if (this.inner.trackSymbol(t, n, i)) + return this.onDiagnosticReported(), !0; + t.flags & 262144 || ((o = this.context).trackedSymbols ?? (o.trackedSymbols = [])).push([t, n, i]); + } + return !1; + } + reportInaccessibleThisError() { + var t; + (t = this.inner) != null && t.reportInaccessibleThisError && (this.onDiagnosticReported(), this.inner.reportInaccessibleThisError()); + } + reportPrivateInBaseOfClassExpression(t) { + var n; + (n = this.inner) != null && n.reportPrivateInBaseOfClassExpression && (this.onDiagnosticReported(), this.inner.reportPrivateInBaseOfClassExpression(t)); + } + reportInaccessibleUniqueSymbolError() { + var t; + (t = this.inner) != null && t.reportInaccessibleUniqueSymbolError && (this.onDiagnosticReported(), this.inner.reportInaccessibleUniqueSymbolError()); + } + reportCyclicStructureError() { + var t; + (t = this.inner) != null && t.reportCyclicStructureError && (this.onDiagnosticReported(), this.inner.reportCyclicStructureError()); + } + reportLikelyUnsafeImportRequiredError(t) { + var n; + (n = this.inner) != null && n.reportLikelyUnsafeImportRequiredError && (this.onDiagnosticReported(), this.inner.reportLikelyUnsafeImportRequiredError(t)); + } + reportTruncationError() { + var t; + (t = this.inner) != null && t.reportTruncationError && (this.onDiagnosticReported(), this.inner.reportTruncationError()); + } + reportNonlocalAugmentation(t, n, i) { + var s; + (s = this.inner) != null && s.reportNonlocalAugmentation && (this.onDiagnosticReported(), this.inner.reportNonlocalAugmentation(t, n, i)); + } + reportNonSerializableProperty(t) { + var n; + (n = this.inner) != null && n.reportNonSerializableProperty && (this.onDiagnosticReported(), this.inner.reportNonSerializableProperty(t)); + } + onDiagnosticReported() { + this.context.reportedDiagnostic = !0; + } + reportInferenceFallback(t) { + var n; + (n = this.inner) != null && n.reportInferenceFallback && !this.context.suppressReportInferenceFallback && (this.onDiagnosticReported(), this.inner.reportInferenceFallback(t)); + } + pushErrorFallbackNode(t) { + var n, i; + return (i = (n = this.inner) == null ? void 0 : n.pushErrorFallbackNode) == null ? void 0 : i.call(n, t); + } + popErrorFallbackNode() { + var t, n; + return (n = (t = this.inner) == null ? void 0 : t.popErrorFallbackNode) == null ? void 0 : n.call(t); + } + }; + function Xe(e, t, n, i) { + if (e === void 0) + return e; + const s = t(e); + let o; + if (s !== void 0) + return os(s) ? o = (i || aRe)(s) : o = s, E.assertNode(o, n), o; + } + function Or(e, t, n, i, s) { + if (e === void 0) + return e; + const o = e.length; + (i === void 0 || i < 0) && (i = 0), (s === void 0 || s > o - i) && (s = o - i); + let c, _ = -1, u = -1; + i > 0 || s < o ? c = e.hasTrailingComma && i + s === o : (_ = e.pos, u = e.end, c = e.hasTrailingComma); + const m = x1e(e, t, n, i, s); + if (m !== e) { + const g = N.createNodeArray(m, c); + return Cd(g, _, u), g; + } + return e; + } + function JD(e, t, n, i, s) { + if (e === void 0) + return e; + const o = e.length; + return (i === void 0 || i < 0) && (i = 0), (s === void 0 || s > o - i) && (s = o - i), x1e(e, t, n, i, s); + } + function x1e(e, t, n, i, s) { + let o; + const c = e.length; + (i > 0 || s < c) && (o = []); + for (let _ = 0; _ < s; _++) { + const u = e[_ + i], m = u !== void 0 ? t ? t(u) : u : void 0; + if ((o !== void 0 || m === void 0 || m !== u) && (o === void 0 && (o = e.slice(0, _), E.assertEachNode(o, n)), m)) + if (os(m)) + for (const g of m) + E.assertNode(g, n), o.push(g); + else + E.assertNode(m, n), o.push(m); + } + return o || (E.assertEachNode(e, n), e); + } + function gW(e, t, n, i, s, o = Or) { + return n.startLexicalEnvironment(), e = o(e, t, xi, i), s && (e = n.factory.ensureUseStrict(e)), N.mergeLexicalEnvironment(e, n.endLexicalEnvironment()); + } + function ic(e, t, n, i = Or) { + let s; + return n.startLexicalEnvironment(), e && (n.setLexicalEnvironmentFlags(1, !0), s = i(e, t, Ii), n.getLexicalEnvironmentFlags() & 2 && pa(n.getCompilerOptions()) >= 2 && (s = tRe(s, n)), n.setLexicalEnvironmentFlags(1, !1)), n.suspendLexicalEnvironment(), s; + } + function tRe(e, t) { + let n; + for (let i = 0; i < e.length; i++) { + const s = e[i], o = rRe(s, t); + (n || o !== s) && (n || (n = e.slice(0, i)), n[i] = o); + } + return n ? ot(t.factory.createNodeArray(n, e.hasTrailingComma), e) : e; + } + function rRe(e, t) { + return e.dotDotDotToken ? e : Ds(e.name) ? nRe(e, t) : e.initializer ? iRe(e, e.name, e.initializer, t) : e; + } + function nRe(e, t) { + const { factory: n } = t; + return t.addInitializationStatement( + n.createVariableStatement( + /*modifiers*/ + void 0, + n.createVariableDeclarationList([ + n.createVariableDeclaration( + e.name, + /*exclamationToken*/ + void 0, + e.type, + e.initializer ? n.createConditionalExpression( + n.createStrictEquality( + n.getGeneratedNameForNode(e), + n.createVoidZero() + ), + /*questionToken*/ + void 0, + e.initializer, + /*colonToken*/ + void 0, + n.getGeneratedNameForNode(e) + ) : n.getGeneratedNameForNode(e) + ) + ]) + ) + ), n.updateParameterDeclaration( + e, + e.modifiers, + e.dotDotDotToken, + n.getGeneratedNameForNode(e), + e.questionToken, + e.type, + /*initializer*/ + void 0 + ); + } + function iRe(e, t, n, i) { + const s = i.factory; + return i.addInitializationStatement( + s.createIfStatement( + s.createTypeCheck(s.cloneNode(t), "undefined"), + on( + ot( + s.createBlock([ + s.createExpressionStatement( + on( + ot( + s.createAssignment( + on( + s.cloneNode(t), + 96 + /* NoSourceMap */ + ), + on( + n, + 96 | va(n) | 3072 + /* NoComments */ + ) + ), + e + ), + 3072 + /* NoComments */ + ) + ) + ]), + e + ), + 3905 + /* NoComments */ + ) + ) + ), s.updateParameterDeclaration( + e, + e.modifiers, + e.dotDotDotToken, + e.name, + e.questionToken, + e.type, + /*initializer*/ + void 0 + ); + } + function Of(e, t, n, i = Xe) { + n.resumeLexicalEnvironment(); + const s = i(e, t, d7), o = n.endLexicalEnvironment(); + if (at(o)) { + if (!s) + return n.factory.createBlock(o); + const c = n.factory.converters.convertToFunctionBlock(s), _ = N.mergeLexicalEnvironment(c.statements, o); + return n.factory.updateBlock(c, _); + } + return s; + } + function Zu(e, t, n, i = Xe) { + n.startBlockScope(); + const s = i(e, t, xi, n.factory.liftToBlock); + E.assert(s); + const o = n.endBlockScope(); + return at(o) ? ks(s) ? (o.push(...s.statements), n.factory.updateBlock(s, o)) : (o.push(s), n.factory.createBlock(o)) : s; + } + function _O(e, t, n = t) { + if (n === t || e.length <= 1) + return Or(e, t, ct); + let i = 0; + const s = e.length; + return Or(e, (o) => { + const c = i < s - 1; + return i++, c ? n(o) : t(o); + }, ct); + } + function kr(e, t, n = YN, i = Or, s, o = Xe) { + if (e === void 0) + return; + const c = sRe[e.kind]; + return c === void 0 ? e : c(e, t, n, i, o, s); + } + var sRe = { + 166: function(t, n, i, s, o, c) { + return i.factory.updateQualifiedName( + t, + E.checkDefined(o(t.left, n, Hu)), + E.checkDefined(o(t.right, n, Me)) + ); + }, + 167: function(t, n, i, s, o, c) { + return i.factory.updateComputedPropertyName( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + // Signature elements + 168: function(t, n, i, s, o, c) { + return i.factory.updateTypeParameterDeclaration( + t, + s(t.modifiers, n, ia), + E.checkDefined(o(t.name, n, Me)), + o(t.constraint, n, fi), + o(t.default, n, fi) + ); + }, + 169: function(t, n, i, s, o, c) { + return i.factory.updateParameterDeclaration( + t, + s(t.modifiers, n, Oo), + c ? o(t.dotDotDotToken, c, lF) : t.dotDotDotToken, + E.checkDefined(o(t.name, n, uS)), + c ? o(t.questionToken, c, t1) : t.questionToken, + o(t.type, n, fi), + o(t.initializer, n, ct) + ); + }, + 170: function(t, n, i, s, o, c) { + return i.factory.updateDecorator( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + // Type elements + 171: function(t, n, i, s, o, c) { + return i.factory.updatePropertySignature( + t, + s(t.modifiers, n, ia), + E.checkDefined(o(t.name, n, Fc)), + c ? o(t.questionToken, c, t1) : t.questionToken, + o(t.type, n, fi) + ); + }, + 172: function(t, n, i, s, o, c) { + return i.factory.updatePropertyDeclaration( + t, + s(t.modifiers, n, Oo), + E.checkDefined(o(t.name, n, Fc)), + // QuestionToken and ExclamationToken are mutually exclusive in PropertyDeclaration + c ? o(t.questionToken ?? t.exclamationToken, c, Hte) : t.questionToken ?? t.exclamationToken, + o(t.type, n, fi), + o(t.initializer, n, ct) + ); + }, + 173: function(t, n, i, s, o, c) { + return i.factory.updateMethodSignature( + t, + s(t.modifiers, n, ia), + E.checkDefined(o(t.name, n, Fc)), + c ? o(t.questionToken, c, t1) : t.questionToken, + s(t.typeParameters, n, Ao), + s(t.parameters, n, Ii), + o(t.type, n, fi) + ); + }, + 174: function(t, n, i, s, o, c) { + return i.factory.updateMethodDeclaration( + t, + s(t.modifiers, n, Oo), + c ? o(t.asteriskToken, c, fN) : t.asteriskToken, + E.checkDefined(o(t.name, n, Fc)), + c ? o(t.questionToken, c, t1) : t.questionToken, + s(t.typeParameters, n, Ao), + ic(t.parameters, n, i, s), + o(t.type, n, fi), + Of(t.body, n, i, o) + ); + }, + 176: function(t, n, i, s, o, c) { + return i.factory.updateConstructorDeclaration( + t, + s(t.modifiers, n, Oo), + ic(t.parameters, n, i, s), + Of(t.body, n, i, o) + ); + }, + 177: function(t, n, i, s, o, c) { + return i.factory.updateGetAccessorDeclaration( + t, + s(t.modifiers, n, Oo), + E.checkDefined(o(t.name, n, Fc)), + ic(t.parameters, n, i, s), + o(t.type, n, fi), + Of(t.body, n, i, o) + ); + }, + 178: function(t, n, i, s, o, c) { + return i.factory.updateSetAccessorDeclaration( + t, + s(t.modifiers, n, Oo), + E.checkDefined(o(t.name, n, Fc)), + ic(t.parameters, n, i, s), + Of(t.body, n, i, o) + ); + }, + 175: function(t, n, i, s, o, c) { + return i.startLexicalEnvironment(), i.suspendLexicalEnvironment(), i.factory.updateClassStaticBlockDeclaration( + t, + Of(t.body, n, i, o) + ); + }, + 179: function(t, n, i, s, o, c) { + return i.factory.updateCallSignature( + t, + s(t.typeParameters, n, Ao), + s(t.parameters, n, Ii), + o(t.type, n, fi) + ); + }, + 180: function(t, n, i, s, o, c) { + return i.factory.updateConstructSignature( + t, + s(t.typeParameters, n, Ao), + s(t.parameters, n, Ii), + o(t.type, n, fi) + ); + }, + 181: function(t, n, i, s, o, c) { + return i.factory.updateIndexSignature( + t, + s(t.modifiers, n, Oo), + s(t.parameters, n, Ii), + E.checkDefined(o(t.type, n, fi)) + ); + }, + // Types + 182: function(t, n, i, s, o, c) { + return i.factory.updateTypePredicateNode( + t, + o(t.assertsModifier, n, fte), + E.checkDefined(o(t.parameterName, n, Gte)), + o(t.type, n, fi) + ); + }, + 183: function(t, n, i, s, o, c) { + return i.factory.updateTypeReferenceNode( + t, + E.checkDefined(o(t.typeName, n, Hu)), + s(t.typeArguments, n, fi) + ); + }, + 184: function(t, n, i, s, o, c) { + return i.factory.updateFunctionTypeNode( + t, + s(t.typeParameters, n, Ao), + s(t.parameters, n, Ii), + E.checkDefined(o(t.type, n, fi)) + ); + }, + 185: function(t, n, i, s, o, c) { + return i.factory.updateConstructorTypeNode( + t, + s(t.modifiers, n, ia), + s(t.typeParameters, n, Ao), + s(t.parameters, n, Ii), + E.checkDefined(o(t.type, n, fi)) + ); + }, + 186: function(t, n, i, s, o, c) { + return i.factory.updateTypeQueryNode( + t, + E.checkDefined(o(t.exprName, n, Hu)), + s(t.typeArguments, n, fi) + ); + }, + 187: function(t, n, i, s, o, c) { + return i.factory.updateTypeLiteralNode( + t, + s(t.members, n, kb) + ); + }, + 188: function(t, n, i, s, o, c) { + return i.factory.updateArrayTypeNode( + t, + E.checkDefined(o(t.elementType, n, fi)) + ); + }, + 189: function(t, n, i, s, o, c) { + return i.factory.updateTupleTypeNode( + t, + s(t.elements, n, fi) + ); + }, + 190: function(t, n, i, s, o, c) { + return i.factory.updateOptionalTypeNode( + t, + E.checkDefined(o(t.type, n, fi)) + ); + }, + 191: function(t, n, i, s, o, c) { + return i.factory.updateRestTypeNode( + t, + E.checkDefined(o(t.type, n, fi)) + ); + }, + 192: function(t, n, i, s, o, c) { + return i.factory.updateUnionTypeNode( + t, + s(t.types, n, fi) + ); + }, + 193: function(t, n, i, s, o, c) { + return i.factory.updateIntersectionTypeNode( + t, + s(t.types, n, fi) + ); + }, + 194: function(t, n, i, s, o, c) { + return i.factory.updateConditionalTypeNode( + t, + E.checkDefined(o(t.checkType, n, fi)), + E.checkDefined(o(t.extendsType, n, fi)), + E.checkDefined(o(t.trueType, n, fi)), + E.checkDefined(o(t.falseType, n, fi)) + ); + }, + 195: function(t, n, i, s, o, c) { + return i.factory.updateInferTypeNode( + t, + E.checkDefined(o(t.typeParameter, n, Ao)) + ); + }, + 205: function(t, n, i, s, o, c) { + return i.factory.updateImportTypeNode( + t, + E.checkDefined(o(t.argument, n, fi)), + o(t.attributes, n, LS), + o(t.qualifier, n, Hu), + s(t.typeArguments, n, fi), + t.isTypeOf + ); + }, + 302: function(t, n, i, s, o, c) { + return i.factory.updateImportTypeAssertionContainer( + t, + E.checkDefined(o(t.assertClause, n, xte)), + t.multiLine + ); + }, + 202: function(t, n, i, s, o, c) { + return i.factory.updateNamedTupleMember( + t, + c ? o(t.dotDotDotToken, c, lF) : t.dotDotDotToken, + E.checkDefined(o(t.name, n, Me)), + c ? o(t.questionToken, c, t1) : t.questionToken, + E.checkDefined(o(t.type, n, fi)) + ); + }, + 196: function(t, n, i, s, o, c) { + return i.factory.updateParenthesizedType( + t, + E.checkDefined(o(t.type, n, fi)) + ); + }, + 198: function(t, n, i, s, o, c) { + return i.factory.updateTypeOperatorNode( + t, + E.checkDefined(o(t.type, n, fi)) + ); + }, + 199: function(t, n, i, s, o, c) { + return i.factory.updateIndexedAccessTypeNode( + t, + E.checkDefined(o(t.objectType, n, fi)), + E.checkDefined(o(t.indexType, n, fi)) + ); + }, + 200: function(t, n, i, s, o, c) { + return i.factory.updateMappedTypeNode( + t, + c ? o(t.readonlyToken, c, $te) : t.readonlyToken, + E.checkDefined(o(t.typeParameter, n, Ao)), + o(t.nameType, n, fi), + c ? o(t.questionToken, c, Xte) : t.questionToken, + o(t.type, n, fi), + s(t.members, n, kb) + ); + }, + 201: function(t, n, i, s, o, c) { + return i.factory.updateLiteralTypeNode( + t, + E.checkDefined(o(t.literal, n, pZ)) + ); + }, + 203: function(t, n, i, s, o, c) { + return i.factory.updateTemplateLiteralType( + t, + E.checkDefined(o(t.head, n, Rx)), + s(t.templateSpans, n, QJ) + ); + }, + 204: function(t, n, i, s, o, c) { + return i.factory.updateTemplateLiteralTypeSpan( + t, + E.checkDefined(o(t.type, n, fi)), + E.checkDefined(o(t.literal, n, u7)) + ); + }, + // Binding patterns + 206: function(t, n, i, s, o, c) { + return i.factory.updateObjectBindingPattern( + t, + s(t.elements, n, ma) + ); + }, + 207: function(t, n, i, s, o, c) { + return i.factory.updateArrayBindingPattern( + t, + s(t.elements, n, f7) + ); + }, + 208: function(t, n, i, s, o, c) { + return i.factory.updateBindingElement( + t, + c ? o(t.dotDotDotToken, c, lF) : t.dotDotDotToken, + o(t.propertyName, n, Fc), + E.checkDefined(o(t.name, n, uS)), + o(t.initializer, n, ct) + ); + }, + // Expression + 209: function(t, n, i, s, o, c) { + return i.factory.updateArrayLiteralExpression( + t, + s(t.elements, n, ct) + ); + }, + 210: function(t, n, i, s, o, c) { + return i.factory.updateObjectLiteralExpression( + t, + s(t.properties, n, Eh) + ); + }, + 211: function(t, n, i, s, o, c) { + return a7(t) ? i.factory.updatePropertyAccessChain( + t, + E.checkDefined(o(t.expression, n, ct)), + c ? o(t.questionDotToken, c, uF) : t.questionDotToken, + E.checkDefined(o(t.name, n, Lg)) + ) : i.factory.updatePropertyAccessExpression( + t, + E.checkDefined(o(t.expression, n, ct)), + E.checkDefined(o(t.name, n, Lg)) + ); + }, + 212: function(t, n, i, s, o, c) { + return Ej(t) ? i.factory.updateElementAccessChain( + t, + E.checkDefined(o(t.expression, n, ct)), + c ? o(t.questionDotToken, c, uF) : t.questionDotToken, + E.checkDefined(o(t.argumentExpression, n, ct)) + ) : i.factory.updateElementAccessExpression( + t, + E.checkDefined(o(t.expression, n, ct)), + E.checkDefined(o(t.argumentExpression, n, ct)) + ); + }, + 213: function(t, n, i, s, o, c) { + return oS(t) ? i.factory.updateCallChain( + t, + E.checkDefined(o(t.expression, n, ct)), + c ? o(t.questionDotToken, c, uF) : t.questionDotToken, + s(t.typeArguments, n, fi), + s(t.arguments, n, ct) + ) : i.factory.updateCallExpression( + t, + E.checkDefined(o(t.expression, n, ct)), + s(t.typeArguments, n, fi), + s(t.arguments, n, ct) + ); + }, + 214: function(t, n, i, s, o, c) { + return i.factory.updateNewExpression( + t, + E.checkDefined(o(t.expression, n, ct)), + s(t.typeArguments, n, fi), + s(t.arguments, n, ct) + ); + }, + 215: function(t, n, i, s, o, c) { + return i.factory.updateTaggedTemplateExpression( + t, + E.checkDefined(o(t.tag, n, ct)), + s(t.typeArguments, n, fi), + E.checkDefined(o(t.template, n, sx)) + ); + }, + 216: function(t, n, i, s, o, c) { + return i.factory.updateTypeAssertion( + t, + E.checkDefined(o(t.type, n, fi)), + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 217: function(t, n, i, s, o, c) { + return i.factory.updateParenthesizedExpression( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 218: function(t, n, i, s, o, c) { + return i.factory.updateFunctionExpression( + t, + s(t.modifiers, n, ia), + c ? o(t.asteriskToken, c, fN) : t.asteriskToken, + o(t.name, n, Me), + s(t.typeParameters, n, Ao), + ic(t.parameters, n, i, s), + o(t.type, n, fi), + Of(t.body, n, i, o) + ); + }, + 219: function(t, n, i, s, o, c) { + return i.factory.updateArrowFunction( + t, + s(t.modifiers, n, ia), + s(t.typeParameters, n, Ao), + ic(t.parameters, n, i, s), + o(t.type, n, fi), + c ? E.checkDefined(o(t.equalsGreaterThanToken, c, _te)) : t.equalsGreaterThanToken, + Of(t.body, n, i, o) + ); + }, + 220: function(t, n, i, s, o, c) { + return i.factory.updateDeleteExpression( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 221: function(t, n, i, s, o, c) { + return i.factory.updateTypeOfExpression( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 222: function(t, n, i, s, o, c) { + return i.factory.updateVoidExpression( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 223: function(t, n, i, s, o, c) { + return i.factory.updateAwaitExpression( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 224: function(t, n, i, s, o, c) { + return i.factory.updatePrefixUnaryExpression( + t, + E.checkDefined(o(t.operand, n, ct)) + ); + }, + 225: function(t, n, i, s, o, c) { + return i.factory.updatePostfixUnaryExpression( + t, + E.checkDefined(o(t.operand, n, ct)) + ); + }, + 226: function(t, n, i, s, o, c) { + return i.factory.updateBinaryExpression( + t, + E.checkDefined(o(t.left, n, ct)), + c ? E.checkDefined(o(t.operatorToken, c, Yte)) : t.operatorToken, + E.checkDefined(o(t.right, n, ct)) + ); + }, + 227: function(t, n, i, s, o, c) { + return i.factory.updateConditionalExpression( + t, + E.checkDefined(o(t.condition, n, ct)), + c ? E.checkDefined(o(t.questionToken, c, t1)) : t.questionToken, + E.checkDefined(o(t.whenTrue, n, ct)), + c ? E.checkDefined(o(t.colonToken, c, ute)) : t.colonToken, + E.checkDefined(o(t.whenFalse, n, ct)) + ); + }, + 228: function(t, n, i, s, o, c) { + return i.factory.updateTemplateExpression( + t, + E.checkDefined(o(t.head, n, Rx)), + s(t.templateSpans, n, r6) + ); + }, + 229: function(t, n, i, s, o, c) { + return i.factory.updateYieldExpression( + t, + c ? o(t.asteriskToken, c, fN) : t.asteriskToken, + o(t.expression, n, ct) + ); + }, + 230: function(t, n, i, s, o, c) { + return i.factory.updateSpreadElement( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 231: function(t, n, i, s, o, c) { + return i.factory.updateClassExpression( + t, + s(t.modifiers, n, Oo), + o(t.name, n, Me), + s(t.typeParameters, n, Ao), + s(t.heritageClauses, n, Z_), + s(t.members, n, sl) + ); + }, + 233: function(t, n, i, s, o, c) { + return i.factory.updateExpressionWithTypeArguments( + t, + E.checkDefined(o(t.expression, n, ct)), + s(t.typeArguments, n, fi) + ); + }, + 234: function(t, n, i, s, o, c) { + return i.factory.updateAsExpression( + t, + E.checkDefined(o(t.expression, n, ct)), + E.checkDefined(o(t.type, n, fi)) + ); + }, + 238: function(t, n, i, s, o, c) { + return i.factory.updateSatisfiesExpression( + t, + E.checkDefined(o(t.expression, n, ct)), + E.checkDefined(o(t.type, n, fi)) + ); + }, + 235: function(t, n, i, s, o, c) { + return vu(t) ? i.factory.updateNonNullChain( + t, + E.checkDefined(o(t.expression, n, ct)) + ) : i.factory.updateNonNullExpression( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 236: function(t, n, i, s, o, c) { + return i.factory.updateMetaProperty( + t, + E.checkDefined(o(t.name, n, Me)) + ); + }, + // Misc + 239: function(t, n, i, s, o, c) { + return i.factory.updateTemplateSpan( + t, + E.checkDefined(o(t.expression, n, ct)), + E.checkDefined(o(t.literal, n, u7)) + ); + }, + // Element + 241: function(t, n, i, s, o, c) { + return i.factory.updateBlock( + t, + s(t.statements, n, xi) + ); + }, + 243: function(t, n, i, s, o, c) { + return i.factory.updateVariableStatement( + t, + s(t.modifiers, n, Oo), + E.checkDefined(o(t.declarationList, n, Il)) + ); + }, + 244: function(t, n, i, s, o, c) { + return i.factory.updateExpressionStatement( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 245: function(t, n, i, s, o, c) { + return i.factory.updateIfStatement( + t, + E.checkDefined(o(t.expression, n, ct)), + E.checkDefined(o(t.thenStatement, n, xi, i.factory.liftToBlock)), + o(t.elseStatement, n, xi, i.factory.liftToBlock) + ); + }, + 246: function(t, n, i, s, o, c) { + return i.factory.updateDoStatement( + t, + Zu(t.statement, n, i, o), + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 247: function(t, n, i, s, o, c) { + return i.factory.updateWhileStatement( + t, + E.checkDefined(o(t.expression, n, ct)), + Zu(t.statement, n, i, o) + ); + }, + 248: function(t, n, i, s, o, c) { + return i.factory.updateForStatement( + t, + o(t.initializer, n, Kf), + o(t.condition, n, ct), + o(t.incrementor, n, ct), + Zu(t.statement, n, i, o) + ); + }, + 249: function(t, n, i, s, o, c) { + return i.factory.updateForInStatement( + t, + E.checkDefined(o(t.initializer, n, Kf)), + E.checkDefined(o(t.expression, n, ct)), + Zu(t.statement, n, i, o) + ); + }, + 250: function(t, n, i, s, o, c) { + return i.factory.updateForOfStatement( + t, + c ? o(t.awaitModifier, c, XJ) : t.awaitModifier, + E.checkDefined(o(t.initializer, n, Kf)), + E.checkDefined(o(t.expression, n, ct)), + Zu(t.statement, n, i, o) + ); + }, + 251: function(t, n, i, s, o, c) { + return i.factory.updateContinueStatement( + t, + o(t.label, n, Me) + ); + }, + 252: function(t, n, i, s, o, c) { + return i.factory.updateBreakStatement( + t, + o(t.label, n, Me) + ); + }, + 253: function(t, n, i, s, o, c) { + return i.factory.updateReturnStatement( + t, + o(t.expression, n, ct) + ); + }, + 254: function(t, n, i, s, o, c) { + return i.factory.updateWithStatement( + t, + E.checkDefined(o(t.expression, n, ct)), + E.checkDefined(o(t.statement, n, xi, i.factory.liftToBlock)) + ); + }, + 255: function(t, n, i, s, o, c) { + return i.factory.updateSwitchStatement( + t, + E.checkDefined(o(t.expression, n, ct)), + E.checkDefined(o(t.caseBlock, n, kD)) + ); + }, + 256: function(t, n, i, s, o, c) { + return i.factory.updateLabeledStatement( + t, + E.checkDefined(o(t.label, n, Me)), + E.checkDefined(o(t.statement, n, xi, i.factory.liftToBlock)) + ); + }, + 257: function(t, n, i, s, o, c) { + return i.factory.updateThrowStatement( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 258: function(t, n, i, s, o, c) { + return i.factory.updateTryStatement( + t, + E.checkDefined(o(t.tryBlock, n, ks)), + o(t.catchClause, n, t2), + o(t.finallyBlock, n, ks) + ); + }, + 260: function(t, n, i, s, o, c) { + return i.factory.updateVariableDeclaration( + t, + E.checkDefined(o(t.name, n, uS)), + c ? o(t.exclamationToken, c, pN) : t.exclamationToken, + o(t.type, n, fi), + o(t.initializer, n, ct) + ); + }, + 261: function(t, n, i, s, o, c) { + return i.factory.updateVariableDeclarationList( + t, + s(t.declarations, n, Kn) + ); + }, + 262: function(t, n, i, s, o, c) { + return i.factory.updateFunctionDeclaration( + t, + s(t.modifiers, n, ia), + c ? o(t.asteriskToken, c, fN) : t.asteriskToken, + o(t.name, n, Me), + s(t.typeParameters, n, Ao), + ic(t.parameters, n, i, s), + o(t.type, n, fi), + Of(t.body, n, i, o) + ); + }, + 263: function(t, n, i, s, o, c) { + return i.factory.updateClassDeclaration( + t, + s(t.modifiers, n, Oo), + o(t.name, n, Me), + s(t.typeParameters, n, Ao), + s(t.heritageClauses, n, Z_), + s(t.members, n, sl) + ); + }, + 264: function(t, n, i, s, o, c) { + return i.factory.updateInterfaceDeclaration( + t, + s(t.modifiers, n, Oo), + E.checkDefined(o(t.name, n, Me)), + s(t.typeParameters, n, Ao), + s(t.heritageClauses, n, Z_), + s(t.members, n, kb) + ); + }, + 265: function(t, n, i, s, o, c) { + return i.factory.updateTypeAliasDeclaration( + t, + s(t.modifiers, n, Oo), + E.checkDefined(o(t.name, n, Me)), + s(t.typeParameters, n, Ao), + E.checkDefined(o(t.type, n, fi)) + ); + }, + 266: function(t, n, i, s, o, c) { + return i.factory.updateEnumDeclaration( + t, + s(t.modifiers, n, Oo), + E.checkDefined(o(t.name, n, Me)), + s(t.members, n, j0) + ); + }, + 267: function(t, n, i, s, o, c) { + return i.factory.updateModuleDeclaration( + t, + s(t.modifiers, n, Oo), + E.checkDefined(o(t.name, n, Qte)), + o(t.body, n, mZ) + ); + }, + 268: function(t, n, i, s, o, c) { + return i.factory.updateModuleBlock( + t, + s(t.statements, n, xi) + ); + }, + 269: function(t, n, i, s, o, c) { + return i.factory.updateCaseBlock( + t, + s(t.clauses, n, g7) + ); + }, + 270: function(t, n, i, s, o, c) { + return i.factory.updateNamespaceExportDeclaration( + t, + E.checkDefined(o(t.name, n, Me)) + ); + }, + 271: function(t, n, i, s, o, c) { + return i.factory.updateImportEqualsDeclaration( + t, + s(t.modifiers, n, Oo), + t.isTypeOnly, + E.checkDefined(o(t.name, n, Me)), + E.checkDefined(o(t.moduleReference, n, bZ)) + ); + }, + 272: function(t, n, i, s, o, c) { + return i.factory.updateImportDeclaration( + t, + s(t.modifiers, n, Oo), + o(t.importClause, n, id), + E.checkDefined(o(t.moduleSpecifier, n, ct)), + o(t.attributes, n, LS) + ); + }, + 300: function(t, n, i, s, o, c) { + return i.factory.updateImportAttributes( + t, + s(t.elements, n, kte), + t.multiLine + ); + }, + 301: function(t, n, i, s, o, c) { + return i.factory.updateImportAttribute( + t, + E.checkDefined(o(t.name, n, oZ)), + E.checkDefined(o(t.value, n, ct)) + ); + }, + 273: function(t, n, i, s, o, c) { + return i.factory.updateImportClause( + t, + t.isTypeOnly, + o(t.name, n, Me), + o(t.namedBindings, n, Bj) + ); + }, + 274: function(t, n, i, s, o, c) { + return i.factory.updateNamespaceImport( + t, + E.checkDefined(o(t.name, n, Me)) + ); + }, + 280: function(t, n, i, s, o, c) { + return i.factory.updateNamespaceExport( + t, + E.checkDefined(o(t.name, n, Me)) + ); + }, + 275: function(t, n, i, s, o, c) { + return i.factory.updateNamedImports( + t, + s(t.elements, n, ju) + ); + }, + 276: function(t, n, i, s, o, c) { + return i.factory.updateImportSpecifier( + t, + t.isTypeOnly, + o(t.propertyName, n, vF), + E.checkDefined(o(t.name, n, Me)) + ); + }, + 277: function(t, n, i, s, o, c) { + return i.factory.updateExportAssignment( + t, + s(t.modifiers, n, Oo), + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 278: function(t, n, i, s, o, c) { + return i.factory.updateExportDeclaration( + t, + s(t.modifiers, n, Oo), + t.isTypeOnly, + o(t.exportClause, n, wj), + o(t.moduleSpecifier, n, ct), + o(t.attributes, n, LS) + ); + }, + 279: function(t, n, i, s, o, c) { + return i.factory.updateNamedExports( + t, + s(t.elements, n, Tu) + ); + }, + 281: function(t, n, i, s, o, c) { + return i.factory.updateExportSpecifier( + t, + t.isTypeOnly, + o(t.propertyName, n, vF), + E.checkDefined(o(t.name, n, vF)) + ); + }, + // Module references + 283: function(t, n, i, s, o, c) { + return i.factory.updateExternalModuleReference( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + // JSX + 284: function(t, n, i, s, o, c) { + return i.factory.updateJsxElement( + t, + E.checkDefined(o(t.openingElement, n, Dd)), + s(t.children, n, HP), + E.checkDefined(o(t.closingElement, n, Kb)) + ); + }, + 285: function(t, n, i, s, o, c) { + return i.factory.updateJsxSelfClosingElement( + t, + E.checkDefined(o(t.tagName, n, T4)), + s(t.typeArguments, n, fi), + E.checkDefined(o(t.attributes, n, e2)) + ); + }, + 286: function(t, n, i, s, o, c) { + return i.factory.updateJsxOpeningElement( + t, + E.checkDefined(o(t.tagName, n, T4)), + s(t.typeArguments, n, fi), + E.checkDefined(o(t.attributes, n, e2)) + ); + }, + 287: function(t, n, i, s, o, c) { + return i.factory.updateJsxClosingElement( + t, + E.checkDefined(o(t.tagName, n, T4)) + ); + }, + 295: function(t, n, i, s, o, c) { + return i.factory.updateJsxNamespacedName( + t, + E.checkDefined(o(t.namespace, n, Me)), + E.checkDefined(o(t.name, n, Me)) + ); + }, + 288: function(t, n, i, s, o, c) { + return i.factory.updateJsxFragment( + t, + E.checkDefined(o(t.openingFragment, n, sd)), + s(t.children, n, HP), + E.checkDefined(o(t.closingFragment, n, Ete)) + ); + }, + 291: function(t, n, i, s, o, c) { + return i.factory.updateJsxAttribute( + t, + E.checkDefined(o(t.name, n, Mee)), + o(t.initializer, n, SZ) + ); + }, + 292: function(t, n, i, s, o, c) { + return i.factory.updateJsxAttributes( + t, + s(t.properties, n, m7) + ); + }, + 293: function(t, n, i, s, o, c) { + return i.factory.updateJsxSpreadAttribute( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 294: function(t, n, i, s, o, c) { + return i.factory.updateJsxExpression( + t, + o(t.expression, n, ct) + ); + }, + // Clauses + 296: function(t, n, i, s, o, c) { + return i.factory.updateCaseClause( + t, + E.checkDefined(o(t.expression, n, ct)), + s(t.statements, n, xi) + ); + }, + 297: function(t, n, i, s, o, c) { + return i.factory.updateDefaultClause( + t, + s(t.statements, n, xi) + ); + }, + 298: function(t, n, i, s, o, c) { + return i.factory.updateHeritageClause( + t, + s(t.types, n, Lh) + ); + }, + 299: function(t, n, i, s, o, c) { + return i.factory.updateCatchClause( + t, + o(t.variableDeclaration, n, Kn), + E.checkDefined(o(t.block, n, ks)) + ); + }, + // Property assignments + 303: function(t, n, i, s, o, c) { + return i.factory.updatePropertyAssignment( + t, + E.checkDefined(o(t.name, n, Fc)), + E.checkDefined(o(t.initializer, n, ct)) + ); + }, + 304: function(t, n, i, s, o, c) { + return i.factory.updateShorthandPropertyAssignment( + t, + E.checkDefined(o(t.name, n, Me)), + o(t.objectAssignmentInitializer, n, ct) + ); + }, + 305: function(t, n, i, s, o, c) { + return i.factory.updateSpreadAssignment( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + // Enum + 306: function(t, n, i, s, o, c) { + return i.factory.updateEnumMember( + t, + E.checkDefined(o(t.name, n, Fc)), + o(t.initializer, n, ct) + ); + }, + // Top-level nodes + 307: function(t, n, i, s, o, c) { + return i.factory.updateSourceFile( + t, + gW(t.statements, n, i) + ); + }, + // Transformation nodes + 355: function(t, n, i, s, o, c) { + return i.factory.updatePartiallyEmittedExpression( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 356: function(t, n, i, s, o, c) { + return i.factory.updateCommaListExpression( + t, + s(t.elements, n, ct) + ); + } + }; + function aRe(e) { + return E.assert(e.length <= 1, "Too many nodes written to output."), Hm(e); + } + function fne(e, t, n, i, s) { + var { enter: o, exit: c } = s.extendedDiagnostics ? RR("Source Map", "beforeSourcemap", "afterSourcemap") : lQ, _ = [], u = [], m = /* @__PURE__ */ new Map(), g, h = [], S, T = [], C = "", D = 0, w = 0, A = 0, O = 0, F = 0, R = 0, W = !1, V = 0, $ = 0, U = 0, _e = 0, Z = 0, J = 0, re = !1, te = !1, ie = !1; + return { + getSources: () => _, + addSource: le, + setSourceContent: Te, + addName: q, + addMapping: Ee, + appendSourceMap: oe, + toJSON: xe, + toString: () => JSON.stringify(xe()) + }; + function le(ne) { + o(); + const Ae = KT( + i, + ne, + e.getCurrentDirectory(), + e.getCanonicalFileName, + /*isAbsolutePathAnUrl*/ + !0 + ); + let De = m.get(Ae); + return De === void 0 && (De = u.length, u.push(Ae), _.push(ne), m.set(Ae, De)), c(), De; + } + function Te(ne, Ae) { + if (o(), Ae !== null) { + for (g || (g = []); g.length < ne; ) + g.push(null); + g[ne] = Ae; + } + c(); + } + function q(ne) { + o(), S || (S = /* @__PURE__ */ new Map()); + let Ae = S.get(ne); + return Ae === void 0 && (Ae = h.length, h.push(ne), S.set(ne, Ae)), c(), Ae; + } + function me(ne, Ae) { + return !re || V !== ne || $ !== Ae; + } + function Ce(ne, Ae, De) { + return ne !== void 0 && Ae !== void 0 && De !== void 0 && U === ne && (_e > Ae || _e === Ae && Z > De); + } + function Ee(ne, Ae, De, we, Ue, bt) { + E.assert(ne >= V, "generatedLine cannot backtrack"), E.assert(Ae >= 0, "generatedCharacter cannot be negative"), E.assert(De === void 0 || De >= 0, "sourceIndex cannot be negative"), E.assert(we === void 0 || we >= 0, "sourceLine cannot be negative"), E.assert(Ue === void 0 || Ue >= 0, "sourceCharacter cannot be negative"), o(), (me(ne, Ae) || Ce(De, we, Ue)) && (it(), V = ne, $ = Ae, te = !1, ie = !1, re = !0), De !== void 0 && we !== void 0 && Ue !== void 0 && (U = De, _e = we, Z = Ue, te = !0, bt !== void 0 && (J = bt, ie = !0)), c(); + } + function oe(ne, Ae, De, we, Ue, bt) { + E.assert(ne >= V, "generatedLine cannot backtrack"), E.assert(Ae >= 0, "generatedCharacter cannot be negative"), o(); + const Lt = []; + let er; + const Nr = bW(De.mappings); + for (const Dt of Nr) { + if (bt && (Dt.generatedLine > bt.line || Dt.generatedLine === bt.line && Dt.generatedCharacter > bt.character)) + break; + if (Ue && (Dt.generatedLine < Ue.line || Ue.line === Dt.generatedLine && Dt.generatedCharacter < Ue.character)) + continue; + let Qt, Wr, yr, qn; + if (Dt.sourceIndex !== void 0) { + if (Qt = Lt[Dt.sourceIndex], Qt === void 0) { + const jr = De.sources[Dt.sourceIndex], di = De.sourceRoot ? Ln(De.sourceRoot, jr) : jr, Re = Ln(Hn(we), di); + Lt[Dt.sourceIndex] = Qt = le(Re), De.sourcesContent && typeof De.sourcesContent[Dt.sourceIndex] == "string" && Te(Qt, De.sourcesContent[Dt.sourceIndex]); + } + Wr = Dt.sourceLine, yr = Dt.sourceCharacter, De.names && Dt.nameIndex !== void 0 && (er || (er = []), qn = er[Dt.nameIndex], qn === void 0 && (er[Dt.nameIndex] = qn = q(De.names[Dt.nameIndex]))); + } + const Bt = Dt.generatedLine - (Ue ? Ue.line : 0), bi = Bt + ne, pi = Ue && Ue.line === Dt.generatedLine ? Dt.generatedCharacter - Ue.character : Dt.generatedCharacter, Xn = Bt === 0 ? pi + Ae : pi; + Ee(bi, Xn, Qt, Wr, yr, qn); + } + c(); + } + function ke() { + return !W || D !== V || w !== $ || A !== U || O !== _e || F !== Z || R !== J; + } + function ue(ne) { + T.push(ne), T.length >= 1024 && Oe(); + } + function it() { + if (!(!re || !ke())) { + if (o(), D < V) { + do + ue( + 59 + /* semicolon */ + ), D++; + while (D < V); + w = 0; + } else + E.assertEqual(D, V, "generatedLine cannot backtrack"), W && ue( + 44 + /* comma */ + ); + he($ - w), w = $, te && (he(U - A), A = U, he(_e - O), O = _e, he(Z - F), F = Z, ie && (he(J - R), R = J)), W = !0, c(); + } + } + function Oe() { + T.length > 0 && (C += String.fromCharCode.apply(void 0, T), T.length = 0); + } + function xe() { + return it(), Oe(), { + version: 3, + file: t, + sourceRoot: n, + sources: u, + names: h, + mappings: C, + sourcesContent: g + }; + } + function he(ne) { + ne < 0 ? ne = (-ne << 1) + 1 : ne = ne << 1; + do { + let Ae = ne & 31; + ne = ne >> 5, ne > 0 && (Ae = Ae | 32), ue(lRe(Ae)); + } while (ne > 0); + } + } + var pne = /\/\/[@#] source[M]appingURL=(.+)\r?\n?$/, hW = /^\/\/[@#] source[M]appingURL=(.+)\r?\n?$/, yW = /^\s*(\/\/[@#] .*)?$/; + function vW(e, t) { + return { + getLineCount: () => t.length, + getLineText: (n) => e.substring(t[n], t[n + 1]) + }; + } + function dne(e) { + for (let t = e.getLineCount() - 1; t >= 0; t--) { + const n = e.getLineText(t), i = hW.exec(n); + if (i) + return i[1].trimEnd(); + if (!n.match(yW)) + break; + } + } + function oRe(e) { + return typeof e == "string" || e === null; + } + function cRe(e) { + return e !== null && typeof e == "object" && e.version === 3 && typeof e.file == "string" && typeof e.mappings == "string" && os(e.sources) && Ri(e.sources, rs) && (e.sourceRoot === void 0 || e.sourceRoot === null || typeof e.sourceRoot == "string") && (e.sourcesContent === void 0 || e.sourcesContent === null || os(e.sourcesContent) && Ri(e.sourcesContent, oRe)) && (e.names === void 0 || e.names === null || os(e.names) && Ri(e.names, rs)); + } + function mne(e) { + try { + const t = JSON.parse(e); + if (cRe(t)) + return t; + } catch { + } + } + function bW(e) { + let t = !1, n = 0, i = 0, s = 0, o = 0, c = 0, _ = 0, u = 0, m; + return { + get pos() { + return n; + }, + get error() { + return m; + }, + get state() { + return g( + /*hasSource*/ + !0, + /*hasName*/ + !0 + ); + }, + next() { + for (; !t && n < e.length; ) { + const A = e.charCodeAt(n); + if (A === 59) { + i++, s = 0, n++; + continue; + } + if (A === 44) { + n++; + continue; + } + let O = !1, F = !1; + if (s += w(), C()) return h(); + if (s < 0) return T("Invalid generatedCharacter found"); + if (!D()) { + if (O = !0, o += w(), C()) return h(); + if (o < 0) return T("Invalid sourceIndex found"); + if (D()) return T("Unsupported Format: No entries after sourceIndex"); + if (c += w(), C()) return h(); + if (c < 0) return T("Invalid sourceLine found"); + if (D()) return T("Unsupported Format: No entries after sourceLine"); + if (_ += w(), C()) return h(); + if (_ < 0) return T("Invalid sourceCharacter found"); + if (!D()) { + if (F = !0, u += w(), C()) return h(); + if (u < 0) return T("Invalid nameIndex found"); + if (!D()) return T("Unsupported Error Format: Entries after nameIndex"); + } + } + return { value: g(O, F), done: t }; + } + return h(); + }, + [Symbol.iterator]() { + return this; + } + }; + function g(A, O) { + return { + generatedLine: i, + generatedCharacter: s, + sourceIndex: A ? o : void 0, + sourceLine: A ? c : void 0, + sourceCharacter: A ? _ : void 0, + nameIndex: O ? u : void 0 + }; + } + function h() { + return t = !0, { value: void 0, done: !0 }; + } + function S(A) { + m === void 0 && (m = A); + } + function T(A) { + return S(A), h(); + } + function C() { + return m !== void 0; + } + function D() { + return n === e.length || e.charCodeAt(n) === 44 || e.charCodeAt(n) === 59; + } + function w() { + let A = !0, O = 0, F = 0; + for (; A; n++) { + if (n >= e.length) return S("Error in decoding base64VLQFormatDecode, past the mapping string"), -1; + const R = uRe(e.charCodeAt(n)); + if (R === -1) return S("Invalid character in VLQ"), -1; + A = (R & 32) !== 0, F = F | (R & 31) << O, O += 5; + } + return F & 1 ? (F = F >> 1, F = -F) : F = F >> 1, F; + } + } + function k1e(e, t) { + return e === t || e.generatedLine === t.generatedLine && e.generatedCharacter === t.generatedCharacter && e.sourceIndex === t.sourceIndex && e.sourceLine === t.sourceLine && e.sourceCharacter === t.sourceCharacter && e.nameIndex === t.nameIndex; + } + function gne(e) { + return e.sourceIndex !== void 0 && e.sourceLine !== void 0 && e.sourceCharacter !== void 0; + } + function lRe(e) { + return e >= 0 && e < 26 ? 65 + e : e >= 26 && e < 52 ? 97 + e - 26 : e >= 52 && e < 62 ? 48 + e - 52 : e === 62 ? 43 : e === 63 ? 47 : E.fail(`${e}: not a base64 value`); + } + function uRe(e) { + return e >= 65 && e <= 90 ? e - 65 : e >= 97 && e <= 122 ? e - 97 + 26 : e >= 48 && e <= 57 ? e - 48 + 52 : e === 43 ? 62 : e === 47 ? 63 : -1; + } + function C1e(e) { + return e.sourceIndex !== void 0 && e.sourcePosition !== void 0; + } + function E1e(e, t) { + return e.generatedPosition === t.generatedPosition && e.sourceIndex === t.sourceIndex && e.sourcePosition === t.sourcePosition; + } + function _Re(e, t) { + return E.assert(e.sourceIndex === t.sourceIndex), uo(e.sourcePosition, t.sourcePosition); + } + function fRe(e, t) { + return uo(e.generatedPosition, t.generatedPosition); + } + function pRe(e) { + return e.sourcePosition; + } + function dRe(e) { + return e.generatedPosition; + } + function hne(e, t, n) { + const i = Hn(n), s = t.sourceRoot ? Xi(t.sourceRoot, i) : i, o = Xi(t.file, i), c = e.getSourceFileLike(o), _ = t.sources.map((O) => Xi(O, s)), u = new Map(_.map((O, F) => [e.getCanonicalFileName(O), F])); + let m, g, h; + return { + getSourcePosition: A, + getGeneratedPosition: w + }; + function S(O) { + const F = c !== void 0 ? xP( + c, + O.generatedLine, + O.generatedCharacter, + /*allowEdits*/ + !0 + ) : -1; + let R, W; + if (gne(O)) { + const V = e.getSourceFileLike(_[O.sourceIndex]); + R = t.sources[O.sourceIndex], W = V !== void 0 ? xP( + V, + O.sourceLine, + O.sourceCharacter, + /*allowEdits*/ + !0 + ) : -1; + } + return { + generatedPosition: F, + source: R, + sourceIndex: O.sourceIndex, + sourcePosition: W, + nameIndex: O.nameIndex + }; + } + function T() { + if (m === void 0) { + const O = bW(t.mappings), F = Ki(O, S); + O.error !== void 0 ? (e.log && e.log(`Encountered error while decoding sourcemap: ${O.error}`), m = He) : m = F; + } + return m; + } + function C(O) { + if (h === void 0) { + const F = []; + for (const R of T()) { + if (!C1e(R)) continue; + let W = F[R.sourceIndex]; + W || (F[R.sourceIndex] = W = []), W.push(R); + } + h = F.map((R) => GE(R, _Re, E1e)); + } + return h[O]; + } + function D() { + if (g === void 0) { + const O = []; + for (const F of T()) + O.push(F); + g = GE(O, fRe, E1e); + } + return g; + } + function w(O) { + const F = u.get(e.getCanonicalFileName(O.fileName)); + if (F === void 0) return O; + const R = C(F); + if (!at(R)) return O; + let W = HT(R, O.pos, pRe, uo); + W < 0 && (W = ~W); + const V = R[W]; + return V === void 0 || V.sourceIndex !== F ? O : { fileName: o, pos: V.generatedPosition }; + } + function A(O) { + const F = D(); + if (!at(F)) return O; + let R = HT(F, O.pos, dRe, uo); + R < 0 && (R = ~R); + const W = F[R]; + return W === void 0 || !C1e(W) ? O : { fileName: _[W.sourceIndex], pos: W.sourcePosition }; + } + } + var SW = { + getSourcePosition: lo, + getGeneratedPosition: lo + }; + function Ku(e) { + return e = Jo(e), e ? Aa(e) : 0; + } + function D1e(e) { + return !e || !mm(e) && !up(e) ? !1 : at(e.elements, w1e); + } + function w1e(e) { + return Km(e.propertyName || e.name); + } + function Ad(e, t) { + return n; + function n(s) { + return s.kind === 307 ? t(s) : i(s); + } + function i(s) { + return e.factory.createBundle(gr(s.sourceFiles, t)); + } + } + function yne(e) { + return !!OC(e); + } + function fO(e) { + if (OC(e)) + return !0; + const t = e.importClause && e.importClause.namedBindings; + if (!t || !mm(t)) return !1; + let n = 0; + for (const i of t.elements) + w1e(i) && n++; + return n > 0 && n !== t.elements.length || !!(t.elements.length - n) && bS(e); + } + function TW(e) { + return !fO(e) && (bS(e) || !!e.importClause && mm(e.importClause.namedBindings) && D1e(e.importClause.namedBindings)); + } + function xW(e, t) { + const n = e.getEmitResolver(), i = e.getCompilerOptions(), s = [], o = new mRe(), c = [], _ = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Set(); + let m, g = !1, h, S = !1, T = !1, C = !1; + for (const O of t.statements) + switch (O.kind) { + case 272: + s.push(O), !T && fO(O) && (T = !0), !C && TW(O) && (C = !0); + break; + case 271: + O.moduleReference.kind === 283 && s.push(O); + break; + case 278: + if (O.moduleSpecifier) + if (!O.exportClause) + s.push(O), S = !0; + else if (s.push(O), up(O.exportClause)) + w(O), C || (C = D1e(O.exportClause)); + else { + const F = O.exportClause.name, R = qy(F); + _.get(R) || (zD(c, Ku(O), F), _.set(R, !0), m = Pr(m, F)), T = !0; + } + else + w(O); + break; + case 277: + O.isExportEquals && !h && (h = O); + break; + case 243: + if ($n( + O, + 32 + /* Export */ + )) + for (const F of O.declarationList.declarations) + m = P1e(F, _, m, c); + break; + case 262: + $n( + O, + 32 + /* Export */ + ) && A( + O, + /*name*/ + void 0, + $n( + O, + 2048 + /* Default */ + ) + ); + break; + case 263: + if ($n( + O, + 32 + /* Export */ + )) + if ($n( + O, + 2048 + /* Default */ + )) + g || (zD(c, Ku(O), e.factory.getDeclarationName(O)), g = !0); + else { + const F = O.name; + F && !_.get(An(F)) && (zD(c, Ku(O), F), _.set(An(F), !0), m = Pr(m, F)); + } + break; + } + const D = gz(e.factory, e.getEmitHelperFactory(), t, i, S, T, C); + return D && s.unshift(D), { externalImports: s, exportSpecifiers: o, exportEquals: h, hasExportStarsToExportValues: S, exportedBindings: c, exportedNames: m, exportedFunctions: u, externalHelpersImportDeclaration: D }; + function w(O) { + for (const F of Ws(O.exportClause, up).elements) { + const R = qy(F.name); + if (!_.get(R)) { + const W = F.propertyName || F.name; + if (W.kind !== 11) { + O.moduleSpecifier || o.add(W, F); + const V = n.getReferencedImportDeclaration(W) || n.getReferencedValueDeclaration(W); + if (V) { + if (V.kind === 262) { + A(V, F.name, Km(F.name)); + continue; + } + zD(c, Ku(V), F.name); + } + } + _.set(R, !0), m = Pr(m, F.name); + } + } + } + function A(O, F, R) { + if (u.add(Jo(O, Tc)), R) + g || (zD(c, Ku(O), F ?? e.factory.getDeclarationName(O)), g = !0); + else { + F ?? (F = O.name); + const W = qy(F); + _.get(W) || (zD(c, Ku(O), F), _.set(W, !0)); + } + } + } + function P1e(e, t, n, i) { + if (Ds(e.name)) + for (const s of e.name.elements) + ul(s) || (n = P1e(s, t, n, i)); + else if (!Fo(e.name)) { + const s = An(e.name); + t.get(s) || (t.set(s, !0), n = Pr(n, e.name), Rh(e.name) && zD(i, Ku(e), e.name)); + } + return n; + } + function zD(e, t, n) { + let i = e[t]; + return i ? i.push(n) : e[t] = i = [n], i; + } + var S6 = class WE { + constructor() { + this._map = /* @__PURE__ */ new Map(); + } + get size() { + return this._map.size; + } + has(t) { + return this._map.has(WE.toKey(t)); + } + get(t) { + return this._map.get(WE.toKey(t)); + } + set(t, n) { + return this._map.set(WE.toKey(t), n), this; + } + delete(t) { + var n; + return ((n = this._map) == null ? void 0 : n.delete(WE.toKey(t))) ?? !1; + } + clear() { + this._map.clear(); + } + values() { + return this._map.values(); + } + static toKey(t) { + if (lS(t) || Fo(t)) { + const n = t.emitNode.autoGenerate; + if ((n.flags & 7) === 4) { + const i = EN(t), s = Lg(i) && i !== t ? WE.toKey(i) : `(generated@${Aa(i)})`; + return vv( + /*privateName*/ + !1, + n.prefix, + s, + n.suffix, + WE.toKey + ); + } else { + const i = `(auto@${n.id})`; + return vv( + /*privateName*/ + !1, + n.prefix, + i, + n.suffix, + WE.toKey + ); + } + } + return Ni(t) ? An(t).slice(1) : An(t); + } + }, mRe = class extends S6 { + add(e, t) { + let n = this.get(e); + return n ? n.push(t) : this.set(e, n = [t]), n; + } + remove(e, t) { + const n = this.get(e); + n && (XT(n, t), n.length || this.delete(e)); + } + }; + function s2(e) { + return Na(e) || e.kind === 9 || f_(e.kind) || Me(e); + } + function og(e) { + return !Me(e) && s2(e); + } + function WD(e) { + return e >= 65 && e <= 79; + } + function UD(e) { + switch (e) { + case 65: + return 40; + case 66: + return 41; + case 67: + return 42; + case 68: + return 43; + case 69: + return 44; + case 70: + return 45; + case 71: + return 48; + case 72: + return 49; + case 73: + return 50; + case 74: + return 51; + case 75: + return 52; + case 79: + return 53; + case 76: + return 57; + case 77: + return 56; + case 78: + return 61; + } + } + function pO(e) { + if (!El(e)) + return; + const t = za(e.expression); + return mS(t) ? t : void 0; + } + function N1e(e, t, n) { + for (let i = t; i < e.length; i += 1) { + const s = e[i]; + if (pO(s)) + return n.unshift(i), !0; + if (OS(s) && N1e(s.tryBlock.statements, 0, n)) + return n.unshift(i), !0; + } + return !1; + } + function dO(e, t) { + const n = []; + return N1e(e, t, n), n; + } + function kW(e, t, n) { + return kn(e.members, (i) => hRe(i, t, n)); + } + function gRe(e) { + return yRe(e) || nc(e); + } + function mO(e) { + return kn(e.members, gRe); + } + function hRe(e, t, n) { + return ss(e) && (!!e.initializer || !t) && Kc(e) === n; + } + function yRe(e) { + return ss(e) && Kc(e); + } + function VN(e) { + return e.kind === 172 && e.initializer !== void 0; + } + function vne(e) { + return !Vs(e) && (ix(e) || l_(e)) && Ni(e.name); + } + function bne(e) { + let t; + if (e) { + const n = e.parameters, i = n.length > 0 && Bb(n[0]), s = i ? 1 : 0, o = i ? n.length - 1 : n.length; + for (let c = 0; c < o; c++) { + const _ = n[c + s]; + (t || Pf(_)) && (t || (t = new Array(o)), t[c] = Oy(_)); + } + } + return t; + } + function CW(e, t) { + const n = Oy(e), i = t ? bne(Ug(e)) : void 0; + if (!(!at(n) && !at(i))) + return { + decorators: n, + parameters: i + }; + } + function gO(e, t, n) { + switch (e.kind) { + case 177: + case 178: + return n ? vRe( + e, + t + ) : A1e( + e, + /*useLegacyDecorators*/ + !1 + ); + case 174: + return A1e(e, n); + case 172: + return bRe(e); + default: + return; + } + } + function vRe(e, t, n) { + if (!e.body) + return; + const { firstAccessor: i, secondAccessor: s, getAccessor: o, setAccessor: c } = zb(t.members, e), _ = Pf(i) ? i : s && Pf(s) ? s : void 0; + if (!_ || e !== _) + return; + const u = Oy(_), m = bne(c); + if (!(!at(u) && !at(m))) + return { + decorators: u, + parameters: m, + getDecorators: o && Oy(o), + setDecorators: c && Oy(c) + }; + } + function A1e(e, t) { + if (!e.body) + return; + const n = Oy(e), i = t ? bne(e) : void 0; + if (!(!at(n) && !at(i))) + return { decorators: n, parameters: i }; + } + function bRe(e) { + const t = Oy(e); + if (at(t)) + return { decorators: t }; + } + function SRe(e, t) { + for (; e; ) { + const n = t(e); + if (n !== void 0) return n; + e = e.previous; + } + } + function Sne(e) { + return { data: e }; + } + function EW(e, t) { + var n, i; + return lS(t) ? (n = e?.generatedIdentifiers) == null ? void 0 : n.get(EN(t)) : (i = e?.identifiers) == null ? void 0 : i.get(t.escapedText); + } + function VS(e, t, n) { + lS(t) ? (e.generatedIdentifiers ?? (e.generatedIdentifiers = /* @__PURE__ */ new Map()), e.generatedIdentifiers.set(EN(t), n)) : (e.identifiers ?? (e.identifiers = /* @__PURE__ */ new Map()), e.identifiers.set(t.escapedText, n)); + } + function Tne(e, t) { + return SRe(e, (n) => EW(n.privateEnv, t)); + } + function TRe(e) { + return !e.initializer && Me(e.name); + } + function qN(e) { + return Ri(e, TRe); + } + function nk(e, t) { + if (!e || !ea(e) || !S3(e.text, t)) + return e; + const n = Oh(e.text, ZN(e.text, t)); + return n !== e.text ? Sn(ot(N.createStringLiteral(n, e.singleQuote), e), e) : e; + } + var xne = /* @__PURE__ */ ((e) => (e[e.All = 0] = "All", e[e.ObjectRest = 1] = "ObjectRest", e))(xne || {}); + function qS(e, t, n, i, s, o) { + let c = e, _; + if (P0(e)) + for (_ = e.right; qK(e.left) || ZB(e.left); ) + if (P0(_)) + c = e = _, _ = e.right; + else + return E.checkDefined(Xe(_, t, ct)); + let u; + const m = { + context: n, + level: i, + downlevelIteration: !!n.getCompilerOptions().downlevelIteration, + hoistTempVariables: !0, + emitExpression: g, + emitBindingOrAssignment: h, + createArrayBindingOrAssignmentPattern: (S) => NRe(n.factory, S), + createObjectBindingOrAssignmentPattern: (S) => IRe(n.factory, S), + createArrayBindingOrAssignmentElement: ORe, + visitor: t + }; + if (_ && (_ = Xe(_, t, ct), E.assert(_), Me(_) && kne(e, _.escapedText) || Cne(e) ? _ = ik( + m, + _, + /*reuseIdentifierExpressions*/ + !1, + c + ) : s ? _ = ik( + m, + _, + /*reuseIdentifierExpressions*/ + !0, + c + ) : no(e) && (c = _)), VD( + m, + e, + _, + c, + /*skipInitializer*/ + P0(e) + ), _ && s) { + if (!at(u)) + return _; + u.push(_); + } + return n.factory.inlineExpressions(u) || n.factory.createOmittedExpression(); + function g(S) { + u = Pr(u, S); + } + function h(S, T, C, D) { + E.assertNode(S, o ? Me : ct); + const w = o ? o(S, T, C) : ot( + n.factory.createAssignment(E.checkDefined(Xe(S, t, ct)), T), + C + ); + w.original = D, g(w); + } + } + function kne(e, t) { + const n = s1(e); + return BP(n) ? xRe(n, t) : Me(n) ? n.escapedText === t : !1; + } + function xRe(e, t) { + const n = _6(e); + for (const i of n) + if (kne(i, t)) + return !0; + return !1; + } + function Cne(e) { + const t = NF(e); + if (t && fa(t) && !cS(t.expression)) + return !0; + const n = s1(e); + return !!n && BP(n) && kRe(n); + } + function kRe(e) { + return !!lr(_6(e), Cne); + } + function a2(e, t, n, i, s, o = !1, c) { + let _; + const u = [], m = [], g = { + context: n, + level: i, + downlevelIteration: !!n.getCompilerOptions().downlevelIteration, + hoistTempVariables: o, + emitExpression: h, + emitBindingOrAssignment: S, + createArrayBindingOrAssignmentPattern: (T) => PRe(n.factory, T), + createObjectBindingOrAssignmentPattern: (T) => ARe(n.factory, T), + createArrayBindingOrAssignmentElement: (T) => FRe(n.factory, T), + visitor: t + }; + if (Kn(e)) { + let T = kN(e); + T && (Me(T) && kne(e, T.escapedText) || Cne(e)) && (T = ik( + g, + E.checkDefined(Xe(T, g.visitor, ct)), + /*reuseIdentifierExpressions*/ + !1, + T + ), e = n.factory.updateVariableDeclaration( + e, + e.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + T + )); + } + if (VD(g, e, s, e, c), _) { + const T = n.factory.createTempVariable( + /*recordTempVariable*/ + void 0 + ); + if (o) { + const C = n.factory.inlineExpressions(_); + _ = void 0, S( + T, + C, + /*location*/ + void 0, + /*original*/ + void 0 + ); + } else { + n.hoistVariableDeclaration(T); + const C = _a(u); + C.pendingExpressions = Pr( + C.pendingExpressions, + n.factory.createAssignment(T, C.value) + ), Nn(C.pendingExpressions, _), C.value = T; + } + } + for (const { pendingExpressions: T, name: C, value: D, location: w, original: A } of u) { + const O = n.factory.createVariableDeclaration( + C, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + T ? n.factory.inlineExpressions(Pr(T, D)) : D + ); + O.original = A, ot(O, w), m.push(O); + } + return m; + function h(T) { + _ = Pr(_, T); + } + function S(T, C, D, w) { + E.assertNode(T, uS), _ && (C = n.factory.inlineExpressions(Pr(_, C)), _ = void 0), u.push({ pendingExpressions: _, name: T, value: C, location: D, original: w }); + } + } + function VD(e, t, n, i, s) { + const o = s1(t); + if (!s) { + const c = Xe(kN(t), e.visitor, ct); + c ? n ? (n = DRe(e, n, c, i), !og(c) && BP(o) && (n = ik( + e, + n, + /*reuseIdentifierExpressions*/ + !0, + i + ))) : n = c : n || (n = e.context.factory.createVoidZero()); + } + Oj(o) ? CRe(e, t, o, n, i) : Lj(o) ? ERe(e, t, o, n, i) : e.emitBindingOrAssignment( + o, + n, + i, + /*original*/ + t + ); + } + function CRe(e, t, n, i, s) { + const o = _6(n), c = o.length; + if (c !== 1) { + const m = !jP(t) || c !== 0; + i = ik(e, i, m, s); + } + let _, u; + for (let m = 0; m < c; m++) { + const g = o[m]; + if (PF(g)) { + if (m === c - 1) { + _ && (e.emitBindingOrAssignment(e.createObjectBindingOrAssignmentPattern(_), i, s, n), _ = void 0); + const h = e.context.getEmitHelperFactory().createRestHelper(i, o, u, n); + VD(e, g, h, g); + } + } else { + const h = hz(g); + if (e.level >= 1 && !(g.transformFlags & 98304) && !(s1(g).transformFlags & 98304) && !fa(h)) + _ = Pr(_, Xe(g, e.visitor, uZ)); + else { + _ && (e.emitBindingOrAssignment(e.createObjectBindingOrAssignmentPattern(_), i, s, n), _ = void 0); + const S = wRe(e, i, h); + fa(h) && (u = Pr(u, S.argumentExpression)), VD( + e, + g, + S, + /*location*/ + g + ); + } + } + } + _ && e.emitBindingOrAssignment(e.createObjectBindingOrAssignmentPattern(_), i, s, n); + } + function ERe(e, t, n, i, s) { + const o = _6(n), c = o.length; + if (e.level < 1 && e.downlevelIteration) + i = ik( + e, + ot( + e.context.getEmitHelperFactory().createReadHelper( + i, + c > 0 && PF(o[c - 1]) ? void 0 : c + ), + s + ), + /*reuseIdentifierExpressions*/ + !1, + s + ); + else if (c !== 1 && (e.level < 1 || c === 0) || Ri(o, ul)) { + const m = !jP(t) || c !== 0; + i = ik(e, i, m, s); + } + let _, u; + for (let m = 0; m < c; m++) { + const g = o[m]; + if (e.level >= 1) + if (g.transformFlags & 65536 || e.hasTransformedPriorElement && !I1e(g)) { + e.hasTransformedPriorElement = !0; + const h = e.context.factory.createTempVariable( + /*recordTempVariable*/ + void 0 + ); + e.hoistTempVariables && e.context.hoistVariableDeclaration(h), u = Pr(u, [h, g]), _ = Pr(_, e.createArrayBindingOrAssignmentElement(h)); + } else + _ = Pr(_, g); + else { + if (ul(g)) + continue; + if (PF(g)) { + if (m === c - 1) { + const h = e.context.factory.createArraySliceCall(i, m); + VD( + e, + g, + h, + /*location*/ + g + ); + } + } else { + const h = e.context.factory.createElementAccessExpression(i, m); + VD( + e, + g, + h, + /*location*/ + g + ); + } + } + } + if (_ && e.emitBindingOrAssignment(e.createArrayBindingOrAssignmentPattern(_), i, s, n), u) + for (const [m, g] of u) + VD(e, g, m, g); + } + function I1e(e) { + const t = s1(e); + if (!t || ul(t)) return !0; + const n = NF(e); + if (n && !am(n)) return !1; + const i = kN(e); + return i && !og(i) ? !1 : BP(t) ? Ri(_6(t), I1e) : Me(t); + } + function DRe(e, t, n, i) { + return t = ik( + e, + t, + /*reuseIdentifierExpressions*/ + !0, + i + ), e.context.factory.createConditionalExpression( + e.context.factory.createTypeCheck(t, "undefined"), + /*questionToken*/ + void 0, + n, + /*colonToken*/ + void 0, + t + ); + } + function wRe(e, t, n) { + const { factory: i } = e.context; + if (fa(n)) { + const s = ik( + e, + E.checkDefined(Xe(n.expression, e.visitor, ct)), + /*reuseIdentifierExpressions*/ + !1, + /*location*/ + n + ); + return e.context.factory.createElementAccessExpression(t, s); + } else if (wf(n) || gD(n)) { + const s = i.cloneNode(n); + return e.context.factory.createElementAccessExpression(t, s); + } else { + const s = e.context.factory.createIdentifier(An(n)); + return e.context.factory.createPropertyAccessExpression(t, s); + } + } + function ik(e, t, n, i) { + if (Me(t) && n) + return t; + { + const s = e.context.factory.createTempVariable( + /*recordTempVariable*/ + void 0 + ); + return e.hoistTempVariables ? (e.context.hoistVariableDeclaration(s), e.emitExpression(ot(e.context.factory.createAssignment(s, t), i))) : e.emitBindingOrAssignment( + s, + t, + i, + /*original*/ + void 0 + ), s; + } + } + function PRe(e, t) { + return E.assertEachNode(t, f7), e.createArrayBindingPattern(t); + } + function NRe(e, t) { + return E.assertEachNode(t, zP), e.createArrayLiteralExpression(gr(t, e.converters.convertToArrayAssignmentElement)); + } + function ARe(e, t) { + return E.assertEachNode(t, ma), e.createObjectBindingPattern(t); + } + function IRe(e, t) { + return E.assertEachNode(t, JP), e.createObjectLiteralExpression(gr(t, e.converters.convertToObjectAssignmentElement)); + } + function FRe(e, t) { + return e.createBindingElement( + /*dotDotDotToken*/ + void 0, + /*propertyName*/ + void 0, + t + ); + } + function ORe(e) { + return e; + } + function LRe(e, t, n = e.createThis()) { + const i = e.createAssignment(t, n), s = e.createExpressionStatement(i), o = e.createBlock( + [s], + /*multiLine*/ + !1 + ), c = e.createClassStaticBlockDeclaration(o); + return uu(c).classThis = t, c; + } + function qD(e) { + var t; + if (!nc(e) || e.body.statements.length !== 1) + return !1; + const n = e.body.statements[0]; + return El(n) && Cl( + n.expression, + /*excludeCompoundAssignment*/ + !0 + ) && Me(n.expression.left) && ((t = e.emitNode) == null ? void 0 : t.classThis) === n.expression.left && n.expression.right.kind === 110; + } + function DW(e) { + var t; + return !!((t = e.emitNode) != null && t.classThis) && at(e.members, qD); + } + function Ene(e, t, n, i) { + if (DW(t)) + return t; + const s = LRe(e, n, i); + t.name && da(s.body.statements[0], t.name); + const o = e.createNodeArray([s, ...t.members]); + ot(o, t.members); + const c = $c(t) ? e.updateClassDeclaration( + t, + t.modifiers, + t.name, + t.typeParameters, + t.heritageClauses, + o + ) : e.updateClassExpression( + t, + t.modifiers, + t.name, + t.typeParameters, + t.heritageClauses, + o + ); + return uu(c).classThis = n, c; + } + function hO(e, t, n) { + const i = Jo(xc(n)); + return ($c(i) || Tc(i)) && !i.name && $n( + i, + 2048 + /* Default */ + ) ? e.createStringLiteral("default") : e.createStringLiteralFromNode(t); + } + function F1e(e, t, n) { + const { factory: i } = e; + if (n !== void 0) + return { assignedName: i.createStringLiteral(n), name: t }; + if (am(t) || Ni(t)) + return { assignedName: i.createStringLiteralFromNode(t), name: t }; + if (am(t.expression) && !Me(t.expression)) + return { assignedName: i.createStringLiteralFromNode(t.expression), name: t }; + const s = i.getGeneratedNameForNode(t); + e.hoistVariableDeclaration(s); + const o = e.getEmitHelperFactory().createPropKeyHelper(t.expression), c = i.createAssignment(s, o), _ = i.updateComputedPropertyName(t, c); + return { assignedName: s, name: _ }; + } + function MRe(e, t, n = e.factory.createThis()) { + const { factory: i } = e, s = e.getEmitHelperFactory().createSetFunctionNameHelper(n, t), o = i.createExpressionStatement(s), c = i.createBlock( + [o], + /*multiLine*/ + !1 + ), _ = i.createClassStaticBlockDeclaration(c); + return uu(_).assignedName = t, _; + } + function sk(e) { + var t; + if (!nc(e) || e.body.statements.length !== 1) + return !1; + const n = e.body.statements[0]; + return El(n) && mD(n.expression, "___setFunctionName") && n.expression.arguments.length >= 2 && n.expression.arguments[1] === ((t = e.emitNode) == null ? void 0 : t.assignedName); + } + function yO(e) { + var t; + return !!((t = e.emitNode) != null && t.assignedName) && at(e.members, sk); + } + function wW(e) { + return !!e.name || yO(e); + } + function vO(e, t, n, i) { + if (yO(t)) + return t; + const { factory: s } = e, o = MRe(e, n, i); + t.name && da(o.body.statements[0], t.name); + const c = ec(t.members, qD) + 1, _ = t.members.slice(0, c), u = t.members.slice(c), m = s.createNodeArray([..._, o, ...u]); + return ot(m, t.members), t = $c(t) ? s.updateClassDeclaration( + t, + t.modifiers, + t.name, + t.typeParameters, + t.heritageClauses, + m + ) : s.updateClassExpression( + t, + t.modifiers, + t.name, + t.typeParameters, + t.heritageClauses, + m + ), uu(t).assignedName = n, t; + } + function T6(e, t, n, i) { + if (i && ea(n) && pB(n)) + return t; + const { factory: s } = e, o = xc(t), c = Gc(o) ? Ws(vO(e, o, n), Gc) : e.getEmitHelperFactory().createSetFunctionNameHelper(o, n); + return s.restoreOuterExpressions(t, c); + } + function RRe(e, t, n, i) { + const { factory: s } = e, { assignedName: o, name: c } = F1e(e, t.name, i), _ = T6(e, t.initializer, o, n); + return s.updatePropertyAssignment( + t, + c, + _ + ); + } + function jRe(e, t, n, i) { + const { factory: s } = e, o = i !== void 0 ? s.createStringLiteral(i) : hO(s, t.name, t.objectAssignmentInitializer), c = T6(e, t.objectAssignmentInitializer, o, n); + return s.updateShorthandPropertyAssignment( + t, + t.name, + c + ); + } + function BRe(e, t, n, i) { + const { factory: s } = e, o = i !== void 0 ? s.createStringLiteral(i) : hO(s, t.name, t.initializer), c = T6(e, t.initializer, o, n); + return s.updateVariableDeclaration( + t, + t.name, + t.exclamationToken, + t.type, + c + ); + } + function JRe(e, t, n, i) { + const { factory: s } = e, o = i !== void 0 ? s.createStringLiteral(i) : hO(s, t.name, t.initializer), c = T6(e, t.initializer, o, n); + return s.updateParameterDeclaration( + t, + t.modifiers, + t.dotDotDotToken, + t.name, + t.questionToken, + t.type, + c + ); + } + function zRe(e, t, n, i) { + const { factory: s } = e, o = i !== void 0 ? s.createStringLiteral(i) : hO(s, t.name, t.initializer), c = T6(e, t.initializer, o, n); + return s.updateBindingElement( + t, + t.dotDotDotToken, + t.propertyName, + t.name, + c + ); + } + function WRe(e, t, n, i) { + const { factory: s } = e, { assignedName: o, name: c } = F1e(e, t.name, i), _ = T6(e, t.initializer, o, n); + return s.updatePropertyDeclaration( + t, + t.modifiers, + c, + t.questionToken ?? t.exclamationToken, + t.type, + _ + ); + } + function URe(e, t, n, i) { + const { factory: s } = e, o = i !== void 0 ? s.createStringLiteral(i) : hO(s, t.left, t.right), c = T6(e, t.right, o, n); + return s.updateBinaryExpression( + t, + t.left, + t.operatorToken, + c + ); + } + function VRe(e, t, n, i) { + const { factory: s } = e, o = i !== void 0 ? s.createStringLiteral(i) : s.createStringLiteral(t.isExportEquals ? "" : "default"), c = T6(e, t.expression, o, n); + return s.updateExportAssignment( + t, + t.modifiers, + c + ); + } + function K_(e, t, n, i) { + switch (t.kind) { + case 303: + return RRe(e, t, n, i); + case 304: + return jRe(e, t, n, i); + case 260: + return BRe(e, t, n, i); + case 169: + return JRe(e, t, n, i); + case 208: + return zRe(e, t, n, i); + case 172: + return WRe(e, t, n, i); + case 226: + return URe(e, t, n, i); + case 277: + return VRe(e, t, n, i); + } + } + var Dne = /* @__PURE__ */ ((e) => (e[e.LiftRestriction = 0] = "LiftRestriction", e[e.All = 1] = "All", e))(Dne || {}); + function PW(e, t, n, i, s, o) { + const c = Xe(t.tag, n, ct); + E.assert(c); + const _ = [void 0], u = [], m = [], g = t.template; + if (o === 0 && !LB(g)) + return kr(t, n, e); + const { factory: h } = e; + if (NS(g)) + u.push(wne(h, g)), m.push(Pne(h, g, i)); + else { + u.push(wne(h, g.head)), m.push(Pne(h, g.head, i)); + for (const T of g.templateSpans) + u.push(wne(h, T.literal)), m.push(Pne(h, T.literal, i)), _.push(E.checkDefined(Xe(T.expression, n, ct))); + } + const S = e.getEmitHelperFactory().createTemplateObjectHelper( + h.createArrayLiteralExpression(u), + h.createArrayLiteralExpression(m) + ); + if (el(i)) { + const T = h.createUniqueName("templateObject"); + s(T), _[0] = h.createLogicalOr( + T, + h.createAssignment( + T, + S + ) + ); + } else + _[0] = S; + return h.createCallExpression( + c, + /*typeArguments*/ + void 0, + _ + ); + } + function wne(e, t) { + return t.templateFlags & 26656 ? e.createVoidZero() : e.createStringLiteral(t.text); + } + function Pne(e, t, n) { + let i = t.rawText; + if (i === void 0) { + E.assertIsDefined(n, "Template literal node is missing 'rawText' and does not have a source file. Possibly bad transform."), i = Db(n, t); + const s = t.kind === 15 || t.kind === 18; + i = i.substring(1, i.length - (s ? 1 : 2)); + } + return i = i.replace(/\r\n?/g, ` +`), ot(e.createStringLiteral(i), t); + } + function Nne(e) { + const { + factory: t, + getEmitHelperFactory: n, + startLexicalEnvironment: i, + resumeLexicalEnvironment: s, + endLexicalEnvironment: o, + hoistVariableDeclaration: c + } = e, _ = e.getEmitResolver(), u = e.getCompilerOptions(), m = pa(u), g = Ru(u), h = !!u.experimentalDecorators, S = u.emitDecoratorMetadata ? Ine(e) : void 0, T = e.onEmitNode, C = e.onSubstituteNode; + e.onEmitNode = Yc, e.onSubstituteNode = Sl, e.enableSubstitution( + 211 + /* PropertyAccessExpression */ + ), e.enableSubstitution( + 212 + /* ElementAccessExpression */ + ); + let D, w, A, O, F, R = 0, W; + return V; + function V(ge) { + return ge.kind === 308 ? $(ge) : U(ge); + } + function $(ge) { + return t.createBundle( + ge.sourceFiles.map(U) + ); + } + function U(ge) { + if (ge.isDeclarationFile) + return ge; + D = ge; + const G = _e(ge, he); + return Qg(G, e.readEmitHelpers()), D = void 0, G; + } + function _e(ge, G) { + const rt = O, wt = F; + Z(ge); + const Kt = G(ge); + return O !== rt && (F = wt), O = rt, Kt; + } + function Z(ge) { + switch (ge.kind) { + case 307: + case 269: + case 268: + case 241: + O = ge, F = void 0; + break; + case 263: + case 262: + if ($n( + ge, + 128 + /* Ambient */ + )) + break; + ge.name ? L(ge) : E.assert(ge.kind === 263 || $n( + ge, + 2048 + /* Default */ + )); + break; + } + } + function J(ge) { + return _e(ge, re); + } + function re(ge) { + return ge.transformFlags & 1 ? xe(ge) : ge; + } + function te(ge) { + return _e(ge, ie); + } + function ie(ge) { + switch (ge.kind) { + case 272: + case 271: + case 277: + case 278: + return Te(ge); + default: + return re(ge); + } + } + function le(ge) { + const G = ls(ge); + if (G === ge || Io(ge)) + return !1; + if (!G || G.kind !== ge.kind) + return !0; + switch (ge.kind) { + case 272: + if (E.assertNode(G, zo), ge.importClause !== G.importClause || ge.attributes !== G.attributes) + return !0; + break; + case 271: + if (E.assertNode(G, _l), ge.name !== G.name || ge.isTypeOnly !== G.isTypeOnly || ge.moduleReference !== G.moduleReference && (Hu(ge.moduleReference) || Hu(G.moduleReference))) + return !0; + break; + case 278: + if (E.assertNode(G, wc), ge.exportClause !== G.exportClause || ge.attributes !== G.attributes) + return !0; + break; + } + return !1; + } + function Te(ge) { + if (le(ge)) + return ge.transformFlags & 1 ? kr(ge, J, e) : ge; + switch (ge.kind) { + case 272: + return Gt(ge); + case 271: + return ir(ge); + case 277: + return tt(ge); + case 278: + return ut(ge); + default: + E.fail("Unhandled ellided statement"); + } + } + function q(ge) { + return _e(ge, me); + } + function me(ge) { + if (!(ge.kind === 278 || ge.kind === 272 || ge.kind === 273 || ge.kind === 271 && ge.moduleReference.kind === 283)) + return ge.transformFlags & 1 || $n( + ge, + 32 + /* Export */ + ) ? xe(ge) : ge; + } + function Ce(ge) { + return (G) => _e(G, (rt) => Ee(rt, ge)); + } + function Ee(ge, G) { + switch (ge.kind) { + case 176: + return Re(ge); + case 172: + return di(ge, G); + case 177: + return ki(ge, G); + case 178: + return Cs(ge, G); + case 174: + return Bn(ge, G); + case 175: + return kr(ge, J, e); + case 240: + return ge; + case 181: + return; + default: + return E.failBadSyntaxKind(ge); + } + } + function oe(ge) { + return (G) => _e(G, (rt) => ke(rt, ge)); + } + function ke(ge, G) { + switch (ge.kind) { + case 303: + case 304: + case 305: + return J(ge); + case 177: + return ki(ge, G); + case 178: + return Cs(ge, G); + case 174: + return Bn(ge, G); + default: + return E.failBadSyntaxKind(ge); + } + } + function ue(ge) { + return ll(ge) ? void 0 : J(ge); + } + function it(ge) { + return ia(ge) ? void 0 : J(ge); + } + function Oe(ge) { + if (!ll(ge) && !(Sx(ge.kind) & 28895) && !(w && ge.kind === 95)) + return ge; + } + function xe(ge) { + if (xi(ge) && $n( + ge, + 128 + /* Ambient */ + )) + return t.createNotEmittedStatement(ge); + switch (ge.kind) { + case 95: + case 90: + return w ? void 0 : ge; + case 125: + case 123: + case 124: + case 128: + case 164: + case 87: + case 138: + case 148: + case 103: + case 147: + // TypeScript accessibility and readonly modifiers are elided + // falls through + case 188: + case 189: + case 190: + case 191: + case 187: + case 182: + case 168: + case 133: + case 159: + case 136: + case 154: + case 150: + case 146: + case 116: + case 155: + case 185: + case 184: + case 186: + case 183: + case 192: + case 193: + case 194: + case 196: + case 197: + case 198: + case 199: + case 200: + case 201: + // TypeScript type nodes are elided. + // falls through + case 181: + return; + case 265: + return t.createNotEmittedStatement(ge); + case 270: + return; + case 264: + return t.createNotEmittedStatement(ge); + case 263: + return Ue(ge); + case 231: + return bt(ge); + case 298: + return pi(ge); + case 233: + return Xn(ge); + case 210: + return ne(ge); + case 176: + case 172: + case 174: + case 177: + case 178: + case 175: + return E.fail("Class and object literal elements must be visited with their respective visitors"); + case 262: + return Ks(ge); + case 218: + return xr(ge); + case 219: + return gs(ge); + case 169: + return Qe(ge); + case 217: + return K(ge); + case 216: + case 234: + return Ie(ge); + case 238: + return Ke(ge); + case 213: + return Je(ge); + case 214: + return Ye(ge); + case 215: + return _t(ge); + case 235: + return $e(ge); + case 266: + return Xt(ge); + case 243: + return Ct(ge); + case 260: + return Ve(ge); + case 267: + return zt(ge); + case 271: + return ir(ge); + case 285: + return yt(ge); + case 286: + return We(ge); + default: + return kr(ge, J, e); + } + } + function he(ge) { + const G = lu(u, "alwaysStrict") && !(el(ge) && g >= 5) && !tp(ge); + return t.updateSourceFile( + ge, + gW( + ge.statements, + te, + e, + /*start*/ + 0, + G + ) + ); + } + function ne(ge) { + return t.updateObjectLiteralExpression( + ge, + Or(ge.properties, oe(ge), Eh) + ); + } + function Ae(ge) { + let G = 0; + at(kW( + ge, + /*requireInitializer*/ + !0, + /*isStatic*/ + !0 + )) && (G |= 1); + const rt = sm(ge); + return rt && xc(rt.expression).kind !== 106 && (G |= 64), D0(h, ge) && (G |= 2), N4(h, ge) && (G |= 4), Tr(ge) ? G |= 8 : mi(ge) ? G |= 32 : Ot(ge) && (G |= 16), G; + } + function De(ge) { + return !!(ge.transformFlags & 8192); + } + function we(ge) { + return Pf(ge) || at(ge.typeParameters) || at(ge.heritageClauses, De) || at(ge.members, De); + } + function Ue(ge) { + const G = Ae(ge), rt = m <= 1 && !!(G & 7); + if (!we(ge) && !D0(h, ge) && !Tr(ge)) + return t.updateClassDeclaration( + ge, + Or(ge.modifiers, Oe, ia), + ge.name, + /*typeParameters*/ + void 0, + Or(ge.heritageClauses, J, Z_), + Or(ge.members, Ce(ge), sl) + ); + rt && e.startLexicalEnvironment(); + const wt = rt || G & 8; + let Kt = wt ? Or(ge.modifiers, it, Oo) : Or(ge.modifiers, J, Oo); + G & 2 && (Kt = er(Kt, ge)); + const Mn = wt && !ge.name || G & 4 || G & 1 ? ge.name ?? t.getGeneratedNameForNode(ge) : ge.name, pr = t.updateClassDeclaration( + ge, + Kt, + Mn, + /*typeParameters*/ + void 0, + Or(ge.heritageClauses, J, Z_), + Lt(ge) + ); + let En = va(ge); + G & 1 && (En |= 64), on(pr, En); + let Ji; + if (rt) { + const hi = [pr], ba = eJ( + aa(D.text, ge.members.end), + 20 + /* CloseBraceToken */ + ), Mo = t.getInternalName(ge), dc = t.createPartiallyEmittedExpression(Mo); + XC(dc, ba.end), on( + dc, + 3072 + /* NoComments */ + ); + const mc = t.createReturnStatement(dc); + oD(mc, ba.pos), on( + mc, + 3840 + /* NoTokenSourceMaps */ + ), hi.push(mc), Bg(hi, e.endLexicalEnvironment()); + const Rc = t.createImmediatelyInvokedArrowFunction(hi); + lN( + Rc, + 1 + /* TypeScriptClassWrapper */ + ); + const Uo = t.createVariableDeclaration( + t.getLocalName( + ge, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !1 + ), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Rc + ); + Sn(Uo, ge); + const ac = t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList( + [Uo], + 1 + /* Let */ + ) + ); + Sn(ac, ge), Hc(ac, ge), da(ac, Ih(ge)), xu(ac), Ji = ac; + } else + Ji = pr; + if (wt) { + if (G & 8) + return [ + Ji, + Js(ge) + ]; + if (G & 32) + return [ + Ji, + t.createExportDefault(t.getLocalName( + ge, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + )) + ]; + if (G & 16) + return [ + Ji, + t.createExternalModuleExport(t.getDeclarationName( + ge, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + )) + ]; + } + return Ji; + } + function bt(ge) { + let G = Or(ge.modifiers, it, Oo); + return D0(h, ge) && (G = er(G, ge)), t.updateClassExpression( + ge, + G, + ge.name, + /*typeParameters*/ + void 0, + Or(ge.heritageClauses, J, Z_), + Lt(ge) + ); + } + function Lt(ge) { + const G = Or(ge.members, Ce(ge), sl); + let rt; + const wt = Ug(ge), Kt = wt && kn(wt.parameters, (Yr) => H_(Yr, wt)); + if (Kt) + for (const Yr of Kt) { + const Mn = t.createPropertyDeclaration( + /*modifiers*/ + void 0, + Yr.name, + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ); + Sn(Mn, Yr), rt = Pr(rt, Mn); + } + return rt ? (rt = Nn(rt, G), ot( + t.createNodeArray(rt), + /*location*/ + ge.members + )) : G; + } + function er(ge, G) { + const rt = Dt(G, G); + if (at(rt)) { + const wt = []; + Nn(wt, LR(ge, CN)), Nn(wt, kn(ge, ll)), Nn(wt, rt), Nn(wt, kn(rQ(ge, CN), ia)), ge = ot(t.createNodeArray(wt), ge); + } + return ge; + } + function Nr(ge, G, rt) { + if (Zn(rt) && fB(h, G, rt)) { + const wt = Dt(G, rt); + if (at(wt)) { + const Kt = []; + Nn(Kt, kn(ge, ll)), Nn(Kt, wt), Nn(Kt, kn(ge, ia)), ge = ot(t.createNodeArray(Kt), ge); + } + } + return ge; + } + function Dt(ge, G) { + if (h) + return Qt(ge, G); + } + function Qt(ge, G) { + if (S) { + let rt; + if (Wr(ge)) { + const wt = n().createMetadataHelper("design:type", S.serializeTypeOfNode({ currentLexicalScope: O, currentNameScope: G }, ge, G)); + rt = Pr(rt, t.createDecorator(wt)); + } + if (qn(ge)) { + const wt = n().createMetadataHelper("design:paramtypes", S.serializeParameterTypesOfNode({ currentLexicalScope: O, currentNameScope: G }, ge, G)); + rt = Pr(rt, t.createDecorator(wt)); + } + if (yr(ge)) { + const wt = n().createMetadataHelper("design:returntype", S.serializeReturnTypeOfNode({ currentLexicalScope: O, currentNameScope: G }, ge)); + rt = Pr(rt, t.createDecorator(wt)); + } + return rt; + } + } + function Wr(ge) { + const G = ge.kind; + return G === 174 || G === 177 || G === 178 || G === 172; + } + function yr(ge) { + return ge.kind === 174; + } + function qn(ge) { + switch (ge.kind) { + case 263: + case 231: + return Ug(ge) !== void 0; + case 174: + case 177: + case 178: + return !0; + } + return !1; + } + function Bt(ge, G) { + const rt = ge.name; + return Ni(rt) ? t.createIdentifier("") : fa(rt) ? rt.expression : Me(rt) ? t.createStringLiteral(An(rt)) : t.cloneNode(rt); + } + function bi(ge) { + const G = ge.name; + if (h && fa(G) && Pf(ge)) { + const rt = Xe(G.expression, J, ct); + E.assert(rt); + const wt = ed(rt); + if (!og(wt)) { + const Kt = t.getGeneratedNameForNode(G); + return c(Kt), t.updateComputedPropertyName(G, t.createAssignment(Kt, rt)); + } + } + return E.checkDefined(Xe(G, J, Fc)); + } + function pi(ge) { + if (ge.token !== 119) + return kr(ge, J, e); + } + function Xn(ge) { + return t.updateExpressionWithTypeArguments( + ge, + E.checkDefined(Xe(ge.expression, J, u_)), + /*typeArguments*/ + void 0 + ); + } + function jr(ge) { + return !tc(ge.body); + } + function di(ge, G) { + const rt = ge.flags & 33554432 || $n( + ge, + 64 + /* Abstract */ + ); + if (rt && !(h && Pf(ge))) + return; + let wt = Zn(G) ? rt ? Or(ge.modifiers, it, Oo) : Or(ge.modifiers, J, Oo) : Or(ge.modifiers, ue, Oo); + return wt = Nr(wt, ge, G), rt ? t.updatePropertyDeclaration( + ge, + Wi(wt, t.createModifiersFromModifierFlags( + 128 + /* Ambient */ + )), + E.checkDefined(Xe(ge.name, J, Fc)), + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ) : t.updatePropertyDeclaration( + ge, + wt, + bi(ge), + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + Xe(ge.initializer, J, ct) + ); + } + function Re(ge) { + if (jr(ge)) + return t.updateConstructorDeclaration( + ge, + /*modifiers*/ + void 0, + ic(ge.parameters, J, e), + tr(ge.body, ge) + ); + } + function gt(ge, G, rt, wt, Kt, Yr) { + const Mn = wt[Kt], pr = G[Mn]; + if (Nn(ge, Or(G, J, xi, rt, Mn - rt)), OS(pr)) { + const En = []; + gt( + En, + pr.tryBlock.statements, + /*statementOffset*/ + 0, + wt, + Kt + 1, + Yr + ); + const Ji = t.createNodeArray(En); + ot(Ji, pr.tryBlock.statements), ge.push(t.updateTryStatement( + pr, + t.updateBlock(pr.tryBlock, En), + Xe(pr.catchClause, J, t2), + Xe(pr.finallyBlock, J, ks) + )); + } else + Nn(ge, Or(G, J, xi, Mn, 1)), Nn(ge, Yr); + Nn(ge, Or(G, J, xi, Mn + 1)); + } + function tr(ge, G) { + const rt = G && kn(G.parameters, (En) => H_(En, G)); + if (!at(rt)) + return Of(ge, J, e); + let wt = []; + s(); + const Kt = t.copyPrologue( + ge.statements, + wt, + /*ensureUseStrict*/ + !1, + J + ), Yr = dO(ge.statements, Kt), Mn = Li(rt, qr); + Yr.length ? gt( + wt, + ge.statements, + Kt, + Yr, + /*superPathDepth*/ + 0, + Mn + ) : (Nn(wt, Mn), Nn(wt, Or(ge.statements, J, xi, Kt))), wt = t.mergeLexicalEnvironment(wt, o()); + const pr = t.createBlock( + ot(t.createNodeArray(wt), ge.statements), + /*multiLine*/ + !0 + ); + return ot( + pr, + /*location*/ + ge + ), Sn(pr, ge), pr; + } + function qr(ge) { + const G = ge.name; + if (!Me(G)) + return; + const rt = Fa(ot(t.cloneNode(G), G), G.parent); + on( + rt, + 3168 + /* NoSourceMap */ + ); + const wt = Fa(ot(t.cloneNode(G), G), G.parent); + return on( + wt, + 3072 + /* NoComments */ + ), xu( + cN( + ot( + Sn( + t.createExpressionStatement( + t.createAssignment( + ot( + t.createPropertyAccessExpression( + t.createThis(), + rt + ), + ge.name + ), + wt + ) + ), + ge + ), + ov(ge, -1) + ) + ) + ); + } + function Bn(ge, G) { + if (!(ge.transformFlags & 1)) + return ge; + if (!jr(ge)) + return; + let rt = Zn(G) ? Or(ge.modifiers, J, Oo) : Or(ge.modifiers, ue, Oo); + return rt = Nr(rt, ge, G), t.updateMethodDeclaration( + ge, + rt, + ge.asteriskToken, + bi(ge), + /*questionToken*/ + void 0, + /*typeParameters*/ + void 0, + ic(ge.parameters, J, e), + /*type*/ + void 0, + Of(ge.body, J, e) + ); + } + function wn(ge) { + return !(tc(ge.body) && $n( + ge, + 64 + /* Abstract */ + )); + } + function ki(ge, G) { + if (!(ge.transformFlags & 1)) + return ge; + if (!wn(ge)) + return; + let rt = Zn(G) ? Or(ge.modifiers, J, Oo) : Or(ge.modifiers, ue, Oo); + return rt = Nr(rt, ge, G), t.updateGetAccessorDeclaration( + ge, + rt, + bi(ge), + ic(ge.parameters, J, e), + /*type*/ + void 0, + Of(ge.body, J, e) || t.createBlock([]) + ); + } + function Cs(ge, G) { + if (!(ge.transformFlags & 1)) + return ge; + if (!wn(ge)) + return; + let rt = Zn(G) ? Or(ge.modifiers, J, Oo) : Or(ge.modifiers, ue, Oo); + return rt = Nr(rt, ge, G), t.updateSetAccessorDeclaration( + ge, + rt, + bi(ge), + ic(ge.parameters, J, e), + Of(ge.body, J, e) || t.createBlock([]) + ); + } + function Ks(ge) { + if (!jr(ge)) + return t.createNotEmittedStatement(ge); + const G = t.updateFunctionDeclaration( + ge, + Or(ge.modifiers, Oe, ia), + ge.asteriskToken, + ge.name, + /*typeParameters*/ + void 0, + ic(ge.parameters, J, e), + /*type*/ + void 0, + Of(ge.body, J, e) || t.createBlock([]) + ); + if (Tr(ge)) { + const rt = [G]; + return Ms(rt, ge), rt; + } + return G; + } + function xr(ge) { + return jr(ge) ? t.updateFunctionExpression( + ge, + Or(ge.modifiers, Oe, ia), + ge.asteriskToken, + ge.name, + /*typeParameters*/ + void 0, + ic(ge.parameters, J, e), + /*type*/ + void 0, + Of(ge.body, J, e) || t.createBlock([]) + ) : t.createOmittedExpression(); + } + function gs(ge) { + return t.updateArrowFunction( + ge, + Or(ge.modifiers, Oe, ia), + /*typeParameters*/ + void 0, + ic(ge.parameters, J, e), + /*type*/ + void 0, + ge.equalsGreaterThanToken, + Of(ge.body, J, e) + ); + } + function Qe(ge) { + if (Bb(ge)) + return; + const G = t.updateParameterDeclaration( + ge, + Or(ge.modifiers, (rt) => ll(rt) ? J(rt) : void 0, Oo), + ge.dotDotDotToken, + E.checkDefined(Xe(ge.name, J, uS)), + /*questionToken*/ + void 0, + /*type*/ + void 0, + Xe(ge.initializer, J, ct) + ); + return G !== ge && (Hc(G, ge), ot(G, um(ge)), da(G, um(ge)), on( + G.name, + 64 + /* NoTrailingSourceMap */ + )), G; + } + function Ct(ge) { + if (Tr(ge)) { + const G = X4(ge.declarationList); + return G.length === 0 ? void 0 : ot( + t.createExpressionStatement( + t.inlineExpressions( + gr(G, ee) + ) + ), + ge + ); + } else + return kr(ge, J, e); + } + function ee(ge) { + const G = ge.name; + return Ds(G) ? qS( + ge, + J, + e, + 0, + /*needsValue*/ + !1, + kc + ) : ot( + t.createAssignment( + Wo(G), + E.checkDefined(Xe(ge.initializer, J, ct)) + ), + /*location*/ + ge + ); + } + function Ve(ge) { + const G = t.updateVariableDeclaration( + ge, + E.checkDefined(Xe(ge.name, J, uS)), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Xe(ge.initializer, J, ct) + ); + return ge.type && tte(G.name, ge.type), G; + } + function K(ge) { + const G = xc(ge.expression, -23); + if (Eb(G) || hF(G)) { + const rt = Xe(ge.expression, J, ct); + return E.assert(rt), t.createPartiallyEmittedExpression(rt, ge); + } + return kr(ge, J, e); + } + function Ie(ge) { + const G = Xe(ge.expression, J, ct); + return E.assert(G), t.createPartiallyEmittedExpression(G, ge); + } + function $e(ge) { + const G = Xe(ge.expression, J, u_); + return E.assert(G), t.createPartiallyEmittedExpression(G, ge); + } + function Ke(ge) { + const G = Xe(ge.expression, J, ct); + return E.assert(G), t.createPartiallyEmittedExpression(G, ge); + } + function Je(ge) { + return t.updateCallExpression( + ge, + E.checkDefined(Xe(ge.expression, J, ct)), + /*typeArguments*/ + void 0, + Or(ge.arguments, J, ct) + ); + } + function Ye(ge) { + return t.updateNewExpression( + ge, + E.checkDefined(Xe(ge.expression, J, ct)), + /*typeArguments*/ + void 0, + Or(ge.arguments, J, ct) + ); + } + function _t(ge) { + return t.updateTaggedTemplateExpression( + ge, + E.checkDefined(Xe(ge.tag, J, ct)), + /*typeArguments*/ + void 0, + E.checkDefined(Xe(ge.template, J, sx)) + ); + } + function yt(ge) { + return t.updateJsxSelfClosingElement( + ge, + E.checkDefined(Xe(ge.tagName, J, T4)), + /*typeArguments*/ + void 0, + E.checkDefined(Xe(ge.attributes, J, e2)) + ); + } + function We(ge) { + return t.updateJsxOpeningElement( + ge, + E.checkDefined(Xe(ge.tagName, J, T4)), + /*typeArguments*/ + void 0, + E.checkDefined(Xe(ge.attributes, J, e2)) + ); + } + function Et(ge) { + return !ev(ge) || Yy(u); + } + function Xt(ge) { + if (!Et(ge)) + return t.createNotEmittedStatement(ge); + const G = []; + let rt = 4; + const wt = lt(G, ge); + wt && (g !== 4 || O !== D) && (rt |= 1024); + const Kt = sc(ge), Yr = ri(ge), Mn = Tr(ge) ? t.getExternalModuleOrNamespaceExportName( + A, + ge, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ) : t.getDeclarationName( + ge, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ); + let pr = t.createLogicalOr( + Mn, + t.createAssignment( + Mn, + t.createObjectLiteralExpression() + ) + ); + if (Tr(ge)) { + const Ji = t.getLocalName( + ge, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ); + pr = t.createAssignment(Ji, pr); + } + const En = t.createExpressionStatement( + t.createCallExpression( + t.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + [t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + Kt + )], + /*type*/ + void 0, + rn(ge, Yr) + ), + /*typeArguments*/ + void 0, + [pr] + ) + ); + return Sn(En, ge), wt && (uv(En, void 0), Ox(En, void 0)), ot(En, ge), _m(En, rt), G.push(En), G; + } + function rn(ge, G) { + const rt = A; + A = G; + const wt = []; + i(); + const Kt = gr(ge.members, ye); + return Bg(wt, o()), Nn(wt, Kt), A = rt, t.createBlock( + ot( + t.createNodeArray(wt), + /*location*/ + ge.members + ), + /*multiLine*/ + !0 + ); + } + function ye(ge) { + const G = Bt( + ge + ), rt = _.getEnumMemberValue(ge), wt = ft(ge, rt?.value), Kt = t.createAssignment( + t.createElementAccessExpression( + A, + G + ), + wt + ), Yr = typeof rt?.value == "string" || rt?.isSyntacticallyString ? Kt : t.createAssignment( + t.createElementAccessExpression( + A, + Kt + ), + G + ); + return ot( + t.createExpressionStatement( + ot( + Yr, + ge + ) + ), + ge + ); + } + function ft(ge, G) { + return G !== void 0 ? typeof G == "string" ? t.createStringLiteral(G) : G < 0 ? t.createPrefixUnaryExpression(41, t.createNumericLiteral(-G)) : t.createNumericLiteral(G) : (zs(), ge.initializer ? E.checkDefined(Xe(ge.initializer, J, ct)) : t.createVoidZero()); + } + function fe(ge) { + const G = ls(ge, Lc); + return G ? dW(G, Yy(u)) : !0; + } + function L(ge) { + F || (F = /* @__PURE__ */ new Map()); + const G = X(ge); + F.has(G) || F.set(G, ge); + } + function ve(ge) { + if (F) { + const G = X(ge); + return F.get(G) === ge; + } + return !0; + } + function X(ge) { + return E.assertNode(ge.name, Me), ge.name.escapedText; + } + function lt(ge, G) { + const rt = t.createVariableDeclaration(t.getLocalName( + G, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + )), wt = O.kind === 307 ? 0 : 1, Kt = t.createVariableStatement( + Or(G.modifiers, Oe, ia), + t.createVariableDeclarationList([rt], wt) + ); + return Sn(rt, G), uv(rt, void 0), Ox(rt, void 0), Sn(Kt, G), L(G), ve(G) ? (G.kind === 266 ? da(Kt.declarationList, G) : da(Kt, G), Hc(Kt, G), _m( + Kt, + 2048 + /* NoTrailingComments */ + ), ge.push(Kt), !0) : !1; + } + function zt(ge) { + if (!fe(ge)) + return t.createNotEmittedStatement(ge); + E.assertNode(ge.name, Me, "A TypeScript namespace should have an Identifier name."), eu(); + const G = []; + let rt = 4; + const wt = lt(G, ge); + wt && (g !== 4 || O !== D) && (rt |= 1024); + const Kt = sc(ge), Yr = ri(ge), Mn = Tr(ge) ? t.getExternalModuleOrNamespaceExportName( + A, + ge, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ) : t.getDeclarationName( + ge, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ); + let pr = t.createLogicalOr( + Mn, + t.createAssignment( + Mn, + t.createObjectLiteralExpression() + ) + ); + if (Tr(ge)) { + const Ji = t.getLocalName( + ge, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ); + pr = t.createAssignment(Ji, pr); + } + const En = t.createExpressionStatement( + t.createCallExpression( + t.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + [t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + Kt + )], + /*type*/ + void 0, + de(ge, Yr) + ), + /*typeArguments*/ + void 0, + [pr] + ) + ); + return Sn(En, ge), wt && (uv(En, void 0), Ox(En, void 0)), ot(En, ge), _m(En, rt), G.push(En), G; + } + function de(ge, G) { + const rt = A, wt = w, Kt = F; + A = G, w = ge, F = void 0; + const Yr = []; + i(); + let Mn, pr; + if (ge.body) + if (ge.body.kind === 268) + _e(ge.body, (Ji) => Nn(Yr, Or(Ji.statements, q, xi))), Mn = ge.body.statements, pr = ge.body; + else { + const Ji = zt(ge.body); + Ji && (os(Ji) ? Nn(Yr, Ji) : Yr.push(Ji)); + const hi = st(ge).body; + Mn = ov(hi.statements, -1); + } + Bg(Yr, o()), A = rt, w = wt, F = Kt; + const En = t.createBlock( + ot( + t.createNodeArray(Yr), + /*location*/ + Mn + ), + /*multiLine*/ + !0 + ); + return ot(En, pr), (!ge.body || ge.body.kind !== 268) && on( + En, + va(En) | 3072 + /* NoComments */ + ), En; + } + function st(ge) { + if (ge.body.kind === 267) + return st(ge.body) || ge.body; + } + function Gt(ge) { + if (!ge.importClause) + return ge; + if (ge.importClause.isTypeOnly) + return; + const G = Xe(ge.importClause, Xr, id); + return G ? t.updateImportDeclaration( + ge, + /*modifiers*/ + void 0, + G, + ge.moduleSpecifier, + ge.attributes + ) : void 0; + } + function Xr(ge) { + E.assert(!ge.isTypeOnly); + const G = To(ge) ? ge.name : void 0, rt = Xe(ge.namedBindings, Rr, Bj); + return G || rt ? t.updateImportClause( + ge, + /*isTypeOnly*/ + !1, + G, + rt + ) : void 0; + } + function Rr(ge) { + if (ge.kind === 274) + return To(ge) ? ge : void 0; + { + const G = u.verbatimModuleSyntax, rt = Or(ge.elements, Jr, ju); + return G || at(rt) ? t.updateNamedImports(ge, rt) : void 0; + } + } + function Jr(ge) { + return !ge.isTypeOnly && To(ge) ? ge : void 0; + } + function tt(ge) { + return u.verbatimModuleSyntax || _.isValueAliasDeclaration(ge) ? kr(ge, J, e) : void 0; + } + function ut(ge) { + if (ge.isTypeOnly) + return; + if (!ge.exportClause || ig(ge.exportClause)) + return t.updateExportDeclaration( + ge, + ge.modifiers, + ge.isTypeOnly, + ge.exportClause, + ge.moduleSpecifier, + ge.attributes + ); + const G = !!u.verbatimModuleSyntax, rt = Xe( + ge.exportClause, + (wt) => Zt(wt, G), + wj + ); + return rt ? t.updateExportDeclaration( + ge, + /*modifiers*/ + void 0, + ge.isTypeOnly, + rt, + ge.moduleSpecifier, + ge.attributes + ) : void 0; + } + function Mt(ge, G) { + const rt = Or(ge.elements, fr, Tu); + return G || at(rt) ? t.updateNamedExports(ge, rt) : void 0; + } + function Pt(ge) { + return t.updateNamespaceExport(ge, E.checkDefined(Xe(ge.name, J, Me))); + } + function Zt(ge, G) { + return ig(ge) ? Pt(ge) : Mt(ge, G); + } + function fr(ge) { + return !ge.isTypeOnly && (u.verbatimModuleSyntax || _.isValueAliasDeclaration(ge)) ? ge : void 0; + } + function Vt(ge) { + return To(ge) || !el(D) && _.isTopLevelValueImportEqualsWithEntityName(ge); + } + function ir(ge) { + if (ge.isTypeOnly) + return; + if (tv(ge)) + return To(ge) ? kr(ge, J, e) : void 0; + if (!Vt(ge)) + return; + const G = bN(t, ge.moduleReference); + return on( + G, + 7168 + /* NoNestedComments */ + ), Ot(ge) || !Tr(ge) ? Sn( + ot( + t.createVariableStatement( + Or(ge.modifiers, Oe, ia), + t.createVariableDeclarationList([ + Sn( + t.createVariableDeclaration( + ge.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + G + ), + ge + ) + ]) + ), + ge + ), + ge + ) : Sn( + Ns( + ge.name, + G, + ge + ), + ge + ); + } + function Tr(ge) { + return w !== void 0 && $n( + ge, + 32 + /* Export */ + ); + } + function _r(ge) { + return w === void 0 && $n( + ge, + 32 + /* Export */ + ); + } + function Ot(ge) { + return _r(ge) && !$n( + ge, + 2048 + /* Default */ + ); + } + function mi(ge) { + return _r(ge) && $n( + ge, + 2048 + /* Default */ + ); + } + function Js(ge) { + const G = t.createAssignment( + t.getExternalModuleOrNamespaceExportName( + A, + ge, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ), + t.getLocalName(ge) + ); + da(G, np(ge.name ? ge.name.pos : ge.pos, ge.end)); + const rt = t.createExpressionStatement(G); + return da(rt, np(-1, ge.end)), rt; + } + function Ms(ge, G) { + ge.push(Js(G)); + } + function Ns(ge, G, rt) { + return ot( + t.createExpressionStatement( + t.createAssignment( + t.getNamespaceMemberName( + A, + ge, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ), + G + ) + ), + rt + ); + } + function kc(ge, G, rt) { + return ot(t.createAssignment(Wo(ge), G), rt); + } + function Wo(ge) { + return t.getNamespaceMemberName( + A, + ge, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ); + } + function sc(ge) { + const G = t.getGeneratedNameForNode(ge); + return da(G, ge.name), G; + } + function ri(ge) { + return t.getGeneratedNameForNode(ge); + } + function zs() { + R & 8 || (R |= 8, e.enableSubstitution( + 80 + /* Identifier */ + )); + } + function eu() { + R & 2 || (R |= 2, e.enableSubstitution( + 80 + /* Identifier */ + ), e.enableSubstitution( + 304 + /* ShorthandPropertyAssignment */ + ), e.enableEmitNotification( + 267 + /* ModuleDeclaration */ + )); + } + function hs(ge) { + return Jo(ge).kind === 267; + } + function Bu(ge) { + return Jo(ge).kind === 266; + } + function Yc(ge, G, rt) { + const wt = W, Kt = D; + Ei(G) && (D = G), R & 2 && hs(G) && (W |= 2), R & 8 && Bu(G) && (W |= 8), T(ge, G, rt), W = wt, D = Kt; + } + function Sl(ge, G) { + return G = C(ge, G), ge === 1 ? Gs(G) : _u(G) ? Zi(G) : G; + } + function Zi(ge) { + if (R & 2) { + const G = ge.name, rt = Oi(G); + if (rt) { + if (ge.objectAssignmentInitializer) { + const wt = t.createAssignment(rt, ge.objectAssignmentInitializer); + return ot(t.createPropertyAssignment(G, wt), ge); + } + return ot(t.createPropertyAssignment(G, rt), ge); + } + } + return ge; + } + function Gs(ge) { + switch (ge.kind) { + case 80: + return Ca(ge); + case 211: + return qt(ge); + case 212: + return Qa(ge); + } + return ge; + } + function Ca(ge) { + return Oi(ge) || ge; + } + function Oi(ge) { + if (R & W && !Fo(ge) && !Rh(ge)) { + const G = _.getReferencedExportContainer( + ge, + /*prefixLocals*/ + !1 + ); + if (G && G.kind !== 307 && (W & 2 && G.kind === 267 || W & 8 && G.kind === 266)) + return ot( + t.createPropertyAccessExpression(t.getGeneratedNameForNode(G), ge), + /*location*/ + ge + ); + } + } + function qt(ge) { + return Ol(ge); + } + function Qa(ge) { + return Ol(ge); + } + function Mc(ge) { + return ge.replace(/\*\//g, "*_/"); + } + function Ol(ge) { + const G = Ll(ge); + if (G !== void 0) { + Kee(ge, G); + const rt = typeof G == "string" ? t.createStringLiteral(G) : G < 0 ? t.createPrefixUnaryExpression(41, t.createNumericLiteral(-G)) : t.createNumericLiteral(G); + if (!u.removeComments) { + const wt = Jo(ge, vo); + dD(rt, 3, ` ${Mc(qo(wt))} `); + } + return rt; + } + return ge; + } + function Ll(ge) { + if (!Mp(u)) + return Tn(ge) || fo(ge) ? _.getConstantValue(ge) : void 0; + } + function To(ge) { + return u.verbatimModuleSyntax || an(ge) || _.isReferencedAliasDeclaration(ge); + } + } + function Ane(e) { + const { + factory: t, + getEmitHelperFactory: n, + hoistVariableDeclaration: i, + endLexicalEnvironment: s, + startLexicalEnvironment: o, + resumeLexicalEnvironment: c, + addBlockScopedVariable: _ + } = e, u = e.getEmitResolver(), m = e.getCompilerOptions(), g = pa(m), h = $3(m), S = !!m.experimentalDecorators, T = !h, C = h && g < 9, D = T || C, w = g < 9, A = g < 99 ? -1 : h ? 0 : 3, O = g < 9, F = O && g >= 2, R = D || w || A === -1, W = e.onSubstituteNode; + e.onSubstituteNode = Mc; + const V = e.onEmitNode; + e.onEmitNode = Qa; + let $ = !1, U = 0, _e, Z, J, re; + const te = /* @__PURE__ */ new Map(), ie = /* @__PURE__ */ new Set(); + let le, Te, q = !1, me = !1; + return Ad(e, Ce); + function Ce(G) { + if (G.isDeclarationFile || (re = void 0, $ = !!(td(G) & 32), !R && !$)) + return G; + const rt = kr(G, oe, e); + return Qg(rt, e.readEmitHelpers()), rt; + } + function Ee(G) { + switch (G.kind) { + case 129: + return gt() ? void 0 : G; + default: + return jn(G, ia); + } + } + function oe(G) { + if (!(G.transformFlags & 16777216) && !(G.transformFlags & 134234112)) + return G; + switch (G.kind) { + case 263: + return Xt(G); + case 231: + return ye(G); + case 175: + case 172: + return E.fail("Use `classElementVisitor` instead."); + case 303: + return we(G); + case 243: + return Ue(G); + case 260: + return bt(G); + case 169: + return Lt(G); + case 208: + return er(G); + case 277: + return Nr(G); + case 81: + return Ae(G); + case 211: + return Cs(G); + case 212: + return Ks(G); + case 224: + case 225: + return xr( + G, + /*discarded*/ + !1 + ); + case 226: + return $e( + G, + /*discarded*/ + !1 + ); + case 217: + return Je( + G, + /*discarded*/ + !1 + ); + case 213: + return ee(G); + case 244: + return Qe(G); + case 215: + return Ve(G); + case 248: + return gs(G); + case 110: + return L(G); + case 262: + case 218: + return Bt( + /*classElement*/ + void 0, + ke, + G + ); + case 176: + case 174: + case 177: + case 178: + return Bt( + G, + ke, + G + ); + default: + return ke(G); + } + } + function ke(G) { + return kr(G, oe, e); + } + function ue(G) { + switch (G.kind) { + case 224: + case 225: + return xr( + G, + /*discarded*/ + !0 + ); + case 226: + return $e( + G, + /*discarded*/ + !0 + ); + case 356: + return Ke( + G + ); + case 217: + return Je( + G, + /*discarded*/ + !0 + ); + default: + return oe(G); + } + } + function it(G) { + switch (G.kind) { + case 298: + return kr(G, it, e); + case 233: + return We(G); + default: + return oe(G); + } + } + function Oe(G) { + switch (G.kind) { + case 210: + case 209: + return qt(G); + default: + return oe(G); + } + } + function xe(G) { + switch (G.kind) { + case 176: + return Bt( + G, + Wr, + G + ); + case 177: + case 178: + case 174: + return Bt( + G, + qn, + G + ); + case 172: + return Bt( + G, + tr, + G + ); + case 175: + return Bt( + G, + fe, + G + ); + case 167: + return Qt(G); + case 240: + return G; + default: + return Oo(G) ? Ee(G) : oe(G); + } + } + function he(G) { + switch (G.kind) { + case 167: + return Qt(G); + default: + return oe(G); + } + } + function ne(G) { + switch (G.kind) { + case 172: + return Re(G); + case 177: + case 178: + return xe(G); + default: + E.assertMissingNode(G, "Expected node to either be a PropertyDeclaration, GetAccessorDeclaration, or SetAccessorDeclaration"); + break; + } + } + function Ae(G) { + return !w || xi(G.parent) ? G : Sn(t.createIdentifier(""), G); + } + function De(G) { + const rt = zs(G.left); + if (rt) { + const wt = Xe(G.right, oe, ct); + return Sn( + n().createClassPrivateFieldInHelper(rt.brandCheckIdentifier, wt), + G + ); + } + return kr(G, oe, e); + } + function we(G) { + return X_(G, Ie) && (G = K_(e, G)), kr(G, oe, e); + } + function Ue(G) { + const rt = J; + J = []; + const wt = kr(G, oe, e), Kt = at(J) ? [wt, ...J] : wt; + return J = rt, Kt; + } + function bt(G) { + return X_(G, Ie) && (G = K_(e, G)), kr(G, oe, e); + } + function Lt(G) { + return X_(G, Ie) && (G = K_(e, G)), kr(G, oe, e); + } + function er(G) { + return X_(G, Ie) && (G = K_(e, G)), kr(G, oe, e); + } + function Nr(G) { + return X_(G, Ie) && (G = K_( + e, + G, + /*ignoreEmptyStringLiteral*/ + !0, + G.isExportEquals ? "" : "default" + )), kr(G, oe, e); + } + function Dt(G) { + return at(Z) && (Yu(G) ? (Z.push(G.expression), G = t.updateParenthesizedExpression(G, t.inlineExpressions(Z))) : (Z.push(G), G = t.inlineExpressions(Z)), Z = void 0), G; + } + function Qt(G) { + const rt = Xe(G.expression, oe, ct); + return t.updateComputedPropertyName(G, Dt(rt)); + } + function Wr(G) { + return le ? lt(G, le) : ke(G); + } + function yr(G) { + return !!(w || Kc(G) && td(G) & 32); + } + function qn(G) { + if (E.assert(!Pf(G)), !Fu(G) || !yr(G)) + return kr(G, xe, e); + const rt = zs(G.name); + if (E.assert(rt, "Undeclared private name for property declaration."), !rt.isValid) + return G; + const wt = bi(G); + wt && _r().push( + t.createAssignment( + wt, + t.createFunctionExpression( + kn(G.modifiers, (Kt) => ia(Kt) && !Bx(Kt) && !gte(Kt)), + G.asteriskToken, + wt, + /*typeParameters*/ + void 0, + ic(G.parameters, oe, e), + /*type*/ + void 0, + Of(G.body, oe, e) + ) + ) + ); + } + function Bt(G, rt, wt) { + if (G !== Te) { + const Kt = Te; + Te = G; + const Yr = rt(wt); + return Te = Kt, Yr; + } + return rt(wt); + } + function bi(G) { + E.assert(Ni(G.name)); + const rt = zs(G.name); + if (E.assert(rt, "Undeclared private name for property declaration."), rt.kind === "m") + return rt.methodName; + if (rt.kind === "a") { + if (k0(G)) + return rt.getterName; + if (Mg(G)) + return rt.setterName; + } + } + function pi() { + const G = ir(); + return G.classThis ?? G.classConstructor ?? le?.name; + } + function Xn(G) { + const rt = fm(G), wt = F0(G), Kt = G.name; + let Yr = Kt, Mn = Kt; + if (fa(Kt) && !og(Kt.expression)) { + const dc = IF(Kt); + if (dc) + Yr = t.updateComputedPropertyName(Kt, Xe(Kt.expression, oe, ct)), Mn = t.updateComputedPropertyName(Kt, dc.left); + else { + const mc = t.createTempVariable(i); + da(mc, Kt.expression); + const Rc = Xe(Kt.expression, oe, ct), Uo = t.createAssignment(mc, Rc); + da(Uo, Kt.expression), Yr = t.updateComputedPropertyName(Kt, Uo), Mn = t.updateComputedPropertyName(Kt, mc); + } + } + const pr = Or(G.modifiers, Ee, ia), En = Tz(t, G, pr, G.initializer); + Sn(En, G), on( + En, + 3072 + /* NoComments */ + ), da(En, wt); + const Ji = Vs(G) ? pi() ?? t.createThis() : t.createThis(), hi = Kte(t, G, pr, Yr, Ji); + Sn(hi, G), Hc(hi, rt), da(hi, wt); + const ba = t.createModifiersFromModifierFlags(lm(pr)), Mo = ere(t, G, ba, Mn, Ji); + return Sn(Mo, G), on( + Mo, + 3072 + /* NoComments */ + ), da(Mo, wt), JD([En, hi, Mo], ne, sl); + } + function jr(G) { + if (yr(G)) { + const rt = zs(G.name); + if (E.assert(rt, "Undeclared private name for property declaration."), !rt.isValid) + return G; + if (rt.isStatic && !w) { + const wt = Gt(G, t.createThis()); + if (wt) + return t.createClassStaticBlockDeclaration(t.createBlock( + [wt], + /*multiLine*/ + !0 + )); + } + return; + } + return T && !Vs(G) && re?.data && re.data.facts & 16 ? t.updatePropertyDeclaration( + G, + Or(G.modifiers, oe, Oo), + G.name, + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ) : (X_(G, Ie) && (G = K_(e, G)), t.updatePropertyDeclaration( + G, + Or(G.modifiers, Ee, ia), + Xe(G.name, he, Fc), + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + Xe(G.initializer, oe, ct) + )); + } + function di(G) { + if (D && !l_(G)) { + const rt = Zt( + G.name, + /*shouldHoist*/ + !!G.initializer || h + ); + if (rt && _r().push(...tre(rt)), Vs(G) && !w) { + const wt = Gt(G, t.createThis()); + if (wt) { + const Kt = t.createClassStaticBlockDeclaration( + t.createBlock([wt]) + ); + return Sn(Kt, G), Hc(Kt, G), Hc(wt, { pos: -1, end: -1 }), uv(wt, void 0), Ox(wt, void 0), Kt; + } + } + return; + } + return t.updatePropertyDeclaration( + G, + Or(G.modifiers, Ee, ia), + Xe(G.name, he, Fc), + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + Xe(G.initializer, oe, ct) + ); + } + function Re(G) { + return E.assert(!Pf(G), "Decorators should already have been transformed and elided."), Fu(G) ? jr(G) : di(G); + } + function gt() { + return A === -1 || A === 3 && !!re?.data && !!(re.data.facts & 16); + } + function tr(G) { + return l_(G) && (gt() || Kc(G) && td(G) & 32) ? Xn(G) : Re(G); + } + function qr() { + return !!Te && Kc(Te) && Jy(Te) && l_(Jo(Te)); + } + function Bn(G) { + if (qr()) { + const rt = xc(G); + rt.kind === 110 && ie.add(rt); + } + } + function wn(G, rt) { + return rt = Xe(rt, oe, ct), Bn(rt), ki(G, rt); + } + function ki(G, rt) { + switch (Hc(rt, ov(rt, -1)), G.kind) { + case "a": + return n().createClassPrivateFieldGetHelper( + rt, + G.brandCheckIdentifier, + G.kind, + G.getterName + ); + case "m": + return n().createClassPrivateFieldGetHelper( + rt, + G.brandCheckIdentifier, + G.kind, + G.methodName + ); + case "f": + return n().createClassPrivateFieldGetHelper( + rt, + G.brandCheckIdentifier, + G.kind, + G.isStatic ? G.variableName : void 0 + ); + case "untransformed": + return E.fail("Access helpers should not be created for untransformed private elements"); + default: + E.assertNever(G, "Unknown private element type"); + } + } + function Cs(G) { + if (Ni(G.name)) { + const rt = zs(G.name); + if (rt) + return ot( + Sn( + wn(rt, G.expression), + G + ), + G + ); + } + if (F && Te && D_(G) && Me(G.name) && HD(Te) && re?.data) { + const { classConstructor: rt, superClassReference: wt, facts: Kt } = re.data; + if (Kt & 1) + return Pt(G); + if (rt && wt) { + const Yr = t.createReflectGetCall( + wt, + t.createStringLiteralFromNode(G.name), + rt + ); + return Sn(Yr, G.expression), ot(Yr, G.expression), Yr; + } + } + return kr(G, oe, e); + } + function Ks(G) { + if (F && Te && D_(G) && HD(Te) && re?.data) { + const { classConstructor: rt, superClassReference: wt, facts: Kt } = re.data; + if (Kt & 1) + return Pt(G); + if (rt && wt) { + const Yr = t.createReflectGetCall( + wt, + Xe(G.argumentExpression, oe, ct), + rt + ); + return Sn(Yr, G.expression), ot(Yr, G.expression), Yr; + } + } + return kr(G, oe, e); + } + function xr(G, rt) { + if (G.operator === 46 || G.operator === 47) { + const wt = za(G.operand); + if (vC(wt)) { + let Kt; + if (Kt = zs(wt.name)) { + const Yr = Xe(wt.expression, oe, ct); + Bn(Yr); + const { readExpression: Mn, initializeExpression: pr } = Ct(Yr); + let En = wn(Kt, Mn); + const Ji = pv(G) || rt ? void 0 : t.createTempVariable(i); + return En = EF(t, G, En, i, Ji), En = Ye( + Kt, + pr || Mn, + En, + 64 + /* EqualsToken */ + ), Sn(En, G), ot(En, G), Ji && (En = t.createComma(En, Ji), ot(En, G)), En; + } + } else if (F && Te && D_(wt) && HD(Te) && re?.data) { + const { classConstructor: Kt, superClassReference: Yr, facts: Mn } = re.data; + if (Mn & 1) { + const pr = Pt(wt); + return pv(G) ? t.updatePrefixUnaryExpression(G, pr) : t.updatePostfixUnaryExpression(G, pr); + } + if (Kt && Yr) { + let pr, En; + if (Tn(wt) ? Me(wt.name) && (En = pr = t.createStringLiteralFromNode(wt.name)) : og(wt.argumentExpression) ? En = pr = wt.argumentExpression : (En = t.createTempVariable(i), pr = t.createAssignment(En, Xe(wt.argumentExpression, oe, ct))), pr && En) { + let Ji = t.createReflectGetCall(Yr, En, Kt); + ot(Ji, wt); + const hi = rt ? void 0 : t.createTempVariable(i); + return Ji = EF(t, G, Ji, i, hi), Ji = t.createReflectSetCall(Yr, pr, Ji, Kt), Sn(Ji, G), ot(Ji, G), hi && (Ji = t.createComma(Ji, hi), ot(Ji, G)), Ji; + } + } + } + } + return kr(G, oe, e); + } + function gs(G) { + return t.updateForStatement( + G, + Xe(G.initializer, ue, Kf), + Xe(G.condition, oe, ct), + Xe(G.incrementor, ue, ct), + Zu(G.statement, oe, e) + ); + } + function Qe(G) { + return t.updateExpressionStatement( + G, + Xe(G.expression, ue, ct) + ); + } + function Ct(G) { + const rt = no(G) ? G : t.cloneNode(G); + if (G.kind === 110 && ie.has(G) && ie.add(rt), og(G)) + return { readExpression: rt, initializeExpression: void 0 }; + const wt = t.createTempVariable(i), Kt = t.createAssignment(wt, rt); + return { readExpression: wt, initializeExpression: Kt }; + } + function ee(G) { + var rt; + if (vC(G.expression) && zs(G.expression.name)) { + const { thisArg: wt, target: Kt } = t.createCallBinding(G.expression, i, g); + return oS(G) ? t.updateCallChain( + G, + t.createPropertyAccessChain(Xe(Kt, oe, ct), G.questionDotToken, "call"), + /*questionDotToken*/ + void 0, + /*typeArguments*/ + void 0, + [Xe(wt, oe, ct), ...Or(G.arguments, oe, ct)] + ) : t.updateCallExpression( + G, + t.createPropertyAccessExpression(Xe(Kt, oe, ct), "call"), + /*typeArguments*/ + void 0, + [Xe(wt, oe, ct), ...Or(G.arguments, oe, ct)] + ); + } + if (F && Te && D_(G.expression) && HD(Te) && ((rt = re?.data) != null && rt.classConstructor)) { + const wt = t.createFunctionCallCall( + Xe(G.expression, oe, ct), + re.data.classConstructor, + Or(G.arguments, oe, ct) + ); + return Sn(wt, G), ot(wt, G), wt; + } + return kr(G, oe, e); + } + function Ve(G) { + var rt; + if (vC(G.tag) && zs(G.tag.name)) { + const { thisArg: wt, target: Kt } = t.createCallBinding(G.tag, i, g); + return t.updateTaggedTemplateExpression( + G, + t.createCallExpression( + t.createPropertyAccessExpression(Xe(Kt, oe, ct), "bind"), + /*typeArguments*/ + void 0, + [Xe(wt, oe, ct)] + ), + /*typeArguments*/ + void 0, + Xe(G.template, oe, sx) + ); + } + if (F && Te && D_(G.tag) && HD(Te) && ((rt = re?.data) != null && rt.classConstructor)) { + const wt = t.createFunctionBindCall( + Xe(G.tag, oe, ct), + re.data.classConstructor, + [] + ); + return Sn(wt, G), ot(wt, G), t.updateTaggedTemplateExpression( + G, + wt, + /*typeArguments*/ + void 0, + Xe(G.template, oe, sx) + ); + } + return kr(G, oe, e); + } + function K(G) { + if (re && te.set(Jo(G), re), w) { + if (qD(G)) { + const Kt = Xe(G.body.statements[0].expression, oe, ct); + return Cl( + Kt, + /*excludeCompoundAssignment*/ + !0 + ) && Kt.left === Kt.right ? void 0 : Kt; + } + if (sk(G)) + return Xe(G.body.statements[0].expression, oe, ct); + o(); + let rt = Bt( + G, + (Kt) => Or(Kt, oe, xi), + G.body.statements + ); + rt = t.mergeLexicalEnvironment(rt, s()); + const wt = t.createImmediatelyInvokedArrowFunction(rt); + return Sn(za(wt.expression), G), _m( + za(wt.expression), + 4 + /* AdviseOnEmitNode */ + ), Sn(wt, G), ot(wt, G), wt; + } + } + function Ie(G) { + if (Gc(G) && !G.name) { + const rt = mO(G); + return at(rt, sk) ? !1 : (w || !!td(G)) && at(rt, (Kt) => nc(Kt) || Fu(Kt) || D && VN(Kt)); + } + return !1; + } + function $e(G, rt) { + if (P0(G)) { + const wt = Z; + Z = void 0, G = t.updateBinaryExpression( + G, + Xe(G.left, Oe, ct), + G.operatorToken, + Xe(G.right, oe, ct) + ); + const Kt = at(Z) ? t.inlineExpressions(fP([...Z, G])) : G; + return Z = wt, Kt; + } + if (Cl(G)) { + X_(G, Ie) && (G = K_(e, G), E.assertNode(G, Cl)); + const wt = xc( + G.left, + 9 + /* Parentheses */ + ); + if (vC(wt)) { + const Kt = zs(wt.name); + if (Kt) + return ot( + Sn( + Ye(Kt, wt.expression, G.right, G.operatorToken.kind), + G + ), + G + ); + } else if (F && Te && D_(G.left) && HD(Te) && re?.data) { + const { classConstructor: Kt, superClassReference: Yr, facts: Mn } = re.data; + if (Mn & 1) + return t.updateBinaryExpression( + G, + Pt(G.left), + G.operatorToken, + Xe(G.right, oe, ct) + ); + if (Kt && Yr) { + let pr = fo(G.left) ? Xe(G.left.argumentExpression, oe, ct) : Me(G.left.name) ? t.createStringLiteralFromNode(G.left.name) : void 0; + if (pr) { + let En = Xe(G.right, oe, ct); + if (WD(G.operatorToken.kind)) { + let hi = pr; + og(pr) || (hi = t.createTempVariable(i), pr = t.createAssignment(hi, pr)); + const ba = t.createReflectGetCall( + Yr, + hi, + Kt + ); + Sn(ba, G.left), ot(ba, G.left), En = t.createBinaryExpression( + ba, + UD(G.operatorToken.kind), + En + ), ot(En, G); + } + const Ji = rt ? void 0 : t.createTempVariable(i); + return Ji && (En = t.createAssignment(Ji, En), ot(Ji, G)), En = t.createReflectSetCall( + Yr, + pr, + En, + Kt + ), Sn(En, G), ot(En, G), Ji && (En = t.createComma(En, Ji), ot(En, G)), En; + } + } + } + } + return XRe(G) ? De(G) : kr(G, oe, e); + } + function Ke(G, rt) { + const wt = _O(G.elements, ue); + return t.updateCommaListExpression(G, wt); + } + function Je(G, rt) { + const wt = rt ? ue : oe, Kt = Xe(G.expression, wt, ct); + return t.updateParenthesizedExpression(G, Kt); + } + function Ye(G, rt, wt, Kt) { + if (rt = Xe(rt, oe, ct), wt = Xe(wt, oe, ct), Bn(rt), WD(Kt)) { + const { readExpression: Yr, initializeExpression: Mn } = Ct(rt); + rt = Mn || Yr, wt = t.createBinaryExpression( + ki(G, Yr), + UD(Kt), + wt + ); + } + switch (Hc(rt, ov(rt, -1)), G.kind) { + case "a": + return n().createClassPrivateFieldSetHelper( + rt, + G.brandCheckIdentifier, + wt, + G.kind, + G.setterName + ); + case "m": + return n().createClassPrivateFieldSetHelper( + rt, + G.brandCheckIdentifier, + wt, + G.kind, + /*f*/ + void 0 + ); + case "f": + return n().createClassPrivateFieldSetHelper( + rt, + G.brandCheckIdentifier, + wt, + G.kind, + G.isStatic ? G.variableName : void 0 + ); + case "untransformed": + return E.fail("Access helpers should not be created for untransformed private elements"); + default: + E.assertNever(G, "Unknown private element type"); + } + } + function _t(G) { + return kn(G.members, vne); + } + function yt(G) { + var rt; + let wt = 0; + const Kt = Jo(G); + Zn(Kt) && D0(S, Kt) && (wt |= 1), w && (DW(G) || yO(G)) && (wt |= 2); + let Yr = !1, Mn = !1, pr = !1, En = !1; + for (const hi of G.members) + Vs(hi) ? ((hi.name && (Ni(hi.name) || l_(hi)) && w || l_(hi) && A === -1 && !G.name && !((rt = G.emitNode) != null && rt.classThis)) && (wt |= 2), (ss(hi) || nc(hi)) && (O && hi.transformFlags & 16384 && (wt |= 8, wt & 1 || (wt |= 2)), F && hi.transformFlags & 134217728 && (wt & 1 || (wt |= 6)))) : Wb(Jo(hi)) || (l_(hi) ? (En = !0, pr || (pr = Fu(hi))) : Fu(hi) ? (pr = !0, u.hasNodeCheckFlag( + hi, + 262144 + /* ContainsConstructorReference */ + ) && (wt |= 2)) : ss(hi) && (Yr = !0, Mn || (Mn = !!hi.initializer))); + return (C && Yr || T && Mn || w && pr || w && En && A === -1) && (wt |= 16), wt; + } + function We(G) { + var rt; + if ((((rt = re?.data) == null ? void 0 : rt.facts) || 0) & 4) { + const Kt = t.createTempVariable( + i, + /*reservedInNestedScopes*/ + !0 + ); + return ir().superClassReference = Kt, t.updateExpressionWithTypeArguments( + G, + t.createAssignment( + Kt, + Xe(G.expression, oe, ct) + ), + /*typeArguments*/ + void 0 + ); + } + return kr(G, oe, e); + } + function Et(G, rt) { + var wt; + const Kt = le, Yr = Z, Mn = re; + le = G, Z = void 0, fr(); + const pr = td(G) & 32; + if (w || pr) { + const hi = is(G); + if (hi && Me(hi)) + Tr().data.className = hi; + else if ((wt = G.emitNode) != null && wt.assignedName && ea(G.emitNode.assignedName)) { + if (G.emitNode.assignedName.textSourceNode && Me(G.emitNode.assignedName.textSourceNode)) + Tr().data.className = G.emitNode.assignedName.textSourceNode; + else if (E_(G.emitNode.assignedName.text, g)) { + const ba = t.createIdentifier(G.emitNode.assignedName.text); + Tr().data.className = ba; + } + } + } + if (w) { + const hi = _t(G); + at(hi) && (Tr().data.weakSetName = sc( + "instances", + hi[0].name + )); + } + const En = yt(G); + En && (ir().facts = En), En & 8 && ut(); + const Ji = rt(G, En); + return Vt(), E.assert(re === Mn), le = Kt, Z = Yr, Ji; + } + function Xt(G) { + return Et(G, rn); + } + function rn(G, rt) { + var wt, Kt; + let Yr; + if (rt & 2) + if (w && ((wt = G.emitNode) != null && wt.classThis)) + ir().classConstructor = G.emitNode.classThis, Yr = t.createAssignment(G.emitNode.classThis, t.getInternalName(G)); + else { + const Uo = t.createTempVariable( + i, + /*reservedInNestedScopes*/ + !0 + ); + ir().classConstructor = t.cloneNode(Uo), Yr = t.createAssignment(Uo, t.getInternalName(G)); + } + (Kt = G.emitNode) != null && Kt.classThis && (ir().classThis = G.emitNode.classThis); + const Mn = u.hasNodeCheckFlag( + G, + 262144 + /* ContainsConstructorReference */ + ), pr = $n( + G, + 32 + /* Export */ + ), En = $n( + G, + 2048 + /* Default */ + ); + let Ji = Or(G.modifiers, Ee, ia); + const hi = Or(G.heritageClauses, it, Z_), { members: ba, prologue: Mo } = ve(G), dc = []; + if (Yr && _r().unshift(Yr), at(Z) && dc.push(t.createExpressionStatement(t.inlineExpressions(Z))), T || w || td(G) & 32) { + const Uo = mO(G); + at(Uo) && st(dc, Uo, t.getInternalName(G)); + } + dc.length > 0 && pr && En && (Ji = Or(Ji, (Uo) => CN(Uo) ? void 0 : Uo, ia), dc.push(t.createExportAssignment( + /*modifiers*/ + void 0, + /*isExportEquals*/ + !1, + t.getLocalName( + G, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ) + ))); + const mc = ir().classConstructor; + Mn && mc && (tt(), _e[Ku(G)] = mc); + const Rc = t.updateClassDeclaration( + G, + Ji, + G.name, + /*typeParameters*/ + void 0, + hi, + ba + ); + return dc.unshift(Rc), Mo && dc.unshift(t.createExpressionStatement(Mo)), dc; + } + function ye(G) { + return Et(G, ft); + } + function ft(G, rt) { + var wt, Kt, Yr; + const Mn = !!(rt & 1), pr = mO(G), En = u.hasNodeCheckFlag( + G, + 262144 + /* ContainsConstructorReference */ + ), Ji = u.hasNodeCheckFlag( + G, + 32768 + /* BlockScopedBindingInLoop */ + ); + let hi; + function ba() { + var dl; + if (w && ((dl = G.emitNode) != null && dl.classThis)) + return ir().classConstructor = G.emitNode.classThis; + const Ml = t.createTempVariable( + Ji ? _ : i, + /*reservedInNestedScopes*/ + !0 + ); + return ir().classConstructor = t.cloneNode(Ml), Ml; + } + (wt = G.emitNode) != null && wt.classThis && (ir().classThis = G.emitNode.classThis), rt & 2 && (hi ?? (hi = ba())); + const Mo = Or(G.modifiers, Ee, ia), dc = Or(G.heritageClauses, it, Z_), { members: mc, prologue: Rc } = ve(G), Uo = t.updateClassExpression( + G, + Mo, + G.name, + /*typeParameters*/ + void 0, + dc, + mc + ), ac = []; + if (Rc && ac.push(Rc), (w || td(G) & 32) && at(pr, (dl) => nc(dl) || Fu(dl) || D && VN(dl)) || at(Z)) + if (Mn) + E.assertIsDefined(J, "Decorated classes transformed by TypeScript are expected to be within a variable declaration."), at(Z) && Nn(J, gr(Z, t.createExpressionStatement)), at(pr) && st(J, pr, ((Kt = G.emitNode) == null ? void 0 : Kt.classThis) ?? t.getInternalName(G)), hi ? ac.push(t.createAssignment(hi, Uo)) : w && ((Yr = G.emitNode) != null && Yr.classThis) ? ac.push(t.createAssignment(G.emitNode.classThis, Uo)) : ac.push(Uo); + else { + if (hi ?? (hi = ba()), En) { + tt(); + const dl = t.cloneNode(hi); + dl.emitNode.autoGenerate.flags &= -9, _e[Ku(G)] = dl; + } + ac.push(t.createAssignment(hi, Uo)), Nn(ac, Z), Nn(ac, Xr(pr, hi)), ac.push(t.cloneNode(hi)); + } + else + ac.push(Uo); + return ac.length > 1 && (_m( + Uo, + 131072 + /* Indented */ + ), ac.forEach(xu)), t.inlineExpressions(ac); + } + function fe(G) { + if (!w) + return kr(G, oe, e); + } + function L(G) { + if (O && Te && nc(Te) && re?.data) { + const { classThis: rt, classConstructor: wt } = re.data; + return rt ?? wt ?? G; + } + return G; + } + function ve(G) { + const rt = !!(td(G) & 32); + if (w || $) { + for (const pr of G.members) + if (Fu(pr)) + if (yr(pr)) + Wo(pr, pr.name, Ot); + else { + const En = Tr(); + VS(En, pr.name, { kind: "untransformed" }); + } + if (w && at(_t(G)) && X(), gt()) { + for (const pr of G.members) + if (l_(pr)) { + const En = t.getGeneratedPrivateNameForNode( + pr.name, + /*prefix*/ + void 0, + "_accessor_storage" + ); + if (w || rt && Kc(pr)) + Wo(pr, En, mi); + else { + const Ji = Tr(); + VS(Ji, En, { kind: "untransformed" }); + } + } + } + } + let wt = Or(G.members, xe, sl), Kt; + at(wt, Go) || (Kt = lt( + /*constructor*/ + void 0, + G + )); + let Yr, Mn; + if (!w && at(Z)) { + let pr = t.createExpressionStatement(t.inlineExpressions(Z)); + if (pr.transformFlags & 134234112) { + const Ji = t.createTempVariable(i), hi = t.createArrowFunction( + /*modifiers*/ + void 0, + /*typeParameters*/ + void 0, + /*parameters*/ + [], + /*type*/ + void 0, + /*equalsGreaterThanToken*/ + void 0, + t.createBlock([pr]) + ); + Yr = t.createAssignment(Ji, hi), pr = t.createExpressionStatement(t.createCallExpression( + Ji, + /*typeArguments*/ + void 0, + [] + )); + } + const En = t.createBlock([pr]); + Mn = t.createClassStaticBlockDeclaration(En), Z = void 0; + } + if (Kt || Mn) { + let pr; + const En = Pn(wt, qD), Ji = Pn(wt, sk); + pr = Pr(pr, En), pr = Pr(pr, Ji), pr = Pr(pr, Kt), pr = Pr(pr, Mn); + const hi = En || Ji ? kn(wt, (ba) => ba !== En && ba !== Ji) : wt; + pr = Nn(pr, hi), wt = ot( + t.createNodeArray(pr), + /*location*/ + G.members + ); + } + return { members: wt, prologue: Yr }; + } + function X() { + const { weakSetName: G } = Tr().data; + E.assert(G, "weakSetName should be set in private identifier environment"), _r().push( + t.createAssignment( + G, + t.createNewExpression( + t.createIdentifier("WeakSet"), + /*typeArguments*/ + void 0, + [] + ) + ) + ); + } + function lt(G, rt) { + if (G = Xe(G, oe, Go), !re?.data || !(re.data.facts & 16)) + return G; + const wt = sm(rt), Kt = !!(wt && xc(wt.expression).kind !== 106), Yr = ic(G ? G.parameters : void 0, oe, e), Mn = de(rt, G, Kt); + return Mn ? G ? (E.assert(Yr), t.updateConstructorDeclaration( + G, + /*modifiers*/ + void 0, + Yr, + Mn + )) : xu( + Sn( + ot( + t.createConstructorDeclaration( + /*modifiers*/ + void 0, + Yr ?? [], + Mn + ), + G || rt + ), + G + ) + ) : G; + } + function zt(G, rt, wt, Kt, Yr, Mn, pr) { + const En = Kt[Yr], Ji = rt[En]; + if (Nn(G, Or(rt, oe, xi, wt, En - wt)), wt = En + 1, OS(Ji)) { + const hi = []; + zt( + hi, + Ji.tryBlock.statements, + /*statementOffset*/ + 0, + Kt, + Yr + 1, + Mn, + pr + ); + const ba = t.createNodeArray(hi); + ot(ba, Ji.tryBlock.statements), G.push(t.updateTryStatement( + Ji, + t.updateBlock(Ji.tryBlock, hi), + Xe(Ji.catchClause, oe, t2), + Xe(Ji.finallyBlock, oe, ks) + )); + } else { + for (Nn(G, Or(rt, oe, xi, En, 1)); wt < rt.length; ) { + const hi = rt[wt]; + if (H_(Jo(hi), pr)) + wt++; + else + break; + } + Nn(G, Mn); + } + Nn(G, Or(rt, oe, xi, wt)); + } + function de(G, rt, wt) { + var Kt; + const Yr = kW( + G, + /*requireInitializer*/ + !1, + /*isStatic*/ + !1 + ); + let Mn = Yr; + h || (Mn = kn(Mn, (Rc) => !!Rc.initializer || Ni(Rc.name) || cm(Rc))); + const pr = _t(G), En = at(Mn) || at(pr); + if (!rt && !En) + return Of( + /*node*/ + void 0, + oe, + e + ); + c(); + const Ji = !rt && wt; + let hi = 0, ba = []; + const Mo = [], dc = t.createThis(); + if (Mt(Mo, pr, dc), rt) { + const Rc = kn(Yr, (ac) => H_(Jo(ac), rt)), Uo = kn(Mn, (ac) => !H_(Jo(ac), rt)); + st(Mo, Rc, dc), st(Mo, Uo, dc); + } else + st(Mo, Mn, dc); + if (rt?.body) { + hi = t.copyPrologue( + rt.body.statements, + ba, + /*ensureUseStrict*/ + !1, + oe + ); + const Rc = dO(rt.body.statements, hi); + if (Rc.length) + zt( + ba, + rt.body.statements, + hi, + Rc, + /*superPathDepth*/ + 0, + Mo, + rt + ); + else { + for (; hi < rt.body.statements.length; ) { + const Uo = rt.body.statements[hi]; + if (H_(Jo(Uo), rt)) + hi++; + else + break; + } + Nn(ba, Mo), Nn(ba, Or(rt.body.statements, oe, xi, hi)); + } + } else + Ji && ba.push( + t.createExpressionStatement( + t.createCallExpression( + t.createSuper(), + /*typeArguments*/ + void 0, + [t.createSpreadElement(t.createIdentifier("arguments"))] + ) + ) + ), Nn(ba, Mo); + if (ba = t.mergeLexicalEnvironment(ba, s()), ba.length === 0 && !rt) + return; + const mc = rt?.body && rt.body.statements.length >= ba.length ? rt.body.multiLine ?? ba.length > 0 : ba.length > 0; + return ot( + t.createBlock( + ot( + t.createNodeArray(ba), + /*location*/ + ((Kt = rt?.body) == null ? void 0 : Kt.statements) ?? G.members + ), + mc + ), + rt?.body + ); + } + function st(G, rt, wt) { + for (const Kt of rt) { + if (Vs(Kt) && !w) + continue; + const Yr = Gt(Kt, wt); + Yr && G.push(Yr); + } + } + function Gt(G, rt) { + const wt = nc(G) ? Bt(G, K, G) : Rr(G, rt); + if (!wt) + return; + const Kt = t.createExpressionStatement(wt); + Sn(Kt, G), _m( + Kt, + va(G) & 3072 + /* NoComments */ + ), Hc(Kt, G); + const Yr = Jo(G); + return Ii(Yr) ? (da(Kt, Yr), cN(Kt)) : da(Kt, um(G)), uv(wt, void 0), Ox(wt, void 0), cm(Yr) && _m( + Kt, + 3072 + /* NoComments */ + ), Kt; + } + function Xr(G, rt) { + const wt = []; + for (const Kt of G) { + const Yr = nc(Kt) ? Bt(Kt, K, Kt) : Bt( + Kt, + () => Rr(Kt, rt), + /*arg*/ + void 0 + ); + Yr && (xu(Yr), Sn(Yr, Kt), _m( + Yr, + va(Kt) & 3072 + /* NoComments */ + ), da(Yr, um(Kt)), Hc(Yr, Kt), wt.push(Yr)); + } + return wt; + } + function Rr(G, rt) { + var wt; + const Kt = Te, Yr = Jr(G, rt); + return Yr && Kc(G) && ((wt = re?.data) != null && wt.facts) && (Sn(Yr, G), _m( + Yr, + 4 + /* AdviseOnEmitNode */ + ), da(Yr, F0(G.name)), te.set(Jo(G), re)), Te = Kt, Yr; + } + function Jr(G, rt) { + const wt = !h; + X_(G, Ie) && (G = K_(e, G)); + const Kt = cm(G) ? t.getGeneratedPrivateNameForNode(G.name) : fa(G.name) && !og(G.name.expression) ? t.updateComputedPropertyName(G.name, t.getGeneratedNameForNode(G.name)) : G.name; + if (Kc(G) && (Te = G), Ni(Kt) && yr(G)) { + const pr = zs(Kt); + if (pr) + return pr.kind === "f" ? pr.isStatic ? qRe( + t, + pr.variableName, + Xe(G.initializer, oe, ct) + ) : HRe( + t, + rt, + Xe(G.initializer, oe, ct), + pr.brandCheckIdentifier + ) : void 0; + E.fail("Undeclared private name for property declaration."); + } + if ((Ni(Kt) || Kc(G)) && !G.initializer) + return; + const Yr = Jo(G); + if ($n( + Yr, + 64 + /* Abstract */ + )) + return; + let Mn = Xe(G.initializer, oe, ct); + if (H_(Yr, Yr.parent) && Me(Kt)) { + const pr = t.cloneNode(Kt); + Mn ? (Yu(Mn) && SN(Mn.expression) && mD(Mn.expression.left, "___runInitializers") && Vx(Mn.expression.right) && d_(Mn.expression.right.expression) && (Mn = Mn.expression.left), Mn = t.inlineExpressions([Mn, pr])) : Mn = pr, on( + Kt, + 3168 + /* NoSourceMap */ + ), da(pr, Yr.name), on( + pr, + 3072 + /* NoComments */ + ); + } else + Mn ?? (Mn = t.createVoidZero()); + if (wt || Ni(Kt)) { + const pr = BS( + t, + rt, + Kt, + /*location*/ + Kt + ); + return _m( + pr, + 1024 + /* NoLeadingComments */ + ), t.createAssignment(pr, Mn); + } else { + const pr = fa(Kt) ? Kt.expression : Me(Kt) ? t.createStringLiteral(Pi(Kt.escapedText)) : Kt, En = t.createPropertyDescriptor({ value: Mn, configurable: !0, writable: !0, enumerable: !0 }); + return t.createObjectDefinePropertyCall(rt, pr, En); + } + } + function tt() { + U & 1 || (U |= 1, e.enableSubstitution( + 80 + /* Identifier */ + ), _e = []); + } + function ut() { + U & 2 || (U |= 2, e.enableSubstitution( + 110 + /* ThisKeyword */ + ), e.enableEmitNotification( + 262 + /* FunctionDeclaration */ + ), e.enableEmitNotification( + 218 + /* FunctionExpression */ + ), e.enableEmitNotification( + 176 + /* Constructor */ + ), e.enableEmitNotification( + 177 + /* GetAccessor */ + ), e.enableEmitNotification( + 178 + /* SetAccessor */ + ), e.enableEmitNotification( + 174 + /* MethodDeclaration */ + ), e.enableEmitNotification( + 172 + /* PropertyDeclaration */ + ), e.enableEmitNotification( + 167 + /* ComputedPropertyName */ + )); + } + function Mt(G, rt, wt) { + if (!w || !at(rt)) + return; + const { weakSetName: Kt } = Tr().data; + E.assert(Kt, "weakSetName should be set in private identifier environment"), G.push( + t.createExpressionStatement( + GRe(t, wt, Kt) + ) + ); + } + function Pt(G) { + return Tn(G) ? t.updatePropertyAccessExpression( + G, + t.createVoidZero(), + G.name + ) : t.updateElementAccessExpression( + G, + t.createVoidZero(), + Xe(G.argumentExpression, oe, ct) + ); + } + function Zt(G, rt) { + if (fa(G)) { + const wt = IF(G), Kt = Xe(G.expression, oe, ct), Yr = ed(Kt), Mn = og(Yr); + if (!(!!wt || Cl(Yr) && Fo(Yr.left)) && !Mn && rt) { + const En = t.getGeneratedNameForNode(G); + return u.hasNodeCheckFlag( + G, + 32768 + /* BlockScopedBindingInLoop */ + ) ? _(En) : i(En), t.createAssignment(En, Kt); + } + return Mn || Me(Yr) ? void 0 : Kt; + } + } + function fr() { + re = { previous: re, data: void 0 }; + } + function Vt() { + re = re?.previous; + } + function ir() { + return E.assert(re), re.data ?? (re.data = { + facts: 0, + classConstructor: void 0, + classThis: void 0, + superClassReference: void 0 + // privateIdentifierEnvironment: undefined, + }); + } + function Tr() { + return E.assert(re), re.privateEnv ?? (re.privateEnv = Sne({ + className: void 0, + weakSetName: void 0 + })); + } + function _r() { + return Z ?? (Z = []); + } + function Ot(G, rt, wt, Kt, Yr, Mn, pr) { + l_(G) ? kc(G, rt, wt, Kt, Yr, Mn) : ss(G) ? mi(G, rt, wt, Kt, Yr, Mn) : fc(G) ? Js(G, rt, wt, Kt, Yr, Mn) : cp(G) ? Ms(G, rt, wt, Kt, Yr, Mn, pr) : A_(G) && Ns(G, rt, wt, Kt, Yr, Mn, pr); + } + function mi(G, rt, wt, Kt, Yr, Mn, pr) { + if (Yr) { + const En = E.checkDefined(wt.classThis ?? wt.classConstructor, "classConstructor should be set in private identifier environment"), Ji = ri(rt); + VS(Kt, rt, { + kind: "f", + isStatic: !0, + brandCheckIdentifier: En, + variableName: Ji, + isValid: Mn + }); + } else { + const En = ri(rt); + VS(Kt, rt, { + kind: "f", + isStatic: !1, + brandCheckIdentifier: En, + isValid: Mn + }), _r().push(t.createAssignment( + En, + t.createNewExpression( + t.createIdentifier("WeakMap"), + /*typeArguments*/ + void 0, + [] + ) + )); + } + } + function Js(G, rt, wt, Kt, Yr, Mn, pr) { + const En = ri(rt), Ji = Yr ? E.checkDefined(wt.classThis ?? wt.classConstructor, "classConstructor should be set in private identifier environment") : E.checkDefined(Kt.data.weakSetName, "weakSetName should be set in private identifier environment"); + VS(Kt, rt, { + kind: "m", + methodName: En, + brandCheckIdentifier: Ji, + isStatic: Yr, + isValid: Mn + }); + } + function Ms(G, rt, wt, Kt, Yr, Mn, pr) { + const En = ri(rt, "_get"), Ji = Yr ? E.checkDefined(wt.classThis ?? wt.classConstructor, "classConstructor should be set in private identifier environment") : E.checkDefined(Kt.data.weakSetName, "weakSetName should be set in private identifier environment"); + pr?.kind === "a" && pr.isStatic === Yr && !pr.getterName ? pr.getterName = En : VS(Kt, rt, { + kind: "a", + getterName: En, + setterName: void 0, + brandCheckIdentifier: Ji, + isStatic: Yr, + isValid: Mn + }); + } + function Ns(G, rt, wt, Kt, Yr, Mn, pr) { + const En = ri(rt, "_set"), Ji = Yr ? E.checkDefined(wt.classThis ?? wt.classConstructor, "classConstructor should be set in private identifier environment") : E.checkDefined(Kt.data.weakSetName, "weakSetName should be set in private identifier environment"); + pr?.kind === "a" && pr.isStatic === Yr && !pr.setterName ? pr.setterName = En : VS(Kt, rt, { + kind: "a", + getterName: void 0, + setterName: En, + brandCheckIdentifier: Ji, + isStatic: Yr, + isValid: Mn + }); + } + function kc(G, rt, wt, Kt, Yr, Mn, pr) { + const En = ri(rt, "_get"), Ji = ri(rt, "_set"), hi = Yr ? E.checkDefined(wt.classThis ?? wt.classConstructor, "classConstructor should be set in private identifier environment") : E.checkDefined(Kt.data.weakSetName, "weakSetName should be set in private identifier environment"); + VS(Kt, rt, { + kind: "a", + getterName: En, + setterName: Ji, + brandCheckIdentifier: hi, + isStatic: Yr, + isValid: Mn + }); + } + function Wo(G, rt, wt) { + const Kt = ir(), Yr = Tr(), Mn = EW(Yr, rt), pr = Kc(G), En = !$Re(rt) && Mn === void 0; + wt(G, rt, Kt, Yr, pr, En, Mn); + } + function sc(G, rt, wt) { + const { className: Kt } = Tr().data, Yr = Kt ? { prefix: "_", node: Kt, suffix: "_" } : "_", Mn = typeof G == "object" ? t.getGeneratedNameForNode(G, 24, Yr, wt) : typeof G == "string" ? t.createUniqueName(G, 16, Yr, wt) : t.createTempVariable( + /*recordTempVariable*/ + void 0, + /*reservedInNestedScopes*/ + !0, + Yr, + wt + ); + return u.hasNodeCheckFlag( + rt, + 32768 + /* BlockScopedBindingInLoop */ + ) ? _(Mn) : i(Mn), Mn; + } + function ri(G, rt) { + const wt = E4(G); + return sc(wt?.substring(1) ?? G, G, rt); + } + function zs(G) { + const rt = Tne(re, G); + return rt?.kind === "untransformed" ? void 0 : rt; + } + function eu(G) { + const rt = t.getGeneratedNameForNode(G), wt = zs(G.name); + if (!wt) + return kr(G, oe, e); + let Kt = G.expression; + return (o3(G) || D_(G) || !s2(G.expression)) && (Kt = t.createTempVariable( + i, + /*reservedInNestedScopes*/ + !0 + ), _r().push(t.createBinaryExpression(Kt, 64, Xe(G.expression, oe, ct)))), t.createAssignmentTargetWrapper( + rt, + Ye( + wt, + Kt, + rt, + 64 + /* EqualsToken */ + ) + ); + } + function hs(G) { + if (oa(G) || Ql(G)) + return qt(G); + if (vC(G)) + return eu(G); + if (F && Te && D_(G) && HD(Te) && re?.data) { + const { classConstructor: rt, superClassReference: wt, facts: Kt } = re.data; + if (Kt & 1) + return Pt(G); + if (rt && wt) { + const Yr = fo(G) ? Xe(G.argumentExpression, oe, ct) : Me(G.name) ? t.createStringLiteralFromNode(G.name) : void 0; + if (Yr) { + const Mn = t.createTempVariable( + /*recordTempVariable*/ + void 0 + ); + return t.createAssignmentTargetWrapper( + Mn, + t.createReflectSetCall( + wt, + Yr, + Mn, + rt + ) + ); + } + } + } + return kr(G, oe, e); + } + function Bu(G) { + if (X_(G, Ie) && (G = K_(e, G)), Cl( + G, + /*excludeCompoundAssignment*/ + !0 + )) { + const rt = hs(G.left), wt = Xe(G.right, oe, ct); + return t.updateBinaryExpression(G, rt, G.operatorToken, wt); + } + return hs(G); + } + function Yc(G) { + if (u_(G.expression)) { + const rt = hs(G.expression); + return t.updateSpreadElement(G, rt); + } + return kr(G, oe, e); + } + function Sl(G) { + if (zP(G)) { + if (lp(G)) return Yc(G); + if (!ul(G)) return Bu(G); + } + return kr(G, oe, e); + } + function Zi(G) { + const rt = Xe(G.name, oe, Fc); + if (Cl( + G.initializer, + /*excludeCompoundAssignment*/ + !0 + )) { + const wt = Bu(G.initializer); + return t.updatePropertyAssignment(G, rt, wt); + } + if (u_(G.initializer)) { + const wt = hs(G.initializer); + return t.updatePropertyAssignment(G, rt, wt); + } + return kr(G, oe, e); + } + function Gs(G) { + return X_(G, Ie) && (G = K_(e, G)), kr(G, oe, e); + } + function Ca(G) { + if (u_(G.expression)) { + const rt = hs(G.expression); + return t.updateSpreadAssignment(G, rt); + } + return kr(G, oe, e); + } + function Oi(G) { + return E.assertNode(G, JP), Zg(G) ? Ca(G) : _u(G) ? Gs(G) : Xc(G) ? Zi(G) : kr(G, oe, e); + } + function qt(G) { + return Ql(G) ? t.updateArrayLiteralExpression( + G, + Or(G.elements, Sl, ct) + ) : t.updateObjectLiteralExpression( + G, + Or(G.properties, Oi, Eh) + ); + } + function Qa(G, rt, wt) { + const Kt = Jo(rt), Yr = te.get(Kt); + if (Yr) { + const Mn = re, pr = me; + re = Yr, me = q, q = !nc(Kt) || !(td(Kt) & 32), V(G, rt, wt), q = me, me = pr, re = Mn; + return; + } + switch (rt.kind) { + case 218: + if (bo(Kt) || va(rt) & 524288) + break; + // falls through + case 262: + case 176: + case 177: + case 178: + case 174: + case 172: { + const Mn = re, pr = me; + re = void 0, me = q, q = !1, V(G, rt, wt), q = me, me = pr, re = Mn; + return; + } + case 167: { + const Mn = re, pr = q; + re = re?.previous, q = me, V(G, rt, wt), q = pr, re = Mn; + return; + } + } + V(G, rt, wt); + } + function Mc(G, rt) { + return rt = W(G, rt), G === 1 ? Ol(rt) : rt; + } + function Ol(G) { + switch (G.kind) { + case 80: + return To(G); + case 110: + return Ll(G); + } + return G; + } + function Ll(G) { + if (U & 2 && re?.data && !ie.has(G)) { + const { facts: rt, classConstructor: wt, classThis: Kt } = re.data, Yr = q ? Kt ?? wt : wt; + if (Yr) + return ot( + Sn( + t.cloneNode(Yr), + G + ), + G + ); + if (rt & 1 && S) + return t.createParenthesizedExpression(t.createVoidZero()); + } + return G; + } + function To(G) { + return ge(G) || G; + } + function ge(G) { + if (U & 1 && u.hasNodeCheckFlag( + G, + 536870912 + /* ConstructorReference */ + )) { + const rt = u.getReferencedValueDeclaration(G); + if (rt) { + const wt = _e[rt.id]; + if (wt) { + const Kt = t.cloneNode(wt); + return da(Kt, G), Hc(Kt, G), Kt; + } + } + } + } + } + function qRe(e, t, n) { + return e.createAssignment( + t, + e.createObjectLiteralExpression([ + e.createPropertyAssignment("value", n || e.createVoidZero()) + ]) + ); + } + function HRe(e, t, n, i) { + return e.createCallExpression( + e.createPropertyAccessExpression(i, "set"), + /*typeArguments*/ + void 0, + [t, n || e.createVoidZero()] + ); + } + function GRe(e, t, n) { + return e.createCallExpression( + e.createPropertyAccessExpression(n, "add"), + /*typeArguments*/ + void 0, + [t] + ); + } + function $Re(e) { + return !lS(e) && e.escapedText === "#constructor"; + } + function XRe(e) { + return Ni(e.left) && e.operatorToken.kind === 103; + } + function QRe(e) { + return ss(e) && Kc(e); + } + function HD(e) { + return nc(e) || QRe(e); + } + function Ine(e) { + const { + factory: t, + hoistVariableDeclaration: n + } = e, i = e.getEmitResolver(), s = e.getCompilerOptions(), o = pa(s), c = lu(s, "strictNullChecks"); + let _, u; + return { + serializeTypeNode: (Z, J) => m(Z, D, J), + serializeTypeOfNode: (Z, J, re) => m(Z, h, J, re), + serializeParameterTypesOfNode: (Z, J, re) => m(Z, S, J, re), + serializeReturnTypeOfNode: (Z, J) => m(Z, C, J) + }; + function m(Z, J, re, te) { + const ie = _, le = u; + _ = Z.currentLexicalScope, u = Z.currentNameScope; + const Te = te === void 0 ? J(re) : J(re, te); + return _ = ie, u = le, Te; + } + function g(Z, J) { + const re = zb(J.members, Z); + return re.setAccessor && FK(re.setAccessor) || re.getAccessor && pf(re.getAccessor); + } + function h(Z, J) { + switch (Z.kind) { + case 172: + case 169: + return D(Z.type); + case 178: + case 177: + return D(g(Z, J)); + case 263: + case 231: + case 174: + return t.createIdentifier("Function"); + default: + return t.createVoidZero(); + } + } + function S(Z, J) { + const re = Zn(Z) ? Ug(Z) : vs(Z) && Ap(Z.body) ? Z : void 0, te = []; + if (re) { + const ie = T(re, J), le = ie.length; + for (let Te = 0; Te < le; Te++) { + const q = ie[Te]; + Te === 0 && Me(q.name) && q.name.escapedText === "this" || (q.dotDotDotToken ? te.push(D(uB(q.type))) : te.push(h(q, J))); + } + } + return t.createArrayLiteralExpression(te); + } + function T(Z, J) { + if (J && Z.kind === 177) { + const { setAccessor: re } = zb(J.members, Z); + if (re) + return re.parameters; + } + return Z.parameters; + } + function C(Z) { + return vs(Z) && Z.type ? D(Z.type) : J4(Z) ? t.createIdentifier("Promise") : t.createVoidZero(); + } + function D(Z) { + if (Z === void 0) + return t.createIdentifier("Object"); + switch (Z = M4(Z), Z.kind) { + case 116: + case 157: + case 146: + return t.createVoidZero(); + case 184: + case 185: + return t.createIdentifier("Function"); + case 188: + case 189: + return t.createIdentifier("Array"); + case 182: + return Z.assertsModifier ? t.createVoidZero() : t.createIdentifier("Boolean"); + case 136: + return t.createIdentifier("Boolean"); + case 203: + case 154: + return t.createIdentifier("String"); + case 151: + return t.createIdentifier("Object"); + case 201: + return w(Z.literal); + case 150: + return t.createIdentifier("Number"); + case 163: + return _e( + "BigInt", + 7 + /* ES2020 */ + ); + case 155: + return _e( + "Symbol", + 2 + /* ES2015 */ + ); + case 183: + return F(Z); + case 193: + return A( + Z.types, + /*isIntersection*/ + !0 + ); + case 192: + return A( + Z.types, + /*isIntersection*/ + !1 + ); + case 194: + return A( + [Z.trueType, Z.falseType], + /*isIntersection*/ + !1 + ); + case 198: + if (Z.operator === 148) + return D(Z.type); + break; + case 186: + case 199: + case 200: + case 187: + case 133: + case 159: + case 197: + case 205: + break; + // handle JSDoc types from an invalid parse + case 312: + case 313: + case 317: + case 318: + case 319: + break; + case 314: + case 315: + case 316: + return D(Z.type); + default: + return E.failBadSyntaxKind(Z); + } + return t.createIdentifier("Object"); + } + function w(Z) { + switch (Z.kind) { + case 11: + case 15: + return t.createIdentifier("String"); + case 224: { + const J = Z.operand; + switch (J.kind) { + case 9: + case 10: + return w(J); + default: + return E.failBadSyntaxKind(J); + } + } + case 9: + return t.createIdentifier("Number"); + case 10: + return _e( + "BigInt", + 7 + /* ES2020 */ + ); + case 112: + case 97: + return t.createIdentifier("Boolean"); + case 106: + return t.createVoidZero(); + default: + return E.failBadSyntaxKind(Z); + } + } + function A(Z, J) { + let re; + for (let te of Z) { + if (te = M4(te), te.kind === 146) { + if (J) return t.createVoidZero(); + continue; + } + if (te.kind === 159) { + if (!J) return t.createIdentifier("Object"); + continue; + } + if (te.kind === 133) + return t.createIdentifier("Object"); + if (!c && (M0(te) && te.literal.kind === 106 || te.kind === 157)) + continue; + const ie = D(te); + if (Me(ie) && ie.escapedText === "Object") + return ie; + if (re) { + if (!O(re, ie)) + return t.createIdentifier("Object"); + } else + re = ie; + } + return re ?? t.createVoidZero(); + } + function O(Z, J) { + return ( + // temp vars used in fallback + Fo(Z) ? Fo(J) : ( + // entity names + Me(Z) ? Me(J) && Z.escapedText === J.escapedText : Tn(Z) ? Tn(J) && O(Z.expression, J.expression) && O(Z.name, J.name) : ( + // `void 0` + Vx(Z) ? Vx(J) && d_(Z.expression) && Z.expression.text === "0" && d_(J.expression) && J.expression.text === "0" : ( + // `"undefined"` or `"function"` in `typeof` checks + ea(Z) ? ea(J) && Z.text === J.text : ( + // used in `typeof` checks for fallback + e6(Z) ? e6(J) && O(Z.expression, J.expression) : ( + // parens in `typeof` checks with temps + Yu(Z) ? Yu(J) && O(Z.expression, J.expression) : ( + // conditionals used in fallback + qx(Z) ? qx(J) && O(Z.condition, J.condition) && O(Z.whenTrue, J.whenTrue) && O(Z.whenFalse, J.whenFalse) : ( + // logical binary and assignments used in fallback + fn(Z) ? fn(J) && Z.operatorToken.kind === J.operatorToken.kind && O(Z.left, J.left) && O(Z.right, J.right) : !1 + ) + ) + ) + ) + ) + ) + ) + ); + } + function F(Z) { + const J = i.getTypeReferenceSerializationKind(Z.typeName, u ?? _); + switch (J) { + case 0: + if (ur(Z, (ie) => ie.parent && Xb(ie.parent) && (ie.parent.trueType === ie || ie.parent.falseType === ie))) + return t.createIdentifier("Object"); + const re = W(Z.typeName), te = t.createTempVariable(n); + return t.createConditionalExpression( + t.createTypeCheck(t.createAssignment(te, re), "function"), + /*questionToken*/ + void 0, + te, + /*colonToken*/ + void 0, + t.createIdentifier("Object") + ); + case 1: + return V(Z.typeName); + case 2: + return t.createVoidZero(); + case 4: + return _e( + "BigInt", + 7 + /* ES2020 */ + ); + case 6: + return t.createIdentifier("Boolean"); + case 3: + return t.createIdentifier("Number"); + case 5: + return t.createIdentifier("String"); + case 7: + return t.createIdentifier("Array"); + case 8: + return _e( + "Symbol", + 2 + /* ES2015 */ + ); + case 10: + return t.createIdentifier("Function"); + case 9: + return t.createIdentifier("Promise"); + case 11: + return t.createIdentifier("Object"); + default: + return E.assertNever(J); + } + } + function R(Z, J) { + return t.createLogicalAnd( + t.createStrictInequality(t.createTypeOfExpression(Z), t.createStringLiteral("undefined")), + J + ); + } + function W(Z) { + if (Z.kind === 80) { + const te = V(Z); + return R(te, te); + } + if (Z.left.kind === 80) + return R(V(Z.left), V(Z)); + const J = W(Z.left), re = t.createTempVariable(n); + return t.createLogicalAnd( + t.createLogicalAnd( + J.left, + t.createStrictInequality(t.createAssignment(re, J.right), t.createVoidZero()) + ), + t.createPropertyAccessExpression(re, Z.right) + ); + } + function V(Z) { + switch (Z.kind) { + case 80: + const J = Fa(ot(bv.cloneNode(Z), Z), Z.parent); + return J.original = void 0, Fa(J, ls(_)), J; + case 166: + return $(Z); + } + } + function $(Z) { + return t.createPropertyAccessExpression(V(Z.left), Z.right); + } + function U(Z) { + return t.createConditionalExpression( + t.createTypeCheck(t.createIdentifier(Z), "function"), + /*questionToken*/ + void 0, + t.createIdentifier(Z), + /*colonToken*/ + void 0, + t.createIdentifier("Object") + ); + } + function _e(Z, J) { + return o < J ? U(Z) : t.createIdentifier(Z); + } + } + function Fne(e) { + const { + factory: t, + getEmitHelperFactory: n, + hoistVariableDeclaration: i + } = e, s = e.getEmitResolver(), o = e.getCompilerOptions(), c = pa(o), _ = e.onSubstituteNode; + e.onSubstituteNode = he; + let u; + return Ad(e, m); + function m(we) { + const Ue = kr(we, h, e); + return Qg(Ue, e.readEmitHelpers()), Ue; + } + function g(we) { + return ll(we) ? void 0 : we; + } + function h(we) { + if (!(we.transformFlags & 33554432)) + return we; + switch (we.kind) { + case 170: + return; + case 263: + return S(we); + case 231: + return F(we); + case 176: + return R(we); + case 174: + return V(we); + case 178: + return U(we); + case 177: + return $(we); + case 172: + return _e(we); + case 169: + return Z(we); + default: + return kr(we, h, e); + } + } + function S(we) { + if (!(D0( + /*useLegacyDecorators*/ + !0, + we + ) || N4( + /*useLegacyDecorators*/ + !0, + we + ))) + return kr(we, h, e); + const Ue = D0( + /*useLegacyDecorators*/ + !0, + we + ) ? O(we, we.name) : A(we, we.name); + return Gm(Ue); + } + function T(we) { + return !!(we.transformFlags & 536870912); + } + function C(we) { + return at(we, T); + } + function D(we) { + for (const Ue of we.members) { + if (!n2(Ue)) continue; + const bt = gO( + Ue, + we, + /*useLegacyDecorators*/ + !0 + ); + if (at(bt?.decorators, T) || at(bt?.parameters, C)) return !0; + } + return !1; + } + function w(we, Ue) { + let bt = []; + return te( + bt, + we, + /*isStatic*/ + !1 + ), te( + bt, + we, + /*isStatic*/ + !0 + ), D(we) && (Ue = ot( + t.createNodeArray([ + ...Ue, + t.createClassStaticBlockDeclaration( + t.createBlock( + bt, + /*multiLine*/ + !0 + ) + ) + ]), + Ue + ), bt = void 0), { decorationStatements: bt, members: Ue }; + } + function A(we, Ue) { + const bt = Or(we.modifiers, g, ia), Lt = Or(we.heritageClauses, h, Z_); + let er = Or(we.members, h, sl), Nr = []; + ({ members: er, decorationStatements: Nr } = w(we, er)); + const Dt = t.updateClassDeclaration( + we, + bt, + Ue, + /*typeParameters*/ + void 0, + Lt, + er + ); + return Nn([Dt], Nr); + } + function O(we, Ue) { + const bt = $n( + we, + 32 + /* Export */ + ), Lt = $n( + we, + 2048 + /* Default */ + ), er = Or(we.modifiers, (gt) => CN(gt) || ll(gt) ? void 0 : gt, Oo), Nr = um(we), Dt = it(we), Qt = c < 2 ? t.getInternalName( + we, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ) : t.getLocalName( + we, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ), Wr = Or(we.heritageClauses, h, Z_); + let yr = Or(we.members, h, sl), qn = []; + ({ members: yr, decorationStatements: qn } = w(we, yr)); + const Bt = c >= 9 && !!Dt && at(yr, (gt) => ss(gt) && $n( + gt, + 256 + /* Static */ + ) || nc(gt)); + Bt && (yr = ot( + t.createNodeArray([ + t.createClassStaticBlockDeclaration( + t.createBlock([ + t.createExpressionStatement( + t.createAssignment(Dt, t.createThis()) + ) + ]) + ), + ...yr + ]), + yr + )); + const bi = t.createClassExpression( + er, + Ue && Fo(Ue) ? void 0 : Ue, + /*typeParameters*/ + void 0, + Wr, + yr + ); + Sn(bi, we), ot(bi, Nr); + const pi = Dt && !Bt ? t.createAssignment(Dt, bi) : bi, Xn = t.createVariableDeclaration( + Qt, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + pi + ); + Sn(Xn, we); + const jr = t.createVariableDeclarationList( + [Xn], + 1 + /* Let */ + ), di = t.createVariableStatement( + /*modifiers*/ + void 0, + jr + ); + Sn(di, we), ot(di, Nr), Hc(di, we); + const Re = [di]; + if (Nn(Re, qn), me(Re, we), bt) + if (Lt) { + const gt = t.createExportDefault(Qt); + Re.push(gt); + } else { + const gt = t.createExternalModuleExport(t.getDeclarationName(we)); + Re.push(gt); + } + return Re; + } + function F(we) { + return t.updateClassExpression( + we, + Or(we.modifiers, g, ia), + we.name, + /*typeParameters*/ + void 0, + Or(we.heritageClauses, h, Z_), + Or(we.members, h, sl) + ); + } + function R(we) { + return t.updateConstructorDeclaration( + we, + Or(we.modifiers, g, ia), + Or(we.parameters, h, Ii), + Xe(we.body, h, ks) + ); + } + function W(we, Ue) { + return we !== Ue && (Hc(we, Ue), da(we, um(Ue))), we; + } + function V(we) { + return W( + t.updateMethodDeclaration( + we, + Or(we.modifiers, g, ia), + we.asteriskToken, + E.checkDefined(Xe(we.name, h, Fc)), + /*questionToken*/ + void 0, + /*typeParameters*/ + void 0, + Or(we.parameters, h, Ii), + /*type*/ + void 0, + Xe(we.body, h, ks) + ), + we + ); + } + function $(we) { + return W( + t.updateGetAccessorDeclaration( + we, + Or(we.modifiers, g, ia), + E.checkDefined(Xe(we.name, h, Fc)), + Or(we.parameters, h, Ii), + /*type*/ + void 0, + Xe(we.body, h, ks) + ), + we + ); + } + function U(we) { + return W( + t.updateSetAccessorDeclaration( + we, + Or(we.modifiers, g, ia), + E.checkDefined(Xe(we.name, h, Fc)), + Or(we.parameters, h, Ii), + Xe(we.body, h, ks) + ), + we + ); + } + function _e(we) { + if (!(we.flags & 33554432 || $n( + we, + 128 + /* Ambient */ + ))) + return W( + t.updatePropertyDeclaration( + we, + Or(we.modifiers, g, ia), + E.checkDefined(Xe(we.name, h, Fc)), + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + Xe(we.initializer, h, ct) + ), + we + ); + } + function Z(we) { + const Ue = t.updateParameterDeclaration( + we, + Zte(t, we.modifiers), + we.dotDotDotToken, + E.checkDefined(Xe(we.name, h, uS)), + /*questionToken*/ + void 0, + /*type*/ + void 0, + Xe(we.initializer, h, ct) + ); + return Ue !== we && (Hc(Ue, we), ot(Ue, um(we)), da(Ue, um(we)), on( + Ue.name, + 64 + /* NoTrailingSourceMap */ + )), Ue; + } + function J(we) { + return mD(we.expression, "___metadata"); + } + function re(we) { + if (!we) + return; + const { false: Ue, true: bt } = CR(we.decorators, J), Lt = []; + return Nn(Lt, gr(Ue, Ee)), Nn(Lt, na(we.parameters, oe)), Nn(Lt, gr(bt, Ee)), Lt; + } + function te(we, Ue, bt) { + Nn(we, gr(Te(Ue, bt), (Lt) => t.createExpressionStatement(Lt))); + } + function ie(we, Ue, bt) { + return u3( + /*useLegacyDecorators*/ + !0, + we, + bt + ) && Ue === Vs(we); + } + function le(we, Ue) { + return kn(we.members, (bt) => ie(bt, Ue, we)); + } + function Te(we, Ue) { + const bt = le(we, Ue); + let Lt; + for (const er of bt) + Lt = Pr(Lt, q(we, er)); + return Lt; + } + function q(we, Ue) { + const bt = gO( + Ue, + we, + /*useLegacyDecorators*/ + !0 + ), Lt = re(bt); + if (!Lt) + return; + const er = xe(we, Ue), Nr = ke( + Ue, + /*generateNameForComputedPropertyName*/ + !$n( + Ue, + 128 + /* Ambient */ + ) + ), Dt = ss(Ue) && !cm(Ue) ? t.createVoidZero() : t.createNull(), Qt = n().createDecorateHelper( + Lt, + er, + Nr, + Dt + ); + return on( + Qt, + 3072 + /* NoComments */ + ), da(Qt, um(Ue)), Qt; + } + function me(we, Ue) { + const bt = Ce(Ue); + bt && we.push(Sn(t.createExpressionStatement(bt), Ue)); + } + function Ce(we) { + const Ue = CW( + we, + /*useLegacyDecorators*/ + !0 + ), bt = re(Ue); + if (!bt) + return; + const Lt = u && u[Ku(we)], er = c < 2 ? t.getInternalName( + we, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ) : t.getDeclarationName( + we, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ), Nr = n().createDecorateHelper(bt, er), Dt = t.createAssignment(er, Lt ? t.createAssignment(Lt, Nr) : Nr); + return on( + Dt, + 3072 + /* NoComments */ + ), da(Dt, um(we)), Dt; + } + function Ee(we) { + return E.checkDefined(Xe(we.expression, h, ct)); + } + function oe(we, Ue) { + let bt; + if (we) { + bt = []; + for (const Lt of we) { + const er = n().createParamHelper( + Ee(Lt), + Ue + ); + ot(er, Lt.expression), on( + er, + 3072 + /* NoComments */ + ), bt.push(er); + } + } + return bt; + } + function ke(we, Ue) { + const bt = we.name; + return Ni(bt) ? t.createIdentifier("") : fa(bt) ? Ue && !og(bt.expression) ? t.getGeneratedNameForNode(bt) : bt.expression : Me(bt) ? t.createStringLiteral(An(bt)) : t.cloneNode(bt); + } + function ue() { + u || (e.enableSubstitution( + 80 + /* Identifier */ + ), u = []); + } + function it(we) { + if (s.hasNodeCheckFlag( + we, + 262144 + /* ContainsConstructorReference */ + )) { + ue(); + const Ue = t.createUniqueName(we.name && !Fo(we.name) ? An(we.name) : "default"); + return u[Ku(we)] = Ue, i(Ue), Ue; + } + } + function Oe(we) { + return t.createPropertyAccessExpression(t.getDeclarationName(we), "prototype"); + } + function xe(we, Ue) { + return Vs(Ue) ? t.getDeclarationName(we) : Oe(we); + } + function he(we, Ue) { + return Ue = _(we, Ue), we === 1 ? ne(Ue) : Ue; + } + function ne(we) { + switch (we.kind) { + case 80: + return Ae(we); + } + return we; + } + function Ae(we) { + return De(we) ?? we; + } + function De(we) { + if (u && s.hasNodeCheckFlag( + we, + 536870912 + /* ConstructorReference */ + )) { + const Ue = s.getReferencedValueDeclaration(we); + if (Ue) { + const bt = u[Ue.id]; + if (bt) { + const Lt = t.cloneNode(bt); + return da(Lt, we), Hc(Lt, we), Lt; + } + } + } + } + } + function One(e) { + const { + factory: t, + getEmitHelperFactory: n, + startLexicalEnvironment: i, + endLexicalEnvironment: s, + hoistVariableDeclaration: o + } = e, c = pa(e.getCompilerOptions()); + let _, u, m, g, h, S; + return Ad(e, T); + function T(L) { + _ = void 0, S = !1; + const ve = kr(L, U, e); + return Qg(ve, e.readEmitHelpers()), S && (wS( + ve, + 32 + /* TransformPrivateStaticElements */ + ), S = !1), ve; + } + function C() { + switch (u = void 0, m = void 0, g = void 0, _?.kind) { + case "class": + u = _.classInfo; + break; + case "class-element": + u = _.next.classInfo, m = _.classThis, g = _.classSuper; + break; + case "name": + const L = _.next.next.next; + L?.kind === "class-element" && (u = L.next.classInfo, m = L.classThis, g = L.classSuper); + break; + } + } + function D(L) { + _ = { kind: "class", next: _, classInfo: L, savedPendingExpressions: h }, h = void 0, C(); + } + function w() { + E.assert(_?.kind === "class", "Incorrect value for top.kind.", () => `Expected top.kind to be 'class' but got '${_?.kind}' instead.`), h = _.savedPendingExpressions, _ = _.next, C(); + } + function A(L) { + var ve, X; + E.assert(_?.kind === "class", "Incorrect value for top.kind.", () => `Expected top.kind to be 'class' but got '${_?.kind}' instead.`), _ = { kind: "class-element", next: _ }, (nc(L) || ss(L) && Kc(L)) && (_.classThis = (ve = _.next.classInfo) == null ? void 0 : ve.classThis, _.classSuper = (X = _.next.classInfo) == null ? void 0 : X.classSuper), C(); + } + function O() { + var L; + E.assert(_?.kind === "class-element", "Incorrect value for top.kind.", () => `Expected top.kind to be 'class-element' but got '${_?.kind}' instead.`), E.assert(((L = _.next) == null ? void 0 : L.kind) === "class", "Incorrect value for top.next.kind.", () => { + var ve; + return `Expected top.next.kind to be 'class' but got '${(ve = _.next) == null ? void 0 : ve.kind}' instead.`; + }), _ = _.next, C(); + } + function F() { + E.assert(_?.kind === "class-element", "Incorrect value for top.kind.", () => `Expected top.kind to be 'class-element' but got '${_?.kind}' instead.`), _ = { kind: "name", next: _ }, C(); + } + function R() { + E.assert(_?.kind === "name", "Incorrect value for top.kind.", () => `Expected top.kind to be 'name' but got '${_?.kind}' instead.`), _ = _.next, C(); + } + function W() { + _?.kind === "other" ? (E.assert(!h), _.depth++) : (_ = { kind: "other", next: _, depth: 0, savedPendingExpressions: h }, h = void 0, C()); + } + function V() { + E.assert(_?.kind === "other", "Incorrect value for top.kind.", () => `Expected top.kind to be 'other' but got '${_?.kind}' instead.`), _.depth > 0 ? (E.assert(!h), _.depth--) : (h = _.savedPendingExpressions, _ = _.next, C()); + } + function $(L) { + return !!(L.transformFlags & 33554432) || !!m && !!(L.transformFlags & 16384) || !!m && !!g && !!(L.transformFlags & 134217728); + } + function U(L) { + if (!$(L)) + return L; + switch (L.kind) { + case 170: + return E.fail("Use `modifierVisitor` instead."); + case 263: + return Ce(L); + case 231: + return Ee(L); + case 176: + case 172: + case 175: + return E.fail("Not supported outside of a class. Use 'classElementVisitor' instead."); + case 169: + return Nr(L); + // Support NamedEvaluation to ensure the correct class name for class expressions. + case 226: + return qn( + L, + /*discarded*/ + !1 + ); + case 303: + return di(L); + case 260: + return Re(L); + case 208: + return gt(L); + case 277: + return Qe(L); + case 110: + return we(L); + case 248: + return Wr(L); + case 244: + return yr(L); + case 356: + return bi( + L, + /*discarded*/ + !1 + ); + case 217: + return Ct( + L, + /*discarded*/ + !1 + ); + case 355: + return ee( + L + ); + case 213: + return Ue(L); + case 215: + return bt(L); + case 224: + case 225: + return Bt( + L, + /*discarded*/ + !1 + ); + case 211: + return Lt(L); + case 212: + return er(L); + case 167: + return jr(L); + case 174: + // object literal methods and accessors + case 178: + case 177: + case 218: + case 262: { + W(); + const ve = kr(L, _e, e); + return V(), ve; + } + default: + return kr(L, _e, e); + } + } + function _e(L) { + switch (L.kind) { + case 170: + return; + default: + return U(L); + } + } + function Z(L) { + switch (L.kind) { + case 170: + return; + default: + return L; + } + } + function J(L) { + switch (L.kind) { + case 176: + return ue(L); + case 174: + return xe(L); + case 177: + return he(L); + case 178: + return ne(L); + case 172: + return De(L); + case 175: + return Ae(L); + default: + return U(L); + } + } + function re(L) { + switch (L.kind) { + case 224: + case 225: + return Bt( + L, + /*discarded*/ + !0 + ); + case 226: + return qn( + L, + /*discarded*/ + !0 + ); + case 356: + return bi( + L, + /*discarded*/ + !0 + ); + case 217: + return Ct( + L, + /*discarded*/ + !0 + ); + default: + return U(L); + } + } + function te(L) { + let ve = L.name && Me(L.name) && !Fo(L.name) ? An(L.name) : L.name && Ni(L.name) && !Fo(L.name) ? An(L.name).slice(1) : L.name && ea(L.name) && E_( + L.name.text, + 99 + /* ESNext */ + ) ? L.name.text : Zn(L) ? "class" : "member"; + return k0(L) && (ve = `get_${ve}`), Mg(L) && (ve = `set_${ve}`), L.name && Ni(L.name) && (ve = `private_${ve}`), Vs(L) && (ve = `static_${ve}`), "_" + ve; + } + function ie(L, ve) { + return t.createUniqueName( + `${te(L)}_${ve}`, + 24 + /* ReservedInNestedScopes */ + ); + } + function le(L, ve) { + return t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList( + [ + t.createVariableDeclaration( + L, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + ve + ) + ], + 1 + /* Let */ + ) + ); + } + function Te(L) { + const ve = t.createUniqueName( + "_metadata", + 48 + /* FileLevel */ + ); + let X, lt, zt = !1, de = !1, st = !1, Gt, Xr, Rr; + if (AC( + /*useLegacyDecorators*/ + !1, + L + )) { + const Jr = at(L.members, (tt) => (Fu(tt) || l_(tt)) && Kc(tt)); + Gt = t.createUniqueName( + "_classThis", + Jr ? 24 : 48 + /* FileLevel */ + ); + } + for (const Jr of L.members) { + if (ix(Jr) && u3( + /*useLegacyDecorators*/ + !1, + Jr, + L + )) + if (Kc(Jr)) { + if (!lt) { + lt = t.createUniqueName( + "_staticExtraInitializers", + 48 + /* FileLevel */ + ); + const tt = n().createRunInitializersHelper(Gt ?? t.createThis(), lt); + da(tt, L.name ?? Ih(L)), Xr ?? (Xr = []), Xr.push(tt); + } + } else { + if (!X) { + X = t.createUniqueName( + "_instanceExtraInitializers", + 48 + /* FileLevel */ + ); + const tt = n().createRunInitializersHelper(t.createThis(), X); + da(tt, L.name ?? Ih(L)), Rr ?? (Rr = []), Rr.push(tt); + } + X ?? (X = t.createUniqueName( + "_instanceExtraInitializers", + 48 + /* FileLevel */ + )); + } + if (nc(Jr) ? sk(Jr) || (zt = !0) : ss(Jr) && (Kc(Jr) ? zt || (zt = !!Jr.initializer || Pf(Jr)) : de || (de = !nB(Jr))), (Fu(Jr) || l_(Jr)) && Kc(Jr) && (st = !0), lt && X && zt && de && st) + break; + } + return { + class: L, + classThis: Gt, + metadataReference: ve, + instanceMethodExtraInitializersName: X, + staticMethodExtraInitializersName: lt, + hasStaticInitializers: zt, + hasNonAmbientInstanceFields: de, + hasStaticPrivateClassElements: st, + pendingStaticInitializers: Xr, + pendingInstanceInitializers: Rr + }; + } + function q(L) { + i(), !wW(L) && D0( + /*useLegacyDecorators*/ + !1, + L + ) && (L = vO(e, L, t.createStringLiteral(""))); + const ve = t.getLocalName( + L, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !1, + /*ignoreAssignedName*/ + !0 + ), X = Te(L), lt = []; + let zt, de, st, Gt, Xr = !1; + const Rr = $e(CW( + L, + /*useLegacyDecorators*/ + !1 + )); + Rr && (X.classDecoratorsName = t.createUniqueName( + "_classDecorators", + 48 + /* FileLevel */ + ), X.classDescriptorName = t.createUniqueName( + "_classDescriptor", + 48 + /* FileLevel */ + ), X.classExtraInitializersName = t.createUniqueName( + "_classExtraInitializers", + 48 + /* FileLevel */ + ), E.assertIsDefined(X.classThis), lt.push( + le(X.classDecoratorsName, t.createArrayLiteralExpression(Rr)), + le(X.classDescriptorName), + le(X.classExtraInitializersName, t.createArrayLiteralExpression()), + le(X.classThis) + ), X.hasStaticPrivateClassElements && (Xr = !0, S = !0)); + const Jr = w3( + L.heritageClauses, + 96 + /* ExtendsKeyword */ + ), tt = Jr && Uc(Jr.types), ut = tt && Xe(tt.expression, U, ct); + if (ut) { + X.classSuper = t.createUniqueName( + "_classSuper", + 48 + /* FileLevel */ + ); + const Tr = xc(ut), _r = Gc(Tr) && !Tr.name || po(Tr) && !Tr.name || bo(Tr) ? t.createComma(t.createNumericLiteral(0), ut) : ut; + lt.push(le(X.classSuper, _r)); + const Ot = t.updateExpressionWithTypeArguments( + tt, + X.classSuper, + /*typeArguments*/ + void 0 + ), mi = t.updateHeritageClause(Jr, [Ot]); + Gt = t.createNodeArray([mi]); + } + const Mt = X.classThis ?? t.createThis(); + D(X), zt = Pr(zt, ye(X.metadataReference, X.classSuper)); + let Pt = L.members; + if (Pt = Or(Pt, (Tr) => Go(Tr) ? Tr : J(Tr), sl), Pt = Or(Pt, (Tr) => Go(Tr) ? J(Tr) : Tr, sl), h) { + let Tr; + for (let _r of h) { + _r = Xe(_r, function mi(Js) { + if (!(Js.transformFlags & 16384)) + return Js; + switch (Js.kind) { + case 110: + return Tr || (Tr = t.createUniqueName( + "_outerThis", + 16 + /* Optimistic */ + ), lt.unshift(le(Tr, t.createThis()))), Tr; + default: + return kr(Js, mi, e); + } + }, ct); + const Ot = t.createExpressionStatement(_r); + zt = Pr(zt, Ot); + } + h = void 0; + } + if (w(), at(X.pendingInstanceInitializers) && !Ug(L)) { + const Tr = oe(L, X); + if (Tr) { + const _r = sm(L), Ot = !!(_r && xc(_r.expression).kind !== 106), mi = []; + if (Ot) { + const Ms = t.createSpreadElement(t.createIdentifier("arguments")), Ns = t.createCallExpression( + t.createSuper(), + /*typeArguments*/ + void 0, + [Ms] + ); + mi.push(t.createExpressionStatement(Ns)); + } + Nn(mi, Tr); + const Js = t.createBlock( + mi, + /*multiLine*/ + !0 + ); + st = t.createConstructorDeclaration( + /*modifiers*/ + void 0, + [], + Js + ); + } + } + if (X.staticMethodExtraInitializersName && lt.push( + le(X.staticMethodExtraInitializersName, t.createArrayLiteralExpression()) + ), X.instanceMethodExtraInitializersName && lt.push( + le(X.instanceMethodExtraInitializersName, t.createArrayLiteralExpression()) + ), X.memberInfos && al(X.memberInfos, (Tr, _r) => { + Vs(_r) && (lt.push(le(Tr.memberDecoratorsName)), Tr.memberInitializersName && lt.push(le(Tr.memberInitializersName, t.createArrayLiteralExpression())), Tr.memberExtraInitializersName && lt.push(le(Tr.memberExtraInitializersName, t.createArrayLiteralExpression())), Tr.memberDescriptorName && lt.push(le(Tr.memberDescriptorName))); + }), X.memberInfos && al(X.memberInfos, (Tr, _r) => { + Vs(_r) || (lt.push(le(Tr.memberDecoratorsName)), Tr.memberInitializersName && lt.push(le(Tr.memberInitializersName, t.createArrayLiteralExpression())), Tr.memberExtraInitializersName && lt.push(le(Tr.memberExtraInitializersName, t.createArrayLiteralExpression())), Tr.memberDescriptorName && lt.push(le(Tr.memberDescriptorName))); + }), zt = Nn(zt, X.staticNonFieldDecorationStatements), zt = Nn(zt, X.nonStaticNonFieldDecorationStatements), zt = Nn(zt, X.staticFieldDecorationStatements), zt = Nn(zt, X.nonStaticFieldDecorationStatements), X.classDescriptorName && X.classDecoratorsName && X.classExtraInitializersName && X.classThis) { + zt ?? (zt = []); + const Tr = t.createPropertyAssignment("value", Mt), _r = t.createObjectLiteralExpression([Tr]), Ot = t.createAssignment(X.classDescriptorName, _r), mi = t.createPropertyAccessExpression(Mt, "name"), Js = n().createESDecorateHelper( + t.createNull(), + Ot, + X.classDecoratorsName, + { kind: "class", name: mi, metadata: X.metadataReference }, + t.createNull(), + X.classExtraInitializersName + ), Ms = t.createExpressionStatement(Js); + da(Ms, Ih(L)), zt.push(Ms); + const Ns = t.createPropertyAccessExpression(X.classDescriptorName, "value"), kc = t.createAssignment(X.classThis, Ns), Wo = t.createAssignment(ve, kc); + zt.push(t.createExpressionStatement(Wo)); + } + if (zt.push(ft(Mt, X.metadataReference)), at(X.pendingStaticInitializers)) { + for (const Tr of X.pendingStaticInitializers) { + const _r = t.createExpressionStatement(Tr); + da(_r, F0(Tr)), de = Pr(de, _r); + } + X.pendingStaticInitializers = void 0; + } + if (X.classExtraInitializersName) { + const Tr = n().createRunInitializersHelper(Mt, X.classExtraInitializersName), _r = t.createExpressionStatement(Tr); + da(_r, L.name ?? Ih(L)), de = Pr(de, _r); + } + zt && de && !X.hasStaticInitializers && (Nn(zt, de), de = void 0); + const Zt = zt && t.createClassStaticBlockDeclaration(t.createBlock( + zt, + /*multiLine*/ + !0 + )); + Zt && Xr && lN( + Zt, + 32 + /* TransformPrivateStaticElements */ + ); + const fr = de && t.createClassStaticBlockDeclaration(t.createBlock( + de, + /*multiLine*/ + !0 + )); + if (Zt || st || fr) { + const Tr = [], _r = Pt.findIndex(sk); + Zt ? (Nn(Tr, Pt, 0, _r + 1), Tr.push(Zt), Nn(Tr, Pt, _r + 1)) : Nn(Tr, Pt), st && Tr.push(st), fr && Tr.push(fr), Pt = ot(t.createNodeArray(Tr), Pt); + } + const Vt = s(); + let ir; + if (Rr) { + ir = t.createClassExpression( + /*modifiers*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + Gt, + Pt + ), X.classThis && (ir = Ene(t, ir, X.classThis)); + const Tr = t.createVariableDeclaration( + ve, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + ir + ), _r = t.createVariableDeclarationList([Tr]), Ot = X.classThis ? t.createAssignment(ve, X.classThis) : ve; + lt.push( + t.createVariableStatement( + /*modifiers*/ + void 0, + _r + ), + t.createReturnStatement(Ot) + ); + } else + ir = t.createClassExpression( + /*modifiers*/ + void 0, + L.name, + /*typeParameters*/ + void 0, + Gt, + Pt + ), lt.push(t.createReturnStatement(ir)); + if (Xr) { + wS( + ir, + 32 + /* TransformPrivateStaticElements */ + ); + for (const Tr of ir.members) + (Fu(Tr) || l_(Tr)) && Kc(Tr) && wS( + Tr, + 32 + /* TransformPrivateStaticElements */ + ); + } + return Sn(ir, L), t.createImmediatelyInvokedArrowFunction(t.mergeLexicalEnvironment(lt, Vt)); + } + function me(L) { + return D0( + /*useLegacyDecorators*/ + !1, + L + ) || N4( + /*useLegacyDecorators*/ + !1, + L + ); + } + function Ce(L) { + if (me(L)) { + const ve = [], X = Jo(L, Zn) ?? L, lt = X.name ? t.createStringLiteralFromNode(X.name) : t.createStringLiteral("default"), zt = $n( + L, + 32 + /* Export */ + ), de = $n( + L, + 2048 + /* Default */ + ); + if (L.name || (L = vO(e, L, lt)), zt && de) { + const st = q(L); + if (L.name) { + const Gt = t.createVariableDeclaration( + t.getLocalName(L), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + st + ); + Sn(Gt, L); + const Xr = t.createVariableDeclarationList( + [Gt], + 1 + /* Let */ + ), Rr = t.createVariableStatement( + /*modifiers*/ + void 0, + Xr + ); + ve.push(Rr); + const Jr = t.createExportDefault(t.getDeclarationName(L)); + Sn(Jr, L), Hc(Jr, fm(L)), da(Jr, Ih(L)), ve.push(Jr); + } else { + const Gt = t.createExportDefault(st); + Sn(Gt, L), Hc(Gt, fm(L)), da(Gt, Ih(L)), ve.push(Gt); + } + } else { + E.assertIsDefined(L.name, "A class declaration that is not a default export must have a name."); + const st = q(L), Gt = zt ? (Mt) => jx(Mt) ? void 0 : Z(Mt) : Z, Xr = Or(L.modifiers, Gt, ia), Rr = t.getLocalName( + L, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ), Jr = t.createVariableDeclaration( + Rr, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + st + ); + Sn(Jr, L); + const tt = t.createVariableDeclarationList( + [Jr], + 1 + /* Let */ + ), ut = t.createVariableStatement(Xr, tt); + if (Sn(ut, L), Hc(ut, fm(L)), ve.push(ut), zt) { + const Mt = t.createExternalModuleExport(Rr); + Sn(Mt, L), ve.push(Mt); + } + } + return Gm(ve); + } else { + const ve = Or(L.modifiers, Z, ia), X = Or(L.heritageClauses, U, Z_); + D( + /*classInfo*/ + void 0 + ); + const lt = Or(L.members, J, sl); + return w(), t.updateClassDeclaration( + L, + ve, + L.name, + /*typeParameters*/ + void 0, + X, + lt + ); + } + } + function Ee(L) { + if (me(L)) { + const ve = q(L); + return Sn(ve, L), ve; + } else { + const ve = Or(L.modifiers, Z, ia), X = Or(L.heritageClauses, U, Z_); + D( + /*classInfo*/ + void 0 + ); + const lt = Or(L.members, J, sl); + return w(), t.updateClassExpression( + L, + ve, + L.name, + /*typeParameters*/ + void 0, + X, + lt + ); + } + } + function oe(L, ve) { + if (at(ve.pendingInstanceInitializers)) { + const X = []; + return X.push( + t.createExpressionStatement( + t.inlineExpressions(ve.pendingInstanceInitializers) + ) + ), ve.pendingInstanceInitializers = void 0, X; + } + } + function ke(L, ve, X, lt, zt, de) { + const st = lt[zt], Gt = ve[st]; + if (Nn(L, Or(ve, U, xi, X, st - X)), OS(Gt)) { + const Xr = []; + ke( + Xr, + Gt.tryBlock.statements, + /*statementOffset*/ + 0, + lt, + zt + 1, + de + ); + const Rr = t.createNodeArray(Xr); + ot(Rr, Gt.tryBlock.statements), L.push(t.updateTryStatement( + Gt, + t.updateBlock(Gt.tryBlock, Xr), + Xe(Gt.catchClause, U, t2), + Xe(Gt.finallyBlock, U, ks) + )); + } else + Nn(L, Or(ve, U, xi, st, 1)), Nn(L, de); + Nn(L, Or(ve, U, xi, st + 1)); + } + function ue(L) { + A(L); + const ve = Or(L.modifiers, Z, ia), X = Or(L.parameters, U, Ii); + let lt; + if (L.body && u) { + const zt = oe(u.class, u); + if (zt) { + const de = [], st = t.copyPrologue( + L.body.statements, + de, + /*ensureUseStrict*/ + !1, + U + ), Gt = dO(L.body.statements, st); + Gt.length > 0 ? ke(de, L.body.statements, st, Gt, 0, zt) : (Nn(de, zt), Nn(de, Or(L.body.statements, U, xi))), lt = t.createBlock( + de, + /*multiLine*/ + !0 + ), Sn(lt, L.body), ot(lt, L.body); + } + } + return lt ?? (lt = Xe(L.body, U, ks)), O(), t.updateConstructorDeclaration(L, ve, X, lt); + } + function it(L, ve) { + return L !== ve && (Hc(L, ve), da(L, Ih(ve))), L; + } + function Oe(L, ve, X) { + let lt, zt, de, st, Gt, Xr; + if (!ve) { + const tt = Or(L.modifiers, Z, ia); + return F(), zt = Xn(L.name), R(), { modifiers: tt, referencedName: lt, name: zt, initializersName: de, descriptorName: Xr, thisArg: Gt }; + } + const Rr = $e(gO( + L, + ve.class, + /*useLegacyDecorators*/ + !1 + )), Jr = Or(L.modifiers, Z, ia); + if (Rr) { + const tt = ie(L, "decorators"), ut = t.createArrayLiteralExpression(Rr), Mt = t.createAssignment(tt, ut), Pt = { memberDecoratorsName: tt }; + ve.memberInfos ?? (ve.memberInfos = /* @__PURE__ */ new Map()), ve.memberInfos.set(L, Pt), h ?? (h = []), h.push(Mt); + const Zt = ix(L) || l_(L) ? Vs(L) ? ve.staticNonFieldDecorationStatements ?? (ve.staticNonFieldDecorationStatements = []) : ve.nonStaticNonFieldDecorationStatements ?? (ve.nonStaticNonFieldDecorationStatements = []) : ss(L) && !l_(L) ? Vs(L) ? ve.staticFieldDecorationStatements ?? (ve.staticFieldDecorationStatements = []) : ve.nonStaticFieldDecorationStatements ?? (ve.nonStaticFieldDecorationStatements = []) : E.fail(), fr = cp(L) ? "getter" : A_(L) ? "setter" : fc(L) ? "method" : l_(L) ? "accessor" : ss(L) ? "field" : E.fail(); + let Vt; + if (Me(L.name) || Ni(L.name)) + Vt = { computed: !1, name: L.name }; + else if (am(L.name)) + Vt = { computed: !0, name: t.createStringLiteralFromNode(L.name) }; + else { + const Tr = L.name.expression; + am(Tr) && !Me(Tr) ? Vt = { computed: !0, name: t.createStringLiteralFromNode(Tr) } : (F(), { referencedName: lt, name: zt } = pi(L.name), Vt = { computed: !0, name: lt }, R()); + } + const ir = { + kind: fr, + name: Vt, + static: Vs(L), + private: Ni(L.name), + access: { + // 15.7.3 CreateDecoratorAccessObject (kind, name) + // 2. If _kind_ is ~field~, ~method~, ~accessor~, or ~getter~, then ... + get: ss(L) || cp(L) || fc(L), + // 3. If _kind_ is ~field~, ~accessor~, or ~setter~, then ... + set: ss(L) || A_(L) + }, + metadata: ve.metadataReference + }; + if (ix(L)) { + const Tr = Vs(L) ? ve.staticMethodExtraInitializersName : ve.instanceMethodExtraInitializersName; + E.assertIsDefined(Tr); + let _r; + Fu(L) && X && (_r = X(L, Or(Jr, (Js) => jn(Js, hD), ia)), Pt.memberDescriptorName = Xr = ie(L, "descriptor"), _r = t.createAssignment(Xr, _r)); + const Ot = n().createESDecorateHelper(t.createThis(), _r ?? t.createNull(), tt, ir, t.createNull(), Tr), mi = t.createExpressionStatement(Ot); + da(mi, Ih(L)), Zt.push(mi); + } else if (ss(L)) { + de = Pt.memberInitializersName ?? (Pt.memberInitializersName = ie(L, "initializers")), st = Pt.memberExtraInitializersName ?? (Pt.memberExtraInitializersName = ie(L, "extraInitializers")), Vs(L) && (Gt = ve.classThis); + let Tr; + Fu(L) && cm(L) && X && (Tr = X( + L, + /*modifiers*/ + void 0 + ), Pt.memberDescriptorName = Xr = ie(L, "descriptor"), Tr = t.createAssignment(Xr, Tr)); + const _r = n().createESDecorateHelper( + l_(L) ? t.createThis() : t.createNull(), + Tr ?? t.createNull(), + tt, + ir, + de, + st + ), Ot = t.createExpressionStatement(_r); + da(Ot, Ih(L)), Zt.push(Ot); + } + } + return zt === void 0 && (F(), zt = Xn(L.name), R()), !at(Jr) && (fc(L) || ss(L)) && on( + zt, + 1024 + /* NoLeadingComments */ + ), { modifiers: Jr, referencedName: lt, name: zt, initializersName: de, extraInitializersName: st, descriptorName: Xr, thisArg: Gt }; + } + function xe(L) { + A(L); + const { modifiers: ve, name: X, descriptorName: lt } = Oe(L, u, Ye); + if (lt) + return O(), it(Et(ve, X, lt), L); + { + const zt = Or(L.parameters, U, Ii), de = Xe(L.body, U, ks); + return O(), it(t.updateMethodDeclaration( + L, + ve, + L.asteriskToken, + X, + /*questionToken*/ + void 0, + /*typeParameters*/ + void 0, + zt, + /*type*/ + void 0, + de + ), L); + } + } + function he(L) { + A(L); + const { modifiers: ve, name: X, descriptorName: lt } = Oe(L, u, _t); + if (lt) + return O(), it(Xt(ve, X, lt), L); + { + const zt = Or(L.parameters, U, Ii), de = Xe(L.body, U, ks); + return O(), it(t.updateGetAccessorDeclaration( + L, + ve, + X, + zt, + /*type*/ + void 0, + de + ), L); + } + } + function ne(L) { + A(L); + const { modifiers: ve, name: X, descriptorName: lt } = Oe(L, u, yt); + if (lt) + return O(), it(rn(ve, X, lt), L); + { + const zt = Or(L.parameters, U, Ii), de = Xe(L.body, U, ks); + return O(), it(t.updateSetAccessorDeclaration(L, ve, X, zt, de), L); + } + } + function Ae(L) { + A(L); + let ve; + if (sk(L)) + ve = kr(L, U, e); + else if (qD(L)) { + const X = m; + m = void 0, ve = kr(L, U, e), m = X; + } else if (L = kr(L, U, e), ve = L, u && (u.hasStaticInitializers = !0, at(u.pendingStaticInitializers))) { + const X = []; + for (const de of u.pendingStaticInitializers) { + const st = t.createExpressionStatement(de); + da(st, F0(de)), X.push(st); + } + const lt = t.createBlock( + X, + /*multiLine*/ + !0 + ); + ve = [t.createClassStaticBlockDeclaration(lt), ve], u.pendingStaticInitializers = void 0; + } + return O(), ve; + } + function De(L) { + X_(L, Dt) && (L = K_(e, L, Qt(L.initializer))), A(L), E.assert(!nB(L), "Not yet implemented."); + const { modifiers: ve, name: X, initializersName: lt, extraInitializersName: zt, descriptorName: de, thisArg: st } = Oe(L, u, cm(L) ? We : void 0); + i(); + let Gt = Xe(L.initializer, U, ct); + lt && (Gt = n().createRunInitializersHelper( + st ?? t.createThis(), + lt, + Gt ?? t.createVoidZero() + )), Vs(L) && u && Gt && (u.hasStaticInitializers = !0); + const Xr = s(); + if (at(Xr) && (Gt = t.createImmediatelyInvokedArrowFunction([ + ...Xr, + t.createReturnStatement(Gt) + ])), u && (Vs(L) ? (Gt = Ie( + u, + /*isStatic*/ + !0, + Gt + ), zt && (u.pendingStaticInitializers ?? (u.pendingStaticInitializers = []), u.pendingStaticInitializers.push( + n().createRunInitializersHelper( + u.classThis ?? t.createThis(), + zt + ) + ))) : (Gt = Ie( + u, + /*isStatic*/ + !1, + Gt + ), zt && (u.pendingInstanceInitializers ?? (u.pendingInstanceInitializers = []), u.pendingInstanceInitializers.push( + n().createRunInitializersHelper( + t.createThis(), + zt + ) + )))), O(), cm(L) && de) { + const Rr = fm(L), Jr = F0(L), tt = L.name; + let ut = tt, Mt = tt; + if (fa(tt) && !og(tt.expression)) { + const ir = IF(tt); + if (ir) + ut = t.updateComputedPropertyName(tt, Xe(tt.expression, U, ct)), Mt = t.updateComputedPropertyName(tt, ir.left); + else { + const Tr = t.createTempVariable(o); + da(Tr, tt.expression); + const _r = Xe(tt.expression, U, ct), Ot = t.createAssignment(Tr, _r); + da(Ot, tt.expression), ut = t.updateComputedPropertyName(tt, Ot), Mt = t.updateComputedPropertyName(tt, Tr); + } + } + const Pt = Or(ve, (ir) => ir.kind !== 129 ? ir : void 0, ia), Zt = Tz(t, L, Pt, Gt); + Sn(Zt, L), on( + Zt, + 3072 + /* NoComments */ + ), da(Zt, Jr), da(Zt.name, L.name); + const fr = Xt(Pt, ut, de); + Sn(fr, L), Hc(fr, Rr), da(fr, Jr); + const Vt = rn(Pt, Mt, de); + return Sn(Vt, L), on( + Vt, + 3072 + /* NoComments */ + ), da(Vt, Jr), [Zt, fr, Vt]; + } + return it(t.updatePropertyDeclaration( + L, + ve, + X, + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + Gt + ), L); + } + function we(L) { + return m ?? L; + } + function Ue(L) { + if (D_(L.expression) && m) { + const ve = Xe(L.expression, U, ct), X = Or(L.arguments, U, ct), lt = t.createFunctionCallCall(ve, m, X); + return Sn(lt, L), ot(lt, L), lt; + } + return kr(L, U, e); + } + function bt(L) { + if (D_(L.tag) && m) { + const ve = Xe(L.tag, U, ct), X = t.createFunctionBindCall(ve, m, []); + Sn(X, L), ot(X, L); + const lt = Xe(L.template, U, sx); + return t.updateTaggedTemplateExpression( + L, + X, + /*typeArguments*/ + void 0, + lt + ); + } + return kr(L, U, e); + } + function Lt(L) { + if (D_(L) && Me(L.name) && m && g) { + const ve = t.createStringLiteralFromNode(L.name), X = t.createReflectGetCall(g, ve, m); + return Sn(X, L.expression), ot(X, L.expression), X; + } + return kr(L, U, e); + } + function er(L) { + if (D_(L) && m && g) { + const ve = Xe(L.argumentExpression, U, ct), X = t.createReflectGetCall(g, ve, m); + return Sn(X, L.expression), ot(X, L.expression), X; + } + return kr(L, U, e); + } + function Nr(L) { + X_(L, Dt) && (L = K_(e, L, Qt(L.initializer))); + const ve = t.updateParameterDeclaration( + L, + /*modifiers*/ + void 0, + L.dotDotDotToken, + Xe(L.name, U, uS), + /*questionToken*/ + void 0, + /*type*/ + void 0, + Xe(L.initializer, U, ct) + ); + return ve !== L && (Hc(ve, L), ot(ve, um(L)), da(ve, um(L)), on( + ve.name, + 64 + /* NoTrailingSourceMap */ + )), ve; + } + function Dt(L) { + return Gc(L) && !L.name && me(L); + } + function Qt(L) { + const ve = xc(L); + return Gc(ve) && !ve.name && !D0( + /*useLegacyDecorators*/ + !1, + ve + ); + } + function Wr(L) { + return t.updateForStatement( + L, + Xe(L.initializer, re, Kf), + Xe(L.condition, U, ct), + Xe(L.incrementor, re, ct), + Zu(L.statement, U, e) + ); + } + function yr(L) { + return kr(L, re, e); + } + function qn(L, ve) { + if (P0(L)) { + const X = gs(L.left), lt = Xe(L.right, U, ct); + return t.updateBinaryExpression(L, X, L.operatorToken, lt); + } + if (Cl(L)) { + if (X_(L, Dt)) + return L = K_(e, L, Qt(L.right)), kr(L, U, e); + if (D_(L.left) && m && g) { + let X = fo(L.left) ? Xe(L.left.argumentExpression, U, ct) : Me(L.left.name) ? t.createStringLiteralFromNode(L.left.name) : void 0; + if (X) { + let lt = Xe(L.right, U, ct); + if (WD(L.operatorToken.kind)) { + let de = X; + og(X) || (de = t.createTempVariable(o), X = t.createAssignment(de, X)); + const st = t.createReflectGetCall( + g, + de, + m + ); + Sn(st, L.left), ot(st, L.left), lt = t.createBinaryExpression( + st, + UD(L.operatorToken.kind), + lt + ), ot(lt, L); + } + const zt = ve ? void 0 : t.createTempVariable(o); + return zt && (lt = t.createAssignment(zt, lt), ot(zt, L)), lt = t.createReflectSetCall( + g, + X, + lt, + m + ), Sn(lt, L), ot(lt, L), zt && (lt = t.createComma(lt, zt), ot(lt, L)), lt; + } + } + } + if (L.operatorToken.kind === 28) { + const X = Xe(L.left, re, ct), lt = Xe(L.right, ve ? re : U, ct); + return t.updateBinaryExpression(L, X, L.operatorToken, lt); + } + return kr(L, U, e); + } + function Bt(L, ve) { + if (L.operator === 46 || L.operator === 47) { + const X = za(L.operand); + if (D_(X) && m && g) { + let lt = fo(X) ? Xe(X.argumentExpression, U, ct) : Me(X.name) ? t.createStringLiteralFromNode(X.name) : void 0; + if (lt) { + let zt = lt; + og(lt) || (zt = t.createTempVariable(o), lt = t.createAssignment(zt, lt)); + let de = t.createReflectGetCall(g, zt, m); + Sn(de, L), ot(de, L); + const st = ve ? void 0 : t.createTempVariable(o); + return de = EF(t, L, de, o, st), de = t.createReflectSetCall(g, lt, de, m), Sn(de, L), ot(de, L), st && (de = t.createComma(de, st), ot(de, L)), de; + } + } + } + return kr(L, U, e); + } + function bi(L, ve) { + const X = ve ? _O(L.elements, re) : _O(L.elements, U, re); + return t.updateCommaListExpression(L, X); + } + function pi(L) { + if (am(L) || Ni(L)) { + const de = t.createStringLiteralFromNode(L), st = Xe(L, U, Fc); + return { referencedName: de, name: st }; + } + if (am(L.expression) && !Me(L.expression)) { + const de = t.createStringLiteralFromNode(L.expression), st = Xe(L, U, Fc); + return { referencedName: de, name: st }; + } + const ve = t.getGeneratedNameForNode(L); + o(ve); + const X = n().createPropKeyHelper(Xe(L.expression, U, ct)), lt = t.createAssignment(ve, X), zt = t.updateComputedPropertyName(L, K(lt)); + return { referencedName: ve, name: zt }; + } + function Xn(L) { + return fa(L) ? jr(L) : Xe(L, U, Fc); + } + function jr(L) { + let ve = Xe(L.expression, U, ct); + return og(ve) || (ve = K(ve)), t.updateComputedPropertyName(L, ve); + } + function di(L) { + return X_(L, Dt) && (L = K_(e, L, Qt(L.initializer))), kr(L, U, e); + } + function Re(L) { + return X_(L, Dt) && (L = K_(e, L, Qt(L.initializer))), kr(L, U, e); + } + function gt(L) { + return X_(L, Dt) && (L = K_(e, L, Qt(L.initializer))), kr(L, U, e); + } + function tr(L) { + if (oa(L) || Ql(L)) + return gs(L); + if (D_(L) && m && g) { + const ve = fo(L) ? Xe(L.argumentExpression, U, ct) : Me(L.name) ? t.createStringLiteralFromNode(L.name) : void 0; + if (ve) { + const X = t.createTempVariable( + /*recordTempVariable*/ + void 0 + ), lt = t.createAssignmentTargetWrapper( + X, + t.createReflectSetCall( + g, + ve, + X, + m + ) + ); + return Sn(lt, L), ot(lt, L), lt; + } + } + return kr(L, U, e); + } + function qr(L) { + if (Cl( + L, + /*excludeCompoundAssignment*/ + !0 + )) { + X_(L, Dt) && (L = K_(e, L, Qt(L.right))); + const ve = tr(L.left), X = Xe(L.right, U, ct); + return t.updateBinaryExpression(L, ve, L.operatorToken, X); + } else + return tr(L); + } + function Bn(L) { + if (u_(L.expression)) { + const ve = tr(L.expression); + return t.updateSpreadElement(L, ve); + } + return kr(L, U, e); + } + function wn(L) { + return E.assertNode(L, zP), lp(L) ? Bn(L) : ul(L) ? kr(L, U, e) : qr(L); + } + function ki(L) { + const ve = Xe(L.name, U, Fc); + if (Cl( + L.initializer, + /*excludeCompoundAssignment*/ + !0 + )) { + const X = qr(L.initializer); + return t.updatePropertyAssignment(L, ve, X); + } + if (u_(L.initializer)) { + const X = tr(L.initializer); + return t.updatePropertyAssignment(L, ve, X); + } + return kr(L, U, e); + } + function Cs(L) { + return X_(L, Dt) && (L = K_(e, L, Qt(L.objectAssignmentInitializer))), kr(L, U, e); + } + function Ks(L) { + if (u_(L.expression)) { + const ve = tr(L.expression); + return t.updateSpreadAssignment(L, ve); + } + return kr(L, U, e); + } + function xr(L) { + return E.assertNode(L, JP), Zg(L) ? Ks(L) : _u(L) ? Cs(L) : Xc(L) ? ki(L) : kr(L, U, e); + } + function gs(L) { + if (Ql(L)) { + const ve = Or(L.elements, wn, ct); + return t.updateArrayLiteralExpression(L, ve); + } else { + const ve = Or(L.properties, xr, Eh); + return t.updateObjectLiteralExpression(L, ve); + } + } + function Qe(L) { + return X_(L, Dt) && (L = K_(e, L, Qt(L.expression))), kr(L, U, e); + } + function Ct(L, ve) { + const X = ve ? re : U, lt = Xe(L.expression, X, ct); + return t.updateParenthesizedExpression(L, lt); + } + function ee(L, ve) { + const X = U, lt = Xe(L.expression, X, ct); + return t.updatePartiallyEmittedExpression(L, lt); + } + function Ve(L, ve) { + return at(L) && (ve ? Yu(ve) ? (L.push(ve.expression), ve = t.updateParenthesizedExpression(ve, t.inlineExpressions(L))) : (L.push(ve), ve = t.inlineExpressions(L)) : ve = t.inlineExpressions(L)), ve; + } + function K(L) { + const ve = Ve(h, L); + return E.assertIsDefined(ve), ve !== L && (h = void 0), ve; + } + function Ie(L, ve, X) { + const lt = Ve(ve ? L.pendingStaticInitializers : L.pendingInstanceInitializers, X); + return lt !== X && (ve ? L.pendingStaticInitializers = void 0 : L.pendingInstanceInitializers = void 0), lt; + } + function $e(L) { + if (!L) + return; + const ve = []; + return Nn(ve, gr(L.decorators, Ke)), ve; + } + function Ke(L) { + const ve = Xe(L.expression, U, ct); + on( + ve, + 3072 + /* NoComments */ + ); + const X = xc(ve); + if (vo(X)) { + const { target: lt, thisArg: zt } = t.createCallBinding( + ve, + o, + c, + /*cacheIdentifiers*/ + !0 + ); + return t.restoreOuterExpressions(ve, t.createFunctionBindCall(lt, zt, [])); + } + return ve; + } + function Je(L, ve, X, lt, zt, de, st) { + const Gt = t.createFunctionExpression( + X, + lt, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + de, + /*type*/ + void 0, + st ?? t.createBlock([]) + ); + Sn(Gt, L), da(Gt, Ih(L)), on( + Gt, + 3072 + /* NoComments */ + ); + const Xr = zt === "get" || zt === "set" ? zt : void 0, Rr = t.createStringLiteralFromNode( + ve, + /*isSingleQuote*/ + void 0 + ), Jr = n().createSetFunctionNameHelper(Gt, Rr, Xr), tt = t.createPropertyAssignment(t.createIdentifier(zt), Jr); + return Sn(tt, L), da(tt, Ih(L)), on( + tt, + 3072 + /* NoComments */ + ), tt; + } + function Ye(L, ve) { + return t.createObjectLiteralExpression([ + Je( + L, + L.name, + ve, + L.asteriskToken, + "value", + Or(L.parameters, U, Ii), + Xe(L.body, U, ks) + ) + ]); + } + function _t(L, ve) { + return t.createObjectLiteralExpression([ + Je( + L, + L.name, + ve, + /*asteriskToken*/ + void 0, + "get", + [], + Xe(L.body, U, ks) + ) + ]); + } + function yt(L, ve) { + return t.createObjectLiteralExpression([ + Je( + L, + L.name, + ve, + /*asteriskToken*/ + void 0, + "set", + Or(L.parameters, U, Ii), + Xe(L.body, U, ks) + ) + ]); + } + function We(L, ve) { + return t.createObjectLiteralExpression([ + Je( + L, + L.name, + ve, + /*asteriskToken*/ + void 0, + "get", + [], + t.createBlock([ + t.createReturnStatement( + t.createPropertyAccessExpression( + t.createThis(), + t.getGeneratedPrivateNameForNode(L.name) + ) + ) + ]) + ), + Je( + L, + L.name, + ve, + /*asteriskToken*/ + void 0, + "set", + [t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "value" + )], + t.createBlock([ + t.createExpressionStatement( + t.createAssignment( + t.createPropertyAccessExpression( + t.createThis(), + t.getGeneratedPrivateNameForNode(L.name) + ), + t.createIdentifier("value") + ) + ) + ]) + ) + ]); + } + function Et(L, ve, X) { + return L = Or(L, (lt) => Bx(lt) ? lt : void 0, ia), t.createGetAccessorDeclaration( + L, + ve, + [], + /*type*/ + void 0, + t.createBlock([ + t.createReturnStatement( + t.createPropertyAccessExpression( + X, + t.createIdentifier("value") + ) + ) + ]) + ); + } + function Xt(L, ve, X) { + return L = Or(L, (lt) => Bx(lt) ? lt : void 0, ia), t.createGetAccessorDeclaration( + L, + ve, + [], + /*type*/ + void 0, + t.createBlock([ + t.createReturnStatement( + t.createFunctionCallCall( + t.createPropertyAccessExpression( + X, + t.createIdentifier("get") + ), + t.createThis(), + [] + ) + ) + ]) + ); + } + function rn(L, ve, X) { + return L = Or(L, (lt) => Bx(lt) ? lt : void 0, ia), t.createSetAccessorDeclaration( + L, + ve, + [t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "value" + )], + t.createBlock([ + t.createReturnStatement( + t.createFunctionCallCall( + t.createPropertyAccessExpression( + X, + t.createIdentifier("set") + ), + t.createThis(), + [t.createIdentifier("value")] + ) + ) + ]) + ); + } + function ye(L, ve) { + const X = t.createVariableDeclaration( + L, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createConditionalExpression( + t.createLogicalAnd( + t.createTypeCheck(t.createIdentifier("Symbol"), "function"), + t.createPropertyAccessExpression(t.createIdentifier("Symbol"), "metadata") + ), + t.createToken( + 58 + /* QuestionToken */ + ), + t.createCallExpression( + t.createPropertyAccessExpression(t.createIdentifier("Object"), "create"), + /*typeArguments*/ + void 0, + [ve ? fe(ve) : t.createNull()] + ), + t.createToken( + 59 + /* ColonToken */ + ), + t.createVoidZero() + ) + ); + return t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList( + [X], + 2 + /* Const */ + ) + ); + } + function ft(L, ve) { + const X = t.createObjectDefinePropertyCall( + L, + t.createPropertyAccessExpression(t.createIdentifier("Symbol"), "metadata"), + t.createPropertyDescriptor( + { configurable: !0, writable: !0, enumerable: !0, value: ve }, + /*singleLine*/ + !0 + ) + ); + return on( + t.createIfStatement(ve, t.createExpressionStatement(X)), + 1 + /* SingleLine */ + ); + } + function fe(L) { + return t.createBinaryExpression( + t.createElementAccessExpression( + L, + t.createPropertyAccessExpression(t.createIdentifier("Symbol"), "metadata") + ), + 61, + t.createNull() + ); + } + } + function Lne(e) { + const { + factory: t, + getEmitHelperFactory: n, + resumeLexicalEnvironment: i, + endLexicalEnvironment: s, + hoistVariableDeclaration: o + } = e, c = e.getEmitResolver(), _ = e.getCompilerOptions(), u = pa(_); + let m = 0, g = 0, h, S, T, C; + const D = []; + let w = 0; + const A = e.onEmitNode, O = e.onSubstituteNode; + return e.onEmitNode = yr, e.onSubstituteNode = qn, Ad(e, F); + function F(Re) { + if (Re.isDeclarationFile) + return Re; + R(1, !1), R(2, !rB(Re, _)); + const gt = kr(Re, J, e); + return Qg(gt, e.readEmitHelpers()), gt; + } + function R(Re, gt) { + w = gt ? w | Re : w & ~Re; + } + function W(Re) { + return (w & Re) !== 0; + } + function V() { + return !W( + 1 + /* NonTopLevel */ + ); + } + function $() { + return W( + 2 + /* HasLexicalThis */ + ); + } + function U(Re, gt, tr) { + const qr = Re & ~w; + if (qr) { + R( + qr, + /*val*/ + !0 + ); + const Bn = gt(tr); + return R( + qr, + /*val*/ + !1 + ), Bn; + } + return gt(tr); + } + function _e(Re) { + return kr(Re, J, e); + } + function Z(Re) { + switch (Re.kind) { + case 218: + case 262: + case 174: + case 177: + case 178: + case 176: + return Re; + case 169: + case 208: + case 260: + break; + case 80: + if (C && c.isArgumentsLocalBinding(Re)) + return C; + break; + } + return kr(Re, Z, e); + } + function J(Re) { + if (!(Re.transformFlags & 256)) + return C ? Z(Re) : Re; + switch (Re.kind) { + case 134: + return; + case 223: + return me(Re); + case 174: + return U(3, Ee, Re); + case 262: + return U(3, ue, Re); + case 218: + return U(3, it, Re); + case 219: + return U(1, Oe, Re); + case 211: + return S && Tn(Re) && Re.expression.kind === 108 && S.add(Re.name.escapedText), kr(Re, J, e); + case 212: + return S && Re.expression.kind === 108 && (T = !0), kr(Re, J, e); + case 177: + return U(3, oe, Re); + case 178: + return U(3, ke, Re); + case 176: + return U(3, Ce, Re); + case 263: + case 231: + return U(3, _e, Re); + default: + return kr(Re, J, e); + } + } + function re(Re) { + if (bK(Re)) + switch (Re.kind) { + case 243: + return ie(Re); + case 248: + return q(Re); + case 249: + return le(Re); + case 250: + return Te(Re); + case 299: + return te(Re); + case 241: + case 255: + case 269: + case 296: + case 297: + case 258: + case 246: + case 247: + case 245: + case 254: + case 256: + return kr(Re, re, e); + default: + return E.assertNever(Re, "Unhandled node."); + } + return J(Re); + } + function te(Re) { + const gt = /* @__PURE__ */ new Set(); + xe(Re.variableDeclaration, gt); + let tr; + if (gt.forEach((qr, Bn) => { + h.has(Bn) && (tr || (tr = new Set(h)), tr.delete(Bn)); + }), tr) { + const qr = h; + h = tr; + const Bn = kr(Re, re, e); + return h = qr, Bn; + } else + return kr(Re, re, e); + } + function ie(Re) { + if (he(Re.declarationList)) { + const gt = ne( + Re.declarationList, + /*hasReceiver*/ + !1 + ); + return gt ? t.createExpressionStatement(gt) : void 0; + } + return kr(Re, J, e); + } + function le(Re) { + return t.updateForInStatement( + Re, + he(Re.initializer) ? ne( + Re.initializer, + /*hasReceiver*/ + !0 + ) : E.checkDefined(Xe(Re.initializer, J, Kf)), + E.checkDefined(Xe(Re.expression, J, ct)), + Zu(Re.statement, re, e) + ); + } + function Te(Re) { + return t.updateForOfStatement( + Re, + Xe(Re.awaitModifier, J, XJ), + he(Re.initializer) ? ne( + Re.initializer, + /*hasReceiver*/ + !0 + ) : E.checkDefined(Xe(Re.initializer, J, Kf)), + E.checkDefined(Xe(Re.expression, J, ct)), + Zu(Re.statement, re, e) + ); + } + function q(Re) { + const gt = Re.initializer; + return t.updateForStatement( + Re, + he(gt) ? ne( + gt, + /*hasReceiver*/ + !1 + ) : Xe(Re.initializer, J, Kf), + Xe(Re.condition, J, ct), + Xe(Re.incrementor, J, ct), + Zu(Re.statement, re, e) + ); + } + function me(Re) { + return V() ? kr(Re, J, e) : Sn( + ot( + t.createYieldExpression( + /*asteriskToken*/ + void 0, + Xe(Re.expression, J, ct) + ), + Re + ), + Re + ); + } + function Ce(Re) { + const gt = C; + C = void 0; + const tr = t.updateConstructorDeclaration( + Re, + Or(Re.modifiers, J, ia), + ic(Re.parameters, J, e), + bt(Re) + ); + return C = gt, tr; + } + function Ee(Re) { + let gt; + const tr = Oc(Re), qr = C; + C = void 0; + const Bn = t.updateMethodDeclaration( + Re, + Or(Re.modifiers, J, Oo), + Re.asteriskToken, + Re.name, + /*questionToken*/ + void 0, + /*typeParameters*/ + void 0, + gt = tr & 2 ? er(Re) : ic(Re.parameters, J, e), + /*type*/ + void 0, + tr & 2 ? Nr(Re, gt) : bt(Re) + ); + return C = qr, Bn; + } + function oe(Re) { + const gt = C; + C = void 0; + const tr = t.updateGetAccessorDeclaration( + Re, + Or(Re.modifiers, J, Oo), + Re.name, + ic(Re.parameters, J, e), + /*type*/ + void 0, + bt(Re) + ); + return C = gt, tr; + } + function ke(Re) { + const gt = C; + C = void 0; + const tr = t.updateSetAccessorDeclaration( + Re, + Or(Re.modifiers, J, Oo), + Re.name, + ic(Re.parameters, J, e), + bt(Re) + ); + return C = gt, tr; + } + function ue(Re) { + let gt; + const tr = C; + C = void 0; + const qr = Oc(Re), Bn = t.updateFunctionDeclaration( + Re, + Or(Re.modifiers, J, Oo), + Re.asteriskToken, + Re.name, + /*typeParameters*/ + void 0, + gt = qr & 2 ? er(Re) : ic(Re.parameters, J, e), + /*type*/ + void 0, + qr & 2 ? Nr(Re, gt) : Of(Re.body, J, e) + ); + return C = tr, Bn; + } + function it(Re) { + let gt; + const tr = C; + C = void 0; + const qr = Oc(Re), Bn = t.updateFunctionExpression( + Re, + Or(Re.modifiers, J, ia), + Re.asteriskToken, + Re.name, + /*typeParameters*/ + void 0, + gt = qr & 2 ? er(Re) : ic(Re.parameters, J, e), + /*type*/ + void 0, + qr & 2 ? Nr(Re, gt) : Of(Re.body, J, e) + ); + return C = tr, Bn; + } + function Oe(Re) { + let gt; + const tr = Oc(Re); + return t.updateArrowFunction( + Re, + Or(Re.modifiers, J, ia), + /*typeParameters*/ + void 0, + gt = tr & 2 ? er(Re) : ic(Re.parameters, J, e), + /*type*/ + void 0, + Re.equalsGreaterThanToken, + tr & 2 ? Nr(Re, gt) : Of(Re.body, J, e) + ); + } + function xe({ name: Re }, gt) { + if (Me(Re)) + gt.add(Re.escapedText); + else + for (const tr of Re.elements) + ul(tr) || xe(tr, gt); + } + function he(Re) { + return !!Re && Il(Re) && !(Re.flags & 7) && Re.declarations.some(Ue); + } + function ne(Re, gt) { + Ae(Re); + const tr = X4(Re); + return tr.length === 0 ? gt ? Xe(t.converters.convertToAssignmentElementTarget(Re.declarations[0].name), J, ct) : void 0 : t.inlineExpressions(gr(tr, we)); + } + function Ae(Re) { + lr(Re.declarations, De); + } + function De({ name: Re }) { + if (Me(Re)) + o(Re); + else + for (const gt of Re.elements) + ul(gt) || De(gt); + } + function we(Re) { + const gt = da( + t.createAssignment( + t.converters.convertToAssignmentElementTarget(Re.name), + Re.initializer + ), + Re + ); + return E.checkDefined(Xe(gt, J, ct)); + } + function Ue({ name: Re }) { + if (Me(Re)) + return h.has(Re.escapedText); + for (const gt of Re.elements) + if (!ul(gt) && Ue(gt)) + return !0; + return !1; + } + function bt(Re) { + E.assertIsDefined(Re.body); + const gt = S, tr = T; + S = /* @__PURE__ */ new Set(), T = !1; + let qr = Of(Re.body, J, e); + const Bn = Jo(Re, Ka); + if (u >= 2 && (c.hasNodeCheckFlag( + Re, + 256 + /* MethodWithSuperPropertyAssignmentInAsync */ + ) || c.hasNodeCheckFlag( + Re, + 128 + /* MethodWithSuperPropertyAccessInAsync */ + )) && (Oc(Bn) & 3) !== 3) { + if (Wr(), S.size) { + const ki = bO(t, c, Re, S); + D[Aa(ki)] = !0; + const Cs = qr.statements.slice(); + Bg(Cs, [ki]), qr = t.updateBlock(qr, Cs); + } + T && (c.hasNodeCheckFlag( + Re, + 256 + /* MethodWithSuperPropertyAssignmentInAsync */ + ) ? Lx(qr, oF) : c.hasNodeCheckFlag( + Re, + 128 + /* MethodWithSuperPropertyAccessInAsync */ + ) && Lx(qr, aF)); + } + return S = gt, T = tr, qr; + } + function Lt() { + E.assert(C); + const Re = t.createVariableDeclaration( + C, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createIdentifier("arguments") + ), gt = t.createVariableStatement( + /*modifiers*/ + void 0, + [Re] + ); + return xu(gt), _m( + gt, + 2097152 + /* CustomPrologue */ + ), gt; + } + function er(Re) { + if (qN(Re.parameters)) + return ic(Re.parameters, J, e); + const gt = []; + for (const qr of Re.parameters) { + if (qr.initializer || qr.dotDotDotToken) { + if (Re.kind === 219) { + const wn = t.createParameterDeclaration( + /*modifiers*/ + void 0, + t.createToken( + 26 + /* DotDotDotToken */ + ), + t.createUniqueName( + "args", + 8 + /* ReservedInNestedScopes */ + ) + ); + gt.push(wn); + } + break; + } + const Bn = t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + t.getGeneratedNameForNode( + qr.name, + 8 + /* ReservedInNestedScopes */ + ) + ); + gt.push(Bn); + } + const tr = t.createNodeArray(gt); + return ot(tr, Re.parameters), tr; + } + function Nr(Re, gt) { + const tr = qN(Re.parameters) ? void 0 : ic(Re.parameters, J, e); + i(); + const Bn = Jo(Re, vs).type, wn = u < 2 ? Qt(Bn) : void 0, ki = Re.kind === 219, Cs = C, xr = c.hasNodeCheckFlag( + Re, + 512 + /* CaptureArguments */ + ) && !C; + xr && (C = t.createUniqueName("arguments")); + let gs; + if (tr) + if (ki) { + const $e = []; + E.assert(gt.length <= Re.parameters.length); + for (let Ke = 0; Ke < Re.parameters.length; Ke++) { + E.assert(Ke < gt.length); + const Je = Re.parameters[Ke], Ye = gt[Ke]; + if (E.assertNode(Ye.name, Me), Je.initializer || Je.dotDotDotToken) { + E.assert(Ke === gt.length - 1), $e.push(t.createSpreadElement(Ye.name)); + break; + } + $e.push(Ye.name); + } + gs = t.createArrayLiteralExpression($e); + } else + gs = t.createIdentifier("arguments"); + const Qe = h; + h = /* @__PURE__ */ new Set(); + for (const $e of Re.parameters) + xe($e, h); + const Ct = S, ee = T; + ki || (S = /* @__PURE__ */ new Set(), T = !1); + const Ve = $(); + let K = Dt(Re.body); + K = t.updateBlock(K, t.mergeLexicalEnvironment(K.statements, s())); + let Ie; + if (ki) { + if (Ie = n().createAwaiterHelper( + Ve, + gs, + wn, + tr, + K + ), xr) { + const $e = t.converters.convertToFunctionBlock(Ie); + Ie = t.updateBlock($e, t.mergeLexicalEnvironment($e.statements, [Lt()])); + } + } else { + const $e = []; + $e.push( + t.createReturnStatement( + n().createAwaiterHelper( + Ve, + gs, + wn, + tr, + K + ) + ) + ); + const Ke = u >= 2 && (c.hasNodeCheckFlag( + Re, + 256 + /* MethodWithSuperPropertyAssignmentInAsync */ + ) || c.hasNodeCheckFlag( + Re, + 128 + /* MethodWithSuperPropertyAccessInAsync */ + )); + if (Ke && (Wr(), S.size)) { + const Ye = bO(t, c, Re, S); + D[Aa(Ye)] = !0, Bg($e, [Ye]); + } + xr && Bg($e, [Lt()]); + const Je = t.createBlock( + $e, + /*multiLine*/ + !0 + ); + ot(Je, Re.body), Ke && T && (c.hasNodeCheckFlag( + Re, + 256 + /* MethodWithSuperPropertyAssignmentInAsync */ + ) ? Lx(Je, oF) : c.hasNodeCheckFlag( + Re, + 128 + /* MethodWithSuperPropertyAccessInAsync */ + ) && Lx(Je, aF)), Ie = Je; + } + return h = Qe, ki || (S = Ct, T = ee, C = Cs), Ie; + } + function Dt(Re, gt) { + return ks(Re) ? t.updateBlock(Re, Or(Re.statements, re, xi, gt)) : t.converters.convertToFunctionBlock(E.checkDefined(Xe(Re, re, d7))); + } + function Qt(Re) { + const gt = Re && c3(Re); + if (gt && Hu(gt)) { + const tr = c.getTypeReferenceSerializationKind(gt); + if (tr === 1 || tr === 0) + return gt; + } + } + function Wr() { + m & 1 || (m |= 1, e.enableSubstitution( + 213 + /* CallExpression */ + ), e.enableSubstitution( + 211 + /* PropertyAccessExpression */ + ), e.enableSubstitution( + 212 + /* ElementAccessExpression */ + ), e.enableEmitNotification( + 263 + /* ClassDeclaration */ + ), e.enableEmitNotification( + 174 + /* MethodDeclaration */ + ), e.enableEmitNotification( + 177 + /* GetAccessor */ + ), e.enableEmitNotification( + 178 + /* SetAccessor */ + ), e.enableEmitNotification( + 176 + /* Constructor */ + ), e.enableEmitNotification( + 243 + /* VariableStatement */ + )); + } + function yr(Re, gt, tr) { + if (m & 1 && jr(gt)) { + const qr = (c.hasNodeCheckFlag( + gt, + 128 + /* MethodWithSuperPropertyAccessInAsync */ + ) ? 128 : 0) | (c.hasNodeCheckFlag( + gt, + 256 + /* MethodWithSuperPropertyAssignmentInAsync */ + ) ? 256 : 0); + if (qr !== g) { + const Bn = g; + g = qr, A(Re, gt, tr), g = Bn; + return; + } + } else if (m && D[Aa(gt)]) { + const qr = g; + g = 0, A(Re, gt, tr), g = qr; + return; + } + A(Re, gt, tr); + } + function qn(Re, gt) { + return gt = O(Re, gt), Re === 1 && g ? Bt(gt) : gt; + } + function Bt(Re) { + switch (Re.kind) { + case 211: + return bi(Re); + case 212: + return pi(Re); + case 213: + return Xn(Re); + } + return Re; + } + function bi(Re) { + return Re.expression.kind === 108 ? ot( + t.createPropertyAccessExpression( + t.createUniqueName( + "_super", + 48 + /* FileLevel */ + ), + Re.name + ), + Re + ) : Re; + } + function pi(Re) { + return Re.expression.kind === 108 ? di( + Re.argumentExpression, + Re + ) : Re; + } + function Xn(Re) { + const gt = Re.expression; + if (D_(gt)) { + const tr = Tn(gt) ? bi(gt) : pi(gt); + return t.createCallExpression( + t.createPropertyAccessExpression(tr, "call"), + /*typeArguments*/ + void 0, + [ + t.createThis(), + ...Re.arguments + ] + ); + } + return Re; + } + function jr(Re) { + const gt = Re.kind; + return gt === 263 || gt === 176 || gt === 174 || gt === 177 || gt === 178; + } + function di(Re, gt) { + return g & 256 ? ot( + t.createPropertyAccessExpression( + t.createCallExpression( + t.createUniqueName( + "_superIndex", + 48 + /* FileLevel */ + ), + /*typeArguments*/ + void 0, + [Re] + ), + "value" + ), + gt + ) : ot( + t.createCallExpression( + t.createUniqueName( + "_superIndex", + 48 + /* FileLevel */ + ), + /*typeArguments*/ + void 0, + [Re] + ), + gt + ); + } + } + function bO(e, t, n, i) { + const s = t.hasNodeCheckFlag( + n, + 256 + /* MethodWithSuperPropertyAssignmentInAsync */ + ), o = []; + return i.forEach((c, _) => { + const u = Pi(_), m = []; + m.push(e.createPropertyAssignment( + "get", + e.createArrowFunction( + /*modifiers*/ + void 0, + /*typeParameters*/ + void 0, + /* parameters */ + [], + /*type*/ + void 0, + /*equalsGreaterThanToken*/ + void 0, + on( + e.createPropertyAccessExpression( + on( + e.createSuper(), + 8 + /* NoSubstitution */ + ), + u + ), + 8 + /* NoSubstitution */ + ) + ) + )), s && m.push( + e.createPropertyAssignment( + "set", + e.createArrowFunction( + /*modifiers*/ + void 0, + /*typeParameters*/ + void 0, + /* parameters */ + [ + e.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "v", + /*questionToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ) + ], + /*type*/ + void 0, + /*equalsGreaterThanToken*/ + void 0, + e.createAssignment( + on( + e.createPropertyAccessExpression( + on( + e.createSuper(), + 8 + /* NoSubstitution */ + ), + u + ), + 8 + /* NoSubstitution */ + ), + e.createIdentifier("v") + ) + ) + ) + ), o.push( + e.createPropertyAssignment( + u, + e.createObjectLiteralExpression(m) + ) + ); + }), e.createVariableStatement( + /*modifiers*/ + void 0, + e.createVariableDeclarationList( + [ + e.createVariableDeclaration( + e.createUniqueName( + "_super", + 48 + /* FileLevel */ + ), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + e.createCallExpression( + e.createPropertyAccessExpression( + e.createIdentifier("Object"), + "create" + ), + /*typeArguments*/ + void 0, + [ + e.createNull(), + e.createObjectLiteralExpression( + o, + /*multiLine*/ + !0 + ) + ] + ) + ) + ], + 2 + /* Const */ + ) + ); + } + function Mne(e) { + const { + factory: t, + getEmitHelperFactory: n, + resumeLexicalEnvironment: i, + endLexicalEnvironment: s, + hoistVariableDeclaration: o + } = e, c = e.getEmitResolver(), _ = e.getCompilerOptions(), u = pa(_), m = e.onEmitNode; + e.onEmitNode = Cs; + const g = e.onSubstituteNode; + e.onSubstituteNode = Ks; + let h = !1, S = 0, T, C, D = 0, w = 0, A, O, F, R; + const W = []; + return Ad(e, Z); + function V(K, Ie) { + return w !== (w & ~K | Ie); + } + function $(K, Ie) { + const $e = w; + return w = (w & ~K | Ie) & 3, $e; + } + function U(K) { + w = K; + } + function _e(K) { + O = Pr( + O, + t.createVariableDeclaration(K) + ); + } + function Z(K) { + if (K.isDeclarationFile) + return K; + A = K; + const Ie = Oe(K); + return Qg(Ie, e.readEmitHelpers()), A = void 0, O = void 0, Ie; + } + function J(K) { + return Te( + K, + /*expressionResultIsUnused*/ + !1 + ); + } + function re(K) { + return Te( + K, + /*expressionResultIsUnused*/ + !0 + ); + } + function te(K) { + if (K.kind !== 134) + return K; + } + function ie(K, Ie, $e, Ke) { + if (V($e, Ke)) { + const Je = $($e, Ke), Ye = K(Ie); + return U(Je), Ye; + } + return K(Ie); + } + function le(K) { + return kr(K, J, e); + } + function Te(K, Ie) { + if (!(K.transformFlags & 128)) + return K; + switch (K.kind) { + case 223: + return q(K); + case 229: + return me(K); + case 253: + return Ce(K); + case 256: + return Ee(K); + case 210: + return ke(K); + case 226: + return he(K, Ie); + case 356: + return ne(K, Ie); + case 299: + return Ae(K); + case 243: + return De(K); + case 260: + return we(K); + case 246: + case 247: + case 249: + return ie( + le, + K, + 0, + 2 + /* IterationStatementIncludes */ + ); + case 250: + return er( + K, + /*outermostLabeledStatement*/ + void 0 + ); + case 248: + return ie( + bt, + K, + 0, + 2 + /* IterationStatementIncludes */ + ); + case 222: + return Lt(K); + case 176: + return ie( + bi, + K, + 2, + 1 + /* ClassOrFunctionIncludes */ + ); + case 174: + return ie( + jr, + K, + 2, + 1 + /* ClassOrFunctionIncludes */ + ); + case 177: + return ie( + pi, + K, + 2, + 1 + /* ClassOrFunctionIncludes */ + ); + case 178: + return ie( + Xn, + K, + 2, + 1 + /* ClassOrFunctionIncludes */ + ); + case 262: + return ie( + di, + K, + 2, + 1 + /* ClassOrFunctionIncludes */ + ); + case 218: + return ie( + gt, + K, + 2, + 1 + /* ClassOrFunctionIncludes */ + ); + case 219: + return ie( + Re, + K, + 2, + 0 + /* ArrowFunctionIncludes */ + ); + case 169: + return qn(K); + case 244: + return ue(K); + case 217: + return it(K, Ie); + case 215: + return xe(K); + case 211: + return F && Tn(K) && K.expression.kind === 108 && F.add(K.name.escapedText), kr(K, J, e); + case 212: + return F && K.expression.kind === 108 && (R = !0), kr(K, J, e); + case 263: + case 231: + return ie( + le, + K, + 2, + 1 + /* ClassOrFunctionIncludes */ + ); + default: + return kr(K, J, e); + } + } + function q(K) { + return T & 2 && T & 1 ? Sn( + ot( + t.createYieldExpression( + /*asteriskToken*/ + void 0, + n().createAwaitHelper(Xe(K.expression, J, ct)) + ), + /*location*/ + K + ), + K + ) : kr(K, J, e); + } + function me(K) { + if (T & 2 && T & 1) { + if (K.asteriskToken) { + const Ie = Xe(E.checkDefined(K.expression), J, ct); + return Sn( + ot( + t.createYieldExpression( + /*asteriskToken*/ + void 0, + n().createAwaitHelper( + t.updateYieldExpression( + K, + K.asteriskToken, + ot( + n().createAsyncDelegatorHelper( + ot( + n().createAsyncValuesHelper(Ie), + Ie + ) + ), + Ie + ) + ) + ) + ), + K + ), + K + ); + } + return Sn( + ot( + t.createYieldExpression( + /*asteriskToken*/ + void 0, + Qt( + K.expression ? Xe(K.expression, J, ct) : t.createVoidZero() + ) + ), + K + ), + K + ); + } + return kr(K, J, e); + } + function Ce(K) { + return T & 2 && T & 1 ? t.updateReturnStatement( + K, + Qt( + K.expression ? Xe(K.expression, J, ct) : t.createVoidZero() + ) + ) : kr(K, J, e); + } + function Ee(K) { + if (T & 2) { + const Ie = _B(K); + return Ie.kind === 250 && Ie.awaitModifier ? er(Ie, K) : t.restoreEnclosingLabel(Xe(Ie, J, xi, t.liftToBlock), K); + } + return kr(K, J, e); + } + function oe(K) { + let Ie; + const $e = []; + for (const Ke of K) + if (Ke.kind === 305) { + Ie && ($e.push(t.createObjectLiteralExpression(Ie)), Ie = void 0); + const Je = Ke.expression; + $e.push(Xe(Je, J, ct)); + } else + Ie = Pr( + Ie, + Ke.kind === 303 ? t.createPropertyAssignment(Ke.name, Xe(Ke.initializer, J, ct)) : Xe(Ke, J, Eh) + ); + return Ie && $e.push(t.createObjectLiteralExpression(Ie)), $e; + } + function ke(K) { + if (K.transformFlags & 65536) { + const Ie = oe(K.properties); + Ie.length && Ie[0].kind !== 210 && Ie.unshift(t.createObjectLiteralExpression()); + let $e = Ie[0]; + if (Ie.length > 1) { + for (let Ke = 1; Ke < Ie.length; Ke++) + $e = n().createAssignHelper([$e, Ie[Ke]]); + return $e; + } else + return n().createAssignHelper(Ie); + } + return kr(K, J, e); + } + function ue(K) { + return kr(K, re, e); + } + function it(K, Ie) { + return kr(K, Ie ? re : J, e); + } + function Oe(K) { + const Ie = $( + 2, + rB(K, _) ? 0 : 1 + /* SourceFileIncludes */ + ); + h = !1; + const $e = kr(K, J, e), Ke = Wi( + $e.statements, + O && [ + t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList(O) + ) + ] + ), Je = t.updateSourceFile($e, ot(t.createNodeArray(Ke), K.statements)); + return U(Ie), Je; + } + function xe(K) { + return PW( + e, + K, + J, + A, + _e, + 0 + /* LiftRestriction */ + ); + } + function he(K, Ie) { + return P0(K) && DN(K.left) ? qS( + K, + J, + e, + 1, + !Ie + ) : K.operatorToken.kind === 28 ? t.updateBinaryExpression( + K, + Xe(K.left, re, ct), + K.operatorToken, + Xe(K.right, Ie ? re : J, ct) + ) : kr(K, J, e); + } + function ne(K, Ie) { + if (Ie) + return kr(K, re, e); + let $e; + for (let Je = 0; Je < K.elements.length; Je++) { + const Ye = K.elements[Je], _t = Xe(Ye, Je < K.elements.length - 1 ? re : J, ct); + ($e || _t !== Ye) && ($e || ($e = K.elements.slice(0, Je)), $e.push(_t)); + } + const Ke = $e ? ot(t.createNodeArray($e), K.elements) : K.elements; + return t.updateCommaListExpression(K, Ke); + } + function Ae(K) { + if (K.variableDeclaration && Ds(K.variableDeclaration.name) && K.variableDeclaration.name.transformFlags & 65536) { + const Ie = t.getGeneratedNameForNode(K.variableDeclaration.name), $e = t.updateVariableDeclaration( + K.variableDeclaration, + K.variableDeclaration.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Ie + ), Ke = a2( + $e, + J, + e, + 1 + /* ObjectRest */ + ); + let Je = Xe(K.block, J, ks); + return at(Ke) && (Je = t.updateBlock(Je, [ + t.createVariableStatement( + /*modifiers*/ + void 0, + Ke + ), + ...Je.statements + ])), t.updateCatchClause( + K, + t.updateVariableDeclaration( + K.variableDeclaration, + Ie, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ), + Je + ); + } + return kr(K, J, e); + } + function De(K) { + if ($n( + K, + 32 + /* Export */ + )) { + const Ie = h; + h = !0; + const $e = kr(K, J, e); + return h = Ie, $e; + } + return kr(K, J, e); + } + function we(K) { + if (h) { + const Ie = h; + h = !1; + const $e = Ue( + K, + /*exportedVariableStatement*/ + !0 + ); + return h = Ie, $e; + } + return Ue( + K, + /*exportedVariableStatement*/ + !1 + ); + } + function Ue(K, Ie) { + return Ds(K.name) && K.name.transformFlags & 65536 ? a2( + K, + J, + e, + 1, + /*rval*/ + void 0, + Ie + ) : kr(K, J, e); + } + function bt(K) { + return t.updateForStatement( + K, + Xe(K.initializer, re, Kf), + Xe(K.condition, J, ct), + Xe(K.incrementor, re, ct), + Zu(K.statement, J, e) + ); + } + function Lt(K) { + return kr(K, re, e); + } + function er(K, Ie) { + const $e = $( + 0, + 2 + /* IterationStatementIncludes */ + ); + (K.initializer.transformFlags & 65536 || S4(K.initializer) && DN(K.initializer)) && (K = Nr(K)); + const Ke = K.awaitModifier ? Wr(K, Ie, $e) : t.restoreEnclosingLabel(kr(K, J, e), Ie); + return U($e), Ke; + } + function Nr(K) { + const Ie = za(K.initializer); + if (Il(Ie) || S4(Ie)) { + let $e, Ke; + const Je = t.createTempVariable( + /*recordTempVariable*/ + void 0 + ), Ye = [fz(t, Ie, Je)]; + return ks(K.statement) ? (Nn(Ye, K.statement.statements), $e = K.statement, Ke = K.statement.statements) : K.statement && (Pr(Ye, K.statement), $e = K.statement, Ke = K.statement), t.updateForOfStatement( + K, + K.awaitModifier, + ot( + t.createVariableDeclarationList( + [ + ot(t.createVariableDeclaration(Je), K.initializer) + ], + 1 + /* Let */ + ), + K.initializer + ), + K.expression, + ot( + t.createBlock( + ot(t.createNodeArray(Ye), Ke), + /*multiLine*/ + !0 + ), + $e + ) + ); + } + return K; + } + function Dt(K, Ie, $e) { + const Ke = t.createTempVariable(o), Je = t.createAssignment(Ke, Ie), Ye = t.createExpressionStatement(Je); + da(Ye, K.expression); + const _t = t.createAssignment($e, t.createFalse()), yt = t.createExpressionStatement(_t); + da(yt, K.expression); + const We = [Ye, yt], Et = fz(t, K.initializer, Ke); + We.push(Xe(Et, J, xi)); + let Xt, rn; + const ye = Zu(K.statement, J, e); + return ks(ye) ? (Nn(We, ye.statements), Xt = ye, rn = ye.statements) : We.push(ye), ot( + t.createBlock( + ot(t.createNodeArray(We), rn), + /*multiLine*/ + !0 + ), + Xt + ); + } + function Qt(K) { + return T & 1 ? t.createYieldExpression( + /*asteriskToken*/ + void 0, + n().createAwaitHelper(K) + ) : t.createAwaitExpression(K); + } + function Wr(K, Ie, $e) { + const Ke = Xe(K.expression, J, ct), Je = Me(Ke) ? t.getGeneratedNameForNode(Ke) : t.createTempVariable( + /*recordTempVariable*/ + void 0 + ), Ye = Me(Ke) ? t.getGeneratedNameForNode(Je) : t.createTempVariable( + /*recordTempVariable*/ + void 0 + ), _t = t.createTempVariable( + /*recordTempVariable*/ + void 0 + ), yt = t.createTempVariable(o), We = t.createUniqueName("e"), Et = t.getGeneratedNameForNode(We), Xt = t.createTempVariable( + /*recordTempVariable*/ + void 0 + ), rn = ot(n().createAsyncValuesHelper(Ke), K.expression), ye = t.createCallExpression( + t.createPropertyAccessExpression(Je, "next"), + /*typeArguments*/ + void 0, + [] + ), ft = t.createPropertyAccessExpression(Ye, "done"), fe = t.createPropertyAccessExpression(Ye, "value"), L = t.createFunctionCallCall(Xt, Je, []); + o(We), o(Xt); + const ve = $e & 2 ? t.inlineExpressions([t.createAssignment(We, t.createVoidZero()), rn]) : rn, X = on( + ot( + t.createForStatement( + /*initializer*/ + on( + ot( + t.createVariableDeclarationList([ + t.createVariableDeclaration( + _t, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createTrue() + ), + ot(t.createVariableDeclaration( + Je, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + ve + ), K.expression), + t.createVariableDeclaration(Ye) + ]), + K.expression + ), + 4194304 + /* NoHoisting */ + ), + /*condition*/ + t.inlineExpressions([ + t.createAssignment(Ye, Qt(ye)), + t.createAssignment(yt, ft), + t.createLogicalNot(yt) + ]), + /*incrementor*/ + t.createAssignment(_t, t.createTrue()), + /*statement*/ + Dt(K, fe, _t) + ), + /*location*/ + K + ), + 512 + /* NoTokenTrailingSourceMaps */ + ); + return Sn(X, K), t.createTryStatement( + t.createBlock([ + t.restoreEnclosingLabel( + X, + Ie + ) + ]), + t.createCatchClause( + t.createVariableDeclaration(Et), + on( + t.createBlock([ + t.createExpressionStatement( + t.createAssignment( + We, + t.createObjectLiteralExpression([ + t.createPropertyAssignment("error", Et) + ]) + ) + ) + ]), + 1 + /* SingleLine */ + ) + ), + t.createBlock([ + t.createTryStatement( + /*tryBlock*/ + t.createBlock([ + on( + t.createIfStatement( + t.createLogicalAnd( + t.createLogicalAnd( + t.createLogicalNot(_t), + t.createLogicalNot(yt) + ), + t.createAssignment( + Xt, + t.createPropertyAccessExpression(Je, "return") + ) + ), + t.createExpressionStatement(Qt(L)) + ), + 1 + /* SingleLine */ + ) + ]), + /*catchClause*/ + void 0, + /*finallyBlock*/ + on( + t.createBlock([ + on( + t.createIfStatement( + We, + t.createThrowStatement( + t.createPropertyAccessExpression(We, "error") + ) + ), + 1 + /* SingleLine */ + ) + ]), + 1 + /* SingleLine */ + ) + ) + ]) + ); + } + function yr(K) { + return E.assertNode(K, Ii), qn(K); + } + function qn(K) { + return C?.has(K) ? t.updateParameterDeclaration( + K, + /*modifiers*/ + void 0, + K.dotDotDotToken, + Ds(K.name) ? t.getGeneratedNameForNode(K) : K.name, + /*questionToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ) : K.transformFlags & 65536 ? t.updateParameterDeclaration( + K, + /*modifiers*/ + void 0, + K.dotDotDotToken, + t.getGeneratedNameForNode(K), + /*questionToken*/ + void 0, + /*type*/ + void 0, + Xe(K.initializer, J, ct) + ) : kr(K, J, e); + } + function Bt(K) { + let Ie; + for (const $e of K.parameters) + Ie ? Ie.add($e) : $e.transformFlags & 65536 && (Ie = /* @__PURE__ */ new Set()); + return Ie; + } + function bi(K) { + const Ie = T, $e = C; + T = Oc(K), C = Bt(K); + const Ke = t.updateConstructorDeclaration( + K, + K.modifiers, + ic(K.parameters, yr, e), + Bn(K) + ); + return T = Ie, C = $e, Ke; + } + function pi(K) { + const Ie = T, $e = C; + T = Oc(K), C = Bt(K); + const Ke = t.updateGetAccessorDeclaration( + K, + K.modifiers, + Xe(K.name, J, Fc), + ic(K.parameters, yr, e), + /*type*/ + void 0, + Bn(K) + ); + return T = Ie, C = $e, Ke; + } + function Xn(K) { + const Ie = T, $e = C; + T = Oc(K), C = Bt(K); + const Ke = t.updateSetAccessorDeclaration( + K, + K.modifiers, + Xe(K.name, J, Fc), + ic(K.parameters, yr, e), + Bn(K) + ); + return T = Ie, C = $e, Ke; + } + function jr(K) { + const Ie = T, $e = C; + T = Oc(K), C = Bt(K); + const Ke = t.updateMethodDeclaration( + K, + T & 1 ? Or(K.modifiers, te, Oo) : K.modifiers, + T & 2 ? void 0 : K.asteriskToken, + Xe(K.name, J, Fc), + Xe( + /*node*/ + void 0, + J, + t1 + ), + /*typeParameters*/ + void 0, + T & 2 && T & 1 ? tr(K) : ic(K.parameters, yr, e), + /*type*/ + void 0, + T & 2 && T & 1 ? qr(K) : Bn(K) + ); + return T = Ie, C = $e, Ke; + } + function di(K) { + const Ie = T, $e = C; + T = Oc(K), C = Bt(K); + const Ke = t.updateFunctionDeclaration( + K, + T & 1 ? Or(K.modifiers, te, ia) : K.modifiers, + T & 2 ? void 0 : K.asteriskToken, + K.name, + /*typeParameters*/ + void 0, + T & 2 && T & 1 ? tr(K) : ic(K.parameters, yr, e), + /*type*/ + void 0, + T & 2 && T & 1 ? qr(K) : Bn(K) + ); + return T = Ie, C = $e, Ke; + } + function Re(K) { + const Ie = T, $e = C; + T = Oc(K), C = Bt(K); + const Ke = t.updateArrowFunction( + K, + K.modifiers, + /*typeParameters*/ + void 0, + ic(K.parameters, yr, e), + /*type*/ + void 0, + K.equalsGreaterThanToken, + Bn(K) + ); + return T = Ie, C = $e, Ke; + } + function gt(K) { + const Ie = T, $e = C; + T = Oc(K), C = Bt(K); + const Ke = t.updateFunctionExpression( + K, + T & 1 ? Or(K.modifiers, te, ia) : K.modifiers, + T & 2 ? void 0 : K.asteriskToken, + K.name, + /*typeParameters*/ + void 0, + T & 2 && T & 1 ? tr(K) : ic(K.parameters, yr, e), + /*type*/ + void 0, + T & 2 && T & 1 ? qr(K) : Bn(K) + ); + return T = Ie, C = $e, Ke; + } + function tr(K) { + if (qN(K.parameters)) + return ic(K.parameters, J, e); + const Ie = []; + for (const Ke of K.parameters) { + if (Ke.initializer || Ke.dotDotDotToken) + break; + const Je = t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + t.getGeneratedNameForNode( + Ke.name, + 8 + /* ReservedInNestedScopes */ + ) + ); + Ie.push(Je); + } + const $e = t.createNodeArray(Ie); + return ot($e, K.parameters), $e; + } + function qr(K) { + const Ie = qN(K.parameters) ? void 0 : ic(K.parameters, J, e); + i(); + const $e = F, Ke = R; + F = /* @__PURE__ */ new Set(), R = !1; + const Je = []; + let Ye = t.updateBlock(K.body, Or(K.body.statements, J, xi)); + Ye = t.updateBlock(Ye, t.mergeLexicalEnvironment(Ye.statements, wn(s(), K))); + const _t = t.createReturnStatement( + n().createAsyncGeneratorHelper( + t.createFunctionExpression( + /*modifiers*/ + void 0, + t.createToken( + 42 + /* AsteriskToken */ + ), + K.name && t.getGeneratedNameForNode(K.name), + /*typeParameters*/ + void 0, + Ie ?? [], + /*type*/ + void 0, + Ye + ), + !!(w & 1) + ) + ), yt = u >= 2 && (c.hasNodeCheckFlag( + K, + 256 + /* MethodWithSuperPropertyAssignmentInAsync */ + ) || c.hasNodeCheckFlag( + K, + 128 + /* MethodWithSuperPropertyAccessInAsync */ + )); + if (yt) { + ki(); + const Et = bO(t, c, K, F); + W[Aa(Et)] = !0, Bg(Je, [Et]); + } + Je.push(_t); + const We = t.updateBlock(K.body, Je); + return yt && R && (c.hasNodeCheckFlag( + K, + 256 + /* MethodWithSuperPropertyAssignmentInAsync */ + ) ? Lx(We, oF) : c.hasNodeCheckFlag( + K, + 128 + /* MethodWithSuperPropertyAccessInAsync */ + ) && Lx(We, aF)), F = $e, R = Ke, We; + } + function Bn(K) { + i(); + let Ie = 0; + const $e = [], Ke = Xe(K.body, J, d7) ?? t.createBlock([]); + ks(Ke) && (Ie = t.copyPrologue( + Ke.statements, + $e, + /*ensureUseStrict*/ + !1, + J + )), Nn($e, wn( + /*statements*/ + void 0, + K + )); + const Je = s(); + if (Ie > 0 || at($e) || at(Je)) { + const Ye = t.converters.convertToFunctionBlock( + Ke, + /*multiLine*/ + !0 + ); + return Bg($e, Je), Nn($e, Ye.statements.slice(Ie)), t.updateBlock(Ye, ot(t.createNodeArray($e), Ye.statements)); + } + return Ke; + } + function wn(K, Ie) { + let $e = !1; + for (const Ke of Ie.parameters) + if ($e) { + if (Ds(Ke.name)) { + if (Ke.name.elements.length > 0) { + const Je = a2( + Ke, + J, + e, + 0, + t.getGeneratedNameForNode(Ke) + ); + if (at(Je)) { + const Ye = t.createVariableDeclarationList(Je), _t = t.createVariableStatement( + /*modifiers*/ + void 0, + Ye + ); + on( + _t, + 2097152 + /* CustomPrologue */ + ), K = Pr(K, _t); + } + } else if (Ke.initializer) { + const Je = t.getGeneratedNameForNode(Ke), Ye = Xe(Ke.initializer, J, ct), _t = t.createAssignment(Je, Ye), yt = t.createExpressionStatement(_t); + on( + yt, + 2097152 + /* CustomPrologue */ + ), K = Pr(K, yt); + } + } else if (Ke.initializer) { + const Je = t.cloneNode(Ke.name); + ot(Je, Ke.name), on( + Je, + 96 + /* NoSourceMap */ + ); + const Ye = Xe(Ke.initializer, J, ct); + _m( + Ye, + 3168 + /* NoComments */ + ); + const _t = t.createAssignment(Je, Ye); + ot(_t, Ke), on( + _t, + 3072 + /* NoComments */ + ); + const yt = t.createBlock([t.createExpressionStatement(_t)]); + ot(yt, Ke), on( + yt, + 3905 + /* NoComments */ + ); + const We = t.createTypeCheck(t.cloneNode(Ke.name), "undefined"), Et = t.createIfStatement(We, yt); + xu(Et), ot(Et, Ke), on( + Et, + 2101056 + /* NoComments */ + ), K = Pr(K, Et); + } + } else if (Ke.transformFlags & 65536) { + $e = !0; + const Je = a2( + Ke, + J, + e, + 1, + t.getGeneratedNameForNode(Ke), + /*hoistTempVariables*/ + !1, + /*skipInitializer*/ + !0 + ); + if (at(Je)) { + const Ye = t.createVariableDeclarationList(Je), _t = t.createVariableStatement( + /*modifiers*/ + void 0, + Ye + ); + on( + _t, + 2097152 + /* CustomPrologue */ + ), K = Pr(K, _t); + } + } + return K; + } + function ki() { + S & 1 || (S |= 1, e.enableSubstitution( + 213 + /* CallExpression */ + ), e.enableSubstitution( + 211 + /* PropertyAccessExpression */ + ), e.enableSubstitution( + 212 + /* ElementAccessExpression */ + ), e.enableEmitNotification( + 263 + /* ClassDeclaration */ + ), e.enableEmitNotification( + 174 + /* MethodDeclaration */ + ), e.enableEmitNotification( + 177 + /* GetAccessor */ + ), e.enableEmitNotification( + 178 + /* SetAccessor */ + ), e.enableEmitNotification( + 176 + /* Constructor */ + ), e.enableEmitNotification( + 243 + /* VariableStatement */ + )); + } + function Cs(K, Ie, $e) { + if (S & 1 && ee(Ie)) { + const Ke = (c.hasNodeCheckFlag( + Ie, + 128 + /* MethodWithSuperPropertyAccessInAsync */ + ) ? 128 : 0) | (c.hasNodeCheckFlag( + Ie, + 256 + /* MethodWithSuperPropertyAssignmentInAsync */ + ) ? 256 : 0); + if (Ke !== D) { + const Je = D; + D = Ke, m(K, Ie, $e), D = Je; + return; + } + } else if (S && W[Aa(Ie)]) { + const Ke = D; + D = 0, m(K, Ie, $e), D = Ke; + return; + } + m(K, Ie, $e); + } + function Ks(K, Ie) { + return Ie = g(K, Ie), K === 1 && D ? xr(Ie) : Ie; + } + function xr(K) { + switch (K.kind) { + case 211: + return gs(K); + case 212: + return Qe(K); + case 213: + return Ct(K); + } + return K; + } + function gs(K) { + return K.expression.kind === 108 ? ot( + t.createPropertyAccessExpression( + t.createUniqueName( + "_super", + 48 + /* FileLevel */ + ), + K.name + ), + K + ) : K; + } + function Qe(K) { + return K.expression.kind === 108 ? Ve( + K.argumentExpression, + K + ) : K; + } + function Ct(K) { + const Ie = K.expression; + if (D_(Ie)) { + const $e = Tn(Ie) ? gs(Ie) : Qe(Ie); + return t.createCallExpression( + t.createPropertyAccessExpression($e, "call"), + /*typeArguments*/ + void 0, + [ + t.createThis(), + ...K.arguments + ] + ); + } + return K; + } + function ee(K) { + const Ie = K.kind; + return Ie === 263 || Ie === 176 || Ie === 174 || Ie === 177 || Ie === 178; + } + function Ve(K, Ie) { + return D & 256 ? ot( + t.createPropertyAccessExpression( + t.createCallExpression( + t.createIdentifier("_superIndex"), + /*typeArguments*/ + void 0, + [K] + ), + "value" + ), + Ie + ) : ot( + t.createCallExpression( + t.createIdentifier("_superIndex"), + /*typeArguments*/ + void 0, + [K] + ), + Ie + ); + } + } + function Rne(e) { + const t = e.factory; + return Ad(e, n); + function n(o) { + return o.isDeclarationFile ? o : kr(o, i, e); + } + function i(o) { + if (!(o.transformFlags & 64)) + return o; + switch (o.kind) { + case 299: + return s(o); + default: + return kr(o, i, e); + } + } + function s(o) { + return o.variableDeclaration ? kr(o, i, e) : t.updateCatchClause( + o, + t.createVariableDeclaration(t.createTempVariable( + /*recordTempVariable*/ + void 0 + )), + Xe(o.block, i, ks) + ); + } + } + function jne(e) { + const { + factory: t, + hoistVariableDeclaration: n + } = e; + return Ad(e, i); + function i(C) { + return C.isDeclarationFile ? C : kr(C, s, e); + } + function s(C) { + if (!(C.transformFlags & 32)) + return C; + switch (C.kind) { + case 213: { + const D = u( + C, + /*captureThisArg*/ + !1 + ); + return E.assertNotNode(D, Gx), D; + } + case 211: + case 212: + if (vu(C)) { + const D = g( + C, + /*captureThisArg*/ + !1, + /*isDelete*/ + !1 + ); + return E.assertNotNode(D, Gx), D; + } + return kr(C, s, e); + case 226: + return C.operatorToken.kind === 61 ? S(C) : kr(C, s, e); + case 220: + return T(C); + default: + return kr(C, s, e); + } + } + function o(C) { + E.assertNotNode(C, c7); + const D = [C]; + for (; !C.questionDotToken && !fv(C); ) + C = Ws(ed(C.expression), vu), E.assertNotNode(C, c7), D.unshift(C); + return { expression: C.expression, chain: D }; + } + function c(C, D, w) { + const A = m(C.expression, D, w); + return Gx(A) ? t.createSyntheticReferenceExpression(t.updateParenthesizedExpression(C, A.expression), A.thisArg) : t.updateParenthesizedExpression(C, A); + } + function _(C, D, w) { + if (vu(C)) + return g(C, D, w); + let A = Xe(C.expression, s, ct); + E.assertNotNode(A, Gx); + let O; + return D && (s2(A) ? O = A : (O = t.createTempVariable(n), A = t.createAssignment(O, A))), A = C.kind === 211 ? t.updatePropertyAccessExpression(C, A, Xe(C.name, s, Me)) : t.updateElementAccessExpression(C, A, Xe(C.argumentExpression, s, ct)), O ? t.createSyntheticReferenceExpression(A, O) : A; + } + function u(C, D) { + if (vu(C)) + return g( + C, + D, + /*isDelete*/ + !1 + ); + if (Yu(C.expression) && vu(za(C.expression))) { + const w = c( + C.expression, + /*captureThisArg*/ + !0, + /*isDelete*/ + !1 + ), A = Or(C.arguments, s, ct); + return Gx(w) ? ot(t.createFunctionCallCall(w.expression, w.thisArg, A), C) : t.updateCallExpression( + C, + w, + /*typeArguments*/ + void 0, + A + ); + } + return kr(C, s, e); + } + function m(C, D, w) { + switch (C.kind) { + case 217: + return c(C, D, w); + case 211: + case 212: + return _(C, D, w); + case 213: + return u(C, D); + default: + return Xe(C, s, ct); + } + } + function g(C, D, w) { + const { expression: A, chain: O } = o(C), F = m( + ed(A), + oS(O[0]), + /*isDelete*/ + !1 + ); + let R = Gx(F) ? F.thisArg : void 0, W = Gx(F) ? F.expression : F, V = t.restoreOuterExpressions( + A, + W, + 8 + /* PartiallyEmittedExpressions */ + ); + s2(W) || (W = t.createTempVariable(n), V = t.createAssignment(W, V)); + let $ = W, U; + for (let Z = 0; Z < O.length; Z++) { + const J = O[Z]; + switch (J.kind) { + case 211: + case 212: + Z === O.length - 1 && D && (s2($) ? U = $ : (U = t.createTempVariable(n), $ = t.createAssignment(U, $))), $ = J.kind === 211 ? t.createPropertyAccessExpression($, Xe(J.name, s, Me)) : t.createElementAccessExpression($, Xe(J.argumentExpression, s, ct)); + break; + case 213: + Z === 0 && R ? (Fo(R) || (R = t.cloneNode(R), _m( + R, + 3072 + /* NoComments */ + )), $ = t.createFunctionCallCall( + $, + R.kind === 108 ? t.createThis() : R, + Or(J.arguments, s, ct) + )) : $ = t.createCallExpression( + $, + /*typeArguments*/ + void 0, + Or(J.arguments, s, ct) + ); + break; + } + Sn($, J); + } + const _e = w ? t.createConditionalExpression( + h( + V, + W, + /*invert*/ + !0 + ), + /*questionToken*/ + void 0, + t.createTrue(), + /*colonToken*/ + void 0, + t.createDeleteExpression($) + ) : t.createConditionalExpression( + h( + V, + W, + /*invert*/ + !0 + ), + /*questionToken*/ + void 0, + t.createVoidZero(), + /*colonToken*/ + void 0, + $ + ); + return ot(_e, C), U ? t.createSyntheticReferenceExpression(_e, U) : _e; + } + function h(C, D, w) { + return t.createBinaryExpression( + t.createBinaryExpression( + C, + t.createToken( + w ? 37 : 38 + /* ExclamationEqualsEqualsToken */ + ), + t.createNull() + ), + t.createToken( + w ? 57 : 56 + /* AmpersandAmpersandToken */ + ), + t.createBinaryExpression( + D, + t.createToken( + w ? 37 : 38 + /* ExclamationEqualsEqualsToken */ + ), + t.createVoidZero() + ) + ); + } + function S(C) { + let D = Xe(C.left, s, ct), w = D; + return s2(D) || (w = t.createTempVariable(n), D = t.createAssignment(w, D)), ot( + t.createConditionalExpression( + h(D, w), + /*questionToken*/ + void 0, + w, + /*colonToken*/ + void 0, + Xe(C.right, s, ct) + ), + C + ); + } + function T(C) { + return vu(za(C.expression)) ? Sn(m( + C.expression, + /*captureThisArg*/ + !1, + /*isDelete*/ + !0 + ), C) : t.updateDeleteExpression(C, Xe(C.expression, s, ct)); + } + } + function Bne(e) { + const { + hoistVariableDeclaration: t, + factory: n + } = e; + return Ad(e, i); + function i(c) { + return c.isDeclarationFile ? c : kr(c, s, e); + } + function s(c) { + return c.transformFlags & 16 ? $B(c) ? o(c) : kr(c, s, e) : c; + } + function o(c) { + const _ = c.operatorToken, u = UD(_.kind); + let m = za(Xe(c.left, s, u_)), g = m; + const h = za(Xe(c.right, s, ct)); + if (vo(m)) { + const S = s2(m.expression), T = S ? m.expression : n.createTempVariable(t), C = S ? m.expression : n.createAssignment( + T, + m.expression + ); + if (Tn(m)) + g = n.createPropertyAccessExpression( + T, + m.name + ), m = n.createPropertyAccessExpression( + C, + m.name + ); + else { + const D = s2(m.argumentExpression), w = D ? m.argumentExpression : n.createTempVariable(t); + g = n.createElementAccessExpression( + T, + w + ), m = n.createElementAccessExpression( + C, + D ? m.argumentExpression : n.createAssignment( + w, + m.argumentExpression + ) + ); + } + } + return n.createBinaryExpression( + m, + u, + n.createParenthesizedExpression( + n.createAssignment( + g, + h + ) + ) + ); + } + } + function Jne(e) { + const { + factory: t, + getEmitHelperFactory: n, + hoistVariableDeclaration: i, + startLexicalEnvironment: s, + endLexicalEnvironment: o + } = e; + let c, _, u, m; + return Ad(e, g); + function g(ie) { + if (ie.isDeclarationFile) + return ie; + const le = Xe(ie, h, Ei); + return Qg(le, e.readEmitHelpers()), _ = void 0, c = void 0, u = void 0, le; + } + function h(ie) { + if (!(ie.transformFlags & 4)) + return ie; + switch (ie.kind) { + case 307: + return S(ie); + case 241: + return T(ie); + case 248: + return C(ie); + case 250: + return D(ie); + case 255: + return A(ie); + default: + return kr(ie, h, e); + } + } + function S(ie) { + const le = NW(ie.statements); + if (le) { + s(), c = new S6(), _ = []; + const Te = O1e(ie.statements), q = []; + Nn(q, JD(ie.statements, h, xi, 0, Te)); + let me = Te; + for (; me < ie.statements.length; ) { + const oe = ie.statements[me]; + if (Wne(oe) !== 0) { + me > Te && Nn(q, Or(ie.statements, h, xi, Te, me - Te)); + break; + } + me++; + } + E.assert(me < ie.statements.length, "Should have encountered at least one 'using' statement."); + const Ce = re(), Ee = O(ie.statements, me, ie.statements.length, Ce, q); + return c.size && Pr( + q, + t.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + t.createNamedExports(Ki(c.values())) + ) + ), Nn(q, o()), _.length && q.push(t.createVariableStatement( + t.createModifiersFromModifierFlags( + 32 + /* Export */ + ), + t.createVariableDeclarationList( + _, + 1 + /* Let */ + ) + )), Nn(q, te( + Ee, + Ce, + le === 2 + /* Async */ + )), m && q.push(t.createExportAssignment( + /*modifiers*/ + void 0, + /*isExportEquals*/ + !0, + m + )), t.updateSourceFile(ie, q); + } + return kr(ie, h, e); + } + function T(ie) { + const le = NW(ie.statements); + if (le) { + const Te = O1e(ie.statements), q = re(); + return t.updateBlock( + ie, + [ + ...JD(ie.statements, h, xi, 0, Te), + ...te( + O( + ie.statements, + Te, + ie.statements.length, + q, + /*topLevelStatements*/ + void 0 + ), + q, + le === 2 + /* Async */ + ) + ] + ); + } + return kr(ie, h, e); + } + function C(ie) { + return ie.initializer && L1e(ie.initializer) ? Xe( + t.createBlock([ + t.createVariableStatement( + /*modifiers*/ + void 0, + ie.initializer + ), + t.updateForStatement( + ie, + /*initializer*/ + void 0, + ie.condition, + ie.incrementor, + ie.statement + ) + ]), + h, + xi + ) : kr(ie, h, e); + } + function D(ie) { + if (L1e(ie.initializer)) { + const le = ie.initializer, Te = Uc(le.declarations) || t.createVariableDeclaration(t.createTempVariable( + /*recordTempVariable*/ + void 0 + )), q = zne(le) === 2, me = t.getGeneratedNameForNode(Te.name), Ce = t.updateVariableDeclaration( + Te, + Te.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + me + ), Ee = t.createVariableDeclarationList( + [Ce], + q ? 6 : 4 + /* Using */ + ), oe = t.createVariableStatement( + /*modifiers*/ + void 0, + Ee + ); + return Xe( + t.updateForOfStatement( + ie, + ie.awaitModifier, + t.createVariableDeclarationList( + [ + t.createVariableDeclaration(me) + ], + 2 + /* Const */ + ), + ie.expression, + ks(ie.statement) ? t.updateBlock(ie.statement, [ + oe, + ...ie.statement.statements + ]) : t.createBlock( + [ + oe, + ie.statement + ], + /*multiLine*/ + !0 + ) + ), + h, + xi + ); + } + return kr(ie, h, e); + } + function w(ie, le) { + return NW(ie.statements) !== 0 ? i6(ie) ? t.updateCaseClause( + ie, + Xe(ie.expression, h, ct), + O( + ie.statements, + /*start*/ + 0, + ie.statements.length, + le, + /*topLevelStatements*/ + void 0 + ) + ) : t.updateDefaultClause( + ie, + O( + ie.statements, + /*start*/ + 0, + ie.statements.length, + le, + /*topLevelStatements*/ + void 0 + ) + ) : kr(ie, h, e); + } + function A(ie) { + const le = ZRe(ie.caseBlock.clauses); + if (le) { + const Te = re(); + return te( + [ + t.updateSwitchStatement( + ie, + Xe(ie.expression, h, ct), + t.updateCaseBlock( + ie.caseBlock, + ie.caseBlock.clauses.map((q) => w(q, Te)) + ) + ) + ], + Te, + le === 2 + /* Async */ + ); + } + return kr(ie, h, e); + } + function O(ie, le, Te, q, me) { + const Ce = []; + for (let ke = le; ke < Te; ke++) { + const ue = ie[ke], it = Wne(ue); + if (it) { + E.assertNode(ue, pc); + const xe = []; + for (let he of ue.declarationList.declarations) { + if (!Me(he.name)) { + xe.length = 0; + break; + } + X_(he) && (he = K_(e, he)); + const ne = Xe(he.initializer, h, ct) ?? t.createVoidZero(); + xe.push(t.updateVariableDeclaration( + he, + he.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + n().createAddDisposableResourceHelper( + q, + ne, + it === 2 + /* Async */ + ) + )); + } + if (xe.length) { + const he = t.createVariableDeclarationList( + xe, + 2 + /* Const */ + ); + Sn(he, ue.declarationList), ot(he, ue.declarationList), Ee(t.updateVariableStatement( + ue, + /*modifiers*/ + void 0, + he + )); + continue; + } + } + const Oe = h(ue); + os(Oe) ? Oe.forEach(Ee) : Oe && Ee(Oe); + } + return Ce; + function Ee(ke) { + E.assertNode(ke, xi), Pr(Ce, oe(ke)); + } + function oe(ke) { + if (!me) return ke; + switch (ke.kind) { + case 272: + case 271: + case 278: + case 262: + return F(ke, me); + case 277: + return R(ke); + case 263: + return $(ke); + case 243: + return U(ke); + } + return ke; + } + } + function F(ie, le) { + le.push(ie); + } + function R(ie) { + return ie.isExportEquals ? V(ie) : W(ie); + } + function W(ie) { + if (u) + return ie; + u = t.createUniqueName( + "_default", + 56 + /* Optimistic */ + ), J( + u, + /*isExport*/ + !0, + "default", + ie + ); + let le = ie.expression, Te = xc(le); + X_(Te) && (Te = K_( + e, + Te, + /*ignoreEmptyStringLiteral*/ + !1, + "default" + ), le = t.restoreOuterExpressions(le, Te)); + const q = t.createAssignment(u, le); + return t.createExpressionStatement(q); + } + function V(ie) { + if (m) + return ie; + m = t.createUniqueName( + "_default", + 56 + /* Optimistic */ + ), i(m); + const le = t.createAssignment(m, ie.expression); + return t.createExpressionStatement(le); + } + function $(ie) { + if (!ie.name && u) + return ie; + const le = $n( + ie, + 32 + /* Export */ + ), Te = $n( + ie, + 2048 + /* Default */ + ); + let q = t.converters.convertToClassExpression(ie); + return ie.name && (J( + t.getLocalName(ie), + le && !Te, + /*exportAlias*/ + void 0, + ie + ), q = t.createAssignment(t.getDeclarationName(ie), q), X_(q) && (q = K_( + e, + q, + /*ignoreEmptyStringLiteral*/ + !1 + )), Sn(q, ie), da(q, ie), Hc(q, ie)), Te && !u && (u = t.createUniqueName( + "_default", + 56 + /* Optimistic */ + ), J( + u, + /*isExport*/ + !0, + "default", + ie + ), q = t.createAssignment(u, q), X_(q) && (q = K_( + e, + q, + /*ignoreEmptyStringLiteral*/ + !1, + "default" + )), Sn(q, ie)), t.createExpressionStatement(q); + } + function U(ie) { + let le; + const Te = $n( + ie, + 32 + /* Export */ + ); + for (const q of ie.declarationList.declarations) + Z(q, Te, q), q.initializer && (le = Pr(le, _e(q))); + if (le) { + const q = t.createExpressionStatement(t.inlineExpressions(le)); + return Sn(q, ie), Hc(q, ie), da(q, ie), q; + } + } + function _e(ie) { + E.assertIsDefined(ie.initializer); + let le; + Me(ie.name) ? (le = t.cloneNode(ie.name), on(le, va(le) & -114689)) : le = t.converters.convertToAssignmentPattern(ie.name); + const Te = t.createAssignment(le, ie.initializer); + return Sn(Te, ie), Hc(Te, ie), da(Te, ie), Te; + } + function Z(ie, le, Te) { + if (Ds(ie.name)) + for (const q of ie.name.elements) + ul(q) || Z(q, le, Te); + else + J( + ie.name, + le, + /*exportAlias*/ + void 0, + Te + ); + } + function J(ie, le, Te, q) { + const me = Fo(ie) ? ie : t.cloneNode(ie); + if (le) { + if (Te === void 0 && !Rh(me)) { + const ke = t.createVariableDeclaration(me); + q && Sn(ke, q), _.push(ke); + return; + } + const Ce = Te !== void 0 ? me : void 0, Ee = Te !== void 0 ? Te : me, oe = t.createExportSpecifier( + /*isTypeOnly*/ + !1, + Ce, + Ee + ); + q && Sn(oe, q), c.set(me, oe); + } + i(me); + } + function re() { + return t.createUniqueName("env"); + } + function te(ie, le, Te) { + const q = [], me = t.createObjectLiteralExpression([ + t.createPropertyAssignment("stack", t.createArrayLiteralExpression()), + t.createPropertyAssignment("error", t.createVoidZero()), + t.createPropertyAssignment("hasError", t.createFalse()) + ]), Ce = t.createVariableDeclaration( + le, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + me + ), Ee = t.createVariableDeclarationList( + [Ce], + 2 + /* Const */ + ), oe = t.createVariableStatement( + /*modifiers*/ + void 0, + Ee + ); + q.push(oe); + const ke = t.createBlock( + ie, + /*multiLine*/ + !0 + ), ue = t.createUniqueName("e"), it = t.createCatchClause( + ue, + t.createBlock( + [ + t.createExpressionStatement( + t.createAssignment( + t.createPropertyAccessExpression(le, "error"), + ue + ) + ), + t.createExpressionStatement( + t.createAssignment( + t.createPropertyAccessExpression(le, "hasError"), + t.createTrue() + ) + ) + ], + /*multiLine*/ + !0 + ) + ); + let Oe; + if (Te) { + const he = t.createUniqueName("result"); + Oe = t.createBlock( + [ + t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList( + [ + t.createVariableDeclaration( + he, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + n().createDisposeResourcesHelper(le) + ) + ], + 2 + /* Const */ + ) + ), + t.createIfStatement(he, t.createExpressionStatement(t.createAwaitExpression(he))) + ], + /*multiLine*/ + !0 + ); + } else + Oe = t.createBlock( + [ + t.createExpressionStatement( + n().createDisposeResourcesHelper(le) + ) + ], + /*multiLine*/ + !0 + ); + const xe = t.createTryStatement(ke, it, Oe); + return q.push(xe), q; + } + } + function O1e(e) { + for (let t = 0; t < e.length; t++) + if (!nm(e[t]) && !i3(e[t])) + return t; + return 0; + } + function L1e(e) { + return Il(e) && zne(e) !== 0; + } + function zne(e) { + return (e.flags & 7) === 6 ? 2 : (e.flags & 7) === 4 ? 1 : 0; + } + function YRe(e) { + return zne(e.declarationList); + } + function Wne(e) { + return pc(e) ? YRe(e) : 0; + } + function NW(e) { + let t = 0; + for (const n of e) { + const i = Wne(n); + if (i === 2) return 2; + i > t && (t = i); + } + return t; + } + function ZRe(e) { + let t = 0; + for (const n of e) { + const i = NW(n.statements); + if (i === 2) return 2; + i > t && (t = i); + } + return t; + } + function Une(e) { + const { + factory: t, + getEmitHelperFactory: n + } = e, i = e.getCompilerOptions(); + let s, o; + return Ad(e, h); + function c() { + if (o.filenameDeclaration) + return o.filenameDeclaration.name; + const xe = t.createVariableDeclaration( + t.createUniqueName( + "_jsxFileName", + 48 + /* FileLevel */ + ), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createStringLiteral(s.fileName) + ); + return o.filenameDeclaration = xe, o.filenameDeclaration.name; + } + function _(xe) { + return i.jsx === 5 ? "jsxDEV" : xe ? "jsxs" : "jsx"; + } + function u(xe) { + const he = _(xe); + return g(he); + } + function m() { + return g("Fragment"); + } + function g(xe) { + var he, ne; + const Ae = xe === "createElement" ? o.importSpecifier : O5(o.importSpecifier, i), De = (ne = (he = o.utilizedImplicitRuntimeImports) == null ? void 0 : he.get(Ae)) == null ? void 0 : ne.get(xe); + if (De) + return De.name; + o.utilizedImplicitRuntimeImports || (o.utilizedImplicitRuntimeImports = /* @__PURE__ */ new Map()); + let we = o.utilizedImplicitRuntimeImports.get(Ae); + we || (we = /* @__PURE__ */ new Map(), o.utilizedImplicitRuntimeImports.set(Ae, we)); + const Ue = t.createUniqueName( + `_${xe}`, + 112 + /* AllowNameSubstitution */ + ), bt = t.createImportSpecifier( + /*isTypeOnly*/ + !1, + t.createIdentifier(xe), + Ue + ); + return nte(Ue, bt), we.set(xe, bt), Ue; + } + function h(xe) { + if (xe.isDeclarationFile) + return xe; + s = xe, o = {}, o.importSpecifier = Q3(i, xe); + let he = kr(xe, S, e); + Qg(he, e.readEmitHelpers()); + let ne = he.statements; + if (o.filenameDeclaration && (ne = pS(ne.slice(), t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList( + [o.filenameDeclaration], + 2 + /* Const */ + ) + ))), o.utilizedImplicitRuntimeImports) { + for (const [Ae, De] of Ki(o.utilizedImplicitRuntimeImports.entries())) + if (el(xe)) { + const we = t.createImportDeclaration( + /*modifiers*/ + void 0, + t.createImportClause( + /*isTypeOnly*/ + !1, + /*name*/ + void 0, + t.createNamedImports(Ki(De.values())) + ), + t.createStringLiteral(Ae), + /*attributes*/ + void 0 + ); + lv( + we, + /*incremental*/ + !1 + ), ne = pS(ne.slice(), we); + } else if ($_(xe)) { + const we = t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList( + [ + t.createVariableDeclaration( + t.createObjectBindingPattern(Ki(De.values(), (Ue) => t.createBindingElement( + /*dotDotDotToken*/ + void 0, + Ue.propertyName, + Ue.name + ))), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createCallExpression( + t.createIdentifier("require"), + /*typeArguments*/ + void 0, + [t.createStringLiteral(Ae)] + ) + ) + ], + 2 + /* Const */ + ) + ); + lv( + we, + /*incremental*/ + !1 + ), ne = pS(ne.slice(), we); + } + } + return ne !== he.statements && (he = t.updateSourceFile(he, ne)), o = void 0, he; + } + function S(xe) { + return xe.transformFlags & 2 ? T(xe) : xe; + } + function T(xe) { + switch (xe.kind) { + case 284: + return O( + xe, + /*isChild*/ + !1 + ); + case 285: + return F( + xe, + /*isChild*/ + !1 + ); + case 288: + return R( + xe, + /*isChild*/ + !1 + ); + case 294: + return Oe(xe); + default: + return kr(xe, S, e); + } + } + function C(xe) { + switch (xe.kind) { + case 12: + return me(xe); + case 294: + return Oe(xe); + case 284: + return O( + xe, + /*isChild*/ + !0 + ); + case 285: + return F( + xe, + /*isChild*/ + !0 + ); + case 288: + return R( + xe, + /*isChild*/ + !0 + ); + default: + return E.failBadSyntaxKind(xe); + } + } + function D(xe) { + return xe.properties.some( + (he) => Xc(he) && (Me(he.name) && An(he.name) === "__proto__" || ea(he.name) && he.name.text === "__proto__") + ); + } + function w(xe) { + let he = !1; + for (const ne of xe.attributes.properties) + if ($x(ne) && (!oa(ne.expression) || ne.expression.properties.some(Zg))) + he = !0; + else if (he && hm(ne) && Me(ne.name) && ne.name.escapedText === "key") + return !0; + return !1; + } + function A(xe) { + return o.importSpecifier === void 0 || w(xe); + } + function O(xe, he) { + return (A(xe.openingElement) ? _e : $)( + xe.openingElement, + xe.children, + he, + /*location*/ + xe + ); + } + function F(xe, he) { + return (A(xe) ? _e : $)( + xe, + /*children*/ + void 0, + he, + /*location*/ + xe + ); + } + function R(xe, he) { + return (o.importSpecifier === void 0 ? J : Z)( + xe.openingFragment, + xe.children, + he, + /*location*/ + xe + ); + } + function W(xe) { + const he = V(xe); + return he && t.createObjectLiteralExpression([he]); + } + function V(xe) { + const he = jC(xe); + if (Ir(he) === 1 && !he[0].dotDotDotToken) { + const Ae = C(he[0]); + return Ae && t.createPropertyAssignment("children", Ae); + } + const ne = Li(xe, C); + return Ir(ne) ? t.createPropertyAssignment("children", t.createArrayLiteralExpression(ne)) : void 0; + } + function $(xe, he, ne, Ae) { + const De = ue(xe), we = he && he.length ? V(he) : void 0, Ue = Pn(xe.attributes.properties, (er) => !!er.name && Me(er.name) && er.name.escapedText === "key"), bt = Ue ? kn(xe.attributes.properties, (er) => er !== Ue) : xe.attributes.properties, Lt = Ir(bt) ? te(bt, we) : t.createObjectLiteralExpression(we ? [we] : He); + return U( + De, + Lt, + Ue, + he || He, + ne, + Ae + ); + } + function U(xe, he, ne, Ae, De, we) { + var Ue; + const bt = jC(Ae), Lt = Ir(bt) > 1 || !!((Ue = bt[0]) != null && Ue.dotDotDotToken), er = [xe, he]; + if (ne && er.push(q(ne.initializer)), i.jsx === 5) { + const Dt = Jo(s); + if (Dt && Ei(Dt)) { + ne === void 0 && er.push(t.createVoidZero()), er.push(Lt ? t.createTrue() : t.createFalse()); + const Qt = js(Dt, we.pos); + er.push(t.createObjectLiteralExpression([ + t.createPropertyAssignment("fileName", c()), + t.createPropertyAssignment("lineNumber", t.createNumericLiteral(Qt.line + 1)), + t.createPropertyAssignment("columnNumber", t.createNumericLiteral(Qt.character + 1)) + ])), er.push(t.createThis()); + } + } + const Nr = ot( + t.createCallExpression( + u(Lt), + /*typeArguments*/ + void 0, + er + ), + we + ); + return De && xu(Nr), Nr; + } + function _e(xe, he, ne, Ae) { + const De = ue(xe), we = xe.attributes.properties, Ue = Ir(we) ? te(we) : t.createNull(), bt = o.importSpecifier === void 0 ? _z( + t, + e.getEmitResolver().getJsxFactoryEntity(s), + i.reactNamespace, + // TODO: GH#18217 + xe + ) : g("createElement"), Lt = jte( + t, + bt, + De, + Ue, + Li(he, C), + Ae + ); + return ne && xu(Lt), Lt; + } + function Z(xe, he, ne, Ae) { + let De; + if (he && he.length) { + const we = W(he); + we && (De = we); + } + return U( + m(), + De || t.createObjectLiteralExpression([]), + /*keyAttr*/ + void 0, + he, + ne, + Ae + ); + } + function J(xe, he, ne, Ae) { + const De = Bte( + t, + e.getEmitResolver().getJsxFactoryEntity(s), + e.getEmitResolver().getJsxFragmentFactoryEntity(s), + i.reactNamespace, + // TODO: GH#18217 + Li(he, C), + xe, + Ae + ); + return ne && xu(De), De; + } + function re(xe) { + return oa(xe.expression) && !D(xe.expression) ? Wc(xe.expression.properties, (he) => E.checkDefined(Xe(he, S, Eh))) : t.createSpreadAssignment(E.checkDefined(Xe(xe.expression, S, ct))); + } + function te(xe, he) { + const ne = pa(i); + return ne && ne >= 5 ? t.createObjectLiteralExpression(ie(xe, he)) : le(xe, he); + } + function ie(xe, he) { + const ne = Dp(hR(xe, $x, (Ae, De) => Dp(gr(Ae, (we) => De ? re(we) : Te(we))))); + return he && ne.push(he), ne; + } + function le(xe, he) { + const ne = []; + let Ae = []; + for (const we of xe) { + if ($x(we)) { + if (oa(we.expression) && !D(we.expression)) { + for (const Ue of we.expression.properties) { + if (Zg(Ue)) { + De(), ne.push(E.checkDefined(Xe(Ue.expression, S, ct))); + continue; + } + Ae.push(E.checkDefined(Xe(Ue, S))); + } + continue; + } + De(), ne.push(E.checkDefined(Xe(we.expression, S, ct))); + continue; + } + Ae.push(Te(we)); + } + return he && Ae.push(he), De(), ne.length && !oa(ne[0]) && ne.unshift(t.createObjectLiteralExpression()), Hm(ne) || n().createAssignHelper(ne); + function De() { + Ae.length && (ne.push(t.createObjectLiteralExpression(Ae)), Ae = []); + } + } + function Te(xe) { + const he = it(xe), ne = q(xe.initializer); + return t.createPropertyAssignment(he, ne); + } + function q(xe) { + if (xe === void 0) + return t.createTrue(); + if (xe.kind === 11) { + const he = xe.singleQuote !== void 0 ? xe.singleQuote : !Q7(xe, s), ne = t.createStringLiteral(ke(xe.text) || xe.text, he); + return ot(ne, xe); + } + return xe.kind === 294 ? xe.expression === void 0 ? t.createTrue() : E.checkDefined(Xe(xe.expression, S, ct)) : gm(xe) ? O( + xe, + /*isChild*/ + !1 + ) : MS(xe) ? F( + xe, + /*isChild*/ + !1 + ) : gv(xe) ? R( + xe, + /*isChild*/ + !1 + ) : E.failBadSyntaxKind(xe); + } + function me(xe) { + const he = Ce(xe.text); + return he === void 0 ? void 0 : t.createStringLiteral(he); + } + function Ce(xe) { + let he, ne = 0, Ae = -1; + for (let De = 0; De < xe.length; De++) { + const we = xe.charCodeAt(De); + yu(we) ? (ne !== -1 && Ae !== -1 && (he = Ee(he, xe.substr(ne, Ae - ne + 1))), ne = -1) : em(we) || (Ae = De, ne === -1 && (ne = De)); + } + return ne !== -1 ? Ee(he, xe.substr(ne)) : he; + } + function Ee(xe, he) { + const ne = oe(he); + return xe === void 0 ? ne : xe + " " + ne; + } + function oe(xe) { + return xe.replace(/&((#((\d+)|x([\da-fA-F]+)))|(\w+));/g, (he, ne, Ae, De, we, Ue, bt) => { + if (we) + return _4(parseInt(we, 10)); + if (Ue) + return _4(parseInt(Ue, 16)); + { + const Lt = KRe.get(bt); + return Lt ? _4(Lt) : he; + } + }); + } + function ke(xe) { + const he = oe(xe); + return he === xe ? void 0 : he; + } + function ue(xe) { + if (xe.kind === 284) + return ue(xe.openingElement); + { + const he = xe.tagName; + return Me(he) && BC(he.escapedText) ? t.createStringLiteral(An(he)) : wd(he) ? t.createStringLiteral(An(he.namespace) + ":" + An(he.name)) : bN(t, he); + } + } + function it(xe) { + const he = xe.name; + if (Me(he)) { + const ne = An(he); + return /^[A-Z_]\w*$/i.test(ne) ? he : t.createStringLiteral(ne); + } + return t.createStringLiteral(An(he.namespace) + ":" + An(he.name)); + } + function Oe(xe) { + const he = Xe(xe.expression, S, ct); + return xe.dotDotDotToken ? t.createSpreadElement(he) : he; + } + } + var KRe = new Map(Object.entries({ + quot: 34, + amp: 38, + apos: 39, + lt: 60, + gt: 62, + nbsp: 160, + iexcl: 161, + cent: 162, + pound: 163, + curren: 164, + yen: 165, + brvbar: 166, + sect: 167, + uml: 168, + copy: 169, + ordf: 170, + laquo: 171, + not: 172, + shy: 173, + reg: 174, + macr: 175, + deg: 176, + plusmn: 177, + sup2: 178, + sup3: 179, + acute: 180, + micro: 181, + para: 182, + middot: 183, + cedil: 184, + sup1: 185, + ordm: 186, + raquo: 187, + frac14: 188, + frac12: 189, + frac34: 190, + iquest: 191, + Agrave: 192, + Aacute: 193, + Acirc: 194, + Atilde: 195, + Auml: 196, + Aring: 197, + AElig: 198, + Ccedil: 199, + Egrave: 200, + Eacute: 201, + Ecirc: 202, + Euml: 203, + Igrave: 204, + Iacute: 205, + Icirc: 206, + Iuml: 207, + ETH: 208, + Ntilde: 209, + Ograve: 210, + Oacute: 211, + Ocirc: 212, + Otilde: 213, + Ouml: 214, + times: 215, + Oslash: 216, + Ugrave: 217, + Uacute: 218, + Ucirc: 219, + Uuml: 220, + Yacute: 221, + THORN: 222, + szlig: 223, + agrave: 224, + aacute: 225, + acirc: 226, + atilde: 227, + auml: 228, + aring: 229, + aelig: 230, + ccedil: 231, + egrave: 232, + eacute: 233, + ecirc: 234, + euml: 235, + igrave: 236, + iacute: 237, + icirc: 238, + iuml: 239, + eth: 240, + ntilde: 241, + ograve: 242, + oacute: 243, + ocirc: 244, + otilde: 245, + ouml: 246, + divide: 247, + oslash: 248, + ugrave: 249, + uacute: 250, + ucirc: 251, + uuml: 252, + yacute: 253, + thorn: 254, + yuml: 255, + OElig: 338, + oelig: 339, + Scaron: 352, + scaron: 353, + Yuml: 376, + fnof: 402, + circ: 710, + tilde: 732, + Alpha: 913, + Beta: 914, + Gamma: 915, + Delta: 916, + Epsilon: 917, + Zeta: 918, + Eta: 919, + Theta: 920, + Iota: 921, + Kappa: 922, + Lambda: 923, + Mu: 924, + Nu: 925, + Xi: 926, + Omicron: 927, + Pi: 928, + Rho: 929, + Sigma: 931, + Tau: 932, + Upsilon: 933, + Phi: 934, + Chi: 935, + Psi: 936, + Omega: 937, + alpha: 945, + beta: 946, + gamma: 947, + delta: 948, + epsilon: 949, + zeta: 950, + eta: 951, + theta: 952, + iota: 953, + kappa: 954, + lambda: 955, + mu: 956, + nu: 957, + xi: 958, + omicron: 959, + pi: 960, + rho: 961, + sigmaf: 962, + sigma: 963, + tau: 964, + upsilon: 965, + phi: 966, + chi: 967, + psi: 968, + omega: 969, + thetasym: 977, + upsih: 978, + piv: 982, + ensp: 8194, + emsp: 8195, + thinsp: 8201, + zwnj: 8204, + zwj: 8205, + lrm: 8206, + rlm: 8207, + ndash: 8211, + mdash: 8212, + lsquo: 8216, + rsquo: 8217, + sbquo: 8218, + ldquo: 8220, + rdquo: 8221, + bdquo: 8222, + dagger: 8224, + Dagger: 8225, + bull: 8226, + hellip: 8230, + permil: 8240, + prime: 8242, + Prime: 8243, + lsaquo: 8249, + rsaquo: 8250, + oline: 8254, + frasl: 8260, + euro: 8364, + image: 8465, + weierp: 8472, + real: 8476, + trade: 8482, + alefsym: 8501, + larr: 8592, + uarr: 8593, + rarr: 8594, + darr: 8595, + harr: 8596, + crarr: 8629, + lArr: 8656, + uArr: 8657, + rArr: 8658, + dArr: 8659, + hArr: 8660, + forall: 8704, + part: 8706, + exist: 8707, + empty: 8709, + nabla: 8711, + isin: 8712, + notin: 8713, + ni: 8715, + prod: 8719, + sum: 8721, + minus: 8722, + lowast: 8727, + radic: 8730, + prop: 8733, + infin: 8734, + ang: 8736, + and: 8743, + or: 8744, + cap: 8745, + cup: 8746, + int: 8747, + there4: 8756, + sim: 8764, + cong: 8773, + asymp: 8776, + ne: 8800, + equiv: 8801, + le: 8804, + ge: 8805, + sub: 8834, + sup: 8835, + nsub: 8836, + sube: 8838, + supe: 8839, + oplus: 8853, + otimes: 8855, + perp: 8869, + sdot: 8901, + lceil: 8968, + rceil: 8969, + lfloor: 8970, + rfloor: 8971, + lang: 9001, + rang: 9002, + loz: 9674, + spades: 9824, + clubs: 9827, + hearts: 9829, + diams: 9830 + })); + function Vne(e) { + const { + factory: t, + hoistVariableDeclaration: n + } = e; + return Ad(e, i); + function i(u) { + return u.isDeclarationFile ? u : kr(u, s, e); + } + function s(u) { + if (!(u.transformFlags & 512)) + return u; + switch (u.kind) { + case 226: + return o(u); + default: + return kr(u, s, e); + } + } + function o(u) { + switch (u.operatorToken.kind) { + case 68: + return c(u); + case 43: + return _(u); + default: + return kr(u, s, e); + } + } + function c(u) { + let m, g; + const h = Xe(u.left, s, ct), S = Xe(u.right, s, ct); + if (fo(h)) { + const T = t.createTempVariable(n), C = t.createTempVariable(n); + m = ot( + t.createElementAccessExpression( + ot(t.createAssignment(T, h.expression), h.expression), + ot(t.createAssignment(C, h.argumentExpression), h.argumentExpression) + ), + h + ), g = ot( + t.createElementAccessExpression( + T, + C + ), + h + ); + } else if (Tn(h)) { + const T = t.createTempVariable(n); + m = ot( + t.createPropertyAccessExpression( + ot(t.createAssignment(T, h.expression), h.expression), + h.name + ), + h + ), g = ot( + t.createPropertyAccessExpression( + T, + h.name + ), + h + ); + } else + m = h, g = h; + return ot( + t.createAssignment( + m, + ot(t.createGlobalMethodCall("Math", "pow", [g, S]), u) + ), + u + ); + } + function _(u) { + const m = Xe(u.left, s, ct), g = Xe(u.right, s, ct); + return ot(t.createGlobalMethodCall("Math", "pow", [m, g]), u); + } + } + function M1e(e, t) { + return { kind: e, expression: t }; + } + function qne(e) { + const { + factory: t, + getEmitHelperFactory: n, + startLexicalEnvironment: i, + resumeLexicalEnvironment: s, + endLexicalEnvironment: o, + hoistVariableDeclaration: c + } = e, _ = e.getCompilerOptions(), u = e.getEmitResolver(), m = e.onSubstituteNode, g = e.onEmitNode; + e.onEmitNode = F_, e.onSubstituteNode = fp; + let h, S, T, C; + function D(Q) { + C = Pr( + C, + t.createVariableDeclaration(Q) + ); + } + let w, A = 0; + return Ad(e, O); + function O(Q) { + if (Q.isDeclarationFile) + return Q; + h = Q, S = Q.text; + const et = te(Q); + return Qg(et, e.readEmitHelpers()), h = void 0, S = void 0, C = void 0, T = 0, et; + } + function F(Q, et) { + const Rt = T; + return T = (T & ~Q | et) & 32767, Rt; + } + function R(Q, et, Rt) { + T = (T & ~et | Rt) & -32768 | Q; + } + function W(Q) { + return (T & 8192) !== 0 && Q.kind === 253 && !Q.expression; + } + function V(Q) { + return Q.transformFlags & 4194304 && (Rp(Q) || dv(Q) || Tte(Q) || xD(Q) || kD(Q) || i6(Q) || CD(Q) || OS(Q) || t2(Q) || i1(Q) || zy( + Q, + /*lookInLabeledStatements*/ + !1 + ) || ks(Q)); + } + function $(Q) { + return (Q.transformFlags & 1024) !== 0 || w !== void 0 || T & 8192 && V(Q) || zy( + Q, + /*lookInLabeledStatements*/ + !1 + ) && ri(Q) || (td(Q) & 1) !== 0; + } + function U(Q) { + return $(Q) ? re( + Q, + /*expressionResultIsUnused*/ + !1 + ) : Q; + } + function _e(Q) { + return $(Q) ? re( + Q, + /*expressionResultIsUnused*/ + !0 + ) : Q; + } + function Z(Q) { + if ($(Q)) { + const et = Jo(Q); + if (ss(et) && Kc(et)) { + const Rt = F( + 32670, + 16449 + /* StaticInitializerIncludes */ + ), jt = re( + Q, + /*expressionResultIsUnused*/ + !1 + ); + return R( + Rt, + 229376, + 0 + /* None */ + ), jt; + } + return re( + Q, + /*expressionResultIsUnused*/ + !1 + ); + } + return Q; + } + function J(Q) { + return Q.kind === 108 ? df( + Q, + /*isExpressionOfCall*/ + !0 + ) : U(Q); + } + function re(Q, et) { + switch (Q.kind) { + case 126: + return; + // elide static keyword + case 263: + return ue(Q); + case 231: + return it(Q); + case 169: + return Ks(Q); + case 262: + return Xt(Q); + case 219: + return We(Q); + case 218: + return Et(Q); + case 260: + return Rr(Q); + case 80: + return oe(Q); + case 261: + return de(Q); + case 255: + return ie(Q); + case 269: + return le(Q); + case 241: + return ft( + Q + ); + case 252: + case 251: + return ke(Q); + case 256: + return ut(Q); + case 246: + case 247: + return Zt( + Q, + /*outermostLabeledStatement*/ + void 0 + ); + case 248: + return fr( + Q, + /*outermostLabeledStatement*/ + void 0 + ); + case 249: + return ir( + Q, + /*outermostLabeledStatement*/ + void 0 + ); + case 250: + return Tr( + Q, + /*outermostLabeledStatement*/ + void 0 + ); + case 244: + return fe(Q); + case 210: + return Ms(Q); + case 299: + return Ji(Q); + case 304: + return dc(Q); + case 167: + return mc(Q); + case 209: + return Uo(Q); + case 213: + return ac(Q); + case 214: + return Ml(Q); + case 217: + return L(Q, et); + case 226: + return ve(Q, et); + case 356: + return X(Q, et); + case 15: + case 16: + case 17: + case 18: + return to(Q); + case 11: + return Do(Q); + case 9: + return ml(Q); + case 215: + return gc(Q); + case 228: + return Va(Q); + case 229: + return Rc(Q); + case 230: + return Sa(Q); + case 108: + return df( + Q, + /*isExpressionOfCall*/ + !1 + ); + case 110: + return Ce(Q); + case 236: + return Rf(Q); + case 174: + return ba(Q); + case 177: + case 178: + return Mo(Q); + case 243: + return zt(Q); + case 253: + return me(Q); + case 222: + return Ee(Q); + default: + return kr(Q, U, e); + } + } + function te(Q) { + const et = F( + 8064, + 64 + /* SourceFileIncludes */ + ), Rt = [], jt = []; + i(); + const Er = t.copyPrologue( + Q.statements, + Rt, + /*ensureUseStrict*/ + !1, + U + ); + return Nn(jt, Or(Q.statements, U, xi, Er)), C && jt.push( + t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList(C) + ) + ), t.mergeLexicalEnvironment(Rt, o()), K(Rt, Q), R( + et, + 0, + 0 + /* None */ + ), t.updateSourceFile( + Q, + ot(t.createNodeArray(Wi(Rt, jt)), Q.statements) + ); + } + function ie(Q) { + if (w !== void 0) { + const et = w.allowedNonLabeledJumps; + w.allowedNonLabeledJumps |= 2; + const Rt = kr(Q, U, e); + return w.allowedNonLabeledJumps = et, Rt; + } + return kr(Q, U, e); + } + function le(Q) { + const et = F( + 7104, + 0 + /* BlockScopeIncludes */ + ), Rt = kr(Q, U, e); + return R( + et, + 0, + 0 + /* None */ + ), Rt; + } + function Te(Q) { + return Sn(t.createReturnStatement(q()), Q); + } + function q() { + return t.createUniqueName( + "_this", + 48 + /* FileLevel */ + ); + } + function me(Q) { + return w ? (w.nonLocalJumps |= 8, W(Q) && (Q = Te(Q)), t.createReturnStatement( + t.createObjectLiteralExpression( + [ + t.createPropertyAssignment( + t.createIdentifier("value"), + Q.expression ? E.checkDefined(Xe(Q.expression, U, ct)) : t.createVoidZero() + ) + ] + ) + )) : W(Q) ? Te(Q) : kr(Q, U, e); + } + function Ce(Q) { + return T |= 65536, T & 2 && !(T & 16384) && (T |= 131072), w ? T & 2 ? (w.containsLexicalThis = !0, Q) : w.thisName || (w.thisName = t.createUniqueName("this")) : Q; + } + function Ee(Q) { + return kr(Q, _e, e); + } + function oe(Q) { + return w && u.isArgumentsLocalBinding(Q) ? w.argumentsName || (w.argumentsName = t.createUniqueName("arguments")) : Q.flags & 256 ? Sn( + ot( + t.createIdentifier(Pi(Q.escapedText)), + Q + ), + Q + ) : Q; + } + function ke(Q) { + if (w) { + const et = Q.kind === 252 ? 2 : 4; + if (!(Q.label && w.labels && w.labels.get(An(Q.label)) || !Q.label && w.allowedNonLabeledJumps & et)) { + let jt; + const Er = Q.label; + Er ? Q.kind === 252 ? (jt = `break-${Er.escapedText}`, rt( + w, + /*isBreak*/ + !0, + An(Er), + jt + )) : (jt = `continue-${Er.escapedText}`, rt( + w, + /*isBreak*/ + !1, + An(Er), + jt + )) : Q.kind === 252 ? (w.nonLocalJumps |= 2, jt = "break") : (w.nonLocalJumps |= 4, jt = "continue"); + let Hr = t.createStringLiteral(jt); + if (w.loopOutParameters.length) { + const xn = w.loopOutParameters; + let ii; + for (let j = 0; j < xn.length; j++) { + const Ne = Ll( + xn[j], + 1 + /* ToOutParameter */ + ); + j === 0 ? ii = Ne : ii = t.createBinaryExpression(ii, 28, Ne); + } + Hr = t.createBinaryExpression(ii, 28, Hr); + } + return t.createReturnStatement(Hr); + } + } + return kr(Q, U, e); + } + function ue(Q) { + const et = t.createVariableDeclaration( + t.getLocalName( + Q, + /*allowComments*/ + !0 + ), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Oe(Q) + ); + Sn(et, Q); + const Rt = [], jt = t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList([et]) + ); + if (Sn(jt, Q), ot(jt, Q), xu(jt), Rt.push(jt), $n( + Q, + 32 + /* Export */ + )) { + const Er = $n( + Q, + 2048 + /* Default */ + ) ? t.createExportDefault(t.getLocalName(Q)) : t.createExternalModuleExport(t.getLocalName(Q)); + Sn(Er, jt), Rt.push(Er); + } + return Gm(Rt); + } + function it(Q) { + return Oe(Q); + } + function Oe(Q) { + Q.name && mf(); + const et = Mb(Q), Rt = t.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + et ? [t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + mo() + )] : [], + /*type*/ + void 0, + xe(Q, et) + ); + on( + Rt, + va(Q) & 131072 | 1048576 + /* ReuseTempVariableScope */ + ); + const jt = t.createPartiallyEmittedExpression(Rt); + XC(jt, Q.end), on( + jt, + 3072 + /* NoComments */ + ); + const Er = t.createPartiallyEmittedExpression(jt); + XC(Er, aa(S, Q.pos)), on( + Er, + 3072 + /* NoComments */ + ); + const Hr = t.createParenthesizedExpression( + t.createCallExpression( + Er, + /*typeArguments*/ + void 0, + et ? [E.checkDefined(Xe(et.expression, U, ct))] : [] + ) + ); + return Gb(Hr, 3, "* @class "), Hr; + } + function xe(Q, et) { + const Rt = [], jt = t.getInternalName(Q), Er = wB(jt) ? t.getGeneratedNameForNode(jt) : jt; + i(), he(Rt, Q, et), ne(Rt, Q, Er, et), Ke(Rt, Q); + const Hr = eJ( + aa(S, Q.members.end), + 20 + /* CloseBraceToken */ + ), xn = t.createPartiallyEmittedExpression(Er); + XC(xn, Hr.end), on( + xn, + 3072 + /* NoComments */ + ); + const ii = t.createReturnStatement(xn); + oD(ii, Hr.pos), on( + ii, + 3840 + /* NoTokenSourceMaps */ + ), Rt.push(ii), Bg(Rt, o()); + const j = t.createBlock( + ot( + t.createNodeArray(Rt), + /*location*/ + Q.members + ), + /*multiLine*/ + !0 + ); + return on( + j, + 3072 + /* NoComments */ + ), j; + } + function he(Q, et, Rt) { + Rt && Q.push( + ot( + t.createExpressionStatement( + n().createExtendsHelper(t.getInternalName(et)) + ), + /*location*/ + Rt + ) + ); + } + function ne(Q, et, Rt, jt) { + const Er = w; + w = void 0; + const Hr = F( + 32662, + 73 + /* ConstructorIncludes */ + ), xn = Ug(et), ii = ug(xn, jt !== void 0), j = t.createFunctionDeclaration( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + Rt, + /*typeParameters*/ + void 0, + Ae(xn, ii), + /*type*/ + void 0, + bt(xn, et, jt, ii) + ); + ot(j, xn || et), jt && on( + j, + 16 + /* CapturesThis */ + ), Q.push(j), R( + Hr, + 229376, + 0 + /* None */ + ), w = Er; + } + function Ae(Q, et) { + return ic(Q && !et ? Q.parameters : void 0, U, e) || []; + } + function De(Q, et) { + const Rt = []; + s(), t.mergeLexicalEnvironment(Rt, o()), et && Rt.push(t.createReturnStatement(Cs())); + const jt = t.createNodeArray(Rt); + ot(jt, Q.members); + const Er = t.createBlock( + jt, + /*multiLine*/ + !0 + ); + return ot(Er, Q), on( + Er, + 3072 + /* NoComments */ + ), Er; + } + function we(Q) { + return pc(Q) && Ri(Q.declarationList.declarations, (et) => Me(et.name) && !et.initializer); + } + function Ue(Q) { + if (mS(Q)) + return !0; + if (!(Q.transformFlags & 134217728)) + return !1; + switch (Q.kind) { + // stop at function boundaries + case 219: + case 218: + case 262: + case 176: + case 175: + return !1; + // only step into computed property names for class and object literal elements + case 177: + case 178: + case 174: + case 172: { + const et = Q; + return fa(et.name) ? !!ms(et.name, Ue) : !1; + } + } + return !!ms(Q, Ue); + } + function bt(Q, et, Rt, jt) { + const Er = !!Rt && xc(Rt.expression).kind !== 106; + if (!Q) return De(et, Er); + const Hr = [], xn = []; + s(); + const ii = t.copyStandardPrologue( + Q.body.statements, + Hr, + /*statementOffset*/ + 0 + ); + (jt || Ue(Q.body)) && (T |= 8192), Nn(xn, Or(Q.body.statements, U, xi, ii)); + const j = Er || T & 8192; + gs(Hr, Q), Ve(Hr, Q, jt), $e(Hr, Q), j ? Ie(Hr, Q, ki()) : K(Hr, Q), t.mergeLexicalEnvironment(Hr, o()), j && !wn(Q.body) && xn.push(t.createReturnStatement(q())); + const Ne = t.createBlock( + ot( + t.createNodeArray( + [ + ...Hr, + ...xn + ] + ), + /*location*/ + Q.body.statements + ), + /*multiLine*/ + !0 + ); + return ot(Ne, Q.body), Bn(Ne, Q.body, jt); + } + function Lt(Q) { + return Fo(Q) && An(Q) === "_this"; + } + function er(Q) { + return Fo(Q) && An(Q) === "_super"; + } + function Nr(Q) { + return pc(Q) && Q.declarationList.declarations.length === 1 && Dt(Q.declarationList.declarations[0]); + } + function Dt(Q) { + return Kn(Q) && Lt(Q.name) && !!Q.initializer; + } + function Qt(Q) { + return Cl( + Q, + /*excludeCompoundAssignment*/ + !0 + ) && Lt(Q.left); + } + function Wr(Q) { + return Fs(Q) && Tn(Q.expression) && er(Q.expression.expression) && Me(Q.expression.name) && (An(Q.expression.name) === "call" || An(Q.expression.name) === "apply") && Q.arguments.length >= 1 && Q.arguments[0].kind === 110; + } + function yr(Q) { + return fn(Q) && Q.operatorToken.kind === 57 && Q.right.kind === 110 && Wr(Q.left); + } + function qn(Q) { + return fn(Q) && Q.operatorToken.kind === 56 && fn(Q.left) && Q.left.operatorToken.kind === 38 && er(Q.left.left) && Q.left.right.kind === 106 && Wr(Q.right) && An(Q.right.expression.name) === "apply"; + } + function Bt(Q) { + return fn(Q) && Q.operatorToken.kind === 57 && Q.right.kind === 110 && qn(Q.left); + } + function bi(Q) { + return Qt(Q) && yr(Q.right); + } + function pi(Q) { + return Qt(Q) && Bt(Q.right); + } + function Xn(Q) { + return Wr(Q) || yr(Q) || bi(Q) || qn(Q) || Bt(Q) || pi(Q); + } + function jr(Q) { + for (let et = 0; et < Q.statements.length - 1; et++) { + const Rt = Q.statements[et]; + if (!Nr(Rt)) + continue; + const jt = Rt.declarationList.declarations[0]; + if (jt.initializer.kind !== 110) + continue; + const Er = et; + let Hr = et + 1; + for (; Hr < Q.statements.length; ) { + const ei = Q.statements[Hr]; + if (El(ei) && Xn(xc(ei.expression))) + break; + if (we(ei)) { + Hr++; + continue; + } + return Q; + } + const xn = Q.statements[Hr]; + let ii = xn.expression; + Qt(ii) && (ii = ii.right); + const j = t.updateVariableDeclaration( + jt, + jt.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + ii + ), Ne = t.updateVariableDeclarationList(Rt.declarationList, [j]), Tt = t.createVariableStatement(Rt.modifiers, Ne); + Sn(Tt, xn), ot(Tt, xn); + const Ar = t.createNodeArray([ + ...Q.statements.slice(0, Er), + // copy statements preceding to `var _this` + ...Q.statements.slice(Er + 1, Hr), + // copy intervening temp variables + Tt, + ...Q.statements.slice(Hr + 1) + // copy statements following `super.call(this, ...)` + ]); + return ot(Ar, Q.statements), t.updateBlock(Q, Ar); + } + return Q; + } + function di(Q, et) { + for (const jt of et.statements) + if (jt.transformFlags & 134217728 && !pO(jt)) + return Q; + const Rt = !(et.transformFlags & 16384) && !(T & 65536) && !(T & 131072); + for (let jt = Q.statements.length - 1; jt > 0; jt--) { + const Er = Q.statements[jt]; + if (Rp(Er) && Er.expression && Lt(Er.expression)) { + const Hr = Q.statements[jt - 1]; + let xn; + if (El(Hr) && bi(xc(Hr.expression))) + xn = Hr.expression; + else if (Rt && Nr(Hr)) { + const Ne = Hr.declarationList.declarations[0]; + Xn(xc(Ne.initializer)) && (xn = t.createAssignment( + q(), + Ne.initializer + )); + } + if (!xn) + break; + const ii = t.createReturnStatement(xn); + Sn(ii, Hr), ot(ii, Hr); + const j = t.createNodeArray([ + ...Q.statements.slice(0, jt - 1), + // copy all statements preceding `_super.call(this, ...)` + ii, + ...Q.statements.slice(jt + 1) + // copy all statements following `return _this;` + ]); + return ot(j, Q.statements), t.updateBlock(Q, j); + } + } + return Q; + } + function Re(Q) { + if (Nr(Q)) { + if (Q.declarationList.declarations[0].initializer.kind === 110) + return; + } else if (Qt(Q)) + return t.createPartiallyEmittedExpression(Q.right, Q); + switch (Q.kind) { + // stop at function boundaries + case 219: + case 218: + case 262: + case 176: + case 175: + return Q; + // only step into computed property names for class and object literal elements + case 177: + case 178: + case 174: + case 172: { + const et = Q; + return fa(et.name) ? t.replacePropertyName(et, kr( + et.name, + Re, + /*context*/ + void 0 + )) : Q; + } + } + return kr( + Q, + Re, + /*context*/ + void 0 + ); + } + function gt(Q, et) { + if (et.transformFlags & 16384 || T & 65536 || T & 131072) + return Q; + for (const Rt of et.statements) + if (Rt.transformFlags & 134217728 && !pO(Rt)) + return Q; + return t.updateBlock(Q, Or(Q.statements, Re, xi)); + } + function tr(Q) { + if (Wr(Q) && Q.arguments.length === 2 && Me(Q.arguments[1]) && An(Q.arguments[1]) === "arguments") + return t.createLogicalAnd( + t.createStrictInequality( + mo(), + t.createNull() + ), + Q + ); + switch (Q.kind) { + // stop at function boundaries + case 219: + case 218: + case 262: + case 176: + case 175: + return Q; + // only step into computed property names for class and object literal elements + case 177: + case 178: + case 174: + case 172: { + const et = Q; + return fa(et.name) ? t.replacePropertyName(et, kr( + et.name, + tr, + /*context*/ + void 0 + )) : Q; + } + } + return kr( + Q, + tr, + /*context*/ + void 0 + ); + } + function qr(Q) { + return t.updateBlock(Q, Or(Q.statements, tr, xi)); + } + function Bn(Q, et, Rt) { + const jt = Q; + return Q = jr(Q), Q = di(Q, et), Q !== jt && (Q = gt(Q, et)), Rt && (Q = qr(Q)), Q; + } + function wn(Q) { + if (Q.kind === 253) + return !0; + if (Q.kind === 245) { + const et = Q; + if (et.elseStatement) + return wn(et.thenStatement) && wn(et.elseStatement); + } else if (Q.kind === 241) { + const et = Co(Q.statements); + if (et && wn(et)) + return !0; + } + return !1; + } + function ki() { + return on( + t.createThis(), + 8 + /* NoSubstitution */ + ); + } + function Cs() { + return t.createLogicalOr( + t.createLogicalAnd( + t.createStrictInequality( + mo(), + t.createNull() + ), + t.createFunctionApplyCall( + mo(), + ki(), + t.createIdentifier("arguments") + ) + ), + ki() + ); + } + function Ks(Q) { + if (!Q.dotDotDotToken) + return Ds(Q.name) ? Sn( + ot( + t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + t.getGeneratedNameForNode(Q), + /*questionToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ), + /*location*/ + Q + ), + /*original*/ + Q + ) : Q.initializer ? Sn( + ot( + t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + Q.name, + /*questionToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ), + /*location*/ + Q + ), + /*original*/ + Q + ) : Q; + } + function xr(Q) { + return Q.initializer !== void 0 || Ds(Q.name); + } + function gs(Q, et) { + if (!at(et.parameters, xr)) + return !1; + let Rt = !1; + for (const jt of et.parameters) { + const { name: Er, initializer: Hr, dotDotDotToken: xn } = jt; + xn || (Ds(Er) ? Rt = Qe(Q, jt, Er, Hr) || Rt : Hr && (Ct(Q, jt, Er, Hr), Rt = !0)); + } + return Rt; + } + function Qe(Q, et, Rt, jt) { + return Rt.elements.length > 0 ? (pS( + Q, + on( + t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList( + a2( + et, + U, + e, + 0, + t.getGeneratedNameForNode(et) + ) + ) + ), + 2097152 + /* CustomPrologue */ + ) + ), !0) : jt ? (pS( + Q, + on( + t.createExpressionStatement( + t.createAssignment( + t.getGeneratedNameForNode(et), + E.checkDefined(Xe(jt, U, ct)) + ) + ), + 2097152 + /* CustomPrologue */ + ) + ), !0) : !1; + } + function Ct(Q, et, Rt, jt) { + jt = E.checkDefined(Xe(jt, U, ct)); + const Er = t.createIfStatement( + t.createTypeCheck(t.cloneNode(Rt), "undefined"), + on( + ot( + t.createBlock([ + t.createExpressionStatement( + on( + ot( + t.createAssignment( + // TODO(rbuckton): Does this need to be parented? + on( + Fa(ot(t.cloneNode(Rt), Rt), Rt.parent), + 96 + /* NoSourceMap */ + ), + on( + jt, + 96 | va(jt) | 3072 + /* NoComments */ + ) + ), + et + ), + 3072 + /* NoComments */ + ) + ) + ]), + et + ), + 3905 + /* NoComments */ + ) + ); + xu(Er), ot(Er, et), on( + Er, + 2101056 + /* NoComments */ + ), pS(Q, Er); + } + function ee(Q, et) { + return !!(Q && Q.dotDotDotToken && !et); + } + function Ve(Q, et, Rt) { + const jt = [], Er = Co(et.parameters); + if (!ee(Er, Rt)) + return !1; + const Hr = Er.name.kind === 80 ? Fa(ot(t.cloneNode(Er.name), Er.name), Er.name.parent) : t.createTempVariable( + /*recordTempVariable*/ + void 0 + ); + on( + Hr, + 96 + /* NoSourceMap */ + ); + const xn = Er.name.kind === 80 ? t.cloneNode(Er.name) : Hr, ii = et.parameters.length - 1, j = t.createLoopVariable(); + jt.push( + on( + ot( + t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList([ + t.createVariableDeclaration( + Hr, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createArrayLiteralExpression([]) + ) + ]) + ), + /*location*/ + Er + ), + 2097152 + /* CustomPrologue */ + ) + ); + const Ne = t.createForStatement( + ot( + t.createVariableDeclarationList([ + t.createVariableDeclaration( + j, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createNumericLiteral(ii) + ) + ]), + Er + ), + ot( + t.createLessThan( + j, + t.createPropertyAccessExpression(t.createIdentifier("arguments"), "length") + ), + Er + ), + ot(t.createPostfixIncrement(j), Er), + t.createBlock([ + xu( + ot( + t.createExpressionStatement( + t.createAssignment( + t.createElementAccessExpression( + xn, + ii === 0 ? j : t.createSubtract(j, t.createNumericLiteral(ii)) + ), + t.createElementAccessExpression(t.createIdentifier("arguments"), j) + ) + ), + /*location*/ + Er + ) + ) + ]) + ); + return on( + Ne, + 2097152 + /* CustomPrologue */ + ), xu(Ne), jt.push(Ne), Er.name.kind !== 80 && jt.push( + on( + ot( + t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList( + a2(Er, U, e, 0, xn) + ) + ), + Er + ), + 2097152 + /* CustomPrologue */ + ) + ), Gj(Q, jt), !0; + } + function K(Q, et) { + return T & 131072 && et.kind !== 219 ? (Ie(Q, et, t.createThis()), !0) : !1; + } + function Ie(Q, et, Rt) { + jf(); + const jt = t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList([ + t.createVariableDeclaration( + q(), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Rt + ) + ]) + ); + on( + jt, + 2100224 + /* CustomPrologue */ + ), da(jt, et), pS(Q, jt); + } + function $e(Q, et) { + if (T & 32768) { + let Rt; + switch (et.kind) { + case 219: + return Q; + case 174: + case 177: + case 178: + Rt = t.createVoidZero(); + break; + case 176: + Rt = t.createPropertyAccessExpression( + on( + t.createThis(), + 8 + /* NoSubstitution */ + ), + "constructor" + ); + break; + case 262: + case 218: + Rt = t.createConditionalExpression( + t.createLogicalAnd( + on( + t.createThis(), + 8 + /* NoSubstitution */ + ), + t.createBinaryExpression( + on( + t.createThis(), + 8 + /* NoSubstitution */ + ), + 104, + t.getLocalName(et) + ) + ), + /*questionToken*/ + void 0, + t.createPropertyAccessExpression( + on( + t.createThis(), + 8 + /* NoSubstitution */ + ), + "constructor" + ), + /*colonToken*/ + void 0, + t.createVoidZero() + ); + break; + default: + return E.failBadSyntaxKind(et); + } + const jt = t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList([ + t.createVariableDeclaration( + t.createUniqueName( + "_newTarget", + 48 + /* FileLevel */ + ), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Rt + ) + ]) + ); + on( + jt, + 2100224 + /* CustomPrologue */ + ), pS(Q, jt); + } + return Q; + } + function Ke(Q, et) { + for (const Rt of et.members) + switch (Rt.kind) { + case 240: + Q.push(Je(Rt)); + break; + case 174: + Q.push(Ye(hf(et, Rt), Rt, et)); + break; + case 177: + case 178: + const jt = zb(et.members, Rt); + Rt === jt.firstAccessor && Q.push(_t(hf(et, Rt), jt, et)); + break; + case 176: + case 175: + break; + default: + E.failBadSyntaxKind(Rt, h && h.fileName); + break; + } + } + function Je(Q) { + return ot(t.createEmptyStatement(), Q); + } + function Ye(Q, et, Rt) { + const jt = fm(et), Er = F0(et), Hr = rn( + et, + /*location*/ + et, + /*name*/ + void 0, + Rt + ), xn = Xe(et.name, U, Fc); + E.assert(xn); + let ii; + if (!Ni(xn) && $3(e.getCompilerOptions())) { + const Ne = fa(xn) ? xn.expression : Me(xn) ? t.createStringLiteral(Pi(xn.escapedText)) : xn; + ii = t.createObjectDefinePropertyCall(Q, Ne, t.createPropertyDescriptor({ value: Hr, enumerable: !1, writable: !0, configurable: !0 })); + } else { + const Ne = BS( + t, + Q, + xn, + /*location*/ + et.name + ); + ii = t.createAssignment(Ne, Hr); + } + on( + Hr, + 3072 + /* NoComments */ + ), da(Hr, Er); + const j = ot( + t.createExpressionStatement(ii), + /*location*/ + et + ); + return Sn(j, et), Hc(j, jt), on( + j, + 96 + /* NoSourceMap */ + ), j; + } + function _t(Q, et, Rt) { + const jt = t.createExpressionStatement(yt( + Q, + et, + Rt, + /*startsOnNewLine*/ + !1 + )); + return on( + jt, + 3072 + /* NoComments */ + ), da(jt, F0(et.firstAccessor)), jt; + } + function yt(Q, { firstAccessor: et, getAccessor: Rt, setAccessor: jt }, Er, Hr) { + const xn = Fa(ot(t.cloneNode(Q), Q), Q.parent); + on( + xn, + 3136 + /* NoTrailingSourceMap */ + ), da(xn, et.name); + const ii = Xe(et.name, U, Fc); + if (E.assert(ii), Ni(ii)) + return E.failBadSyntaxKind(ii, "Encountered unhandled private identifier while transforming ES2015."); + const j = pz(t, ii); + on( + j, + 3104 + /* NoLeadingSourceMap */ + ), da(j, et.name); + const Ne = []; + if (Rt) { + const Ar = rn( + Rt, + /*location*/ + void 0, + /*name*/ + void 0, + Er + ); + da(Ar, F0(Rt)), on( + Ar, + 1024 + /* NoLeadingComments */ + ); + const ei = t.createPropertyAssignment("get", Ar); + Hc(ei, fm(Rt)), Ne.push(ei); + } + if (jt) { + const Ar = rn( + jt, + /*location*/ + void 0, + /*name*/ + void 0, + Er + ); + da(Ar, F0(jt)), on( + Ar, + 1024 + /* NoLeadingComments */ + ); + const ei = t.createPropertyAssignment("set", Ar); + Hc(ei, fm(jt)), Ne.push(ei); + } + Ne.push( + t.createPropertyAssignment("enumerable", Rt || jt ? t.createFalse() : t.createTrue()), + t.createPropertyAssignment("configurable", t.createTrue()) + ); + const Tt = t.createCallExpression( + t.createPropertyAccessExpression(t.createIdentifier("Object"), "defineProperty"), + /*typeArguments*/ + void 0, + [ + xn, + j, + t.createObjectLiteralExpression( + Ne, + /*multiLine*/ + !0 + ) + ] + ); + return Hr && xu(Tt), Tt; + } + function We(Q) { + Q.transformFlags & 16384 && !(T & 16384) && (T |= 131072); + const et = w; + w = void 0; + const Rt = F( + 15232, + 66 + /* ArrowFunctionIncludes */ + ), jt = t.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + ic(Q.parameters, U, e), + /*type*/ + void 0, + ye(Q) + ); + return ot(jt, Q), Sn(jt, Q), on( + jt, + 16 + /* CapturesThis */ + ), R( + Rt, + 0, + 0 + /* None */ + ), w = et, jt; + } + function Et(Q) { + const et = va(Q) & 524288 ? F( + 32662, + 69 + /* AsyncFunctionBodyIncludes */ + ) : F( + 32670, + 65 + /* FunctionIncludes */ + ), Rt = w; + w = void 0; + const jt = ic(Q.parameters, U, e), Er = ye(Q), Hr = T & 32768 ? t.getLocalName(Q) : Q.name; + return R( + et, + 229376, + 0 + /* None */ + ), w = Rt, t.updateFunctionExpression( + Q, + /*modifiers*/ + void 0, + Q.asteriskToken, + Hr, + /*typeParameters*/ + void 0, + jt, + /*type*/ + void 0, + Er + ); + } + function Xt(Q) { + const et = w; + w = void 0; + const Rt = F( + 32670, + 65 + /* FunctionIncludes */ + ), jt = ic(Q.parameters, U, e), Er = ye(Q), Hr = T & 32768 ? t.getLocalName(Q) : Q.name; + return R( + Rt, + 229376, + 0 + /* None */ + ), w = et, t.updateFunctionDeclaration( + Q, + Or(Q.modifiers, U, ia), + Q.asteriskToken, + Hr, + /*typeParameters*/ + void 0, + jt, + /*type*/ + void 0, + Er + ); + } + function rn(Q, et, Rt, jt) { + const Er = w; + w = void 0; + const Hr = jt && Zn(jt) && !Vs(Q) ? F( + 32670, + 73 + /* NonStaticClassElement */ + ) : F( + 32670, + 65 + /* FunctionIncludes */ + ), xn = ic(Q.parameters, U, e), ii = ye(Q); + return T & 32768 && !Rt && (Q.kind === 262 || Q.kind === 218) && (Rt = t.getGeneratedNameForNode(Q)), R( + Hr, + 229376, + 0 + /* None */ + ), w = Er, Sn( + ot( + t.createFunctionExpression( + /*modifiers*/ + void 0, + Q.asteriskToken, + Rt, + /*typeParameters*/ + void 0, + xn, + /*type*/ + void 0, + ii + ), + et + ), + /*original*/ + Q + ); + } + function ye(Q) { + let et = !1, Rt = !1, jt, Er; + const Hr = [], xn = [], ii = Q.body; + let j; + if (s(), ks(ii) && (j = t.copyStandardPrologue( + ii.statements, + Hr, + 0, + /*ensureUseStrict*/ + !1 + ), j = t.copyCustomPrologue(ii.statements, xn, j, U, O7), j = t.copyCustomPrologue(ii.statements, xn, j, U, L7)), et = gs(xn, Q) || et, et = Ve( + xn, + Q, + /*inConstructorWithSynthesizedSuper*/ + !1 + ) || et, ks(ii)) + j = t.copyCustomPrologue(ii.statements, xn, j, U), jt = ii.statements, Nn(xn, Or(ii.statements, U, xi, j)), !et && ii.multiLine && (et = !0); + else { + E.assert( + Q.kind === 219 + /* ArrowFunction */ + ), jt = S5(ii, -1); + const Tt = Q.equalsGreaterThanToken; + !no(Tt) && !no(ii) && (W3(Tt, ii, h) ? Rt = !0 : et = !0); + const Ar = Xe(ii, U, ct), ei = t.createReturnStatement(Ar); + ot(ei, ii), Yee(ei, ii), on( + ei, + 2880 + /* NoTrailingComments */ + ), xn.push(ei), Er = ii; + } + if (t.mergeLexicalEnvironment(Hr, o()), $e(Hr, Q), K(Hr, Q), at(Hr) && (et = !0), xn.unshift(...Hr), ks(ii) && Ef(xn, ii.statements)) + return ii; + const Ne = t.createBlock(ot(t.createNodeArray(xn), jt), et); + return ot(Ne, Q.body), !et && Rt && on( + Ne, + 1 + /* SingleLine */ + ), Er && Qee(Ne, 20, Er), Sn(Ne, Q.body), Ne; + } + function ft(Q, et) { + const Rt = T & 256 ? F( + 7104, + 512 + /* IterationStatementBlockIncludes */ + ) : F( + 6976, + 128 + /* BlockIncludes */ + ), jt = kr(Q, U, e); + return R( + Rt, + 0, + 0 + /* None */ + ), jt; + } + function fe(Q) { + return kr(Q, _e, e); + } + function L(Q, et) { + return kr(Q, et ? _e : U, e); + } + function ve(Q, et) { + return P0(Q) ? qS( + Q, + U, + e, + 0, + !et + ) : Q.operatorToken.kind === 28 ? t.updateBinaryExpression( + Q, + E.checkDefined(Xe(Q.left, _e, ct)), + Q.operatorToken, + E.checkDefined(Xe(Q.right, et ? _e : U, ct)) + ) : kr(Q, U, e); + } + function X(Q, et) { + if (et) + return kr(Q, _e, e); + let Rt; + for (let Er = 0; Er < Q.elements.length; Er++) { + const Hr = Q.elements[Er], xn = Xe(Hr, Er < Q.elements.length - 1 ? _e : U, ct); + (Rt || xn !== Hr) && (Rt || (Rt = Q.elements.slice(0, Er)), E.assert(xn), Rt.push(xn)); + } + const jt = Rt ? ot(t.createNodeArray(Rt), Q.elements) : Q.elements; + return t.updateCommaListExpression(Q, jt); + } + function lt(Q) { + return Q.declarationList.declarations.length === 1 && !!Q.declarationList.declarations[0].initializer && !!(td(Q.declarationList.declarations[0].initializer) & 1); + } + function zt(Q) { + const et = F( + 0, + $n( + Q, + 32 + /* Export */ + ) ? 32 : 0 + /* None */ + ); + let Rt; + if (w && !(Q.declarationList.flags & 7) && !lt(Q)) { + let jt; + for (const Er of Q.declarationList.declarations) + if (eu(w, Er), Er.initializer) { + let Hr; + Ds(Er.name) ? Hr = qS( + Er, + U, + e, + 0 + /* All */ + ) : (Hr = t.createBinaryExpression(Er.name, 64, E.checkDefined(Xe(Er.initializer, U, ct))), ot(Hr, Er)), jt = Pr(jt, Hr); + } + jt ? Rt = ot(t.createExpressionStatement(t.inlineExpressions(jt)), Q) : Rt = void 0; + } else + Rt = kr(Q, U, e); + return R( + et, + 0, + 0 + /* None */ + ), Rt; + } + function de(Q) { + if (Q.flags & 7 || Q.transformFlags & 524288) { + Q.flags & 7 && mf(); + const et = Or( + Q.declarations, + Q.flags & 1 ? Xr : Rr, + Kn + ), Rt = t.createVariableDeclarationList(et); + return Sn(Rt, Q), ot(Rt, Q), Hc(Rt, Q), Q.transformFlags & 524288 && (Ds(Q.declarations[0].name) || Ds(_a(Q.declarations).name)) && da(Rt, st(et)), Rt; + } + return kr(Q, U, e); + } + function st(Q) { + let et = -1, Rt = -1; + for (const jt of Q) + et = et === -1 ? jt.pos : jt.pos === -1 ? et : Math.min(et, jt.pos), Rt = Math.max(Rt, jt.end); + return np(et, Rt); + } + function Gt(Q) { + const et = u.hasNodeCheckFlag( + Q, + 16384 + /* CapturedBlockScopedBinding */ + ), Rt = u.hasNodeCheckFlag( + Q, + 32768 + /* BlockScopedBindingInLoop */ + ); + return !((T & 64) !== 0 || et && Rt && (T & 512) !== 0) && (T & 4096) === 0 && (!u.isDeclarationWithCollidingName(Q) || Rt && !et && (T & 6144) === 0); + } + function Xr(Q) { + const et = Q.name; + return Ds(et) ? Rr(Q) : !Q.initializer && Gt(Q) ? t.updateVariableDeclaration( + Q, + Q.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createVoidZero() + ) : kr(Q, U, e); + } + function Rr(Q) { + const et = F( + 32, + 0 + /* None */ + ); + let Rt; + return Ds(Q.name) ? Rt = a2( + Q, + U, + e, + 0, + /*rval*/ + void 0, + (et & 32) !== 0 + ) : Rt = kr(Q, U, e), R( + et, + 0, + 0 + /* None */ + ), Rt; + } + function Jr(Q) { + w.labels.set(An(Q.label), !0); + } + function tt(Q) { + w.labels.set(An(Q.label), !1); + } + function ut(Q) { + w && !w.labels && (w.labels = /* @__PURE__ */ new Map()); + const et = _B(Q, w && Jr); + return zy( + et, + /*lookInLabeledStatements*/ + !1 + ) ? Mt( + et, + /*outermostLabeledStatement*/ + Q + ) : t.restoreEnclosingLabel(Xe(et, U, xi, t.liftToBlock) ?? ot(t.createEmptyStatement(), et), Q, w && tt); + } + function Mt(Q, et) { + switch (Q.kind) { + case 246: + case 247: + return Zt(Q, et); + case 248: + return fr(Q, et); + case 249: + return ir(Q, et); + case 250: + return Tr(Q, et); + } + } + function Pt(Q, et, Rt, jt, Er) { + const Hr = F(Q, et), xn = hs(Rt, jt, Hr, Er); + return R( + Hr, + 0, + 0 + /* None */ + ), xn; + } + function Zt(Q, et) { + return Pt( + 0, + 1280, + Q, + et + ); + } + function fr(Q, et) { + return Pt( + 5056, + 3328, + Q, + et + ); + } + function Vt(Q) { + return t.updateForStatement( + Q, + Xe(Q.initializer, _e, Kf), + Xe(Q.condition, U, ct), + Xe(Q.incrementor, _e, ct), + E.checkDefined(Xe(Q.statement, U, xi, t.liftToBlock)) + ); + } + function ir(Q, et) { + return Pt( + 3008, + 5376, + Q, + et + ); + } + function Tr(Q, et) { + return Pt( + 3008, + 5376, + Q, + et, + _.downlevelIteration ? Js : mi + ); + } + function _r(Q, et, Rt) { + const jt = [], Er = Q.initializer; + if (Il(Er)) { + Q.initializer.flags & 7 && mf(); + const Hr = Uc(Er.declarations); + if (Hr && Ds(Hr.name)) { + const xn = a2( + Hr, + U, + e, + 0, + et + ), ii = ot(t.createVariableDeclarationList(xn), Q.initializer); + Sn(ii, Q.initializer), da(ii, np(xn[0].pos, _a(xn).end)), jt.push( + t.createVariableStatement( + /*modifiers*/ + void 0, + ii + ) + ); + } else + jt.push( + ot( + t.createVariableStatement( + /*modifiers*/ + void 0, + Sn( + ot( + t.createVariableDeclarationList([ + t.createVariableDeclaration( + Hr ? Hr.name : t.createTempVariable( + /*recordTempVariable*/ + void 0 + ), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + et + ) + ]), + ov(Er, -1) + ), + Er + ) + ), + S5(Er, -1) + ) + ); + } else { + const Hr = t.createAssignment(Er, et); + P0(Hr) ? jt.push(t.createExpressionStatement(ve( + Hr, + /*expressionResultIsUnused*/ + !0 + ))) : (XC(Hr, Er.end), jt.push(ot(t.createExpressionStatement(E.checkDefined(Xe(Hr, U, ct))), S5(Er, -1)))); + } + if (Rt) + return Ot(Nn(jt, Rt)); + { + const Hr = Xe(Q.statement, U, xi, t.liftToBlock); + return E.assert(Hr), ks(Hr) ? t.updateBlock(Hr, ot(t.createNodeArray(Wi(jt, Hr.statements)), Hr.statements)) : (jt.push(Hr), Ot(jt)); + } + } + function Ot(Q) { + return on( + t.createBlock( + t.createNodeArray(Q), + /*multiLine*/ + !0 + ), + 864 + /* NoTokenSourceMaps */ + ); + } + function mi(Q, et, Rt) { + const jt = Xe(Q.expression, U, ct); + E.assert(jt); + const Er = t.createLoopVariable(), Hr = Me(jt) ? t.getGeneratedNameForNode(jt) : t.createTempVariable( + /*recordTempVariable*/ + void 0 + ); + on(jt, 96 | va(jt)); + const xn = ot( + t.createForStatement( + /*initializer*/ + on( + ot( + t.createVariableDeclarationList([ + ot(t.createVariableDeclaration( + Er, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createNumericLiteral(0) + ), ov(Q.expression, -1)), + ot(t.createVariableDeclaration( + Hr, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + jt + ), Q.expression) + ]), + Q.expression + ), + 4194304 + /* NoHoisting */ + ), + /*condition*/ + ot( + t.createLessThan( + Er, + t.createPropertyAccessExpression(Hr, "length") + ), + Q.expression + ), + /*incrementor*/ + ot(t.createPostfixIncrement(Er), Q.expression), + /*statement*/ + _r( + Q, + t.createElementAccessExpression(Hr, Er), + Rt + ) + ), + /*location*/ + Q + ); + return on( + xn, + 512 + /* NoTokenTrailingSourceMaps */ + ), ot(xn, Q), t.restoreEnclosingLabel(xn, et, w && tt); + } + function Js(Q, et, Rt, jt) { + const Er = Xe(Q.expression, U, ct); + E.assert(Er); + const Hr = Me(Er) ? t.getGeneratedNameForNode(Er) : t.createTempVariable( + /*recordTempVariable*/ + void 0 + ), xn = Me(Er) ? t.getGeneratedNameForNode(Hr) : t.createTempVariable( + /*recordTempVariable*/ + void 0 + ), ii = t.createUniqueName("e"), j = t.getGeneratedNameForNode(ii), Ne = t.createTempVariable( + /*recordTempVariable*/ + void 0 + ), Tt = ot(n().createValuesHelper(Er), Q.expression), Ar = t.createCallExpression( + t.createPropertyAccessExpression(Hr, "next"), + /*typeArguments*/ + void 0, + [] + ); + c(ii), c(Ne); + const ei = jt & 1024 ? t.inlineExpressions([t.createAssignment(ii, t.createVoidZero()), Tt]) : Tt, Ss = on( + ot( + t.createForStatement( + /*initializer*/ + on( + ot( + t.createVariableDeclarationList([ + ot(t.createVariableDeclaration( + Hr, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + ei + ), Q.expression), + t.createVariableDeclaration( + xn, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Ar + ) + ]), + Q.expression + ), + 4194304 + /* NoHoisting */ + ), + /*condition*/ + t.createLogicalNot(t.createPropertyAccessExpression(xn, "done")), + /*incrementor*/ + t.createAssignment(xn, Ar), + /*statement*/ + _r( + Q, + t.createPropertyAccessExpression(xn, "value"), + Rt + ) + ), + /*location*/ + Q + ), + 512 + /* NoTokenTrailingSourceMaps */ + ); + return t.createTryStatement( + t.createBlock([ + t.restoreEnclosingLabel( + Ss, + et, + w && tt + ) + ]), + t.createCatchClause( + t.createVariableDeclaration(j), + on( + t.createBlock([ + t.createExpressionStatement( + t.createAssignment( + ii, + t.createObjectLiteralExpression([ + t.createPropertyAssignment("error", j) + ]) + ) + ) + ]), + 1 + /* SingleLine */ + ) + ), + t.createBlock([ + t.createTryStatement( + /*tryBlock*/ + t.createBlock([ + on( + t.createIfStatement( + t.createLogicalAnd( + t.createLogicalAnd( + xn, + t.createLogicalNot( + t.createPropertyAccessExpression(xn, "done") + ) + ), + t.createAssignment( + Ne, + t.createPropertyAccessExpression(Hr, "return") + ) + ), + t.createExpressionStatement( + t.createFunctionCallCall(Ne, Hr, []) + ) + ), + 1 + /* SingleLine */ + ) + ]), + /*catchClause*/ + void 0, + /*finallyBlock*/ + on( + t.createBlock([ + on( + t.createIfStatement( + ii, + t.createThrowStatement( + t.createPropertyAccessExpression(ii, "error") + ) + ), + 1 + /* SingleLine */ + ) + ]), + 1 + /* SingleLine */ + ) + ) + ]) + ); + } + function Ms(Q) { + const et = Q.properties; + let Rt = -1, jt = !1; + for (let ii = 0; ii < et.length; ii++) { + const j = et[ii]; + if (j.transformFlags & 1048576 && T & 4 || (jt = E.checkDefined(j.name).kind === 167)) { + Rt = ii; + break; + } + } + if (Rt < 0) + return kr(Q, U, e); + const Er = t.createTempVariable(c), Hr = [], xn = t.createAssignment( + Er, + on( + t.createObjectLiteralExpression( + Or(et, U, Eh, 0, Rt), + Q.multiLine + ), + jt ? 131072 : 0 + ) + ); + return Q.multiLine && xu(xn), Hr.push(xn), Yr(Hr, Q, Er, Rt), Hr.push(Q.multiLine ? xu(Fa(ot(t.cloneNode(Er), Er), Er.parent)) : Er), t.inlineExpressions(Hr); + } + function Ns(Q) { + return u.hasNodeCheckFlag( + Q, + 8192 + /* ContainsCapturedBlockScopeBinding */ + ); + } + function kc(Q) { + return mv(Q) && !!Q.initializer && Ns(Q.initializer); + } + function Wo(Q) { + return mv(Q) && !!Q.condition && Ns(Q.condition); + } + function sc(Q) { + return mv(Q) && !!Q.incrementor && Ns(Q.incrementor); + } + function ri(Q) { + return zs(Q) || kc(Q); + } + function zs(Q) { + return u.hasNodeCheckFlag( + Q, + 4096 + /* LoopWithCapturedBlockScopedBinding */ + ); + } + function eu(Q, et) { + Q.hoistedLocalVariables || (Q.hoistedLocalVariables = []), Rt(et.name); + function Rt(jt) { + if (jt.kind === 80) + Q.hoistedLocalVariables.push(jt); + else + for (const Er of jt.elements) + ul(Er) || Rt(Er.name); + } + } + function hs(Q, et, Rt, jt) { + if (!ri(Q)) { + let Tt; + w && (Tt = w.allowedNonLabeledJumps, w.allowedNonLabeledJumps = 6); + const Ar = jt ? jt( + Q, + et, + /*convertedLoopBodyStatements*/ + void 0, + Rt + ) : t.restoreEnclosingLabel( + mv(Q) ? Vt(Q) : kr(Q, U, e), + et, + w && tt + ); + return w && (w.allowedNonLabeledJumps = Tt), Ar; + } + const Er = Oi(Q), Hr = [], xn = w; + w = Er; + const ii = kc(Q) ? Mc(Q, Er) : void 0, j = zs(Q) ? Ol(Q, Er, xn) : void 0; + w = xn, ii && Hr.push(ii.functionDeclaration), j && Hr.push(j.functionDeclaration), qt(Hr, Er, xn), ii && Hr.push(ge(ii.functionName, ii.containsYield)); + let Ne; + if (j) + if (jt) + Ne = jt(Q, et, j.part, Rt); + else { + const Tt = Bu(Q, ii, t.createBlock( + j.part, + /*multiLine*/ + !0 + )); + Ne = t.restoreEnclosingLabel(Tt, et, w && tt); + } + else { + const Tt = Bu(Q, ii, E.checkDefined(Xe(Q.statement, U, xi, t.liftToBlock))); + Ne = t.restoreEnclosingLabel(Tt, et, w && tt); + } + return Hr.push(Ne), Hr; + } + function Bu(Q, et, Rt) { + switch (Q.kind) { + case 248: + return Yc(Q, et, Rt); + case 249: + return Zi(Q, Rt); + case 250: + return Sl(Q, Rt); + case 246: + return Gs(Q, Rt); + case 247: + return Ca(Q, Rt); + default: + return E.failBadSyntaxKind(Q, "IterationStatement expected"); + } + } + function Yc(Q, et, Rt) { + const jt = Q.condition && Ns(Q.condition), Er = jt || Q.incrementor && Ns(Q.incrementor); + return t.updateForStatement( + Q, + Xe(et ? et.part : Q.initializer, _e, Kf), + Xe(jt ? void 0 : Q.condition, U, ct), + Xe(Er ? void 0 : Q.incrementor, _e, ct), + Rt + ); + } + function Sl(Q, et) { + return t.updateForOfStatement( + Q, + /*awaitModifier*/ + void 0, + E.checkDefined(Xe(Q.initializer, U, Kf)), + E.checkDefined(Xe(Q.expression, U, ct)), + et + ); + } + function Zi(Q, et) { + return t.updateForInStatement( + Q, + E.checkDefined(Xe(Q.initializer, U, Kf)), + E.checkDefined(Xe(Q.expression, U, ct)), + et + ); + } + function Gs(Q, et) { + return t.updateDoStatement( + Q, + et, + E.checkDefined(Xe(Q.expression, U, ct)) + ); + } + function Ca(Q, et) { + return t.updateWhileStatement( + Q, + E.checkDefined(Xe(Q.expression, U, ct)), + et + ); + } + function Oi(Q) { + let et; + switch (Q.kind) { + case 248: + case 249: + case 250: + const Hr = Q.initializer; + Hr && Hr.kind === 261 && (et = Hr); + break; + } + const Rt = [], jt = []; + if (et && Ch(et) & 7) { + const Hr = kc(Q) || Wo(Q) || sc(Q); + for (const xn of et.declarations) + Kt(Q, xn, Rt, jt, Hr); + } + const Er = { loopParameters: Rt, loopOutParameters: jt }; + return w && (w.argumentsName && (Er.argumentsName = w.argumentsName), w.thisName && (Er.thisName = w.thisName), w.hoistedLocalVariables && (Er.hoistedLocalVariables = w.hoistedLocalVariables)), Er; + } + function qt(Q, et, Rt) { + let jt; + if (et.argumentsName && (Rt ? Rt.argumentsName = et.argumentsName : (jt || (jt = [])).push( + t.createVariableDeclaration( + et.argumentsName, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createIdentifier("arguments") + ) + )), et.thisName && (Rt ? Rt.thisName = et.thisName : (jt || (jt = [])).push( + t.createVariableDeclaration( + et.thisName, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createIdentifier("this") + ) + )), et.hoistedLocalVariables) + if (Rt) + Rt.hoistedLocalVariables = et.hoistedLocalVariables; + else { + jt || (jt = []); + for (const Er of et.hoistedLocalVariables) + jt.push(t.createVariableDeclaration(Er)); + } + if (et.loopOutParameters.length) { + jt || (jt = []); + for (const Er of et.loopOutParameters) + jt.push(t.createVariableDeclaration(Er.outParamName)); + } + et.conditionVariable && (jt || (jt = []), jt.push(t.createVariableDeclaration( + et.conditionVariable, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createFalse() + ))), jt && Q.push(t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList(jt) + )); + } + function Qa(Q) { + return t.createVariableDeclaration( + Q.originalName, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Q.outParamName + ); + } + function Mc(Q, et) { + const Rt = t.createUniqueName("_loop_init"), jt = (Q.initializer.transformFlags & 1048576) !== 0; + let Er = 0; + et.containsLexicalThis && (Er |= 16), jt && T & 4 && (Er |= 524288); + const Hr = []; + Hr.push(t.createVariableStatement( + /*modifiers*/ + void 0, + Q.initializer + )), To(et.loopOutParameters, 2, 1, Hr); + const xn = t.createVariableStatement( + /*modifiers*/ + void 0, + on( + t.createVariableDeclarationList([ + t.createVariableDeclaration( + Rt, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + on( + t.createFunctionExpression( + /*modifiers*/ + void 0, + jt ? t.createToken( + 42 + /* AsteriskToken */ + ) : void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + /*parameters*/ + void 0, + /*type*/ + void 0, + E.checkDefined(Xe( + t.createBlock( + Hr, + /*multiLine*/ + !0 + ), + U, + ks + )) + ), + Er + ) + ) + ]), + 4194304 + /* NoHoisting */ + ) + ), ii = t.createVariableDeclarationList(gr(et.loopOutParameters, Qa)); + return { functionName: Rt, containsYield: jt, functionDeclaration: xn, part: ii }; + } + function Ol(Q, et, Rt) { + const jt = t.createUniqueName("_loop"); + i(); + const Er = Xe(Q.statement, U, xi, t.liftToBlock), Hr = o(), xn = []; + (Wo(Q) || sc(Q)) && (et.conditionVariable = t.createUniqueName("inc"), Q.incrementor ? xn.push(t.createIfStatement( + et.conditionVariable, + t.createExpressionStatement(E.checkDefined(Xe(Q.incrementor, U, ct))), + t.createExpressionStatement(t.createAssignment(et.conditionVariable, t.createTrue())) + )) : xn.push(t.createIfStatement( + t.createLogicalNot(et.conditionVariable), + t.createExpressionStatement(t.createAssignment(et.conditionVariable, t.createTrue())) + )), Wo(Q) && xn.push(t.createIfStatement( + t.createPrefixUnaryExpression(54, E.checkDefined(Xe(Q.condition, U, ct))), + E.checkDefined(Xe(t.createBreakStatement(), U, xi)) + ))), E.assert(Er), ks(Er) ? Nn(xn, Er.statements) : xn.push(Er), To(et.loopOutParameters, 1, 1, xn), Bg(xn, Hr); + const ii = t.createBlock( + xn, + /*multiLine*/ + !0 + ); + ks(Er) && Sn(ii, Er); + const j = (Q.statement.transformFlags & 1048576) !== 0; + let Ne = 1048576; + et.containsLexicalThis && (Ne |= 16), j && T & 4 && (Ne |= 524288); + const Tt = t.createVariableStatement( + /*modifiers*/ + void 0, + on( + t.createVariableDeclarationList( + [ + t.createVariableDeclaration( + jt, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + on( + t.createFunctionExpression( + /*modifiers*/ + void 0, + j ? t.createToken( + 42 + /* AsteriskToken */ + ) : void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + et.loopParameters, + /*type*/ + void 0, + ii + ), + Ne + ) + ) + ] + ), + 4194304 + /* NoHoisting */ + ) + ), Ar = G(jt, et, Rt, j); + return { functionName: jt, containsYield: j, functionDeclaration: Tt, part: Ar }; + } + function Ll(Q, et) { + const Rt = et === 0 ? Q.outParamName : Q.originalName, jt = et === 0 ? Q.originalName : Q.outParamName; + return t.createBinaryExpression(jt, 64, Rt); + } + function To(Q, et, Rt, jt) { + for (const Er of Q) + Er.flags & et && jt.push(t.createExpressionStatement(Ll(Er, Rt))); + } + function ge(Q, et) { + const Rt = t.createCallExpression( + Q, + /*typeArguments*/ + void 0, + [] + ), jt = et ? t.createYieldExpression( + t.createToken( + 42 + /* AsteriskToken */ + ), + on( + Rt, + 8388608 + /* Iterator */ + ) + ) : Rt; + return t.createExpressionStatement(jt); + } + function G(Q, et, Rt, jt) { + const Er = [], Hr = !(et.nonLocalJumps & -5) && !et.labeledNonLocalBreaks && !et.labeledNonLocalContinues, xn = t.createCallExpression( + Q, + /*typeArguments*/ + void 0, + gr(et.loopParameters, (j) => j.name) + ), ii = jt ? t.createYieldExpression( + t.createToken( + 42 + /* AsteriskToken */ + ), + on( + xn, + 8388608 + /* Iterator */ + ) + ) : xn; + if (Hr) + Er.push(t.createExpressionStatement(ii)), To(et.loopOutParameters, 1, 0, Er); + else { + const j = t.createUniqueName("state"), Ne = t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList( + [t.createVariableDeclaration( + j, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + ii + )] + ) + ); + if (Er.push(Ne), To(et.loopOutParameters, 1, 0, Er), et.nonLocalJumps & 8) { + let Tt; + Rt ? (Rt.nonLocalJumps |= 8, Tt = t.createReturnStatement(j)) : Tt = t.createReturnStatement(t.createPropertyAccessExpression(j, "value")), Er.push( + t.createIfStatement( + t.createTypeCheck(j, "object"), + Tt + ) + ); + } + if (et.nonLocalJumps & 2 && Er.push( + t.createIfStatement( + t.createStrictEquality( + j, + t.createStringLiteral("break") + ), + t.createBreakStatement() + ) + ), et.labeledNonLocalBreaks || et.labeledNonLocalContinues) { + const Tt = []; + wt( + et.labeledNonLocalBreaks, + /*isBreak*/ + !0, + j, + Rt, + Tt + ), wt( + et.labeledNonLocalContinues, + /*isBreak*/ + !1, + j, + Rt, + Tt + ), Er.push( + t.createSwitchStatement( + j, + t.createCaseBlock(Tt) + ) + ); + } + } + return Er; + } + function rt(Q, et, Rt, jt) { + et ? (Q.labeledNonLocalBreaks || (Q.labeledNonLocalBreaks = /* @__PURE__ */ new Map()), Q.labeledNonLocalBreaks.set(Rt, jt)) : (Q.labeledNonLocalContinues || (Q.labeledNonLocalContinues = /* @__PURE__ */ new Map()), Q.labeledNonLocalContinues.set(Rt, jt)); + } + function wt(Q, et, Rt, jt, Er) { + Q && Q.forEach((Hr, xn) => { + const ii = []; + if (!jt || jt.labels && jt.labels.get(xn)) { + const j = t.createIdentifier(xn); + ii.push(et ? t.createBreakStatement(j) : t.createContinueStatement(j)); + } else + rt(jt, et, xn, Hr), ii.push(t.createReturnStatement(Rt)); + Er.push(t.createCaseClause(t.createStringLiteral(Hr), ii)); + }); + } + function Kt(Q, et, Rt, jt, Er) { + const Hr = et.name; + if (Ds(Hr)) + for (const xn of Hr.elements) + ul(xn) || Kt(Q, xn, Rt, jt, Er); + else { + Rt.push(t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + Hr + )); + const xn = u.hasNodeCheckFlag( + et, + 65536 + /* NeedsLoopOutParameter */ + ); + if (xn || Er) { + const ii = t.createUniqueName("out_" + An(Hr)); + let j = 0; + xn && (j |= 1), mv(Q) && (Q.initializer && u.isBindingCapturedByNode(Q.initializer, et) && (j |= 2), (Q.condition && u.isBindingCapturedByNode(Q.condition, et) || Q.incrementor && u.isBindingCapturedByNode(Q.incrementor, et)) && (j |= 1)), jt.push({ flags: j, originalName: Hr, outParamName: ii }); + } + } + } + function Yr(Q, et, Rt, jt) { + const Er = et.properties, Hr = Er.length; + for (let xn = jt; xn < Hr; xn++) { + const ii = Er[xn]; + switch (ii.kind) { + case 177: + case 178: + const j = zb(et.properties, ii); + ii === j.firstAccessor && Q.push(yt(Rt, j, et, !!et.multiLine)); + break; + case 174: + Q.push(En(ii, Rt, et, et.multiLine)); + break; + case 303: + Q.push(Mn(ii, Rt, et.multiLine)); + break; + case 304: + Q.push(pr(ii, Rt, et.multiLine)); + break; + default: + E.failBadSyntaxKind(et); + break; + } + } + } + function Mn(Q, et, Rt) { + const jt = t.createAssignment( + BS( + t, + et, + E.checkDefined(Xe(Q.name, U, Fc)) + ), + E.checkDefined(Xe(Q.initializer, U, ct)) + ); + return ot(jt, Q), Rt && xu(jt), jt; + } + function pr(Q, et, Rt) { + const jt = t.createAssignment( + BS( + t, + et, + E.checkDefined(Xe(Q.name, U, Fc)) + ), + t.cloneNode(Q.name) + ); + return ot(jt, Q), Rt && xu(jt), jt; + } + function En(Q, et, Rt, jt) { + const Er = t.createAssignment( + BS( + t, + et, + E.checkDefined(Xe(Q.name, U, Fc)) + ), + rn( + Q, + /*location*/ + Q, + /*name*/ + void 0, + Rt + ) + ); + return ot(Er, Q), jt && xu(Er), Er; + } + function Ji(Q) { + const et = F( + 7104, + 0 + /* BlockScopeIncludes */ + ); + let Rt; + if (E.assert(!!Q.variableDeclaration, "Catch clause variable should always be present when downleveling ES2015."), Ds(Q.variableDeclaration.name)) { + const jt = t.createTempVariable( + /*recordTempVariable*/ + void 0 + ), Er = t.createVariableDeclaration(jt); + ot(Er, Q.variableDeclaration); + const Hr = a2( + Q.variableDeclaration, + U, + e, + 0, + jt + ), xn = t.createVariableDeclarationList(Hr); + ot(xn, Q.variableDeclaration); + const ii = t.createVariableStatement( + /*modifiers*/ + void 0, + xn + ); + Rt = t.updateCatchClause(Q, Er, hi(Q.block, ii)); + } else + Rt = kr(Q, U, e); + return R( + et, + 0, + 0 + /* None */ + ), Rt; + } + function hi(Q, et) { + const Rt = Or(Q.statements, U, xi); + return t.updateBlock(Q, [et, ...Rt]); + } + function ba(Q) { + E.assert(!fa(Q.name)); + const et = rn( + Q, + /*location*/ + ov(Q, -1), + /*name*/ + void 0, + /*container*/ + void 0 + ); + return on(et, 1024 | va(et)), ot( + t.createPropertyAssignment( + Q.name, + et + ), + /*location*/ + Q + ); + } + function Mo(Q) { + E.assert(!fa(Q.name)); + const et = w; + w = void 0; + const Rt = F( + 32670, + 65 + /* FunctionIncludes */ + ); + let jt; + const Er = ic(Q.parameters, U, e), Hr = ye(Q); + return Q.kind === 177 ? jt = t.updateGetAccessorDeclaration(Q, Q.modifiers, Q.name, Er, Q.type, Hr) : jt = t.updateSetAccessorDeclaration(Q, Q.modifiers, Q.name, Er, Hr), R( + Rt, + 229376, + 0 + /* None */ + ), w = et, jt; + } + function dc(Q) { + return ot( + t.createPropertyAssignment( + Q.name, + oe(t.cloneNode(Q.name)) + ), + /*location*/ + Q + ); + } + function mc(Q) { + return kr(Q, U, e); + } + function Rc(Q) { + return kr(Q, U, e); + } + function Uo(Q) { + return at(Q.elements, lp) ? Rl( + Q.elements, + /*isArgumentList*/ + !1, + !!Q.multiLine, + /*hasTrailingComma*/ + !!Q.elements.hasTrailingComma + ) : kr(Q, U, e); + } + function ac(Q) { + if (td(Q) & 1) + return Vp(Q); + const et = xc(Q.expression); + return et.kind === 108 || D_(et) || at(Q.arguments, lp) ? dl( + Q + ) : t.updateCallExpression( + Q, + E.checkDefined(Xe(Q.expression, J, ct)), + /*typeArguments*/ + void 0, + Or(Q.arguments, U, ct) + ); + } + function Vp(Q) { + const et = Ws(Ws(xc(Q.expression), bo).body, ks), Rt = (Ro) => pc(Ro) && !!ya(Ro.declarationList.declarations).initializer, jt = w; + w = void 0; + const Er = Or(et.statements, Z, xi); + w = jt; + const Hr = kn(Er, Rt), xn = kn(Er, (Ro) => !Rt(Ro)), j = Ws(ya(Hr), pc).declarationList.declarations[0], Ne = xc(j.initializer); + let Tt = jn(Ne, Cl); + !Tt && fn(Ne) && Ne.operatorToken.kind === 28 && (Tt = jn(Ne.left, Cl)); + const Ar = Ws(Tt ? xc(Tt.right) : Ne, Fs), ei = Ws(xc(Ar.expression), po), Ss = ei.body.statements; + let _s = 0, ps = -1; + const ja = []; + if (Tt) { + const Ro = jn(Ss[_s], El); + Ro && (ja.push(Ro), _s++), ja.push(Ss[_s]), _s++, ja.push( + t.createExpressionStatement( + t.createAssignment( + Tt.left, + Ws(j.name, Me) + ) + ) + ); + } + for (; !Rp(ky(Ss, ps)); ) + ps--; + Nn(ja, Ss, _s, ps), ps < -1 && Nn(ja, Ss, ps + 1); + const xa = jn(ky(Ss, ps), Rp); + for (const Ro of xn) + Rp(Ro) && xa?.expression && !Me(xa.expression) ? ja.push(xa) : ja.push(Ro); + return Nn( + ja, + Hr, + /*start*/ + 1 + ), t.restoreOuterExpressions( + Q.expression, + t.restoreOuterExpressions( + j.initializer, + t.restoreOuterExpressions( + Tt && Tt.right, + t.updateCallExpression( + Ar, + t.restoreOuterExpressions( + Ar.expression, + t.updateFunctionExpression( + ei, + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + ei.parameters, + /*type*/ + void 0, + t.updateBlock( + ei.body, + ja + ) + ) + ), + /*typeArguments*/ + void 0, + Ar.arguments + ) + ) + ) + ); + } + function dl(Q, et) { + if (Q.transformFlags & 32768 || Q.expression.kind === 108 || D_(xc(Q.expression))) { + const { target: Rt, thisArg: jt } = t.createCallBinding(Q.expression, c); + Q.expression.kind === 108 && on( + jt, + 8 + /* NoSubstitution */ + ); + let Er; + if (Q.transformFlags & 32768 ? Er = t.createFunctionApplyCall( + E.checkDefined(Xe(Rt, J, ct)), + Q.expression.kind === 108 ? jt : E.checkDefined(Xe(jt, U, ct)), + Rl( + Q.arguments, + /*isArgumentList*/ + !0, + /*multiLine*/ + !1, + /*hasTrailingComma*/ + !1 + ) + ) : Er = ot( + t.createFunctionCallCall( + E.checkDefined(Xe(Rt, J, ct)), + Q.expression.kind === 108 ? jt : E.checkDefined(Xe(jt, U, ct)), + Or(Q.arguments, U, ct) + ), + Q + ), Q.expression.kind === 108) { + const Hr = t.createLogicalOr( + Er, + ki() + ); + Er = t.createAssignment(q(), Hr); + } + return Sn(Er, Q); + } + return mS(Q) && (T |= 131072), kr(Q, U, e); + } + function Ml(Q) { + if (at(Q.arguments, lp)) { + const { target: et, thisArg: Rt } = t.createCallBinding(t.createPropertyAccessExpression(Q.expression, "bind"), c); + return t.createNewExpression( + t.createFunctionApplyCall( + E.checkDefined(Xe(et, U, ct)), + Rt, + Rl( + t.createNodeArray([t.createVoidZero(), ...Q.arguments]), + /*isArgumentList*/ + !0, + /*multiLine*/ + !1, + /*hasTrailingComma*/ + !1 + ) + ), + /*typeArguments*/ + void 0, + [] + ); + } + return kr(Q, U, e); + } + function Rl(Q, et, Rt, jt) { + const Er = Q.length, Hr = Dp( + // As we visit each element, we return one of two functions to use as the "key": + // - `visitSpanOfSpreads` for one or more contiguous `...` spread expressions, i.e. `...a, ...b` in `[1, 2, ...a, ...b]` + // - `visitSpanOfNonSpreads` for one or more contiguous non-spread elements, i.e. `1, 2`, in `[1, 2, ...a, ...b]` + hR(Q, Fe, (Ne, Tt, Ar, ei) => Tt(Ne, Rt, jt && ei === Er)) + ); + if (Hr.length === 1) { + const Ne = Hr[0]; + if (et && !_.downlevelIteration || NJ(Ne.expression) || mD(Ne.expression, "___spreadArray")) + return Ne.expression; + } + const xn = n(), ii = Hr[0].kind !== 0; + let j = ii ? t.createArrayLiteralExpression() : Hr[0].expression; + for (let Ne = ii ? 0 : 1; Ne < Hr.length; Ne++) { + const Tt = Hr[Ne]; + j = xn.createSpreadArrayHelper( + j, + Tt.expression, + Tt.kind === 1 && !et + ); + } + return j; + } + function Fe(Q) { + return lp(Q) ? Ft : Ti; + } + function Ft(Q) { + return gr(Q, Br); + } + function Br(Q) { + E.assertNode(Q, lp); + let et = Xe(Q.expression, U, ct); + E.assert(et); + const Rt = mD(et, "___read"); + let jt = Rt || NJ(et) ? 2 : 1; + return _.downlevelIteration && jt === 1 && !Ql(et) && !Rt && (et = n().createReadHelper( + et, + /*count*/ + void 0 + ), jt = 2), M1e(jt, et); + } + function Ti(Q, et, Rt) { + const jt = t.createArrayLiteralExpression( + Or(t.createNodeArray(Q, Rt), U, ct), + et + ); + return M1e(0, jt); + } + function Sa(Q) { + return Xe(Q.expression, U, ct); + } + function to(Q) { + return ot(t.createStringLiteral(Q.text), Q); + } + function Do(Q) { + return Q.hasExtendedUnicodeEscape ? ot(t.createStringLiteral(Q.text), Q) : Q; + } + function ml(Q) { + return Q.numericLiteralFlags & 384 ? ot(t.createNumericLiteral(Q.text), Q) : Q; + } + function gc(Q) { + return PW( + e, + Q, + U, + h, + D, + 1 + /* All */ + ); + } + function Va(Q) { + let et = t.createStringLiteral(Q.head.text); + for (const Rt of Q.templateSpans) { + const jt = [E.checkDefined(Xe(Rt.expression, U, ct))]; + Rt.literal.text.length > 0 && jt.push(t.createStringLiteral(Rt.literal.text)), et = t.createCallExpression( + t.createPropertyAccessExpression(et, "concat"), + /*typeArguments*/ + void 0, + jt + ); + } + return ot(et, Q); + } + function mo() { + return t.createUniqueName( + "_super", + 48 + /* FileLevel */ + ); + } + function df(Q, et) { + const Rt = T & 8 && !et ? t.createPropertyAccessExpression(Sn(mo(), Q), "prototype") : mo(); + return Sn(Rt, Q), Hc(Rt, Q), da(Rt, Q), Rt; + } + function Rf(Q) { + return Q.keywordToken === 105 && Q.name.escapedText === "target" ? (T |= 32768, t.createUniqueName( + "_newTarget", + 48 + /* FileLevel */ + )) : Q; + } + function F_(Q, et, Rt) { + if (A & 1 && vs(et)) { + const jt = F( + 32670, + va(et) & 16 ? 81 : 65 + /* FunctionIncludes */ + ); + g(Q, et, Rt), R( + jt, + 0, + 0 + /* None */ + ); + return; + } + g(Q, et, Rt); + } + function mf() { + A & 2 || (A |= 2, e.enableSubstitution( + 80 + /* Identifier */ + )); + } + function jf() { + A & 1 || (A |= 1, e.enableSubstitution( + 110 + /* ThisKeyword */ + ), e.enableEmitNotification( + 176 + /* Constructor */ + ), e.enableEmitNotification( + 174 + /* MethodDeclaration */ + ), e.enableEmitNotification( + 177 + /* GetAccessor */ + ), e.enableEmitNotification( + 178 + /* SetAccessor */ + ), e.enableEmitNotification( + 219 + /* ArrowFunction */ + ), e.enableEmitNotification( + 218 + /* FunctionExpression */ + ), e.enableEmitNotification( + 262 + /* FunctionDeclaration */ + )); + } + function fp(Q, et) { + return et = m(Q, et), Q === 1 ? t_(et) : Me(et) ? th(et) : et; + } + function th(Q) { + if (A & 2 && !dz(Q)) { + const et = ls(Q, Me); + if (et && od(et)) + return ot(t.getGeneratedNameForNode(et), Q); + } + return Q; + } + function od(Q) { + switch (Q.parent.kind) { + case 208: + case 263: + case 266: + case 260: + return Q.parent.name === Q && u.isDeclarationWithCollidingName(Q.parent); + } + return !1; + } + function t_(Q) { + switch (Q.kind) { + case 80: + return gf(Q); + case 110: + return cd(Q); + } + return Q; + } + function gf(Q) { + if (A & 2 && !dz(Q)) { + const et = u.getReferencedDeclarationWithCollidingName(Q); + if (et && !(Zn(et) && y_(et, Q))) + return ot(t.getGeneratedNameForNode(is(et)), Q); + } + return Q; + } + function y_(Q, et) { + let Rt = ls(et); + if (!Rt || Rt === Q || Rt.end <= Q.pos || Rt.pos >= Q.end) + return !1; + const jt = Sd(Q); + for (; Rt; ) { + if (Rt === jt || Rt === Q) + return !1; + if (sl(Rt) && Rt.parent === Q) + return !0; + Rt = Rt.parent; + } + return !1; + } + function cd(Q) { + return A & 1 && T & 16 ? ot(q(), Q) : Q; + } + function hf(Q, et) { + return Vs(et) ? t.getInternalName(Q) : t.createPropertyAccessExpression(t.getInternalName(Q), "prototype"); + } + function ug(Q, et) { + if (!Q || !et || at(Q.parameters)) + return !1; + const Rt = Uc(Q.body.statements); + if (!Rt || !no(Rt) || Rt.kind !== 244) + return !1; + const jt = Rt.expression; + if (!no(jt) || jt.kind !== 213) + return !1; + const Er = jt.expression; + if (!no(Er) || Er.kind !== 108) + return !1; + const Hr = Hm(jt.arguments); + if (!Hr || !no(Hr) || Hr.kind !== 230) + return !1; + const xn = Hr.expression; + return Me(xn) && xn.escapedText === "arguments"; + } + } + function eje(e) { + switch (e) { + case 2: + return "return"; + case 3: + return "break"; + case 4: + return "yield"; + case 5: + return "yield*"; + case 7: + return "endfinally"; + default: + return; + } + } + function Hne(e) { + const { + factory: t, + getEmitHelperFactory: n, + resumeLexicalEnvironment: i, + endLexicalEnvironment: s, + hoistFunctionDeclaration: o, + hoistVariableDeclaration: c + } = e, _ = e.getCompilerOptions(), u = pa(_), m = e.getEmitResolver(), g = e.onSubstituteNode; + e.onSubstituteNode = fe; + let h, S, T, C, D, w, A, O, F, R, W = 1, V, $, U, _e, Z = 0, J = 0, re, te, ie, le, Te, q, me, Ce; + return Ad(e, Ee); + function Ee(Fe) { + if (Fe.isDeclarationFile || !(Fe.transformFlags & 2048)) + return Fe; + const Ft = kr(Fe, oe, e); + return Qg(Ft, e.readEmitHelpers()), Ft; + } + function oe(Fe) { + const Ft = Fe.transformFlags; + return C ? ke(Fe) : T ? ue(Fe) : Ka(Fe) && Fe.asteriskToken ? Oe(Fe) : Ft & 2048 ? kr(Fe, oe, e) : Fe; + } + function ke(Fe) { + switch (Fe.kind) { + case 246: + return Cs(Fe); + case 247: + return xr(Fe); + case 255: + return yt(Fe); + case 256: + return Et(Fe); + default: + return ue(Fe); + } + } + function ue(Fe) { + switch (Fe.kind) { + case 262: + return xe(Fe); + case 218: + return he(Fe); + case 177: + case 178: + return ne(Fe); + case 243: + return De(Fe); + case 248: + return Qe(Fe); + case 249: + return ee(Fe); + case 252: + return $e(Fe); + case 251: + return K(Fe); + case 253: + return Je(Fe); + default: + return Fe.transformFlags & 1048576 ? it(Fe) : Fe.transformFlags & 4196352 ? kr(Fe, oe, e) : Fe; + } + } + function it(Fe) { + switch (Fe.kind) { + case 226: + return we(Fe); + case 356: + return er(Fe); + case 227: + return Dt(Fe); + case 229: + return Qt(Fe); + case 209: + return Wr(Fe); + case 210: + return qn(Fe); + case 212: + return Bt(Fe); + case 213: + return bi(Fe); + case 214: + return pi(Fe); + default: + return kr(Fe, oe, e); + } + } + function Oe(Fe) { + switch (Fe.kind) { + case 262: + return xe(Fe); + case 218: + return he(Fe); + default: + return E.failBadSyntaxKind(Fe); + } + } + function xe(Fe) { + if (Fe.asteriskToken) + Fe = Sn( + ot( + t.createFunctionDeclaration( + Fe.modifiers, + /*asteriskToken*/ + void 0, + Fe.name, + /*typeParameters*/ + void 0, + ic(Fe.parameters, oe, e), + /*type*/ + void 0, + Ae(Fe.body) + ), + /*location*/ + Fe + ), + Fe + ); + else { + const Ft = T, Br = C; + T = !1, C = !1, Fe = kr(Fe, oe, e), T = Ft, C = Br; + } + if (T) { + o(Fe); + return; + } else + return Fe; + } + function he(Fe) { + if (Fe.asteriskToken) + Fe = Sn( + ot( + t.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + Fe.name, + /*typeParameters*/ + void 0, + ic(Fe.parameters, oe, e), + /*type*/ + void 0, + Ae(Fe.body) + ), + /*location*/ + Fe + ), + Fe + ); + else { + const Ft = T, Br = C; + T = !1, C = !1, Fe = kr(Fe, oe, e), T = Ft, C = Br; + } + return Fe; + } + function ne(Fe) { + const Ft = T, Br = C; + return T = !1, C = !1, Fe = kr(Fe, oe, e), T = Ft, C = Br, Fe; + } + function Ae(Fe) { + const Ft = [], Br = T, Ti = C, Sa = D, to = w, Do = A, ml = O, gc = F, Va = R, mo = W, df = V, Rf = $, F_ = U, mf = _e; + T = !0, C = !1, D = void 0, w = void 0, A = void 0, O = void 0, F = void 0, R = void 0, W = 1, V = void 0, $ = void 0, U = void 0, _e = t.createTempVariable( + /*recordTempVariable*/ + void 0 + ), i(); + const jf = t.copyPrologue( + Fe.statements, + Ft, + /*ensureUseStrict*/ + !1, + oe + ); + Xn(Fe.statements, jf); + const fp = rt(); + return Bg(Ft, s()), Ft.push(t.createReturnStatement(fp)), T = Br, C = Ti, D = Sa, w = to, A = Do, O = ml, F = gc, R = Va, W = mo, V = df, $ = Rf, U = F_, _e = mf, ot(t.createBlock(Ft, Fe.multiLine), Fe); + } + function De(Fe) { + if (Fe.transformFlags & 1048576) { + qr(Fe.declarationList); + return; + } else { + if (va(Fe) & 2097152) + return Fe; + for (const Br of Fe.declarationList.declarations) + c(Br.name); + const Ft = X4(Fe.declarationList); + return Ft.length === 0 ? void 0 : da( + t.createExpressionStatement( + t.inlineExpressions( + gr(Ft, Bn) + ) + ), + Fe + ); + } + } + function we(Fe) { + const Ft = IB(Fe); + switch (Ft) { + case 0: + return bt(Fe); + case 1: + return Ue(Fe); + default: + return E.assertNever(Ft); + } + } + function Ue(Fe) { + const { left: Ft, right: Br } = Fe; + if (ye(Br)) { + let Ti; + switch (Ft.kind) { + case 211: + Ti = t.updatePropertyAccessExpression( + Ft, + X(E.checkDefined(Xe(Ft.expression, oe, u_))), + Ft.name + ); + break; + case 212: + Ti = t.updateElementAccessExpression(Ft, X(E.checkDefined(Xe(Ft.expression, oe, u_))), X(E.checkDefined(Xe(Ft.argumentExpression, oe, ct)))); + break; + default: + Ti = E.checkDefined(Xe(Ft, oe, ct)); + break; + } + const Sa = Fe.operatorToken.kind; + return WD(Sa) ? ot( + t.createAssignment( + Ti, + ot( + t.createBinaryExpression( + X(Ti), + UD(Sa), + E.checkDefined(Xe(Br, oe, ct)) + ), + Fe + ) + ), + Fe + ) : t.updateBinaryExpression(Fe, Ti, Fe.operatorToken, E.checkDefined(Xe(Br, oe, ct))); + } + return kr(Fe, oe, e); + } + function bt(Fe) { + return ye(Fe.right) ? WK(Fe.operatorToken.kind) ? Nr(Fe) : Fe.operatorToken.kind === 28 ? Lt(Fe) : t.updateBinaryExpression(Fe, X(E.checkDefined(Xe(Fe.left, oe, ct))), Fe.operatorToken, E.checkDefined(Xe(Fe.right, oe, ct))) : kr(Fe, oe, e); + } + function Lt(Fe) { + let Ft = []; + return Br(Fe.left), Br(Fe.right), t.inlineExpressions(Ft); + function Br(Ti) { + fn(Ti) && Ti.operatorToken.kind === 28 ? (Br(Ti.left), Br(Ti.right)) : (ye(Ti) && Ft.length > 0 && (G(1, [t.createExpressionStatement(t.inlineExpressions(Ft))]), Ft = []), Ft.push(E.checkDefined(Xe(Ti, oe, ct)))); + } + } + function er(Fe) { + let Ft = []; + for (const Br of Fe.elements) + fn(Br) && Br.operatorToken.kind === 28 ? Ft.push(Lt(Br)) : (ye(Br) && Ft.length > 0 && (G(1, [t.createExpressionStatement(t.inlineExpressions(Ft))]), Ft = []), Ft.push(E.checkDefined(Xe(Br, oe, ct)))); + return t.inlineExpressions(Ft); + } + function Nr(Fe) { + const Ft = zt(), Br = lt(); + return Ca( + Br, + E.checkDefined(Xe(Fe.left, oe, ct)), + /*location*/ + Fe.left + ), Fe.operatorToken.kind === 56 ? Qa( + Ft, + Br, + /*location*/ + Fe.left + ) : qt( + Ft, + Br, + /*location*/ + Fe.left + ), Ca( + Br, + E.checkDefined(Xe(Fe.right, oe, ct)), + /*location*/ + Fe.right + ), de(Ft), Br; + } + function Dt(Fe) { + if (ye(Fe.whenTrue) || ye(Fe.whenFalse)) { + const Ft = zt(), Br = zt(), Ti = lt(); + return Qa( + Ft, + E.checkDefined(Xe(Fe.condition, oe, ct)), + /*location*/ + Fe.condition + ), Ca( + Ti, + E.checkDefined(Xe(Fe.whenTrue, oe, ct)), + /*location*/ + Fe.whenTrue + ), Oi(Br), de(Ft), Ca( + Ti, + E.checkDefined(Xe(Fe.whenFalse, oe, ct)), + /*location*/ + Fe.whenFalse + ), de(Br), Ti; + } + return kr(Fe, oe, e); + } + function Qt(Fe) { + const Ft = zt(), Br = Xe(Fe.expression, oe, ct); + if (Fe.asteriskToken) { + const Ti = va(Fe.expression) & 8388608 ? Br : ot(n().createValuesHelper(Br), Fe); + Mc( + Ti, + /*location*/ + Fe + ); + } else + Ol( + Br, + /*location*/ + Fe + ); + return de(Ft), Sl( + /*location*/ + Fe + ); + } + function Wr(Fe) { + return yr( + Fe.elements, + /*leadingElement*/ + void 0, + /*location*/ + void 0, + Fe.multiLine + ); + } + function yr(Fe, Ft, Br, Ti) { + const Sa = ft(Fe); + let to; + if (Sa > 0) { + to = lt(); + const gc = Or(Fe, oe, ct, 0, Sa); + Ca( + to, + t.createArrayLiteralExpression( + Ft ? [Ft, ...gc] : gc + ) + ), Ft = void 0; + } + const Do = qu(Fe, ml, [], Sa); + return to ? t.createArrayConcatCall(to, [t.createArrayLiteralExpression(Do, Ti)]) : ot( + t.createArrayLiteralExpression(Ft ? [Ft, ...Do] : Do, Ti), + Br + ); + function ml(gc, Va) { + if (ye(Va) && gc.length > 0) { + const mo = to !== void 0; + to || (to = lt()), Ca( + to, + mo ? t.createArrayConcatCall( + to, + [t.createArrayLiteralExpression(gc, Ti)] + ) : t.createArrayLiteralExpression( + Ft ? [Ft, ...gc] : gc, + Ti + ) + ), Ft = void 0, gc = []; + } + return gc.push(E.checkDefined(Xe(Va, oe, ct))), gc; + } + } + function qn(Fe) { + const Ft = Fe.properties, Br = Fe.multiLine, Ti = ft(Ft), Sa = lt(); + Ca( + Sa, + t.createObjectLiteralExpression( + Or(Ft, oe, Eh, 0, Ti), + Br + ) + ); + const to = qu(Ft, Do, [], Ti); + return to.push(Br ? xu(Fa(ot(t.cloneNode(Sa), Sa), Sa.parent)) : Sa), t.inlineExpressions(to); + function Do(ml, gc) { + ye(gc) && ml.length > 0 && (Gs(t.createExpressionStatement(t.inlineExpressions(ml))), ml = []); + const Va = Jte(t, Fe, gc, Sa), mo = Xe(Va, oe, ct); + return mo && (Br && xu(mo), ml.push(mo)), ml; + } + } + function Bt(Fe) { + return ye(Fe.argumentExpression) ? t.updateElementAccessExpression(Fe, X(E.checkDefined(Xe(Fe.expression, oe, u_))), E.checkDefined(Xe(Fe.argumentExpression, oe, ct))) : kr(Fe, oe, e); + } + function bi(Fe) { + if (!_f(Fe) && lr(Fe.arguments, ye)) { + const { target: Ft, thisArg: Br } = t.createCallBinding( + Fe.expression, + c, + u, + /*cacheIdentifiers*/ + !0 + ); + return Sn( + ot( + t.createFunctionApplyCall( + X(E.checkDefined(Xe(Ft, oe, u_))), + Br, + yr(Fe.arguments) + ), + Fe + ), + Fe + ); + } + return kr(Fe, oe, e); + } + function pi(Fe) { + if (lr(Fe.arguments, ye)) { + const { target: Ft, thisArg: Br } = t.createCallBinding(t.createPropertyAccessExpression(Fe.expression, "bind"), c); + return Sn( + ot( + t.createNewExpression( + t.createFunctionApplyCall( + X(E.checkDefined(Xe(Ft, oe, ct))), + Br, + yr( + Fe.arguments, + /*leadingElement*/ + t.createVoidZero() + ) + ), + /*typeArguments*/ + void 0, + [] + ), + Fe + ), + Fe + ); + } + return kr(Fe, oe, e); + } + function Xn(Fe, Ft = 0) { + const Br = Fe.length; + for (let Ti = Ft; Ti < Br; Ti++) + di(Fe[Ti]); + } + function jr(Fe) { + ks(Fe) ? Xn(Fe.statements) : di(Fe); + } + function di(Fe) { + const Ft = C; + C || (C = ye(Fe)), Re(Fe), C = Ft; + } + function Re(Fe) { + switch (Fe.kind) { + case 241: + return gt(Fe); + case 244: + return tr(Fe); + case 245: + return wn(Fe); + case 246: + return ki(Fe); + case 247: + return Ks(Fe); + case 248: + return gs(Fe); + case 249: + return Ct(Fe); + case 251: + return Ve(Fe); + case 252: + return Ie(Fe); + case 253: + return Ke(Fe); + case 254: + return Ye(Fe); + case 255: + return _t(Fe); + case 256: + return We(Fe); + case 257: + return Xt(Fe); + case 258: + return rn(Fe); + default: + return Gs(Xe(Fe, oe, xi)); + } + } + function gt(Fe) { + ye(Fe) ? Xn(Fe.statements) : Gs(Xe(Fe, oe, xi)); + } + function tr(Fe) { + Gs(Xe(Fe, oe, xi)); + } + function qr(Fe) { + for (const to of Fe.declarations) { + const Do = t.cloneNode(to.name); + Hc(Do, to.name), c(Do); + } + const Ft = X4(Fe), Br = Ft.length; + let Ti = 0, Sa = []; + for (; Ti < Br; ) { + for (let to = Ti; to < Br; to++) { + const Do = Ft[to]; + if (ye(Do.initializer) && Sa.length > 0) + break; + Sa.push(Bn(Do)); + } + Sa.length && (Gs(t.createExpressionStatement(t.inlineExpressions(Sa))), Ti += Sa.length, Sa = []); + } + } + function Bn(Fe) { + return da( + t.createAssignment( + da(t.cloneNode(Fe.name), Fe.name), + E.checkDefined(Xe(Fe.initializer, oe, ct)) + ), + Fe + ); + } + function wn(Fe) { + if (ye(Fe)) + if (ye(Fe.thenStatement) || ye(Fe.elseStatement)) { + const Ft = zt(), Br = Fe.elseStatement ? zt() : void 0; + Qa( + Fe.elseStatement ? Br : Ft, + E.checkDefined(Xe(Fe.expression, oe, ct)), + /*location*/ + Fe.expression + ), jr(Fe.thenStatement), Fe.elseStatement && (Oi(Ft), de(Br), jr(Fe.elseStatement)), de(Ft); + } else + Gs(Xe(Fe, oe, xi)); + else + Gs(Xe(Fe, oe, xi)); + } + function ki(Fe) { + if (ye(Fe)) { + const Ft = zt(), Br = zt(); + Vt( + /*continueLabel*/ + Ft + ), de(Br), jr(Fe.statement), de(Ft), qt(Br, E.checkDefined(Xe(Fe.expression, oe, ct))), ir(); + } else + Gs(Xe(Fe, oe, xi)); + } + function Cs(Fe) { + return C ? (fr(), Fe = kr(Fe, oe, e), ir(), Fe) : kr(Fe, oe, e); + } + function Ks(Fe) { + if (ye(Fe)) { + const Ft = zt(), Br = Vt(Ft); + de(Ft), Qa(Br, E.checkDefined(Xe(Fe.expression, oe, ct))), jr(Fe.statement), Oi(Ft), ir(); + } else + Gs(Xe(Fe, oe, xi)); + } + function xr(Fe) { + return C ? (fr(), Fe = kr(Fe, oe, e), ir(), Fe) : kr(Fe, oe, e); + } + function gs(Fe) { + if (ye(Fe)) { + const Ft = zt(), Br = zt(), Ti = Vt(Br); + if (Fe.initializer) { + const Sa = Fe.initializer; + Il(Sa) ? qr(Sa) : Gs( + ot( + t.createExpressionStatement( + E.checkDefined(Xe(Sa, oe, ct)) + ), + Sa + ) + ); + } + de(Ft), Fe.condition && Qa(Ti, E.checkDefined(Xe(Fe.condition, oe, ct))), jr(Fe.statement), de(Br), Fe.incrementor && Gs( + ot( + t.createExpressionStatement( + E.checkDefined(Xe(Fe.incrementor, oe, ct)) + ), + Fe.incrementor + ) + ), Oi(Ft), ir(); + } else + Gs(Xe(Fe, oe, xi)); + } + function Qe(Fe) { + C && fr(); + const Ft = Fe.initializer; + if (Ft && Il(Ft)) { + for (const Ti of Ft.declarations) + c(Ti.name); + const Br = X4(Ft); + Fe = t.updateForStatement( + Fe, + Br.length > 0 ? t.inlineExpressions(gr(Br, Bn)) : void 0, + Xe(Fe.condition, oe, ct), + Xe(Fe.incrementor, oe, ct), + Zu(Fe.statement, oe, e) + ); + } else + Fe = kr(Fe, oe, e); + return C && ir(), Fe; + } + function Ct(Fe) { + if (ye(Fe)) { + const Ft = lt(), Br = lt(), Ti = lt(), Sa = t.createLoopVariable(), to = Fe.initializer; + c(Sa), Ca(Ft, E.checkDefined(Xe(Fe.expression, oe, ct))), Ca(Br, t.createArrayLiteralExpression()), Gs( + t.createForInStatement( + Ti, + Ft, + t.createExpressionStatement( + t.createCallExpression( + t.createPropertyAccessExpression(Br, "push"), + /*typeArguments*/ + void 0, + [Ti] + ) + ) + ) + ), Ca(Sa, t.createNumericLiteral(0)); + const Do = zt(), ml = zt(), gc = Vt(ml); + de(Do), Qa(gc, t.createLessThan(Sa, t.createPropertyAccessExpression(Br, "length"))), Ca(Ti, t.createElementAccessExpression(Br, Sa)), Qa(ml, t.createBinaryExpression(Ti, 103, Ft)); + let Va; + if (Il(to)) { + for (const mo of to.declarations) + c(mo.name); + Va = t.cloneNode(to.declarations[0].name); + } else + Va = E.checkDefined(Xe(to, oe, ct)), E.assert(u_(Va)); + Ca(Va, Ti), jr(Fe.statement), de(ml), Gs(t.createExpressionStatement(t.createPostfixIncrement(Sa))), Oi(Do), ir(); + } else + Gs(Xe(Fe, oe, xi)); + } + function ee(Fe) { + C && fr(); + const Ft = Fe.initializer; + if (Il(Ft)) { + for (const Br of Ft.declarations) + c(Br.name); + Fe = t.updateForInStatement(Fe, Ft.declarations[0].name, E.checkDefined(Xe(Fe.expression, oe, ct)), E.checkDefined(Xe(Fe.statement, oe, xi, t.liftToBlock))); + } else + Fe = kr(Fe, oe, e); + return C && ir(), Fe; + } + function Ve(Fe) { + const Ft = zs(Fe.label ? An(Fe.label) : void 0); + Ft > 0 ? Oi( + Ft, + /*location*/ + Fe + ) : Gs(Fe); + } + function K(Fe) { + if (C) { + const Ft = zs(Fe.label && An(Fe.label)); + if (Ft > 0) + return Bu( + Ft, + /*location*/ + Fe + ); + } + return kr(Fe, oe, e); + } + function Ie(Fe) { + const Ft = ri(Fe.label ? An(Fe.label) : void 0); + Ft > 0 ? Oi( + Ft, + /*location*/ + Fe + ) : Gs(Fe); + } + function $e(Fe) { + if (C) { + const Ft = ri(Fe.label && An(Fe.label)); + if (Ft > 0) + return Bu( + Ft, + /*location*/ + Fe + ); + } + return kr(Fe, oe, e); + } + function Ke(Fe) { + Ll( + Xe(Fe.expression, oe, ct), + /*location*/ + Fe + ); + } + function Je(Fe) { + return Yc( + Xe(Fe.expression, oe, ct), + /*location*/ + Fe + ); + } + function Ye(Fe) { + ye(Fe) ? (Jr(X(E.checkDefined(Xe(Fe.expression, oe, ct)))), jr(Fe.statement), tt()) : Gs(Xe(Fe, oe, xi)); + } + function _t(Fe) { + if (ye(Fe.caseBlock)) { + const Ft = Fe.caseBlock, Br = Ft.clauses.length, Ti = _r(), Sa = X(E.checkDefined(Xe(Fe.expression, oe, ct))), to = []; + let Do = -1; + for (let Va = 0; Va < Br; Va++) { + const mo = Ft.clauses[Va]; + to.push(zt()), mo.kind === 297 && Do === -1 && (Do = Va); + } + let ml = 0, gc = []; + for (; ml < Br; ) { + let Va = 0; + for (let mo = ml; mo < Br; mo++) { + const df = Ft.clauses[mo]; + if (df.kind === 296) { + if (ye(df.expression) && gc.length > 0) + break; + gc.push( + t.createCaseClause( + E.checkDefined(Xe(df.expression, oe, ct)), + [ + Bu( + to[mo], + /*location*/ + df.expression + ) + ] + ) + ); + } else + Va++; + } + gc.length && (Gs(t.createSwitchStatement(Sa, t.createCaseBlock(gc))), ml += gc.length, gc = []), Va > 0 && (ml += Va, Va = 0); + } + Do >= 0 ? Oi(to[Do]) : Oi(Ti); + for (let Va = 0; Va < Br; Va++) + de(to[Va]), Xn(Ft.clauses[Va].statements); + Ot(); + } else + Gs(Xe(Fe, oe, xi)); + } + function yt(Fe) { + return C && Tr(), Fe = kr(Fe, oe, e), C && Ot(), Fe; + } + function We(Fe) { + ye(Fe) ? (Js(An(Fe.label)), jr(Fe.statement), Ms()) : Gs(Xe(Fe, oe, xi)); + } + function Et(Fe) { + return C && mi(An(Fe.label)), Fe = kr(Fe, oe, e), C && Ms(), Fe; + } + function Xt(Fe) { + To( + E.checkDefined(Xe(Fe.expression ?? t.createVoidZero(), oe, ct)), + /*location*/ + Fe + ); + } + function rn(Fe) { + ye(Fe) ? (ut(), jr(Fe.tryBlock), Fe.catchClause && (Mt(Fe.catchClause.variableDeclaration), jr(Fe.catchClause.block)), Fe.finallyBlock && (Pt(), jr(Fe.finallyBlock)), Zt()) : Gs(kr(Fe, oe, e)); + } + function ye(Fe) { + return !!Fe && (Fe.transformFlags & 1048576) !== 0; + } + function ft(Fe) { + const Ft = Fe.length; + for (let Br = 0; Br < Ft; Br++) + if (ye(Fe[Br])) + return Br; + return -1; + } + function fe(Fe, Ft) { + return Ft = g(Fe, Ft), Fe === 1 ? L(Ft) : Ft; + } + function L(Fe) { + return Me(Fe) ? ve(Fe) : Fe; + } + function ve(Fe) { + if (!Fo(Fe) && h && h.has(An(Fe))) { + const Ft = Jo(Fe); + if (Me(Ft) && Ft.parent) { + const Br = m.getReferencedValueDeclaration(Ft); + if (Br) { + const Ti = S[Ku(Br)]; + if (Ti) { + const Sa = Fa(ot(t.cloneNode(Ti), Ti), Ti.parent); + return da(Sa, Fe), Hc(Sa, Fe), Sa; + } + } + } + } + return Fe; + } + function X(Fe) { + if (Fo(Fe) || va(Fe) & 8192) + return Fe; + const Ft = t.createTempVariable(c); + return Ca( + Ft, + Fe, + /*location*/ + Fe + ), Ft; + } + function lt(Fe) { + const Ft = Fe ? t.createUniqueName(Fe) : t.createTempVariable( + /*recordTempVariable*/ + void 0 + ); + return c(Ft), Ft; + } + function zt() { + F || (F = []); + const Fe = W; + return W++, F[Fe] = -1, Fe; + } + function de(Fe) { + E.assert(F !== void 0, "No labels were defined."), F[Fe] = V ? V.length : 0; + } + function st(Fe) { + D || (D = [], A = [], w = [], O = []); + const Ft = A.length; + return A[Ft] = 0, w[Ft] = V ? V.length : 0, D[Ft] = Fe, O.push(Fe), Ft; + } + function Gt() { + const Fe = Xr(); + if (Fe === void 0) return E.fail("beginBlock was never called."); + const Ft = A.length; + return A[Ft] = 1, w[Ft] = V ? V.length : 0, D[Ft] = Fe, O.pop(), Fe; + } + function Xr() { + return Co(O); + } + function Rr() { + const Fe = Xr(); + return Fe && Fe.kind; + } + function Jr(Fe) { + const Ft = zt(), Br = zt(); + de(Ft), st({ + kind: 1, + expression: Fe, + startLabel: Ft, + endLabel: Br + }); + } + function tt() { + E.assert( + Rr() === 1 + /* With */ + ); + const Fe = Gt(); + de(Fe.endLabel); + } + function ut() { + const Fe = zt(), Ft = zt(); + return de(Fe), st({ + kind: 0, + state: 0, + startLabel: Fe, + endLabel: Ft + }), Zi(), Ft; + } + function Mt(Fe) { + E.assert( + Rr() === 0 + /* Exception */ + ); + let Ft; + if (Fo(Fe.name)) + Ft = Fe.name, c(Fe.name); + else { + const to = An(Fe.name); + Ft = lt(to), h || (h = /* @__PURE__ */ new Map(), S = [], e.enableSubstitution( + 80 + /* Identifier */ + )), h.set(to, !0), S[Ku(Fe)] = Ft; + } + const Br = Xr(); + E.assert( + Br.state < 1 + /* Catch */ + ); + const Ti = Br.endLabel; + Oi(Ti); + const Sa = zt(); + de(Sa), Br.state = 1, Br.catchVariable = Ft, Br.catchLabel = Sa, Ca(Ft, t.createCallExpression( + t.createPropertyAccessExpression(_e, "sent"), + /*typeArguments*/ + void 0, + [] + )), Zi(); + } + function Pt() { + E.assert( + Rr() === 0 + /* Exception */ + ); + const Fe = Xr(); + E.assert( + Fe.state < 2 + /* Finally */ + ); + const Ft = Fe.endLabel; + Oi(Ft); + const Br = zt(); + de(Br), Fe.state = 2, Fe.finallyLabel = Br; + } + function Zt() { + E.assert( + Rr() === 0 + /* Exception */ + ); + const Fe = Gt(); + Fe.state < 2 ? Oi(Fe.endLabel) : ge(), de(Fe.endLabel), Zi(), Fe.state = 3; + } + function fr() { + st({ + kind: 3, + isScript: !0, + breakLabel: -1, + continueLabel: -1 + }); + } + function Vt(Fe) { + const Ft = zt(); + return st({ + kind: 3, + isScript: !1, + breakLabel: Ft, + continueLabel: Fe + }), Ft; + } + function ir() { + E.assert( + Rr() === 3 + /* Loop */ + ); + const Fe = Gt(), Ft = Fe.breakLabel; + Fe.isScript || de(Ft); + } + function Tr() { + st({ + kind: 2, + isScript: !0, + breakLabel: -1 + }); + } + function _r() { + const Fe = zt(); + return st({ + kind: 2, + isScript: !1, + breakLabel: Fe + }), Fe; + } + function Ot() { + E.assert( + Rr() === 2 + /* Switch */ + ); + const Fe = Gt(), Ft = Fe.breakLabel; + Fe.isScript || de(Ft); + } + function mi(Fe) { + st({ + kind: 4, + isScript: !0, + labelText: Fe, + breakLabel: -1 + }); + } + function Js(Fe) { + const Ft = zt(); + st({ + kind: 4, + isScript: !1, + labelText: Fe, + breakLabel: Ft + }); + } + function Ms() { + E.assert( + Rr() === 4 + /* Labeled */ + ); + const Fe = Gt(); + Fe.isScript || de(Fe.breakLabel); + } + function Ns(Fe) { + return Fe.kind === 2 || Fe.kind === 3; + } + function kc(Fe) { + return Fe.kind === 4; + } + function Wo(Fe) { + return Fe.kind === 3; + } + function sc(Fe, Ft) { + for (let Br = Ft; Br >= 0; Br--) { + const Ti = O[Br]; + if (kc(Ti)) { + if (Ti.labelText === Fe) + return !0; + } else + break; + } + return !1; + } + function ri(Fe) { + if (O) + if (Fe) + for (let Ft = O.length - 1; Ft >= 0; Ft--) { + const Br = O[Ft]; + if (kc(Br) && Br.labelText === Fe) + return Br.breakLabel; + if (Ns(Br) && sc(Fe, Ft - 1)) + return Br.breakLabel; + } + else + for (let Ft = O.length - 1; Ft >= 0; Ft--) { + const Br = O[Ft]; + if (Ns(Br)) + return Br.breakLabel; + } + return 0; + } + function zs(Fe) { + if (O) + if (Fe) + for (let Ft = O.length - 1; Ft >= 0; Ft--) { + const Br = O[Ft]; + if (Wo(Br) && sc(Fe, Ft - 1)) + return Br.continueLabel; + } + else + for (let Ft = O.length - 1; Ft >= 0; Ft--) { + const Br = O[Ft]; + if (Wo(Br)) + return Br.continueLabel; + } + return 0; + } + function eu(Fe) { + if (Fe !== void 0 && Fe > 0) { + R === void 0 && (R = []); + const Ft = t.createNumericLiteral(Number.MAX_SAFE_INTEGER); + return R[Fe] === void 0 ? R[Fe] = [Ft] : R[Fe].push(Ft), Ft; + } + return t.createOmittedExpression(); + } + function hs(Fe) { + const Ft = t.createNumericLiteral(Fe); + return dD(Ft, 3, eje(Fe)), Ft; + } + function Bu(Fe, Ft) { + return E.assertLessThan(0, Fe, "Invalid label"), ot( + t.createReturnStatement( + t.createArrayLiteralExpression([ + hs( + 3 + /* Break */ + ), + eu(Fe) + ]) + ), + Ft + ); + } + function Yc(Fe, Ft) { + return ot( + t.createReturnStatement( + t.createArrayLiteralExpression( + Fe ? [hs( + 2 + /* Return */ + ), Fe] : [hs( + 2 + /* Return */ + )] + ) + ), + Ft + ); + } + function Sl(Fe) { + return ot( + t.createCallExpression( + t.createPropertyAccessExpression(_e, "sent"), + /*typeArguments*/ + void 0, + [] + ), + Fe + ); + } + function Zi() { + G( + 0 + /* Nop */ + ); + } + function Gs(Fe) { + Fe ? G(1, [Fe]) : Zi(); + } + function Ca(Fe, Ft, Br) { + G(2, [Fe, Ft], Br); + } + function Oi(Fe, Ft) { + G(3, [Fe], Ft); + } + function qt(Fe, Ft, Br) { + G(4, [Fe, Ft], Br); + } + function Qa(Fe, Ft, Br) { + G(5, [Fe, Ft], Br); + } + function Mc(Fe, Ft) { + G(7, [Fe], Ft); + } + function Ol(Fe, Ft) { + G(6, [Fe], Ft); + } + function Ll(Fe, Ft) { + G(8, [Fe], Ft); + } + function To(Fe, Ft) { + G(9, [Fe], Ft); + } + function ge() { + G( + 10 + /* Endfinally */ + ); + } + function G(Fe, Ft, Br) { + V === void 0 && (V = [], $ = [], U = []), F === void 0 && de(zt()); + const Ti = V.length; + V[Ti] = Fe, $[Ti] = Ft, U[Ti] = Br; + } + function rt() { + Z = 0, J = 0, re = void 0, te = !1, ie = !1, le = void 0, Te = void 0, q = void 0, me = void 0, Ce = void 0; + const Fe = wt(); + return n().createGeneratorHelper( + on( + t.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + [t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + _e + )], + /*type*/ + void 0, + t.createBlock( + Fe, + /*multiLine*/ + Fe.length > 0 + ) + ), + 1048576 + /* ReuseTempVariableScope */ + ) + ); + } + function wt() { + if (V) { + for (let Fe = 0; Fe < V.length; Fe++) + ba(Fe); + Yr(V.length); + } else + Yr(0); + if (le) { + const Fe = t.createPropertyAccessExpression(_e, "label"), Ft = t.createSwitchStatement(Fe, t.createCaseBlock(le)); + return [xu(Ft)]; + } + return Te || []; + } + function Kt() { + Te && (pr( + /*markLabelEnd*/ + !te + ), te = !1, ie = !1, J++); + } + function Yr(Fe) { + Mn(Fe) && (En(Fe), Ce = void 0, Rc( + /*expression*/ + void 0, + /*operationLocation*/ + void 0 + )), Te && le && pr( + /*markLabelEnd*/ + !1 + ), Ji(); + } + function Mn(Fe) { + if (!ie) + return !0; + if (!F || !R) + return !1; + for (let Ft = 0; Ft < F.length; Ft++) + if (F[Ft] === Fe && R[Ft]) + return !0; + return !1; + } + function pr(Fe) { + if (le || (le = []), Te) { + if (Ce) + for (let Ft = Ce.length - 1; Ft >= 0; Ft--) { + const Br = Ce[Ft]; + Te = [t.createWithStatement(Br.expression, t.createBlock(Te))]; + } + if (me) { + const { startLabel: Ft, catchLabel: Br, finallyLabel: Ti, endLabel: Sa } = me; + Te.unshift( + t.createExpressionStatement( + t.createCallExpression( + t.createPropertyAccessExpression(t.createPropertyAccessExpression(_e, "trys"), "push"), + /*typeArguments*/ + void 0, + [ + t.createArrayLiteralExpression([ + eu(Ft), + eu(Br), + eu(Ti), + eu(Sa) + ]) + ] + ) + ) + ), me = void 0; + } + Fe && Te.push( + t.createExpressionStatement( + t.createAssignment( + t.createPropertyAccessExpression(_e, "label"), + t.createNumericLiteral(J + 1) + ) + ) + ); + } + le.push( + t.createCaseClause( + t.createNumericLiteral(J), + Te || [] + ) + ), Te = void 0; + } + function En(Fe) { + if (F) + for (let Ft = 0; Ft < F.length; Ft++) + F[Ft] === Fe && (Kt(), re === void 0 && (re = []), re[J] === void 0 ? re[J] = [Ft] : re[J].push(Ft)); + } + function Ji() { + if (R !== void 0 && re !== void 0) + for (let Fe = 0; Fe < re.length; Fe++) { + const Ft = re[Fe]; + if (Ft !== void 0) + for (const Br of Ft) { + const Ti = R[Br]; + if (Ti !== void 0) + for (const Sa of Ti) + Sa.text = String(Fe); + } + } + } + function hi(Fe) { + if (D) + for (; Z < A.length && w[Z] <= Fe; Z++) { + const Ft = D[Z], Br = A[Z]; + switch (Ft.kind) { + case 0: + Br === 0 ? (q || (q = []), Te || (Te = []), q.push(me), me = Ft) : Br === 1 && (me = q.pop()); + break; + case 1: + Br === 0 ? (Ce || (Ce = []), Ce.push(Ft)) : Br === 1 && Ce.pop(); + break; + } + } + } + function ba(Fe) { + if (En(Fe), hi(Fe), te) + return; + te = !1, ie = !1; + const Ft = V[Fe]; + if (Ft === 0) + return; + if (Ft === 10) + return Rl(); + const Br = $[Fe]; + if (Ft === 1) + return Mo(Br[0]); + const Ti = U[Fe]; + switch (Ft) { + case 2: + return dc(Br[0], Br[1], Ti); + case 3: + return Uo(Br[0], Ti); + case 4: + return ac(Br[0], Br[1], Ti); + case 5: + return Vp(Br[0], Br[1], Ti); + case 6: + return dl(Br[0], Ti); + case 7: + return Ml(Br[0], Ti); + case 8: + return Rc(Br[0], Ti); + case 9: + return mc(Br[0], Ti); + } + } + function Mo(Fe) { + Fe && (Te ? Te.push(Fe) : Te = [Fe]); + } + function dc(Fe, Ft, Br) { + Mo(ot(t.createExpressionStatement(t.createAssignment(Fe, Ft)), Br)); + } + function mc(Fe, Ft) { + te = !0, ie = !0, Mo(ot(t.createThrowStatement(Fe), Ft)); + } + function Rc(Fe, Ft) { + te = !0, ie = !0, Mo( + on( + ot( + t.createReturnStatement( + t.createArrayLiteralExpression( + Fe ? [hs( + 2 + /* Return */ + ), Fe] : [hs( + 2 + /* Return */ + )] + ) + ), + Ft + ), + 768 + /* NoTokenSourceMaps */ + ) + ); + } + function Uo(Fe, Ft) { + te = !0, Mo( + on( + ot( + t.createReturnStatement( + t.createArrayLiteralExpression([ + hs( + 3 + /* Break */ + ), + eu(Fe) + ]) + ), + Ft + ), + 768 + /* NoTokenSourceMaps */ + ) + ); + } + function ac(Fe, Ft, Br) { + Mo( + on( + t.createIfStatement( + Ft, + on( + ot( + t.createReturnStatement( + t.createArrayLiteralExpression([ + hs( + 3 + /* Break */ + ), + eu(Fe) + ]) + ), + Br + ), + 768 + /* NoTokenSourceMaps */ + ) + ), + 1 + /* SingleLine */ + ) + ); + } + function Vp(Fe, Ft, Br) { + Mo( + on( + t.createIfStatement( + t.createLogicalNot(Ft), + on( + ot( + t.createReturnStatement( + t.createArrayLiteralExpression([ + hs( + 3 + /* Break */ + ), + eu(Fe) + ]) + ), + Br + ), + 768 + /* NoTokenSourceMaps */ + ) + ), + 1 + /* SingleLine */ + ) + ); + } + function dl(Fe, Ft) { + te = !0, Mo( + on( + ot( + t.createReturnStatement( + t.createArrayLiteralExpression( + Fe ? [hs( + 4 + /* Yield */ + ), Fe] : [hs( + 4 + /* Yield */ + )] + ) + ), + Ft + ), + 768 + /* NoTokenSourceMaps */ + ) + ); + } + function Ml(Fe, Ft) { + te = !0, Mo( + on( + ot( + t.createReturnStatement( + t.createArrayLiteralExpression([ + hs( + 5 + /* YieldStar */ + ), + Fe + ]) + ), + Ft + ), + 768 + /* NoTokenSourceMaps */ + ) + ); + } + function Rl() { + te = !0, Mo( + t.createReturnStatement( + t.createArrayLiteralExpression([ + hs( + 7 + /* Endfinally */ + ) + ]) + ) + ); + } + } + function AW(e) { + function t(fe) { + switch (fe) { + case 2: + return $; + case 3: + return U; + default: + return V; + } + } + const { + factory: n, + getEmitHelperFactory: i, + startLexicalEnvironment: s, + endLexicalEnvironment: o, + hoistVariableDeclaration: c + } = e, _ = e.getCompilerOptions(), u = e.getEmitResolver(), m = e.getEmitHost(), g = pa(_), h = Ru(_), S = e.onSubstituteNode, T = e.onEmitNode; + e.onSubstituteNode = _t, e.onEmitNode = Ye, e.enableSubstitution( + 213 + /* CallExpression */ + ), e.enableSubstitution( + 215 + /* TaggedTemplateExpression */ + ), e.enableSubstitution( + 80 + /* Identifier */ + ), e.enableSubstitution( + 226 + /* BinaryExpression */ + ), e.enableSubstitution( + 304 + /* ShorthandPropertyAssignment */ + ), e.enableEmitNotification( + 307 + /* SourceFile */ + ); + const C = []; + let D, w, A; + const O = []; + let F; + return Ad(e, R); + function R(fe) { + if (fe.isDeclarationFile || !(EC(fe, _) || fe.transformFlags & 8388608 || tp(fe) && N5(_) && _.outFile)) + return fe; + D = fe, w = xW(e, fe), C[Ku(fe)] = w, _.rewriteRelativeImportExtensions && tF( + fe, + /*includeTypeSpaceImports*/ + !1, + /*requireStringLiteralLikeArgument*/ + !1, + (X) => { + (!Na(X.arguments[0]) || S3(X.arguments[0].text, _)) && (A = Pr(A, X)); + } + ); + const ve = t(h)(fe); + return D = void 0, w = void 0, F = !1, ve; + } + function W() { + return Gg(D.fileName) && D.commonJsModuleIndicator && (!D.externalModuleIndicator || D.externalModuleIndicator === !0) ? !1 : !!(!w.exportEquals && el(D)); + } + function V(fe) { + s(); + const L = [], ve = lu(_, "alwaysStrict") || el(D), X = n.copyPrologue(fe.statements, L, ve && !tp(fe), te); + if (W() && Pr(L, Ie()), at(w.exportedNames)) + for (let de = 0; de < w.exportedNames.length; de += 50) + Pr( + L, + n.createExpressionStatement( + qu( + w.exportedNames.slice(de, de + 50), + (st, Gt) => Gt.kind === 11 ? n.createAssignment(n.createElementAccessExpression(n.createIdentifier("exports"), n.createStringLiteral(Gt.text)), st) : n.createAssignment(n.createPropertyAccessExpression(n.createIdentifier("exports"), n.createIdentifier(An(Gt))), st), + n.createVoidZero() + ) + ) + ); + for (const zt of w.exportedFunctions) + ee(L, zt); + Pr(L, Xe(w.externalHelpersImportDeclaration, te, xi)), Nn(L, Or(fe.statements, te, xi, X)), re( + L, + /*emitAsReturn*/ + !1 + ), Bg(L, o()); + const lt = n.updateSourceFile(fe, ot(n.createNodeArray(L), fe.statements)); + return Qg(lt, e.readEmitHelpers()), lt; + } + function $(fe) { + const L = n.createIdentifier("define"), ve = xN(n, fe, m, _), X = tp(fe) && fe, { aliasedModuleNames: lt, unaliasedModuleNames: zt, importAliasNames: de } = _e( + fe, + /*includeNonAmdDependencies*/ + !0 + ), st = n.updateSourceFile( + fe, + ot( + n.createNodeArray([ + n.createExpressionStatement( + n.createCallExpression( + L, + /*typeArguments*/ + void 0, + [ + // Add the module name (if provided). + ...ve ? [ve] : [], + // Add the dependency array argument: + // + // ["require", "exports", module1", "module2", ...] + n.createArrayLiteralExpression( + X ? He : [ + n.createStringLiteral("require"), + n.createStringLiteral("exports"), + ...lt, + ...zt + ] + ), + // Add the module body function argument: + // + // function (require, exports, module1, module2) ... + X ? X.statements.length ? X.statements[0].expression : n.createObjectLiteralExpression() : n.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + [ + n.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "require" + ), + n.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "exports" + ), + ...de + ], + /*type*/ + void 0, + J(fe) + ) + ] + ) + ) + ]), + /*location*/ + fe.statements + ) + ); + return Qg(st, e.readEmitHelpers()), st; + } + function U(fe) { + const { aliasedModuleNames: L, unaliasedModuleNames: ve, importAliasNames: X } = _e( + fe, + /*includeNonAmdDependencies*/ + !1 + ), lt = xN(n, fe, m, _), zt = n.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + [n.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "factory" + )], + /*type*/ + void 0, + ot( + n.createBlock( + [ + n.createIfStatement( + n.createLogicalAnd( + n.createTypeCheck(n.createIdentifier("module"), "object"), + n.createTypeCheck(n.createPropertyAccessExpression(n.createIdentifier("module"), "exports"), "object") + ), + n.createBlock([ + n.createVariableStatement( + /*modifiers*/ + void 0, + [ + n.createVariableDeclaration( + "v", + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + n.createCallExpression( + n.createIdentifier("factory"), + /*typeArguments*/ + void 0, + [ + n.createIdentifier("require"), + n.createIdentifier("exports") + ] + ) + ) + ] + ), + on( + n.createIfStatement( + n.createStrictInequality( + n.createIdentifier("v"), + n.createIdentifier("undefined") + ), + n.createExpressionStatement( + n.createAssignment( + n.createPropertyAccessExpression(n.createIdentifier("module"), "exports"), + n.createIdentifier("v") + ) + ) + ), + 1 + /* SingleLine */ + ) + ]), + n.createIfStatement( + n.createLogicalAnd( + n.createTypeCheck(n.createIdentifier("define"), "function"), + n.createPropertyAccessExpression(n.createIdentifier("define"), "amd") + ), + n.createBlock([ + n.createExpressionStatement( + n.createCallExpression( + n.createIdentifier("define"), + /*typeArguments*/ + void 0, + [ + // Add the module name (if provided). + ...lt ? [lt] : [], + n.createArrayLiteralExpression([ + n.createStringLiteral("require"), + n.createStringLiteral("exports"), + ...L, + ...ve + ]), + n.createIdentifier("factory") + ] + ) + ) + ]) + ) + ) + ], + /*multiLine*/ + !0 + ), + /*location*/ + void 0 + ) + ), de = n.updateSourceFile( + fe, + ot( + n.createNodeArray([ + n.createExpressionStatement( + n.createCallExpression( + zt, + /*typeArguments*/ + void 0, + [ + // Add the module body function argument: + // + // function (require, exports) ... + n.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + [ + n.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "require" + ), + n.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "exports" + ), + ...X + ], + /*type*/ + void 0, + J(fe) + ) + ] + ) + ) + ]), + /*location*/ + fe.statements + ) + ); + return Qg(de, e.readEmitHelpers()), de; + } + function _e(fe, L) { + const ve = [], X = [], lt = []; + for (const zt of fe.amdDependencies) + zt.name ? (ve.push(n.createStringLiteral(zt.path)), lt.push(n.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + zt.name + ))) : X.push(n.createStringLiteral(zt.path)); + for (const zt of w.externalImports) { + const de = Qx(n, zt, D, m, u, _), st = u6(n, zt, D); + de && (L && st ? (on( + st, + 8 + /* NoSubstitution */ + ), ve.push(de), lt.push(n.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + st + ))) : X.push(de)); + } + return { aliasedModuleNames: ve, unaliasedModuleNames: X, importAliasNames: lt }; + } + function Z(fe) { + if (_l(fe) || wc(fe) || !Qx(n, fe, D, m, u, _)) + return; + const L = u6(n, fe, D), ve = Xn(fe, L); + if (ve !== L) + return n.createExpressionStatement(n.createAssignment(L, ve)); + } + function J(fe) { + s(); + const L = [], ve = n.copyPrologue( + fe.statements, + L, + /*ensureUseStrict*/ + !0, + te + ); + W() && Pr(L, Ie()), at(w.exportedNames) && Pr( + L, + n.createExpressionStatement(qu(w.exportedNames, (lt, zt) => zt.kind === 11 ? n.createAssignment(n.createElementAccessExpression(n.createIdentifier("exports"), n.createStringLiteral(zt.text)), lt) : n.createAssignment(n.createPropertyAccessExpression(n.createIdentifier("exports"), n.createIdentifier(An(zt))), lt), n.createVoidZero())) + ); + for (const lt of w.exportedFunctions) + ee(L, lt); + Pr(L, Xe(w.externalHelpersImportDeclaration, te, xi)), h === 2 && Nn(L, Li(w.externalImports, Z)), Nn(L, Or(fe.statements, te, xi, ve)), re( + L, + /*emitAsReturn*/ + !0 + ), Bg(L, o()); + const X = n.createBlock( + L, + /*multiLine*/ + !0 + ); + return F && Lx(X, tje), X; + } + function re(fe, L) { + if (w.exportEquals) { + const ve = Xe(w.exportEquals.expression, Te, ct); + if (ve) + if (L) { + const X = n.createReturnStatement(ve); + ot(X, w.exportEquals), on( + X, + 3840 + /* NoComments */ + ), fe.push(X); + } else { + const X = n.createExpressionStatement( + n.createAssignment( + n.createPropertyAccessExpression( + n.createIdentifier("module"), + "exports" + ), + ve + ) + ); + ot(X, w.exportEquals), on( + X, + 3072 + /* NoComments */ + ), fe.push(X); + } + } + } + function te(fe) { + switch (fe.kind) { + case 272: + return jr(fe); + case 271: + return Re(fe); + case 278: + return gt(fe); + case 277: + return tr(fe); + default: + return ie(fe); + } + } + function ie(fe) { + switch (fe.kind) { + case 243: + return wn(fe); + case 262: + return qr(fe); + case 263: + return Bn(fe); + case 248: + return Ee( + fe, + /*isTopLevel*/ + !0 + ); + case 249: + return oe(fe); + case 250: + return ke(fe); + case 246: + return ue(fe); + case 247: + return it(fe); + case 256: + return Oe(fe); + case 254: + return xe(fe); + case 245: + return he(fe); + case 255: + return ne(fe); + case 269: + return Ae(fe); + case 296: + return De(fe); + case 297: + return we(fe); + case 258: + return Ue(fe); + case 299: + return bt(fe); + case 241: + return Lt(fe); + default: + return Te(fe); + } + } + function le(fe, L) { + if (!(fe.transformFlags & 276828160) && !A?.length) + return fe; + switch (fe.kind) { + case 248: + return Ee( + fe, + /*isTopLevel*/ + !1 + ); + case 244: + return er(fe); + case 217: + return Nr(fe, L); + case 355: + return Dt(fe, L); + case 213: + const ve = fe === Uc(A); + if (ve && A.shift(), _f(fe) && m.shouldTransformImportCall(D)) + return yr(fe, ve); + if (ve) + return Wr(fe); + break; + case 226: + if (P0(fe)) + return Ce(fe, L); + break; + case 224: + case 225: + return Qt(fe, L); + } + return kr(fe, Te, e); + } + function Te(fe) { + return le( + fe, + /*valueIsDiscarded*/ + !1 + ); + } + function q(fe) { + return le( + fe, + /*valueIsDiscarded*/ + !0 + ); + } + function me(fe) { + if (oa(fe)) + for (const L of fe.properties) + switch (L.kind) { + case 303: + if (me(L.initializer)) + return !0; + break; + case 304: + if (me(L.name)) + return !0; + break; + case 305: + if (me(L.expression)) + return !0; + break; + case 174: + case 177: + case 178: + return !1; + default: + E.assertNever(L, "Unhandled object member kind"); + } + else if (Ql(fe)) { + for (const L of fe.elements) + if (lp(L)) { + if (me(L.expression)) + return !0; + } else if (me(L)) + return !0; + } else if (Me(fe)) + return Ir(ft(fe)) > (DF(fe) ? 1 : 0); + return !1; + } + function Ce(fe, L) { + return me(fe.left) ? qS(fe, Te, e, 0, !L, ki) : kr(fe, Te, e); + } + function Ee(fe, L) { + if (L && fe.initializer && Il(fe.initializer) && !(fe.initializer.flags & 7)) { + const ve = Qe( + /*statements*/ + void 0, + fe.initializer, + /*isForInOrOfInitializer*/ + !1 + ); + if (ve) { + const X = [], lt = Xe(fe.initializer, q, Il), zt = n.createVariableStatement( + /*modifiers*/ + void 0, + lt + ); + X.push(zt), Nn(X, ve); + const de = Xe(fe.condition, Te, ct), st = Xe(fe.incrementor, q, ct), Gt = Zu(fe.statement, L ? ie : Te, e); + return X.push(n.updateForStatement( + fe, + /*initializer*/ + void 0, + de, + st, + Gt + )), X; + } + } + return n.updateForStatement( + fe, + Xe(fe.initializer, q, Kf), + Xe(fe.condition, Te, ct), + Xe(fe.incrementor, q, ct), + Zu(fe.statement, L ? ie : Te, e) + ); + } + function oe(fe) { + if (Il(fe.initializer) && !(fe.initializer.flags & 7)) { + const L = Qe( + /*statements*/ + void 0, + fe.initializer, + /*isForInOrOfInitializer*/ + !0 + ); + if (at(L)) { + const ve = Xe(fe.initializer, q, Kf), X = Xe(fe.expression, Te, ct), lt = Zu(fe.statement, ie, e), zt = ks(lt) ? n.updateBlock(lt, [...L, ...lt.statements]) : n.createBlock( + [...L, lt], + /*multiLine*/ + !0 + ); + return n.updateForInStatement(fe, ve, X, zt); + } + } + return n.updateForInStatement( + fe, + Xe(fe.initializer, q, Kf), + Xe(fe.expression, Te, ct), + Zu(fe.statement, ie, e) + ); + } + function ke(fe) { + if (Il(fe.initializer) && !(fe.initializer.flags & 7)) { + const L = Qe( + /*statements*/ + void 0, + fe.initializer, + /*isForInOrOfInitializer*/ + !0 + ), ve = Xe(fe.initializer, q, Kf), X = Xe(fe.expression, Te, ct); + let lt = Zu(fe.statement, ie, e); + return at(L) && (lt = ks(lt) ? n.updateBlock(lt, [...L, ...lt.statements]) : n.createBlock( + [...L, lt], + /*multiLine*/ + !0 + )), n.updateForOfStatement(fe, fe.awaitModifier, ve, X, lt); + } + return n.updateForOfStatement( + fe, + fe.awaitModifier, + Xe(fe.initializer, q, Kf), + Xe(fe.expression, Te, ct), + Zu(fe.statement, ie, e) + ); + } + function ue(fe) { + return n.updateDoStatement( + fe, + Zu(fe.statement, ie, e), + Xe(fe.expression, Te, ct) + ); + } + function it(fe) { + return n.updateWhileStatement( + fe, + Xe(fe.expression, Te, ct), + Zu(fe.statement, ie, e) + ); + } + function Oe(fe) { + return n.updateLabeledStatement( + fe, + fe.label, + Xe(fe.statement, ie, xi, n.liftToBlock) ?? ot(n.createEmptyStatement(), fe.statement) + ); + } + function xe(fe) { + return n.updateWithStatement( + fe, + Xe(fe.expression, Te, ct), + E.checkDefined(Xe(fe.statement, ie, xi, n.liftToBlock)) + ); + } + function he(fe) { + return n.updateIfStatement( + fe, + Xe(fe.expression, Te, ct), + Xe(fe.thenStatement, ie, xi, n.liftToBlock) ?? n.createBlock([]), + Xe(fe.elseStatement, ie, xi, n.liftToBlock) + ); + } + function ne(fe) { + return n.updateSwitchStatement( + fe, + Xe(fe.expression, Te, ct), + E.checkDefined(Xe(fe.caseBlock, ie, kD)) + ); + } + function Ae(fe) { + return n.updateCaseBlock( + fe, + Or(fe.clauses, ie, g7) + ); + } + function De(fe) { + return n.updateCaseClause( + fe, + Xe(fe.expression, Te, ct), + Or(fe.statements, ie, xi) + ); + } + function we(fe) { + return kr(fe, ie, e); + } + function Ue(fe) { + return kr(fe, ie, e); + } + function bt(fe) { + return n.updateCatchClause( + fe, + fe.variableDeclaration, + E.checkDefined(Xe(fe.block, ie, ks)) + ); + } + function Lt(fe) { + return fe = kr(fe, ie, e), fe; + } + function er(fe) { + return n.updateExpressionStatement( + fe, + Xe(fe.expression, q, ct) + ); + } + function Nr(fe, L) { + return n.updateParenthesizedExpression(fe, Xe(fe.expression, L ? q : Te, ct)); + } + function Dt(fe, L) { + return n.updatePartiallyEmittedExpression(fe, Xe(fe.expression, L ? q : Te, ct)); + } + function Qt(fe, L) { + if ((fe.operator === 46 || fe.operator === 47) && Me(fe.operand) && !Fo(fe.operand) && !Rh(fe.operand) && !nJ(fe.operand)) { + const ve = ft(fe.operand); + if (ve) { + let X, lt = Xe(fe.operand, Te, ct); + pv(fe) ? lt = n.updatePrefixUnaryExpression(fe, lt) : (lt = n.updatePostfixUnaryExpression(fe, lt), L || (X = n.createTempVariable(c), lt = n.createAssignment(X, lt), ot(lt, fe)), lt = n.createComma(lt, n.cloneNode(fe.operand)), ot(lt, fe)); + for (const zt of ve) + O[Aa(lt)] = !0, lt = Ke(zt, lt), ot(lt, fe); + return X && (O[Aa(lt)] = !0, lt = n.createComma(lt, X), ot(lt, fe)), lt; + } + } + return kr(fe, Te, e); + } + function Wr(fe) { + return n.updateCallExpression( + fe, + fe.expression, + /*typeArguments*/ + void 0, + Or(fe.arguments, (L) => L === fe.arguments[0] ? Na(L) ? nk(L, _) : i().createRewriteRelativeImportExtensionsHelper(L) : Te(L), ct) + ); + } + function yr(fe, L) { + if (h === 0 && g >= 7) + return kr(fe, Te, e); + const ve = Qx(n, fe, D, m, u, _), X = Xe(Uc(fe.arguments), Te, ct), lt = ve && (!X || !ea(X) || X.text !== ve.text) ? ve : X && L ? ea(X) ? nk(X, _) : i().createRewriteRelativeImportExtensionsHelper(X) : X, zt = !!(fe.transformFlags & 16384); + switch (_.module) { + case 2: + return Bt(lt, zt); + case 3: + return qn(lt ?? n.createVoidZero(), zt); + case 1: + default: + return bi(lt); + } + } + function qn(fe, L) { + if (F = !0, s2(fe)) { + const ve = Fo(fe) ? fe : ea(fe) ? n.createStringLiteralFromNode(fe) : on( + ot(n.cloneNode(fe), fe), + 3072 + /* NoComments */ + ); + return n.createConditionalExpression( + /*condition*/ + n.createIdentifier("__syncRequire"), + /*questionToken*/ + void 0, + /*whenTrue*/ + bi(fe), + /*colonToken*/ + void 0, + /*whenFalse*/ + Bt(ve, L) + ); + } else { + const ve = n.createTempVariable(c); + return n.createComma( + n.createAssignment(ve, fe), + n.createConditionalExpression( + /*condition*/ + n.createIdentifier("__syncRequire"), + /*questionToken*/ + void 0, + /*whenTrue*/ + bi( + ve, + /*isInlineable*/ + !0 + ), + /*colonToken*/ + void 0, + /*whenFalse*/ + Bt(ve, L) + ) + ); + } + } + function Bt(fe, L) { + const ve = n.createUniqueName("resolve"), X = n.createUniqueName("reject"), lt = [ + n.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + /*name*/ + ve + ), + n.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + /*name*/ + X + ) + ], zt = n.createBlock([ + n.createExpressionStatement( + n.createCallExpression( + n.createIdentifier("require"), + /*typeArguments*/ + void 0, + [n.createArrayLiteralExpression([fe || n.createOmittedExpression()]), ve, X] + ) + ) + ]); + let de; + g >= 2 ? de = n.createArrowFunction( + /*modifiers*/ + void 0, + /*typeParameters*/ + void 0, + lt, + /*type*/ + void 0, + /*equalsGreaterThanToken*/ + void 0, + zt + ) : (de = n.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + lt, + /*type*/ + void 0, + zt + ), L && on( + de, + 16 + /* CapturesThis */ + )); + const st = n.createNewExpression( + n.createIdentifier("Promise"), + /*typeArguments*/ + void 0, + [de] + ); + return Hg(_) ? n.createCallExpression( + n.createPropertyAccessExpression(st, n.createIdentifier("then")), + /*typeArguments*/ + void 0, + [i().createImportStarCallbackHelper()] + ) : st; + } + function bi(fe, L) { + const ve = fe && !og(fe) && !L, X = n.createCallExpression( + n.createPropertyAccessExpression(n.createIdentifier("Promise"), "resolve"), + /*typeArguments*/ + void 0, + /*argumentsArray*/ + ve ? g >= 2 ? [ + n.createTemplateExpression(n.createTemplateHead(""), [ + n.createTemplateSpan(fe, n.createTemplateTail("")) + ]) + ] : [ + n.createCallExpression( + n.createPropertyAccessExpression(n.createStringLiteral(""), "concat"), + /*typeArguments*/ + void 0, + [fe] + ) + ] : [] + ); + let lt = n.createCallExpression( + n.createIdentifier("require"), + /*typeArguments*/ + void 0, + ve ? [n.createIdentifier("s")] : fe ? [fe] : [] + ); + Hg(_) && (lt = i().createImportStarHelper(lt)); + const zt = ve ? [ + n.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + /*name*/ + "s" + ) + ] : []; + let de; + return g >= 2 ? de = n.createArrowFunction( + /*modifiers*/ + void 0, + /*typeParameters*/ + void 0, + /*parameters*/ + zt, + /*type*/ + void 0, + /*equalsGreaterThanToken*/ + void 0, + lt + ) : de = n.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + /*parameters*/ + zt, + /*type*/ + void 0, + n.createBlock([n.createReturnStatement(lt)]) + ), n.createCallExpression( + n.createPropertyAccessExpression(X, "then"), + /*typeArguments*/ + void 0, + [de] + ); + } + function pi(fe, L) { + return !Hg(_) || td(fe) & 2 ? L : yne(fe) ? i().createImportStarHelper(L) : L; + } + function Xn(fe, L) { + return !Hg(_) || td(fe) & 2 ? L : fO(fe) ? i().createImportStarHelper(L) : TW(fe) ? i().createImportDefaultHelper(L) : L; + } + function jr(fe) { + let L; + const ve = OC(fe); + if (h !== 2) + if (fe.importClause) { + const X = []; + ve && !bS(fe) ? X.push( + n.createVariableDeclaration( + n.cloneNode(ve.name), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Xn(fe, di(fe)) + ) + ) : (X.push( + n.createVariableDeclaration( + n.getGeneratedNameForNode(fe), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Xn(fe, di(fe)) + ) + ), ve && bS(fe) && X.push( + n.createVariableDeclaration( + n.cloneNode(ve.name), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + n.getGeneratedNameForNode(fe) + ) + )), L = Pr( + L, + Sn( + ot( + n.createVariableStatement( + /*modifiers*/ + void 0, + n.createVariableDeclarationList( + X, + g >= 2 ? 2 : 0 + /* None */ + ) + ), + /*location*/ + fe + ), + /*original*/ + fe + ) + ); + } else + return Sn(ot(n.createExpressionStatement(di(fe)), fe), fe); + else ve && bS(fe) && (L = Pr( + L, + n.createVariableStatement( + /*modifiers*/ + void 0, + n.createVariableDeclarationList( + [ + Sn( + ot( + n.createVariableDeclaration( + n.cloneNode(ve.name), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + n.getGeneratedNameForNode(fe) + ), + /*location*/ + fe + ), + /*original*/ + fe + ) + ], + g >= 2 ? 2 : 0 + /* None */ + ) + ) + )); + return L = Ks(L, fe), Gm(L); + } + function di(fe) { + const L = Qx(n, fe, D, m, u, _), ve = []; + return L && ve.push(nk(L, _)), n.createCallExpression( + n.createIdentifier("require"), + /*typeArguments*/ + void 0, + ve + ); + } + function Re(fe) { + E.assert(tv(fe), "import= for internal module references should be handled in an earlier transformer."); + let L; + return h !== 2 ? $n( + fe, + 32 + /* Export */ + ) ? L = Pr( + L, + Sn( + ot( + n.createExpressionStatement( + Ke( + fe.name, + di(fe) + ) + ), + fe + ), + fe + ) + ) : L = Pr( + L, + Sn( + ot( + n.createVariableStatement( + /*modifiers*/ + void 0, + n.createVariableDeclarationList( + [ + n.createVariableDeclaration( + n.cloneNode(fe.name), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + di(fe) + ) + ], + /*flags*/ + g >= 2 ? 2 : 0 + /* None */ + ) + ), + fe + ), + fe + ) + ) : $n( + fe, + 32 + /* Export */ + ) && (L = Pr( + L, + Sn( + ot( + n.createExpressionStatement( + Ke(n.getExportName(fe), n.getLocalName(fe)) + ), + fe + ), + fe + ) + )), L = xr(L, fe), Gm(L); + } + function gt(fe) { + if (!fe.moduleSpecifier) + return; + const L = n.getGeneratedNameForNode(fe); + if (fe.exportClause && up(fe.exportClause)) { + const ve = []; + h !== 2 && ve.push( + Sn( + ot( + n.createVariableStatement( + /*modifiers*/ + void 0, + n.createVariableDeclarationList([ + n.createVariableDeclaration( + L, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + di(fe) + ) + ]) + ), + /*location*/ + fe + ), + /* original */ + fe + ) + ); + for (const X of fe.exportClause.elements) { + const lt = X.propertyName || X.name, de = !!Hg(_) && !(td(fe) & 2) && Km(lt) ? i().createImportDefaultHelper(L) : L, st = lt.kind === 11 ? n.createElementAccessExpression(de, lt) : n.createPropertyAccessExpression(de, lt); + ve.push( + Sn( + ot( + n.createExpressionStatement( + Ke( + X.name.kind === 11 ? n.cloneNode(X.name) : n.getExportName(X), + st, + /*location*/ + void 0, + /*liveBinding*/ + !0 + ) + ), + X + ), + X + ) + ); + } + return Gm(ve); + } else if (fe.exportClause) { + const ve = []; + return ve.push( + Sn( + ot( + n.createExpressionStatement( + Ke( + n.cloneNode(fe.exportClause.name), + pi( + fe, + h !== 2 ? di(fe) : w7(fe) || fe.exportClause.name.kind === 11 ? L : n.createIdentifier(An(fe.exportClause.name)) + ) + ) + ), + fe + ), + fe + ) + ), Gm(ve); + } else + return Sn( + ot( + n.createExpressionStatement( + i().createExportStarHelper(h !== 2 ? di(fe) : L) + ), + fe + ), + fe + ); + } + function tr(fe) { + if (!fe.isExportEquals) + return $e( + n.createIdentifier("default"), + Xe(fe.expression, Te, ct), + /*location*/ + fe, + /*allowComments*/ + !0 + ); + } + function qr(fe) { + let L; + return $n( + fe, + 32 + /* Export */ + ) ? L = Pr( + L, + Sn( + ot( + n.createFunctionDeclaration( + Or(fe.modifiers, Je, ia), + fe.asteriskToken, + n.getDeclarationName( + fe, + /*allowComments*/ + !0, + /*allowSourceMaps*/ + !0 + ), + /*typeParameters*/ + void 0, + Or(fe.parameters, Te, Ii), + /*type*/ + void 0, + kr(fe.body, Te, e) + ), + /*location*/ + fe + ), + /*original*/ + fe + ) + ) : L = Pr(L, kr(fe, Te, e)), Gm(L); + } + function Bn(fe) { + let L; + return $n( + fe, + 32 + /* Export */ + ) ? L = Pr( + L, + Sn( + ot( + n.createClassDeclaration( + Or(fe.modifiers, Je, Oo), + n.getDeclarationName( + fe, + /*allowComments*/ + !0, + /*allowSourceMaps*/ + !0 + ), + /*typeParameters*/ + void 0, + Or(fe.heritageClauses, Te, Z_), + Or(fe.members, Te, sl) + ), + fe + ), + fe + ) + ) : L = Pr(L, kr(fe, Te, e)), L = ee(L, fe), Gm(L); + } + function wn(fe) { + let L, ve, X; + if ($n( + fe, + 32 + /* Export */ + )) { + let lt, zt = !1; + for (const de of fe.declarationList.declarations) + if (Me(de.name) && Rh(de.name)) + if (lt || (lt = Or(fe.modifiers, Je, ia)), de.initializer) { + const st = n.updateVariableDeclaration( + de, + de.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Ke( + de.name, + Xe(de.initializer, Te, ct) + ) + ); + ve = Pr(ve, st); + } else + ve = Pr(ve, de); + else if (de.initializer) + if (!Ds(de.name) && (bo(de.initializer) || po(de.initializer) || Gc(de.initializer))) { + const st = n.createAssignment( + ot( + n.createPropertyAccessExpression( + n.createIdentifier("exports"), + de.name + ), + /*location*/ + de.name + ), + n.createIdentifier(rp(de.name)) + ), Gt = n.createVariableDeclaration( + de.name, + de.exclamationToken, + de.type, + Xe(de.initializer, Te, ct) + ); + ve = Pr(ve, Gt), X = Pr(X, st), zt = !0; + } else + X = Pr(X, Cs(de)); + if (ve && (L = Pr(L, n.updateVariableStatement(fe, lt, n.updateVariableDeclarationList(fe.declarationList, ve)))), X) { + const de = Sn(ot(n.createExpressionStatement(n.inlineExpressions(X)), fe), fe); + zt && cN(de), L = Pr(L, de); + } + } else + L = Pr(L, kr(fe, Te, e)); + return L = gs(L, fe), Gm(L); + } + function ki(fe, L, ve) { + const X = ft(fe); + if (X) { + let lt = DF(fe) ? L : n.createAssignment(fe, L); + for (const zt of X) + on( + lt, + 8 + /* NoSubstitution */ + ), lt = Ke( + zt, + lt, + /*location*/ + ve + ); + return lt; + } + return n.createAssignment(fe, L); + } + function Cs(fe) { + return Ds(fe.name) ? qS( + Xe(fe, Te, U3), + Te, + e, + 0, + /*needsValue*/ + !1, + ki + ) : n.createAssignment( + ot( + n.createPropertyAccessExpression( + n.createIdentifier("exports"), + fe.name + ), + /*location*/ + fe.name + ), + fe.initializer ? Xe(fe.initializer, Te, ct) : n.createVoidZero() + ); + } + function Ks(fe, L) { + if (w.exportEquals) + return fe; + const ve = L.importClause; + if (!ve) + return fe; + const X = new S6(); + ve.name && (fe = Ve(fe, X, ve)); + const lt = ve.namedBindings; + if (lt) + switch (lt.kind) { + case 274: + fe = Ve(fe, X, lt); + break; + case 275: + for (const zt of lt.elements) + fe = Ve( + fe, + X, + zt, + /*liveBinding*/ + !0 + ); + break; + } + return fe; + } + function xr(fe, L) { + return w.exportEquals ? fe : Ve(fe, new S6(), L); + } + function gs(fe, L) { + return Qe( + fe, + L.declarationList, + /*isForInOrOfInitializer*/ + !1 + ); + } + function Qe(fe, L, ve) { + if (w.exportEquals) + return fe; + for (const X of L.declarations) + fe = Ct(fe, X, ve); + return fe; + } + function Ct(fe, L, ve) { + if (w.exportEquals) + return fe; + if (Ds(L.name)) + for (const X of L.name.elements) + ul(X) || (fe = Ct(fe, X, ve)); + else !Fo(L.name) && (!Kn(L) || L.initializer || ve) && (fe = Ve(fe, new S6(), L)); + return fe; + } + function ee(fe, L) { + if (w.exportEquals) + return fe; + const ve = new S6(); + if ($n( + L, + 32 + /* Export */ + )) { + const X = $n( + L, + 2048 + /* Default */ + ) ? n.createIdentifier("default") : n.getDeclarationName(L); + fe = K( + fe, + ve, + X, + n.getLocalName(L), + /*location*/ + L + ); + } + return L.name && (fe = Ve(fe, ve, L)), fe; + } + function Ve(fe, L, ve, X) { + const lt = n.getDeclarationName(ve), zt = w.exportSpecifiers.get(lt); + if (zt) + for (const de of zt) + fe = K( + fe, + L, + de.name, + lt, + /*location*/ + de.name, + /*allowComments*/ + void 0, + X + ); + return fe; + } + function K(fe, L, ve, X, lt, zt, de) { + if (ve.kind !== 11) { + if (L.has(ve)) + return fe; + L.set(ve, !0); + } + return fe = Pr(fe, $e(ve, X, lt, zt, de)), fe; + } + function Ie() { + const fe = n.createExpressionStatement( + n.createCallExpression( + n.createPropertyAccessExpression(n.createIdentifier("Object"), "defineProperty"), + /*typeArguments*/ + void 0, + [ + n.createIdentifier("exports"), + n.createStringLiteral("__esModule"), + n.createObjectLiteralExpression([ + n.createPropertyAssignment("value", n.createTrue()) + ]) + ] + ) + ); + return on( + fe, + 2097152 + /* CustomPrologue */ + ), fe; + } + function $e(fe, L, ve, X, lt) { + const zt = ot(n.createExpressionStatement(Ke( + fe, + L, + /*location*/ + void 0, + lt + )), ve); + return xu(zt), X || on( + zt, + 3072 + /* NoComments */ + ), zt; + } + function Ke(fe, L, ve, X) { + return ot( + X ? n.createCallExpression( + n.createPropertyAccessExpression( + n.createIdentifier("Object"), + "defineProperty" + ), + /*typeArguments*/ + void 0, + [ + n.createIdentifier("exports"), + n.createStringLiteralFromNode(fe), + n.createObjectLiteralExpression([ + n.createPropertyAssignment("enumerable", n.createTrue()), + n.createPropertyAssignment( + "get", + n.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + /*parameters*/ + [], + /*type*/ + void 0, + n.createBlock([n.createReturnStatement(L)]) + ) + ) + ]) + ] + ) : n.createAssignment( + fe.kind === 11 ? n.createElementAccessExpression( + n.createIdentifier("exports"), + n.cloneNode(fe) + ) : n.createPropertyAccessExpression( + n.createIdentifier("exports"), + n.cloneNode(fe) + ), + L + ), + ve + ); + } + function Je(fe) { + switch (fe.kind) { + case 95: + case 90: + return; + } + return fe; + } + function Ye(fe, L, ve) { + L.kind === 307 ? (D = L, w = C[Ku(D)], T(fe, L, ve), D = void 0, w = void 0) : T(fe, L, ve); + } + function _t(fe, L) { + return L = S(fe, L), L.id && O[L.id] ? L : fe === 1 ? We(L) : _u(L) ? yt(L) : L; + } + function yt(fe) { + const L = fe.name, ve = rn(L); + if (ve !== L) { + if (fe.objectAssignmentInitializer) { + const X = n.createAssignment(ve, fe.objectAssignmentInitializer); + return ot(n.createPropertyAssignment(L, X), fe); + } + return ot(n.createPropertyAssignment(L, ve), fe); + } + return fe; + } + function We(fe) { + switch (fe.kind) { + case 80: + return rn(fe); + case 213: + return Et(fe); + case 215: + return Xt(fe); + case 226: + return ye(fe); + } + return fe; + } + function Et(fe) { + if (Me(fe.expression)) { + const L = rn(fe.expression); + if (O[Aa(L)] = !0, !Me(L) && !(va(fe.expression) & 8192)) + return wS( + n.updateCallExpression( + fe, + L, + /*typeArguments*/ + void 0, + fe.arguments + ), + 16 + /* IndirectCall */ + ); + } + return fe; + } + function Xt(fe) { + if (Me(fe.tag)) { + const L = rn(fe.tag); + if (O[Aa(L)] = !0, !Me(L) && !(va(fe.tag) & 8192)) + return wS( + n.updateTaggedTemplateExpression( + fe, + L, + /*typeArguments*/ + void 0, + fe.template + ), + 16 + /* IndirectCall */ + ); + } + return fe; + } + function rn(fe) { + var L, ve; + if (va(fe) & 8192) { + const X = TN(D); + return X ? n.createPropertyAccessExpression(X, fe) : fe; + } else if (!(Fo(fe) && !(fe.emitNode.autoGenerate.flags & 64)) && !Rh(fe)) { + const X = u.getReferencedExportContainer(fe, DF(fe)); + if (X && X.kind === 307) + return ot( + n.createPropertyAccessExpression( + n.createIdentifier("exports"), + n.cloneNode(fe) + ), + /*location*/ + fe + ); + const lt = u.getReferencedImportDeclaration(fe); + if (lt) { + if (id(lt)) + return ot( + n.createPropertyAccessExpression( + n.getGeneratedNameForNode(lt.parent), + n.createIdentifier("default") + ), + /*location*/ + fe + ); + if (ju(lt)) { + const zt = lt.propertyName || lt.name, de = n.getGeneratedNameForNode(((ve = (L = lt.parent) == null ? void 0 : L.parent) == null ? void 0 : ve.parent) || lt); + return ot( + zt.kind === 11 ? n.createElementAccessExpression(de, n.cloneNode(zt)) : n.createPropertyAccessExpression(de, n.cloneNode(zt)), + /*location*/ + fe + ); + } + } + } + return fe; + } + function ye(fe) { + if (Ah(fe.operatorToken.kind) && Me(fe.left) && (!Fo(fe.left) || RP(fe.left)) && !Rh(fe.left)) { + const L = ft(fe.left); + if (L) { + let ve = fe; + for (const X of L) + O[Aa(ve)] = !0, ve = Ke( + X, + ve, + /*location*/ + fe + ); + return ve; + } + } + return fe; + } + function ft(fe) { + if (Fo(fe)) { + if (RP(fe)) { + const L = w?.exportSpecifiers.get(fe); + if (L) { + const ve = []; + for (const X of L) + ve.push(X.name); + return ve; + } + } + } else { + const L = u.getReferencedImportDeclaration(fe); + if (L) + return w?.exportedBindings[Ku(L)]; + const ve = /* @__PURE__ */ new Set(), X = u.getReferencedValueDeclarations(fe); + if (X) { + for (const lt of X) { + const zt = w?.exportedBindings[Ku(lt)]; + if (zt) + for (const de of zt) + ve.add(de); + } + if (ve.size) + return Ki(ve); + } + } + } + } + var tje = { + name: "typescript:dynamicimport-sync-require", + scoped: !0, + text: ` + var __syncRequire = typeof module === "object" && typeof module.exports === "object";` + }; + function Gne(e) { + const { + factory: t, + startLexicalEnvironment: n, + endLexicalEnvironment: i, + hoistVariableDeclaration: s + } = e, o = e.getCompilerOptions(), c = e.getEmitResolver(), _ = e.getEmitHost(), u = e.onSubstituteNode, m = e.onEmitNode; + e.onSubstituteNode = Ie, e.onEmitNode = K, e.enableSubstitution( + 80 + /* Identifier */ + ), e.enableSubstitution( + 304 + /* ShorthandPropertyAssignment */ + ), e.enableSubstitution( + 226 + /* BinaryExpression */ + ), e.enableSubstitution( + 236 + /* MetaProperty */ + ), e.enableEmitNotification( + 307 + /* SourceFile */ + ); + const g = [], h = [], S = [], T = []; + let C, D, w, A, O, F, R; + return Ad(e, W); + function W(ye) { + if (ye.isDeclarationFile || !(EC(ye, o) || ye.transformFlags & 8388608)) + return ye; + const ft = Ku(ye); + C = ye, F = ye, D = g[ft] = xW(e, ye), w = t.createUniqueName("exports"), h[ft] = w, A = T[ft] = t.createUniqueName("context"); + const fe = V(D.externalImports), L = $(ye, fe), ve = t.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + [ + t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + w + ), + t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + A + ) + ], + /*type*/ + void 0, + L + ), X = xN(t, ye, _, o), lt = t.createArrayLiteralExpression(gr(fe, (de) => de.name)), zt = on( + t.updateSourceFile( + ye, + ot( + t.createNodeArray([ + t.createExpressionStatement( + t.createCallExpression( + t.createPropertyAccessExpression(t.createIdentifier("System"), "register"), + /*typeArguments*/ + void 0, + X ? [X, lt, ve] : [lt, ve] + ) + ) + ]), + ye.statements + ) + ), + 2048 + /* NoTrailingComments */ + ); + return o.outFile || ete(zt, L, (de) => !de.scoped), R && (S[ft] = R, R = void 0), C = void 0, D = void 0, w = void 0, A = void 0, O = void 0, F = void 0, zt; + } + function V(ye) { + const ft = /* @__PURE__ */ new Map(), fe = []; + for (const L of ye) { + const ve = Qx(t, L, C, _, c, o); + if (ve) { + const X = ve.text, lt = ft.get(X); + lt !== void 0 ? fe[lt].externalImports.push(L) : (ft.set(X, fe.length), fe.push({ + name: ve, + externalImports: [L] + })); + } + } + return fe; + } + function $(ye, ft) { + const fe = []; + n(); + const L = lu(o, "alwaysStrict") || el(C), ve = t.copyPrologue(ye.statements, fe, L, J); + fe.push( + t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList([ + t.createVariableDeclaration( + "__moduleName", + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createLogicalAnd( + A, + t.createPropertyAccessExpression(A, "id") + ) + ) + ]) + ) + ), Xe(D.externalHelpersImportDeclaration, J, xi); + const X = Or(ye.statements, J, xi, ve); + Nn(fe, O), Bg(fe, i()); + const lt = U(fe), zt = ye.transformFlags & 2097152 ? t.createModifiersFromModifierFlags( + 1024 + /* Async */ + ) : void 0, de = t.createObjectLiteralExpression( + [ + t.createPropertyAssignment("setters", Z(lt, ft)), + t.createPropertyAssignment( + "execute", + t.createFunctionExpression( + zt, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + /*parameters*/ + [], + /*type*/ + void 0, + t.createBlock( + X, + /*multiLine*/ + !0 + ) + ) + ) + ], + /*multiLine*/ + !0 + ); + return fe.push(t.createReturnStatement(de)), t.createBlock( + fe, + /*multiLine*/ + !0 + ); + } + function U(ye) { + if (!D.hasExportStarsToExportValues) + return; + if (!at(D.exportedNames) && D.exportedFunctions.size === 0 && D.exportSpecifiers.size === 0) { + let ve = !1; + for (const X of D.externalImports) + if (X.kind === 278 && X.exportClause) { + ve = !0; + break; + } + if (!ve) { + const X = _e( + /*localNames*/ + void 0 + ); + return ye.push(X), X.name; + } + } + const ft = []; + if (D.exportedNames) + for (const ve of D.exportedNames) + Km(ve) || ft.push( + t.createPropertyAssignment( + t.createStringLiteralFromNode(ve), + t.createTrue() + ) + ); + for (const ve of D.exportedFunctions) + $n( + ve, + 2048 + /* Default */ + ) || (E.assert(!!ve.name), ft.push( + t.createPropertyAssignment( + t.createStringLiteralFromNode(ve.name), + t.createTrue() + ) + )); + const fe = t.createUniqueName("exportedNames"); + ye.push( + t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList([ + t.createVariableDeclaration( + fe, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createObjectLiteralExpression( + ft, + /*multiLine*/ + !0 + ) + ) + ]) + ) + ); + const L = _e(fe); + return ye.push(L), L.name; + } + function _e(ye) { + const ft = t.createUniqueName("exportStar"), fe = t.createIdentifier("m"), L = t.createIdentifier("n"), ve = t.createIdentifier("exports"); + let X = t.createStrictInequality(L, t.createStringLiteral("default")); + return ye && (X = t.createLogicalAnd( + X, + t.createLogicalNot( + t.createCallExpression( + t.createPropertyAccessExpression(ye, "hasOwnProperty"), + /*typeArguments*/ + void 0, + [L] + ) + ) + )), t.createFunctionDeclaration( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + ft, + /*typeParameters*/ + void 0, + [t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + fe + )], + /*type*/ + void 0, + t.createBlock( + [ + t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList([ + t.createVariableDeclaration( + ve, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createObjectLiteralExpression([]) + ) + ]) + ), + t.createForInStatement( + t.createVariableDeclarationList([ + t.createVariableDeclaration(L) + ]), + fe, + t.createBlock([ + on( + t.createIfStatement( + X, + t.createExpressionStatement( + t.createAssignment( + t.createElementAccessExpression(ve, L), + t.createElementAccessExpression(fe, L) + ) + ) + ), + 1 + /* SingleLine */ + ) + ]) + ), + t.createExpressionStatement( + t.createCallExpression( + w, + /*typeArguments*/ + void 0, + [ve] + ) + ) + ], + /*multiLine*/ + !0 + ) + ); + } + function Z(ye, ft) { + const fe = []; + for (const L of ft) { + const ve = lr(L.externalImports, (zt) => u6(t, zt, C)), X = ve ? t.getGeneratedNameForNode(ve) : t.createUniqueName(""), lt = []; + for (const zt of L.externalImports) { + const de = u6(t, zt, C); + switch (zt.kind) { + case 272: + if (!zt.importClause) + break; + // falls through + case 271: + E.assert(de !== void 0), lt.push( + t.createExpressionStatement( + t.createAssignment(de, X) + ) + ), $n( + zt, + 32 + /* Export */ + ) && lt.push( + t.createExpressionStatement( + t.createCallExpression( + w, + /*typeArguments*/ + void 0, + [ + t.createStringLiteral(An(de)), + X + ] + ) + ) + ); + break; + case 278: + if (E.assert(de !== void 0), zt.exportClause) + if (up(zt.exportClause)) { + const st = []; + for (const Gt of zt.exportClause.elements) + st.push( + t.createPropertyAssignment( + t.createStringLiteral(qy(Gt.name)), + t.createElementAccessExpression( + X, + t.createStringLiteral(qy(Gt.propertyName || Gt.name)) + ) + ) + ); + lt.push( + t.createExpressionStatement( + t.createCallExpression( + w, + /*typeArguments*/ + void 0, + [t.createObjectLiteralExpression( + st, + /*multiLine*/ + !0 + )] + ) + ) + ); + } else + lt.push( + t.createExpressionStatement( + t.createCallExpression( + w, + /*typeArguments*/ + void 0, + [ + t.createStringLiteral(qy(zt.exportClause.name)), + X + ] + ) + ) + ); + else + lt.push( + t.createExpressionStatement( + t.createCallExpression( + ye, + /*typeArguments*/ + void 0, + [X] + ) + ) + ); + break; + } + } + fe.push( + t.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + [t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + X + )], + /*type*/ + void 0, + t.createBlock( + lt, + /*multiLine*/ + !0 + ) + ) + ); + } + return t.createArrayLiteralExpression( + fe, + /*multiLine*/ + !0 + ); + } + function J(ye) { + switch (ye.kind) { + case 272: + return re(ye); + case 271: + return ie(ye); + case 278: + return te(ye); + case 277: + return le(ye); + default: + return Lt(ye); + } + } + function re(ye) { + let ft; + return ye.importClause && s(u6(t, ye, C)), Gm(Oe(ft, ye)); + } + function te(ye) { + E.assertIsDefined(ye); + } + function ie(ye) { + E.assert(tv(ye), "import= for internal module references should be handled in an earlier transformer."); + let ft; + return s(u6(t, ye, C)), Gm(xe(ft, ye)); + } + function le(ye) { + if (ye.isExportEquals) + return; + const ft = Xe(ye.expression, wn, ct); + return Ue( + t.createIdentifier("default"), + ft, + /*allowComments*/ + !0 + ); + } + function Te(ye) { + $n( + ye, + 32 + /* Export */ + ) ? O = Pr( + O, + t.updateFunctionDeclaration( + ye, + Or(ye.modifiers, Ve, Oo), + ye.asteriskToken, + t.getDeclarationName( + ye, + /*allowComments*/ + !0, + /*allowSourceMaps*/ + !0 + ), + /*typeParameters*/ + void 0, + Or(ye.parameters, wn, Ii), + /*type*/ + void 0, + Xe(ye.body, wn, ks) + ) + ) : O = Pr(O, kr(ye, wn, e)), O = Ae(O, ye); + } + function q(ye) { + let ft; + const fe = t.getLocalName(ye); + return s(fe), ft = Pr( + ft, + ot( + t.createExpressionStatement( + t.createAssignment( + fe, + ot( + t.createClassExpression( + Or(ye.modifiers, Ve, Oo), + ye.name, + /*typeParameters*/ + void 0, + Or(ye.heritageClauses, wn, Z_), + Or(ye.members, wn, sl) + ), + ye + ) + ) + ), + ye + ) + ), ft = Ae(ft, ye), Gm(ft); + } + function me(ye) { + if (!Ee(ye.declarationList)) + return Xe(ye, wn, xi); + let ft; + if (n3(ye.declarationList) || r3(ye.declarationList)) { + const fe = Or(ye.modifiers, Ve, Oo), L = []; + for (const X of ye.declarationList.declarations) + L.push(t.updateVariableDeclaration( + X, + t.getGeneratedNameForNode(X.name), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + oe( + X, + /*isExportedDeclaration*/ + !1 + ) + )); + const ve = t.updateVariableDeclarationList( + ye.declarationList, + L + ); + ft = Pr(ft, t.updateVariableStatement(ye, fe, ve)); + } else { + let fe; + const L = $n( + ye, + 32 + /* Export */ + ); + for (const ve of ye.declarationList.declarations) + ve.initializer ? fe = Pr(fe, oe(ve, L)) : Ce(ve); + fe && (ft = Pr(ft, ot(t.createExpressionStatement(t.inlineExpressions(fe)), ye))); + } + return ft = he( + ft, + ye, + /*exportSelf*/ + !1 + ), Gm(ft); + } + function Ce(ye) { + if (Ds(ye.name)) + for (const ft of ye.name.elements) + ul(ft) || Ce(ft); + else + s(t.cloneNode(ye.name)); + } + function Ee(ye) { + return (va(ye) & 4194304) === 0 && (F.kind === 307 || (Jo(ye).flags & 7) === 0); + } + function oe(ye, ft) { + const fe = ft ? ke : ue; + return Ds(ye.name) ? qS( + ye, + wn, + e, + 0, + /*needsValue*/ + !1, + fe + ) : ye.initializer ? fe(ye.name, Xe(ye.initializer, wn, ct)) : ye.name; + } + function ke(ye, ft, fe) { + return it( + ye, + ft, + fe, + /*isExportedDeclaration*/ + !0 + ); + } + function ue(ye, ft, fe) { + return it( + ye, + ft, + fe, + /*isExportedDeclaration*/ + !1 + ); + } + function it(ye, ft, fe, L) { + return s(t.cloneNode(ye)), L ? bt(ye, Xt(ot(t.createAssignment(ye, ft), fe))) : Xt(ot(t.createAssignment(ye, ft), fe)); + } + function Oe(ye, ft) { + if (D.exportEquals) + return ye; + const fe = ft.importClause; + if (!fe) + return ye; + fe.name && (ye = De(ye, fe)); + const L = fe.namedBindings; + if (L) + switch (L.kind) { + case 274: + ye = De(ye, L); + break; + case 275: + for (const ve of L.elements) + ye = De(ye, ve); + break; + } + return ye; + } + function xe(ye, ft) { + return D.exportEquals ? ye : De(ye, ft); + } + function he(ye, ft, fe) { + if (D.exportEquals) + return ye; + for (const L of ft.declarationList.declarations) + (L.initializer || fe) && (ye = ne(ye, L)); + return ye; + } + function ne(ye, ft, fe) { + if (D.exportEquals) + return ye; + if (Ds(ft.name)) + for (const L of ft.name.elements) + ul(L) || (ye = ne(ye, L)); + else Fo(ft.name) || (ye = De(ye, ft, void 0)); + return ye; + } + function Ae(ye, ft) { + if (D.exportEquals) + return ye; + let fe; + if ($n( + ft, + 32 + /* Export */ + )) { + const L = $n( + ft, + 2048 + /* Default */ + ) ? t.createStringLiteral("default") : ft.name; + ye = we(ye, L, t.getLocalName(ft)), fe = rp(L); + } + return ft.name && (ye = De(ye, ft, fe)), ye; + } + function De(ye, ft, fe) { + if (D.exportEquals) + return ye; + const L = t.getDeclarationName(ft), ve = D.exportSpecifiers.get(L); + if (ve) + for (const X of ve) + qy(X.name) !== fe && (ye = we(ye, X.name, L)); + return ye; + } + function we(ye, ft, fe, L) { + return ye = Pr(ye, Ue(ft, fe, L)), ye; + } + function Ue(ye, ft, fe) { + const L = t.createExpressionStatement(bt(ye, ft)); + return xu(L), fe || on( + L, + 3072 + /* NoComments */ + ), L; + } + function bt(ye, ft) { + const fe = Me(ye) ? t.createStringLiteralFromNode(ye) : ye; + return on( + ft, + va(ft) | 3072 + /* NoComments */ + ), Hc(t.createCallExpression( + w, + /*typeArguments*/ + void 0, + [fe, ft] + ), ft); + } + function Lt(ye) { + switch (ye.kind) { + case 243: + return me(ye); + case 262: + return Te(ye); + case 263: + return q(ye); + case 248: + return er( + ye, + /*isTopLevel*/ + !0 + ); + case 249: + return Nr(ye); + case 250: + return Dt(ye); + case 246: + return yr(ye); + case 247: + return qn(ye); + case 256: + return Bt(ye); + case 254: + return bi(ye); + case 245: + return pi(ye); + case 255: + return Xn(ye); + case 269: + return jr(ye); + case 296: + return di(ye); + case 297: + return Re(ye); + case 258: + return gt(ye); + case 299: + return tr(ye); + case 241: + return qr(ye); + default: + return wn(ye); + } + } + function er(ye, ft) { + const fe = F; + return F = ye, ye = t.updateForStatement( + ye, + Xe(ye.initializer, ft ? Wr : ki, Kf), + Xe(ye.condition, wn, ct), + Xe(ye.incrementor, ki, ct), + Zu(ye.statement, ft ? Lt : wn, e) + ), F = fe, ye; + } + function Nr(ye) { + const ft = F; + return F = ye, ye = t.updateForInStatement( + ye, + Wr(ye.initializer), + Xe(ye.expression, wn, ct), + Zu(ye.statement, Lt, e) + ), F = ft, ye; + } + function Dt(ye) { + const ft = F; + return F = ye, ye = t.updateForOfStatement( + ye, + ye.awaitModifier, + Wr(ye.initializer), + Xe(ye.expression, wn, ct), + Zu(ye.statement, Lt, e) + ), F = ft, ye; + } + function Qt(ye) { + return Il(ye) && Ee(ye); + } + function Wr(ye) { + if (Qt(ye)) { + let ft; + for (const fe of ye.declarations) + ft = Pr(ft, oe( + fe, + /*isExportedDeclaration*/ + !1 + )), fe.initializer || Ce(fe); + return ft ? t.inlineExpressions(ft) : t.createOmittedExpression(); + } else + return Xe(ye, ki, Kf); + } + function yr(ye) { + return t.updateDoStatement( + ye, + Zu(ye.statement, Lt, e), + Xe(ye.expression, wn, ct) + ); + } + function qn(ye) { + return t.updateWhileStatement( + ye, + Xe(ye.expression, wn, ct), + Zu(ye.statement, Lt, e) + ); + } + function Bt(ye) { + return t.updateLabeledStatement( + ye, + ye.label, + Xe(ye.statement, Lt, xi, t.liftToBlock) ?? t.createExpressionStatement(t.createIdentifier("")) + ); + } + function bi(ye) { + return t.updateWithStatement( + ye, + Xe(ye.expression, wn, ct), + E.checkDefined(Xe(ye.statement, Lt, xi, t.liftToBlock)) + ); + } + function pi(ye) { + return t.updateIfStatement( + ye, + Xe(ye.expression, wn, ct), + Xe(ye.thenStatement, Lt, xi, t.liftToBlock) ?? t.createBlock([]), + Xe(ye.elseStatement, Lt, xi, t.liftToBlock) + ); + } + function Xn(ye) { + return t.updateSwitchStatement( + ye, + Xe(ye.expression, wn, ct), + E.checkDefined(Xe(ye.caseBlock, Lt, kD)) + ); + } + function jr(ye) { + const ft = F; + return F = ye, ye = t.updateCaseBlock( + ye, + Or(ye.clauses, Lt, g7) + ), F = ft, ye; + } + function di(ye) { + return t.updateCaseClause( + ye, + Xe(ye.expression, wn, ct), + Or(ye.statements, Lt, xi) + ); + } + function Re(ye) { + return kr(ye, Lt, e); + } + function gt(ye) { + return kr(ye, Lt, e); + } + function tr(ye) { + const ft = F; + return F = ye, ye = t.updateCatchClause( + ye, + ye.variableDeclaration, + E.checkDefined(Xe(ye.block, Lt, ks)) + ), F = ft, ye; + } + function qr(ye) { + const ft = F; + return F = ye, ye = kr(ye, Lt, e), F = ft, ye; + } + function Bn(ye, ft) { + if (!(ye.transformFlags & 276828160)) + return ye; + switch (ye.kind) { + case 248: + return er( + ye, + /*isTopLevel*/ + !1 + ); + case 244: + return Cs(ye); + case 217: + return Ks(ye, ft); + case 355: + return xr(ye, ft); + case 226: + if (P0(ye)) + return Qe(ye, ft); + break; + case 213: + if (_f(ye)) + return gs(ye); + break; + case 224: + case 225: + return ee(ye, ft); + } + return kr(ye, wn, e); + } + function wn(ye) { + return Bn( + ye, + /*valueIsDiscarded*/ + !1 + ); + } + function ki(ye) { + return Bn( + ye, + /*valueIsDiscarded*/ + !0 + ); + } + function Cs(ye) { + return t.updateExpressionStatement(ye, Xe(ye.expression, ki, ct)); + } + function Ks(ye, ft) { + return t.updateParenthesizedExpression(ye, Xe(ye.expression, ft ? ki : wn, ct)); + } + function xr(ye, ft) { + return t.updatePartiallyEmittedExpression(ye, Xe(ye.expression, ft ? ki : wn, ct)); + } + function gs(ye) { + const ft = Qx(t, ye, C, _, c, o), fe = Xe(Uc(ye.arguments), wn, ct), L = ft && (!fe || !ea(fe) || fe.text !== ft.text) ? ft : fe; + return t.createCallExpression( + t.createPropertyAccessExpression( + A, + t.createIdentifier("import") + ), + /*typeArguments*/ + void 0, + L ? [L] : [] + ); + } + function Qe(ye, ft) { + return Ct(ye.left) ? qS( + ye, + wn, + e, + 0, + !ft + ) : kr(ye, wn, e); + } + function Ct(ye) { + if (Cl( + ye, + /*excludeCompoundAssignment*/ + !0 + )) + return Ct(ye.left); + if (lp(ye)) + return Ct(ye.expression); + if (oa(ye)) + return at(ye.properties, Ct); + if (Ql(ye)) + return at(ye.elements, Ct); + if (_u(ye)) + return Ct(ye.name); + if (Xc(ye)) + return Ct(ye.initializer); + if (Me(ye)) { + const ft = c.getReferencedExportContainer(ye); + return ft !== void 0 && ft.kind === 307; + } else + return !1; + } + function ee(ye, ft) { + if ((ye.operator === 46 || ye.operator === 47) && Me(ye.operand) && !Fo(ye.operand) && !Rh(ye.operand) && !nJ(ye.operand)) { + const fe = We(ye.operand); + if (fe) { + let L, ve = Xe(ye.operand, wn, ct); + pv(ye) ? ve = t.updatePrefixUnaryExpression(ye, ve) : (ve = t.updatePostfixUnaryExpression(ye, ve), ft || (L = t.createTempVariable(s), ve = t.createAssignment(L, ve), ot(ve, ye)), ve = t.createComma(ve, t.cloneNode(ye.operand)), ot(ve, ye)); + for (const X of fe) + ve = bt(X, Xt(ve)); + return L && (ve = t.createComma(ve, L), ot(ve, ye)), ve; + } + } + return kr(ye, wn, e); + } + function Ve(ye) { + switch (ye.kind) { + case 95: + case 90: + return; + } + return ye; + } + function K(ye, ft, fe) { + if (ft.kind === 307) { + const L = Ku(ft); + C = ft, D = g[L], w = h[L], R = S[L], A = T[L], R && delete S[L], m(ye, ft, fe), C = void 0, D = void 0, w = void 0, A = void 0, R = void 0; + } else + m(ye, ft, fe); + } + function Ie(ye, ft) { + return ft = u(ye, ft), rn(ft) ? ft : ye === 1 ? Je(ft) : ye === 4 ? $e(ft) : ft; + } + function $e(ye) { + switch (ye.kind) { + case 304: + return Ke(ye); + } + return ye; + } + function Ke(ye) { + var ft, fe; + const L = ye.name; + if (!Fo(L) && !Rh(L)) { + const ve = c.getReferencedImportDeclaration(L); + if (ve) { + if (id(ve)) + return ot( + t.createPropertyAssignment( + t.cloneNode(L), + t.createPropertyAccessExpression( + t.getGeneratedNameForNode(ve.parent), + t.createIdentifier("default") + ) + ), + /*location*/ + ye + ); + if (ju(ve)) { + const X = ve.propertyName || ve.name, lt = t.getGeneratedNameForNode(((fe = (ft = ve.parent) == null ? void 0 : ft.parent) == null ? void 0 : fe.parent) || ve); + return ot( + t.createPropertyAssignment( + t.cloneNode(L), + X.kind === 11 ? t.createElementAccessExpression(lt, t.cloneNode(X)) : t.createPropertyAccessExpression(lt, t.cloneNode(X)) + ), + /*location*/ + ye + ); + } + } + } + return ye; + } + function Je(ye) { + switch (ye.kind) { + case 80: + return Ye(ye); + case 226: + return _t(ye); + case 236: + return yt(ye); + } + return ye; + } + function Ye(ye) { + var ft, fe; + if (va(ye) & 8192) { + const L = TN(C); + return L ? t.createPropertyAccessExpression(L, ye) : ye; + } + if (!Fo(ye) && !Rh(ye)) { + const L = c.getReferencedImportDeclaration(ye); + if (L) { + if (id(L)) + return ot( + t.createPropertyAccessExpression( + t.getGeneratedNameForNode(L.parent), + t.createIdentifier("default") + ), + /*location*/ + ye + ); + if (ju(L)) { + const ve = L.propertyName || L.name, X = t.getGeneratedNameForNode(((fe = (ft = L.parent) == null ? void 0 : ft.parent) == null ? void 0 : fe.parent) || L); + return ot( + ve.kind === 11 ? t.createElementAccessExpression(X, t.cloneNode(ve)) : t.createPropertyAccessExpression(X, t.cloneNode(ve)), + /*location*/ + ye + ); + } + } + } + return ye; + } + function _t(ye) { + if (Ah(ye.operatorToken.kind) && Me(ye.left) && (!Fo(ye.left) || RP(ye.left)) && !Rh(ye.left)) { + const ft = We(ye.left); + if (ft) { + let fe = ye; + for (const L of ft) + fe = bt(L, Xt(fe)); + return fe; + } + } + return ye; + } + function yt(ye) { + return PC(ye) ? t.createPropertyAccessExpression(A, t.createIdentifier("meta")) : ye; + } + function We(ye) { + let ft; + const fe = Et(ye); + if (fe) { + const L = c.getReferencedExportContainer( + ye, + /*prefixLocals*/ + !1 + ); + L && L.kind === 307 && (ft = Pr(ft, t.getDeclarationName(fe))), ft = Nn(ft, D?.exportedBindings[Ku(fe)]); + } else if (Fo(ye) && RP(ye)) { + const L = D?.exportSpecifiers.get(ye); + if (L) { + const ve = []; + for (const X of L) + ve.push(X.name); + return ve; + } + } + return ft; + } + function Et(ye) { + if (!Fo(ye)) { + const ft = c.getReferencedImportDeclaration(ye); + if (ft) return ft; + const fe = c.getReferencedValueDeclaration(ye); + if (fe && D?.exportedBindings[Ku(fe)]) return fe; + const L = c.getReferencedValueDeclarations(ye); + if (L) { + for (const ve of L) + if (ve !== fe && D?.exportedBindings[Ku(ve)]) return ve; + } + return fe; + } + } + function Xt(ye) { + return R === void 0 && (R = []), R[Aa(ye)] = !0, ye; + } + function rn(ye) { + return R && ye.id && R[ye.id]; + } + } + function IW(e) { + const { + factory: t, + getEmitHelperFactory: n + } = e, i = e.getEmitHost(), s = e.getEmitResolver(), o = e.getCompilerOptions(), c = pa(o), _ = e.onEmitNode, u = e.onSubstituteNode; + e.onEmitNode = U, e.onSubstituteNode = _e, e.enableEmitNotification( + 307 + /* SourceFile */ + ), e.enableSubstitution( + 80 + /* Identifier */ + ); + const m = /* @__PURE__ */ new Set(); + let g, h, S, T; + return Ad(e, C); + function C(J) { + if (J.isDeclarationFile) + return J; + if (el(J) || Mp(o)) { + S = J, T = void 0, o.rewriteRelativeImportExtensions && (S.flags & 4194304 || an(J)) && tF( + J, + /*includeTypeSpaceImports*/ + !1, + /*requireStringLiteralLikeArgument*/ + !1, + (te) => { + (!Na(te.arguments[0]) || S3(te.arguments[0].text, o)) && (g = Pr(g, te)); + } + ); + let re = D(J); + return Qg(re, e.readEmitHelpers()), S = void 0, T && (re = t.updateSourceFile( + re, + ot(t.createNodeArray(Gj(re.statements.slice(), T)), re.statements) + )), !el(J) || Ru(o) === 200 || at(re.statements, UP) ? re : t.updateSourceFile( + re, + ot(t.createNodeArray([...re.statements, vN(t)]), re.statements) + ); + } + return J; + } + function D(J) { + const re = gz(t, n(), J, o); + if (re) { + const te = [], ie = t.copyPrologue(J.statements, te); + return Nn(te, JD([re], w, xi)), Nn(te, Or(J.statements, w, xi, ie)), t.updateSourceFile( + J, + ot(t.createNodeArray(te), J.statements) + ); + } else + return kr(J, w, e); + } + function w(J) { + switch (J.kind) { + case 271: + return Ru(o) >= 100 ? R(J) : void 0; + case 277: + return V(J); + case 278: + return $(J); + case 272: + return A(J); + case 213: + if (J === g?.[0]) + return O(g.shift()); + break; + default: + if (g?.length && p_(J, g[0])) + return kr(J, w, e); + } + return J; + } + function A(J) { + if (!o.rewriteRelativeImportExtensions) + return J; + const re = nk(J.moduleSpecifier, o); + return re === J.moduleSpecifier ? J : t.updateImportDeclaration( + J, + J.modifiers, + J.importClause, + re, + J.attributes + ); + } + function O(J) { + return t.updateCallExpression( + J, + J.expression, + J.typeArguments, + [ + Na(J.arguments[0]) ? nk(J.arguments[0], o) : n().createRewriteRelativeImportExtensionsHelper(J.arguments[0]), + ...J.arguments.slice(1) + ] + ); + } + function F(J) { + const re = Qx(t, J, E.checkDefined(S), i, s, o), te = []; + if (re && te.push(nk(re, o)), Ru(o) === 200) + return t.createCallExpression( + t.createIdentifier("require"), + /*typeArguments*/ + void 0, + te + ); + if (!T) { + const le = t.createUniqueName( + "_createRequire", + 48 + /* FileLevel */ + ), Te = t.createImportDeclaration( + /*modifiers*/ + void 0, + t.createImportClause( + /*isTypeOnly*/ + !1, + /*name*/ + void 0, + t.createNamedImports([ + t.createImportSpecifier( + /*isTypeOnly*/ + !1, + t.createIdentifier("createRequire"), + le + ) + ]) + ), + t.createStringLiteral("module"), + /*attributes*/ + void 0 + ), q = t.createUniqueName( + "__require", + 48 + /* FileLevel */ + ), me = t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList( + [ + t.createVariableDeclaration( + q, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createCallExpression( + t.cloneNode(le), + /*typeArguments*/ + void 0, + [ + t.createPropertyAccessExpression(t.createMetaProperty(102, t.createIdentifier("meta")), t.createIdentifier("url")) + ] + ) + ) + ], + /*flags*/ + c >= 2 ? 2 : 0 + /* None */ + ) + ); + T = [Te, me]; + } + const ie = T[1].declarationList.declarations[0].name; + return E.assertNode(ie, Me), t.createCallExpression( + t.cloneNode(ie), + /*typeArguments*/ + void 0, + te + ); + } + function R(J) { + E.assert(tv(J), "import= for internal module references should be handled in an earlier transformer."); + let re; + return re = Pr( + re, + Sn( + ot( + t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList( + [ + t.createVariableDeclaration( + t.cloneNode(J.name), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + F(J) + ) + ], + /*flags*/ + c >= 2 ? 2 : 0 + /* None */ + ) + ), + J + ), + J + ) + ), re = W(re, J), Gm(re); + } + function W(J, re) { + return $n( + re, + 32 + /* Export */ + ) && (J = Pr( + J, + t.createExportDeclaration( + /*modifiers*/ + void 0, + re.isTypeOnly, + t.createNamedExports([t.createExportSpecifier( + /*isTypeOnly*/ + !1, + /*propertyName*/ + void 0, + An(re.name) + )]) + ) + )), J; + } + function V(J) { + return J.isExportEquals ? Ru(o) === 200 ? Sn( + t.createExpressionStatement( + t.createAssignment( + t.createPropertyAccessExpression( + t.createIdentifier("module"), + "exports" + ), + J.expression + ) + ), + J + ) : void 0 : J; + } + function $(J) { + const re = nk(J.moduleSpecifier, o); + if (o.module !== void 0 && o.module > 5 || !J.exportClause || !ig(J.exportClause) || !J.moduleSpecifier) + return !J.moduleSpecifier || re === J.moduleSpecifier ? J : t.updateExportDeclaration( + J, + J.modifiers, + J.isTypeOnly, + J.exportClause, + re, + J.attributes + ); + const te = J.exportClause.name, ie = t.getGeneratedNameForNode(te), le = t.createImportDeclaration( + /*modifiers*/ + void 0, + t.createImportClause( + /*isTypeOnly*/ + !1, + /*name*/ + void 0, + t.createNamespaceImport( + ie + ) + ), + re, + J.attributes + ); + Sn(le, J.exportClause); + const Te = w7(J) ? t.createExportDefault(ie) : t.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + t.createNamedExports([t.createExportSpecifier( + /*isTypeOnly*/ + !1, + ie, + te + )]) + ); + return Sn(Te, J), [le, Te]; + } + function U(J, re, te) { + Ei(re) ? ((el(re) || Mp(o)) && o.importHelpers && (h = /* @__PURE__ */ new Map()), S = re, _(J, re, te), S = void 0, h = void 0) : _(J, re, te); + } + function _e(J, re) { + return re = u(J, re), re.id && m.has(re.id) ? re : Me(re) && va(re) & 8192 ? Z(re) : re; + } + function Z(J) { + const re = S && TN(S); + if (re) + return m.add(Aa(J)), t.createPropertyAccessExpression(re, J); + if (h) { + const te = An(J); + let ie = h.get(te); + return ie || h.set(te, ie = t.createUniqueName( + te, + 48 + /* FileLevel */ + )), ie; + } + return J; + } + } + function $ne(e) { + const t = e.onSubstituteNode, n = e.onEmitNode, i = IW(e), s = e.onSubstituteNode, o = e.onEmitNode; + e.onSubstituteNode = t, e.onEmitNode = n; + const c = AW(e), _ = e.onSubstituteNode, u = e.onEmitNode, m = (A) => e.getEmitHost().getEmitModuleFormatOfFile(A); + e.onSubstituteNode = h, e.onEmitNode = S, e.enableSubstitution( + 307 + /* SourceFile */ + ), e.enableEmitNotification( + 307 + /* SourceFile */ + ); + let g; + return D; + function h(A, O) { + return Ei(O) ? (g = O, t(A, O)) : g ? m(g) >= 5 ? s(A, O) : _(A, O) : t(A, O); + } + function S(A, O, F) { + return Ei(O) && (g = O), g ? m(g) >= 5 ? o(A, O, F) : u(A, O, F) : n(A, O, F); + } + function T(A) { + return m(A) >= 5 ? i : c; + } + function C(A) { + if (A.isDeclarationFile) + return A; + g = A; + const O = T(A)(A); + return g = void 0, E.assert(Ei(O)), O; + } + function D(A) { + return A.kind === 307 ? C(A) : w(A); + } + function w(A) { + return e.factory.createBundle(gr(A.sourceFiles, C)); + } + } + function HN(e) { + return Kn(e) || ss(e) || m_(e) || ma(e) || Mg(e) || k0(e) || dN(e) || Jx(e) || fc(e) || pm(e) || Tc(e) || Ii(e) || Ao(e) || Lh(e) || _l(e) || jp(e) || Go(e) || r1(e) || Tn(e) || fo(e) || fn(e) || Fp(e); + } + function Xne(e) { + if (Mg(e) || k0(e)) + return t; + return pm(e) || fc(e) ? i : kv(e); + function t(o) { + const c = n(o); + return c !== void 0 ? { + diagnosticMessage: c, + errorNode: e, + typeName: e.name + } : void 0; + } + function n(o) { + return Vs(e) ? o.errorModuleName ? o.accessibility === 2 ? p.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : p.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1 : e.parent.kind === 263 ? o.errorModuleName ? o.accessibility === 2 ? p.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : p.Public_property_0_of_exported_class_has_or_is_using_private_name_1 : o.errorModuleName ? p.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : p.Property_0_of_exported_interface_has_or_is_using_private_name_1; + } + function i(o) { + const c = s(o); + return c !== void 0 ? { + diagnosticMessage: c, + errorNode: e, + typeName: e.name + } : void 0; + } + function s(o) { + return Vs(e) ? o.errorModuleName ? o.accessibility === 2 ? p.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : p.Public_static_method_0_of_exported_class_has_or_is_using_private_name_1 : e.parent.kind === 263 ? o.errorModuleName ? o.accessibility === 2 ? p.Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : p.Public_method_0_of_exported_class_has_or_is_using_private_name_1 : o.errorModuleName ? p.Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : p.Method_0_of_exported_interface_has_or_is_using_private_name_1; + } + } + function kv(e) { + if (Kn(e) || ss(e) || m_(e) || Tn(e) || fo(e) || fn(e) || ma(e) || Go(e)) + return n; + return Mg(e) || k0(e) ? i : dN(e) || Jx(e) || fc(e) || pm(e) || Tc(e) || r1(e) ? s : Ii(e) ? H_(e, e.parent) && $n( + e.parent, + 2 + /* Private */ + ) ? n : o : Ao(e) ? _ : Lh(e) ? u : _l(e) ? m : jp(e) || Fp(e) ? g : E.assertNever(e, `Attempted to set a declaration diagnostic context for unhandled node kind: ${E.formatSyntaxKind(e.kind)}`); + function t(h) { + if (e.kind === 260 || e.kind === 208) + return h.errorModuleName ? h.accessibility === 2 ? p.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : p.Exported_variable_0_has_or_is_using_private_name_1; + if (e.kind === 172 || e.kind === 211 || e.kind === 212 || e.kind === 226 || e.kind === 171 || e.kind === 169 && $n( + e.parent, + 2 + /* Private */ + )) + return Vs(e) ? h.errorModuleName ? h.accessibility === 2 ? p.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : p.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1 : e.parent.kind === 263 || e.kind === 169 ? h.errorModuleName ? h.accessibility === 2 ? p.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : p.Public_property_0_of_exported_class_has_or_is_using_private_name_1 : h.errorModuleName ? p.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : p.Property_0_of_exported_interface_has_or_is_using_private_name_1; + } + function n(h) { + const S = t(h); + return S !== void 0 ? { + diagnosticMessage: S, + errorNode: e, + typeName: e.name + } : void 0; + } + function i(h) { + let S; + return e.kind === 178 ? Vs(e) ? S = h.errorModuleName ? p.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 : p.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1 : S = h.errorModuleName ? p.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 : p.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1 : Vs(e) ? S = h.errorModuleName ? h.accessibility === 2 ? p.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 : p.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1 : S = h.errorModuleName ? h.accessibility === 2 ? p.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 : p.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1, { + diagnosticMessage: S, + errorNode: e.name, + typeName: e.name + }; + } + function s(h) { + let S; + switch (e.kind) { + case 180: + S = h.errorModuleName ? p.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : p.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; + break; + case 179: + S = h.errorModuleName ? p.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : p.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; + break; + case 181: + S = h.errorModuleName ? p.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : p.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; + break; + case 174: + case 173: + Vs(e) ? S = h.errorModuleName ? h.accessibility === 2 ? p.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : p.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : p.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0 : e.parent.kind === 263 ? S = h.errorModuleName ? h.accessibility === 2 ? p.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : p.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : p.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0 : S = h.errorModuleName ? p.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : p.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; + break; + case 262: + S = h.errorModuleName ? h.accessibility === 2 ? p.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : p.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 : p.Return_type_of_exported_function_has_or_is_using_private_name_0; + break; + default: + return E.fail("This is unknown kind for signature: " + e.kind); + } + return { + diagnosticMessage: S, + errorNode: e.name || e + }; + } + function o(h) { + const S = c(h); + return S !== void 0 ? { + diagnosticMessage: S, + errorNode: e, + typeName: e.name + } : void 0; + } + function c(h) { + switch (e.parent.kind) { + case 176: + return h.errorModuleName ? h.accessibility === 2 ? p.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : p.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; + case 180: + case 185: + return h.errorModuleName ? p.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : p.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; + case 179: + return h.errorModuleName ? p.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : p.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; + case 181: + return h.errorModuleName ? p.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : p.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1; + case 174: + case 173: + return Vs(e.parent) ? h.errorModuleName ? h.accessibility === 2 ? p.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : p.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1 : e.parent.parent.kind === 263 ? h.errorModuleName ? h.accessibility === 2 ? p.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : p.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1 : h.errorModuleName ? p.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : p.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; + case 262: + case 184: + return h.errorModuleName ? h.accessibility === 2 ? p.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : p.Parameter_0_of_exported_function_has_or_is_using_private_name_1; + case 178: + case 177: + return h.errorModuleName ? h.accessibility === 2 ? p.Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 : p.Parameter_0_of_accessor_has_or_is_using_private_name_1; + default: + return E.fail(`Unknown parent for parameter: ${E.formatSyntaxKind(e.parent.kind)}`); + } + } + function _() { + let h; + switch (e.parent.kind) { + case 263: + h = p.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; + break; + case 264: + h = p.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; + break; + case 200: + h = p.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1; + break; + case 185: + case 180: + h = p.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; + break; + case 179: + h = p.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; + break; + case 174: + case 173: + Vs(e.parent) ? h = p.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1 : e.parent.parent.kind === 263 ? h = p.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1 : h = p.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; + break; + case 184: + case 262: + h = p.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; + break; + case 195: + h = p.Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1; + break; + case 265: + h = p.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1; + break; + default: + return E.fail("This is unknown parent for type parameter: " + e.parent.kind); + } + return { + diagnosticMessage: h, + errorNode: e, + typeName: e.name + }; + } + function u() { + let h; + return $c(e.parent.parent) ? h = Z_(e.parent) && e.parent.token === 119 ? p.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : e.parent.parent.name ? p.extends_clause_of_exported_class_0_has_or_is_using_private_name_1 : p.extends_clause_of_exported_class_has_or_is_using_private_name_0 : h = p.extends_clause_of_exported_interface_0_has_or_is_using_private_name_1, { + diagnosticMessage: h, + errorNode: e, + typeName: is(e.parent.parent) + }; + } + function m() { + return { + diagnosticMessage: p.Import_declaration_0_is_using_private_name_1, + errorNode: e, + typeName: e.name + }; + } + function g(h) { + return { + diagnosticMessage: h.errorModuleName ? p.Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2 : p.Exported_type_alias_0_has_or_is_using_private_name_1, + errorNode: Fp(e) ? E.checkDefined(e.typeExpression) : e.type, + typeName: Fp(e) ? is(e) : e.name + }; + } + } + function Qne(e) { + const t = { + 219: p.Add_a_return_type_to_the_function_expression, + 218: p.Add_a_return_type_to_the_function_expression, + 174: p.Add_a_return_type_to_the_method, + 177: p.Add_a_return_type_to_the_get_accessor_declaration, + 178: p.Add_a_type_to_parameter_of_the_set_accessor_declaration, + 262: p.Add_a_return_type_to_the_function_declaration, + 180: p.Add_a_return_type_to_the_function_declaration, + 169: p.Add_a_type_annotation_to_the_parameter_0, + 260: p.Add_a_type_annotation_to_the_variable_0, + 172: p.Add_a_type_annotation_to_the_property_0, + 171: p.Add_a_type_annotation_to_the_property_0, + 277: p.Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it + }, n = { + 218: p.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + 262: p.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + 219: p.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + 174: p.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + 180: p.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + 177: p.At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + 178: p.At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + 169: p.Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + 260: p.Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + 172: p.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + 171: p.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + 167: p.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations, + 305: p.Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations, + 304: p.Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations, + 209: p.Only_const_arrays_can_be_inferred_with_isolatedDeclarations, + 277: p.Default_exports_can_t_be_inferred_with_isolatedDeclarations, + 230: p.Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations + }; + return i; + function i(w) { + if (ur(w, Z_)) + return tn(w, p.Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations); + if ((im(w) || $b(w.parent)) && (Hu(w) || _o(w))) + return C(w); + switch (E.type(w), w.kind) { + case 177: + case 178: + return o(w); + case 167: + case 304: + case 305: + return _(w); + case 209: + case 230: + return u(w); + case 174: + case 180: + case 218: + case 219: + case 262: + return m(w); + case 208: + return g(w); + case 172: + case 260: + return h(w); + case 169: + return S(w); + case 303: + return D(w.initializer); + case 231: + return T(w); + default: + return D(w); + } + } + function s(w) { + const A = ur(w, (O) => Io(O) || xi(O) || Kn(O) || ss(O) || Ii(O)); + if (A) + return Io(A) ? A : Rp(A) ? ur(A, (O) => Ka(O) && !Go(O)) : xi(A) ? void 0 : A; + } + function o(w) { + const { getAccessor: A, setAccessor: O } = zb(w.symbol.declarations, w), F = (Mg(w) ? w.parameters[0] : w) ?? w, R = tn(F, n[w.kind]); + return O && Bs(R, tn(O, t[O.kind])), A && Bs(R, tn(A, t[A.kind])), R; + } + function c(w, A) { + const O = s(w); + if (O) { + const F = Io(O) || !O.name ? "" : qo( + O.name, + /*includeTrivia*/ + !1 + ); + Bs(A, tn(O, t[O.kind], F)); + } + return A; + } + function _(w) { + const A = tn(w, n[w.kind]); + return c(w, A), A; + } + function u(w) { + const A = tn(w, n[w.kind]); + return c(w, A), A; + } + function m(w) { + const A = tn(w, n[w.kind]); + return c(w, A), Bs(A, tn(w, t[w.kind])), A; + } + function g(w) { + return tn(w, p.Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations); + } + function h(w) { + const A = tn(w, n[w.kind]), O = qo( + w.name, + /*includeTrivia*/ + !1 + ); + return Bs(A, tn(w, t[w.kind], O)), A; + } + function S(w) { + if (Mg(w.parent)) + return o(w.parent); + const A = e.requiresAddingImplicitUndefined( + w, + /*enclosingDeclaration*/ + void 0 + ); + if (!A && w.initializer) + return D(w.initializer); + const O = A ? p.Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_supported_with_isolatedDeclarations : n[w.kind], F = tn(w, O), R = qo( + w.name, + /*includeTrivia*/ + !1 + ); + return Bs(F, tn(w, t[w.kind], R)), F; + } + function T(w) { + return D(w, p.Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations); + } + function C(w) { + const A = tn(w, p.Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations, qo( + w, + /*includeTrivia*/ + !1 + )); + return c(w, A), A; + } + function D(w, A) { + const O = s(w); + let F; + if (O) { + const R = Io(O) || !O.name ? "" : qo( + O.name, + /*includeTrivia*/ + !1 + ), W = ur(w.parent, (V) => Io(V) || (xi(V) ? "quit" : !Yu(V) && !dF(V) && !t6(V))); + O === W ? (F = tn(w, A ?? n[O.kind]), Bs(F, tn(O, t[O.kind], R))) : (F = tn(w, A ?? p.Expression_type_can_t_be_inferred_with_isolatedDeclarations), Bs(F, tn(O, t[O.kind], R)), Bs(F, tn(w, p.Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit))); + } else + F = tn(w, A ?? p.Expression_type_can_t_be_inferred_with_isolatedDeclarations); + return F; + } + } + function Yne(e, t, n) { + const i = e.getCompilerOptions(), s = kn(_5(e, n), G7); + return as(s, n) ? QN( + t, + e, + N, + i, + [n], + [FW], + /*allowDtsFiles*/ + !1 + ).diagnostics : void 0; + } + var GN = 531469, $N = 8; + function FW(e) { + const t = () => E.fail("Diagnostic emitted without context"); + let n = t, i = !0, s = !1, o = !1, c = !1, _ = !1, u, m, g, h; + const { factory: S } = e, T = e.getEmitHost(); + let C = () => { + }; + const D = { + trackSymbol: ie, + reportInaccessibleThisError: Ce, + reportInaccessibleUniqueSymbolError: q, + reportCyclicStructureError: me, + reportPrivateInBaseOfClassExpression: le, + reportLikelyUnsafeImportRequiredError: Ee, + reportTruncationError: oe, + moduleResolverHost: T, + reportNonlocalAugmentation: ke, + reportNonSerializableProperty: ue, + reportInferenceFallback: re, + pushErrorFallbackNode(ee) { + const Ve = A, K = C; + C = () => { + C = K, A = Ve; + }, A = ee; + }, + popErrorFallbackNode() { + C(); + } + }; + let w, A, O, F, R, W; + const V = e.getEmitResolver(), $ = e.getCompilerOptions(), U = Qne(V), { stripInternal: _e, isolatedDeclarations: Z } = $; + return Oe; + function J(ee) { + V.getPropertiesOfContainerFunction(ee).forEach((Ve) => { + if (Fx(Ve.valueDeclaration)) { + const K = fn(Ve.valueDeclaration) ? Ve.valueDeclaration.left : Ve.valueDeclaration; + e.addDiagnostic(tn( + K, + p.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function + )); + } + }); + } + function re(ee) { + !Z || Gu(O) || Cr(ee) === O && (Kn(ee) && V.isExpandoFunctionDeclaration(ee) ? J(ee) : e.addDiagnostic(U(ee))); + } + function te(ee) { + if (ee.accessibility === 0) { + if (ee.aliasesToMakeVisible) + if (!m) + m = ee.aliasesToMakeVisible; + else + for (const Ve of ee.aliasesToMakeVisible) + Qf(m, Ve); + } else if (ee.accessibility !== 3) { + const Ve = n(ee); + if (Ve) + return Ve.typeName ? e.addDiagnostic(tn(ee.errorNode || Ve.errorNode, Ve.diagnosticMessage, qo(Ve.typeName), ee.errorSymbolName, ee.errorModuleName)) : e.addDiagnostic(tn(ee.errorNode || Ve.errorNode, Ve.diagnosticMessage, ee.errorSymbolName, ee.errorModuleName)), !0; + } + return !1; + } + function ie(ee, Ve, K) { + return ee.flags & 262144 ? !1 : te(V.isSymbolAccessible( + ee, + Ve, + K, + /*shouldComputeAliasToMarkVisible*/ + !0 + )); + } + function le(ee) { + (w || A) && e.addDiagnostic( + Bs( + tn(w || A, p.Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected, ee), + ...Kn((w || A).parent) ? [tn(w || A, p.Add_a_type_annotation_to_the_variable_0, Te())] : [] + ) + ); + } + function Te() { + return w ? co(w) : A && is(A) ? co(is(A)) : A && Io(A) ? A.isExportEquals ? "export=" : "default" : "(Missing)"; + } + function q() { + (w || A) && e.addDiagnostic(tn(w || A, p.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, Te(), "unique symbol")); + } + function me() { + (w || A) && e.addDiagnostic(tn(w || A, p.The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary, Te())); + } + function Ce() { + (w || A) && e.addDiagnostic(tn(w || A, p.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, Te(), "this")); + } + function Ee(ee) { + (w || A) && e.addDiagnostic(tn(w || A, p.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary, Te(), ee)); + } + function oe() { + (w || A) && e.addDiagnostic(tn(w || A, p.The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed)); + } + function ke(ee, Ve, K) { + var Ie; + const $e = (Ie = Ve.declarations) == null ? void 0 : Ie.find((Je) => Cr(Je) === ee), Ke = kn(K.declarations, (Je) => Cr(Je) !== ee); + if ($e && Ke) + for (const Je of Ke) + e.addDiagnostic(Bs( + tn(Je, p.Declaration_augments_declaration_in_another_file_This_cannot_be_serialized), + tn($e, p.This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file) + )); + } + function ue(ee) { + (w || A) && e.addDiagnostic(tn(w || A, p.The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized, ee)); + } + function it(ee) { + const Ve = n; + n = (Ie) => Ie.errorNode && HN(Ie.errorNode) ? kv(Ie.errorNode)(Ie) : { + diagnosticMessage: Ie.errorModuleName ? p.Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit : p.Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit, + errorNode: Ie.errorNode || ee + }; + const K = V.getDeclarationStatementsForSourceFile(ee, GN, $N, D); + return n = Ve, K; + } + function Oe(ee) { + if (ee.kind === 307 && ee.isDeclarationFile) + return ee; + if (ee.kind === 308) { + s = !0, F = [], R = [], W = []; + let _t = !1; + const yt = S.createBundle( + gr(ee.sourceFiles, (Et) => { + if (Et.isDeclarationFile) return; + if (_t = _t || Et.hasNoDefaultLib, O = Et, u = Et, m = void 0, h = !1, g = /* @__PURE__ */ new Map(), n = t, c = !1, _ = !1, Ie(Et), $_(Et) || tp(Et)) { + o = !1, i = !1; + const rn = Gu(Et) ? S.createNodeArray(it(Et)) : Or(Et.statements, di, xi); + return S.updateSourceFile( + Et, + [S.createModuleDeclaration( + [S.createModifier( + 138 + /* DeclareKeyword */ + )], + S.createStringLiteral(jB(e.getEmitHost(), Et)), + S.createModuleBlock(ot(S.createNodeArray(pi(rn)), Et.statements)) + )], + /*isDeclarationFile*/ + !0, + /*referencedFiles*/ + [], + /*typeReferences*/ + [], + /*hasNoDefaultLib*/ + !1, + /*libReferences*/ + [] + ); + } + i = !0; + const Xt = Gu(Et) ? S.createNodeArray(it(Et)) : Or(Et.statements, di, xi); + return S.updateSourceFile( + Et, + pi(Xt), + /*isDeclarationFile*/ + !0, + /*referencedFiles*/ + [], + /*typeReferences*/ + [], + /*hasNoDefaultLib*/ + !1, + /*libReferences*/ + [] + ); + }) + ), We = Hn(Vl($D( + ee, + T, + /*forceDtsPaths*/ + !0 + ).declarationFilePath)); + return yt.syntheticFileReferences = Ye(We), yt.syntheticTypeReferences = Ke(), yt.syntheticLibReferences = Je(), yt.hasNoDefaultLib = _t, yt; + } + i = !0, c = !1, _ = !1, u = ee, O = ee, n = t, s = !1, o = !1, h = !1, m = void 0, g = /* @__PURE__ */ new Map(), F = [], R = [], W = [], Ie(O); + let Ve; + if (Gu(O)) + Ve = S.createNodeArray(it(ee)); + else { + const _t = Or(ee.statements, di, xi); + Ve = ot(S.createNodeArray(pi(_t)), ee.statements), el(ee) && (!o || c && !_) && (Ve = ot(S.createNodeArray([...Ve, vN(S)]), Ve)); + } + const K = Hn(Vl($D( + ee, + T, + /*forceDtsPaths*/ + !0 + ).declarationFilePath)); + return S.updateSourceFile( + ee, + Ve, + /*isDeclarationFile*/ + !0, + Ye(K), + Ke(), + ee.hasNoDefaultLib, + Je() + ); + function Ie(_t) { + F = Wi(F, gr(_t.referencedFiles, (yt) => [_t, yt])), R = Wi(R, _t.typeReferenceDirectives), W = Wi(W, _t.libReferenceDirectives); + } + function $e(_t) { + const yt = { ..._t }; + return yt.pos = -1, yt.end = -1, yt; + } + function Ke() { + return Li(R, (_t) => { + if (_t.preserve) + return $e(_t); + }); + } + function Je() { + return Li(W, (_t) => { + if (_t.preserve) + return $e(_t); + }); + } + function Ye(_t) { + return Li(F, ([yt, We]) => { + if (!We.preserve) return; + const Et = T.getSourceFileFromReference(yt, We); + if (!Et) + return; + let Xt; + if (Et.isDeclarationFile) + Xt = Et.fileName; + else { + if (s && as(ee.sourceFiles, Et)) return; + const ft = $D( + Et, + T, + /*forceDtsPaths*/ + !0 + ); + Xt = ft.declarationFilePath || ft.jsFilePath || Et.fileName; + } + if (!Xt) return; + const rn = KT( + _t, + Xt, + T.getCurrentDirectory(), + T.getCanonicalFileName, + /*isAbsolutePathAnUrl*/ + !1 + ), ye = $e(We); + return ye.fileName = rn, ye; + }); + } + } + function xe(ee) { + if (ee.kind === 80) + return ee; + return ee.kind === 207 ? S.updateArrayBindingPattern(ee, Or(ee.elements, Ve, f7)) : S.updateObjectBindingPattern(ee, Or(ee.elements, Ve, ma)); + function Ve(K) { + return K.kind === 232 ? K : (K.propertyName && fa(K.propertyName) && _o(K.propertyName.expression) && Qt(K.propertyName.expression, u), S.updateBindingElement( + K, + K.dotDotDotToken, + K.propertyName, + xe(K.name), + /*initializer*/ + void 0 + )); + } + } + function he(ee, Ve) { + let K; + h || (K = n, n = kv(ee)); + const Ie = S.updateParameterDeclaration( + ee, + nje(S, ee, Ve), + ee.dotDotDotToken, + xe(ee.name), + V.isOptionalParameter(ee) ? ee.questionToken || S.createToken( + 58 + /* QuestionToken */ + ) : void 0, + De( + ee, + /*ignorePrivate*/ + !0 + ), + // Ignore private param props, since this type is going straight back into a param + Ae(ee) + ); + return h || (n = K), Ie; + } + function ne(ee) { + return j1e(ee) && !!ee.initializer && V.isLiteralConstDeclaration(ls(ee)); + } + function Ae(ee) { + if (ne(ee)) { + const Ve = Jee(ee.initializer); + return Z5(Ve) || re(ee), V.createLiteralConstValue(ls(ee, j1e), D); + } + } + function De(ee, Ve) { + if (!Ve && Q_( + ee, + 2 + /* Private */ + ) || ne(ee)) + return; + if (!Io(ee) && !ma(ee) && ee.type && (!Ii(ee) || !V.requiresAddingImplicitUndefined(ee, u))) + return Xe(ee.type, Xn, fi); + const K = w; + w = ee.name; + let Ie; + h || (Ie = n, HN(ee) && (n = kv(ee))); + let $e; + return K5(ee) ? $e = V.createTypeOfDeclaration(ee, u, GN, $N, D) : vs(ee) ? $e = V.createReturnTypeOfSignatureDeclaration(ee, u, GN, $N, D) : E.assertNever(ee), w = K, h || (n = Ie), $e ?? S.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ); + } + function we(ee) { + switch (ee = ls(ee), ee.kind) { + case 262: + case 267: + case 264: + case 263: + case 265: + case 266: + return !V.isDeclarationVisible(ee); + // The following should be doing their own visibility checks based on filtering their members + case 260: + return !bt(ee); + case 271: + case 272: + case 278: + case 277: + return !1; + case 175: + return !0; + } + return !1; + } + function Ue(ee) { + var Ve; + if (ee.body) + return !0; + const K = (Ve = ee.symbol.declarations) == null ? void 0 : Ve.filter((Ie) => Tc(Ie) && !Ie.body); + return !K || K.indexOf(ee) === K.length - 1; + } + function bt(ee) { + return ul(ee) ? !1 : Ds(ee.name) ? at(ee.name.elements, bt) : V.isDeclarationVisible(ee); + } + function Lt(ee, Ve, K) { + if (Q_( + ee, + 2 + /* Private */ + )) + return S.createNodeArray(); + const Ie = gr(Ve, ($e) => he($e, K)); + return Ie ? S.createNodeArray(Ie, Ve.hasTrailingComma) : S.createNodeArray(); + } + function er(ee, Ve) { + let K; + if (!Ve) { + const Ie = jb(ee); + Ie && (K = [he(Ie)]); + } + if (A_(ee)) { + let Ie; + if (!Ve) { + const $e = V4(ee); + $e && (Ie = he($e)); + } + Ie || (Ie = S.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "value" + )), K = Pr(K, Ie); + } + return S.createNodeArray(K || He); + } + function Nr(ee, Ve) { + return Q_( + ee, + 2 + /* Private */ + ) ? void 0 : Or(Ve, Xn, Ao); + } + function Dt(ee) { + return Ei(ee) || jp(ee) || Lc(ee) || $c(ee) || Yl(ee) || vs(ee) || r1(ee) || FS(ee); + } + function Qt(ee, Ve) { + const K = V.isEntityNameVisible(ee, Ve); + te(K); + } + function Wr(ee, Ve) { + return uf(ee) && uf(Ve) && (ee.jsDoc = Ve.jsDoc), Hc(ee, fm(Ve)); + } + function yr(ee, Ve) { + if (Ve) { + if (o = o || ee.kind !== 267 && ee.kind !== 205, Na(Ve) && s) { + const K = PK(e.getEmitHost(), V, ee); + if (K) + return S.createStringLiteral(K); + } + return Ve; + } + } + function qn(ee) { + if (V.isDeclarationVisible(ee)) + if (ee.moduleReference.kind === 283) { + const Ve = A4(ee); + return S.updateImportEqualsDeclaration( + ee, + ee.modifiers, + ee.isTypeOnly, + ee.name, + S.updateExternalModuleReference(ee.moduleReference, yr(ee, Ve)) + ); + } else { + const Ve = n; + return n = kv(ee), Qt(ee.moduleReference, u), n = Ve, ee; + } + } + function Bt(ee) { + if (!ee.importClause) + return S.updateImportDeclaration( + ee, + ee.modifiers, + ee.importClause, + yr(ee, ee.moduleSpecifier), + bi(ee.attributes) + ); + const Ve = ee.importClause && ee.importClause.name && V.isDeclarationVisible(ee.importClause) ? ee.importClause.name : void 0; + if (!ee.importClause.namedBindings) + return Ve && S.updateImportDeclaration( + ee, + ee.modifiers, + S.updateImportClause( + ee.importClause, + ee.importClause.isTypeOnly, + Ve, + /*namedBindings*/ + void 0 + ), + yr(ee, ee.moduleSpecifier), + bi(ee.attributes) + ); + if (ee.importClause.namedBindings.kind === 274) { + const Ie = V.isDeclarationVisible(ee.importClause.namedBindings) ? ee.importClause.namedBindings : ( + /*namedBindings*/ + void 0 + ); + return Ve || Ie ? S.updateImportDeclaration( + ee, + ee.modifiers, + S.updateImportClause( + ee.importClause, + ee.importClause.isTypeOnly, + Ve, + Ie + ), + yr(ee, ee.moduleSpecifier), + bi(ee.attributes) + ) : void 0; + } + const K = Li(ee.importClause.namedBindings.elements, (Ie) => V.isDeclarationVisible(Ie) ? Ie : void 0); + if (K && K.length || Ve) + return S.updateImportDeclaration( + ee, + ee.modifiers, + S.updateImportClause( + ee.importClause, + ee.importClause.isTypeOnly, + Ve, + K && K.length ? S.updateNamedImports(ee.importClause.namedBindings, K) : void 0 + ), + yr(ee, ee.moduleSpecifier), + bi(ee.attributes) + ); + if (V.isImportRequiredByAugmentation(ee)) + return Z && e.addDiagnostic(tn(ee, p.Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_supported_with_isolatedDeclarations)), S.updateImportDeclaration( + ee, + ee.modifiers, + /*importClause*/ + void 0, + yr(ee, ee.moduleSpecifier), + bi(ee.attributes) + ); + } + function bi(ee) { + const Ve = k6(ee); + return ee && Ve !== void 0 ? ee : void 0; + } + function pi(ee) { + for (; Ir(m); ) { + const K = m.shift(); + if (!N7(K)) + return E.fail(`Late replaced statement was found which is not handled by the declaration transformer!: ${E.formatSyntaxKind(K.kind)}`); + const Ie = i; + i = K.parent && Ei(K.parent) && !(el(K.parent) && s); + const $e = tr(K); + i = Ie, g.set(Ku(K), $e); + } + return Or(ee, Ve, xi); + function Ve(K) { + if (N7(K)) { + const Ie = Ku(K); + if (g.has(Ie)) { + const $e = g.get(Ie); + return g.delete(Ie), $e && ((os($e) ? at($e, p7) : p7($e)) && (c = !0), Ei(K.parent) && (os($e) ? at($e, UP) : UP($e)) && (o = !0)), $e; + } + } + return K; + } + } + function Xn(ee) { + if (Cs(ee)) return; + if (bl(ee)) { + if (we(ee)) return; + if (Ph(ee)) { + if (Z) { + if (!V.isDefinitelyReferenceToGlobalSymbolObject(ee.name.expression)) { + if ($c(ee.parent) || oa(ee.parent)) { + e.addDiagnostic(tn(ee, p.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations)); + return; + } else if ( + // Type declarations just need to double-check that the input computed name is an entity name expression + (Yl(ee.parent) || Qu(ee.parent)) && !_o(ee.name.expression) + ) { + e.addDiagnostic(tn(ee, p.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations)); + return; + } + } + } else if (!V.isLateBound(ls(ee)) || !_o(ee.name.expression)) + return; + } + } + if (vs(ee) && V.isImplementationOfOverload(ee) || Ste(ee)) return; + let Ve; + Dt(ee) && (Ve = u, u = ee); + const K = n, Ie = HN(ee), $e = h; + let Ke = (ee.kind === 187 || ee.kind === 200) && ee.parent.kind !== 265; + if ((fc(ee) || pm(ee)) && Q_( + ee, + 2 + /* Private */ + )) + return ee.symbol && ee.symbol.declarations && ee.symbol.declarations[0] !== ee ? void 0 : Je(S.createPropertyDeclaration( + gs(ee), + ee.name, + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + )); + if (Ie && !h && (n = kv(ee)), $b(ee) && Qt(ee.exprName, u), Ke && (h = !0), sje(ee)) + switch (ee.kind) { + case 233: { + (Hu(ee.expression) || _o(ee.expression)) && Qt(ee.expression, u); + const Ye = kr(ee, Xn, e); + return Je(S.updateExpressionWithTypeArguments(Ye, Ye.expression, Ye.typeArguments)); + } + case 183: { + Qt(ee.typeName, u); + const Ye = kr(ee, Xn, e); + return Je(S.updateTypeReferenceNode(Ye, Ye.typeName, Ye.typeArguments)); + } + case 180: + return Je(S.updateConstructSignature( + ee, + Nr(ee, ee.typeParameters), + Lt(ee, ee.parameters), + De(ee) + )); + case 176: { + const Ye = S.createConstructorDeclaration( + /*modifiers*/ + gs(ee), + Lt( + ee, + ee.parameters, + 0 + /* None */ + ), + /*body*/ + void 0 + ); + return Je(Ye); + } + case 174: { + if (Ni(ee.name)) + return Je( + /*returnValue*/ + void 0 + ); + const Ye = S.createMethodDeclaration( + gs(ee), + /*asteriskToken*/ + void 0, + ee.name, + ee.questionToken, + Nr(ee, ee.typeParameters), + Lt(ee, ee.parameters), + De(ee), + /*body*/ + void 0 + ); + return Je(Ye); + } + case 177: + return Ni(ee.name) ? Je( + /*returnValue*/ + void 0 + ) : Je(S.updateGetAccessorDeclaration( + ee, + gs(ee), + ee.name, + er(ee, Q_( + ee, + 2 + /* Private */ + )), + De(ee), + /*body*/ + void 0 + )); + case 178: + return Ni(ee.name) ? Je( + /*returnValue*/ + void 0 + ) : Je(S.updateSetAccessorDeclaration( + ee, + gs(ee), + ee.name, + er(ee, Q_( + ee, + 2 + /* Private */ + )), + /*body*/ + void 0 + )); + case 172: + return Ni(ee.name) ? Je( + /*returnValue*/ + void 0 + ) : Je(S.updatePropertyDeclaration( + ee, + gs(ee), + ee.name, + ee.questionToken, + De(ee), + Ae(ee) + )); + case 171: + return Ni(ee.name) ? Je( + /*returnValue*/ + void 0 + ) : Je(S.updatePropertySignature( + ee, + gs(ee), + ee.name, + ee.questionToken, + De(ee) + )); + case 173: + return Ni(ee.name) ? Je( + /*returnValue*/ + void 0 + ) : Je(S.updateMethodSignature( + ee, + gs(ee), + ee.name, + ee.questionToken, + Nr(ee, ee.typeParameters), + Lt(ee, ee.parameters), + De(ee) + )); + case 179: + return Je( + S.updateCallSignature( + ee, + Nr(ee, ee.typeParameters), + Lt(ee, ee.parameters), + De(ee) + ) + ); + case 181: + return Je(S.updateIndexSignature( + ee, + gs(ee), + Lt(ee, ee.parameters), + Xe(ee.type, Xn, fi) || S.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ) + )); + case 260: + return Ds(ee.name) ? Bn(ee.name) : (Ke = !0, h = !0, Je(S.updateVariableDeclaration( + ee, + ee.name, + /*exclamationToken*/ + void 0, + De(ee), + Ae(ee) + ))); + case 168: + return jr(ee) && (ee.default || ee.constraint) ? Je(S.updateTypeParameterDeclaration( + ee, + ee.modifiers, + ee.name, + /*constraint*/ + void 0, + /*defaultType*/ + void 0 + )) : Je(kr(ee, Xn, e)); + case 194: { + const Ye = Xe(ee.checkType, Xn, fi), _t = Xe(ee.extendsType, Xn, fi), yt = u; + u = ee.trueType; + const We = Xe(ee.trueType, Xn, fi); + u = yt; + const Et = Xe(ee.falseType, Xn, fi); + return E.assert(Ye), E.assert(_t), E.assert(We), E.assert(Et), Je(S.updateConditionalTypeNode(ee, Ye, _t, We, Et)); + } + case 184: + return Je(S.updateFunctionTypeNode( + ee, + Or(ee.typeParameters, Xn, Ao), + Lt(ee, ee.parameters), + E.checkDefined(Xe(ee.type, Xn, fi)) + )); + case 185: + return Je(S.updateConstructorTypeNode( + ee, + gs(ee), + Or(ee.typeParameters, Xn, Ao), + Lt(ee, ee.parameters), + E.checkDefined(Xe(ee.type, Xn, fi)) + )); + case 205: + return Dh(ee) ? Je(S.updateImportTypeNode( + ee, + S.updateLiteralTypeNode(ee.argument, yr(ee, ee.argument.literal)), + ee.attributes, + ee.qualifier, + Or(ee.typeArguments, Xn, fi), + ee.isTypeOf + )) : Je(ee); + default: + E.assertNever(ee, `Attempted to process unhandled node kind: ${E.formatSyntaxKind(ee.kind)}`); + } + return Wx(ee) && js(O, ee.pos).line === js(O, ee.end).line && on( + ee, + 1 + /* SingleLine */ + ), Je(kr(ee, Xn, e)); + function Je(Ye) { + return Ye && Ie && Ph(ee) && ki(ee), Dt(ee) && (u = Ve), Ie && !h && (n = K), Ke && (h = $e), Ye === ee ? Ye : Ye && Sn(Wr(Ye, ee), ee); + } + } + function jr(ee) { + return ee.parent.kind === 174 && Q_( + ee.parent, + 2 + /* Private */ + ); + } + function di(ee) { + if (!ije(ee) || Cs(ee)) return; + switch (ee.kind) { + case 278: + return Ei(ee.parent) && (o = !0), _ = !0, S.updateExportDeclaration( + ee, + ee.modifiers, + ee.isTypeOnly, + ee.exportClause, + yr(ee, ee.moduleSpecifier), + bi(ee.attributes) + ); + case 277: { + if (Ei(ee.parent) && (o = !0), _ = !0, ee.expression.kind === 80) + return ee; + { + const K = S.createUniqueName( + "_default", + 16 + /* Optimistic */ + ); + n = () => ({ + diagnosticMessage: p.Default_export_of_the_module_has_or_is_using_private_name_0, + errorNode: ee + }), A = ee; + const Ie = De(ee), $e = S.createVariableDeclaration( + K, + /*exclamationToken*/ + void 0, + Ie, + /*initializer*/ + void 0 + ); + A = void 0; + const Ke = S.createVariableStatement(i ? [S.createModifier( + 138 + /* DeclareKeyword */ + )] : [], S.createVariableDeclarationList( + [$e], + 2 + /* Const */ + )); + return Wr(Ke, ee), cN(ee), [Ke, S.updateExportAssignment(ee, ee.modifiers, K)]; + } + } + } + const Ve = tr(ee); + return g.set(Ku(ee), Ve), ee; + } + function Re(ee) { + if (_l(ee) || Q_( + ee, + 2048 + /* Default */ + ) || !Jp(ee)) + return ee; + const Ve = S.createModifiersFromModifierFlags(Mu(ee) & 131039); + return S.replaceModifiers(ee, Ve); + } + function gt(ee, Ve, K, Ie) { + const $e = S.updateModuleDeclaration(ee, Ve, K, Ie); + if (Ou($e) || $e.flags & 32) + return $e; + const Ke = S.createModuleDeclaration( + $e.modifiers, + $e.name, + $e.body, + $e.flags | 32 + /* Namespace */ + ); + return Sn(Ke, $e), ot(Ke, $e), Ke; + } + function tr(ee) { + if (m) + for (; $E(m, ee); ) ; + if (Cs(ee)) return; + switch (ee.kind) { + case 271: + return qn(ee); + case 272: + return Bt(ee); + } + if (bl(ee) && we(ee) || ym(ee) || vs(ee) && V.isImplementationOfOverload(ee)) return; + let Ve; + Dt(ee) && (Ve = u, u = ee); + const K = HN(ee), Ie = n; + K && (n = kv(ee)); + const $e = i; + switch (ee.kind) { + case 265: { + i = !1; + const Je = Ke(S.updateTypeAliasDeclaration( + ee, + gs(ee), + ee.name, + Or(ee.typeParameters, Xn, Ao), + E.checkDefined(Xe(ee.type, Xn, fi)) + )); + return i = $e, Je; + } + case 264: + return Ke(S.updateInterfaceDeclaration( + ee, + gs(ee), + ee.name, + Nr(ee, ee.typeParameters), + Ct(ee.heritageClauses), + Or(ee.members, Xn, kb) + )); + case 262: { + const Je = Ke(S.updateFunctionDeclaration( + ee, + gs(ee), + /*asteriskToken*/ + void 0, + ee.name, + Nr(ee, ee.typeParameters), + Lt(ee, ee.parameters), + De(ee), + /*body*/ + void 0 + )); + if (Je && V.isExpandoFunctionDeclaration(ee) && Ue(ee)) { + const Ye = V.getPropertiesOfContainerFunction(ee); + Z && J(ee); + const _t = bv.createModuleDeclaration( + /*modifiers*/ + void 0, + Je.name || S.createIdentifier("_default"), + S.createModuleBlock([]), + 32 + /* Namespace */ + ); + Fa(_t, u), _t.locals = Us(Ye), _t.symbol = Ye[0].parent; + const yt = []; + let We = Li(Ye, (fe) => { + if (!Fx(fe.valueDeclaration)) + return; + const L = Pi(fe.escapedName); + if (!E_( + L, + 99 + /* ESNext */ + )) + return; + n = kv(fe.valueDeclaration); + const ve = V.createTypeOfDeclaration(fe.valueDeclaration, _t, GN, $N | 2, D); + n = Ie; + const X = yx(L), lt = X ? S.getGeneratedNameForNode(fe.valueDeclaration) : S.createIdentifier(L); + X && yt.push([lt, L]); + const zt = S.createVariableDeclaration( + lt, + /*exclamationToken*/ + void 0, + ve, + /*initializer*/ + void 0 + ); + return S.createVariableStatement(X ? void 0 : [S.createToken( + 95 + /* ExportKeyword */ + )], S.createVariableDeclarationList([zt])); + }); + yt.length ? We.push(S.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + S.createNamedExports(gr(yt, ([fe, L]) => S.createExportSpecifier( + /*isTypeOnly*/ + !1, + fe, + L + ))) + )) : We = Li(We, (fe) => S.replaceModifiers( + fe, + 0 + /* None */ + )); + const Et = S.createModuleDeclaration( + gs(ee), + ee.name, + S.createModuleBlock(We), + 32 + /* Namespace */ + ); + if (!Q_( + Je, + 2048 + /* Default */ + )) + return [Je, Et]; + const Xt = S.createModifiersFromModifierFlags( + Mu(Je) & -2081 | 128 + /* Ambient */ + ), rn = S.updateFunctionDeclaration( + Je, + Xt, + /*asteriskToken*/ + void 0, + Je.name, + Je.typeParameters, + Je.parameters, + Je.type, + /*body*/ + void 0 + ), ye = S.updateModuleDeclaration( + Et, + Xt, + Et.name, + Et.body + ), ft = S.createExportAssignment( + /*modifiers*/ + void 0, + /*isExportEquals*/ + !1, + Et.name + ); + return Ei(ee.parent) && (o = !0), _ = !0, [rn, ye, ft]; + } else + return Je; + } + case 267: { + i = !1; + const Je = ee.body; + if (Je && Je.kind === 268) { + const Ye = c, _t = _; + _ = !1, c = !1; + const yt = Or(Je.statements, di, xi); + let We = pi(yt); + ee.flags & 33554432 && (c = !1), !eg(ee) && !xr(We) && !_ && (c ? We = S.createNodeArray([...We, vN(S)]) : We = Or(We, Re, xi)); + const Et = S.updateModuleBlock(Je, We); + i = $e, c = Ye, _ = _t; + const Xt = gs(ee); + return Ke(gt( + ee, + Xt, + Pb(ee) ? yr(ee, ee.name) : ee.name, + Et + )); + } else { + i = $e; + const Ye = gs(ee); + i = !1, Xe(Je, di); + const _t = Ku(Je), yt = g.get(_t); + return g.delete(_t), Ke(gt( + ee, + Ye, + ee.name, + yt + )); + } + } + case 263: { + w = ee.name, A = ee; + const Je = S.createNodeArray(gs(ee)), Ye = Nr(ee, ee.typeParameters), _t = Ug(ee); + let yt; + if (_t) { + const fe = n; + yt = fP(na(_t.parameters, (L) => { + if (!$n( + L, + 31 + /* ParameterPropertyModifier */ + ) || Cs(L)) return; + if (n = kv(L), L.name.kind === 80) + return Wr( + S.createPropertyDeclaration( + gs(L), + L.name, + L.questionToken, + De(L), + Ae(L) + ), + L + ); + return ve(L.name); + function ve(X) { + let lt; + for (const zt of X.elements) + ul(zt) || (Ds(zt.name) && (lt = Wi(lt, ve(zt.name))), lt = lt || [], lt.push(S.createPropertyDeclaration( + gs(L), + zt.name, + /*questionOrExclamationToken*/ + void 0, + De(zt), + /*initializer*/ + void 0 + ))); + return lt; + } + })), n = fe; + } + const Et = at(ee.members, (fe) => !!fe.name && Ni(fe.name)) ? [ + S.createPropertyDeclaration( + /*modifiers*/ + void 0, + S.createPrivateIdentifier("#private"), + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ) + ] : void 0, Xt = V.createLateBoundIndexSignatures(ee, u, GN, $N, D), rn = Wi(Wi(Wi(Et, Xt), yt), Or(ee.members, Xn, sl)), ye = S.createNodeArray(rn), ft = sm(ee); + if (ft && !_o(ft.expression) && ft.expression.kind !== 106) { + const fe = ee.name ? Pi(ee.name.escapedText) : "default", L = S.createUniqueName( + `${fe}_base`, + 16 + /* Optimistic */ + ); + n = () => ({ + diagnosticMessage: p.extends_clause_of_exported_class_0_has_or_is_using_private_name_1, + errorNode: ft, + typeName: ee.name + }); + const ve = S.createVariableDeclaration( + L, + /*exclamationToken*/ + void 0, + V.createTypeOfExpression(ft.expression, ee, GN, $N, D), + /*initializer*/ + void 0 + ), X = S.createVariableStatement(i ? [S.createModifier( + 138 + /* DeclareKeyword */ + )] : [], S.createVariableDeclarationList( + [ve], + 2 + /* Const */ + )), lt = S.createNodeArray(gr(ee.heritageClauses, (zt) => { + if (zt.token === 96) { + const de = n; + n = kv(zt.types[0]); + const st = S.updateHeritageClause(zt, gr(zt.types, (Gt) => S.updateExpressionWithTypeArguments(Gt, L, Or(Gt.typeArguments, Xn, fi)))); + return n = de, st; + } + return S.updateHeritageClause(zt, Or(S.createNodeArray(kn( + zt.types, + (de) => _o(de.expression) || de.expression.kind === 106 + /* NullKeyword */ + )), Xn, Lh)); + })); + return [ + X, + Ke(S.updateClassDeclaration( + ee, + Je, + ee.name, + Ye, + lt, + ye + )) + ]; + } else { + const fe = Ct(ee.heritageClauses); + return Ke(S.updateClassDeclaration( + ee, + Je, + ee.name, + Ye, + fe, + ye + )); + } + } + case 243: + return Ke(qr(ee)); + case 266: + return Ke(S.updateEnumDeclaration( + ee, + S.createNodeArray(gs(ee)), + ee.name, + S.createNodeArray(Li(ee.members, (Je) => { + if (Cs(Je)) return; + const Ye = V.getEnumMemberValue(Je), _t = Ye?.value; + Z && Je.initializer && Ye?.hasExternalReferences && // This will be its own compiler error instead, so don't report. + !fa(Je.name) && e.addDiagnostic(tn(Je, p.Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations)); + const yt = _t === void 0 ? void 0 : typeof _t == "string" ? S.createStringLiteral(_t) : _t < 0 ? S.createPrefixUnaryExpression(41, S.createNumericLiteral(-_t)) : S.createNumericLiteral(_t); + return Wr(S.updateEnumMember(Je, Je.name, yt), Je); + })) + )); + } + return E.assertNever(ee, `Unhandled top-level node in declaration emit: ${E.formatSyntaxKind(ee.kind)}`); + function Ke(Je) { + return Dt(ee) && (u = Ve), K && (n = Ie), ee.kind === 267 && (i = $e), Je === ee ? Je : (A = void 0, w = void 0, Je && Sn(Wr(Je, ee), ee)); + } + } + function qr(ee) { + if (!lr(ee.declarationList.declarations, bt)) return; + const Ve = Or(ee.declarationList.declarations, Xn, Kn); + if (!Ir(Ve)) return; + const K = S.createNodeArray(gs(ee)); + let Ie; + return n3(ee.declarationList) || r3(ee.declarationList) ? (Ie = S.createVariableDeclarationList( + Ve, + 2 + /* Const */ + ), Sn(Ie, ee.declarationList), ot(Ie, ee.declarationList), Hc(Ie, ee.declarationList)) : Ie = S.updateVariableDeclarationList(ee.declarationList, Ve), S.updateVariableStatement(ee, K, Ie); + } + function Bn(ee) { + return Dp(Li(ee.elements, (Ve) => wn(Ve))); + } + function wn(ee) { + if (ee.kind !== 232 && ee.name) + return bt(ee) ? Ds(ee.name) ? Bn(ee.name) : S.createVariableDeclaration( + ee.name, + /*exclamationToken*/ + void 0, + De(ee), + /*initializer*/ + void 0 + ) : void 0; + } + function ki(ee) { + let Ve; + h || (Ve = n, n = Xne(ee)), w = ee.name, E.assert(Ph(ee)); + const Ie = ee.name.expression; + Qt(Ie, u), h || (n = Ve), w = void 0; + } + function Cs(ee) { + return !!_e && !!ee && kZ(ee, O); + } + function Ks(ee) { + return Io(ee) || wc(ee); + } + function xr(ee) { + return at(ee, Ks); + } + function gs(ee) { + const Ve = Mu(ee), K = Qe(ee); + return Ve === K ? JD(ee.modifiers, (Ie) => jn(Ie, ia), ia) : S.createModifiersFromModifierFlags(K); + } + function Qe(ee) { + let Ve = 130030, K = i && !rje(ee) ? 128 : 0; + const Ie = ee.parent.kind === 307; + return (!Ie || s && Ie && el(ee.parent)) && (Ve ^= 128, K = 0), R1e(ee, Ve, K); + } + function Ct(ee) { + return S.createNodeArray(kn( + gr(ee, (Ve) => S.updateHeritageClause( + Ve, + Or( + S.createNodeArray(kn(Ve.types, (K) => _o(K.expression) || Ve.token === 96 && K.expression.kind === 106)), + Xn, + Lh + ) + )), + (Ve) => Ve.types && !!Ve.types.length + )); + } + } + function rje(e) { + return e.kind === 264; + } + function nje(e, t, n, i) { + return e.createModifiersFromModifierFlags(R1e(t, n, i)); + } + function R1e(e, t = 131070, n = 0) { + let i = Mu(e) & t | n; + return i & 2048 && !(i & 32) && (i ^= 32), i & 2048 && i & 128 && (i ^= 128), i; + } + function j1e(e) { + switch (e.kind) { + case 172: + case 171: + return !Q_( + e, + 2 + /* Private */ + ); + case 169: + case 260: + return !0; + } + return !1; + } + function ije(e) { + switch (e.kind) { + case 262: + case 267: + case 271: + case 264: + case 263: + case 265: + case 266: + case 243: + case 272: + case 278: + case 277: + return !0; + } + return !1; + } + function sje(e) { + switch (e.kind) { + case 180: + case 176: + case 174: + case 177: + case 178: + case 172: + case 171: + case 173: + case 179: + case 181: + case 260: + case 168: + case 233: + case 183: + case 194: + case 184: + case 185: + case 205: + return !0; + } + return !1; + } + function aje(e) { + switch (e) { + case 200: + return IW; + case 99: + case 7: + case 6: + case 5: + case 100: + case 199: + case 1: + return $ne; + case 4: + return Gne; + default: + return AW; + } + } + var Zne = { scriptTransformers: He, declarationTransformers: He }; + function Kne(e, t, n) { + return { + scriptTransformers: oje(e, t, n), + declarationTransformers: cje(t) + }; + } + function oje(e, t, n) { + if (n) return He; + const i = pa(e), s = Ru(e), o = $3(e), c = []; + return Nn(c, t && gr(t.before, J1e)), c.push(Nne), e.experimentalDecorators && c.push(Fne), F5(e) && c.push(Une), i < 99 && c.push(Jne), !e.experimentalDecorators && (i < 99 || !o) && c.push(One), c.push(Ane), i < 8 && c.push(Bne), i < 7 && c.push(jne), i < 6 && c.push(Rne), i < 5 && c.push(Mne), i < 4 && c.push(Lne), i < 3 && c.push(Vne), i < 2 && (c.push(qne), c.push(Hne)), c.push(aje(s)), Nn(c, t && gr(t.after, J1e)), c; + } + function cje(e) { + const t = []; + return t.push(FW), Nn(t, e && gr(e.afterDeclarations, uje)), t; + } + function lje(e) { + return (t) => Dte(t) ? e.transformBundle(t) : e.transformSourceFile(t); + } + function B1e(e, t) { + return (n) => { + const i = e(n); + return typeof i == "function" ? t(n, i) : lje(i); + }; + } + function J1e(e) { + return B1e(e, Ad); + } + function uje(e) { + return B1e(e, (t, n) => n); + } + function GD(e, t) { + return t; + } + function XN(e, t, n) { + n(e, t); + } + function QN(e, t, n, i, s, o, c) { + var _, u; + const m = new Array( + 358 + /* Count */ + ); + let g, h, S, T = 0, C = [], D = [], w = [], A = [], O = 0, F = !1, R = [], W = 0, V, $, U = GD, _e = XN, Z = 0; + const J = [], re = { + factory: n, + getCompilerOptions: () => i, + getEmitResolver: () => e, + // TODO: GH#18217 + getEmitHost: () => t, + // TODO: GH#18217 + getEmitHelperFactory: Iu(() => ate(re)), + startLexicalEnvironment: xe, + suspendLexicalEnvironment: he, + resumeLexicalEnvironment: ne, + endLexicalEnvironment: Ae, + setLexicalEnvironmentFlags: De, + getLexicalEnvironmentFlags: we, + hoistVariableDeclaration: ue, + hoistFunctionDeclaration: it, + addInitializationStatement: Oe, + startBlockScope: Ue, + endBlockScope: bt, + addBlockScopedVariable: Lt, + requestEmitHelper: er, + readEmitHelpers: Nr, + enableSubstitution: q, + enableEmitNotification: Ee, + isSubstitutionEnabled: me, + isEmitNotificationEnabled: oe, + get onSubstituteNode() { + return U; + }, + set onSubstituteNode(Qt) { + E.assert(Z < 1, "Cannot modify transformation hooks after initialization has completed."), E.assert(Qt !== void 0, "Value must not be 'undefined'"), U = Qt; + }, + get onEmitNode() { + return _e; + }, + set onEmitNode(Qt) { + E.assert(Z < 1, "Cannot modify transformation hooks after initialization has completed."), E.assert(Qt !== void 0, "Value must not be 'undefined'"), _e = Qt; + }, + addDiagnostic(Qt) { + J.push(Qt); + } + }; + for (const Qt of s) + JJ(Cr(ls(Qt))); + Qo("beforeTransform"); + const te = o.map((Qt) => Qt(re)), ie = (Qt) => { + for (const Wr of te) + Qt = Wr(Qt); + return Qt; + }; + Z = 1; + const le = []; + for (const Qt of s) + (_ = nn) == null || _.push(nn.Phase.Emit, "transformNodes", Qt.kind === 307 ? { path: Qt.path } : { kind: Qt.kind, pos: Qt.pos, end: Qt.end }), le.push((c ? ie : Te)(Qt)), (u = nn) == null || u.pop(); + return Z = 2, Qo("afterTransform"), Yf("transformTime", "beforeTransform", "afterTransform"), { + transformed: le, + substituteNode: Ce, + emitNodeWithNotification: ke, + isEmitNotificationEnabled: oe, + dispose: Dt, + diagnostics: J + }; + function Te(Qt) { + return Qt && (!Ei(Qt) || !Qt.isDeclarationFile) ? ie(Qt) : Qt; + } + function q(Qt) { + E.assert(Z < 2, "Cannot modify the transformation context after transformation has completed."), m[Qt] |= 1; + } + function me(Qt) { + return (m[Qt.kind] & 1) !== 0 && (va(Qt) & 8) === 0; + } + function Ce(Qt, Wr) { + return E.assert(Z < 3, "Cannot substitute a node after the result is disposed."), Wr && me(Wr) && U(Qt, Wr) || Wr; + } + function Ee(Qt) { + E.assert(Z < 2, "Cannot modify the transformation context after transformation has completed."), m[Qt] |= 2; + } + function oe(Qt) { + return (m[Qt.kind] & 2) !== 0 || (va(Qt) & 4) !== 0; + } + function ke(Qt, Wr, yr) { + E.assert(Z < 3, "Cannot invoke TransformationResult callbacks after the result is disposed."), Wr && (oe(Wr) ? _e(Qt, Wr, yr) : yr(Qt, Wr)); + } + function ue(Qt) { + E.assert(Z > 0, "Cannot modify the lexical environment during initialization."), E.assert(Z < 2, "Cannot modify the lexical environment after transformation has completed."); + const Wr = on( + n.createVariableDeclaration(Qt), + 128 + /* NoNestedSourceMaps */ + ); + g ? g.push(Wr) : g = [Wr], T & 1 && (T |= 2); + } + function it(Qt) { + E.assert(Z > 0, "Cannot modify the lexical environment during initialization."), E.assert(Z < 2, "Cannot modify the lexical environment after transformation has completed."), on( + Qt, + 2097152 + /* CustomPrologue */ + ), h ? h.push(Qt) : h = [Qt]; + } + function Oe(Qt) { + E.assert(Z > 0, "Cannot modify the lexical environment during initialization."), E.assert(Z < 2, "Cannot modify the lexical environment after transformation has completed."), on( + Qt, + 2097152 + /* CustomPrologue */ + ), S ? S.push(Qt) : S = [Qt]; + } + function xe() { + E.assert(Z > 0, "Cannot modify the lexical environment during initialization."), E.assert(Z < 2, "Cannot modify the lexical environment after transformation has completed."), E.assert(!F, "Lexical environment is suspended."), C[O] = g, D[O] = h, w[O] = S, A[O] = T, O++, g = void 0, h = void 0, S = void 0, T = 0; + } + function he() { + E.assert(Z > 0, "Cannot modify the lexical environment during initialization."), E.assert(Z < 2, "Cannot modify the lexical environment after transformation has completed."), E.assert(!F, "Lexical environment is already suspended."), F = !0; + } + function ne() { + E.assert(Z > 0, "Cannot modify the lexical environment during initialization."), E.assert(Z < 2, "Cannot modify the lexical environment after transformation has completed."), E.assert(F, "Lexical environment is not suspended."), F = !1; + } + function Ae() { + E.assert(Z > 0, "Cannot modify the lexical environment during initialization."), E.assert(Z < 2, "Cannot modify the lexical environment after transformation has completed."), E.assert(!F, "Lexical environment is suspended."); + let Qt; + if (g || h || S) { + if (h && (Qt = [...h]), g) { + const Wr = n.createVariableStatement( + /*modifiers*/ + void 0, + n.createVariableDeclarationList(g) + ); + on( + Wr, + 2097152 + /* CustomPrologue */ + ), Qt ? Qt.push(Wr) : Qt = [Wr]; + } + S && (Qt ? Qt = [...Qt, ...S] : Qt = [...S]); + } + return O--, g = C[O], h = D[O], S = w[O], T = A[O], O === 0 && (C = [], D = [], w = [], A = []), Qt; + } + function De(Qt, Wr) { + T = Wr ? T | Qt : T & ~Qt; + } + function we() { + return T; + } + function Ue() { + E.assert(Z > 0, "Cannot start a block scope during initialization."), E.assert(Z < 2, "Cannot start a block scope after transformation has completed."), R[W] = V, W++, V = void 0; + } + function bt() { + E.assert(Z > 0, "Cannot end a block scope during initialization."), E.assert(Z < 2, "Cannot end a block scope after transformation has completed."); + const Qt = at(V) ? [ + n.createVariableStatement( + /*modifiers*/ + void 0, + n.createVariableDeclarationList( + V.map((Wr) => n.createVariableDeclaration(Wr)), + 1 + /* Let */ + ) + ) + ] : void 0; + return W--, V = R[W], W === 0 && (R = []), Qt; + } + function Lt(Qt) { + E.assert(W > 0, "Cannot add a block scoped variable outside of an iteration body."), (V || (V = [])).push(Qt); + } + function er(Qt) { + if (E.assert(Z > 0, "Cannot modify the transformation context during initialization."), E.assert(Z < 2, "Cannot modify the transformation context after transformation has completed."), E.assert(!Qt.scoped, "Cannot request a scoped emit helper."), Qt.dependencies) + for (const Wr of Qt.dependencies) + er(Wr); + $ = Pr($, Qt); + } + function Nr() { + E.assert(Z > 0, "Cannot modify the transformation context during initialization."), E.assert(Z < 2, "Cannot modify the transformation context after transformation has completed."); + const Qt = $; + return $ = void 0, Qt; + } + function Dt() { + if (Z < 3) { + for (const Qt of s) + JJ(Cr(ls(Qt))); + g = void 0, C = void 0, h = void 0, D = void 0, U = void 0, _e = void 0, $ = void 0, Z = 3; + } + } + } + var YN = { + factory: N, + // eslint-disable-line object-shorthand + getCompilerOptions: () => ({}), + getEmitResolver: qs, + getEmitHost: qs, + getEmitHelperFactory: qs, + startLexicalEnvironment: Ja, + resumeLexicalEnvironment: Ja, + suspendLexicalEnvironment: Ja, + endLexicalEnvironment: vb, + setLexicalEnvironmentFlags: Ja, + getLexicalEnvironmentFlags: () => 0, + hoistVariableDeclaration: Ja, + hoistFunctionDeclaration: Ja, + addInitializationStatement: Ja, + startBlockScope: Ja, + endBlockScope: vb, + addBlockScopedVariable: Ja, + requestEmitHelper: Ja, + readEmitHelpers: qs, + enableSubstitution: Ja, + enableEmitNotification: Ja, + isSubstitutionEnabled: qs, + isEmitNotificationEnabled: qs, + onSubstituteNode: GD, + onEmitNode: XN, + addDiagnostic: Ja + }, z1e = fje(); + function eie(e) { + return Bo( + e, + ".tsbuildinfo" + /* TsBuildInfo */ + ); + } + function OW(e, t, n, i = !1, s, o) { + const c = os(n) ? n : _5(e, n, i), _ = e.getCompilerOptions(); + if (!s) + if (_.outFile) { + if (c.length) { + const u = N.createBundle(c), m = t($D(u, e, i), u); + if (m) + return m; + } + } else + for (const u of c) { + const m = t($D(u, e, i), u); + if (m) + return m; + } + if (o) { + const u = Cv(_); + if (u) return t( + { buildInfoPath: u }, + /*sourceFileOrBundle*/ + void 0 + ); + } + } + function Cv(e) { + const t = e.configFilePath; + if (!_je(e)) return; + if (e.tsBuildInfoFile) return e.tsBuildInfoFile; + const n = e.outFile; + let i; + if (n) + i = $u(n); + else { + if (!t) return; + const s = $u(t); + i = e.outDir ? e.rootDir ? Iy(e.outDir, Df( + e.rootDir, + s, + /*ignoreCase*/ + !0 + )) : Ln(e.outDir, Vc(s)) : s; + } + return i + ".tsbuildinfo"; + } + function _je(e) { + return Vb(e) || !!e.tscBuild; + } + function tie(e, t) { + const n = e.outFile, i = e.emitDeclarationOnly ? void 0 : n, s = i && W1e(i, e), o = t || N_(e) ? $u(n) + ".d.ts" : void 0, c = o && P5(e) ? o + ".map" : void 0; + return { jsFilePath: i, sourceMapFilePath: s, declarationFilePath: o, declarationMapPath: c }; + } + function $D(e, t, n) { + const i = t.getCompilerOptions(); + if (e.kind === 308) + return tie(i, n); + { + const s = NK(e.fileName, t, ZN(e.fileName, i)), o = tp(e), c = o && xh(e.fileName, s, t.getCurrentDirectory(), !t.useCaseSensitiveFileNames()) === 0, _ = i.emitDeclarationOnly || c ? void 0 : s, u = !_ || tp(e) ? void 0 : W1e(_, i), m = n || N_(i) && !o ? AK(e.fileName, t) : void 0, g = m && P5(i) ? m + ".map" : void 0; + return { jsFilePath: _, sourceMapFilePath: u, declarationFilePath: m, declarationMapPath: g }; + } + } + function W1e(e, t) { + return t.sourceMap && !t.inlineSourceMap ? e + ".map" : void 0; + } + function ZN(e, t) { + return Bo( + e, + ".json" + /* Json */ + ) ? ".json" : t.jsx === 1 && vc(e, [ + ".jsx", + ".tsx" + /* Tsx */ + ]) ? ".jsx" : vc(e, [ + ".mts", + ".mjs" + /* Mjs */ + ]) ? ".mjs" : vc(e, [ + ".cts", + ".cjs" + /* Cjs */ + ]) ? ".cjs" : ".js"; + } + function U1e(e, t, n, i) { + return n ? Iy( + n, + Df(i(), e, t) + ) : e; + } + function x6(e, t, n, i = () => HS(t, n)) { + return LW(e, t.options, n, i); + } + function LW(e, t, n, i) { + return Oh( + U1e(e, n, t.declarationDir || t.outDir, i), + l5(e) + ); + } + function V1e(e, t, n, i = () => HS(t, n)) { + if (t.options.emitDeclarationOnly) return; + const s = Bo( + e, + ".json" + /* Json */ + ), o = MW(e, t.options, n, i); + return !s || xh(e, o, E.checkDefined(t.options.configFilePath), n) !== 0 ? o : void 0; + } + function MW(e, t, n, i) { + return Oh( + U1e(e, n, t.outDir, i), + ZN(e, t) + ); + } + function q1e() { + let e; + return { addOutput: t, getOutputs: n }; + function t(i) { + i && (e || (e = [])).push(i); + } + function n() { + return e || He; + } + } + function H1e(e, t) { + const { jsFilePath: n, sourceMapFilePath: i, declarationFilePath: s, declarationMapPath: o } = tie( + e.options, + /*forceDtsPaths*/ + !1 + ); + t(n), t(i), t(s), t(o); + } + function G1e(e, t, n, i, s) { + if (fl(t)) return; + const o = V1e(t, e, n, s); + if (i(o), !Bo( + t, + ".json" + /* Json */ + ) && (o && e.options.sourceMap && i(`${o}.map`), N_(e.options))) { + const c = x6(t, e, n, s); + i(c), e.options.declarationMap && i(`${c}.map`); + } + } + function XD(e, t, n, i, s) { + let o; + return e.rootDir ? (o = Xi(e.rootDir, n), s?.(e.rootDir)) : e.composite && e.configFilePath ? (o = Hn(Vl(e.configFilePath)), s?.(o)) : o = lie(t(), n, i), o && o[o.length - 1] !== jo && (o += jo), o; + } + function HS({ options: e, fileNames: t }, n) { + return XD( + e, + () => kn(t, (i) => !(e.noEmitForJsFiles && vc(i, GC)) && !fl(i)), + Hn(Vl(E.checkDefined(e.configFilePath))), + Wl(!n) + ); + } + function SO(e, t) { + const { addOutput: n, getOutputs: i } = q1e(); + if (e.options.outFile) + H1e(e, n); + else { + const s = Iu(() => HS(e, t)); + for (const o of e.fileNames) + G1e(e, o, t, n, s); + } + return n(Cv(e.options)), i(); + } + function $1e(e, t, n) { + t = Hs(t), E.assert(as(e.fileNames, t), "Expected fileName to be present in command line"); + const { addOutput: i, getOutputs: s } = q1e(); + return e.options.outFile ? H1e(e, i) : G1e(e, t, n, i), s(); + } + function RW(e, t) { + if (e.options.outFile) { + const { jsFilePath: s, declarationFilePath: o } = tie( + e.options, + /*forceDtsPaths*/ + !1 + ); + return E.checkDefined(s || o, `project ${e.options.configFilePath} expected to have at least one output`); + } + const n = Iu(() => HS(e, t)); + for (const s of e.fileNames) { + if (fl(s)) continue; + const o = V1e(s, e, t, n); + if (o) return o; + if (!Bo( + s, + ".json" + /* Json */ + ) && N_(e.options)) + return x6(s, e, t, n); + } + const i = Cv(e.options); + return i || E.fail(`project ${e.options.configFilePath} expected to have at least one output`); + } + function jW(e, t) { + return !!t && !!e; + } + function BW(e, t, n, { scriptTransformers: i, declarationTransformers: s }, o, c, _, u) { + var m = t.getCompilerOptions(), g = m.sourceMap || m.inlineSourceMap || P5(m) ? [] : void 0, h = m.listEmittedFiles ? [] : void 0, S = F3(), T = N0(m), C = M3(T), { enter: D, exit: w } = RR("printTime", "beforePrint", "afterPrint"), A = !1; + return D(), OW( + t, + O, + _5(t, n, _), + _, + c, + !n && !u + ), w(), { + emitSkipped: A, + diagnostics: S.getDiagnostics(), + emittedFiles: h, + sourceMaps: g + }; + function O({ jsFilePath: te, sourceMapFilePath: ie, declarationFilePath: le, declarationMapPath: Te, buildInfoPath: q }, me) { + var Ce, Ee, oe, ke, ue, it; + (Ce = nn) == null || Ce.push(nn.Phase.Emit, "emitJsFileOrBundle", { jsFilePath: te }), R(me, te, ie), (Ee = nn) == null || Ee.pop(), (oe = nn) == null || oe.push(nn.Phase.Emit, "emitDeclarationFileOrBundle", { declarationFilePath: le }), W(me, le, Te), (ke = nn) == null || ke.pop(), (ue = nn) == null || ue.push(nn.Phase.Emit, "emitBuildInfo", { buildInfoPath: q }), F(q), (it = nn) == null || it.pop(); + } + function F(te) { + if (!te || n) return; + if (t.isEmitBlocked(te)) { + A = !0; + return; + } + const ie = t.getBuildInfo() || { version: Xf }; + p5( + t, + S, + te, + rie(ie), + /*writeByteOrderMark*/ + !1, + /*sourceFiles*/ + void 0, + { buildInfo: ie } + ), h?.push(te); + } + function R(te, ie, le) { + if (!te || o || !ie) + return; + if (t.isEmitBlocked(ie) || m.noEmit) { + A = !0; + return; + } + (Ei(te) ? [te] : kn(te.sourceFiles, G7)).forEach( + (Ce) => { + (m.noCheck || !sD(Ce, m)) && $(Ce); + } + ); + const Te = QN( + e, + t, + N, + m, + [te], + i, + /*allowDtsFiles*/ + !1 + ), q = { + removeComments: m.removeComments, + newLine: m.newLine, + noEmitHelpers: m.noEmitHelpers, + module: Ru(m), + moduleResolution: Su(m), + target: pa(m), + sourceMap: m.sourceMap, + inlineSourceMap: m.inlineSourceMap, + inlineSources: m.inlineSources, + extendedDiagnostics: m.extendedDiagnostics + }, me = u1(q, { + // resolver hooks + hasGlobalName: e.hasGlobalName, + // transform hooks + onEmitNode: Te.emitNodeWithNotification, + isEmitNotificationEnabled: Te.isEmitNotificationEnabled, + substituteNode: Te.substituteNode + }); + E.assert(Te.transformed.length === 1, "Should only see one output from the transform"), U(ie, le, Te, me, m), Te.dispose(), h && (h.push(ie), le && h.push(le)); + } + function W(te, ie, le) { + if (!te || o === 0) return; + if (!ie) { + (o || m.emitDeclarationOnly) && (A = !0); + return; + } + const Te = Ei(te) ? [te] : te.sourceFiles, q = _ ? Te : kn(Te, G7), me = m.outFile ? [N.createBundle(q)] : q; + q.forEach((oe) => { + (o && !N_(m) || m.noCheck || jW(o, _) || !sD(oe, m)) && V(oe); + }); + const Ce = QN( + e, + t, + N, + m, + me, + s, + /*allowDtsFiles*/ + !1 + ); + if (Ir(Ce.diagnostics)) + for (const oe of Ce.diagnostics) + S.add(oe); + const Ee = !!Ce.diagnostics && !!Ce.diagnostics.length || !!t.isEmitBlocked(ie) || !!m.noEmit; + if (A = A || Ee, !Ee || _) { + E.assert(Ce.transformed.length === 1, "Should only see one output from the decl transform"); + const oe = { + removeComments: m.removeComments, + newLine: m.newLine, + noEmitHelpers: !0, + module: m.module, + moduleResolution: m.moduleResolution, + target: m.target, + sourceMap: o !== 2 && m.declarationMap, + inlineSourceMap: m.inlineSourceMap, + extendedDiagnostics: m.extendedDiagnostics, + onlyPrintJsDocStyle: !0, + omitBraceSourceMapPositions: !0 + }, ke = u1(oe, { + // resolver hooks + hasGlobalName: e.hasGlobalName, + // transform hooks + onEmitNode: Ce.emitNodeWithNotification, + isEmitNotificationEnabled: Ce.isEmitNotificationEnabled, + substituteNode: Ce.substituteNode + }), ue = U( + ie, + le, + Ce, + ke, + { + sourceMap: oe.sourceMap, + sourceRoot: m.sourceRoot, + mapRoot: m.mapRoot, + extendedDiagnostics: m.extendedDiagnostics + // Explicitly do not passthru either `inline` option + } + ); + h && (ue && h.push(ie), le && h.push(le)); + } + Ce.dispose(); + } + function V(te) { + if (Io(te)) { + te.expression.kind === 80 && e.collectLinkedAliases( + te.expression, + /*setVisibility*/ + !0 + ); + return; + } else if (Tu(te)) { + e.collectLinkedAliases( + te.propertyName || te.name, + /*setVisibility*/ + !0 + ); + return; + } + ms(te, V); + } + function $(te) { + Gu(te) || Yx(te, (ie) => { + if (_l(ie) && !(w0(ie) & 32) || zo(ie)) return "skip"; + e.markLinkedReferences(ie); + }); + } + function U(te, ie, le, Te, q) { + const me = le.transformed[0], Ce = me.kind === 308 ? me : void 0, Ee = me.kind === 307 ? me : void 0, oe = Ce ? Ce.sourceFiles : [Ee]; + let ke; + _e(q, me) && (ke = fne( + t, + Vc(Vl(te)), + Z(q), + J(q, te, Ee), + q + )), Ce ? Te.writeBundle(Ce, C, ke) : Te.writeFile(Ee, C, ke); + let ue; + if (ke) { + g && g.push({ + inputSourceFileNames: ke.getSources(), + sourceMap: ke.toJSON() + }); + const xe = re( + q, + ke, + te, + ie, + Ee + ); + if (xe && (C.isAtStartOfLine() || C.rawWrite(T), ue = C.getTextPos(), C.writeComment(`//# sourceMappingURL=${xe}`)), ie) { + const he = ke.toString(); + p5( + t, + S, + ie, + he, + /*writeByteOrderMark*/ + !1, + oe + ); + } + } else + C.writeLine(); + const it = C.getText(), Oe = { sourceMapUrlPos: ue, diagnostics: le.diagnostics }; + return p5(t, S, te, it, !!m.emitBOM, oe, Oe), C.clear(), !Oe.skippedDtsWrite; + } + function _e(te, ie) { + return (te.sourceMap || te.inlineSourceMap) && (ie.kind !== 307 || !Bo( + ie.fileName, + ".json" + /* Json */ + )); + } + function Z(te) { + const ie = Vl(te.sourceRoot || ""); + return ie && il(ie); + } + function J(te, ie, le) { + if (te.sourceRoot) return t.getCommonSourceDirectory(); + if (te.mapRoot) { + let Te = Vl(te.mapRoot); + return le && (Te = Hn(f5(le.fileName, t, Te))), Xm(Te) === 0 && (Te = Ln(t.getCommonSourceDirectory(), Te)), Te; + } + return Hn(Hs(ie)); + } + function re(te, ie, le, Te, q) { + if (te.inlineSourceMap) { + const Ce = ie.toString(); + return `data:application/json;base64,${GK(nl, Ce)}`; + } + const me = Vc(Vl(E.checkDefined(Te))); + if (te.mapRoot) { + let Ce = Vl(te.mapRoot); + return q && (Ce = Hn(f5(q.fileName, t, Ce))), Xm(Ce) === 0 ? (Ce = Ln(t.getCommonSourceDirectory(), Ce), encodeURI( + KT( + Hn(Hs(le)), + // get the relative sourceMapDir path based on jsFilePath + Ln(Ce, me), + // this is where user expects to see sourceMap + t.getCurrentDirectory(), + t.getCanonicalFileName, + /*isAbsolutePathAnUrl*/ + !0 + ) + )) : encodeURI(Ln(Ce, me)); + } + return encodeURI(me); + } + } + function rie(e) { + return JSON.stringify(e); + } + function JW(e, t) { + return KB(e, t); + } + var nie = { + hasGlobalName: qs, + getReferencedExportContainer: qs, + getReferencedImportDeclaration: qs, + getReferencedDeclarationWithCollidingName: qs, + isDeclarationWithCollidingName: qs, + isValueAliasDeclaration: qs, + isReferencedAliasDeclaration: qs, + isTopLevelValueImportEqualsWithEntityName: qs, + hasNodeCheckFlag: qs, + isDeclarationVisible: qs, + isLateBound: (e) => !1, + collectLinkedAliases: qs, + markLinkedReferences: qs, + isImplementationOfOverload: qs, + requiresAddingImplicitUndefined: qs, + isExpandoFunctionDeclaration: qs, + getPropertiesOfContainerFunction: qs, + createTypeOfDeclaration: qs, + createReturnTypeOfSignatureDeclaration: qs, + createTypeOfExpression: qs, + createLiteralConstValue: qs, + isSymbolAccessible: qs, + isEntityNameVisible: qs, + // Returns the constant value this property access resolves to: notImplemented, or 'undefined' for a non-constant + getConstantValue: qs, + getEnumMemberValue: qs, + getReferencedValueDeclaration: qs, + getReferencedValueDeclarations: qs, + getTypeReferenceSerializationKind: qs, + isOptionalParameter: qs, + isArgumentsLocalBinding: qs, + getExternalModuleFileFromDeclaration: qs, + isLiteralConstDeclaration: qs, + getJsxFactoryEntity: qs, + getJsxFragmentFactoryEntity: qs, + isBindingCapturedByNode: qs, + getDeclarationStatementsForSourceFile: qs, + isImportRequiredByAugmentation: qs, + isDefinitelyReferenceToGlobalSymbolObject: qs, + createLateBoundIndexSignatures: qs + }, iie = /* @__PURE__ */ Iu(() => u1({})), o2 = /* @__PURE__ */ Iu(() => u1({ removeComments: !0 })), sie = /* @__PURE__ */ Iu(() => u1({ removeComments: !0, neverAsciiEscape: !0 })), zW = /* @__PURE__ */ Iu(() => u1({ removeComments: !0, omitTrailingSemicolon: !0 })); + function u1(e = {}, t = {}) { + var { + hasGlobalName: n, + onEmitNode: i = XN, + isEmitNotificationEnabled: s, + substituteNode: o = GD, + onBeforeEmitNode: c, + onAfterEmitNode: _, + onBeforeEmitNodeArray: u, + onAfterEmitNodeArray: m, + onBeforeEmitToken: g, + onAfterEmitToken: h + } = t, S = !!e.extendedDiagnostics, T = !!e.omitBraceSourceMapPositions, C = N0(e), D = Ru(e), w = /* @__PURE__ */ new Map(), A, O, F, R, W, V, $, U, _e, Z, J, re, te, ie, le, Te = e.preserveSourceNewlines, q, me, Ce, Ee = nE, oe, ke = !0, ue, it, Oe = -1, xe, he = -1, ne = -1, Ae = -1, De = -1, we, Ue, bt = !1, Lt = !!e.removeComments, er, Nr, { enter: Dt, exit: Qt } = age(S, "commentTime", "beforeComment", "afterComment"), Wr = N.parenthesizer, yr = { + select: (k) => k === 0 ? Wr.parenthesizeLeadingTypeArgument : void 0 + }, qn = ml(); + return Cs(), { + // public API + printNode: Bt, + printList: bi, + printFile: Xn, + printBundle: pi, + // internal API + writeNode: jr, + writeList: di, + writeFile: gt, + writeBundle: Re + }; + function Bt(k, ce, mt) { + switch (k) { + case 0: + E.assert(Ei(ce), "Expected a SourceFile node."); + break; + case 2: + E.assert(Me(ce), "Expected an Identifier node."); + break; + case 1: + E.assert(ct(ce), "Expected an Expression node."); + break; + } + switch (ce.kind) { + case 307: + return Xn(ce); + case 308: + return pi(ce); + } + return jr(k, ce, mt, tr()), qr(); + } + function bi(k, ce, mt) { + return di(k, ce, mt, tr()), qr(); + } + function pi(k) { + return Re( + k, + tr(), + /*sourceMapGenerator*/ + void 0 + ), qr(); + } + function Xn(k) { + return gt( + k, + tr(), + /*sourceMapGenerator*/ + void 0 + ), qr(); + } + function jr(k, ce, mt, sr) { + const Yn = me; + ki( + sr, + /*_sourceMapGenerator*/ + void 0 + ), Bn(k, ce, mt), Cs(), me = Yn; + } + function di(k, ce, mt, sr) { + const Yn = me; + ki( + sr, + /*_sourceMapGenerator*/ + void 0 + ), mt && wn(mt), go( + /*parentNode*/ + void 0, + ce, + k + ), Cs(), me = Yn; + } + function Re(k, ce, mt) { + oe = !1; + const sr = me; + ki(ce, mt), _d(k), ca(k), Xt(k), dg(k); + for (const Yn of k.sourceFiles) + Bn(0, Yn, Yn); + Cs(), me = sr; + } + function gt(k, ce, mt) { + oe = !0; + const sr = me; + ki(ce, mt), _d(k), ca(k), Bn(0, k, k), Cs(), me = sr; + } + function tr() { + return Ce || (Ce = M3(C)); + } + function qr() { + const k = Ce.getText(); + return Ce.clear(), k; + } + function Bn(k, ce, mt) { + mt && wn(mt), K( + k, + ce, + /*parenthesizerRule*/ + void 0 + ); + } + function wn(k) { + A = k, we = void 0, Ue = void 0, k && Xp(k); + } + function ki(k, ce) { + k && e.omitTrailingSemicolon && (k = RB(k)), me = k, ue = ce, ke = !me || !ue; + } + function Cs() { + O = [], F = [], R = [], W = /* @__PURE__ */ new Set(), V = [], $ = /* @__PURE__ */ new Map(), U = [], _e = 0, Z = [], J = 0, re = [], te = void 0, ie = [], le = void 0, A = void 0, we = void 0, Ue = void 0, ki( + /*output*/ + void 0, + /*_sourceMapGenerator*/ + void 0 + ); + } + function Ks() { + return we || (we = Ag(E.checkDefined(A))); + } + function xr(k, ce) { + k !== void 0 && K(4, k, ce); + } + function gs(k) { + k !== void 0 && K( + 2, + k, + /*parenthesizerRule*/ + void 0 + ); + } + function Qe(k, ce) { + k !== void 0 && K(1, k, ce); + } + function Ct(k) { + K(ea(k) ? 6 : 4, k); + } + function ee(k) { + Te && td(k) & 4 && (Te = !1); + } + function Ve(k) { + Te = k; + } + function K(k, ce, mt) { + Nr = mt, Ke(0, k, ce)(k, ce), Nr = void 0; + } + function Ie(k) { + return !Lt && !Ei(k); + } + function $e(k) { + return !ke && !Ei(k) && !H7(k); + } + function Ke(k, ce, mt) { + switch (k) { + case 0: + if (i !== XN && (!s || s(mt))) + return Ye; + // falls through + case 1: + if (o !== GD && (er = o(ce, mt) || mt) !== mt) + return Nr && (er = Nr(er)), Et; + // falls through + case 2: + if (Ie(mt)) + return lT; + // falls through + case 3: + if ($e(mt)) + return P1; + // falls through + case 4: + return _t; + default: + return E.assertNever(k); + } + } + function Je(k, ce, mt) { + return Ke(k + 1, ce, mt); + } + function Ye(k, ce) { + const mt = Je(0, k, ce); + i(k, ce, mt); + } + function _t(k, ce) { + if (c?.(ce), Te) { + const mt = Te; + ee(ce), yt(k, ce), Ve(mt); + } else + yt(k, ce); + _?.(ce), Nr = void 0; + } + function yt(k, ce, mt = !0) { + if (mt) { + const sr = WJ(ce); + if (sr) + return fe(k, ce, sr); + } + if (k === 0) return Qh(Ws(ce, Ei)); + if (k === 2) return X(Ws(ce, Me)); + if (k === 6) return ft( + Ws(ce, ea), + /*jsxAttributeEscape*/ + !0 + ); + if (k === 3) return We(Ws(ce, Ao)); + if (k === 7) return rr(Ws(ce, LS)); + if (k === 5) + return E.assertNode(ce, ZJ), cd( + /*isEmbeddedStatement*/ + !0 + ); + if (k === 4) { + switch (ce.kind) { + // Pseudo-literals + case 16: + case 17: + case 18: + return ft( + ce, + /*jsxAttributeEscape*/ + !1 + ); + // Identifiers + case 80: + return X(ce); + // PrivateIdentifiers + case 81: + return lt(ce); + // Parse tree nodes + // Names + case 166: + return zt(ce); + case 167: + return st(ce); + // Signature elements + case 168: + return Gt(ce); + case 169: + return Xr(ce); + case 170: + return Rr(ce); + // Type members + case 171: + return Jr(ce); + case 172: + return tt(ce); + case 173: + return ut(ce); + case 174: + return Mt(ce); + case 175: + return Pt(ce); + case 176: + return Zt(ce); + case 177: + case 178: + return fr(ce); + case 179: + return Vt(ce); + case 180: + return ir(ce); + case 181: + return Tr(ce); + // Types + case 182: + return mi(ce); + case 183: + return Js(ce); + case 184: + return Ms(ce); + case 185: + return eu(ce); + case 186: + return hs(ce); + case 187: + return Bu(ce); + case 188: + return Yc(ce); + case 189: + return Zi(ce); + case 190: + return Ca(ce); + // SyntaxKind.RestType is handled below + case 192: + return Oi(ce); + case 193: + return qt(ce); + case 194: + return Qa(ce); + case 195: + return Mc(ce); + case 196: + return Ol(ce); + case 233: + return F_(ce); + case 197: + return Ll(); + case 198: + return To(ce); + case 199: + return ge(ce); + case 200: + return G(ce); + case 201: + return rt(ce); + case 202: + return Gs(ce); + case 203: + return wt(ce); + case 204: + return _r(ce); + case 205: + return Kt(ce); + // Binding patterns + case 206: + return Yr(ce); + case 207: + return Mn(ce); + case 208: + return pr(ce); + // Misc + case 239: + return od(ce); + case 240: + return Ot(); + // Statements + case 241: + return t_(ce); + case 243: + return y_(ce); + case 242: + return cd( + /*isEmbeddedStatement*/ + !1 + ); + case 244: + return hf(ce); + case 245: + return ug(ce); + case 246: + return et(ce); + case 247: + return Rt(ce); + case 248: + return jt(ce); + case 249: + return Er(ce); + case 250: + return Hr(ce); + case 251: + return ii(ce); + case 252: + return j(ce); + case 253: + return _s(ce); + case 254: + return ps(ce); + case 255: + return ja(ce); + case 256: + return xa(ce); + case 257: + return Ro(ce); + case 258: + return O_(ce); + case 259: + return Ld(ce); + // Declarations + case 260: + return km(ce); + case 261: + return Cm(ce); + case 262: + return G0(ce); + case 263: + return Md(ce); + case 264: + return $0(ce); + case 265: + return m1(ce); + case 266: + return dp(ce); + case 267: + return g1(ce); + case 268: + return mp(ce); + case 269: + return Rd(ce); + case 270: + return Dr(ce); + case 271: + return Hh(ce); + case 272: + return ud(ce); + case 273: + return Rv(ce); + case 274: + return y1(ce); + case 280: + return cn(ce); + case 275: + return X0(ce); + case 276: + return Le(ce); + case 277: + return Ge(ce); + case 278: + return St(ce); + case 279: + return ai(ce); + case 281: + return hn(ce); + case 300: + return vr(ce); + case 301: + return Gr(ce); + case 282: + return; + // Module references + case 283: + return ta(ce); + // JSX (non-expression) + case 12: + return n_(ce); + case 286: + case 289: + return Bf(ce); + case 287: + case 290: + return i_(ce); + case 291: + return Bv(ce); + case 292: + return jv(ce); + case 293: + return fg(ce); + case 294: + return $h(ce); + case 295: + return v1(ce); + // Clauses + case 296: + return nT(ce); + case 297: + return b2(ce); + case 298: + return Pa(ce); + case 299: + return b1(ce); + // Property assignments + case 303: + return eE(ce); + case 304: + return Y0(ce); + case 305: + return Z0(ce); + // Enum + case 306: + return pg(ce); + // Top-level nodes + case 307: + return Qh(ce); + case 308: + return E.fail("Bundles should be printed using printBundle"); + // JSDoc nodes (only used in codefixes currently) + case 309: + return je(ce); + case 310: + return zv(ce); + case 312: + return gn("*"); + case 313: + return gn("?"); + case 314: + return sc(ce); + case 315: + return ri(ce); + case 316: + return zs(ce); + case 317: + return Wo(ce); + case 191: + case 318: + return Sl(ce); + case 319: + return; + case 320: + return Jf(ce); + case 322: + return tu(ce); + case 323: + return ih(ce); + case 327: + case 332: + case 337: + return Ck(ce); + case 328: + case 329: + return tE(ce); + case 330: + case 331: + return; + // SyntaxKind.JSDocClassTag (see JSDocTag, above) + case 333: + case 334: + case 335: + case 336: + return; + case 338: + return K0(ce); + case 339: + return Dm(ce); + // SyntaxKind.JSDocEnumTag (see below) + case 341: + case 348: + return zf(ce); + case 340: + case 342: + case 343: + case 344: + case 349: + case 350: + return bf(ce); + case 345: + return Tl(ce); + case 346: + return Bd(ce); + case 347: + return L_(ce); + case 351: + return b_(ce); + // SyntaxKind.JSDocPropertyTag (see JSDocParameterTag, above) + // Transformation nodes + case 353: + case 354: + return; + } + if (ct(ce) && (k = 1, o !== GD)) { + const sr = o(k, ce) || ce; + sr !== ce && (ce = sr, Nr && (ce = Nr(ce))); + } + } + if (k === 1) + switch (ce.kind) { + // Literals + case 9: + case 10: + return ye(ce); + case 11: + case 14: + case 15: + return ft( + ce, + /*jsxAttributeEscape*/ + !1 + ); + // Identifiers + case 80: + return X(ce); + case 81: + return lt(ce); + // Expressions + case 209: + return En(ce); + case 210: + return Ji(ce); + case 211: + return hi(ce); + case 212: + return Mo(ce); + case 213: + return dc(ce); + case 214: + return mc(ce); + case 215: + return Rc(ce); + case 216: + return Uo(ce); + case 217: + return ac(ce); + case 218: + return Vp(ce); + case 219: + return dl(ce); + case 220: + return Fe(ce); + case 221: + return Ft(ce); + case 222: + return Br(ce); + case 223: + return Ti(ce); + case 224: + return Sa(ce); + case 225: + return Do(ce); + case 226: + return qn(ce); + case 227: + return gc(ce); + case 228: + return Va(ce); + case 229: + return mo(ce); + case 230: + return df(ce); + case 231: + return Rf(ce); + case 232: + return; + case 234: + return mf(ce); + case 235: + return jf(ce); + case 233: + return F_(ce); + case 238: + return fp(ce); + case 236: + return th(ce); + case 237: + return E.fail("SyntheticExpression should never be printed."); + case 282: + return; + // JSX + case 284: + return Cc(ce); + case 285: + return r_(ce); + case 288: + return vf(ce); + // Synthesized list + case 352: + return E.fail("SyntaxList should not be printed"); + // Transformation nodes + case 353: + return; + case 355: + return T1(ce); + case 356: + return Zh(ce); + case 357: + return E.fail("SyntheticReferenceExpression should not be printed"); + } + if (f_(ce.kind)) return k2(ce, cs); + if (Pj(ce.kind)) return k2(ce, gn); + E.fail(`Unhandled SyntaxKind: ${E.formatSyntaxKind(ce.kind)}.`); + } + function We(k) { + xr(k.name), un(), cs("in"), un(), xr(k.constraint); + } + function Et(k, ce) { + const mt = Je(1, k, ce); + E.assertIsDefined(er), ce = er, er = void 0, mt(k, ce); + } + function Xt(k) { + let ce = !1; + const mt = k.kind === 308 ? k : void 0; + if (mt && D === 0) + return; + const sr = mt ? mt.sourceFiles.length : 1; + for (let Yn = 0; Yn < sr; Yn++) { + const zi = mt ? mt.sourceFiles[Yn] : k, Qi = Ei(zi) ? zi : A, ds = e.noEmitHelpers || !!Qi && Ute(Qi), ws = Ei(zi) && !oe, Ea = rn(zi); + if (Ea) + for (const nu of Ea) { + if (nu.scoped) { + if (mt) + continue; + } else { + if (ds) continue; + if (ws) { + if (w.get(nu.name)) + continue; + w.set(nu.name, !0); + } + } + typeof nu.text == "string" ? gp(nu.text) : gp(nu.text($p)), ce = !0; + } + } + return ce; + } + function rn(k) { + const ce = zJ(k); + return ce && W_(ce, ote); + } + function ye(k) { + ft( + k, + /*jsxAttributeEscape*/ + !1 + ); + } + function ft(k, ce) { + const mt = P2( + k, + /*sourceFile*/ + void 0, + e.neverAsciiEscape, + ce + ); + (e.sourceMap || e.inlineSourceMap) && (k.kind === 11 || Ry(k.kind)) ? Hp(mt) : x2(mt); + } + function fe(k, ce, mt) { + switch (mt.kind) { + case 1: + L(k, ce, mt); + break; + case 0: + ve(k, ce, mt); + break; + } + } + function L(k, ce, mt) { + Dk(`\${${mt.order}:`), yt( + k, + ce, + /*allowSnippets*/ + !1 + ), Dk("}"); + } + function ve(k, ce, mt) { + E.assert(ce.kind === 242, `A tab stop cannot be attached to a node of kind ${E.formatSyntaxKind(ce.kind)}.`), E.assert(k !== 5, "A tab stop cannot be attached to an embedded statement."), Dk(`$${mt.order}`); + } + function X(k) { + (k.symbol ? iE : Ee)(sy( + k, + /*includeTrivia*/ + !1 + ), k.symbol), go( + k, + PS(k), + 53776 + /* TypeParameters */ + ); + } + function lt(k) { + Ee(sy( + k, + /*includeTrivia*/ + !1 + )); + } + function zt(k) { + de(k.left), gn("."), xr(k.right); + } + function de(k) { + k.kind === 80 ? Qe(k) : xr(k); + } + function st(k) { + gn("["), Qe(k.expression, Wr.parenthesizeExpressionOfComputedPropertyName), gn("]"); + } + function Gt(k) { + Kh(k, k.modifiers), xr(k.name), k.constraint && (un(), cs("extends"), un(), xr(k.constraint)), k.default && (un(), iy("="), un(), xr(k.default)); + } + function Xr(k) { + sf( + k, + k.modifiers, + /*allowDecorators*/ + !0 + ), xr(k.dotDotDotToken), ey(k.name, Ek), xr(k.questionToken), k.parent && k.parent.kind === 317 && !k.name ? xr(k.type) : mg(k.type), Pm(k.initializer, k.type ? k.type.end : k.questionToken ? k.questionToken.end : k.name ? k.name.end : k.modifiers ? k.modifiers.end : k.pos, k, Wr.parenthesizeExpressionForDisallowedComma); + } + function Rr(k) { + gn("@"), Qe(k.expression, Wr.parenthesizeLeftSideOfAccess); + } + function Jr(k) { + Kh(k, k.modifiers), ey(k.name, sE), xr(k.questionToken), mg(k.type), Ju(); + } + function tt(k) { + sf( + k, + k.modifiers, + /*allowDecorators*/ + !0 + ), xr(k.name), xr(k.questionToken), xr(k.exclamationToken), mg(k.type), Pm(k.initializer, k.type ? k.type.end : k.questionToken ? k.questionToken.end : k.name.end, k), Ju(); + } + function ut(k) { + Kh(k, k.modifiers), xr(k.name), xr(k.questionToken), pp(k, yf, xo); + } + function Mt(k) { + sf( + k, + k.modifiers, + /*allowDecorators*/ + !0 + ), xr(k.asteriskToken), xr(k.name), xr(k.questionToken), pp(k, yf, ld); + } + function Pt(k) { + cs("static"), fd(k), v_(k.body), ah(k); + } + function Zt(k) { + sf( + k, + k.modifiers, + /*allowDecorators*/ + !1 + ), cs("constructor"), pp(k, yf, ld); + } + function fr(k) { + const ce = sf( + k, + k.modifiers, + /*allowDecorators*/ + !0 + ), mt = k.kind === 177 ? 139 : 153; + Ne(mt, ce, cs, k), un(), xr(k.name), pp(k, yf, ld); + } + function Vt(k) { + pp(k, yf, xo); + } + function ir(k) { + cs("new"), un(), pp(k, yf, xo); + } + function Tr(k) { + sf( + k, + k.modifiers, + /*allowDecorators*/ + !1 + ), S2(k, k.parameters), mg(k.type), Ju(); + } + function _r(k) { + xr(k.type), xr(k.literal); + } + function Ot() { + Ju(); + } + function mi(k) { + k.assertsModifier && (xr(k.assertsModifier), un()), xr(k.parameterName), k.type && (un(), cs("is"), un(), xr(k.type)); + } + function Js(k) { + xr(k.typeName), Ci(k, k.typeArguments); + } + function Ms(k) { + pp(k, Ns, kc); + } + function Ns(k) { + yn(k, k.typeParameters), ny(k, k.parameters), un(), gn("=>"); + } + function kc(k) { + un(), xr(k.type); + } + function Wo(k) { + cs("function"), fu(k, k.parameters), gn(":"), xr(k.type); + } + function sc(k) { + gn("?"), xr(k.type); + } + function ri(k) { + gn("!"), xr(k.type); + } + function zs(k) { + xr(k.type), gn("="); + } + function eu(k) { + Kh(k, k.modifiers), cs("new"), un(), pp(k, Ns, kc); + } + function hs(k) { + cs("typeof"), un(), xr(k.exprName), Ci(k, k.typeArguments); + } + function Bu(k) { + fd(k), lr(k.members, N2), gn("{"); + const ce = va(k) & 1 ? 768 : 32897; + go( + k, + k.members, + ce | 524288 + /* NoSpaceIfEmpty */ + ), gn("}"), ah(k); + } + function Yc(k) { + xr(k.elementType, Wr.parenthesizeNonArrayTypeOfPostfixType), gn("["), gn("]"); + } + function Sl(k) { + gn("..."), xr(k.type); + } + function Zi(k) { + Ne(23, k.pos, gn, k); + const ce = va(k) & 1 ? 528 : 657; + go(k, k.elements, ce | 524288, Wr.parenthesizeElementTypeOfTupleType), Ne(24, k.elements.end, gn, k); + } + function Gs(k) { + xr(k.dotDotDotToken), xr(k.name), xr(k.questionToken), Ne(59, k.name.end, gn, k), un(), xr(k.type); + } + function Ca(k) { + xr(k.type, Wr.parenthesizeTypeOfOptionalType), gn("?"); + } + function Oi(k) { + go(k, k.types, 516, Wr.parenthesizeConstituentTypeOfUnionType); + } + function qt(k) { + go(k, k.types, 520, Wr.parenthesizeConstituentTypeOfIntersectionType); + } + function Qa(k) { + xr(k.checkType, Wr.parenthesizeCheckTypeOfConditionalType), un(), cs("extends"), un(), xr(k.extendsType, Wr.parenthesizeExtendsTypeOfConditionalType), un(), gn("?"), un(), xr(k.trueType), un(), gn(":"), un(), xr(k.falseType); + } + function Mc(k) { + cs("infer"), un(), xr(k.typeParameter); + } + function Ol(k) { + gn("("), xr(k.type), gn(")"); + } + function Ll() { + cs("this"); + } + function To(k) { + C1(k.operator, cs), un(); + const ce = k.operator === 148 ? Wr.parenthesizeOperandOfReadonlyTypeOperator : Wr.parenthesizeOperandOfTypeOperator; + xr(k.type, ce); + } + function ge(k) { + xr(k.objectType, Wr.parenthesizeNonArrayTypeOfPostfixType), gn("["), xr(k.indexType), gn("]"); + } + function G(k) { + const ce = va(k); + gn("{"), ce & 1 ? un() : (wu(), Am()), k.readonlyToken && (xr(k.readonlyToken), k.readonlyToken.kind !== 148 && cs("readonly"), un()), gn("["), K(3, k.typeParameter), k.nameType && (un(), cs("as"), un(), xr(k.nameType)), gn("]"), k.questionToken && (xr(k.questionToken), k.questionToken.kind !== 58 && gn("?")), gn(":"), un(), xr(k.type), Ju(), ce & 1 ? un() : (wu(), ru()), go( + k, + k.members, + 2 + /* PreserveLines */ + ), gn("}"); + } + function rt(k) { + Qe(k.literal); + } + function wt(k) { + xr(k.head), go( + k, + k.templateSpans, + 262144 + /* TemplateExpressionSpans */ + ); + } + function Kt(k) { + k.isTypeOf && (cs("typeof"), un()), cs("import"), gn("("), xr(k.argument), k.attributes && (gn(","), un(), K(7, k.attributes)), gn(")"), k.qualifier && (gn("."), xr(k.qualifier)), Ci(k, k.typeArguments); + } + function Yr(k) { + gn("{"), go( + k, + k.elements, + 525136 + /* ObjectBindingPatternElements */ + ), gn("}"); + } + function Mn(k) { + gn("["), go( + k, + k.elements, + 524880 + /* ArrayBindingPatternElements */ + ), gn("]"); + } + function pr(k) { + xr(k.dotDotDotToken), k.propertyName && (xr(k.propertyName), gn(":"), un()), xr(k.name), Pm(k.initializer, k.name.end, k, Wr.parenthesizeExpressionForDisallowedComma); + } + function En(k) { + const ce = k.elements, mt = k.multiLine ? 65536 : 0; + T2(k, ce, 8914 | mt, Wr.parenthesizeExpressionForDisallowedComma); + } + function Ji(k) { + fd(k), lr(k.properties, N2); + const ce = va(k) & 131072; + ce && Am(); + const mt = k.multiLine ? 65536 : 0, sr = A && A.languageVersion >= 1 && !tp(A) ? 64 : 0; + go(k, k.properties, 526226 | sr | mt), ce && ru(), ah(k); + } + function hi(k) { + Qe(k.expression, Wr.parenthesizeLeftSideOfAccess); + const ce = k.questionDotToken || Cd(N.createToken( + 25 + /* DotToken */ + ), k.expression.end, k.name.pos), mt = Im(k, k.expression, ce), sr = Im(k, ce, k.name); + Gp( + mt, + /*writeSpaceIfNotIndenting*/ + !1 + ), ce.kind !== 29 && ba(k.expression) && !me.hasTrailingComment() && !me.hasTrailingWhitespace() && gn("."), k.questionDotToken ? xr(ce) : Ne(ce.kind, k.expression.end, gn, k), Gp( + sr, + /*writeSpaceIfNotIndenting*/ + !1 + ), xr(k.name), gg(mt, sr); + } + function ba(k) { + if (k = ed(k), d_(k)) { + const ce = P2( + k, + /*sourceFile*/ + void 0, + /*neverAsciiEscape*/ + !0, + /*jsxAttributeEscape*/ + !1 + ); + return !(k.numericLiteralFlags & 448) && !ce.includes(Xs( + 25 + /* DotToken */ + )) && !ce.includes("E") && !ce.includes("e"); + } else if (vo(k)) { + const ce = Zee(k); + return typeof ce == "number" && isFinite(ce) && ce >= 0 && Math.floor(ce) === ce; + } + } + function Mo(k) { + Qe(k.expression, Wr.parenthesizeLeftSideOfAccess), xr(k.questionDotToken), Ne(23, k.expression.end, gn, k), Qe(k.argumentExpression), Ne(24, k.argumentExpression.end, gn, k); + } + function dc(k) { + const ce = td(k) & 16; + ce && (gn("("), Hp("0"), gn(","), un()), Qe(k.expression, Wr.parenthesizeLeftSideOfAccess), ce && gn(")"), xr(k.questionDotToken), Ci(k, k.typeArguments), T2(k, k.arguments, 2576, Wr.parenthesizeExpressionForDisallowedComma); + } + function mc(k) { + Ne(105, k.pos, cs, k), un(), Qe(k.expression, Wr.parenthesizeExpressionOfNew), Ci(k, k.typeArguments), T2(k, k.arguments, 18960, Wr.parenthesizeExpressionForDisallowedComma); + } + function Rc(k) { + const ce = td(k) & 16; + ce && (gn("("), Hp("0"), gn(","), un()), Qe(k.tag, Wr.parenthesizeLeftSideOfAccess), ce && gn(")"), Ci(k, k.typeArguments), un(), Qe(k.template); + } + function Uo(k) { + gn("<"), xr(k.type), gn(">"), Qe(k.expression, Wr.parenthesizeOperandOfPrefixUnary); + } + function ac(k) { + const ce = Ne(21, k.pos, gn, k), mt = aT(k.expression, k); + Qe( + k.expression, + /*parenthesizerRule*/ + void 0 + ), D2(k.expression, k), gg(mt), Ne(22, k.expression ? k.expression.end : ce, gn, k); + } + function Vp(k) { + ch(k.name), rh(k); + } + function dl(k) { + Kh(k, k.modifiers), pp(k, Ml, Rl); + } + function Ml(k) { + yn(k, k.typeParameters), ny(k, k.parameters), mg(k.type), un(), xr(k.equalsGreaterThanToken); + } + function Rl(k) { + ks(k.body) ? v_(k.body) : (un(), Qe(k.body, Wr.parenthesizeConciseBodyOfArrowFunction)); + } + function Fe(k) { + Ne(91, k.pos, cs, k), un(), Qe(k.expression, Wr.parenthesizeOperandOfPrefixUnary); + } + function Ft(k) { + Ne(114, k.pos, cs, k), un(), Qe(k.expression, Wr.parenthesizeOperandOfPrefixUnary); + } + function Br(k) { + Ne(116, k.pos, cs, k), un(), Qe(k.expression, Wr.parenthesizeOperandOfPrefixUnary); + } + function Ti(k) { + Ne(135, k.pos, cs, k), un(), Qe(k.expression, Wr.parenthesizeOperandOfPrefixUnary); + } + function Sa(k) { + C1(k.operator, iy), to(k) && un(), Qe(k.operand, Wr.parenthesizeOperandOfPrefixUnary); + } + function to(k) { + const ce = k.operand; + return ce.kind === 224 && (k.operator === 40 && (ce.operator === 40 || ce.operator === 46) || k.operator === 41 && (ce.operator === 41 || ce.operator === 47)); + } + function Do(k) { + Qe(k.operand, Wr.parenthesizeOperandOfPostfixUnary), C1(k.operator, iy); + } + function ml() { + return AF( + k, + ce, + mt, + sr, + Yn, + /*foldState*/ + void 0 + ); + function k(Qi, ds) { + if (ds) { + ds.stackIndex++, ds.preserveSourceNewlinesStack[ds.stackIndex] = Te, ds.containerPosStack[ds.stackIndex] = ne, ds.containerEndStack[ds.stackIndex] = Ae, ds.declarationListContainerEndStack[ds.stackIndex] = De; + const ws = ds.shouldEmitCommentsStack[ds.stackIndex] = Ie(Qi), Ea = ds.shouldEmitSourceMapsStack[ds.stackIndex] = $e(Qi); + c?.(Qi), ws && cE(Qi), Ea && hT(Qi), ee(Qi); + } else + ds = { + stackIndex: 0, + preserveSourceNewlinesStack: [void 0], + containerPosStack: [-1], + containerEndStack: [-1], + declarationListContainerEndStack: [-1], + shouldEmitCommentsStack: [!1], + shouldEmitSourceMapsStack: [!1] + }; + return ds; + } + function ce(Qi, ds, ws) { + return zi(Qi, ws, "left"); + } + function mt(Qi, ds, ws) { + const Ea = Qi.kind !== 28, nu = Im(ws, ws.left, Qi), r0 = Im(ws, Qi, ws.right); + Gp(nu, Ea), $v(Qi.pos), k2(Qi, Qi.kind === 103 ? cs : iy), Uf( + Qi.end, + /*prefixSpace*/ + !0 + ), Gp( + r0, + /*writeSpaceIfNotIndenting*/ + !0 + ); + } + function sr(Qi, ds, ws) { + return zi(Qi, ws, "right"); + } + function Yn(Qi, ds) { + const ws = Im(Qi, Qi.left, Qi.operatorToken), Ea = Im(Qi, Qi.operatorToken, Qi.right); + if (gg(ws, Ea), ds.stackIndex > 0) { + const nu = ds.preserveSourceNewlinesStack[ds.stackIndex], r0 = ds.containerPosStack[ds.stackIndex], uh = ds.containerEndStack[ds.stackIndex], Wu = ds.declarationListContainerEndStack[ds.stackIndex], Qv = ds.shouldEmitCommentsStack[ds.stackIndex], jk = ds.shouldEmitSourceMapsStack[ds.stackIndex]; + Ve(nu), jk && Xv(Qi), Qv && cy(Qi, r0, uh, Wu), _?.(Qi), ds.stackIndex--; + } + } + function zi(Qi, ds, ws) { + const Ea = ws === "left" ? Wr.getParenthesizeLeftSideOfBinaryForOperator(ds.operatorToken.kind) : Wr.getParenthesizeRightSideOfBinaryForOperator(ds.operatorToken.kind); + let nu = Ke(0, 1, Qi); + if (nu === Et && (E.assertIsDefined(er), Qi = Ea(Ws(er, ct)), nu = Je(1, 1, Qi), er = void 0), (nu === lT || nu === P1 || nu === _t) && fn(Qi)) + return Qi; + Nr = Ea, nu(1, Qi); + } + } + function gc(k) { + const ce = Im(k, k.condition, k.questionToken), mt = Im(k, k.questionToken, k.whenTrue), sr = Im(k, k.whenTrue, k.colonToken), Yn = Im(k, k.colonToken, k.whenFalse); + Qe(k.condition, Wr.parenthesizeConditionOfConditionalExpression), Gp( + ce, + /*writeSpaceIfNotIndenting*/ + !0 + ), xr(k.questionToken), Gp( + mt, + /*writeSpaceIfNotIndenting*/ + !0 + ), Qe(k.whenTrue, Wr.parenthesizeBranchOfConditionalExpression), gg(ce, mt), Gp( + sr, + /*writeSpaceIfNotIndenting*/ + !0 + ), xr(k.colonToken), Gp( + Yn, + /*writeSpaceIfNotIndenting*/ + !0 + ), Qe(k.whenFalse, Wr.parenthesizeBranchOfConditionalExpression), gg(sr, Yn); + } + function Va(k) { + xr(k.head), go( + k, + k.templateSpans, + 262144 + /* TemplateExpressionSpans */ + ); + } + function mo(k) { + Ne(127, k.pos, cs, k), xr(k.asteriskToken), Uv(k.expression && ei(k.expression), Ss); + } + function df(k) { + Ne(26, k.pos, gn, k), Qe(k.expression, Wr.parenthesizeExpressionForDisallowedComma); + } + function Rf(k) { + ch(k.name), Em(k); + } + function F_(k) { + Qe(k.expression, Wr.parenthesizeLeftSideOfAccess), Ci(k, k.typeArguments); + } + function mf(k) { + Qe( + k.expression, + /*parenthesizerRule*/ + void 0 + ), k.type && (un(), cs("as"), un(), xr(k.type)); + } + function jf(k) { + Qe(k.expression, Wr.parenthesizeLeftSideOfAccess), iy("!"); + } + function fp(k) { + Qe( + k.expression, + /*parenthesizerRule*/ + void 0 + ), k.type && (un(), cs("satisfies"), un(), xr(k.type)); + } + function th(k) { + sh(k.keywordToken, k.pos, gn), gn("."), xr(k.name); + } + function od(k) { + Qe(k.expression), xr(k.literal); + } + function t_(k) { + gf( + k, + /*forceSingleLine*/ + !k.multiLine && wk(k) + ); + } + function gf(k, ce) { + Ne( + 19, + k.pos, + gn, + /*contextNode*/ + k + ); + const mt = ce || va(k) & 1 ? 768 : 129; + go(k, k.statements, mt), Ne( + 20, + k.statements.end, + gn, + /*contextNode*/ + k, + /*indentLeading*/ + !!(mt & 1) + ); + } + function y_(k) { + sf( + k, + k.modifiers, + /*allowDecorators*/ + !1 + ), xr(k.declarationList), Ju(); + } + function cd(k) { + k ? gn(";") : Ju(); + } + function hf(k) { + Qe(k.expression, Wr.parenthesizeExpressionOfExpressionStatement), (!A || !tp(A) || no(k.expression)) && Ju(); + } + function ug(k) { + const ce = Ne(101, k.pos, cs, k); + un(), Ne(21, ce, gn, k), Qe(k.expression), Ne(22, k.expression.end, gn, k), e0(k, k.thenStatement), k.elseStatement && (Wf(k, k.thenStatement, k.elseStatement), Ne(93, k.thenStatement.end, cs, k), k.elseStatement.kind === 245 ? (un(), xr(k.elseStatement)) : e0(k, k.elseStatement)); + } + function Q(k, ce) { + const mt = Ne(117, ce, cs, k); + un(), Ne(21, mt, gn, k), Qe(k.expression), Ne(22, k.expression.end, gn, k); + } + function et(k) { + Ne(92, k.pos, cs, k), e0(k, k.statement), ks(k.statement) && !Te ? un() : Wf(k, k.statement, k.expression), Q(k, k.statement.end), Ju(); + } + function Rt(k) { + Q(k, k.pos), e0(k, k.statement); + } + function jt(k) { + const ce = Ne(99, k.pos, cs, k); + un(); + let mt = Ne( + 21, + ce, + gn, + /*contextNode*/ + k + ); + xn(k.initializer), mt = Ne(27, k.initializer ? k.initializer.end : mt, gn, k), Uv(k.condition), mt = Ne(27, k.condition ? k.condition.end : mt, gn, k), Uv(k.incrementor), Ne(22, k.incrementor ? k.incrementor.end : mt, gn, k), e0(k, k.statement); + } + function Er(k) { + const ce = Ne(99, k.pos, cs, k); + un(), Ne(21, ce, gn, k), xn(k.initializer), un(), Ne(103, k.initializer.end, cs, k), un(), Qe(k.expression), Ne(22, k.expression.end, gn, k), e0(k, k.statement); + } + function Hr(k) { + const ce = Ne(99, k.pos, cs, k); + un(), Nm(k.awaitModifier), Ne(21, ce, gn, k), xn(k.initializer), un(), Ne(165, k.initializer.end, cs, k), un(), Qe(k.expression), Ne(22, k.expression.end, gn, k), e0(k, k.statement); + } + function xn(k) { + k !== void 0 && (k.kind === 261 ? xr(k) : Qe(k)); + } + function ii(k) { + Ne(88, k.pos, cs, k), ty(k.label), Ju(); + } + function j(k) { + Ne(83, k.pos, cs, k), ty(k.label), Ju(); + } + function Ne(k, ce, mt, sr, Yn) { + const zi = ls(sr), Qi = zi && zi.kind === sr.kind, ds = ce; + if (Qi && A && (ce = aa(A.text, ce)), Qi && sr.pos !== ds) { + const ws = Yn && A && !ip(ds, ce, A); + ws && Am(), $v(ds), ws && ru(); + } + if (!T && (k === 19 || k === 20) ? ce = sh(k, ce, mt, sr) : ce = C1(k, mt, ce), Qi && sr.end !== ce) { + const ws = sr.kind === 294; + Uf( + ce, + /*prefixSpace*/ + !ws, + /*forceNoNewline*/ + ws + ); + } + return ce; + } + function Tt(k) { + return k.kind === 2 || !!k.hasTrailingNewLine; + } + function Ar(k) { + if (!A) return !1; + const ce = Fg(A.text, k.pos); + if (ce) { + const mt = ls(k); + if (mt && Yu(mt.parent)) + return !0; + } + return at(ce, Tt) || at(YC(k), Tt) ? !0 : bte(k) ? k.pos !== k.expression.pos && at(Fy(A.text, k.expression.pos), Tt) ? !0 : Ar(k.expression) : !1; + } + function ei(k) { + if (!Lt) + switch (k.kind) { + case 355: + if (Ar(k)) { + const ce = ls(k); + if (ce && Yu(ce)) { + const mt = N.createParenthesizedExpression(k.expression); + return Sn(mt, k), ot(mt, ce), mt; + } + return N.createParenthesizedExpression(k); + } + return N.updatePartiallyEmittedExpression( + k, + ei(k.expression) + ); + case 211: + return N.updatePropertyAccessExpression( + k, + ei(k.expression), + k.name + ); + case 212: + return N.updateElementAccessExpression( + k, + ei(k.expression), + k.argumentExpression + ); + case 213: + return N.updateCallExpression( + k, + ei(k.expression), + k.typeArguments, + k.arguments + ); + case 215: + return N.updateTaggedTemplateExpression( + k, + ei(k.tag), + k.typeArguments, + k.template + ); + case 225: + return N.updatePostfixUnaryExpression( + k, + ei(k.operand) + ); + case 226: + return N.updateBinaryExpression( + k, + ei(k.left), + k.operatorToken, + k.right + ); + case 227: + return N.updateConditionalExpression( + k, + ei(k.condition), + k.questionToken, + k.whenTrue, + k.colonToken, + k.whenFalse + ); + case 234: + return N.updateAsExpression( + k, + ei(k.expression), + k.type + ); + case 238: + return N.updateSatisfiesExpression( + k, + ei(k.expression), + k.type + ); + case 235: + return N.updateNonNullExpression( + k, + ei(k.expression) + ); + } + return k; + } + function Ss(k) { + return ei(Wr.parenthesizeExpressionForDisallowedComma(k)); + } + function _s(k) { + Ne( + 107, + k.pos, + cs, + /*contextNode*/ + k + ), Uv(k.expression && ei(k.expression), ei), Ju(); + } + function ps(k) { + const ce = Ne(118, k.pos, cs, k); + un(), Ne(21, ce, gn, k), Qe(k.expression), Ne(22, k.expression.end, gn, k), e0(k, k.statement); + } + function ja(k) { + const ce = Ne(109, k.pos, cs, k); + un(), Ne(21, ce, gn, k), Qe(k.expression), Ne(22, k.expression.end, gn, k), un(), xr(k.caseBlock); + } + function xa(k) { + xr(k.label), Ne(59, k.label.end, gn, k), un(), xr(k.statement); + } + function Ro(k) { + Ne(111, k.pos, cs, k), Uv(ei(k.expression), ei), Ju(); + } + function O_(k) { + Ne(113, k.pos, cs, k), un(), xr(k.tryBlock), k.catchClause && (Wf(k, k.tryBlock, k.catchClause), xr(k.catchClause)), k.finallyBlock && (Wf(k, k.catchClause || k.tryBlock, k.finallyBlock), Ne(98, (k.catchClause || k.tryBlock).end, cs, k), un(), xr(k.finallyBlock)); + } + function Ld(k) { + sh(89, k.pos, cs), Ju(); + } + function km(k) { + var ce, mt, sr; + xr(k.name), xr(k.exclamationToken), mg(k.type), Pm(k.initializer, ((ce = k.type) == null ? void 0 : ce.end) ?? ((sr = (mt = k.name.emitNode) == null ? void 0 : mt.typeNode) == null ? void 0 : sr.end) ?? k.name.end, k, Wr.parenthesizeExpressionForDisallowedComma); + } + function Cm(k) { + if (r3(k)) + cs("await"), un(), cs("using"); + else { + const ce = F7(k) ? "let" : wC(k) ? "const" : n3(k) ? "using" : "var"; + cs(ce); + } + un(), go( + k, + k.declarations, + 528 + /* VariableDeclarationList */ + ); + } + function G0(k) { + rh(k); + } + function rh(k) { + sf( + k, + k.modifiers, + /*allowDecorators*/ + !1 + ), cs("function"), xr(k.asteriskToken), un(), gs(k.name), pp(k, yf, ld); + } + function pp(k, ce, mt) { + const sr = va(k) & 131072; + sr && Am(), fd(k), lr(k.parameters, wl), ce(k), mt(k), ah(k), sr && ru(); + } + function ld(k) { + const ce = k.body; + ce ? v_(ce) : Ju(); + } + function xo(k) { + Ju(); + } + function yf(k) { + yn(k, k.typeParameters), fu(k, k.parameters), mg(k.type); + } + function qh(k) { + if (va(k) & 1) + return !0; + if (k.multiLine || !no(k) && A && !CS(k, A) || C2( + k, + Uc(k.statements), + 2 + /* PreserveLines */ + ) || E2(k, Co(k.statements), 2, k.statements)) + return !1; + let ce; + for (const mt of k.statements) { + if (t0( + ce, + mt, + 2 + /* PreserveLines */ + ) > 0) + return !1; + ce = mt; + } + return !0; + } + function v_(k) { + wl(k), c?.(k), un(), gn("{"), Am(); + const ce = qh(k) ? nh : _g; + Ok(k, k.statements, ce), ru(), sh(20, k.statements.end, gn, k), _?.(k); + } + function nh(k) { + _g( + k, + /*emitBlockFunctionBodyOnSingleLine*/ + !0 + ); + } + function _g(k, ce) { + const mt = sT(k.statements), sr = me.getTextPos(); + Xt(k), mt === 0 && sr === me.getTextPos() && ce ? (ru(), go( + k, + k.statements, + 768 + /* SingleLineFunctionBodyStatements */ + ), Am()) : go( + k, + k.statements, + 1, + /*parenthesizerRule*/ + void 0, + mt + ); + } + function Md(k) { + Em(k); + } + function Em(k) { + sf( + k, + k.modifiers, + /*allowDecorators*/ + !0 + ), Ne(86, um(k).pos, cs, k), k.name && (un(), gs(k.name)); + const ce = va(k) & 131072; + ce && Am(), yn(k, k.typeParameters), go( + k, + k.heritageClauses, + 0 + /* ClassHeritageClauses */ + ), un(), gn("{"), fd(k), lr(k.members, N2), go( + k, + k.members, + 129 + /* ClassMembers */ + ), ah(k), gn("}"), ce && ru(); + } + function $0(k) { + sf( + k, + k.modifiers, + /*allowDecorators*/ + !1 + ), cs("interface"), un(), xr(k.name), yn(k, k.typeParameters), go( + k, + k.heritageClauses, + 512 + /* HeritageClauses */ + ), un(), gn("{"), fd(k), lr(k.members, N2), go( + k, + k.members, + 129 + /* InterfaceMembers */ + ), ah(k), gn("}"); + } + function m1(k) { + sf( + k, + k.modifiers, + /*allowDecorators*/ + !1 + ), cs("type"), un(), xr(k.name), yn(k, k.typeParameters), un(), gn("="), un(), xr(k.type), Ju(); + } + function dp(k) { + sf( + k, + k.modifiers, + /*allowDecorators*/ + !1 + ), cs("enum"), un(), xr(k.name), un(), gn("{"), go( + k, + k.members, + 145 + /* EnumMembers */ + ), gn("}"); + } + function g1(k) { + sf( + k, + k.modifiers, + /*allowDecorators*/ + !1 + ), ~k.flags & 2048 && (cs(k.flags & 32 ? "namespace" : "module"), un()), xr(k.name); + let ce = k.body; + if (!ce) return Ju(); + for (; ce && Lc(ce); ) + gn("."), xr(ce.name), ce = ce.body; + un(), xr(ce); + } + function mp(k) { + fd(k), lr(k.statements, wl), gf( + k, + /*forceSingleLine*/ + wk(k) + ), ah(k); + } + function Rd(k) { + Ne(19, k.pos, gn, k), go( + k, + k.clauses, + 129 + /* CaseBlockClauses */ + ), Ne( + 20, + k.clauses.end, + gn, + k, + /*indentLeading*/ + !0 + ); + } + function Hh(k) { + sf( + k, + k.modifiers, + /*allowDecorators*/ + !1 + ), Ne(102, k.modifiers ? k.modifiers.end : k.pos, cs, k), un(), k.isTypeOnly && (Ne(156, k.pos, cs, k), un()), xr(k.name), un(), Ne(64, k.name.end, gn, k), un(), h1(k.moduleReference), Ju(); + } + function h1(k) { + k.kind === 80 ? Qe(k) : xr(k); + } + function ud(k) { + sf( + k, + k.modifiers, + /*allowDecorators*/ + !1 + ), Ne(102, k.modifiers ? k.modifiers.end : k.pos, cs, k), un(), k.importClause && (xr(k.importClause), un(), Ne(161, k.importClause.end, cs, k), un()), Qe(k.moduleSpecifier), k.attributes && ty(k.attributes), Ju(); + } + function Rv(k) { + k.isTypeOnly && (Ne(156, k.pos, cs, k), un()), xr(k.name), k.name && k.namedBindings && (Ne(28, k.name.end, gn, k), un()), xr(k.namedBindings); + } + function y1(k) { + const ce = Ne(42, k.pos, gn, k); + un(), Ne(130, ce, cs, k), un(), xr(k.name); + } + function X0(k) { + ji(k); + } + function Le(k) { + Gn(k); + } + function Ge(k) { + const ce = Ne(95, k.pos, cs, k); + un(), k.isExportEquals ? Ne(64, ce, iy, k) : Ne(90, ce, cs, k), un(), Qe( + k.expression, + k.isExportEquals ? Wr.getParenthesizeRightSideOfBinaryForOperator( + 64 + /* EqualsToken */ + ) : Wr.parenthesizeExpressionOfExportDefault + ), Ju(); + } + function St(k) { + sf( + k, + k.modifiers, + /*allowDecorators*/ + !1 + ); + let ce = Ne(95, k.pos, cs, k); + if (un(), k.isTypeOnly && (ce = Ne(156, ce, cs, k), un()), k.exportClause ? xr(k.exportClause) : ce = Ne(42, ce, gn, k), k.moduleSpecifier) { + un(); + const mt = k.exportClause ? k.exportClause.end : ce; + Ne(161, mt, cs, k), un(), Qe(k.moduleSpecifier); + } + k.attributes && ty(k.attributes), Ju(); + } + function rr(k) { + gn("{"), un(), cs(k.token === 132 ? "assert" : "with"), gn(":"), un(); + const ce = k.elements; + go( + k, + ce, + 526226 + /* ImportAttributes */ + ), un(), gn("}"); + } + function vr(k) { + Ne(k.token, k.pos, cs, k), un(); + const ce = k.elements; + go( + k, + ce, + 526226 + /* ImportAttributes */ + ); + } + function Gr(k) { + xr(k.name), gn(":"), un(); + const ce = k.value; + if (!(va(ce) & 1024)) { + const mt = fm(ce); + Uf(mt.pos); + } + xr(ce); + } + function Dr(k) { + let ce = Ne(95, k.pos, cs, k); + un(), ce = Ne(130, ce, cs, k), un(), ce = Ne(145, ce, cs, k), un(), xr(k.name), Ju(); + } + function cn(k) { + const ce = Ne(42, k.pos, gn, k); + un(), Ne(130, ce, cs, k), un(), xr(k.name); + } + function ai(k) { + ji(k); + } + function hn(k) { + Gn(k); + } + function ji(k) { + gn("{"), go( + k, + k.elements, + 525136 + /* NamedImportsOrExportsElements */ + ), gn("}"); + } + function Gn(k) { + k.isTypeOnly && (cs("type"), un()), k.propertyName && (xr(k.propertyName), un(), Ne(130, k.propertyName.end, cs, k), un()), xr(k.name); + } + function ta(k) { + cs("require"), gn("("), Qe(k.expression), gn(")"); + } + function Cc(k) { + xr(k.openingElement), go( + k, + k.children, + 262144 + /* JsxElementOrFragmentChildren */ + ), xr(k.closingElement); + } + function r_(k) { + gn("<"), Xh(k.tagName), Ci(k, k.typeArguments), un(), xr(k.attributes), gn("/>"); + } + function vf(k) { + xr(k.openingFragment), go( + k, + k.children, + 262144 + /* JsxElementOrFragmentChildren */ + ), xr(k.closingFragment); + } + function Bf(k) { + if (gn("<"), Dd(k)) { + const ce = aT(k.tagName, k); + Xh(k.tagName), Ci(k, k.typeArguments), k.attributes.properties && k.attributes.properties.length > 0 && un(), xr(k.attributes), D2(k.attributes, k), gg(ce); + } + gn(">"); + } + function n_(k) { + me.writeLiteral(k.text); + } + function i_(k) { + gn(""); + } + function jv(k) { + go( + k, + k.properties, + 262656 + /* JsxElementAttributes */ + ); + } + function Bv(k) { + xr(k.name), Wv("=", gn, k.initializer, Ct); + } + function fg(k) { + gn("{..."), Qe(k.expression), gn("}"); + } + function Q0(k) { + let ce = !1; + return EP(A?.text || "", k + 1, () => ce = !0), ce; + } + function Gh(k) { + let ce = !1; + return CP(A?.text || "", k + 1, () => ce = !0), ce; + } + function jd(k) { + return Q0(k) || Gh(k); + } + function $h(k) { + var ce; + if (k.expression || !Lt && !no(k) && jd(k.pos)) { + const mt = A && !no(k) && js(A, k.pos).line !== js(A, k.end).line; + mt && me.increaseIndent(); + const sr = Ne(19, k.pos, gn, k); + xr(k.dotDotDotToken), Qe(k.expression), Ne(20, ((ce = k.expression) == null ? void 0 : ce.end) || sr, gn, k), mt && me.decreaseIndent(); + } + } + function v1(k) { + gs(k.namespace), gn(":"), gs(k.name); + } + function Xh(k) { + k.kind === 80 ? Qe(k) : xr(k); + } + function nT(k) { + Ne(84, k.pos, cs, k), un(), Qe(k.expression, Wr.parenthesizeExpressionForDisallowedComma), Jv(k, k.statements, k.expression.end); + } + function b2(k) { + const ce = Ne(90, k.pos, cs, k); + Jv(k, k.statements, ce); + } + function Jv(k, ce, mt) { + const sr = ce.length === 1 && // treat synthesized nodes as located on the same line for emit purposes + (!A || no(k) || no(ce[0]) || T5(k, ce[0], A)); + let Yn = 163969; + sr ? (sh(59, mt, gn, k), un(), Yn &= -130) : Ne(59, mt, gn, k), go(k, ce, Yn); + } + function Pa(k) { + un(), C1(k.token, cs), un(), go( + k, + k.types, + 528 + /* HeritageClauseTypes */ + ); + } + function b1(k) { + const ce = Ne(85, k.pos, cs, k); + un(), k.variableDeclaration && (Ne(21, ce, gn, k), xr(k.variableDeclaration), Ne(22, k.variableDeclaration.end, gn, k), un()), xr(k.block); + } + function eE(k) { + xr(k.name), gn(":"), un(); + const ce = k.initializer; + if (!(va(ce) & 1024)) { + const mt = fm(ce); + Uf(mt.pos); + } + Qe(ce, Wr.parenthesizeExpressionForDisallowedComma); + } + function Y0(k) { + xr(k.name), k.objectAssignmentInitializer && (un(), gn("="), un(), Qe(k.objectAssignmentInitializer, Wr.parenthesizeExpressionForDisallowedComma)); + } + function Z0(k) { + k.expression && (Ne(26, k.pos, gn, k), Qe(k.expression, Wr.parenthesizeExpressionForDisallowedComma)); + } + function pg(k) { + xr(k.name), Pm(k.initializer, k.name.end, k, Wr.parenthesizeExpressionForDisallowedComma); + } + function Jf(k) { + if (Ee("/**"), k.comment) { + const ce = LP(k.comment); + if (ce) { + const mt = ce.split(/\r\n?|\n/); + for (const sr of mt) + wu(), un(), gn("*"), un(), Ee(sr); + } + } + k.tags && (k.tags.length === 1 && k.tags[0].kind === 344 && !k.comment ? (un(), xr(k.tags[0])) : go( + k, + k.tags, + 33 + /* JSDocComment */ + )), un(), Ee("*/"); + } + function bf(k) { + qp(k.tagName), je(k.typeExpression), wm(k.comment); + } + function L_(k) { + qp(k.tagName), xr(k.name), wm(k.comment); + } + function b_(k) { + qp(k.tagName), un(), k.importClause && (xr(k.importClause), un(), Ne(161, k.importClause.end, cs, k), un()), Qe(k.moduleSpecifier), k.attributes && ty(k.attributes), wm(k.comment); + } + function zv(k) { + un(), gn("{"), xr(k.name), gn("}"); + } + function tE(k) { + qp(k.tagName), un(), gn("{"), xr(k.class), gn("}"), wm(k.comment); + } + function Tl(k) { + qp(k.tagName), je(k.constraint), un(), go( + k, + k.typeParameters, + 528 + /* CommaListElements */ + ), wm(k.comment); + } + function Bd(k) { + qp(k.tagName), k.typeExpression && (k.typeExpression.kind === 309 ? je(k.typeExpression) : (un(), gn("{"), Ee("Object"), k.typeExpression.isArrayType && (gn("["), gn("]")), gn("}"))), k.fullName && (un(), xr(k.fullName)), wm(k.comment), k.typeExpression && k.typeExpression.kind === 322 && tu(k.typeExpression); + } + function K0(k) { + qp(k.tagName), k.name && (un(), xr(k.name)), wm(k.comment), ih(k.typeExpression); + } + function Dm(k) { + wm(k.comment), ih(k.typeExpression); + } + function Ck(k) { + qp(k.tagName), wm(k.comment); + } + function tu(k) { + go( + k, + N.createNodeArray(k.jsDocPropertyTags), + 33 + /* JSDocComment */ + ); + } + function ih(k) { + k.typeParameters && go( + k, + N.createNodeArray(k.typeParameters), + 33 + /* JSDocComment */ + ), k.parameters && go( + k, + N.createNodeArray(k.parameters), + 33 + /* JSDocComment */ + ), k.type && (wu(), un(), gn("*"), un(), xr(k.type)); + } + function zf(k) { + qp(k.tagName), je(k.typeExpression), un(), k.isBracketed && gn("["), xr(k.name), k.isBracketed && gn("]"), wm(k.comment); + } + function qp(k) { + gn("@"), xr(k); + } + function wm(k) { + const ce = LP(k); + ce && (un(), Ee(ce)); + } + function je(k) { + k && (un(), gn("{"), xr(k.type), gn("}")); + } + function Qh(k) { + wu(); + const ce = k.statements; + if (ce.length === 0 || !nm(ce[0]) || no(ce[0])) { + Ok(k, ce, Yh); + return; + } + Yh(k); + } + function dg(k) { + iT(!!k.hasNoDefaultLib, k.syntheticFileReferences || [], k.syntheticTypeReferences || [], k.syntheticLibReferences || []); + } + function S1(k) { + k.isDeclarationFile && iT(k.hasNoDefaultLib, k.referencedFiles, k.typeReferenceDirectives, k.libReferenceDirectives); + } + function iT(k, ce, mt, sr) { + if (k && (qv('/// '), wu()), A && A.moduleName && (qv(`/// `), wu()), A && A.amdDependencies) + for (const zi of A.amdDependencies) + zi.name ? qv(`/// `) : qv(`/// `), wu(); + function Yn(zi, Qi) { + for (const ds of Qi) { + const ws = ds.resolutionMode ? `resolution-mode="${ds.resolutionMode === 99 ? "import" : "require"}" ` : "", Ea = ds.preserve ? 'preserve="true" ' : ""; + qv(`/// `), wu(); + } + } + Yn("path", ce), Yn("types", mt), Yn("lib", sr); + } + function Yh(k) { + const ce = k.statements; + fd(k), lr(k.statements, wl), Xt(k); + const mt = ec(ce, (sr) => !nm(sr)); + S1(k), go( + k, + ce, + 1, + /*parenthesizerRule*/ + void 0, + mt === -1 ? ce.length : mt + ), ah(k); + } + function T1(k) { + const ce = va(k); + !(ce & 1024) && k.pos !== k.expression.pos && Uf(k.expression.pos), Qe(k.expression), !(ce & 2048) && k.end !== k.expression.end && $v(k.expression.end); + } + function Zh(k) { + T2( + k, + k.elements, + 528, + /*parenthesizerRule*/ + void 0 + ); + } + function sT(k, ce, mt) { + let sr = !!ce; + for (let Yn = 0; Yn < k.length; Yn++) { + const zi = k[Yn]; + if (nm(zi)) + (mt ? !mt.has(zi.expression.text) : !0) && (sr && (sr = !1, wn(ce)), wu(), xr(zi), mt && mt.add(zi.expression.text)); + else + return Yn; + } + return k.length; + } + function ca(k) { + if (Ei(k)) + sT(k.statements, k); + else { + const ce = /* @__PURE__ */ new Set(); + for (const mt of k.sourceFiles) + sT(mt.statements, mt, ce); + wn(void 0); + } + } + function _d(k) { + if (Ei(k)) { + const ce = KI(k.text); + if (ce) + return qv(ce), wu(), !0; + } else + for (const ce of k.sourceFiles) + if (_d(ce)) + return !0; + } + function ey(k, ce) { + if (!k) return; + const mt = Ee; + Ee = ce, xr(k), Ee = mt; + } + function sf(k, ce, mt) { + if (ce?.length) { + if (Ri(ce, ia)) + return Kh(k, ce); + if (Ri(ce, ll)) + return mt ? rE(k, ce) : k.pos; + u?.(ce); + let sr, Yn, zi = 0, Qi = 0, ds; + for (; zi < ce.length; ) { + for (; Qi < ce.length; ) { + if (ds = ce[Qi], Yn = ll(ds) ? "decorators" : "modifiers", sr === void 0) + sr = Yn; + else if (Yn !== sr) + break; + Qi++; + } + const ws = { pos: -1, end: -1 }; + zi === 0 && (ws.pos = ce.pos), Qi === ce.length - 1 && (ws.end = ce.end), (sr === "modifiers" || mt) && k1( + xr, + k, + ce, + sr === "modifiers" ? 2359808 : 2146305, + /*parenthesizerRule*/ + void 0, + zi, + Qi - zi, + /*hasTrailingComma*/ + !1, + ws + ), zi = Qi, sr = Yn, Qi++; + } + if (m?.(ce), ds && !kd(ds.end)) + return ds.end; + } + return k.pos; + } + function Kh(k, ce) { + go( + k, + ce, + 2359808 + /* Modifiers */ + ); + const mt = Co(ce); + return mt && !kd(mt.end) ? mt.end : k.pos; + } + function mg(k) { + k && (gn(":"), un(), xr(k)); + } + function Pm(k, ce, mt, sr) { + k && (un(), Ne(64, ce, iy, mt), un(), Qe(k, sr)); + } + function Wv(k, ce, mt, sr) { + mt && (ce(k), sr(mt)); + } + function ty(k) { + k && (un(), xr(k)); + } + function Uv(k, ce) { + k && (un(), Qe(k, ce)); + } + function Nm(k) { + k && (xr(k), un()); + } + function e0(k, ce) { + ks(ce) || va(k) & 1 || Te && !C2( + k, + ce, + 0 + /* None */ + ) ? (un(), xr(ce)) : (wu(), Am(), ZJ(ce) ? K(5, ce) : xr(ce), ru()); + } + function rE(k, ce) { + go( + k, + ce, + 2146305 + /* Decorators */ + ); + const mt = Co(ce); + return mt && !kd(mt.end) ? mt.end : k.pos; + } + function Ci(k, ce) { + go(k, ce, 53776, yr); + } + function yn(k, ce) { + if (vs(k) && k.typeArguments) + return Ci(k, k.typeArguments); + go(k, ce, 53776 | (bo(k) ? 64 : 0)); + } + function fu(k, ce) { + go( + k, + ce, + 2576 + /* Parameters */ + ); + } + function ry(k, ce) { + const mt = Hm(ce); + return mt && mt.pos === k.pos && bo(k) && !k.type && !at(k.modifiers) && !at(k.typeParameters) && !at(mt.modifiers) && !mt.dotDotDotToken && !mt.questionToken && !mt.type && !mt.initializer && Me(mt.name); + } + function ny(k, ce) { + ry(k, ce) ? go( + k, + ce, + 528 + /* Parenthesis */ + ) : fu(k, ce); + } + function S2(k, ce) { + go( + k, + ce, + 8848 + /* IndexSignatureParameters */ + ); + } + function x1(k) { + switch (k & 60) { + case 0: + break; + case 16: + gn(","); + break; + case 4: + un(), gn("|"); + break; + case 32: + un(), gn("*"), un(); + break; + case 8: + un(), gn("&"); + break; + } + } + function go(k, ce, mt, sr, Yn, zi) { + Vv( + xr, + k, + ce, + mt | (k && va(k) & 2 ? 65536 : 0), + sr, + Yn, + zi + ); + } + function T2(k, ce, mt, sr, Yn, zi) { + Vv(Qe, k, ce, mt, sr, Yn, zi); + } + function Vv(k, ce, mt, sr, Yn, zi = 0, Qi = mt ? mt.length - zi : 0) { + if (mt === void 0 && sr & 16384) + return; + const ws = mt === void 0 || zi >= mt.length || Qi === 0; + if (ws && sr & 32768) { + u?.(mt), m?.(mt); + return; + } + sr & 15360 && (gn(pje(sr)), ws && mt && Uf( + mt.pos, + /*prefixSpace*/ + !0 + )), u?.(mt), ws ? sr & 1 && !(Te && (!ce || A && CS(ce, A))) ? wu() : sr & 256 && !(sr & 524288) && un() : k1(k, ce, mt, sr, Yn, zi, Qi, mt.hasTrailingComma, mt), m?.(mt), sr & 15360 && (ws && mt && $v(mt.end), gn(dje(sr))); + } + function k1(k, ce, mt, sr, Yn, zi, Qi, ds, ws) { + const Ea = (sr & 262144) === 0; + let nu = Ea; + const r0 = C2(ce, mt[zi], sr); + r0 ? (wu(r0), nu = !1) : sr & 256 && un(), sr & 128 && Am(); + const uh = yje(k, Yn); + let Wu, Qv = !1; + for (let Zv = 0; Zv < Qi; Zv++) { + const Qp = mt[zi + Zv]; + if (sr & 32) + wu(), x1(sr); + else if (Wu) { + sr & 60 && Wu.end !== (ce ? ce.end : -1) && (va(Wu) & 2048 || $v(Wu.end)), x1(sr); + const N1 = t0(Wu, Qp, sr); + if (N1 > 0) { + if (sr & 131 || (Am(), Qv = !0), nu && sr & 60 && !kd(Qp.pos)) { + const Kv = fm(Qp); + Uf( + Kv.pos, + /*prefixSpace*/ + !!(sr & 512), + /*forceNoNewline*/ + !0 + ); + } + wu(N1), nu = !1; + } else Wu && sr & 512 && un(); + } + if (nu) { + const N1 = fm(Qp); + Uf(N1.pos); + } else + nu = Ea; + q = Qp.pos, uh(Qp, k, Yn, Zv), Qv && (ru(), Qv = !1), Wu = Qp; + } + const jk = Wu ? va(Wu) : 0, F2 = Lt || !!(jk & 2048), Yv = ds && sr & 64 && sr & 16; + Yv && (Wu && !F2 ? Ne(28, Wu.end, gn, Wu) : gn(",")), Wu && (ce ? ce.end : -1) !== Wu.end && sr & 60 && !F2 && $v(Yv && ws?.end ? ws.end : Wu.end), sr & 128 && ru(); + const yT = E2(ce, mt[zi + Qi - 1], sr, ws); + yT ? wu(yT) : sr & 2097408 && un(); + } + function Hp(k) { + me.writeLiteral(k); + } + function x2(k) { + me.writeStringLiteral(k); + } + function nE(k) { + me.write(k); + } + function iE(k, ce) { + me.writeSymbol(k, ce); + } + function gn(k) { + me.writePunctuation(k); + } + function Ju() { + me.writeTrailingSemicolon(";"); + } + function cs(k) { + me.writeKeyword(k); + } + function iy(k) { + me.writeOperator(k); + } + function Ek(k) { + me.writeParameter(k); + } + function qv(k) { + me.writeComment(k); + } + function un() { + me.writeSpace(" "); + } + function sE(k) { + me.writeProperty(k); + } + function Dk(k) { + me.nonEscapingWrite ? me.nonEscapingWrite(k) : me.write(k); + } + function wu(k = 1) { + for (let ce = 0; ce < k; ce++) + me.writeLine(ce > 0); + } + function Am() { + me.increaseIndent(); + } + function ru() { + me.decreaseIndent(); + } + function sh(k, ce, mt, sr) { + return ke ? C1(k, mt, ce) : Om(sr, k, mt, ce, C1); + } + function k2(k, ce) { + g && g(k), ce(Xs(k.kind)), h && h(k); + } + function C1(k, ce, mt) { + const sr = Xs(k); + return ce(sr), mt < 0 ? mt : mt + sr.length; + } + function Wf(k, ce, mt) { + if (va(k) & 1) + un(); + else if (Te) { + const sr = Im(k, ce, mt); + sr ? wu(sr) : un(); + } else + wu(); + } + function gp(k) { + const ce = k.split(/\r\n?|\n/), mt = xZ(ce); + for (const sr of ce) { + const Yn = mt ? sr.slice(mt) : sr; + Yn.length && (wu(), Ee(Yn)); + } + } + function Gp(k, ce) { + k ? (Am(), wu(k)) : ce && un(); + } + function gg(k, ce) { + k && ru(), ce && ru(); + } + function C2(k, ce, mt) { + if (mt & 2 || Te) { + if (mt & 65536) + return 1; + if (ce === void 0) + return !k || A && CS(k, A) ? 0 : 1; + if (ce.pos === q || ce.kind === 12) + return 0; + if (A && k && !kd(k.pos) && !no(ce) && (!ce.parent || Jo(ce.parent) === Jo(k))) + return Te ? Hv( + (sr) => ZK( + ce.pos, + k.pos, + A, + sr + ) + ) : T5(k, ce, A) ? 0 : 1; + if (w2(ce, mt)) + return 1; + } + return mt & 1 ? 1 : 0; + } + function t0(k, ce, mt) { + if (mt & 2 || Te) { + if (k === void 0 || ce === void 0 || ce.kind === 12) + return 0; + if (A && !no(k) && !no(ce)) + return Te && hp(k, ce) ? Hv( + (sr) => tJ( + k, + ce, + A, + sr + ) + ) : !Te && D1(k, ce) ? W3(k, ce, A) ? 0 : 1 : mt & 65536 ? 1 : 0; + if (w2(k, mt) || w2(ce, mt)) + return 1; + } else if (pD(ce)) + return 1; + return mt & 1 ? 1 : 0; + } + function E2(k, ce, mt, sr) { + if (mt & 2 || Te) { + if (mt & 65536) + return 1; + if (ce === void 0) + return !k || A && CS(k, A) ? 0 : 1; + if (A && k && !kd(k.pos) && !no(ce) && (!ce.parent || ce.parent === k)) { + if (Te) { + const Yn = sr && !kd(sr.end) ? sr.end : ce.end; + return Hv( + (zi) => KK( + Yn, + k.end, + A, + zi + ) + ); + } + return XK(k, ce, A) ? 0 : 1; + } + if (w2(ce, mt)) + return 1; + } + return mt & 1 && !(mt & 131072) ? 1 : 0; + } + function Hv(k) { + E.assert(!!Te); + const ce = k( + /*includeComments*/ + !0 + ); + return ce === 0 ? k( + /*includeComments*/ + !1 + ) : ce; + } + function aT(k, ce) { + const mt = Te && C2( + ce, + k, + 0 + /* None */ + ); + return mt && Gp( + mt, + /*writeSpaceIfNotIndenting*/ + !1 + ), !!mt; + } + function D2(k, ce) { + const mt = Te && E2( + ce, + k, + 0, + /*childrenTextRange*/ + void 0 + ); + mt && wu(mt); + } + function w2(k, ce) { + if (no(k)) { + const mt = pD(k); + return mt === void 0 ? (ce & 65536) !== 0 : mt; + } + return (ce & 65536) !== 0; + } + function Im(k, ce, mt) { + return va(k) & 262144 ? 0 : (k = oT(k), ce = oT(ce), mt = oT(mt), pD(mt) ? 1 : A && !no(k) && !no(ce) && !no(mt) ? Te ? Hv( + (sr) => tJ( + ce, + mt, + A, + sr + ) + ) : W3(ce, mt, A) ? 0 : 1 : 0); + } + function wk(k) { + return k.statements.length === 0 && (!A || W3(k, k, A)); + } + function oT(k) { + for (; k.kind === 217 && no(k); ) + k = k.expression; + return k; + } + function sy(k, ce) { + if (Fo(k) || lS(k)) + return A2(k); + if (ea(k) && k.textSourceNode) + return sy(k.textSourceNode, ce); + const mt = A, sr = !!mt && !!k.parent && !no(k); + if (Lg(k)) { + if (!sr || Cr(k) !== Jo(mt)) + return An(k); + } else if (wd(k)) { + if (!sr || Cr(k) !== Jo(mt)) + return fD(k); + } else if (E.assertNode(k, cS), !sr) + return k.text; + return Db(mt, k, ce); + } + function P2(k, ce = A, mt, sr) { + if (k.kind === 11 && k.textSourceNode) { + const zi = k.textSourceNode; + if (Me(zi) || Ni(zi) || d_(zi) || wd(zi)) { + const Qi = d_(zi) ? zi.text : sy(zi); + return sr ? `"${MB(Qi)}"` : mt || va(k) & 16777216 ? `"${rg(Qi)}"` : `"${a5(Qi)}"`; + } else + return P2(zi, Cr(zi), mt, sr); + } + const Yn = (mt ? 1 : 0) | (sr ? 2 : 0) | (e.terminateUnterminatedLiterals ? 4 : 0) | (e.target && e.target >= 8 ? 8 : 0); + return LZ(k, ce, Yn); + } + function fd(k) { + U.push(_e), _e = 0, ie.push(le), !(k && va(k) & 1048576) && (Z.push(J), J = 0, V.push($), $ = void 0, re.push(te)); + } + function ah(k) { + _e = U.pop(), le = ie.pop(), !(k && va(k) & 1048576) && (J = Z.pop(), $ = V.pop(), te = re.pop()); + } + function oh(k) { + (!te || te === Co(re)) && (te = /* @__PURE__ */ new Set()), te.add(k); + } + function E1(k) { + (!le || le === Co(ie)) && (le = /* @__PURE__ */ new Set()), le.add(k); + } + function wl(k) { + if (k) + switch (k.kind) { + case 241: + lr(k.statements, wl); + break; + case 256: + case 254: + case 246: + case 247: + wl(k.statement); + break; + case 245: + wl(k.thenStatement), wl(k.elseStatement); + break; + case 248: + case 250: + case 249: + wl(k.initializer), wl(k.statement); + break; + case 255: + wl(k.caseBlock); + break; + case 269: + lr(k.clauses, wl); + break; + case 296: + case 297: + lr(k.statements, wl); + break; + case 258: + wl(k.tryBlock), wl(k.catchClause), wl(k.finallyBlock); + break; + case 299: + wl(k.variableDeclaration), wl(k.block); + break; + case 243: + wl(k.declarationList); + break; + case 261: + lr(k.declarations, wl); + break; + case 260: + case 169: + case 208: + case 263: + ch(k.name); + break; + case 262: + ch(k.name), va(k) & 1048576 && (lr(k.parameters, wl), wl(k.body)); + break; + case 206: + case 207: + lr(k.elements, wl); + break; + case 272: + wl(k.importClause); + break; + case 273: + ch(k.name), wl(k.namedBindings); + break; + case 274: + ch(k.name); + break; + case 280: + ch(k.name); + break; + case 275: + lr(k.elements, wl); + break; + case 276: + ch(k.propertyName || k.name); + break; + } + } + function N2(k) { + if (k) + switch (k.kind) { + case 303: + case 304: + case 172: + case 171: + case 174: + case 173: + case 177: + case 178: + ch(k.name); + break; + } + } + function ch(k) { + k && (Fo(k) || lS(k) ? A2(k) : Ds(k) && wl(k)); + } + function A2(k) { + const ce = k.emitNode.autoGenerate; + if ((ce.flags & 7) === 4) + return Pk(EN(k), Ni(k), ce.flags, ce.prefix, ce.suffix); + { + const mt = ce.id; + return R[mt] || (R[mt] = oc(k)); + } + } + function Pk(k, ce, mt, sr, Yn) { + const zi = Aa(k), Qi = ce ? F : O; + return Qi[zi] || (Qi[zi] = Ik(k, ce, mt ?? 0, f6(sr, A2), f6(Yn))); + } + function Fm(k, ce) { + return ay(k) && !aE(k, ce) && !W.has(k); + } + function aE(k, ce) { + let mt, sr; + if (ce ? (mt = le, sr = ie) : (mt = te, sr = re), mt?.has(k)) + return !0; + for (let Yn = sr.length - 1; Yn >= 0; Yn--) + if (mt !== sr[Yn] && (mt = sr[Yn], mt?.has(k))) + return !0; + return !1; + } + function ay(k, ce) { + return A ? E7(A, k, n) : !0; + } + function cT(k, ce) { + for (let mt = ce; mt && Lb(mt, ce); mt = mt.nextContainer) + if (Ym(mt) && mt.locals) { + const sr = mt.locals.get(Zo(k)); + if (sr && sr.flags & 3257279) + return !1; + } + return !0; + } + function jc(k) { + switch (k) { + case "": + return J; + case "#": + return _e; + default: + return $?.get(k) ?? 0; + } + } + function Pl(k, ce) { + switch (k) { + case "": + J = ce; + break; + case "#": + _e = ce; + break; + default: + $ ?? ($ = /* @__PURE__ */ new Map()), $.set(k, ce); + break; + } + } + function Gv(k, ce, mt, sr, Yn) { + sr.length > 0 && sr.charCodeAt(0) === 35 && (sr = sr.slice(1)); + const zi = vv(mt, sr, "", Yn); + let Qi = jc(zi); + if (k && !(Qi & k)) { + const ws = vv(mt, sr, k === 268435456 ? "_i" : "_n", Yn); + if (Fm(ws, mt)) + return Qi |= k, mt ? E1(ws) : ce && oh(ws), Pl(zi, Qi), ws; + } + for (; ; ) { + const ds = Qi & 268435455; + if (Qi++, ds !== 8 && ds !== 13) { + const ws = ds < 26 ? "_" + String.fromCharCode(97 + ds) : "_" + (ds - 26), Ea = vv(mt, sr, ws, Yn); + if (Fm(Ea, mt)) + return mt ? E1(Ea) : ce && oh(Ea), Pl(zi, Qi), Ea; + } + } + } + function pu(k, ce = Fm, mt, sr, Yn, zi, Qi) { + if (k.length > 0 && k.charCodeAt(0) === 35 && (k = k.slice(1)), zi.length > 0 && zi.charCodeAt(0) === 35 && (zi = zi.slice(1)), mt) { + const ws = vv(Yn, zi, k, Qi); + if (ce(ws, Yn)) + return Yn ? E1(ws) : sr ? oh(ws) : W.add(ws), ws; + } + k.charCodeAt(k.length - 1) !== 95 && (k += "_"); + let ds = 1; + for (; ; ) { + const ws = vv(Yn, zi, k + ds, Qi); + if (ce(ws, Yn)) + return Yn ? E1(ws) : sr ? oh(ws) : W.add(ws), ws; + ds++; + } + } + function $p(k) { + return pu( + k, + ay, + /*optimistic*/ + !0, + /*scoped*/ + !1, + /*privateName*/ + !1, + /*prefix*/ + "", + /*suffix*/ + "" + ); + } + function oE(k) { + const ce = sy(k.name); + return cT(ce, jn(k, Ym)) ? ce : pu( + ce, + Fm, + /*optimistic*/ + !1, + /*scoped*/ + !1, + /*privateName*/ + !1, + /*prefix*/ + "", + /*suffix*/ + "" + ); + } + function Jd(k) { + const ce = dx(k), mt = ea(ce) ? RZ(ce.text) : "module"; + return pu( + mt, + Fm, + /*optimistic*/ + !1, + /*scoped*/ + !1, + /*privateName*/ + !1, + /*prefix*/ + "", + /*suffix*/ + "" + ); + } + function Nk() { + return pu( + "default", + Fm, + /*optimistic*/ + !1, + /*scoped*/ + !1, + /*privateName*/ + !1, + /*prefix*/ + "", + /*suffix*/ + "" + ); + } + function oy() { + return pu( + "class", + Fm, + /*optimistic*/ + !1, + /*scoped*/ + !1, + /*privateName*/ + !1, + /*prefix*/ + "", + /*suffix*/ + "" + ); + } + function Ak(k, ce, mt, sr) { + return Me(k.name) ? Pk(k.name, ce) : Gv( + 0, + /*reservedInNestedScopes*/ + !1, + ce, + mt, + sr + ); + } + function Ik(k, ce, mt, sr, Yn) { + switch (k.kind) { + case 80: + case 81: + return pu( + sy(k), + Fm, + !!(mt & 16), + !!(mt & 8), + ce, + sr, + Yn + ); + case 267: + case 266: + return E.assert(!sr && !Yn && !ce), oE(k); + case 272: + case 278: + return E.assert(!sr && !Yn && !ce), Jd(k); + case 262: + case 263: { + E.assert(!sr && !Yn && !ce); + const zi = k.name; + return zi && !Fo(zi) ? Ik( + zi, + /*privateName*/ + !1, + mt, + sr, + Yn + ) : Nk(); + } + case 277: + return E.assert(!sr && !Yn && !ce), Nk(); + case 231: + return E.assert(!sr && !Yn && !ce), oy(); + case 174: + case 177: + case 178: + return Ak(k, ce, sr, Yn); + case 167: + return Gv( + 0, + /*reservedInNestedScopes*/ + !0, + ce, + sr, + Yn + ); + default: + return Gv( + 0, + /*reservedInNestedScopes*/ + !1, + ce, + sr, + Yn + ); + } + } + function oc(k) { + const ce = k.emitNode.autoGenerate, mt = f6(ce.prefix, A2), sr = f6(ce.suffix); + switch (ce.flags & 7) { + case 1: + return Gv(0, !!(ce.flags & 8), Ni(k), mt, sr); + case 2: + return E.assertNode(k, Me), Gv( + 268435456, + !!(ce.flags & 8), + /*privateName*/ + !1, + mt, + sr + ); + case 3: + return pu( + An(k), + ce.flags & 32 ? ay : Fm, + !!(ce.flags & 16), + !!(ce.flags & 8), + Ni(k), + mt, + sr + ); + } + return E.fail(`Unsupported GeneratedIdentifierKind: ${E.formatEnum( + ce.flags & 7, + VR, + /*isFlags*/ + !0 + )}.`); + } + function lT(k, ce) { + const mt = Je(2, k, ce), sr = ne, Yn = Ae, zi = De; + cE(ce), mt(k, ce), cy(ce, sr, Yn, zi); + } + function cE(k) { + const ce = va(k), mt = fm(k); + lE(k, ce, mt.pos, mt.end), ce & 4096 && (Lt = !0); + } + function cy(k, ce, mt, sr) { + const Yn = va(k), zi = fm(k); + Yn & 4096 && (Lt = !1), Pu(k, Yn, zi.pos, zi.end, ce, mt, sr); + const Qi = rte(k); + Qi && Pu(k, Yn, Qi.pos, Qi.end, ce, mt, sr); + } + function lE(k, ce, mt, sr) { + Dt(), bt = !1; + const Yn = mt < 0 || (ce & 1024) !== 0 || k.kind === 12, zi = sr < 0 || (ce & 2048) !== 0 || k.kind === 12; + (mt > 0 || sr > 0) && mt !== sr && (Yn || w1( + mt, + /*isEmittedNode*/ + k.kind !== 353 + /* NotEmittedStatement */ + ), (!Yn || mt >= 0 && ce & 1024) && (ne = mt), (!zi || sr >= 0 && ce & 2048) && (Ae = sr, k.kind === 261 && (De = sr))), lr(YC(k), Fk), Qt(); + } + function Pu(k, ce, mt, sr, Yn, zi, Qi) { + Dt(); + const ds = sr < 0 || (ce & 2048) !== 0 || k.kind === 12; + lr(uN(k), uT), (mt > 0 || sr > 0) && mt !== sr && (ne = Yn, Ae = zi, De = Qi, !ds && k.kind !== 353 && mT(sr)), Qt(); + } + function Fk(k) { + (k.hasLeadingNewline || k.kind === 2) && me.writeLine(), I2(k), k.hasTrailingNewLine || k.kind === 2 ? me.writeLine() : me.writeSpace(" "); + } + function uT(k) { + me.isAtStartOfLine() || me.writeSpace(" "), I2(k), k.hasTrailingNewLine && me.writeLine(); + } + function I2(k) { + const ce = M_(k), mt = k.kind === 3 ? ex(ce) : void 0; + zC(ce, mt, me, 0, ce.length, C); + } + function M_(k) { + return k.kind === 3 ? `/*${k.text}*/` : `//${k.text}`; + } + function Ok(k, ce, mt) { + Dt(); + const { pos: sr, end: Yn } = ce, zi = va(k), Qi = sr < 0 || (zi & 1024) !== 0, ds = Lt || Yn < 0 || (zi & 2048) !== 0; + Qi || gT(ce), Qt(), zi & 4096 && !Lt ? (Lt = !0, mt(k), Lt = !1) : mt(k), Dt(), ds || (w1( + ce.end, + /*isEmittedNode*/ + !0 + ), bt && !me.isAtStartOfLine() && me.writeLine()), Qt(); + } + function D1(k, ce) { + return k = Jo(k), k.parent && k.parent === Jo(ce).parent; + } + function hp(k, ce) { + if (ce.pos < k.end) + return !1; + k = Jo(k), ce = Jo(ce); + const mt = k.parent; + if (!mt || mt !== ce.parent) + return !1; + const sr = Iee(k), Yn = sr?.indexOf(k); + return Yn !== void 0 && Yn > -1 && sr.indexOf(ce) === Yn + 1; + } + function w1(k, ce) { + bt = !1, ce ? k === 0 && A?.isDeclarationFile ? Oa(k, fT) : Oa(k, dT) : k === 0 && Oa(k, _T); + } + function _T(k, ce, mt, sr, Yn) { + Rk(k, ce) && dT(k, ce, mt, sr, Yn); + } + function fT(k, ce, mt, sr, Yn) { + Rk(k, ce) || dT(k, ce, mt, sr, Yn); + } + function pT(k, ce) { + return e.onlyPrintJsDocStyle ? xz(k, ce) || D7(k, ce) : !0; + } + function dT(k, ce, mt, sr, Yn) { + !A || !pT(A.text, k) || (bt || (LK(Ks(), me, Yn, k), bt = !0), gl(k), zC(A.text, Ks(), me, k, ce, C), gl(ce), sr ? me.writeLine() : mt === 3 && me.writeSpace(" ")); + } + function $v(k) { + Lt || k === -1 || w1( + k, + /*isEmittedNode*/ + !0 + ); + } + function mT(k) { + dn(k, zu); + } + function zu(k, ce, mt, sr) { + !A || !pT(A.text, k) || (me.isAtStartOfLine() || me.writeSpace(" "), gl(k), zC(A.text, Ks(), me, k, ce, C), gl(ce), sr && me.writeLine()); + } + function Uf(k, ce, mt) { + Lt || (Dt(), dn(k, ce ? zu : mt ? uE : Lk), Qt()); + } + function uE(k, ce, mt) { + A && (gl(k), zC(A.text, Ks(), me, k, ce, C), gl(ce), mt === 2 && me.writeLine()); + } + function Lk(k, ce, mt, sr) { + A && (gl(k), zC(A.text, Ks(), me, k, ce, C), gl(ce), sr ? me.writeLine() : me.writeSpace(" ")); + } + function Oa(k, ce) { + A && (ne === -1 || k !== ne) && (R_(k) ? af(ce) : CP( + A.text, + k, + ce, + /*state*/ + k + )); + } + function dn(k, ce) { + A && (Ae === -1 || k !== Ae && k !== De) && EP(A.text, k, ce); + } + function R_(k) { + return Ue !== void 0 && _a(Ue).nodePos === k; + } + function af(k) { + if (!A) return; + const ce = _a(Ue).detachedCommentEndPos; + Ue.length - 1 ? Ue.pop() : Ue = void 0, CP( + A.text, + ce, + k, + /*state*/ + ce + ); + } + function gT(k) { + const ce = A && MK(A.text, Ks(), me, Mk, k, C, Lt); + ce && (Ue ? Ue.push(ce) : Ue = [ce]); + } + function Mk(k, ce, mt, sr, Yn, zi) { + !A || !pT(A.text, sr) || (gl(sr), zC(k, ce, mt, sr, Yn, zi), gl(Yn)); + } + function Rk(k, ce) { + return !!A && $j(A.text, k, ce); + } + function P1(k, ce) { + const mt = Je(3, k, ce); + hT(ce), mt(k, ce), Xv(ce); + } + function hT(k) { + const ce = va(k), mt = F0(k), sr = mt.source || it; + k.kind !== 353 && !(ce & 32) && mt.pos >= 0 && lh(mt.source || it, pd(sr, mt.pos)), ce & 128 && (ke = !0); + } + function Xv(k) { + const ce = va(k), mt = F0(k); + ce & 128 && (ke = !1), k.kind !== 353 && !(ce & 64) && mt.end >= 0 && lh(mt.source || it, mt.end); + } + function pd(k, ce) { + return k.skipTrivia ? k.skipTrivia(ce) : aa(k.text, ce); + } + function gl(k) { + if (ke || kd(k) || Bc(it)) + return; + const { line: ce, character: mt } = js(it, k); + ue.addMapping( + me.getLine(), + me.getColumn(), + Oe, + ce, + mt, + /*nameIndex*/ + void 0 + ); + } + function lh(k, ce) { + if (k !== it) { + const mt = it, sr = Oe; + Xp(k), gl(ce), _E(mt, sr); + } else + gl(ce); + } + function Om(k, ce, mt, sr, Yn) { + if (ke || k && H7(k)) + return Yn(ce, mt, sr); + const zi = k && k.emitNode, Qi = zi && zi.flags || 0, ds = zi && zi.tokenSourceMapRanges && zi.tokenSourceMapRanges[ce], ws = ds && ds.source || it; + return sr = pd(ws, ds ? ds.pos : sr), !(Qi & 256) && sr >= 0 && lh(ws, sr), sr = Yn(ce, mt, sr), ds && (sr = ds.end), !(Qi & 512) && sr >= 0 && lh(ws, sr), sr; + } + function Xp(k) { + if (!ke) { + if (it = k, k === xe) { + Oe = he; + return; + } + Bc(k) || (Oe = ue.addSource(k.fileName), e.inlineSources && ue.setSourceContent(Oe, k.text), xe = k, he = Oe); + } + } + function _E(k, ce) { + it = k, Oe = ce; + } + function Bc(k) { + return Bo( + k.fileName, + ".json" + /* Json */ + ); + } + } + function fje() { + const e = []; + return e[ + 1024 + /* Braces */ + ] = ["{", "}"], e[ + 2048 + /* Parenthesis */ + ] = ["(", ")"], e[ + 4096 + /* AngleBrackets */ + ] = ["<", ">"], e[ + 8192 + /* SquareBrackets */ + ] = ["[", "]"], e; + } + function pje(e) { + return z1e[ + e & 15360 + /* BracketsMask */ + ][0]; + } + function dje(e) { + return z1e[ + e & 15360 + /* BracketsMask */ + ][1]; + } + function mje(e, t, n, i) { + t(e); + } + function gje(e, t, n, i) { + t(e, n.select(i)); + } + function hje(e, t, n, i) { + t(e, n); + } + function yje(e, t) { + return e.length === 1 ? mje : typeof t == "object" ? gje : hje; + } + function TO(e, t, n) { + if (!e.getDirectories || !e.readDirectory) + return; + const i = /* @__PURE__ */ new Map(), s = Wl(n); + return { + useCaseSensitiveFileNames: n, + fileExists: T, + readFile: (U, _e) => e.readFile(U, _e), + directoryExists: e.directoryExists && C, + getDirectories: w, + readDirectory: A, + createDirectory: e.createDirectory && D, + writeFile: e.writeFile && S, + addOrDeleteFileOrDirectory: R, + addOrDeleteFile: W, + clearCache: $, + realpath: e.realpath && O + }; + function o(U) { + return oo(U, t, s); + } + function c(U) { + return i.get(il(U)); + } + function _(U) { + const _e = c(Hn(U)); + return _e && (_e.sortedAndCanonicalizedFiles || (_e.sortedAndCanonicalizedFiles = _e.files.map(s).sort(), _e.sortedAndCanonicalizedDirectories = _e.directories.map(s).sort()), _e); + } + function u(U) { + return Vc(Hs(U)); + } + function m(U, _e) { + var Z; + if (!e.realpath || il(o(e.realpath(U))) === _e) { + const J = { + files: gr(e.readDirectory( + U, + /*extensions*/ + void 0, + /*exclude*/ + void 0, + /*include*/ + ["*.*"] + ), u) || [], + directories: e.getDirectories(U) || [] + }; + return i.set(il(_e), J), J; + } + if ((Z = e.directoryExists) != null && Z.call(e, U)) + return i.set(_e, !1), !1; + } + function g(U, _e) { + _e = il(_e); + const Z = c(_e); + if (Z) + return Z; + try { + return m(U, _e); + } catch { + E.assert(!i.has(il(_e))); + return; + } + } + function h(U, _e) { + return Cy(U, _e, lo, cu) >= 0; + } + function S(U, _e, Z) { + const J = o(U), re = _(J); + return re && V( + re, + u(U), + /*fileExists*/ + !0 + ), e.writeFile(U, _e, Z); + } + function T(U) { + const _e = o(U), Z = _(_e); + return Z && h(Z.sortedAndCanonicalizedFiles, s(u(U))) || e.fileExists(U); + } + function C(U) { + const _e = o(U); + return i.has(il(_e)) || e.directoryExists(U); + } + function D(U) { + const _e = o(U), Z = _(_e); + if (Z) { + const J = u(U), re = s(J), te = Z.sortedAndCanonicalizedDirectories; + xy(te, re, cu) && Z.directories.push(J); + } + e.createDirectory(U); + } + function w(U) { + const _e = o(U), Z = g(U, _e); + return Z ? Z.directories.slice() : e.getDirectories(U); + } + function A(U, _e, Z, J, re) { + const te = o(U), ie = g(U, te); + let le; + if (ie !== void 0) + return vJ(U, _e, Z, J, n, t, re, Te, O); + return e.readDirectory(U, _e, Z, J, re); + function Te(me) { + const Ce = o(me); + if (Ce === te) + return ie || q(me, Ce); + const Ee = g(me, Ce); + return Ee !== void 0 ? Ee || q(me, Ce) : xJ; + } + function q(me, Ce) { + if (le && Ce === te) return le; + const Ee = { + files: gr(e.readDirectory( + me, + /*extensions*/ + void 0, + /*exclude*/ + void 0, + /*include*/ + ["*.*"] + ), u) || He, + directories: e.getDirectories(me) || He + }; + return Ce === te && (le = Ee), Ee; + } + } + function O(U) { + return e.realpath ? e.realpath(U) : U; + } + function F(U) { + a4( + Hn(U), + (_e) => i.delete(il(_e)) ? !0 : void 0 + ); + } + function R(U, _e) { + if (c(_e) !== void 0) { + $(); + return; + } + const J = _(_e); + if (!J) { + F(_e); + return; + } + if (!e.directoryExists) { + $(); + return; + } + const re = u(U), te = { + fileExists: e.fileExists(U), + directoryExists: e.directoryExists(U) + }; + return te.directoryExists || h(J.sortedAndCanonicalizedDirectories, s(re)) ? $() : V(J, re, te.fileExists), te; + } + function W(U, _e, Z) { + if (Z === 1) + return; + const J = _(_e); + J ? V( + J, + u(U), + Z === 0 + /* Created */ + ) : F(_e); + } + function V(U, _e, Z) { + const J = U.sortedAndCanonicalizedFiles, re = s(_e); + if (Z) + xy(J, re, cu) && U.files.push(_e); + else { + const te = Cy(J, re, lo, cu); + if (te >= 0) { + J.splice(te, 1); + const ie = U.files.findIndex((le) => s(le) === re); + U.files.splice(ie, 1); + } + } + } + function $() { + i.clear(); + } + } + var aie = /* @__PURE__ */ ((e) => (e[e.Update = 0] = "Update", e[e.RootNamesAndUpdate = 1] = "RootNamesAndUpdate", e[e.Full = 2] = "Full", e))(aie || {}); + function xO(e, t, n, i, s) { + var o; + const c = aC(((o = t?.configFile) == null ? void 0 : o.extendedSourceFiles) || He, s); + n.forEach((_, u) => { + c.has(u) || (_.projects.delete(e), _.close()); + }), c.forEach((_, u) => { + const m = n.get(u); + m ? m.projects.add(e) : n.set(u, { + projects: /* @__PURE__ */ new Set([e]), + watcher: i(_, u), + close: () => { + const g = n.get(u); + !g || g.projects.size !== 0 || (g.watcher.close(), n.delete(u)); + } + }); + }); + } + function WW(e, t) { + t.forEach((n) => { + n.projects.delete(e) && n.close(); + }); + } + function kO(e, t, n) { + e.delete(t) && e.forEach(({ extendedResult: i }, s) => { + var o; + (o = i.extendedSourceFiles) != null && o.some((c) => n(c) === t) && kO(e, s, n); + }); + } + function UW(e, t, n) { + Y4( + t, + e.getMissingFilePaths(), + { + // Watch the missing files + createNewValue: n, + // Files that are no longer missing (e.g. because they are no longer required) + // should no longer be watched. + onDeleteValue: nd + } + ); + } + function KN(e, t, n) { + t ? Y4( + e, + new Map(Object.entries(t)), + { + // Create new watch and recursive info + createNewValue: i, + // Close existing watch thats not needed any more + onDeleteValue: _p, + // Close existing watch that doesnt match in the flags + onExistingValue: s + } + ) : P_(e, _p); + function i(o, c) { + return { + watcher: n(o, c), + flags: c + }; + } + function s(o, c, _) { + o.flags !== c && (o.watcher.close(), e.set(_, i(_, c))); + } + } + function eA({ + watchedDirPath: e, + fileOrDirectory: t, + fileOrDirectoryPath: n, + configFileName: i, + options: s, + program: o, + extraFileExtensions: c, + currentDirectory: _, + useCaseSensitiveFileNames: u, + writeLog: m, + toPath: g, + getScriptKind: h + }) { + const S = jO(n); + if (!S) + return m(`Project: ${i} Detected ignored path: ${t}`), !0; + if (n = S, n === e) return !1; + if (_C(n) && !(TJ(t, s, c) || A())) + return m(`Project: ${i} Detected file add/remove of non supported extension: ${t}`), !0; + if (wre(t, s.configFile.configFileSpecs, Xi(Hn(i), _), u, _)) + return m(`Project: ${i} Detected excluded file: ${t}`), !0; + if (!o || s.outFile || s.outDir) return !1; + if (fl(n)) { + if (s.declarationDir) return !1; + } else if (!vc(n, GC)) + return !1; + const T = $u(n), C = os(o) ? void 0 : bU(o) ? o.getProgramOrUndefined() : o, D = !C && !os(o) ? o : void 0; + if (w( + T + ".ts" + /* Ts */ + ) || w( + T + ".tsx" + /* Tsx */ + )) + return m(`Project: ${i} Detected output file: ${t}`), !0; + return !1; + function w(O) { + return C ? !!C.getSourceFileByPath(O) : D ? D.state.fileInfos.has(O) : !!Pn(o, (F) => g(F) === O); + } + function A() { + if (!h) return !1; + switch (h(t)) { + case 3: + case 4: + case 7: + case 5: + return !0; + case 1: + case 2: + return Zy(s); + case 6: + return Ub(s); + case 0: + return !1; + } + } + } + function oie(e, t) { + return e ? e.isEmittedFile(t) : !1; + } + var cie = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.TriggerOnly = 1] = "TriggerOnly", e[e.Verbose = 2] = "Verbose", e))(cie || {}); + function VW(e, t, n, i) { + mY(t === 2 ? n : Ja); + const s = { + watchFile: (D, w, A, O) => e.watchFile(D, w, A, O), + watchDirectory: (D, w, A, O) => e.watchDirectory(D, w, (A & 1) !== 0, O) + }, o = t !== 0 ? { + watchFile: T("watchFile"), + watchDirectory: T("watchDirectory") + } : void 0, c = t === 2 ? { + watchFile: h, + watchDirectory: S + } : o || s, _ = t === 2 ? g : ew; + return { + watchFile: u("watchFile"), + watchDirectory: u("watchDirectory") + }; + function u(D) { + return (w, A, O, F, R, W) => { + var V; + return $F(w, D === "watchFile" ? F?.excludeFiles : F?.excludeDirectories, m(), ((V = e.getCurrentDirectory) == null ? void 0 : V.call(e)) || "") ? _(w, O, F, R, W) : c[D].call( + /*thisArgs*/ + void 0, + w, + A, + O, + F, + R, + W + ); + }; + } + function m() { + return typeof e.useCaseSensitiveFileNames == "boolean" ? e.useCaseSensitiveFileNames : e.useCaseSensitiveFileNames(); + } + function g(D, w, A, O, F) { + return n(`ExcludeWatcher:: Added:: ${C(D, w, A, O, F, i)}`), { + close: () => n(`ExcludeWatcher:: Close:: ${C(D, w, A, O, F, i)}`) + }; + } + function h(D, w, A, O, F, R) { + n(`FileWatcher:: Added:: ${C(D, A, O, F, R, i)}`); + const W = o.watchFile(D, w, A, O, F, R); + return { + close: () => { + n(`FileWatcher:: Close:: ${C(D, A, O, F, R, i)}`), W.close(); + } + }; + } + function S(D, w, A, O, F, R) { + const W = `DirectoryWatcher:: Added:: ${C(D, A, O, F, R, i)}`; + n(W); + const V = ao(), $ = o.watchDirectory(D, w, A, O, F, R), U = ao() - V; + return n(`Elapsed:: ${U}ms ${W}`), { + close: () => { + const _e = `DirectoryWatcher:: Close:: ${C(D, A, O, F, R, i)}`; + n(_e); + const Z = ao(); + $.close(); + const J = ao() - Z; + n(`Elapsed:: ${J}ms ${_e}`); + } + }; + } + function T(D) { + return (w, A, O, F, R, W) => s[D].call( + /*thisArgs*/ + void 0, + w, + (...V) => { + const $ = `${D === "watchFile" ? "FileWatcher" : "DirectoryWatcher"}:: Triggered with ${V[0]} ${V[1] !== void 0 ? V[1] : ""}:: ${C(w, O, F, R, W, i)}`; + n($); + const U = ao(); + A.call( + /*thisArg*/ + void 0, + ...V + ); + const _e = ao() - U; + n(`Elapsed:: ${_e}ms ${$}`); + }, + O, + F, + R, + W + ); + } + function C(D, w, A, O, F, R) { + return `WatchInfo: ${D} ${w} ${JSON.stringify(A)} ${R ? R(O, F) : F === void 0 ? O : `${O} ${F}`}`; + } + } + function tA(e) { + const t = e?.fallbackPolling; + return { + watchFile: t !== void 0 ? t : 1 + /* PriorityPollingInterval */ + }; + } + function _p(e) { + e.watcher.close(); + } + function qW(e, t, n = "tsconfig.json") { + return a4(e, (i) => { + const s = Ln(i, n); + return t(s) ? s : void 0; + }); + } + function HW(e, t) { + const n = Hn(t), i = q_(e) ? e : Ln(n, e); + return Hs(i); + } + function lie(e, t, n) { + let i; + return lr(e, (o) => { + const c = SP(o, t); + if (c.pop(), !i) { + i = c; + return; + } + const _ = Math.min(i.length, c.length); + for (let u = 0; u < _; u++) + if (n(i[u]) !== n(c[u])) { + if (u === 0) + return !0; + i.length = u; + break; + } + c.length < i.length && (i.length = c.length); + }) ? "" : i ? T0(i) : t; + } + function uie(e, t) { + return CO(e, t); + } + function GW(e, t) { + return (n, i, s) => { + let o; + try { + Qo("beforeIORead"), o = e(n), Qo("afterIORead"), Yf("I/O Read", "beforeIORead", "afterIORead"); + } catch (c) { + s && s(c.message), o = ""; + } + return o !== void 0 ? Zx(n, o, i, t) : void 0; + }; + } + function $W(e, t, n) { + return (i, s, o, c) => { + try { + Qo("beforeIOWrite"), WB( + i, + s, + o, + e, + t, + n + ), Qo("afterIOWrite"), Yf("I/O Write", "beforeIOWrite", "afterIOWrite"); + } catch (_) { + c && c(_.message); + } + }; + } + function CO(e, t, n = nl) { + const i = /* @__PURE__ */ new Map(), s = Wl(n.useCaseSensitiveFileNames); + function o(g) { + return i.has(g) ? !0 : (m.directoryExists || n.directoryExists)(g) ? (i.set(g, !0), !0) : !1; + } + function c() { + return Hn(Hs(n.getExecutingFilePath())); + } + const _ = N0(e), u = n.realpath && ((g) => n.realpath(g)), m = { + getSourceFile: GW((g) => m.readFile(g), t), + getDefaultLibLocation: c, + getDefaultLibFileName: (g) => Ln(c(), wP(g)), + writeFile: $W( + (g, h, S) => n.writeFile(g, h, S), + (g) => (m.createDirectory || n.createDirectory)(g), + (g) => o(g) + ), + getCurrentDirectory: Iu(() => n.getCurrentDirectory()), + useCaseSensitiveFileNames: () => n.useCaseSensitiveFileNames, + getCanonicalFileName: s, + getNewLine: () => _, + fileExists: (g) => n.fileExists(g), + readFile: (g) => n.readFile(g), + trace: (g) => n.write(g + _), + directoryExists: (g) => n.directoryExists(g), + getEnvironmentVariable: (g) => n.getEnvironmentVariable ? n.getEnvironmentVariable(g) : "", + getDirectories: (g) => n.getDirectories(g), + realpath: u, + readDirectory: (g, h, S, T, C) => n.readDirectory(g, h, S, T, C), + createDirectory: (g) => n.createDirectory(g), + createHash: Is(n, n.createHash) + }; + return m; + } + function QD(e, t, n) { + const i = e.readFile, s = e.fileExists, o = e.directoryExists, c = e.createDirectory, _ = e.writeFile, u = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), S = (D) => { + const w = t(D), A = u.get(w); + return A !== void 0 ? A !== !1 ? A : void 0 : T(w, D); + }, T = (D, w) => { + const A = i.call(e, w); + return u.set(D, A !== void 0 ? A : !1), A; + }; + e.readFile = (D) => { + const w = t(D), A = u.get(w); + return A !== void 0 ? A !== !1 ? A : void 0 : !Bo( + D, + ".json" + /* Json */ + ) && !eie(D) ? i.call(e, D) : T(w, D); + }; + const C = n ? (D, w, A, O) => { + const F = t(D), R = typeof w == "object" ? w.impliedNodeFormat : void 0, W = h.get(R), V = W?.get(F); + if (V) return V; + const $ = n(D, w, A, O); + return $ && (fl(D) || Bo( + D, + ".json" + /* Json */ + )) && h.set(R, (W || /* @__PURE__ */ new Map()).set(F, $)), $; + } : void 0; + return e.fileExists = (D) => { + const w = t(D), A = m.get(w); + if (A !== void 0) return A; + const O = s.call(e, D); + return m.set(w, !!O), O; + }, _ && (e.writeFile = (D, w, ...A) => { + const O = t(D); + m.delete(O); + const F = u.get(O); + F !== void 0 && F !== w ? (u.delete(O), h.forEach((R) => R.delete(O))) : C && h.forEach((R) => { + const W = R.get(O); + W && W.text !== w && R.delete(O); + }), _.call(e, D, w, ...A); + }), o && (e.directoryExists = (D) => { + const w = t(D), A = g.get(w); + if (A !== void 0) return A; + const O = o.call(e, D); + return g.set(w, !!O), O; + }, c && (e.createDirectory = (D) => { + const w = t(D); + g.delete(w), c.call(e, D); + })), { + originalReadFile: i, + originalFileExists: s, + originalDirectoryExists: o, + originalCreateDirectory: c, + originalWriteFile: _, + getSourceFileWithCache: C, + readFileWithCache: S + }; + } + function X1e(e, t, n) { + let i; + return i = Nn(i, e.getConfigFileParsingDiagnostics()), i = Nn(i, e.getOptionsDiagnostics(n)), i = Nn(i, e.getSyntacticDiagnostics(t, n)), i = Nn(i, e.getGlobalDiagnostics(n)), i = Nn(i, e.getSemanticDiagnostics(t, n)), N_(e.getCompilerOptions()) && (i = Nn(i, e.getDeclarationDiagnostics(t, n))), mC(i || He); + } + function Q1e(e, t) { + let n = ""; + for (const i of e) + n += XW(i, t); + return n; + } + function XW(e, t) { + const n = `${rS(e)} TS${e.code}: ${vm(e.messageText, t.getNewLine())}${t.getNewLine()}`; + if (e.file) { + const { line: i, character: s } = js(e.file, e.start), o = e.file.fileName; + return `${s4(o, t.getCurrentDirectory(), (_) => t.getCanonicalFileName(_))}(${i + 1},${s + 1}): ` + n; + } + return n; + } + var _ie = /* @__PURE__ */ ((e) => (e.Grey = "\x1B[90m", e.Red = "\x1B[91m", e.Yellow = "\x1B[93m", e.Blue = "\x1B[94m", e.Cyan = "\x1B[96m", e))(_ie || {}), fie = "\x1B[7m", pie = " ", Y1e = "\x1B[0m", Z1e = "...", vje = " ", K1e = " "; + function eve(e) { + switch (e) { + case 1: + return "\x1B[91m"; + case 0: + return "\x1B[93m"; + case 2: + return E.fail("Should never get an Info diagnostic on the command line."); + case 3: + return "\x1B[94m"; + } + } + function c2(e, t) { + return t + e + Y1e; + } + function tve(e, t, n, i, s, o) { + const { line: c, character: _ } = js(e, t), { line: u, character: m } = js(e, t + n), g = js(e, e.text.length).line, h = u - c >= 4; + let S = (u + 1 + "").length; + h && (S = Math.max(Z1e.length, S)); + let T = ""; + for (let C = c; C <= u; C++) { + T += o.getNewLine(), h && c + 1 < C && C < u - 1 && (T += i + c2(Z1e.padStart(S), fie) + pie + o.getNewLine(), C = u - 1); + const D = xP(e, C, 0), w = C < g ? xP(e, C + 1, 0) : e.text.length; + let A = e.text.slice(D, w); + if (A = A.trimEnd(), A = A.replace(/\t/g, " "), T += i + c2((C + 1 + "").padStart(S), fie) + pie, T += A + o.getNewLine(), T += i + c2("".padStart(S), fie) + pie, T += s, C === c) { + const O = C === u ? m : void 0; + T += A.slice(0, _).replace(/\S/g, " "), T += A.slice(_, O).replace(/./g, "~"); + } else C === u ? T += A.slice(0, m).replace(/./g, "~") : T += A.replace(/./g, "~"); + T += Y1e; + } + return T; + } + function QW(e, t, n, i = c2) { + const { line: s, character: o } = js(e, t), c = n ? s4(e.fileName, n.getCurrentDirectory(), (u) => n.getCanonicalFileName(u)) : e.fileName; + let _ = ""; + return _ += i( + c, + "\x1B[96m" + /* Cyan */ + ), _ += ":", _ += i( + `${s + 1}`, + "\x1B[93m" + /* Yellow */ + ), _ += ":", _ += i( + `${o + 1}`, + "\x1B[93m" + /* Yellow */ + ), _; + } + function die(e, t) { + let n = ""; + for (const i of e) { + if (i.file) { + const { file: s, start: o } = i; + n += QW(s, o, t), n += " - "; + } + if (n += c2(rS(i), eve(i.category)), n += c2( + ` TS${i.code}: `, + "\x1B[90m" + /* Grey */ + ), n += vm(i.messageText, t.getNewLine()), i.file && i.code !== p.File_appears_to_be_binary.code && (n += t.getNewLine(), n += tve(i.file, i.start, i.length, "", eve(i.category), t)), i.relatedInformation) { + n += t.getNewLine(); + for (const { file: s, start: o, length: c, messageText: _ } of i.relatedInformation) + s && (n += t.getNewLine(), n += vje + QW(s, o, t), n += tve(s, o, c, K1e, "\x1B[96m", t)), n += t.getNewLine(), n += K1e + vm(_, t.getNewLine()); + } + n += t.getNewLine(); + } + return n; + } + function vm(e, t, n = 0) { + if (rs(e)) + return e; + if (e === void 0) + return ""; + let i = ""; + if (n) { + i += t; + for (let s = 0; s < n; s++) + i += " "; + } + if (i += e.messageText, n++, e.next) + for (const s of e.next) + i += vm(s, t, n); + return i; + } + function mie(e, t) { + return (rs(e) ? t : e.resolutionMode) || t; + } + function rve(e, t, n) { + return EO(e, sA(e, t), n); + } + function YW(e) { + var t; + return wc(e) ? e.isTypeOnly : !!((t = e.importClause) != null && t.isTypeOnly); + } + function ZW(e, t, n) { + return EO(e, t, n); + } + function EO(e, t, n) { + if ((zo(t.parent) || wc(t.parent) || ym(t.parent)) && YW(t.parent)) { + const s = k6(t.parent.attributes); + if (s) + return s; + } + if (t.parent.parent && Ed(t.parent.parent)) { + const i = k6(t.parent.parent.attributes); + if (i) + return i; + } + if (n && fJ(n)) + return nve(e, t, n); + } + function nve(e, t, n) { + var i; + if (!n) + return; + const s = (i = rd(t.parent)) == null ? void 0 : i.parent; + if (s && _l(s) || __( + t.parent, + /*requireStringLiteralLikeArgument*/ + !1 + )) + return 1; + if (_f(rd(t.parent))) + return lve(e, n) ? 1 : 99; + const o = KD(e, n); + return o === 1 ? 1 : X3(o) || o === 200 ? 99 : void 0; + } + function k6(e, t) { + if (!e) return; + if (Ir(e.elements) !== 1) { + t?.( + e, + e.token === 118 ? p.Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require : p.Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require + ); + return; + } + const n = e.elements[0]; + if (Na(n.name)) { + if (n.name.text !== "resolution-mode") { + t?.( + n.name, + e.token === 118 ? p.resolution_mode_is_the_only_valid_key_for_type_import_attributes : p.resolution_mode_is_the_only_valid_key_for_type_import_assertions + ); + return; + } + if (Na(n.value)) { + if (n.value.text !== "import" && n.value.text !== "require") { + t?.(n.value, p.resolution_mode_should_be_either_require_or_import); + return; + } + return n.value.text === "import" ? 99 : 1; + } + } + } + var ive = { + resolvedModule: void 0, + resolvedTypeReferenceDirective: void 0 + }; + function gie(e) { + return e.text; + } + var DO = { + getName: gie, + getMode: (e, t, n) => ZW(t, e, n) + }; + function KW(e, t, n, i, s) { + return { + nameAndMode: DO, + resolve: (o, c) => WS( + o, + e, + n, + i, + s, + t, + c + ) + }; + } + function hie(e) { + return rs(e) ? e : e.fileName; + } + var sve = { + getName: hie, + getMode: (e, t, n) => mie(e, t && IO(t, n)) + }; + function wO(e, t, n, i, s) { + return { + nameAndMode: sve, + resolve: (o, c) => jre( + o, + e, + n, + i, + t, + s, + c + ) + }; + } + function rA(e, t, n, i, s, o, c, _) { + if (e.length === 0) return He; + const u = [], m = /* @__PURE__ */ new Map(), g = _(t, n, i, o, c); + for (const h of e) { + const S = g.nameAndMode.getName(h), T = g.nameAndMode.getMode(h, s, n?.commandLine.options || i), C = MD(S, T); + let D = m.get(C); + D || m.set(C, D = g.resolve(S, T)), u.push(D); + } + return u; + } + function eU(e, t) { + return PO( + /*projectReferences*/ + void 0, + e, + (n, i) => n && t(n, i) + ); + } + function PO(e, t, n, i) { + let s; + return o( + e, + t, + /*parent*/ + void 0 + ); + function o(c, _, u) { + if (i) { + const g = i(c, u); + if (g) return g; + } + let m; + return lr( + _, + (g, h) => { + if (g && s?.has(g.sourceFile.path)) { + (m ?? (m = /* @__PURE__ */ new Set())).add(g); + return; + } + const S = n(g, u, h); + if (S || !g) return S; + (s || (s = /* @__PURE__ */ new Set())).add(g.sourceFile.path); + } + ) || lr( + _, + (g) => g && !m?.has(g) ? o(g.commandLine.projectReferences, g.references, g) : void 0 + ); + } + } + var YD = "__inferred type names__.ts"; + function NO(e, t, n) { + const i = e.configFilePath ? Hn(e.configFilePath) : t; + return Ln(i, `__lib_node_modules_lookup_${n}__.ts`); + } + function tU(e) { + const t = e.split("."); + let n = t[1], i = 2; + for (; t[i] && t[i] !== "d"; ) + n += (i === 2 ? "/" : "-") + t[i], i++; + return "@typescript/lib-" + n; + } + function ave(e) { + return Dy(e.fileName); + } + function ove(e) { + const t = ave(e); + return wz.get(t); + } + function Ev(e) { + switch (e?.kind) { + case 3: + case 4: + case 5: + case 7: + return !0; + default: + return !1; + } + } + function C6(e) { + return e.pos !== void 0; + } + function ZD(e, t) { + var n, i, s, o; + const c = E.checkDefined(e.getSourceFileByPath(t.file)), { kind: _, index: u } = t; + let m, g, h; + switch (_) { + case 3: + const S = sA(c, u); + if (h = (i = (n = e.getResolvedModuleFromModuleSpecifier(S, c)) == null ? void 0 : n.resolvedModule) == null ? void 0 : i.packageId, S.pos === -1) return { file: c, packageId: h, text: S.text }; + m = aa(c.text, S.pos), g = S.end; + break; + case 4: + ({ pos: m, end: g } = c.referencedFiles[u]); + break; + case 5: + ({ pos: m, end: g } = c.typeReferenceDirectives[u]), h = (o = (s = e.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(c.typeReferenceDirectives[u], c)) == null ? void 0 : s.resolvedTypeReferenceDirective) == null ? void 0 : o.packageId; + break; + case 7: + ({ pos: m, end: g } = c.libReferenceDirectives[u]); + break; + default: + return E.assertNever(_); + } + return { file: c, pos: m, end: g, packageId: h }; + } + function rU(e, t, n, i, s, o, c, _, u, m) { + if (!e || _?.() || !Ef(e.getRootFileNames(), t)) return !1; + let g; + if (!Ef(e.getProjectReferences(), m, D) || e.getSourceFiles().some(T)) return !1; + const h = e.getMissingFilePaths(); + if (h && al(h, s)) return !1; + const S = e.getCompilerOptions(); + if (!sJ(S, n) || e.resolvedLibReferences && al(e.resolvedLibReferences, (A, O) => c(O))) return !1; + if (S.configFile && n.configFile) return S.configFile.text === n.configFile.text; + return !0; + function T(A) { + return !C(A) || o(A.path); + } + function C(A) { + return A.version === i(A.resolvedPath, A.fileName); + } + function D(A, O, F) { + return Vj(A, O) && w(e.getResolvedProjectReferences()[F], A); + } + function w(A, O) { + if (A) { + if (as(g, A)) return !0; + const R = ak(O), W = u(R); + return !W || A.commandLine.options.configFile !== W.options.configFile || !Ef(A.commandLine.fileNames, W.fileNames) ? !1 : ((g || (g = [])).push(A), !lr( + A.references, + (V, $) => !w( + V, + A.commandLine.projectReferences[$] + ) + )); + } + const F = ak(O); + return !u(F); + } + } + function l2(e) { + return e.options.configFile ? [...e.options.configFile.parseDiagnostics, ...e.errors] : e.errors; + } + function nA(e, t, n, i) { + const s = AO(e, t, n, i); + return typeof s == "object" ? s.impliedNodeFormat : s; + } + function AO(e, t, n, i) { + const s = Su(i), o = 3 <= s && s <= 99 || c1(e); + return vc(e, [ + ".d.mts", + ".mts", + ".mjs" + /* Mjs */ + ]) ? 99 : vc(e, [ + ".d.cts", + ".cts", + ".cjs" + /* Cjs */ + ]) ? 1 : o && vc(e, [ + ".d.ts", + ".ts", + ".tsx", + ".js", + ".jsx" + /* Jsx */ + ]) ? c() : void 0; + function c() { + const _ = RD(t, n, i), u = []; + _.failedLookupLocations = u, _.affectingLocations = u; + const m = jD(Hn(e), _); + return { impliedNodeFormat: m?.contents.packageJsonContent.type === "module" ? 99 : 1, packageJsonLocations: u, packageJsonScope: m }; + } + } + var cve = /* @__PURE__ */ new Set([ + // binder errors + p.Cannot_redeclare_block_scoped_variable_0.code, + p.A_module_cannot_have_multiple_default_exports.code, + p.Another_export_default_is_here.code, + p.The_first_export_default_is_here.code, + p.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module.code, + p.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode.code, + p.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here.code, + p.constructor_is_a_reserved_word.code, + p.delete_cannot_be_called_on_an_identifier_in_strict_mode.code, + p.Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode.code, + p.Invalid_use_of_0_Modules_are_automatically_in_strict_mode.code, + p.Invalid_use_of_0_in_strict_mode.code, + p.A_label_is_not_allowed_here.code, + p.with_statements_are_not_allowed_in_strict_mode.code, + // grammar errors + p.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement.code, + p.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement.code, + p.A_class_declaration_without_the_default_modifier_must_have_a_name.code, + p.A_class_member_cannot_have_the_0_keyword.code, + p.A_comma_expression_is_not_allowed_in_a_computed_property_name.code, + p.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement.code, + p.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement.code, + p.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement.code, + p.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement.code, + p.A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration.code, + p.A_definite_assignment_assertion_is_not_permitted_in_this_context.code, + p.A_destructuring_declaration_must_have_an_initializer.code, + p.A_get_accessor_cannot_have_parameters.code, + p.A_rest_element_cannot_contain_a_binding_pattern.code, + p.A_rest_element_cannot_have_a_property_name.code, + p.A_rest_element_cannot_have_an_initializer.code, + p.A_rest_element_must_be_last_in_a_destructuring_pattern.code, + p.A_rest_parameter_cannot_have_an_initializer.code, + p.A_rest_parameter_must_be_last_in_a_parameter_list.code, + p.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma.code, + p.A_return_statement_cannot_be_used_inside_a_class_static_block.code, + p.A_set_accessor_cannot_have_rest_parameter.code, + p.A_set_accessor_must_have_exactly_one_parameter.code, + p.An_export_declaration_can_only_be_used_at_the_top_level_of_a_module.code, + p.An_export_declaration_cannot_have_modifiers.code, + p.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module.code, + p.An_import_declaration_cannot_have_modifiers.code, + p.An_object_member_cannot_be_declared_optional.code, + p.Argument_of_dynamic_import_cannot_be_spread_element.code, + p.Cannot_assign_to_private_method_0_Private_methods_are_not_writable.code, + p.Cannot_redeclare_identifier_0_in_catch_clause.code, + p.Catch_clause_variable_cannot_have_an_initializer.code, + p.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator.code, + p.Classes_can_only_extend_a_single_class.code, + p.Classes_may_not_have_a_field_named_constructor.code, + p.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code, + p.Duplicate_label_0.code, + p.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments.code, + p.for_await_loops_cannot_be_used_inside_a_class_static_block.code, + p.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code, + p.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code, + p.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array.code, + p.JSX_property_access_expressions_cannot_include_JSX_namespace_names.code, + p.Jump_target_cannot_cross_function_boundary.code, + p.Line_terminator_not_permitted_before_arrow.code, + p.Modifiers_cannot_appear_here.code, + p.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement.code, + p.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement.code, + p.Private_identifiers_are_not_allowed_outside_class_bodies.code, + p.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression.code, + p.Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier.code, + p.Tagged_template_expressions_are_not_permitted_in_an_optional_chain.code, + p.The_left_hand_side_of_a_for_of_statement_may_not_be_async.code, + p.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer.code, + p.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer.code, + p.Trailing_comma_not_allowed.code, + p.Variable_declaration_list_cannot_be_empty.code, + p._0_and_1_operations_cannot_be_mixed_without_parentheses.code, + p._0_expected.code, + p._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2.code, + p._0_list_cannot_be_empty.code, + p._0_modifier_already_seen.code, + p._0_modifier_cannot_appear_on_a_constructor_declaration.code, + p._0_modifier_cannot_appear_on_a_module_or_namespace_element.code, + p._0_modifier_cannot_appear_on_a_parameter.code, + p._0_modifier_cannot_appear_on_class_elements_of_this_kind.code, + p._0_modifier_cannot_be_used_here.code, + p._0_modifier_must_precede_1_modifier.code, + p._0_declarations_can_only_be_declared_inside_a_block.code, + p._0_declarations_must_be_initialized.code, + p.extends_clause_already_seen.code, + p.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations.code, + p.Class_constructor_may_not_be_a_generator.code, + p.Class_constructor_may_not_be_an_accessor.code, + p.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, + p.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, + p.Private_field_0_must_be_declared_in_an_enclosing_class.code, + // Type errors + p.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value.code + ]); + function bje(e, t) { + return e ? xC(e.getCompilerOptions(), t, Az) : !1; + } + function Sje(e, t, n, i, s, o) { + return { + rootNames: e, + options: t, + host: n, + oldProgram: i, + configFileParsingDiagnostics: s, + typeScriptVersion: o + }; + } + function iA(e, t, n, i, s) { + var o, c, _, u, m, g, h, S, T, C, D, w, A, O, F, R; + const W = os(e) ? Sje(e, t, n, i, s) : e, { rootNames: V, options: $, configFileParsingDiagnostics: U, projectReferences: _e, typeScriptVersion: Z } = W; + let { oldProgram: J } = W; + for (const Le of mre) + if (ro($, Le.name) && typeof $[Le.name] == "string") + throw new Error(`${Le.name} is a string value; tsconfig JSON must be parsed with parseJsonSourceFileConfigFileContent or getParsedCommandLineOfConfigFile before passing to createProgram`); + const re = Iu(() => yf("ignoreDeprecations", p.Invalid_value_for_ignoreDeprecations)); + let te, ie, le, Te, q, me, Ce, Ee = wp(), oe, ke, ue, it, Oe, xe, he, ne, Ae, De, we, Ue, bt, Lt, er; + const Nr = typeof $.maxNodeModuleJsDepth == "number" ? $.maxNodeModuleJsDepth : 0; + let Dt = 0; + const Qt = /* @__PURE__ */ new Map(), Wr = /* @__PURE__ */ new Map(); + (o = nn) == null || o.push( + nn.Phase.Program, + "createProgram", + { configFilePath: $.configFilePath, rootDir: $.rootDir }, + /*separateBeginAndEnd*/ + !0 + ), Qo("beforeProgram"); + const yr = W.host || uie($), qn = OO(yr); + let Bt = $.noLib; + const bi = Iu(() => yr.getDefaultLibFileName($)), pi = yr.getDefaultLibLocation ? yr.getDefaultLibLocation() : Hn(bi()), Xn = F3(); + let jr = []; + const di = yr.getCurrentDirectory(), Re = tD($), gt = Z3($, Re), tr = /* @__PURE__ */ new Map(); + let qr, Bn, wn, ki; + const Cs = yr.hasInvalidatedResolutions || Th; + yr.resolveModuleNameLiterals ? (ki = yr.resolveModuleNameLiterals.bind(yr), wn = (c = yr.getModuleResolutionCache) == null ? void 0 : c.call(yr)) : yr.resolveModuleNames ? (ki = (Le, Ge, St, rr, vr, Gr) => yr.resolveModuleNames( + Le.map(gie), + Ge, + Gr?.map(gie), + St, + rr, + vr + ).map( + (Dr) => Dr ? Dr.extension !== void 0 ? { resolvedModule: Dr } : ( + // An older host may have omitted extension, in which case we should infer it from the file extension of resolvedFileName. + { resolvedModule: { ...Dr, extension: nD(Dr.resolvedFileName) } } + ) : ive + ), wn = (_ = yr.getModuleResolutionCache) == null ? void 0 : _.call(yr)) : (wn = h6(di, xn, $), ki = (Le, Ge, St, rr, vr) => rA( + Le, + Ge, + St, + rr, + vr, + yr, + wn, + KW + )); + let Ks; + if (yr.resolveTypeReferenceDirectiveReferences) + Ks = yr.resolveTypeReferenceDirectiveReferences.bind(yr); + else if (yr.resolveTypeReferenceDirectives) + Ks = (Le, Ge, St, rr, vr) => yr.resolveTypeReferenceDirectives( + Le.map(hie), + Ge, + St, + rr, + vr?.impliedNodeFormat + ).map((Gr) => ({ resolvedTypeReferenceDirective: Gr })); + else { + const Le = eO( + di, + xn, + /*options*/ + void 0, + wn?.getPackageJsonInfoCache(), + wn?.optionsToRedirectsKey + ); + Ks = (Ge, St, rr, vr, Gr) => rA( + Ge, + St, + rr, + vr, + Gr, + yr, + Le, + wO + ); + } + const xr = yr.hasInvalidatedLibResolutions || Th; + let gs; + if (yr.resolveLibrary) + gs = yr.resolveLibrary.bind(yr); + else { + const Le = h6(di, xn, $, wn?.getPackageJsonInfoCache()); + gs = (Ge, St, rr) => tO(Ge, St, rr, yr, Le); + } + const Qe = /* @__PURE__ */ new Map(); + let Ct = /* @__PURE__ */ new Map(), ee = wp(), Ve; + const K = /* @__PURE__ */ new Map(); + let Ie = /* @__PURE__ */ new Map(); + const $e = yr.useCaseSensitiveFileNames() ? /* @__PURE__ */ new Map() : void 0; + let Ke, Je, Ye, _t; + const yt = !!((u = yr.useSourceOfProjectReferenceRedirect) != null && u.call(yr)) && !$.disableSourceOfProjectReferenceRedirect, { onProgramCreateComplete: We, fileExists: Et, directoryExists: Xt } = Tje({ + compilerHost: yr, + getSymlinkCache: g1, + useSourceOfProjectReferenceRedirect: yt, + toPath: _r, + getResolvedProjectReferences: eu, + getSourceOfProjectReferenceRedirect: gf, + forEachResolvedProjectReference: t_ + }), rn = yr.readFile.bind(yr); + (m = nn) == null || m.push(nn.Phase.Program, "shouldProgramCreateNewSourceFiles", { hasOldProgram: !!J }); + const ye = bje(J, $); + (g = nn) == null || g.pop(); + let ft; + if ((h = nn) == null || h.push(nn.Phase.Program, "tryReuseStructureFromOldProgram", {}), ft = Wo(), (S = nn) == null || S.pop(), ft !== 2) { + if (te = [], ie = [], _e && (Ke || (Ke = _e.map(Ne)), V.length && Ke?.forEach((Le, Ge) => { + if (!Le) return; + const St = Le.commandLine.options.outFile; + if (yt) { + if (St || Ru(Le.commandLine.options) === 0) + for (const rr of Le.commandLine.fileNames) + Do(rr, { kind: 1, index: Ge }); + } else if (St) + Do(Oh(St, ".d.ts"), { kind: 2, index: Ge }); + else if (Ru(Le.commandLine.options) === 0) { + const rr = Iu(() => HS(Le.commandLine, !yr.useCaseSensitiveFileNames())); + for (const vr of Le.commandLine.fileNames) + !fl(vr) && !Bo( + vr, + ".json" + /* Json */ + ) && Do(x6(vr, Le.commandLine, !yr.useCaseSensitiveFileNames(), rr), { kind: 2, index: Ge }); + } + })), (T = nn) == null || T.push(nn.Phase.Program, "processRootFiles", { count: V.length }), lr(V, (Le, Ge) => dl( + Le, + /*isDefaultLib*/ + !1, + /*ignoreNoDefaultLib*/ + !1, + { kind: 0, index: Ge } + )), (C = nn) == null || C.pop(), he ?? (he = V.length ? ZF($, yr) : He), ne = g6(), he.length) { + (D = nn) == null || D.push(nn.Phase.Program, "processTypeReferences", { count: he.length }); + const Le = $.configFilePath ? Hn($.configFilePath) : di, Ge = Ln(Le, YD), St = Ms(he, Ge); + for (let rr = 0; rr < he.length; rr++) + ne.set( + he[rr], + /*mode*/ + void 0, + St[rr] + ), et( + he[rr], + /*mode*/ + void 0, + St[rr], + { + kind: 8, + typeReference: he[rr], + packageId: (A = (w = St[rr]) == null ? void 0 : w.resolvedTypeReferenceDirective) == null ? void 0 : A.packageId + } + ); + (O = nn) == null || O.pop(); + } + if (V.length && !Bt) { + const Le = bi(); + !$.lib && Le ? dl( + Le, + /*isDefaultLib*/ + !0, + /*ignoreNoDefaultLib*/ + !1, + { + kind: 6 + /* LibFile */ + } + ) : lr($.lib, (Ge, St) => { + dl( + jt(Ge), + /*isDefaultLib*/ + !0, + /*ignoreNoDefaultLib*/ + !1, + { kind: 6, index: St } + ); + }); + } + le = W_(te, ir).concat(ie), te = void 0, ie = void 0, oe = void 0; + } + if (J && yr.onReleaseOldSourceFile) { + const Le = J.getSourceFiles(); + for (const Ge of Le) { + const St = qt(Ge.resolvedPath); + (ye || !St || St.impliedNodeFormat !== Ge.impliedNodeFormat || // old file wasn't redirect but new file is + Ge.resolvedPath === Ge.path && St.resolvedPath !== Ge.path) && yr.onReleaseOldSourceFile(Ge, J.getCompilerOptions(), !!qt(Ge.path), St); + } + yr.getParsedCommandLine || J.forEachResolvedProjectReference((Ge) => { + cd(Ge.sourceFile.path) || yr.onReleaseOldSourceFile( + Ge.sourceFile, + J.getCompilerOptions(), + /*hasSourceFileByPath*/ + !1, + /*newSourceFileByResolvedPath*/ + void 0 + ); + }); + } + J && yr.onReleaseParsedCommandLine && PO( + J.getProjectReferences(), + J.getResolvedProjectReferences(), + (Le, Ge, St) => { + const rr = Ge?.commandLine.projectReferences[St] || J.getProjectReferences()[St], vr = ak(rr); + Je?.has(_r(vr)) || yr.onReleaseParsedCommandLine(vr, Le, J.getCompilerOptions()); + } + ), J = void 0, De = void 0, Ue = void 0, Lt = void 0; + const fe = { + getRootFileNames: () => V, + getSourceFile: Oi, + getSourceFileByPath: qt, + getSourceFiles: () => le, + getMissingFilePaths: () => Ie, + getModuleResolutionCache: () => wn, + getFilesByNameMap: () => K, + getCompilerOptions: () => $, + getSyntacticDiagnostics: Mc, + getOptionsDiagnostics: Rc, + getGlobalDiagnostics: ac, + getSemanticDiagnostics: Ol, + getCachedSemanticDiagnostics: Ll, + getSuggestionDiagnostics: Ji, + getDeclarationDiagnostics: G, + getBindAndCheckDiagnostics: To, + getProgramDiagnostics: ge, + getTypeChecker: Sl, + getClassifiableNames: mi, + getCommonSourceDirectory: Ot, + emit: Zi, + getCurrentDirectory: () => di, + getNodeCount: () => Sl().getNodeCount(), + getIdentifierCount: () => Sl().getIdentifierCount(), + getSymbolCount: () => Sl().getSymbolCount(), + getTypeCount: () => Sl().getTypeCount(), + getInstantiationCount: () => Sl().getInstantiationCount(), + getRelationCacheSizes: () => Sl().getRelationCacheSizes(), + getFileProcessingDiagnostics: () => xe, + getAutomaticTypeDirectiveNames: () => he, + getAutomaticTypeDirectiveResolutions: () => ne, + isSourceFileFromExternalLibrary: Bu, + isSourceFileDefaultLibrary: Yc, + getModeForUsageLocation: mp, + getEmitSyntaxForUsageLocation: Rd, + getModeForResolutionAtIndex: Hh, + getSourceFileFromReference: Ti, + getLibFileFromReference: Br, + sourceFileToPackageName: Ct, + redirectTargetsMap: ee, + usesUriStyleNodeCoreModules: Ve, + resolvedModules: we, + resolvedTypeReferenceDirectiveNames: bt, + resolvedLibReferences: Ae, + getResolvedModule: X, + getResolvedModuleFromModuleSpecifier: lt, + getResolvedTypeReferenceDirective: zt, + getResolvedTypeReferenceDirectiveFromTypeReferenceDirective: de, + forEachResolvedModule: st, + forEachResolvedTypeReferenceDirective: Gt, + getCurrentPackagesMap: () => er, + typesPackageExists: Jr, + packageBundlesTypes: tt, + isEmittedFile: m1, + getConfigFileParsingDiagnostics: Vp, + getProjectReferences: hs, + getResolvedProjectReferences: eu, + getProjectReferenceRedirect: jf, + getResolvedProjectReferenceToRedirect: od, + getResolvedProjectReferenceByPath: cd, + forEachResolvedProjectReference: t_, + isSourceOfProjectReferenceRedirect: y_, + getRedirectReferenceForResolutionFromSourceOfProject: Vt, + getCompilerOptionsForFile: Q, + getDefaultResolutionModeForFile: h1, + getEmitModuleFormatOfFile: Rv, + getImpliedNodeFormatForEmit: ud, + shouldTransformImportCall: y1, + emitBuildInfo: zs, + fileExists: Et, + readFile: rn, + directoryExists: Xt, + getSymlinkCache: g1, + realpath: (F = yr.realpath) == null ? void 0 : F.bind(yr), + useCaseSensitiveFileNames: () => yr.useCaseSensitiveFileNames(), + getCanonicalFileName: xn, + getFileIncludeReasons: () => Ee, + structureIsReused: ft, + writeFile: ri, + getGlobalTypingsCacheLocation: Is(yr, yr.getGlobalTypingsCacheLocation) + }; + return We(), Tt(), Qo("afterProgram"), Yf("Program", "beforeProgram", "afterProgram"), (R = nn) == null || R.pop(), fe; + function L() { + return jr && (xe?.forEach((Le) => { + switch (Le.kind) { + case 1: + return Xn.add( + ps( + Le.file && qt(Le.file), + Le.fileProcessingReason, + Le.diagnostic, + Le.args || He + ) + ); + case 0: + return Xn.add(ve(Le)); + case 2: + return Le.diagnostics.forEach((Ge) => Xn.add(Ge)); + default: + E.assertNever(Le); + } + }), jr.forEach( + ({ file: Le, diagnostic: Ge, args: St }) => Xn.add( + ps( + Le, + /*fileProcessingReason*/ + void 0, + Ge, + St + ) + ) + ), jr = void 0, ke = void 0, ue = void 0), Xn; + } + function ve({ reason: Le }) { + const { file: Ge, pos: St, end: rr } = ZD(fe, Le), vr = Ge.libReferenceDirectives[Le.index], Gr = ave(vr), Dr = lC(XE(Gr, "lib."), ".d.ts"), cn = Sb(Dr, LF, lo); + return ol( + Ge, + E.checkDefined(St), + E.checkDefined(rr) - St, + cn ? p.Cannot_find_lib_definition_for_0_Did_you_mean_1 : p.Cannot_find_lib_definition_for_0, + Gr, + cn + ); + } + function X(Le, Ge, St) { + var rr; + return (rr = we?.get(Le.path)) == null ? void 0 : rr.get(Ge, St); + } + function lt(Le, Ge) { + return Ge ?? (Ge = Cr(Le)), E.assertIsDefined(Ge, "`moduleSpecifier` must have a `SourceFile` ancestor. Use `program.getResolvedModule` instead to provide the containing file and resolution mode."), X(Ge, Le.text, mp(Ge, Le)); + } + function zt(Le, Ge, St) { + var rr; + return (rr = bt?.get(Le.path)) == null ? void 0 : rr.get(Ge, St); + } + function de(Le, Ge) { + return zt( + Ge, + Le.fileName, + X0(Le, Ge) + ); + } + function st(Le, Ge) { + Xr(we, Le, Ge); + } + function Gt(Le, Ge) { + Xr(bt, Le, Ge); + } + function Xr(Le, Ge, St) { + var rr; + St ? (rr = Le?.get(St.path)) == null || rr.forEach((vr, Gr, Dr) => Ge(vr, Gr, Dr, St.path)) : Le?.forEach((vr, Gr) => vr.forEach((Dr, cn, ai) => Ge(Dr, cn, ai, Gr))); + } + function Rr() { + return er || (er = /* @__PURE__ */ new Map(), st(({ resolvedModule: Le }) => { + Le?.packageId && er.set(Le.packageId.name, Le.extension === ".d.ts" || !!er.get(Le.packageId.name)); + }), er); + } + function Jr(Le) { + return Rr().has(sO(Le)); + } + function tt(Le) { + return !!Rr().get(Le); + } + function ut(Le) { + var Ge; + (Ge = Le.resolutionDiagnostics) != null && Ge.length && (xe ?? (xe = [])).push({ + kind: 2, + diagnostics: Le.resolutionDiagnostics + }); + } + function Mt(Le, Ge, St, rr) { + if (yr.resolveModuleNameLiterals || !yr.resolveModuleNames) return ut(St); + if (!wn || vl(Ge)) return; + const vr = Xi(Le.originalFileName, di), Gr = Hn(vr), Dr = fr(Le), cn = wn.getFromNonRelativeNameCache(Ge, rr, Gr, Dr); + cn && ut(cn); + } + function Pt(Le, Ge, St) { + var rr, vr; + const Gr = Xi(Ge.originalFileName, di), Dr = fr(Ge); + (rr = nn) == null || rr.push(nn.Phase.Program, "resolveModuleNamesWorker", { containingFileName: Gr }), Qo("beforeResolveModule"); + const cn = ki( + Le, + Gr, + Dr, + $, + Ge, + St + ); + return Qo("afterResolveModule"), Yf("ResolveModule", "beforeResolveModule", "afterResolveModule"), (vr = nn) == null || vr.pop(), cn; + } + function Zt(Le, Ge, St) { + var rr, vr; + const Gr = rs(Ge) ? void 0 : Ge, Dr = rs(Ge) ? Ge : Xi(Ge.originalFileName, di), cn = Gr && fr(Gr); + (rr = nn) == null || rr.push(nn.Phase.Program, "resolveTypeReferenceDirectiveNamesWorker", { containingFileName: Dr }), Qo("beforeResolveTypeReference"); + const ai = Ks( + Le, + Dr, + cn, + $, + Gr, + St + ); + return Qo("afterResolveTypeReference"), Yf("ResolveTypeReference", "beforeResolveTypeReference", "afterResolveTypeReference"), (vr = nn) == null || vr.pop(), ai; + } + function fr(Le) { + const Ge = od(Le.originalFileName); + if (Ge || !fl(Le.originalFileName)) return Ge; + const St = Vt(Le.path); + if (St) return St; + if (!yr.realpath || !$.preserveSymlinks || !Le.originalFileName.includes(Kg)) return; + const rr = _r(yr.realpath(Le.originalFileName)); + return rr === Le.path ? void 0 : Vt(rr); + } + function Vt(Le) { + const Ge = gf(Le); + if (rs(Ge)) return od(Ge); + if (Ge) + return t_((St) => { + const rr = St.commandLine.options.outFile; + if (rr) + return _r(rr) === Le ? St : void 0; + }); + } + function ir(Le, Ge) { + return uo(Tr(Le), Tr(Ge)); + } + function Tr(Le) { + if (Zf( + pi, + Le.fileName, + /*ignoreCase*/ + !1 + )) { + const Ge = Vc(Le.fileName); + if (Ge === "lib.d.ts" || Ge === "lib.es6.d.ts") return 0; + const St = lC(XE(Ge, "lib."), ".d.ts"), rr = LF.indexOf(St); + if (rr !== -1) return rr + 1; + } + return LF.length + 2; + } + function _r(Le) { + return oo(Le, di, xn); + } + function Ot() { + if (q === void 0) { + const Le = kn(le, (Ge) => Rb(Ge, fe)); + q = XD( + $, + () => Li(Le, (Ge) => Ge.isDeclarationFile ? void 0 : Ge.fileName), + di, + xn, + (Ge) => j(Le, Ge) + ); + } + return q; + } + function mi() { + var Le; + if (!Ce) { + Sl(), Ce = /* @__PURE__ */ new Set(); + for (const Ge of le) + (Le = Ge.classifiableNames) == null || Le.forEach((St) => Ce.add(St)); + } + return Ce; + } + function Js(Le, Ge) { + return Ns({ + entries: Le, + containingFile: Ge, + containingSourceFile: Ge, + redirectedReference: fr(Ge), + nameAndModeGetter: DO, + resolutionWorker: Pt, + getResolutionFromOldProgram: (St, rr) => J?.getResolvedModule(Ge, St, rr), + getResolved: cx, + canReuseResolutionsInFile: () => Ge === J?.getSourceFile(Ge.fileName) && !Cs(Ge.path), + resolveToOwnAmbientModule: !0 + }); + } + function Ms(Le, Ge) { + const St = rs(Ge) ? void 0 : Ge; + return Ns({ + entries: Le, + containingFile: Ge, + containingSourceFile: St, + redirectedReference: St && fr(St), + nameAndModeGetter: sve, + resolutionWorker: Zt, + getResolutionFromOldProgram: (rr, vr) => { + var Gr; + return St ? J?.getResolvedTypeReferenceDirective(St, rr, vr) : (Gr = J?.getAutomaticTypeDirectiveResolutions()) == null ? void 0 : Gr.get(rr, vr); + }, + getResolved: x7, + canReuseResolutionsInFile: () => St ? St === J?.getSourceFile(St.fileName) && !Cs(St.path) : !Cs(_r(Ge)) + }); + } + function Ns({ + entries: Le, + containingFile: Ge, + containingSourceFile: St, + redirectedReference: rr, + nameAndModeGetter: vr, + resolutionWorker: Gr, + getResolutionFromOldProgram: Dr, + getResolved: cn, + canReuseResolutionsInFile: ai, + resolveToOwnAmbientModule: hn + }) { + if (!Le.length) return He; + if (ft === 0 && (!hn || !St.ambientModuleNames.length)) + return Gr( + Le, + Ge, + /*reusedNames*/ + void 0 + ); + let ji, Gn, ta, Cc; + const r_ = ai(); + for (let Bf = 0; Bf < Le.length; Bf++) { + const n_ = Le[Bf]; + if (r_) { + const i_ = vr.getName(n_), jv = vr.getMode(n_, St, rr?.commandLine.options ?? $), Bv = Dr(i_, jv), fg = Bv && cn(Bv); + if (fg) { + a1($, yr) && Yi( + yr, + Gr === Pt ? fg.packageId ? p.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : p.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : fg.packageId ? p.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : p.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2, + i_, + St ? Xi(St.originalFileName, di) : Ge, + fg.resolvedFileName, + fg.packageId && K1(fg.packageId) + ), (ta ?? (ta = new Array(Le.length)))[Bf] = Bv, (Cc ?? (Cc = [])).push(n_); + continue; + } + } + if (hn) { + const i_ = vr.getName(n_); + if (as(St.ambientModuleNames, i_)) { + a1($, yr) && Yi( + yr, + p.Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1, + i_, + Xi(St.originalFileName, di) + ), (ta ?? (ta = new Array(Le.length)))[Bf] = ive; + continue; + } + } + (ji ?? (ji = [])).push(n_), (Gn ?? (Gn = [])).push(Bf); + } + if (!ji) return ta; + const vf = Gr(ji, Ge, Cc); + return ta ? (vf.forEach((Bf, n_) => ta[Gn[n_]] = Bf), ta) : vf; + } + function kc() { + return !PO( + J.getProjectReferences(), + J.getResolvedProjectReferences(), + (Le, Ge, St) => { + const rr = (Ge ? Ge.commandLine.projectReferences : _e)[St], vr = Ne(rr); + return Le ? !vr || vr.sourceFile !== Le.sourceFile || !Ef(Le.commandLine.fileNames, vr.commandLine.fileNames) : vr !== void 0; + }, + (Le, Ge) => { + const St = Ge ? cd(Ge.sourceFile.path).commandLine.projectReferences : _e; + return !Ef(Le, St, Vj); + } + ); + } + function Wo() { + var Le; + if (!J) + return 0; + const Ge = J.getCompilerOptions(); + if (S7(Ge, $)) + return 0; + const St = J.getRootFileNames(); + if (!Ef(St, V) || !kc()) + return 0; + _e && (Ke = _e.map(Ne)); + const rr = [], vr = []; + if (ft = 2, al(J.getMissingFilePaths(), (hn) => yr.fileExists(hn))) + return 0; + const Gr = J.getSourceFiles(); + let Dr; + ((hn) => { + hn[hn.Exists = 0] = "Exists", hn[hn.Modified = 1] = "Modified"; + })(Dr || (Dr = {})); + const cn = /* @__PURE__ */ new Map(); + for (const hn of Gr) { + const ji = mo(hn.fileName, wn, yr, $); + let Gn = yr.getSourceFileByPath ? yr.getSourceFileByPath( + hn.fileName, + hn.resolvedPath, + ji, + /*onError*/ + void 0, + ye + ) : yr.getSourceFile( + hn.fileName, + ji, + /*onError*/ + void 0, + ye + ); + if (!Gn) + return 0; + Gn.packageJsonLocations = (Le = ji.packageJsonLocations) != null && Le.length ? ji.packageJsonLocations : void 0, Gn.packageJsonScope = ji.packageJsonScope, E.assert(!Gn.redirectInfo, "Host should not return a redirect source file from `getSourceFile`"); + let ta; + if (hn.redirectInfo) { + if (Gn !== hn.redirectInfo.unredirected) + return 0; + ta = !1, Gn = hn; + } else if (J.redirectTargetsMap.has(hn.path)) { + if (Gn !== hn) + return 0; + ta = !1; + } else + ta = Gn !== hn; + Gn.path = hn.path, Gn.originalFileName = hn.originalFileName, Gn.resolvedPath = hn.resolvedPath, Gn.fileName = hn.fileName; + const Cc = J.sourceFileToPackageName.get(hn.path); + if (Cc !== void 0) { + const r_ = cn.get(Cc), vf = ta ? 1 : 0; + if (r_ !== void 0 && vf === 1 || r_ === 1) + return 0; + cn.set(Cc, vf); + } + ta ? (hn.impliedNodeFormat !== Gn.impliedNodeFormat ? ft = 1 : Ef(hn.libReferenceDirectives, Gn.libReferenceDirectives, Ml) ? hn.hasNoDefaultLib !== Gn.hasNoDefaultLib ? ft = 1 : Ef(hn.referencedFiles, Gn.referencedFiles, Ml) ? (Ft(Gn), Ef(hn.imports, Gn.imports, Rl) && Ef(hn.moduleAugmentations, Gn.moduleAugmentations, Rl) ? (hn.flags & 12582912) !== (Gn.flags & 12582912) ? ft = 1 : Ef(hn.typeReferenceDirectives, Gn.typeReferenceDirectives, Ml) || (ft = 1) : ft = 1) : ft = 1 : ft = 1, vr.push(Gn)) : Cs(hn.path) && (ft = 1, vr.push(Gn)), rr.push(Gn); + } + if (ft !== 2) + return ft; + for (const hn of vr) { + const ji = uve(hn), Gn = Js(ji, hn); + (Ue ?? (Ue = /* @__PURE__ */ new Map())).set(hn.path, Gn); + const ta = Q(hn); + Hj( + ji, + Gn, + (n_) => J.getResolvedModule(hn, n_.text, EO(hn, n_, ta)), + wZ + ) && (ft = 1); + const r_ = hn.typeReferenceDirectives, vf = Ms(r_, hn); + (Lt ?? (Lt = /* @__PURE__ */ new Map())).set(hn.path, vf), Hj( + r_, + vf, + (n_) => J.getResolvedTypeReferenceDirective( + hn, + hie(n_), + X0(n_, hn) + ), + PZ + ) && (ft = 1); + } + if (ft !== 2) + return ft; + if (EZ(Ge, $) || J.resolvedLibReferences && al(J.resolvedLibReferences, (hn, ji) => Er(ji).actual !== hn.actual)) + return 1; + if (yr.hasChangedAutomaticTypeDirectiveNames) { + if (yr.hasChangedAutomaticTypeDirectiveNames()) return 1; + } else if (he = ZF($, yr), !Ef(J.getAutomaticTypeDirectiveNames(), he)) return 1; + Ie = J.getMissingFilePaths(), E.assert(rr.length === J.getSourceFiles().length); + for (const hn of rr) + K.set(hn.path, hn); + return J.getFilesByNameMap().forEach((hn, ji) => { + if (!hn) { + K.set(ji, hn); + return; + } + if (hn.path === ji) { + J.isSourceFileFromExternalLibrary(hn) && Wr.set(hn.path, !0); + return; + } + K.set(ji, K.get(hn.path)); + }), le = rr, Ee = J.getFileIncludeReasons(), xe = J.getFileProcessingDiagnostics(), he = J.getAutomaticTypeDirectiveNames(), ne = J.getAutomaticTypeDirectiveResolutions(), Ct = J.sourceFileToPackageName, ee = J.redirectTargetsMap, Ve = J.usesUriStyleNodeCoreModules, we = J.resolvedModules, bt = J.resolvedTypeReferenceDirectiveNames, Ae = J.resolvedLibReferences, er = J.getCurrentPackagesMap(), 2; + } + function sc(Le) { + return { + getCanonicalFileName: xn, + getCommonSourceDirectory: fe.getCommonSourceDirectory, + getCompilerOptions: fe.getCompilerOptions, + getCurrentDirectory: () => di, + getSourceFile: fe.getSourceFile, + getSourceFileByPath: fe.getSourceFileByPath, + getSourceFiles: fe.getSourceFiles, + isSourceFileFromExternalLibrary: Bu, + getResolvedProjectReferenceToRedirect: od, + getProjectReferenceRedirect: jf, + isSourceOfProjectReferenceRedirect: y_, + getSymlinkCache: g1, + writeFile: Le || ri, + isEmitBlocked: Gs, + shouldTransformImportCall: y1, + getEmitModuleFormatOfFile: Rv, + getDefaultResolutionModeForFile: h1, + getModeForResolutionAtIndex: Hh, + readFile: (Ge) => yr.readFile(Ge), + fileExists: (Ge) => { + const St = _r(Ge); + return qt(St) ? !0 : Ie.has(St) ? !1 : yr.fileExists(Ge); + }, + realpath: Is(yr, yr.realpath), + useCaseSensitiveFileNames: () => yr.useCaseSensitiveFileNames(), + getBuildInfo: () => { + var Ge; + return (Ge = fe.getBuildInfo) == null ? void 0 : Ge.call(fe); + }, + getSourceFileFromReference: (Ge, St) => fe.getSourceFileFromReference(Ge, St), + redirectTargetsMap: ee, + getFileIncludeReasons: fe.getFileIncludeReasons, + createHash: Is(yr, yr.createHash), + getModuleResolutionCache: () => fe.getModuleResolutionCache(), + trace: Is(yr, yr.trace), + getGlobalTypingsCacheLocation: fe.getGlobalTypingsCacheLocation + }; + } + function ri(Le, Ge, St, rr, vr, Gr) { + yr.writeFile(Le, Ge, St, rr, vr, Gr); + } + function zs(Le) { + var Ge, St; + (Ge = nn) == null || Ge.push( + nn.Phase.Emit, + "emitBuildInfo", + {}, + /*separateBeginAndEnd*/ + !0 + ), Qo("beforeEmit"); + const rr = BW( + nie, + sc(Le), + /*targetSourceFile*/ + void 0, + /*transformers*/ + Zne, + /*emitOnly*/ + !1, + /*onlyBuildInfo*/ + !0 + ); + return Qo("afterEmit"), Yf("Emit", "beforeEmit", "afterEmit"), (St = nn) == null || St.pop(), rr; + } + function eu() { + return Ke; + } + function hs() { + return _e; + } + function Bu(Le) { + return !!Wr.get(Le.path); + } + function Yc(Le) { + if (!Le.isDeclarationFile) + return !1; + if (Le.hasNoDefaultLib) + return !0; + if ($.noLib) + return !1; + const Ge = yr.useCaseSensitiveFileNames() ? bb : Py; + return $.lib ? at($.lib, (St) => { + const rr = Ae.get(St); + return !!rr && Ge(Le.fileName, rr.actual); + }) : Ge(Le.fileName, bi()); + } + function Sl() { + return me || (me = une(fe)); + } + function Zi(Le, Ge, St, rr, vr, Gr, Dr) { + var cn, ai; + (cn = nn) == null || cn.push( + nn.Phase.Emit, + "emit", + { path: Le?.path }, + /*separateBeginAndEnd*/ + !0 + ); + const hn = wt( + () => Ca( + fe, + Le, + Ge, + St, + rr, + vr, + Gr, + Dr + ) + ); + return (ai = nn) == null || ai.pop(), hn; + } + function Gs(Le) { + return tr.has(_r(Le)); + } + function Ca(Le, Ge, St, rr, vr, Gr, Dr, cn) { + if (!Dr) { + const Gn = iU(Le, Ge, St, rr); + if (Gn) return Gn; + } + const ai = Sl(), hn = ai.getEmitResolver( + $.outFile ? void 0 : Ge, + rr, + jW(vr, Dr) + ); + Qo("beforeEmit"); + const ji = ai.runWithCancellationToken( + rr, + () => BW( + hn, + sc(St), + Ge, + Kne($, Gr, vr), + vr, + /*onlyBuildInfo*/ + !1, + Dr, + cn + ) + ); + return Qo("afterEmit"), Yf("Emit", "beforeEmit", "afterEmit"), ji; + } + function Oi(Le) { + return qt(_r(Le)); + } + function qt(Le) { + return K.get(Le) || void 0; + } + function Qa(Le, Ge, St) { + return mC(Le ? Ge(Le, St) : na(fe.getSourceFiles(), (rr) => (St && St.throwIfCancellationRequested(), Ge(rr, St)))); + } + function Mc(Le, Ge) { + return Qa(Le, rt, Ge); + } + function Ol(Le, Ge, St) { + return Qa( + Le, + (rr, vr) => Kt(rr, vr, St), + Ge + ); + } + function Ll(Le) { + return it?.get(Le.path); + } + function To(Le, Ge) { + return Yr( + Le, + Ge, + /*nodesToCheck*/ + void 0 + ); + } + function ge(Le) { + var Ge; + if ($C(Le, $, fe)) + return He; + const St = L().getDiagnostics(Le.fileName); + return (Ge = Le.commentDirectives) != null && Ge.length ? En(Le, Le.commentDirectives, St).diagnostics : St; + } + function G(Le, Ge) { + return Qa(Le, mc, Ge); + } + function rt(Le) { + return Gu(Le) ? (Le.additionalSyntacticDiagnostics || (Le.additionalSyntacticDiagnostics = ba(Le)), Wi(Le.additionalSyntacticDiagnostics, Le.parseDiagnostics)) : Le.parseDiagnostics; + } + function wt(Le) { + try { + return Le(); + } catch (Ge) { + throw Ge instanceof t4 && (me = void 0), Ge; + } + } + function Kt(Le, Ge, St) { + return Wi( + FO(Yr(Le, Ge, St), $), + ge(Le) + ); + } + function Yr(Le, Ge, St) { + if (St) + return Mn(Le, Ge, St); + let rr = it?.get(Le.path); + return rr || (it ?? (it = /* @__PURE__ */ new Map())).set( + Le.path, + rr = Mn(Le, Ge) + ), rr; + } + function Mn(Le, Ge, St) { + return wt(() => { + if ($C(Le, $, fe)) + return He; + const rr = Sl(); + E.assert(!!Le.bindDiagnostics); + const vr = Le.scriptKind === 1 || Le.scriptKind === 2, Gr = k4(Le, $.checkJs), Dr = vr && iD(Le, $); + let cn = Le.bindDiagnostics, ai = rr.getDiagnostics(Le, Ge, St); + return Gr && (cn = kn(cn, (hn) => cve.has(hn.code)), ai = kn(ai, (hn) => cve.has(hn.code))), pr( + Le, + !Gr, + !!St, + cn, + ai, + Dr ? Le.jsDocDiagnostics : void 0 + ); + }); + } + function pr(Le, Ge, St, ...rr) { + var vr; + const Gr = Dp(rr); + if (!Ge || !((vr = Le.commentDirectives) != null && vr.length)) + return Gr; + const { diagnostics: Dr, directives: cn } = En(Le, Le.commentDirectives, Gr); + if (St) + return Dr; + for (const ai of cn.getUnusedExpectations()) + Dr.push(HZ(Le, ai.range, p.Unused_ts_expect_error_directive)); + return Dr; + } + function En(Le, Ge, St) { + const rr = IZ(Le, Ge); + return { diagnostics: St.filter((Gr) => hi(Gr, rr) === -1), directives: rr }; + } + function Ji(Le, Ge) { + return wt(() => Sl().getSuggestionDiagnostics(Le, Ge)); + } + function hi(Le, Ge) { + const { file: St, start: rr } = Le; + if (!St) + return -1; + const vr = Ag(St); + let Gr = pC(vr, rr).line - 1; + for (; Gr >= 0; ) { + if (Ge.markUsed(Gr)) + return Gr; + const Dr = St.text.slice(vr[Gr], vr[Gr + 1]).trim(); + if (Dr !== "" && !/^\s*\/\/.*$/.test(Dr)) + return -1; + Gr--; + } + return -1; + } + function ba(Le) { + return wt(() => { + const Ge = []; + return St(Le, Le), Yx(Le, St, rr), Ge; + function St(cn, ai) { + switch (ai.kind) { + case 169: + case 172: + case 174: + if (ai.questionToken === cn) + return Ge.push(Dr(cn, p.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")), "skip"; + // falls through + case 173: + case 176: + case 177: + case 178: + case 218: + case 262: + case 219: + case 260: + if (ai.type === cn) + return Ge.push(Dr(cn, p.Type_annotations_can_only_be_used_in_TypeScript_files)), "skip"; + } + switch (cn.kind) { + case 273: + if (cn.isTypeOnly) + return Ge.push(Dr(ai, p._0_declarations_can_only_be_used_in_TypeScript_files, "import type")), "skip"; + break; + case 278: + if (cn.isTypeOnly) + return Ge.push(Dr(cn, p._0_declarations_can_only_be_used_in_TypeScript_files, "export type")), "skip"; + break; + case 276: + case 281: + if (cn.isTypeOnly) + return Ge.push(Dr(cn, p._0_declarations_can_only_be_used_in_TypeScript_files, ju(cn) ? "import...type" : "export...type")), "skip"; + break; + case 271: + return Ge.push(Dr(cn, p.import_can_only_be_used_in_TypeScript_files)), "skip"; + case 277: + if (cn.isExportEquals) + return Ge.push(Dr(cn, p.export_can_only_be_used_in_TypeScript_files)), "skip"; + break; + case 298: + if (cn.token === 119) + return Ge.push(Dr(cn, p.implements_clauses_can_only_be_used_in_TypeScript_files)), "skip"; + break; + case 264: + const ji = Xs( + 120 + /* InterfaceKeyword */ + ); + return E.assertIsDefined(ji), Ge.push(Dr(cn, p._0_declarations_can_only_be_used_in_TypeScript_files, ji)), "skip"; + case 267: + const Gn = cn.flags & 32 ? Xs( + 145 + /* NamespaceKeyword */ + ) : Xs( + 144 + /* ModuleKeyword */ + ); + return E.assertIsDefined(Gn), Ge.push(Dr(cn, p._0_declarations_can_only_be_used_in_TypeScript_files, Gn)), "skip"; + case 265: + return Ge.push(Dr(cn, p.Type_aliases_can_only_be_used_in_TypeScript_files)), "skip"; + case 176: + case 174: + case 262: + return cn.body ? void 0 : (Ge.push(Dr(cn, p.Signature_declarations_can_only_be_used_in_TypeScript_files)), "skip"); + case 266: + const ta = E.checkDefined(Xs( + 94 + /* EnumKeyword */ + )); + return Ge.push(Dr(cn, p._0_declarations_can_only_be_used_in_TypeScript_files, ta)), "skip"; + case 235: + return Ge.push(Dr(cn, p.Non_null_assertions_can_only_be_used_in_TypeScript_files)), "skip"; + case 234: + return Ge.push(Dr(cn.type, p.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)), "skip"; + case 238: + return Ge.push(Dr(cn.type, p.Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files)), "skip"; + case 216: + E.fail(); + } + } + function rr(cn, ai) { + if (vz(ai)) { + const hn = Pn(ai.modifiers, ll); + hn && Ge.push(Dr(hn, p.Decorators_are_not_valid_here)); + } else if (n2(ai) && ai.modifiers) { + const hn = ec(ai.modifiers, ll); + if (hn >= 0) { + if (Ii(ai) && !$.experimentalDecorators) + Ge.push(Dr(ai.modifiers[hn], p.Decorators_are_not_valid_here)); + else if ($c(ai)) { + const ji = ec(ai.modifiers, jx); + if (ji >= 0) { + const Gn = ec(ai.modifiers, _F); + if (hn > ji && Gn >= 0 && hn < Gn) + Ge.push(Dr(ai.modifiers[hn], p.Decorators_are_not_valid_here)); + else if (ji >= 0 && hn < ji) { + const ta = ec(ai.modifiers, ll, ji); + ta >= 0 && Ge.push(Bs( + Dr(ai.modifiers[ta], p.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export), + Dr(ai.modifiers[hn], p.Decorator_used_before_export_here) + )); + } + } + } + } + } + switch (ai.kind) { + case 263: + case 231: + case 174: + case 176: + case 177: + case 178: + case 218: + case 262: + case 219: + if (cn === ai.typeParameters) + return Ge.push(Gr(cn, p.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)), "skip"; + // falls through + case 243: + if (cn === ai.modifiers) + return vr( + ai.modifiers, + ai.kind === 243 + /* VariableStatement */ + ), "skip"; + break; + case 172: + if (cn === ai.modifiers) { + for (const hn of cn) + ia(hn) && hn.kind !== 126 && hn.kind !== 129 && Ge.push(Dr(hn, p.The_0_modifier_can_only_be_used_in_TypeScript_files, Xs(hn.kind))); + return "skip"; + } + break; + case 169: + if (cn === ai.modifiers && at(cn, ia)) + return Ge.push(Gr(cn, p.Parameter_modifiers_can_only_be_used_in_TypeScript_files)), "skip"; + break; + case 213: + case 214: + case 233: + case 285: + case 286: + case 215: + if (cn === ai.typeArguments) + return Ge.push(Gr(cn, p.Type_arguments_can_only_be_used_in_TypeScript_files)), "skip"; + break; + } + } + function vr(cn, ai) { + for (const hn of cn) + switch (hn.kind) { + case 87: + if (ai) + continue; + // to report error, + // falls through + case 125: + case 123: + case 124: + case 148: + case 138: + case 128: + case 164: + case 103: + case 147: + Ge.push(Dr(hn, p.The_0_modifier_can_only_be_used_in_TypeScript_files, Xs(hn.kind))); + break; + // These are all legal modifiers. + case 126: + case 95: + case 90: + case 129: + } + } + function Gr(cn, ai, ...hn) { + const ji = cn.pos; + return ol(Le, ji, cn.end - ji, ai, ...hn); + } + function Dr(cn, ai, ...hn) { + return ep(Le, cn, ai, ...hn); + } + }); + } + function Mo(Le, Ge) { + let St = Oe?.get(Le.path); + return St || (Oe ?? (Oe = /* @__PURE__ */ new Map())).set( + Le.path, + St = dc(Le, Ge) + ), St; + } + function dc(Le, Ge) { + return wt(() => { + const St = Sl().getEmitResolver(Le, Ge); + return Yne(sc(Ja), St, Le) || He; + }); + } + function mc(Le, Ge) { + return Le.isDeclarationFile ? He : Mo(Le, Ge); + } + function Rc() { + return mC(Wi( + L().getGlobalDiagnostics(), + Uo() + )); + } + function Uo() { + if (!$.configFile) return He; + let Le = L().getDiagnostics($.configFile.fileName); + return t_((Ge) => { + Le = Wi(Le, L().getDiagnostics(Ge.sourceFile.fileName)); + }), Le; + } + function ac() { + return V.length ? mC(Sl().getGlobalDiagnostics().slice()) : He; + } + function Vp() { + return U || He; + } + function dl(Le, Ge, St, rr) { + to( + Hs(Le), + Ge, + St, + /*packageId*/ + void 0, + rr + ); + } + function Ml(Le, Ge) { + return Le.fileName === Ge.fileName; + } + function Rl(Le, Ge) { + return Le.kind === 80 ? Ge.kind === 80 && Le.escapedText === Ge.escapedText : Ge.kind === 11 && Le.text === Ge.text; + } + function Fe(Le, Ge) { + const St = N.createStringLiteral(Le), rr = N.createImportDeclaration( + /*modifiers*/ + void 0, + /*importClause*/ + void 0, + St + ); + return wS( + rr, + 2 + /* NeverApplyImportHelper */ + ), Fa(St, rr), Fa(rr, Ge), St.flags &= -17, rr.flags &= -17, St; + } + function Ft(Le) { + if (Le.imports) + return; + const Ge = Gu(Le), St = el(Le); + let rr, vr, Gr; + if (Ge || !Le.isDeclarationFile && (Mp($) || el(Le))) { + $.importHelpers && (rr = [Fe(Wy, Le)]); + const cn = O5(Q3($, Le), $); + cn && (rr || (rr = [])).push(Fe(cn, Le)); + } + for (const cn of Le.statements) + Dr( + cn, + /*inAmbientModule*/ + !1 + ); + (Le.flags & 4194304 || Ge) && tF( + Le, + /*includeTypeSpaceImports*/ + !0, + /*requireStringLiteralLikeArgument*/ + !0, + (cn, ai) => { + lv( + cn, + /*incremental*/ + !1 + ), rr = Pr(rr, ai); + } + ), Le.imports = rr || He, Le.moduleAugmentations = vr || He, Le.ambientModuleNames = Gr || He; + return; + function Dr(cn, ai) { + if (ZP(cn)) { + const hn = dx(cn); + hn && ea(hn) && hn.text && (!ai || !vl(hn.text)) && (lv( + cn, + /*incremental*/ + !1 + ), rr = Pr(rr, hn), !Ve && Dt === 0 && !Le.isDeclarationFile && (Vi(hn.text, "node:") && !eF.has(hn.text) ? Ve = !0 : Ve === void 0 && Wee.has(hn.text) && (Ve = !1))); + } else if (Lc(cn) && Ou(cn) && (ai || $n( + cn, + 128 + /* Ambient */ + ) || Le.isDeclarationFile)) { + cn.name.parent = cn; + const hn = rp(cn.name); + if (St || ai && !vl(hn)) + (vr || (vr = [])).push(cn.name); + else if (!ai) { + Le.isDeclarationFile && (Gr || (Gr = [])).push(hn); + const ji = cn.body; + if (ji) + for (const Gn of ji.statements) + Dr( + Gn, + /*inAmbientModule*/ + !0 + ); + } + } + } + } + function Br(Le) { + var Ge; + const St = ove(Le), rr = St && ((Ge = Ae?.get(St)) == null ? void 0 : Ge.actual); + return rr !== void 0 ? Oi(rr) : void 0; + } + function Ti(Le, Ge) { + return Sa(HW(Ge.fileName, Le.fileName), Oi); + } + function Sa(Le, Ge, St, rr) { + if (_C(Le)) { + const vr = yr.getCanonicalFileName(Le); + if (!$.allowNonTsExtensions && !lr(Dp(gt), (Dr) => Bo(vr, Dr))) { + St && (Gg(vr) ? St(p.File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option, Le) : St(p.File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1, Le, "'" + Dp(Re).join("', '") + "'")); + return; + } + const Gr = Ge(Le); + if (St) + if (Gr) + Ev(rr) && vr === yr.getCanonicalFileName(qt(rr.file).fileName) && St(p.A_file_cannot_have_a_reference_to_itself); + else { + const Dr = jf(Le); + Dr ? St(p.Output_file_0_has_not_been_built_from_source_file_1, Dr, Le) : St(p.File_0_not_found, Le); + } + return Gr; + } else { + const vr = $.allowNonTsExtensions && Ge(Le); + if (vr) return vr; + if (St && $.allowNonTsExtensions) { + St(p.File_0_not_found, Le); + return; + } + const Gr = lr(Re[0], (Dr) => Ge(Le + Dr)); + return St && !Gr && St(p.Could_not_resolve_the_path_0_with_the_extensions_Colon_1, Le, "'" + Dp(Re).join("', '") + "'"), Gr; + } + } + function to(Le, Ge, St, rr, vr) { + Sa( + Le, + (Gr) => Va(Gr, Ge, St, vr, rr), + // TODO: GH#18217 + (Gr, ...Dr) => ja( + /*file*/ + void 0, + vr, + Gr, + Dr + ), + vr + ); + } + function Do(Le, Ge) { + return to( + Le, + /*isDefaultLib*/ + !1, + /*ignoreNoDefaultLib*/ + !1, + /*packageId*/ + void 0, + Ge + ); + } + function ml(Le, Ge, St) { + !Ev(St) && at(Ee.get(Ge.path), Ev) ? ja(Ge, St, p.Already_included_file_name_0_differs_from_file_name_1_only_in_casing, [Ge.fileName, Le]) : ja(Ge, St, p.File_name_0_differs_from_already_included_file_name_1_only_in_casing, [Le, Ge.fileName]); + } + function gc(Le, Ge, St, rr, vr, Gr, Dr) { + var cn; + const ai = bv.createRedirectedSourceFile({ redirectTarget: Le, unredirected: Ge }); + return ai.fileName = St, ai.path = rr, ai.resolvedPath = vr, ai.originalFileName = Gr, ai.packageJsonLocations = (cn = Dr.packageJsonLocations) != null && cn.length ? Dr.packageJsonLocations : void 0, ai.packageJsonScope = Dr.packageJsonScope, Wr.set(rr, Dt > 0), ai; + } + function Va(Le, Ge, St, rr, vr) { + var Gr, Dr; + (Gr = nn) == null || Gr.push(nn.Phase.Program, "findSourceFile", { + fileName: Le, + isDefaultLib: Ge || void 0, + fileIncludeKind: qR[rr.kind] + }); + const cn = df(Le, Ge, St, rr, vr); + return (Dr = nn) == null || Dr.pop(), cn; + } + function mo(Le, Ge, St, rr) { + const vr = AO(Xi(Le, di), Ge?.getPackageJsonInfoCache(), St, rr), Gr = pa(rr), Dr = q3(rr); + return typeof vr == "object" ? { ...vr, languageVersion: Gr, setExternalModuleIndicator: Dr, jsDocParsingMode: St.jsDocParsingMode } : { languageVersion: Gr, impliedNodeFormat: vr, setExternalModuleIndicator: Dr, jsDocParsingMode: St.jsDocParsingMode }; + } + function df(Le, Ge, St, rr, vr) { + var Gr; + const Dr = _r(Le); + if (yt) { + let Gn = gf(Dr); + if (!Gn && yr.realpath && $.preserveSymlinks && fl(Le) && Le.includes(Kg)) { + const ta = _r(yr.realpath(Le)); + ta !== Dr && (Gn = gf(ta)); + } + if (Gn) { + const ta = rs(Gn) ? Va(Gn, Ge, St, rr, vr) : void 0; + return ta && F_( + ta, + Dr, + Le, + /*redirectedPath*/ + void 0 + ), ta; + } + } + const cn = Le; + if (K.has(Dr)) { + const Gn = K.get(Dr), ta = Rf( + Gn || void 0, + rr, + /*checkExisting*/ + !0 + ); + if (Gn && ta && $.forceConsistentCasingInFileNames !== !1) { + const Cc = Gn.fileName; + _r(Cc) !== _r(Le) && (Le = jf(Le) || Le); + const vf = lj(Cc, di), Bf = lj(Le, di); + vf !== Bf && ml(Le, Gn, rr); + } + return Gn && Wr.get(Gn.path) && Dt === 0 ? (Wr.set(Gn.path, !1), $.noResolve || (hf(Gn, Ge), ug(Gn)), $.noLib || Hr(Gn), Qt.set(Gn.path, !1), ii(Gn)) : Gn && Qt.get(Gn.path) && Dt < Nr && (Qt.set(Gn.path, !1), ii(Gn)), Gn || void 0; + } + let ai; + if (!yt) { + const Gn = fp(Le); + if (Gn) { + if (Gn.commandLine.options.outFile) + return; + const ta = th(Gn, Le); + Le = ta, ai = _r(ta); + } + } + const hn = mo(Le, wn, yr, $), ji = yr.getSourceFile( + Le, + hn, + (Gn) => ja( + /*file*/ + void 0, + rr, + p.Cannot_read_file_0_Colon_1, + [Le, Gn] + ), + ye + ); + if (vr) { + const Gn = K1(vr), ta = Qe.get(Gn); + if (ta) { + const Cc = gc(ta, ji, Le, Dr, _r(Le), cn, hn); + return ee.add(ta.path, Le), F_(Cc, Dr, Le, ai), Rf( + Cc, + rr, + /*checkExisting*/ + !1 + ), Ct.set(Dr, C7(vr)), ie.push(Cc), Cc; + } else ji && (Qe.set(Gn, ji), Ct.set(Dr, C7(vr))); + } + if (F_(ji, Dr, Le, ai), ji) { + if (Wr.set(Dr, Dt > 0), ji.fileName = Le, ji.path = Dr, ji.resolvedPath = _r(Le), ji.originalFileName = cn, ji.packageJsonLocations = (Gr = hn.packageJsonLocations) != null && Gr.length ? hn.packageJsonLocations : void 0, ji.packageJsonScope = hn.packageJsonScope, Rf( + ji, + rr, + /*checkExisting*/ + !1 + ), yr.useCaseSensitiveFileNames()) { + const Gn = Dy(Dr), ta = $e.get(Gn); + ta ? ml(Le, ta, rr) : $e.set(Gn, ji); + } + Bt = Bt || ji.hasNoDefaultLib && !St, $.noResolve || (hf(ji, Ge), ug(ji)), $.noLib || Hr(ji), ii(ji), Ge ? te.push(ji) : ie.push(ji), (oe ?? (oe = /* @__PURE__ */ new Set())).add(ji.path); + } + return ji; + } + function Rf(Le, Ge, St) { + return Le && (!St || !Ev(Ge) || !oe?.has(Ge.file)) ? (Ee.add(Le.path, Ge), !0) : !1; + } + function F_(Le, Ge, St, rr) { + rr ? (mf(St, rr, Le), mf(St, Ge, Le || !1)) : mf(St, Ge, Le); + } + function mf(Le, Ge, St) { + K.set(Ge, St), St !== void 0 ? Ie.delete(Ge) : Ie.set(Ge, Le); + } + function jf(Le) { + const Ge = fp(Le); + return Ge && th(Ge, Le); + } + function fp(Le) { + if (!(!Ke || !Ke.length || fl(Le) || Bo( + Le, + ".json" + /* Json */ + ))) + return od(Le); + } + function th(Le, Ge) { + const St = Le.commandLine.options.outFile; + return St ? Oh( + St, + ".d.ts" + /* Dts */ + ) : x6(Ge, Le.commandLine, !yr.useCaseSensitiveFileNames()); + } + function od(Le) { + Ye === void 0 && (Ye = /* @__PURE__ */ new Map(), t_((St) => { + _r($.configFilePath) !== St.sourceFile.path && St.commandLine.fileNames.forEach((rr) => Ye.set(_r(rr), St.sourceFile.path)); + })); + const Ge = Ye.get(_r(Le)); + return Ge && cd(Ge); + } + function t_(Le) { + return eU(Ke, Le); + } + function gf(Le) { + if (fl(Le)) + return _t === void 0 && (_t = /* @__PURE__ */ new Map(), t_((Ge) => { + const St = Ge.commandLine.options.outFile; + if (St) { + const rr = Oh( + St, + ".d.ts" + /* Dts */ + ); + _t.set(_r(rr), !0); + } else { + const rr = Iu(() => HS(Ge.commandLine, !yr.useCaseSensitiveFileNames())); + lr(Ge.commandLine.fileNames, (vr) => { + if (!fl(vr) && !Bo( + vr, + ".json" + /* Json */ + )) { + const Gr = x6(vr, Ge.commandLine, !yr.useCaseSensitiveFileNames(), rr); + _t.set(_r(Gr), vr); + } + }); + } + })), _t.get(Le); + } + function y_(Le) { + return yt && !!od(Le); + } + function cd(Le) { + if (Je) + return Je.get(Le) || void 0; + } + function hf(Le, Ge) { + lr(Le.referencedFiles, (St, rr) => { + to( + HW(St.fileName, Le.fileName), + Ge, + /*ignoreNoDefaultLib*/ + !1, + /*packageId*/ + void 0, + { kind: 4, file: Le.path, index: rr } + ); + }); + } + function ug(Le) { + const Ge = Le.typeReferenceDirectives; + if (!Ge.length) return; + const St = Lt?.get(Le.path) || Ms(Ge, Le), rr = g6(); + (bt ?? (bt = /* @__PURE__ */ new Map())).set(Le.path, rr); + for (let vr = 0; vr < Ge.length; vr++) { + const Gr = Le.typeReferenceDirectives[vr], Dr = St[vr], cn = Gr.fileName, ai = X0(Gr, Le); + rr.set(cn, ai, Dr), et(cn, ai, Dr, { kind: 5, file: Le.path, index: vr }); + } + } + function Q(Le) { + var Ge; + return ((Ge = fr(Le)) == null ? void 0 : Ge.commandLine.options) || $; + } + function et(Le, Ge, St, rr) { + var vr, Gr; + (vr = nn) == null || vr.push(nn.Phase.Program, "processTypeReferenceDirective", { directive: Le, hasResolved: !!St.resolvedTypeReferenceDirective, refKind: rr.kind, refPath: Ev(rr) ? rr.file : void 0 }), Rt(Le, Ge, St, rr), (Gr = nn) == null || Gr.pop(); + } + function Rt(Le, Ge, St, rr) { + ut(St); + const { resolvedTypeReferenceDirective: vr } = St; + vr ? (vr.isExternalLibraryImport && Dt++, to( + vr.resolvedFileName, + /*isDefaultLib*/ + !1, + /*ignoreNoDefaultLib*/ + !1, + vr.packageId, + rr + ), vr.isExternalLibraryImport && Dt--) : ja( + /*file*/ + void 0, + rr, + p.Cannot_find_type_definition_file_for_0, + [Le] + ); + } + function jt(Le) { + const Ge = Ae?.get(Le); + if (Ge) return Ge.actual; + const St = Er(Le); + return (Ae ?? (Ae = /* @__PURE__ */ new Map())).set(Le, St), St.actual; + } + function Er(Le) { + var Ge, St, rr, vr, Gr; + const Dr = De?.get(Le); + if (Dr) return Dr; + if (ft !== 0 && J && !xr(Le)) { + const Gn = (Ge = J.resolvedLibReferences) == null ? void 0 : Ge.get(Le); + if (Gn) { + if (Gn.resolution && a1($, yr)) { + const ta = tU(Le), Cc = NO($, di, Le); + Yi( + yr, + Gn.resolution.resolvedModule ? Gn.resolution.resolvedModule.packageId ? p.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : p.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : p.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved, + ta, + Xi(Cc, di), + (St = Gn.resolution.resolvedModule) == null ? void 0 : St.resolvedFileName, + ((rr = Gn.resolution.resolvedModule) == null ? void 0 : rr.packageId) && K1(Gn.resolution.resolvedModule.packageId) + ); + } + return (De ?? (De = /* @__PURE__ */ new Map())).set(Le, Gn), Gn; + } + } + const cn = tU(Le), ai = NO($, di, Le); + (vr = nn) == null || vr.push(nn.Phase.Program, "resolveLibrary", { resolveFrom: ai }), Qo("beforeResolveLibrary"); + const hn = gs(cn, ai, $, Le); + Qo("afterResolveLibrary"), Yf("ResolveLibrary", "beforeResolveLibrary", "afterResolveLibrary"), (Gr = nn) == null || Gr.pop(); + const ji = { + resolution: hn, + actual: hn.resolvedModule ? hn.resolvedModule.resolvedFileName : Ln(pi, Le) + }; + return (De ?? (De = /* @__PURE__ */ new Map())).set(Le, ji), ji; + } + function Hr(Le) { + lr(Le.libReferenceDirectives, (Ge, St) => { + const rr = ove(Ge); + rr ? dl( + jt(rr), + /*isDefaultLib*/ + !0, + /*ignoreNoDefaultLib*/ + !0, + { kind: 7, file: Le.path, index: St } + ) : (xe || (xe = [])).push({ + kind: 0, + reason: { kind: 7, file: Le.path, index: St } + }); + }); + } + function xn(Le) { + return yr.getCanonicalFileName(Le); + } + function ii(Le) { + if (Ft(Le), Le.imports.length || Le.moduleAugmentations.length) { + const Ge = uve(Le), St = Ue?.get(Le.path) || Js(Ge, Le); + E.assert(St.length === Ge.length); + const rr = Q(Le), vr = g6(); + (we ?? (we = /* @__PURE__ */ new Map())).set(Le.path, vr); + for (let Gr = 0; Gr < Ge.length; Gr++) { + const Dr = St[Gr].resolvedModule, cn = Ge[Gr].text, ai = EO(Le, Ge[Gr], rr); + if (vr.set(cn, ai, St[Gr]), Mt(Le, cn, St[Gr], ai), !Dr) + continue; + const hn = Dr.isExternalLibraryImport, ji = !rD(Dr.extension) && !fp(Dr.resolvedFileName), Gn = hn && ji && (!Dr.originalPath || c1(Dr.resolvedFileName)), ta = Dr.resolvedFileName; + hn && Dt++; + const Cc = Gn && Dt > Nr, r_ = ta && !sU(rr, Dr, Le) && !rr.noResolve && Gr < Le.imports.length && !Cc && !(ji && !Zy(rr)) && (an(Le.imports[Gr]) || !(Le.imports[Gr].flags & 16777216)); + Cc ? Qt.set(Le.path, !0) : r_ && Va( + ta, + /*isDefaultLib*/ + !1, + /*ignoreNoDefaultLib*/ + !1, + { kind: 3, file: Le.path, index: Gr }, + Dr.packageId + ), hn && Dt--; + } + } + } + function j(Le, Ge) { + let St = !0; + const rr = yr.getCanonicalFileName(Xi(Ge, di)); + for (const vr of Le) + vr.isDeclarationFile || yr.getCanonicalFileName(Xi(vr.fileName, di)).indexOf(rr) !== 0 && (xa( + vr, + p.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files, + [vr.fileName, Ge] + ), St = !1); + return St; + } + function Ne(Le) { + Je || (Je = /* @__PURE__ */ new Map()); + const Ge = ak(Le), St = _r(Ge), rr = Je.get(St); + if (rr !== void 0) + return rr || void 0; + let vr, Gr; + if (yr.getParsedCommandLine) { + if (vr = yr.getParsedCommandLine(Ge), !vr) { + F_( + /*file*/ + void 0, + St, + Ge, + /*redirectedPath*/ + void 0 + ), Je.set(St, !1); + return; + } + Gr = E.checkDefined(vr.options.configFile), E.assert(!Gr.path || Gr.path === St), F_( + Gr, + St, + Ge, + /*redirectedPath*/ + void 0 + ); + } else { + const cn = Xi(Hn(Ge), di); + if (Gr = yr.getSourceFile( + Ge, + 100 + /* JSON */ + ), F_( + Gr, + St, + Ge, + /*redirectedPath*/ + void 0 + ), Gr === void 0) { + Je.set(St, !1); + return; + } + vr = LN( + Gr, + qn, + cn, + /*existingOptions*/ + void 0, + Ge + ); + } + Gr.fileName = Ge, Gr.path = St, Gr.resolvedPath = St, Gr.originalFileName = Ge; + const Dr = { commandLine: vr, sourceFile: Gr }; + return Je.set(St, Dr), vr.projectReferences && (Dr.references = vr.projectReferences.map(Ne)), Dr; + } + function Tt() { + $.strictPropertyInitialization && !lu($, "strictNullChecks") && xo(p.Option_0_cannot_be_specified_without_specifying_option_1, "strictPropertyInitialization", "strictNullChecks"), $.exactOptionalPropertyTypes && !lu($, "strictNullChecks") && xo(p.Option_0_cannot_be_specified_without_specifying_option_1, "exactOptionalPropertyTypes", "strictNullChecks"), ($.isolatedModules || $.verbatimModuleSyntax) && $.outFile && xo(p.Option_0_cannot_be_specified_with_option_1, "outFile", $.verbatimModuleSyntax ? "verbatimModuleSyntax" : "isolatedModules"), $.isolatedDeclarations && (Zy($) && xo(p.Option_0_cannot_be_specified_with_option_1, "allowJs", "isolatedDeclarations"), N_($) || xo(p.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "isolatedDeclarations", "declaration", "composite")), $.inlineSourceMap && ($.sourceMap && xo(p.Option_0_cannot_be_specified_with_option_1, "sourceMap", "inlineSourceMap"), $.mapRoot && xo(p.Option_0_cannot_be_specified_with_option_1, "mapRoot", "inlineSourceMap")), $.composite && ($.declaration === !1 && xo(p.Composite_projects_may_not_disable_declaration_emit, "declaration"), $.incremental === !1 && xo(p.Composite_projects_may_not_disable_incremental_compilation, "declaration")); + const Le = $.outFile; + if (!$.tsBuildInfoFile && $.incremental && !Le && !$.configFilePath && Xn.add(Ho(p.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified)), Ss(), Ld(), $.composite) { + const Dr = new Set(V.map(_r)); + for (const cn of le) + Rb(cn, fe) && !Dr.has(cn.path) && xa( + cn, + p.File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern, + [cn.fileName, $.configFilePath || ""] + ); + } + if ($.paths) { + for (const Dr in $.paths) + if (ro($.paths, Dr)) + if (dJ(Dr) || Cm( + /*onKey*/ + !0, + Dr, + p.Pattern_0_can_have_at_most_one_Asterisk_character, + Dr + ), os($.paths[Dr])) { + const cn = $.paths[Dr].length; + cn === 0 && Cm( + /*onKey*/ + !1, + Dr, + p.Substitutions_for_pattern_0_shouldn_t_be_an_empty_array, + Dr + ); + for (let ai = 0; ai < cn; ai++) { + const hn = $.paths[Dr][ai], ji = typeof hn; + ji === "string" ? (dJ(hn) || km(Dr, ai, p.Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character, hn, Dr), !$.baseUrl && !lf(hn) && !i4(hn) && km(Dr, ai, p.Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash)) : km(Dr, ai, p.Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2, hn, Dr, ji); + } + } else + Cm( + /*onKey*/ + !1, + Dr, + p.Substitutions_for_pattern_0_should_be_an_array, + Dr + ); + } + !$.sourceMap && !$.inlineSourceMap && ($.inlineSources && xo(p.Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided, "inlineSources"), $.sourceRoot && xo(p.Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided, "sourceRoot")), $.mapRoot && !($.sourceMap || $.declarationMap) && xo(p.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "mapRoot", "sourceMap", "declarationMap"), $.declarationDir && (N_($) || xo(p.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "declarationDir", "declaration", "composite"), Le && xo(p.Option_0_cannot_be_specified_with_option_1, "declarationDir", "outFile")), $.declarationMap && !N_($) && xo(p.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "declarationMap", "declaration", "composite"), $.lib && $.noLib && xo(p.Option_0_cannot_be_specified_with_option_1, "lib", "noLib"); + const Ge = pa($), St = Pn(le, (Dr) => el(Dr) && !Dr.isDeclarationFile); + if ($.isolatedModules || $.verbatimModuleSyntax) + $.module === 0 && Ge < 2 && $.isolatedModules && xo(p.Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher, "isolatedModules", "target"), $.preserveConstEnums === !1 && xo(p.Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled, $.verbatimModuleSyntax ? "verbatimModuleSyntax" : "isolatedModules", "preserveConstEnums"); + else if (St && Ge < 2 && $.module === 0) { + const Dr = dS(St, typeof St.externalModuleIndicator == "boolean" ? St : St.externalModuleIndicator); + Xn.add(ol(St, Dr.start, Dr.length, p.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none)); + } + if (Le && !$.emitDeclarationOnly) { + if ($.module && !($.module === 2 || $.module === 4)) + xo(p.Only_amd_and_system_modules_are_supported_alongside_0, "outFile", "module"); + else if ($.module === void 0 && St) { + const Dr = dS(St, typeof St.externalModuleIndicator == "boolean" ? St : St.externalModuleIndicator); + Xn.add(ol(St, Dr.start, Dr.length, p.Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system, "outFile")); + } + } + if (Ub($) && (Su($) === 1 ? xo(p.Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic, "resolveJsonModule") : N5($) || xo(p.Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd, "resolveJsonModule", "module")), $.outDir || // there is --outDir specified + $.rootDir || // there is --rootDir specified + $.sourceRoot || // there is --sourceRoot specified + $.mapRoot || // there is --mapRoot specified + N_($) && $.declarationDir) { + const Dr = Ot(); + $.outDir && Dr === "" && le.some((cn) => Xm(cn.fileName) > 1) && xo(p.Cannot_find_the_common_subdirectory_path_for_the_input_files, "outDir"); + } + $.checkJs && !Zy($) && xo(p.Option_0_cannot_be_specified_without_specifying_option_1, "checkJs", "allowJs"), $.emitDeclarationOnly && (N_($) || xo(p.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "emitDeclarationOnly", "declaration", "composite")), $.emitDecoratorMetadata && !$.experimentalDecorators && xo(p.Option_0_cannot_be_specified_without_specifying_option_1, "emitDecoratorMetadata", "experimentalDecorators"), $.jsxFactory ? ($.reactNamespace && xo(p.Option_0_cannot_be_specified_with_option_1, "reactNamespace", "jsxFactory"), ($.jsx === 4 || $.jsx === 5) && xo(p.Option_0_cannot_be_specified_when_option_jsx_is_1, "jsxFactory", NN.get("" + $.jsx)), Kx($.jsxFactory, Ge) || yf("jsxFactory", p.Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name, $.jsxFactory)) : $.reactNamespace && !E_($.reactNamespace, Ge) && yf("reactNamespace", p.Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier, $.reactNamespace), $.jsxFragmentFactory && ($.jsxFactory || xo(p.Option_0_cannot_be_specified_without_specifying_option_1, "jsxFragmentFactory", "jsxFactory"), ($.jsx === 4 || $.jsx === 5) && xo(p.Option_0_cannot_be_specified_when_option_jsx_is_1, "jsxFragmentFactory", NN.get("" + $.jsx)), Kx($.jsxFragmentFactory, Ge) || yf("jsxFragmentFactory", p.Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name, $.jsxFragmentFactory)), $.reactNamespace && ($.jsx === 4 || $.jsx === 5) && xo(p.Option_0_cannot_be_specified_when_option_jsx_is_1, "reactNamespace", NN.get("" + $.jsx)), $.jsxImportSource && $.jsx === 2 && xo(p.Option_0_cannot_be_specified_when_option_jsx_is_1, "jsxImportSource", NN.get("" + $.jsx)); + const rr = Ru($); + $.verbatimModuleSyntax && (rr === 2 || rr === 3 || rr === 4) && xo(p.Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System, "verbatimModuleSyntax"), $.allowImportingTsExtensions && !($.noEmit || $.emitDeclarationOnly || $.rewriteRelativeImportExtensions) && yf("allowImportingTsExtensions", p.Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set); + const vr = Su($); + if ($.resolvePackageJsonExports && !HC(vr) && xo(p.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler, "resolvePackageJsonExports"), $.resolvePackageJsonImports && !HC(vr) && xo(p.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler, "resolvePackageJsonImports"), $.customConditions && !HC(vr) && xo(p.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler, "customConditions"), vr === 100 && !X3(rr) && rr !== 200 && yf("moduleResolution", p.Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later, "bundler"), uC[rr] && 100 <= rr && rr <= 199 && !(3 <= vr && vr <= 99)) { + const Dr = uC[rr]; + yf("moduleResolution", p.Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1, Dr, Dr); + } else if (r4[vr] && 3 <= vr && vr <= 99 && !(100 <= rr && rr <= 199)) { + const Dr = r4[vr]; + yf("module", p.Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1, Dr, Dr); + } + if (!$.noEmit && !$.suppressOutputPathCheck) { + const Dr = sc(), cn = /* @__PURE__ */ new Set(); + OW(Dr, (ai) => { + $.emitDeclarationOnly || Gr(ai.jsFilePath, cn), Gr(ai.declarationFilePath, cn); + }); + } + function Gr(Dr, cn) { + if (Dr) { + const ai = _r(Dr); + if (K.has(ai)) { + let ji; + $.configFilePath || (ji = fs( + /*details*/ + void 0, + p.Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig + )), ji = fs(ji, p.Cannot_write_file_0_because_it_would_overwrite_input_file, Dr), $0(Dr, D5(ji)); + } + const hn = yr.useCaseSensitiveFileNames() ? ai : Dy(ai); + cn.has(hn) ? $0(Dr, Ho(p.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files, Dr)) : cn.add(hn); + } + } + } + function Ar() { + const Le = $.ignoreDeprecations; + if (Le) { + if (Le === "5.0") + return new yd(Le); + re(); + } + return yd.zero; + } + function ei(Le, Ge, St, rr) { + const vr = new yd(Le), Gr = new yd(Ge), Dr = new yd(Z || UE), cn = Ar(), ai = Gr.compareTo(Dr) !== 1, hn = !ai && cn.compareTo(vr) === -1; + (ai || hn) && rr((ji, Gn, ta) => { + ai ? Gn === void 0 ? St(ji, Gn, ta, p.Option_0_has_been_removed_Please_remove_it_from_your_configuration, ji) : St(ji, Gn, ta, p.Option_0_1_has_been_removed_Please_remove_it_from_your_configuration, ji, Gn) : Gn === void 0 ? St(ji, Gn, ta, p.Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error, ji, Ge, Le) : St(ji, Gn, ta, p.Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error, ji, Gn, Ge, Le); + }); + } + function Ss() { + function Le(Ge, St, rr, vr, ...Gr) { + if (rr) { + const Dr = fs( + /*details*/ + void 0, + p.Use_0_instead, + rr + ), cn = fs(Dr, vr, ...Gr); + v_( + /*onKey*/ + !St, + Ge, + /*option2*/ + void 0, + cn + ); + } else + v_( + /*onKey*/ + !St, + Ge, + /*option2*/ + void 0, + vr, + ...Gr + ); + } + ei("5.0", "5.5", Le, (Ge) => { + $.target === 0 && Ge("target", "ES3"), $.noImplicitUseStrict && Ge("noImplicitUseStrict"), $.keyofStringsOnly && Ge("keyofStringsOnly"), $.suppressExcessPropertyErrors && Ge("suppressExcessPropertyErrors"), $.suppressImplicitAnyIndexErrors && Ge("suppressImplicitAnyIndexErrors"), $.noStrictGenericChecks && Ge("noStrictGenericChecks"), $.charset && Ge("charset"), $.out && Ge( + "out", + /*value*/ + void 0, + "outFile" + ), $.importsNotUsedAsValues && Ge( + "importsNotUsedAsValues", + /*value*/ + void 0, + "verbatimModuleSyntax" + ), $.preserveValueImports && Ge( + "preserveValueImports", + /*value*/ + void 0, + "verbatimModuleSyntax" + ); + }); + } + function _s(Le, Ge, St) { + function rr(vr, Gr, Dr, cn, ...ai) { + qh(Ge, St, cn, ...ai); + } + ei("5.0", "5.5", rr, (vr) => { + Le.prepend && vr("prepend"); + }); + } + function ps(Le, Ge, St, rr) { + let vr; + const Gr = Le && Ee.get(Le.path); + let Dr, cn, ai = Ev(Ge) ? Ge : void 0, hn, ji, Gn = Le && ke?.get(Le.path), ta; + Gn ? (Gn.fileIncludeReasonDetails ? (vr = new Set(Gr), Gr?.forEach(Bf)) : Gr?.forEach(vf), ji = Gn.redirectInfo) : (Gr?.forEach(vf), ji = Le && TU(Le, Q(Le))), Ge && vf(Ge); + const Cc = vr?.size !== Gr?.length; + ai && vr?.size === 1 && (vr = void 0), vr && Gn && (Gn.details && !Cc ? ta = fs(Gn.details, St, ...rr || He) : Gn.fileIncludeReasonDetails && (Cc ? n_() ? Dr = Pr(Gn.fileIncludeReasonDetails.next.slice(0, Gr.length), Dr[0]) : Dr = [...Gn.fileIncludeReasonDetails.next, Dr[0]] : n_() ? Dr = Gn.fileIncludeReasonDetails.next.slice(0, Gr.length) : hn = Gn.fileIncludeReasonDetails)), ta || (hn || (hn = vr && fs(Dr, p.The_file_is_in_the_program_because_Colon)), ta = fs( + ji ? hn ? [hn, ...ji] : ji : hn, + St, + ...rr || He + )), Le && (Gn ? (!Gn.fileIncludeReasonDetails || !Cc && hn) && (Gn.fileIncludeReasonDetails = hn) : (ke ?? (ke = /* @__PURE__ */ new Map())).set(Le.path, Gn = { fileIncludeReasonDetails: hn, redirectInfo: ji }), !Gn.details && !Cc && (Gn.details = ta.next)); + const r_ = ai && ZD(fe, ai); + return r_ && C6(r_) ? I7(r_.file, r_.pos, r_.end - r_.pos, ta, cn) : D5(ta, cn); + function vf(i_) { + vr?.has(i_) || ((vr ?? (vr = /* @__PURE__ */ new Set())).add(i_), (Dr ?? (Dr = [])).push(CU(fe, i_)), Bf(i_)); + } + function Bf(i_) { + !ai && Ev(i_) ? ai = i_ : ai !== i_ && (cn = Pr(cn, Ro(i_))); + } + function n_() { + var i_; + return ((i_ = Gn.fileIncludeReasonDetails.next) == null ? void 0 : i_.length) !== Gr?.length; + } + } + function ja(Le, Ge, St, rr) { + (xe || (xe = [])).push({ + kind: 1, + file: Le && Le.path, + fileProcessingReason: Ge, + diagnostic: St, + args: rr + }); + } + function xa(Le, Ge, St) { + jr.push({ file: Le, diagnostic: Ge, args: St }); + } + function Ro(Le) { + let Ge = ue?.get(Le); + return Ge === void 0 && (ue ?? (ue = /* @__PURE__ */ new Map())).set(Le, Ge = O_(Le) ?? !1), Ge || void 0; + } + function O_(Le) { + if (Ev(Le)) { + const rr = ZD(fe, Le); + let vr; + switch (Le.kind) { + case 3: + vr = p.File_is_included_via_import_here; + break; + case 4: + vr = p.File_is_included_via_reference_here; + break; + case 5: + vr = p.File_is_included_via_type_library_reference_here; + break; + case 7: + vr = p.File_is_included_via_library_reference_here; + break; + default: + E.assertNever(Le); + } + return C6(rr) ? ol( + rr.file, + rr.pos, + rr.end - rr.pos, + vr + ) : void 0; + } + if (!$.configFile) return; + let Ge, St; + switch (Le.kind) { + case 0: + if (!$.configFile.configFileSpecs) return; + const rr = Xi(V[Le.index], di), vr = xU(fe, rr); + if (vr) { + Ge = j7($.configFile, "files", vr), St = p.File_is_matched_by_files_list_specified_here; + break; + } + const Gr = kU(fe, rr); + if (!Gr || !rs(Gr)) return; + Ge = j7($.configFile, "include", Gr), St = p.File_is_matched_by_include_pattern_specified_here; + break; + case 1: + case 2: + const Dr = E.checkDefined(Ke?.[Le.index]), cn = PO( + _e, + Ke, + (ta, Cc, r_) => ta === Dr ? { sourceFile: Cc?.sourceFile || $.configFile, index: r_ } : void 0 + ); + if (!cn) return; + const { sourceFile: ai, index: hn } = cn, ji = s3(ai, "references", (ta) => Ql(ta.initializer) ? ta.initializer : void 0); + return ji && ji.elements.length > hn ? ep( + ai, + ji.elements[hn], + Le.kind === 2 ? p.File_is_output_from_referenced_project_specified_here : p.File_is_source_from_referenced_project_specified_here + ) : void 0; + case 8: + if (!$.types) return; + Ge = ld("types", Le.typeReference), St = p.File_is_entry_point_of_type_library_specified_here; + break; + case 6: + if (Le.index !== void 0) { + Ge = ld("lib", $.lib[Le.index]), St = p.File_is_library_specified_here; + break; + } + const Gn = A5(pa($)); + Ge = Gn ? pp("target", Gn) : void 0, St = p.File_is_default_library_for_target_specified_here; + break; + default: + E.assertNever(Le); + } + return Ge && ep( + $.configFile, + Ge, + St + ); + } + function Ld() { + const Le = $.suppressOutputPathCheck ? void 0 : Cv($); + PO( + _e, + Ke, + (Ge, St, rr) => { + const vr = (St ? St.commandLine.projectReferences : _e)[rr], Gr = St && St.sourceFile; + if (_s(vr, Gr, rr), !Ge) { + qh(Gr, rr, p.File_0_not_found, vr.path); + return; + } + const Dr = Ge.commandLine.options; + (!Dr.composite || Dr.noEmit) && (St ? St.commandLine.fileNames : V).length && (Dr.composite || qh(Gr, rr, p.Referenced_project_0_must_have_setting_composite_Colon_true, vr.path), Dr.noEmit && qh(Gr, rr, p.Referenced_project_0_may_not_disable_emit, vr.path)), !St && Le && Le === Cv(Dr) && (qh(Gr, rr, p.Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1, Le, vr.path), tr.set(_r(Le), !0)); + } + ); + } + function km(Le, Ge, St, ...rr) { + let vr = !0; + rh((Gr) => { + oa(Gr.initializer) && NC(Gr.initializer, Le, (Dr) => { + const cn = Dr.initializer; + Ql(cn) && cn.elements.length > Ge && (Xn.add(ep($.configFile, cn.elements[Ge], St, ...rr)), vr = !1); + }); + }), vr && nh(St, ...rr); + } + function Cm(Le, Ge, St, ...rr) { + let vr = !0; + rh((Gr) => { + oa(Gr.initializer) && Em( + Gr.initializer, + Le, + Ge, + /*key2*/ + void 0, + St, + ...rr + ) && (vr = !1); + }), vr && nh(St, ...rr); + } + function G0(Le, Ge) { + return NC(_g(), Le, Ge); + } + function rh(Le) { + return G0("paths", Le); + } + function pp(Le, Ge) { + return G0(Le, (St) => ea(St.initializer) && St.initializer.text === Ge ? St.initializer : void 0); + } + function ld(Le, Ge) { + const St = _g(); + return St && nK(St, Le, Ge); + } + function xo(Le, Ge, St, rr) { + v_( + /*onKey*/ + !0, + Ge, + St, + Le, + Ge, + St, + rr + ); + } + function yf(Le, Ge, ...St) { + v_( + /*onKey*/ + !1, + Le, + /*option2*/ + void 0, + Ge, + ...St + ); + } + function qh(Le, Ge, St, ...rr) { + const vr = s3(Le || $.configFile, "references", (Gr) => Ql(Gr.initializer) ? Gr.initializer : void 0); + vr && vr.elements.length > Ge ? Xn.add(ep(Le || $.configFile, vr.elements[Ge], St, ...rr)) : Xn.add(Ho(St, ...rr)); + } + function v_(Le, Ge, St, rr, ...vr) { + const Gr = _g(); + (!Gr || !Em(Gr, Le, Ge, St, rr, ...vr)) && nh(rr, ...vr); + } + function nh(Le, ...Ge) { + const St = Md(); + St ? "messageText" in Le ? Xn.add(Jg($.configFile, St.name, Le)) : Xn.add(ep($.configFile, St.name, Le, ...Ge)) : "messageText" in Le ? Xn.add(D5(Le)) : Xn.add(Ho(Le, ...Ge)); + } + function _g() { + if (qr === void 0) { + const Le = Md(); + qr = Le && jn(Le.initializer, oa) || !1; + } + return qr || void 0; + } + function Md() { + return Bn === void 0 && (Bn = NC( + P4($.configFile), + "compilerOptions", + lo + ) || !1), Bn || void 0; + } + function Em(Le, Ge, St, rr, vr, ...Gr) { + let Dr = !1; + return NC(Le, St, (cn) => { + "messageText" in vr ? Xn.add(Jg($.configFile, Ge ? cn.name : cn.initializer, vr)) : Xn.add(ep($.configFile, Ge ? cn.name : cn.initializer, vr, ...Gr)), Dr = !0; + }, rr), Dr; + } + function $0(Le, Ge) { + tr.set(_r(Le), !0), Xn.add(Ge); + } + function m1(Le) { + if ($.noEmit) + return !1; + const Ge = _r(Le); + if (qt(Ge)) + return !1; + const St = $.outFile; + if (St) + return dp(Ge, St) || dp( + Ge, + $u(St) + ".d.ts" + /* Dts */ + ); + if ($.declarationDir && Zf($.declarationDir, Ge, di, !yr.useCaseSensitiveFileNames())) + return !0; + if ($.outDir) + return Zf($.outDir, Ge, di, !yr.useCaseSensitiveFileNames()); + if (vc(Ge, GC) || fl(Ge)) { + const rr = $u(Ge); + return !!qt( + rr + ".ts" + /* Ts */ + ) || !!qt( + rr + ".tsx" + /* Tsx */ + ); + } + return !1; + } + function dp(Le, Ge) { + return xh(Le, Ge, di, !yr.useCaseSensitiveFileNames()) === 0; + } + function g1() { + return yr.getSymlinkCache ? yr.getSymlinkCache() : (Te || (Te = mJ(di, xn)), le && !Te.hasProcessedResolutions() && Te.setSymlinksFromResolutions(st, Gt, ne), Te); + } + function mp(Le, Ge) { + return EO(Le, Ge, Q(Le)); + } + function Rd(Le, Ge) { + return nve(Le, Ge, Q(Le)); + } + function Hh(Le, Ge) { + return mp(Le, sA(Le, Ge)); + } + function h1(Le) { + return IO(Le, Q(Le)); + } + function ud(Le) { + return GS(Le, Q(Le)); + } + function Rv(Le) { + return KD(Le, Q(Le)); + } + function y1(Le) { + return lve(Le, Q(Le)); + } + function X0(Le, Ge) { + return Le.resolutionMode || h1(Ge); + } + } + function lve(e, t) { + const n = Ru(t); + return 100 <= n && n <= 199 || n === 200 ? !1 : KD(e, t) < 5; + } + function KD(e, t) { + return GS(e, t) ?? Ru(t); + } + function GS(e, t) { + var n, i; + const s = Ru(t); + if (100 <= s && s <= 199) + return e.impliedNodeFormat; + if (e.impliedNodeFormat === 1 && (((n = e.packageJsonScope) == null ? void 0 : n.contents.packageJsonContent.type) === "commonjs" || vc(e.fileName, [ + ".cjs", + ".cts" + /* Cts */ + ]))) + return 1; + if (e.impliedNodeFormat === 99 && (((i = e.packageJsonScope) == null ? void 0 : i.contents.packageJsonContent.type) === "module" || vc(e.fileName, [ + ".mjs", + ".mts" + /* Mts */ + ]))) + return 99; + } + function IO(e, t) { + return fJ(t) ? GS(e, t) : void 0; + } + function Tje(e) { + let t; + const n = e.compilerHost.fileExists, i = e.compilerHost.directoryExists, s = e.compilerHost.getDirectories, o = e.compilerHost.realpath; + if (!e.useSourceOfProjectReferenceRedirect) return { onProgramCreateComplete: Ja, fileExists: u }; + e.compilerHost.fileExists = u; + let c; + return i && (c = e.compilerHost.directoryExists = (T) => i.call(e.compilerHost, T) ? (h(T), !0) : e.getResolvedProjectReferences() ? (t || (t = /* @__PURE__ */ new Set(), e.forEachResolvedProjectReference((C) => { + const D = C.commandLine.options.outFile; + if (D) + t.add(Hn(e.toPath(D))); + else { + const w = C.commandLine.options.declarationDir || C.commandLine.options.outDir; + w && t.add(e.toPath(w)); + } + })), S( + T, + /*isFile*/ + !1 + )) : !1), s && (e.compilerHost.getDirectories = (T) => !e.getResolvedProjectReferences() || i && i.call(e.compilerHost, T) ? s.call(e.compilerHost, T) : []), o && (e.compilerHost.realpath = (T) => { + var C; + return ((C = e.getSymlinkCache().getSymlinkedFiles()) == null ? void 0 : C.get(e.toPath(T))) || o.call(e.compilerHost, T); + }), { onProgramCreateComplete: _, fileExists: u, directoryExists: c }; + function _() { + e.compilerHost.fileExists = n, e.compilerHost.directoryExists = i, e.compilerHost.getDirectories = s; + } + function u(T) { + return n.call(e.compilerHost, T) ? !0 : !e.getResolvedProjectReferences() || !fl(T) ? !1 : S( + T, + /*isFile*/ + !0 + ); + } + function m(T) { + const C = e.getSourceOfProjectReferenceRedirect(e.toPath(T)); + return C !== void 0 ? rs(C) ? n.call(e.compilerHost, C) : !0 : void 0; + } + function g(T) { + const C = e.toPath(T), D = `${C}${jo}`; + return jg( + t, + (w) => C === w || // Any parent directory of declaration dir + Vi(w, D) || // Any directory inside declaration dir + Vi(C, `${w}/`) + ); + } + function h(T) { + var C; + if (!e.getResolvedProjectReferences() || cD(T) || !o || !T.includes(Kg)) return; + const D = e.getSymlinkCache(), w = il(e.toPath(T)); + if ((C = D.getSymlinkedDirectories()) != null && C.has(w)) return; + const A = Hs(o.call(e.compilerHost, T)); + let O; + if (A === T || (O = il(e.toPath(A))) === w) { + D.setSymlinkedDirectory(w, !1); + return; + } + D.setSymlinkedDirectory(T, { + real: il(A), + realPath: O + }); + } + function S(T, C) { + var D; + const w = C ? (W) => m(W) : (W) => g(W), A = w(T); + if (A !== void 0) return A; + const O = e.getSymlinkCache(), F = O.getSymlinkedDirectories(); + if (!F) return !1; + const R = e.toPath(T); + return R.includes(Kg) ? C && ((D = O.getSymlinkedFiles()) != null && D.has(R)) ? !0 : _P( + F.entries(), + ([W, V]) => { + if (!V || !Vi(R, W)) return; + const $ = w(R.replace(W, V.realPath)); + if (C && $) { + const U = Xi(T, e.compilerHost.getCurrentDirectory()); + O.setSymlinkedFile( + R, + `${V.real}${U.replace(new RegExp(W, "i"), "")}` + ); + } + return $; + } + ) || !1 : !1; + } + } + var nU = { diagnostics: He, sourceMaps: void 0, emittedFiles: void 0, emitSkipped: !0 }; + function iU(e, t, n, i) { + const s = e.getCompilerOptions(); + if (s.noEmit) + return t ? nU : e.emitBuildInfo(n, i); + if (!s.noEmitOnError) return; + let o = [ + ...e.getOptionsDiagnostics(i), + ...e.getSyntacticDiagnostics(t, i), + ...e.getGlobalDiagnostics(i), + ...e.getSemanticDiagnostics(t, i) + ]; + if (o.length === 0 && N_(e.getCompilerOptions()) && (o = e.getDeclarationDiagnostics( + /*sourceFile*/ + void 0, + i + )), !o.length) return; + let c; + if (!t) { + const _ = e.emitBuildInfo(n, i); + _.diagnostics && (o = [...o, ..._.diagnostics]), c = _.emittedFiles; + } + return { diagnostics: o, sourceMaps: void 0, emittedFiles: c, emitSkipped: !0 }; + } + function FO(e, t) { + return kn(e, (n) => !n.skippedOn || !t[n.skippedOn]); + } + function OO(e, t = e) { + return { + fileExists: (n) => t.fileExists(n), + readDirectory(n, i, s, o, c) { + return E.assertIsDefined(t.readDirectory, "'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'"), t.readDirectory(n, i, s, o, c); + }, + readFile: (n) => t.readFile(n), + directoryExists: Is(t, t.directoryExists), + getDirectories: Is(t, t.getDirectories), + realpath: Is(t, t.realpath), + useCaseSensitiveFileNames: e.useCaseSensitiveFileNames(), + getCurrentDirectory: () => e.getCurrentDirectory(), + onUnRecoverableConfigFileDiagnostic: e.onUnRecoverableConfigFileDiagnostic || vb, + trace: e.trace ? (n) => e.trace(n) : void 0 + }; + } + function ak(e) { + return OU(e.path); + } + function sU(e, { extension: t }, { isDeclarationFile: n }) { + switch (t) { + case ".ts": + case ".d.ts": + case ".mts": + case ".d.mts": + case ".cts": + case ".d.cts": + return; + case ".tsx": + return i(); + case ".jsx": + return i() || s(); + case ".js": + case ".mjs": + case ".cjs": + return s(); + case ".json": + return o(); + default: + return c(); + } + function i() { + return e.jsx ? void 0 : p.Module_0_was_resolved_to_1_but_jsx_is_not_set; + } + function s() { + return Zy(e) || !lu(e, "noImplicitAny") ? void 0 : p.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type; + } + function o() { + return Ub(e) ? void 0 : p.Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used; + } + function c() { + return n || e.allowArbitraryExtensions ? void 0 : p.Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set; + } + } + function uve({ imports: e, moduleAugmentations: t }) { + const n = e.map((i) => i); + for (const i of t) + i.kind === 11 && n.push(i); + return n; + } + function sA({ imports: e, moduleAugmentations: t }, n) { + if (n < e.length) return e[n]; + let i = e.length; + for (const s of t) + if (s.kind === 11) { + if (n === i) return s; + i++; + } + E.fail("should never ask for module name at index higher than possible module name"); + } + function yie(e, t, n, i, s, o) { + const c = [], { emitSkipped: _, diagnostics: u } = e.emit(t, m, i, n, s, o); + return { outputFiles: c, emitSkipped: _, diagnostics: u }; + function m(g, h, S) { + c.push({ name: g, writeByteOrderMark: S, text: h }); + } + } + var vie = /* @__PURE__ */ ((e) => (e[e.ComputedDts = 0] = "ComputedDts", e[e.StoredSignatureAtEmit = 1] = "StoredSignatureAtEmit", e[e.UsedVersion = 2] = "UsedVersion", e))(vie || {}), Id; + ((e) => { + function t() { + function Z(J, re, te) { + const ie = { + getKeys: (le) => re.get(le), + getValues: (le) => J.get(le), + keys: () => J.keys(), + size: () => J.size, + deleteKey: (le) => { + (te || (te = /* @__PURE__ */ new Set())).add(le); + const Te = J.get(le); + return Te ? (Te.forEach((q) => i(re, q, le)), J.delete(le), !0) : !1; + }, + set: (le, Te) => { + te?.delete(le); + const q = J.get(le); + return J.set(le, Te), q?.forEach((me) => { + Te.has(me) || i(re, me, le); + }), Te.forEach((me) => { + q?.has(me) || n(re, me, le); + }), ie; + } + }; + return ie; + } + return Z( + /* @__PURE__ */ new Map(), + /* @__PURE__ */ new Map(), + /*deleted*/ + void 0 + ); + } + e.createManyToManyPathMap = t; + function n(Z, J, re) { + let te = Z.get(J); + te || (te = /* @__PURE__ */ new Set(), Z.set(J, te)), te.add(re); + } + function i(Z, J, re) { + const te = Z.get(J); + return te?.delete(re) ? (te.size || Z.delete(J), !0) : !1; + } + function s(Z) { + return Li(Z.declarations, (J) => { + var re; + return (re = Cr(J)) == null ? void 0 : re.resolvedPath; + }); + } + function o(Z, J) { + const re = Z.getSymbolAtLocation(J); + return re && s(re); + } + function c(Z, J, re, te) { + return oo(Z.getProjectReferenceRedirect(J) || J, re, te); + } + function _(Z, J, re) { + let te; + if (J.imports && J.imports.length > 0) { + const q = Z.getTypeChecker(); + for (const me of J.imports) { + const Ce = o(q, me); + Ce?.forEach(Te); + } + } + const ie = Hn(J.resolvedPath); + if (J.referencedFiles && J.referencedFiles.length > 0) + for (const q of J.referencedFiles) { + const me = c(Z, q.fileName, ie, re); + Te(me); + } + if (Z.forEachResolvedTypeReferenceDirective(({ resolvedTypeReferenceDirective: q }) => { + if (!q) + return; + const me = q.resolvedFileName, Ce = c(Z, me, ie, re); + Te(Ce); + }, J), J.moduleAugmentations.length) { + const q = Z.getTypeChecker(); + for (const me of J.moduleAugmentations) { + if (!ea(me)) continue; + const Ce = q.getSymbolAtLocation(me); + Ce && le(Ce); + } + } + for (const q of Z.getTypeChecker().getAmbientModules()) + q.declarations && q.declarations.length > 1 && le(q); + return te; + function le(q) { + if (q.declarations) + for (const me of q.declarations) { + const Ce = Cr(me); + Ce && Ce !== J && Te(Ce.resolvedPath); + } + } + function Te(q) { + (te || (te = /* @__PURE__ */ new Set())).add(q); + } + } + function u(Z, J) { + return J && !J.referencedMap == !Z; + } + e.canReuseOldState = u; + function m(Z) { + return Z.module !== 0 && !Z.outFile ? t() : void 0; + } + e.createReferencedMap = m; + function g(Z, J, re) { + var te, ie; + const le = /* @__PURE__ */ new Map(), Te = Z.getCompilerOptions(), q = m(Te), me = u(q, J); + Z.getTypeChecker(); + for (const Ce of Z.getSourceFiles()) { + const Ee = E.checkDefined(Ce.version, "Program intended to be used with Builder should have source files with versions set"), oe = me ? (te = J.oldSignatures) == null ? void 0 : te.get(Ce.resolvedPath) : void 0, ke = oe === void 0 ? me ? (ie = J.fileInfos.get(Ce.resolvedPath)) == null ? void 0 : ie.signature : void 0 : oe || void 0; + if (q) { + const ue = _(Z, Ce, Z.getCanonicalFileName); + ue && q.set(Ce.resolvedPath, ue); + } + le.set(Ce.resolvedPath, { + version: Ee, + signature: ke, + // No need to calculate affectsGlobalScope with --out since its not used at all + affectsGlobalScope: Te.outFile ? void 0 : V(Ce) || void 0, + impliedFormat: Ce.impliedNodeFormat + }); + } + return { + fileInfos: le, + referencedMap: q, + useFileVersionAsSignature: !re && !me + }; + } + e.create = g; + function h(Z) { + Z.allFilesExcludingDefaultLibraryFile = void 0, Z.allFileNames = void 0; + } + e.releaseCache = h; + function S(Z, J, re, te, ie) { + var le; + const Te = T( + Z, + J, + re, + te, + ie + ); + return (le = Z.oldSignatures) == null || le.clear(), Te; + } + e.getFilesAffectedBy = S; + function T(Z, J, re, te, ie) { + const le = J.getSourceFileByPath(re); + return le ? w(Z, J, le, te, ie) ? (Z.referencedMap ? _e : U)(Z, J, le, te, ie) : [le] : He; + } + e.getFilesAffectedByWithOldState = T; + function C(Z, J, re) { + Z.fileInfos.get(re).signature = J, (Z.hasCalledUpdateShapeSignature || (Z.hasCalledUpdateShapeSignature = /* @__PURE__ */ new Set())).add(re); + } + e.updateSignatureOfFile = C; + function D(Z, J, re, te, ie) { + Z.emit( + J, + (le, Te, q, me, Ce, Ee) => { + E.assert(fl(le), `File extension for signature expected to be dts: Got:: ${le}`), ie( + cU( + Z, + J, + Te, + te, + Ee + ), + Ce + ); + }, + re, + 2, + /*customTransformers*/ + void 0, + /*forceDtsEmit*/ + !0 + ); + } + e.computeDtsSignature = D; + function w(Z, J, re, te, ie, le = Z.useFileVersionAsSignature) { + var Te; + if ((Te = Z.hasCalledUpdateShapeSignature) != null && Te.has(re.resolvedPath)) return !1; + const q = Z.fileInfos.get(re.resolvedPath), me = q.signature; + let Ce; + return !re.isDeclarationFile && !le && D(J, re, te, ie, (Ee) => { + Ce = Ee, ie.storeSignatureInfo && (Z.signatureInfo ?? (Z.signatureInfo = /* @__PURE__ */ new Map())).set( + re.resolvedPath, + 0 + /* ComputedDts */ + ); + }), Ce === void 0 && (Ce = re.version, ie.storeSignatureInfo && (Z.signatureInfo ?? (Z.signatureInfo = /* @__PURE__ */ new Map())).set( + re.resolvedPath, + 2 + /* UsedVersion */ + )), (Z.oldSignatures || (Z.oldSignatures = /* @__PURE__ */ new Map())).set(re.resolvedPath, me || !1), (Z.hasCalledUpdateShapeSignature || (Z.hasCalledUpdateShapeSignature = /* @__PURE__ */ new Set())).add(re.resolvedPath), q.signature = Ce, Ce !== me; + } + e.updateShapeSignature = w; + function A(Z, J, re) { + if (J.getCompilerOptions().outFile || !Z.referencedMap || V(re)) + return O(Z, J); + const ie = /* @__PURE__ */ new Set(), le = [re.resolvedPath]; + for (; le.length; ) { + const Te = le.pop(); + if (!ie.has(Te)) { + ie.add(Te); + const q = Z.referencedMap.getValues(Te); + if (q) + for (const me of q.keys()) + le.push(me); + } + } + return Ki(Ty(ie.keys(), (Te) => { + var q; + return ((q = J.getSourceFileByPath(Te)) == null ? void 0 : q.fileName) ?? Te; + })); + } + e.getAllDependencies = A; + function O(Z, J) { + if (!Z.allFileNames) { + const re = J.getSourceFiles(); + Z.allFileNames = re === He ? He : re.map((te) => te.fileName); + } + return Z.allFileNames; + } + function F(Z, J) { + const re = Z.referencedMap.getKeys(J); + return re ? Ki(re.keys()) : []; + } + e.getReferencedByPaths = F; + function R(Z) { + for (const J of Z.statements) + if (!P7(J)) + return !1; + return !0; + } + function W(Z) { + return at(Z.moduleAugmentations, (J) => eg(J.parent)); + } + function V(Z) { + return W(Z) || !$_(Z) && !tp(Z) && !R(Z); + } + function $(Z, J, re) { + if (Z.allFilesExcludingDefaultLibraryFile) + return Z.allFilesExcludingDefaultLibraryFile; + let te; + re && ie(re); + for (const le of J.getSourceFiles()) + le !== re && ie(le); + return Z.allFilesExcludingDefaultLibraryFile = te || He, Z.allFilesExcludingDefaultLibraryFile; + function ie(le) { + J.isSourceFileDefaultLibrary(le) || (te || (te = [])).push(le); + } + } + e.getAllFilesExcludingDefaultLibraryFile = $; + function U(Z, J, re) { + const te = J.getCompilerOptions(); + return te && te.outFile ? [re] : $(Z, J, re); + } + function _e(Z, J, re, te, ie) { + if (V(re)) + return $(Z, J, re); + const le = J.getCompilerOptions(); + if (le && (Mp(le) || le.outFile)) + return [re]; + const Te = /* @__PURE__ */ new Map(); + Te.set(re.resolvedPath, re); + const q = F(Z, re.resolvedPath); + for (; q.length > 0; ) { + const me = q.pop(); + if (!Te.has(me)) { + const Ce = J.getSourceFileByPath(me); + Te.set(me, Ce), Ce && w(Z, J, Ce, te, ie) && q.push(...F(Z, Ce.resolvedPath)); + } + } + return Ki(Ty(Te.values(), (me) => me)); + } + })(Id || (Id = {})); + var bie = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Js = 1] = "Js", e[e.JsMap = 2] = "JsMap", e[e.JsInlineMap = 4] = "JsInlineMap", e[e.DtsErrors = 8] = "DtsErrors", e[e.DtsEmit = 16] = "DtsEmit", e[e.DtsMap = 32] = "DtsMap", e[e.Dts = 24] = "Dts", e[e.AllJs = 7] = "AllJs", e[e.AllDtsEmit = 48] = "AllDtsEmit", e[e.AllDts = 56] = "AllDts", e[e.All = 63] = "All", e))(bie || {}); + function E6(e) { + return e.program !== void 0; + } + function xje(e) { + return E.assert(E6(e)), e; + } + function _1(e) { + let t = 1; + return e.sourceMap && (t = t | 2), e.inlineSourceMap && (t = t | 4), N_(e) && (t = t | 24), e.declarationMap && (t = t | 32), e.emitDeclarationOnly && (t = t & 56), t; + } + function LO(e, t) { + const n = t && (Ey(t) ? t : _1(t)), i = Ey(e) ? e : _1(e); + if (n === i) return 0; + if (!n || !i) return i; + const s = n ^ i; + let o = 0; + return s & 7 && (o = i & 7), s & 8 && (o = o | i & 8), s & 48 && (o = o | i & 48), o; + } + function kje(e, t) { + return e === t || e !== void 0 && t !== void 0 && e.size === t.size && !jg(e, (n) => !t.has(n)); + } + function Cje(e, t) { + var n, i; + const s = Id.create( + e, + t, + /*disableUseFileVersionAsSignature*/ + !1 + ); + s.program = e; + const o = e.getCompilerOptions(); + s.compilerOptions = o; + const c = o.outFile; + s.semanticDiagnosticsPerFile = /* @__PURE__ */ new Map(), c && o.composite && t?.outSignature && c === t.compilerOptions.outFile && (s.outSignature = t.outSignature && _ve(o, t.compilerOptions, t.outSignature)), s.changedFilesSet = /* @__PURE__ */ new Set(), s.latestChangedDtsFile = o.composite ? t?.latestChangedDtsFile : void 0, s.checkPending = s.compilerOptions.noCheck ? !0 : void 0; + const _ = Id.canReuseOldState(s.referencedMap, t), u = _ ? t.compilerOptions : void 0; + let m = _ && !pee(o, u); + const g = o.composite && t?.emitSignatures && !c && !mee(o, t.compilerOptions); + let h = !0; + _ ? ((n = t.changedFilesSet) == null || n.forEach((A) => s.changedFilesSet.add(A)), !c && ((i = t.affectedFilesPendingEmit) != null && i.size) && (s.affectedFilesPendingEmit = new Map(t.affectedFilesPendingEmit), s.seenAffectedFiles = /* @__PURE__ */ new Set()), s.programEmitPending = t.programEmitPending, c && s.changedFilesSet.size && (m = !1, h = !1), s.hasErrorsFromOldState = t.hasErrors) : s.buildInfoEmitPending = Vb(o); + const S = s.referencedMap, T = _ ? t.referencedMap : void 0, C = m && !o.skipLibCheck == !u.skipLibCheck, D = C && !o.skipDefaultLibCheck == !u.skipDefaultLibCheck; + if (s.fileInfos.forEach((A, O) => { + var F; + let R, W; + if (!_ || // File wasn't present in old state + !(R = t.fileInfos.get(O)) || // versions dont match + R.version !== A.version || // Implied formats dont match + R.impliedFormat !== A.impliedFormat || // Referenced files changed + !kje(W = S && S.getValues(O), T && T.getValues(O)) || // Referenced file was deleted in the new program + W && jg(W, (V) => !s.fileInfos.has(V) && t.fileInfos.has(V))) + w(O); + else { + const V = e.getSourceFileByPath(O), $ = h ? (F = t.emitDiagnosticsPerFile) == null ? void 0 : F.get(O) : void 0; + if ($ && (s.emitDiagnosticsPerFile ?? (s.emitDiagnosticsPerFile = /* @__PURE__ */ new Map())).set( + O, + t.hasReusableDiagnostic ? pve($, O, e) : fve($, e) + ), m) { + if (V.isDeclarationFile && !C || V.hasNoDefaultLib && !D) return; + const U = t.semanticDiagnosticsPerFile.get(O); + U && (s.semanticDiagnosticsPerFile.set( + O, + t.hasReusableDiagnostic ? pve(U, O, e) : fve(U, e) + ), (s.semanticDiagnosticsFromOldState ?? (s.semanticDiagnosticsFromOldState = /* @__PURE__ */ new Set())).add(O)); + } + } + if (g) { + const V = t.emitSignatures.get(O); + V && (s.emitSignatures ?? (s.emitSignatures = /* @__PURE__ */ new Map())).set(O, _ve(o, t.compilerOptions, V)); + } + }), _ && al(t.fileInfos, (A, O) => s.fileInfos.has(O) ? !1 : A.affectsGlobalScope ? !0 : (s.buildInfoEmitPending = !0, !!c))) + Id.getAllFilesExcludingDefaultLibraryFile( + s, + e, + /*firstSourceFile*/ + void 0 + ).forEach((A) => w(A.resolvedPath)); + else if (u) { + const A = dee(o, u) ? _1(o) : LO(o, u); + A !== 0 && (c ? s.changedFilesSet.size || (s.programEmitPending = s.programEmitPending ? s.programEmitPending | A : A) : (e.getSourceFiles().forEach((O) => { + s.changedFilesSet.has(O.resolvedPath) || uU( + s, + O.resolvedPath, + A + ); + }), E.assert(!s.seenAffectedFiles || !s.seenAffectedFiles.size), s.seenAffectedFiles = s.seenAffectedFiles || /* @__PURE__ */ new Set()), s.buildInfoEmitPending = !0); + } + return _ && s.semanticDiagnosticsPerFile.size !== s.fileInfos.size && t.checkPending !== s.checkPending && (s.buildInfoEmitPending = !0), s; + function w(A) { + s.changedFilesSet.add(A), c && (m = !1, h = !1, s.semanticDiagnosticsFromOldState = void 0, s.semanticDiagnosticsPerFile.clear(), s.emitDiagnosticsPerFile = void 0), s.buildInfoEmitPending = !0, s.programEmitPending = void 0; + } + } + function _ve(e, t, n) { + return !!e.declarationMap == !!t.declarationMap ? ( + // Use same format of signature + n + ) : ( + // Convert to different format + rs(n) ? [n] : n[0] + ); + } + function fve(e, t) { + return e.length ? Wc(e, (n) => { + if (rs(n.messageText)) return n; + const i = Sie(n.messageText, n.file, t, (s) => { + var o; + return (o = s.repopulateInfo) == null ? void 0 : o.call(s); + }); + return i === n.messageText ? n : { ...n, messageText: i }; + }) : e; + } + function Sie(e, t, n, i) { + const s = i(e); + if (s === !0) + return { + ...qj(t), + next: Tie(e.next, t, n, i) + }; + if (s) + return { + ...k7(t, n, s.moduleReference, s.mode, s.packageName || s.moduleReference), + next: Tie(e.next, t, n, i) + }; + const o = Tie(e.next, t, n, i); + return o === e.next ? e : { ...e, next: o }; + } + function Tie(e, t, n, i) { + return Wc(e, (s) => Sie(s, t, n, i)); + } + function pve(e, t, n) { + if (!e.length) return He; + let i; + return e.map((o) => { + const c = dve(o, t, n, s); + c.reportsUnnecessary = o.reportsUnnecessary, c.reportsDeprecated = o.reportDeprecated, c.source = o.source, c.skippedOn = o.skippedOn; + const { relatedInformation: _ } = o; + return c.relatedInformation = _ ? _.length ? _.map((u) => dve(u, t, n, s)) : [] : void 0, c; + }); + function s(o) { + return i ?? (i = Hn(Xi(Cv(n.getCompilerOptions()), n.getCurrentDirectory()))), oo(o, i, n.getCanonicalFileName); + } + } + function dve(e, t, n, i) { + const { file: s } = e, o = s !== !1 ? n.getSourceFileByPath(s ? i(s) : t) : void 0; + return { + ...e, + file: o, + messageText: rs(e.messageText) ? e.messageText : Sie(e.messageText, o, n, (c) => c.info) + }; + } + function Eje(e) { + Id.releaseCache(e), e.program = void 0; + } + function xie(e, t) { + E.assert(!t || !e.affectedFiles || e.affectedFiles[e.affectedFilesIndex - 1] !== t || !e.semanticDiagnosticsPerFile.has(t.resolvedPath)); + } + function mve(e, t, n) { + for (var i; ; ) { + const { affectedFiles: s } = e; + if (s) { + const _ = e.seenAffectedFiles; + let u = e.affectedFilesIndex; + for (; u < s.length; ) { + const m = s[u]; + if (!_.has(m.resolvedPath)) + return e.affectedFilesIndex = u, uU( + e, + m.resolvedPath, + _1(e.compilerOptions) + ), Pje( + e, + m, + t, + n + ), m; + u++; + } + e.changedFilesSet.delete(e.currentChangedFilePath), e.currentChangedFilePath = void 0, (i = e.oldSignatures) == null || i.clear(), e.affectedFiles = void 0; + } + const o = e.changedFilesSet.keys().next(); + if (o.done) + return; + if (e.program.getCompilerOptions().outFile) return e.program; + e.affectedFiles = Id.getFilesAffectedByWithOldState( + e, + e.program, + o.value, + t, + n + ), e.currentChangedFilePath = o.value, e.affectedFilesIndex = 0, e.seenAffectedFiles || (e.seenAffectedFiles = /* @__PURE__ */ new Set()); + } + } + function gve(e, t, n) { + var i, s; + if (!(!((i = e.affectedFilesPendingEmit) != null && i.size) && !e.programEmitPending) && (!t && !n && (e.affectedFilesPendingEmit = void 0, e.programEmitPending = void 0), (s = e.affectedFilesPendingEmit) == null || s.forEach((o, c) => { + const _ = n ? o & 55 : o & 7; + _ ? e.affectedFilesPendingEmit.set(c, _) : e.affectedFilesPendingEmit.delete(c); + }), e.programEmitPending)) { + const o = n ? e.programEmitPending & 55 : e.programEmitPending & 7; + o ? e.programEmitPending = o : e.programEmitPending = void 0; + } + } + function MO(e, t, n, i) { + let s = LO(e, t); + return n && (s = s & 56), i && (s = s & 8), s; + } + function aU(e) { + return e ? 8 : 56; + } + function Dje(e, t, n) { + var i; + if ((i = e.affectedFilesPendingEmit) != null && i.size) + return al(e.affectedFilesPendingEmit, (s, o) => { + var c; + const _ = e.program.getSourceFileByPath(o); + if (!_ || !Rb(_, e.program)) { + e.affectedFilesPendingEmit.delete(o); + return; + } + const u = (c = e.seenEmittedFiles) == null ? void 0 : c.get(_.resolvedPath), m = MO( + s, + u, + t, + n + ); + if (m) return { affectedFile: _, emitKind: m }; + }); + } + function wje(e, t) { + var n; + if ((n = e.emitDiagnosticsPerFile) != null && n.size) + return al(e.emitDiagnosticsPerFile, (i, s) => { + var o; + const c = e.program.getSourceFileByPath(s); + if (!c || !Rb(c, e.program)) { + e.emitDiagnosticsPerFile.delete(s); + return; + } + const _ = ((o = e.seenEmittedFiles) == null ? void 0 : o.get(c.resolvedPath)) || 0; + if (!(_ & aU(t))) return { affectedFile: c, diagnostics: i, seenKind: _ }; + }); + } + function hve(e) { + if (!e.cleanedDiagnosticsOfLibFiles) { + e.cleanedDiagnosticsOfLibFiles = !0; + const t = e.program.getCompilerOptions(); + lr(e.program.getSourceFiles(), (n) => e.program.isSourceFileDefaultLibrary(n) && !Eee(n, t, e.program) && Cie(e, n.resolvedPath)); + } + } + function Pje(e, t, n, i) { + if (Cie(e, t.resolvedPath), e.allFilesExcludingDefaultLibraryFile === e.affectedFiles) { + hve(e), Id.updateShapeSignature( + e, + e.program, + t, + n, + i + ); + return; + } + e.compilerOptions.assumeChangesOnlyAffectDirectDependencies || Nje( + e, + t, + n, + i + ); + } + function kie(e, t, n, i, s) { + if (Cie(e, t), !e.changedFilesSet.has(t)) { + const o = e.program.getSourceFileByPath(t); + o && (Id.updateShapeSignature( + e, + e.program, + o, + i, + s, + /*useFileVersionAsSignature*/ + !0 + ), n ? uU( + e, + t, + _1(e.compilerOptions) + ) : N_(e.compilerOptions) && uU( + e, + t, + e.compilerOptions.declarationMap ? 56 : 24 + /* Dts */ + )); + } + } + function Cie(e, t) { + return e.semanticDiagnosticsFromOldState ? (e.semanticDiagnosticsFromOldState.delete(t), e.semanticDiagnosticsPerFile.delete(t), !e.semanticDiagnosticsFromOldState.size) : !0; + } + function yve(e, t) { + const n = E.checkDefined(e.oldSignatures).get(t) || void 0; + return E.checkDefined(e.fileInfos.get(t)).signature !== n; + } + function Eie(e, t, n, i, s) { + var o; + return (o = e.fileInfos.get(t)) != null && o.affectsGlobalScope ? (Id.getAllFilesExcludingDefaultLibraryFile( + e, + e.program, + /*firstSourceFile*/ + void 0 + ).forEach( + (c) => kie( + e, + c.resolvedPath, + n, + i, + s + ) + ), hve(e), !0) : !1; + } + function Nje(e, t, n, i) { + var s, o; + if (!e.referencedMap || !e.changedFilesSet.has(t.resolvedPath) || !yve(e, t.resolvedPath)) return; + if (Mp(e.compilerOptions)) { + const u = /* @__PURE__ */ new Map(); + u.set(t.resolvedPath, !0); + const m = Id.getReferencedByPaths(e, t.resolvedPath); + for (; m.length > 0; ) { + const g = m.pop(); + if (!u.has(g)) { + if (u.set(g, !0), Eie( + e, + g, + /*invalidateJsFiles*/ + !1, + n, + i + )) return; + if (kie( + e, + g, + /*invalidateJsFiles*/ + !1, + n, + i + ), yve(e, g)) { + const h = e.program.getSourceFileByPath(g); + m.push(...Id.getReferencedByPaths(e, h.resolvedPath)); + } + } + } + } + const c = /* @__PURE__ */ new Set(), _ = !!((s = t.symbol) != null && s.exports) && !!al( + t.symbol.exports, + (u) => { + if (u.flags & 128) return !0; + const m = Gl(u, e.program.getTypeChecker()); + return m === u ? !1 : (m.flags & 128) !== 0 && at(m.declarations, (g) => Cr(g) === t); + } + ); + (o = e.referencedMap.getKeys(t.resolvedPath)) == null || o.forEach((u) => { + if (Eie(e, u, _, n, i)) return !0; + const m = e.referencedMap.getKeys(u); + return m && jg(m, (g) => vve( + e, + g, + _, + c, + n, + i + )); + }); + } + function vve(e, t, n, i, s, o) { + var c; + if (S0(i, t)) { + if (Eie(e, t, n, s, o)) return !0; + kie(e, t, n, s, o), (c = e.referencedMap.getKeys(t)) == null || c.forEach( + (_) => vve( + e, + _, + n, + i, + s, + o + ) + ); + } + } + function oU(e, t, n, i) { + return e.compilerOptions.noCheck ? He : Wi( + Aje(e, t, n, i), + e.program.getProgramDiagnostics(t) + ); + } + function Aje(e, t, n, i) { + i ?? (i = e.semanticDiagnosticsPerFile); + const s = t.resolvedPath, o = i.get(s); + if (o) + return FO(o, e.compilerOptions); + const c = e.program.getBindAndCheckDiagnostics(t, n); + return i.set(s, c), e.buildInfoEmitPending = !0, FO(c, e.compilerOptions); + } + function Die(e) { + var t; + return !!((t = e.options) != null && t.outFile); + } + function aA(e) { + return !!e.fileNames; + } + function Ije(e) { + return !aA(e) && !!e.root; + } + function bve(e) { + e.hasErrors === void 0 && (Vb(e.compilerOptions) ? e.hasErrors = !at(e.program.getSourceFiles(), (t) => { + var n, i; + const s = e.semanticDiagnosticsPerFile.get(t.resolvedPath); + return s === void 0 || // Missing semantic diagnostics in cache will be encoded in buildInfo + !!s.length || // cached semantic diagnostics will be encoded in buildInfo + !!((i = (n = e.emitDiagnosticsPerFile) == null ? void 0 : n.get(t.resolvedPath)) != null && i.length); + }) && (Sve(e) || at(e.program.getSourceFiles(), (t) => !!e.program.getProgramDiagnostics(t).length)) : e.hasErrors = at(e.program.getSourceFiles(), (t) => { + var n, i; + const s = e.semanticDiagnosticsPerFile.get(t.resolvedPath); + return !!s?.length || // If has semantic diagnostics + !!((i = (n = e.emitDiagnosticsPerFile) == null ? void 0 : n.get(t.resolvedPath)) != null && i.length); + }) || Sve(e)); + } + function Sve(e) { + return !!e.program.getConfigFileParsingDiagnostics().length || !!e.program.getSyntacticDiagnostics().length || !!e.program.getOptionsDiagnostics().length || !!e.program.getGlobalDiagnostics().length; + } + function Tve(e) { + return bve(e), e.buildInfoEmitPending ?? (e.buildInfoEmitPending = !!e.hasErrorsFromOldState != !!e.hasErrors); + } + function Fje(e) { + var t, n; + const i = e.program.getCurrentDirectory(), s = Hn(Xi(Cv(e.compilerOptions), i)), o = e.latestChangedDtsFile ? O(e.latestChangedDtsFile) : void 0, c = [], _ = /* @__PURE__ */ new Map(), u = new Set(e.program.getRootFileNames().map((q) => oo(q, i, e.program.getCanonicalFileName))); + if (bve(e), !Vb(e.compilerOptions)) + return { + root: Ki(u, (me) => F(me)), + errors: e.hasErrors ? !0 : void 0, + checkPending: e.checkPending, + version: Xf + }; + const m = []; + if (e.compilerOptions.outFile) { + const q = Ki(e.fileInfos.entries(), ([Ce, Ee]) => { + const oe = R(Ce); + return V(Ce, oe), Ee.impliedFormat ? { version: Ee.version, impliedFormat: Ee.impliedFormat, signature: void 0, affectsGlobalScope: void 0 } : Ee.version; + }); + return { + fileNames: c, + fileInfos: q, + root: m, + resolvedRoot: $(), + options: U(e.compilerOptions), + semanticDiagnosticsPerFile: e.changedFilesSet.size ? void 0 : Z(), + emitDiagnosticsPerFile: J(), + changeFileSet: Te(), + outSignature: e.outSignature, + latestChangedDtsFile: o, + pendingEmit: e.programEmitPending ? ( + // Pending is undefined or None is encoded as undefined + e.programEmitPending === _1(e.compilerOptions) ? !1 : ( + // Pending emit is same as deteremined by compilerOptions + e.programEmitPending + ) + ) : void 0, + // Actual value + errors: e.hasErrors ? !0 : void 0, + checkPending: e.checkPending, + version: Xf + }; + } + let g, h, S; + const T = Ki(e.fileInfos.entries(), ([q, me]) => { + var Ce, Ee; + const oe = R(q); + V(q, oe), E.assert(c[oe - 1] === F(q)); + const ke = (Ce = e.oldSignatures) == null ? void 0 : Ce.get(q), ue = ke !== void 0 ? ke || void 0 : me.signature; + if (e.compilerOptions.composite) { + const it = e.program.getSourceFileByPath(q); + if (!tp(it) && Rb(it, e.program)) { + const Oe = (Ee = e.emitSignatures) == null ? void 0 : Ee.get(q); + Oe !== ue && (S = Pr( + S, + Oe === void 0 ? oe : ( + // There is no emit, encode as false + // fileId, signature: emptyArray if signature only differs in dtsMap option than our own compilerOptions otherwise EmitSignature + [oe, !rs(Oe) && Oe[0] === ue ? He : Oe] + ) + )); + } + } + return me.version === ue ? me.affectsGlobalScope || me.impliedFormat ? ( + // If file version is same as signature, dont serialize signature + { version: me.version, signature: void 0, affectsGlobalScope: me.affectsGlobalScope, impliedFormat: me.impliedFormat } + ) : ( + // If file info only contains version and signature and both are same we can just write string + me.version + ) : ue !== void 0 ? ( + // If signature is not same as version, encode signature in the fileInfo + ke === void 0 ? ( + // If we havent computed signature, use fileInfo as is + me + ) : ( + // Serialize fileInfo with new updated signature + { version: me.version, signature: ue, affectsGlobalScope: me.affectsGlobalScope, impliedFormat: me.impliedFormat } + ) + ) : ( + // Signature of the FileInfo is undefined, serialize it as false + { version: me.version, signature: !1, affectsGlobalScope: me.affectsGlobalScope, impliedFormat: me.impliedFormat } + ); + }); + let C; + (t = e.referencedMap) != null && t.size() && (C = Ki(e.referencedMap.keys()).sort(cu).map((q) => [ + R(q), + W(e.referencedMap.getValues(q)) + ])); + const D = Z(); + let w; + if ((n = e.affectedFilesPendingEmit) != null && n.size) { + const q = _1(e.compilerOptions), me = /* @__PURE__ */ new Set(); + for (const Ce of Ki(e.affectedFilesPendingEmit.keys()).sort(cu)) + if (S0(me, Ce)) { + const Ee = e.program.getSourceFileByPath(Ce); + if (!Ee || !Rb(Ee, e.program)) continue; + const oe = R(Ce), ke = e.affectedFilesPendingEmit.get(Ce); + w = Pr( + w, + ke === q ? oe : ( + // Pending full emit per options + ke === 24 ? [oe] : ( + // Pending on Dts only + [oe, ke] + ) + ) + // Anything else + ); + } + } + return { + fileNames: c, + fileIdsList: g, + fileInfos: T, + root: m, + resolvedRoot: $(), + options: U(e.compilerOptions), + referencedMap: C, + semanticDiagnosticsPerFile: D, + emitDiagnosticsPerFile: J(), + changeFileSet: Te(), + affectedFilesPendingEmit: w, + emitSignatures: S, + latestChangedDtsFile: o, + errors: e.hasErrors ? !0 : void 0, + checkPending: e.checkPending, + version: Xf + }; + function O(q) { + return F(Xi(q, i)); + } + function F(q) { + return iS(Df(s, q, e.program.getCanonicalFileName)); + } + function R(q) { + let me = _.get(q); + return me === void 0 && (c.push(F(q)), _.set(q, me = c.length)), me; + } + function W(q) { + const me = Ki(q.keys(), R).sort(uo), Ce = me.join(); + let Ee = h?.get(Ce); + return Ee === void 0 && (g = Pr(g, me), (h ?? (h = /* @__PURE__ */ new Map())).set(Ce, Ee = g.length)), Ee; + } + function V(q, me) { + const Ce = e.program.getSourceFile(q); + if (!e.program.getFileIncludeReasons().get(Ce.path).some( + (ue) => ue.kind === 0 + /* RootFile */ + )) return; + if (!m.length) return m.push(me); + const Ee = m[m.length - 1], oe = os(Ee); + if (oe && Ee[1] === me - 1) return Ee[1] = me; + if (oe || m.length === 1 || Ee !== me - 1) return m.push(me); + const ke = m[m.length - 2]; + return !Ey(ke) || ke !== Ee - 1 ? m.push(me) : (m[m.length - 2] = [ke, me], m.length = m.length - 1); + } + function $() { + let q; + return u.forEach((me) => { + const Ce = e.program.getSourceFileByPath(me); + Ce && me !== Ce.resolvedPath && (q = Pr(q, [R(Ce.resolvedPath), R(me)])); + }), q; + } + function U(q) { + let me; + const { optionsNameMap: Ce } = d6(); + for (const Ee of Zd(q).sort(cu)) { + const oe = Ce.get(Ee.toLowerCase()); + oe?.affectsBuildInfo && ((me || (me = {}))[Ee] = _e( + oe, + q[Ee] + )); + } + return me; + } + function _e(q, me) { + if (q) { + if (E.assert(q.type !== "listOrElement"), q.type === "list") { + const Ce = me; + if (q.element.isFilePath && Ce.length) + return Ce.map(O); + } else if (q.isFilePath) + return O(me); + } + return me; + } + function Z() { + let q; + return e.fileInfos.forEach((me, Ce) => { + const Ee = e.semanticDiagnosticsPerFile.get(Ce); + Ee ? Ee.length && (q = Pr(q, [ + R(Ce), + re(Ee, Ce) + ])) : e.changedFilesSet.has(Ce) || (q = Pr(q, R(Ce))); + }), q; + } + function J() { + var q; + let me; + if (!((q = e.emitDiagnosticsPerFile) != null && q.size)) return me; + for (const Ce of Ki(e.emitDiagnosticsPerFile.keys()).sort(cu)) { + const Ee = e.emitDiagnosticsPerFile.get(Ce); + me = Pr(me, [ + R(Ce), + re(Ee, Ce) + ]); + } + return me; + } + function re(q, me) { + return E.assert(!!q.length), q.map((Ce) => { + const Ee = te(Ce, me); + Ee.reportsUnnecessary = Ce.reportsUnnecessary, Ee.reportDeprecated = Ce.reportsDeprecated, Ee.source = Ce.source, Ee.skippedOn = Ce.skippedOn; + const { relatedInformation: oe } = Ce; + return Ee.relatedInformation = oe ? oe.length ? oe.map((ke) => te(ke, me)) : [] : void 0, Ee; + }); + } + function te(q, me) { + const { file: Ce } = q; + return { + ...q, + file: Ce ? Ce.resolvedPath === me ? void 0 : F(Ce.resolvedPath) : !1, + messageText: rs(q.messageText) ? q.messageText : ie(q.messageText) + }; + } + function ie(q) { + if (q.repopulateInfo) + return { + info: q.repopulateInfo(), + next: le(q.next) + }; + const me = le(q.next); + return me === q.next ? q : { ...q, next: me }; + } + function le(q) { + return q && (lr(q, (me, Ce) => { + const Ee = ie(me); + if (me === Ee) return; + const oe = Ce > 0 ? q.slice(0, Ce - 1) : []; + oe.push(Ee); + for (let ke = Ce + 1; ke < q.length; ke++) + oe.push(ie(q[ke])); + return oe; + }) || q); + } + function Te() { + let q; + if (e.changedFilesSet.size) + for (const me of Ki(e.changedFilesSet.keys()).sort(cu)) + q = Pr(q, R(me)); + return q; + } + } + var wie = /* @__PURE__ */ ((e) => (e[e.SemanticDiagnosticsBuilderProgram = 0] = "SemanticDiagnosticsBuilderProgram", e[e.EmitAndSemanticDiagnosticsBuilderProgram = 1] = "EmitAndSemanticDiagnosticsBuilderProgram", e))(wie || {}); + function RO(e, t, n, i, s, o) { + let c, _, u; + return e === void 0 ? (E.assert(t === void 0), c = n, u = i, E.assert(!!u), _ = u.getProgram()) : os(e) ? (u = i, _ = iA({ + rootNames: e, + options: t, + host: n, + oldProgram: u && u.getProgramOrUndefined(), + configFileParsingDiagnostics: s, + projectReferences: o + }), c = n) : (_ = e, c = t, u = n, s = i), { host: c, newProgram: _, oldProgram: u, configFileParsingDiagnostics: s || He }; + } + function xve(e, t) { + return t?.sourceMapUrlPos !== void 0 ? e.substring(0, t.sourceMapUrlPos) : e; + } + function cU(e, t, n, i, s) { + var o; + n = xve(n, s); + let c; + return (o = s?.diagnostics) != null && o.length && (n += s.diagnostics.map((m) => `${u(m)}${WI[m.category]}${m.code}: ${_(m.messageText)}`).join(` +`)), (i.createHash ?? n4)(n); + function _(m) { + return rs(m) ? m : m === void 0 ? "" : m.next ? m.messageText + m.next.map(_).join(` +`) : m.messageText; + } + function u(m) { + return m.file.resolvedPath === t.resolvedPath ? `(${m.start},${m.length})` : (c === void 0 && (c = Hn(t.resolvedPath)), `${iS(Df( + c, + m.file.resolvedPath, + e.getCanonicalFileName + ))}(${m.start},${m.length})`); + } + } + function Oje(e, t, n) { + return (t.createHash ?? n4)(xve(e, n)); + } + function lU(e, { newProgram: t, host: n, oldProgram: i, configFileParsingDiagnostics: s }) { + let o = i && i.state; + if (o && t === o.program && s === t.getConfigFileParsingDiagnostics()) + return t = void 0, o = void 0, i; + const c = Cje(t, o); + t.getBuildInfo = () => Fje(xje(c)), t = void 0, i = void 0, o = void 0; + const _ = fU(c, s); + return _.state = c, _.hasChangedEmitSignature = () => !!c.hasChangedEmitSignature, _.getAllDependencies = (O) => Id.getAllDependencies( + c, + E.checkDefined(c.program), + O + ), _.getSemanticDiagnostics = A, _.getDeclarationDiagnostics = D, _.emit = T, _.releaseProgram = () => Eje(c), e === 0 ? _.getSemanticDiagnosticsOfNextAffectedFile = w : e === 1 ? (_.getSemanticDiagnosticsOfNextAffectedFile = w, _.emitNextAffectedFile = h, _.emitBuildInfo = u) : qs(), _; + function u(O, F) { + if (E.assert(E6(c)), Tve(c)) { + const R = c.program.emitBuildInfo( + O || Is(n, n.writeFile), + F + ); + return c.buildInfoEmitPending = !1, R; + } + return nU; + } + function m(O, F, R, W, V) { + var $, U, _e, Z; + E.assert(E6(c)); + let J = mve(c, F, n); + const re = _1(c.compilerOptions); + let te = V ? 8 : R ? re & 56 : re; + if (!J) { + if (c.compilerOptions.outFile) { + if (c.programEmitPending && (te = MO( + c.programEmitPending, + c.seenProgramEmit, + R, + V + ), te && (J = c.program)), !J && (($ = c.emitDiagnosticsPerFile) != null && $.size)) { + const Te = c.seenProgramEmit || 0; + if (!(Te & aU(V))) { + c.seenProgramEmit = aU(V) | Te; + const q = []; + return c.emitDiagnosticsPerFile.forEach((me) => Nn(q, me)), { + result: { emitSkipped: !0, diagnostics: q }, + affected: c.program + }; + } + } + } else { + const Te = Dje( + c, + R, + V + ); + if (Te) + ({ affectedFile: J, emitKind: te } = Te); + else { + const q = wje( + c, + V + ); + if (q) + return (c.seenEmittedFiles ?? (c.seenEmittedFiles = /* @__PURE__ */ new Map())).set( + q.affectedFile.resolvedPath, + q.seenKind | aU(V) + ), { + result: { emitSkipped: !0, diagnostics: q.diagnostics }, + affected: q.affectedFile + }; + } + } + if (!J) { + if (V || !Tve(c)) return; + const Te = c.program, q = Te.emitBuildInfo( + O || Is(n, n.writeFile), + F + ); + return c.buildInfoEmitPending = !1, { result: q, affected: Te }; + } + } + let ie; + te & 7 && (ie = 0), te & 56 && (ie = ie === void 0 ? 1 : void 0); + const le = V ? { + emitSkipped: !0, + diagnostics: c.program.getDeclarationDiagnostics( + J === c.program ? void 0 : J, + F + ) + } : c.program.emit( + J === c.program ? void 0 : J, + S(O, W), + F, + ie, + W, + /*forceDtsEmit*/ + void 0, + /*skipBuildInfo*/ + !0 + ); + if (J !== c.program) { + const Te = J; + c.seenAffectedFiles.add(Te.resolvedPath), c.affectedFilesIndex !== void 0 && c.affectedFilesIndex++, c.buildInfoEmitPending = !0; + const q = ((U = c.seenEmittedFiles) == null ? void 0 : U.get(Te.resolvedPath)) || 0; + (c.seenEmittedFiles ?? (c.seenEmittedFiles = /* @__PURE__ */ new Map())).set(Te.resolvedPath, te | q); + const me = ((_e = c.affectedFilesPendingEmit) == null ? void 0 : _e.get(Te.resolvedPath)) || re, Ce = LO(me, te | q); + Ce ? (c.affectedFilesPendingEmit ?? (c.affectedFilesPendingEmit = /* @__PURE__ */ new Map())).set(Te.resolvedPath, Ce) : (Z = c.affectedFilesPendingEmit) == null || Z.delete(Te.resolvedPath), le.diagnostics.length && (c.emitDiagnosticsPerFile ?? (c.emitDiagnosticsPerFile = /* @__PURE__ */ new Map())).set(Te.resolvedPath, le.diagnostics); + } else + c.changedFilesSet.clear(), c.programEmitPending = c.changedFilesSet.size ? LO(re, te) : c.programEmitPending ? LO(c.programEmitPending, te) : void 0, c.seenProgramEmit = te | (c.seenProgramEmit || 0), g(le.diagnostics), c.buildInfoEmitPending = !0; + return { result: le, affected: J }; + } + function g(O) { + let F; + O.forEach((R) => { + if (!R.file) return; + let W = F?.get(R.file.resolvedPath); + W || (F ?? (F = /* @__PURE__ */ new Map())).set(R.file.resolvedPath, W = []), W.push(R); + }), F && (c.emitDiagnosticsPerFile = F); + } + function h(O, F, R, W) { + return m( + O, + F, + R, + W, + /*isForDtsErrors*/ + !1 + ); + } + function S(O, F) { + return E.assert(E6(c)), N_(c.compilerOptions) ? (R, W, V, $, U, _e) => { + var Z, J, re; + if (fl(R)) + if (c.compilerOptions.outFile) { + if (c.compilerOptions.composite) { + const ie = te( + c.outSignature, + /*newSignature*/ + void 0 + ); + if (!ie) return _e.skippedDtsWrite = !0; + c.outSignature = ie; + } + } else { + E.assert(U?.length === 1); + let ie; + if (!F) { + const le = U[0], Te = c.fileInfos.get(le.resolvedPath); + if (Te.signature === le.version) { + const q = cU( + c.program, + le, + W, + n, + _e + ); + (Z = _e?.diagnostics) != null && Z.length || (ie = q), q !== le.version && (n.storeSignatureInfo && (c.signatureInfo ?? (c.signatureInfo = /* @__PURE__ */ new Map())).set( + le.resolvedPath, + 1 + /* StoredSignatureAtEmit */ + ), c.affectedFiles && ((J = c.oldSignatures) == null ? void 0 : J.get(le.resolvedPath)) === void 0 && (c.oldSignatures ?? (c.oldSignatures = /* @__PURE__ */ new Map())).set(le.resolvedPath, Te.signature || !1), Te.signature = q); + } + } + if (c.compilerOptions.composite) { + const le = U[0].resolvedPath; + if (ie = te((re = c.emitSignatures) == null ? void 0 : re.get(le), ie), !ie) return _e.skippedDtsWrite = !0; + (c.emitSignatures ?? (c.emitSignatures = /* @__PURE__ */ new Map())).set(le, ie); + } + } + O ? O(R, W, V, $, U, _e) : n.writeFile ? n.writeFile(R, W, V, $, U, _e) : c.program.writeFile(R, W, V, $, U, _e); + function te(ie, le) { + const Te = !ie || rs(ie) ? ie : ie[0]; + if (le ?? (le = Oje(W, n, _e)), le === Te) { + if (ie === Te) return; + _e ? _e.differsOnlyInMap = !0 : _e = { differsOnlyInMap: !0 }; + } else + c.hasChangedEmitSignature = !0, c.latestChangedDtsFile = R; + return le; + } + } : O || Is(n, n.writeFile); + } + function T(O, F, R, W, V) { + E.assert(E6(c)), e === 1 && xie(c, O); + const $ = iU(_, O, F, R); + if ($) return $; + if (!O) + if (e === 1) { + let _e = [], Z = !1, J, re = [], te; + for (; te = h( + F, + R, + W, + V + ); ) + Z = Z || te.result.emitSkipped, J = Nn(J, te.result.diagnostics), re = Nn(re, te.result.emittedFiles), _e = Nn(_e, te.result.sourceMaps); + return { + emitSkipped: Z, + diagnostics: J || He, + emittedFiles: re, + sourceMaps: _e + }; + } else + gve( + c, + W, + /*isForDtsErrors*/ + !1 + ); + const U = c.program.emit( + O, + S(F, V), + R, + W, + V + ); + return C( + O, + W, + /*isForDtsErrors*/ + !1, + U.diagnostics + ), U; + } + function C(O, F, R, W) { + !O && e !== 1 && (gve(c, F, R), g(W)); + } + function D(O, F) { + var R; + if (E.assert(E6(c)), e === 1) { + xie(c, O); + let W, V; + for (; W = m( + /*writeFile*/ + void 0, + F, + /*emitOnlyDtsFiles*/ + void 0, + /*customTransformers*/ + void 0, + /*isForDtsErrors*/ + !0 + ); ) + O || (V = Nn(V, W.result.diagnostics)); + return (O ? (R = c.emitDiagnosticsPerFile) == null ? void 0 : R.get(O.resolvedPath) : V) || He; + } else { + const W = c.program.getDeclarationDiagnostics(O, F); + return C( + O, + /*emitOnlyDtsFiles*/ + void 0, + /*isForDtsErrors*/ + !0, + W + ), W; + } + } + function w(O, F) { + for (E.assert(E6(c)); ; ) { + const R = mve(c, O, n); + let W; + if (R) + if (R !== c.program) { + const V = R; + if ((!F || !F(V)) && (W = oU(c, V, O)), c.seenAffectedFiles.add(V.resolvedPath), c.affectedFilesIndex++, c.buildInfoEmitPending = !0, !W) continue; + } else { + let V; + const $ = /* @__PURE__ */ new Map(); + c.program.getSourceFiles().forEach( + (U) => V = Nn( + V, + oU( + c, + U, + O, + $ + ) + ) + ), c.semanticDiagnosticsPerFile = $, W = V || He, c.changedFilesSet.clear(), c.programEmitPending = _1(c.compilerOptions), c.compilerOptions.noCheck || (c.checkPending = void 0), c.buildInfoEmitPending = !0; + } + else { + c.checkPending && !c.compilerOptions.noCheck && (c.checkPending = void 0, c.buildInfoEmitPending = !0); + return; + } + return { result: W, affected: R }; + } + } + function A(O, F) { + if (E.assert(E6(c)), xie(c, O), O) + return oU(c, O, F); + for (; ; ) { + const W = w(F); + if (!W) break; + if (W.affected === c.program) return W.result; + } + let R; + for (const W of c.program.getSourceFiles()) + R = Nn(R, oU(c, W, F)); + return c.checkPending && !c.compilerOptions.noCheck && (c.checkPending = void 0, c.buildInfoEmitPending = !0), R || He; + } + } + function uU(e, t, n) { + var i, s; + const o = ((i = e.affectedFilesPendingEmit) == null ? void 0 : i.get(t)) || 0; + (e.affectedFilesPendingEmit ?? (e.affectedFilesPendingEmit = /* @__PURE__ */ new Map())).set(t, o | n), (s = e.emitDiagnosticsPerFile) == null || s.delete(t); + } + function Pie(e) { + return rs(e) ? { version: e, signature: e, affectsGlobalScope: void 0, impliedFormat: void 0 } : rs(e.signature) ? e : { version: e.version, signature: e.signature === !1 ? void 0 : e.version, affectsGlobalScope: e.affectsGlobalScope, impliedFormat: e.impliedFormat }; + } + function Nie(e, t) { + return Ey(e) ? t : e[1] || 24; + } + function Aie(e, t) { + return e || _1(t || {}); + } + function Iie(e, t, n) { + var i, s, o, c; + const _ = Hn(Xi(t, n.getCurrentDirectory())), u = Wl(n.useCaseSensitiveFileNames()); + let m; + const g = (i = e.fileNames) == null ? void 0 : i.map(D); + let h; + const S = e.latestChangedDtsFile ? w(e.latestChangedDtsFile) : void 0, T = /* @__PURE__ */ new Map(), C = new Set(gr(e.changeFileSet, A)); + if (Die(e)) + e.fileInfos.forEach((V, $) => { + const U = A($ + 1); + T.set(U, rs(V) ? { version: V, signature: void 0, affectsGlobalScope: void 0, impliedFormat: void 0 } : V); + }), m = { + fileInfos: T, + compilerOptions: e.options ? VF(e.options, w) : {}, + semanticDiagnosticsPerFile: R(e.semanticDiagnosticsPerFile), + emitDiagnosticsPerFile: W(e.emitDiagnosticsPerFile), + hasReusableDiagnostic: !0, + changedFilesSet: C, + latestChangedDtsFile: S, + outSignature: e.outSignature, + programEmitPending: e.pendingEmit === void 0 ? void 0 : Aie(e.pendingEmit, e.options), + hasErrors: e.errors, + checkPending: e.checkPending + }; + else { + h = (s = e.fileIdsList) == null ? void 0 : s.map((U) => new Set(U.map(A))); + const V = (o = e.options) != null && o.composite && !e.options.outFile ? /* @__PURE__ */ new Map() : void 0; + e.fileInfos.forEach((U, _e) => { + const Z = A(_e + 1), J = Pie(U); + T.set(Z, J), V && J.signature && V.set(Z, J.signature); + }), (c = e.emitSignatures) == null || c.forEach((U) => { + if (Ey(U)) V.delete(A(U)); + else { + const _e = A(U[0]); + V.set( + _e, + !rs(U[1]) && !U[1].length ? ( + // File signature is emit signature but differs in map + [V.get(_e)] + ) : U[1] + ); + } + }); + const $ = e.affectedFilesPendingEmit ? _1(e.options || {}) : void 0; + m = { + fileInfos: T, + compilerOptions: e.options ? VF(e.options, w) : {}, + referencedMap: F(e.referencedMap, e.options ?? {}), + semanticDiagnosticsPerFile: R(e.semanticDiagnosticsPerFile), + emitDiagnosticsPerFile: W(e.emitDiagnosticsPerFile), + hasReusableDiagnostic: !0, + changedFilesSet: C, + affectedFilesPendingEmit: e.affectedFilesPendingEmit && aC(e.affectedFilesPendingEmit, (U) => A(Ey(U) ? U : U[0]), (U) => Nie(U, $)), + latestChangedDtsFile: S, + emitSignatures: V?.size ? V : void 0, + hasErrors: e.errors, + checkPending: e.checkPending + }; + } + return { + state: m, + getProgram: qs, + getProgramOrUndefined: vb, + releaseProgram: Ja, + getCompilerOptions: () => m.compilerOptions, + getSourceFile: qs, + getSourceFiles: qs, + getOptionsDiagnostics: qs, + getGlobalDiagnostics: qs, + getConfigFileParsingDiagnostics: qs, + getSyntacticDiagnostics: qs, + getDeclarationDiagnostics: qs, + getSemanticDiagnostics: qs, + emit: qs, + getAllDependencies: qs, + getCurrentDirectory: qs, + emitNextAffectedFile: qs, + getSemanticDiagnosticsOfNextAffectedFile: qs, + emitBuildInfo: qs, + close: Ja, + hasChangedEmitSignature: Th + }; + function D(V) { + return oo(V, _, u); + } + function w(V) { + return Xi(V, _); + } + function A(V) { + return g[V - 1]; + } + function O(V) { + return h[V - 1]; + } + function F(V, $) { + const U = Id.createReferencedMap($); + return !U || !V || V.forEach(([_e, Z]) => U.set(A(_e), O(Z))), U; + } + function R(V) { + const $ = new Map( + Ty( + T.keys(), + (U) => C.has(U) ? void 0 : [U, He] + ) + ); + return V?.forEach((U) => { + Ey(U) ? $.delete(A(U)) : $.set(A(U[0]), U[1]); + }), $; + } + function W(V) { + return V && aC(V, ($) => A($[0]), ($) => $[1]); + } + } + function _U(e, t, n) { + const i = Hn(Xi(t, n.getCurrentDirectory())), s = Wl(n.useCaseSensitiveFileNames()), o = /* @__PURE__ */ new Map(); + let c = 0; + const _ = /* @__PURE__ */ new Map(), u = new Map(e.resolvedRoot); + return e.fileInfos.forEach((g, h) => { + const S = oo(e.fileNames[h], i, s), T = rs(g) ? g : g.version; + if (o.set(S, T), c < e.root.length) { + const C = e.root[c], D = h + 1; + os(C) ? C[0] <= D && D <= C[1] && (m(D, S), C[1] === D && c++) : C === D && (m(D, S), c++); + } + }), { fileInfos: o, roots: _ }; + function m(g, h) { + const S = u.get(g); + S ? _.set(oo(e.fileNames[S - 1], i, s), h) : _.set(h, void 0); + } + } + function Fie(e, t, n) { + if (!Ije(e)) return; + const i = Hn(Xi(t, n.getCurrentDirectory())), s = Wl(n.useCaseSensitiveFileNames()); + return e.root.map((o) => oo(o, i, s)); + } + function fU(e, t) { + return { + state: void 0, + getProgram: n, + getProgramOrUndefined: () => e.program, + releaseProgram: () => e.program = void 0, + getCompilerOptions: () => e.compilerOptions, + getSourceFile: (i) => n().getSourceFile(i), + getSourceFiles: () => n().getSourceFiles(), + getOptionsDiagnostics: (i) => n().getOptionsDiagnostics(i), + getGlobalDiagnostics: (i) => n().getGlobalDiagnostics(i), + getConfigFileParsingDiagnostics: () => t, + getSyntacticDiagnostics: (i, s) => n().getSyntacticDiagnostics(i, s), + getDeclarationDiagnostics: (i, s) => n().getDeclarationDiagnostics(i, s), + getSemanticDiagnostics: (i, s) => n().getSemanticDiagnostics(i, s), + emit: (i, s, o, c, _) => n().emit(i, s, o, c, _), + emitBuildInfo: (i, s) => n().emitBuildInfo(i, s), + getAllDependencies: qs, + getCurrentDirectory: () => n().getCurrentDirectory(), + close: Ja + }; + function n() { + return E.checkDefined(e.program); + } + } + function kve(e, t, n, i, s, o) { + return lU( + 0, + RO( + e, + t, + n, + i, + s, + o + ) + ); + } + function pU(e, t, n, i, s, o) { + return lU( + 1, + RO( + e, + t, + n, + i, + s, + o + ) + ); + } + function Cve(e, t, n, i, s, o) { + const { newProgram: c, configFileParsingDiagnostics: _ } = RO( + e, + t, + n, + i, + s, + o + ); + return fU( + { program: c, compilerOptions: c.getCompilerOptions() }, + _ + ); + } + function jO(e) { + return Eo(e, "/node_modules/.staging") ? lC(e, "/.staging") : at(qI, (t) => e.includes(t)) ? void 0 : e; + } + function Oie(e, t) { + if (t <= 1) return 1; + let n = 1, i = e[0].search(/[a-z]:/i) === 0; + if (e[0] !== jo && !i && // Non dos style paths + e[1].search(/[a-z]\$$/i) === 0) { + if (t === 2) return 2; + n = 2, i = !0; + } + return i && !e[n].match(/^users$/i) ? n : e[n].match(/^workspaces$/i) ? n + 1 : n + 2; + } + function dU(e, t) { + if (t === void 0 && (t = e.length), t <= 2) return !1; + const n = Oie(e, t); + return t > n + 1; + } + function oA(e) { + return dU(Ul(e)); + } + function Lie(e) { + return Dve(Hn(e)); + } + function Eve(e, t) { + if (t.length < t.length) return !1; + for (let n = 0; n < e.length; n++) + if (t[n] !== e[n]) return !1; + return !0; + } + function Dve(e) { + return oA(e); + } + function Mie(e) { + return Dve(e); + } + function mU(e, t, n, i, s, o, c, _) { + const u = Ul(t); + e = q_(e) ? Hs(e) : Xi(e, c()); + const m = Ul(e), g = Oie(u, u.length); + if (u.length <= g + 1) return; + const h = u.indexOf("node_modules"); + if (h !== -1 && h + 1 <= g + 1) return; + const S = u.lastIndexOf("node_modules"); + return o && Eve(s, u) ? u.length > s.length + 1 ? Rie( + m, + u, + Math.max(s.length + 1, g + 1), + S + ) : { + dir: n, + dirPath: i, + nonRecursive: !0 + } : wve( + m, + u, + u.length - 1, + g, + h, + s, + S, + _ + ); + } + function wve(e, t, n, i, s, o, c, _) { + if (s !== -1) + return Rie( + e, + t, + s + 1, + c + ); + let u = !0, m = n; + if (!_) { + for (let g = 0; g < n; g++) + if (t[g] !== o[g]) { + u = !1, m = Math.max(g + 1, i + 1); + break; + } + } + return Rie( + e, + t, + m, + c, + u + ); + } + function Rie(e, t, n, i, s) { + let o; + return i !== -1 && i + 1 >= n && i + 2 < t.length && (Vi(t[i + 1], "@") ? i + 3 < t.length && (o = i + 3) : o = i + 2), { + dir: T0(e, n), + dirPath: T0(t, n), + nonRecursive: s, + packageDir: o !== void 0 ? T0(e, o) : void 0, + packageDirPath: o !== void 0 ? T0(t, o) : void 0 + }; + } + function jie(e, t, n, i, s, o, c, _) { + const u = Ul(t); + if (s && Eve(i, u)) + return n; + e = q_(e) ? Hs(e) : Xi(e, o()); + const m = wve( + Ul(e), + u, + u.length, + Oie(u, u.length), + u.indexOf("node_modules"), + i, + u.lastIndexOf("node_modules"), + c + ); + return m && _(m.dirPath) ? m.dirPath : void 0; + } + function Bie(e, t) { + const n = Xi(e, t()); + return oj(n) ? n : X1(n); + } + function BO(e) { + var t; + return ((t = e.getCompilerHost) == null ? void 0 : t.call(e)) || e; + } + function Jie(e, t, n, i, s) { + return { + nameAndMode: DO, + resolve: (o, c) => Lje( + i, + s, + o, + e, + n, + t, + c + ) + }; + } + function Lje(e, t, n, i, s, o, c) { + const _ = BO(e), u = WS(n, i, s, _, t, o, c); + if (!e.getGlobalTypingsCacheLocation) + return u; + const m = e.getGlobalTypingsCacheLocation(); + if (m !== void 0 && !vl(n) && !(u.resolvedModule && U5(u.resolvedModule.extension))) { + const { resolvedModule: g, failedLookupLocations: h, affectingLocations: S, resolutionDiagnostics: T } = Zre( + E.checkDefined(e.globalCacheResolutionModuleName)(n), + e.projectName, + s, + _, + m, + t + ); + if (g) + return u.resolvedModule = g, u.failedLookupLocations = m6(u.failedLookupLocations, h), u.affectingLocations = m6(u.affectingLocations, S), u.resolutionDiagnostics = m6(u.resolutionDiagnostics, T), u; + } + return u; + } + function gU(e, t, n) { + let i, s, o; + const c = /* @__PURE__ */ new Set(), _ = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), m = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map(); + let h = !1, S, T, C, D, w, A = !1; + const O = Iu(() => e.getCurrentDirectory()), F = e.getCachedDirectoryStructureHost(), R = /* @__PURE__ */ new Map(), W = h6( + O(), + e.getCanonicalFileName, + e.getCompilationSettings() + ), V = /* @__PURE__ */ new Map(), $ = eO( + O(), + e.getCanonicalFileName, + e.getCompilationSettings(), + W.getPackageJsonInfoCache(), + W.optionsToRedirectsKey + ), U = /* @__PURE__ */ new Map(), _e = h6( + O(), + e.getCanonicalFileName, + Qz(e.getCompilationSettings()), + W.getPackageJsonInfoCache() + ), Z = /* @__PURE__ */ new Map(), J = /* @__PURE__ */ new Map(), re = Bie(t, O), te = e.toPath(re), ie = Ul(te), le = dU(ie), Te = /* @__PURE__ */ new Map(), q = /* @__PURE__ */ new Map(), me = /* @__PURE__ */ new Map(), Ce = /* @__PURE__ */ new Map(); + return { + rootDirForResolution: t, + resolvedModuleNames: R, + resolvedTypeReferenceDirectives: V, + resolvedLibraries: U, + resolvedFileToResolution: m, + resolutionsWithFailedLookups: _, + resolutionsWithOnlyAffectingLocations: u, + directoryWatchesOfFailedLookups: Z, + fileWatchesOfAffectingLocations: J, + packageDirWatchers: q, + dirPathToSymlinkPackageRefCount: me, + watchFailedLookupLocationsOfExternalModuleResolutions: Qt, + getModuleResolutionCache: () => W, + startRecordingFilesWithChangedResolutions: ke, + finishRecordingFilesWithChangedResolutions: ue, + // perDirectoryResolvedModuleNames and perDirectoryResolvedTypeReferenceDirectives could be non empty if there was exception during program update + // (between startCachingPerDirectoryResolution and finishCachingPerDirectoryResolution) + startCachingPerDirectoryResolution: xe, + finishCachingPerDirectoryResolution: ne, + resolveModuleNameLiterals: Lt, + resolveTypeReferenceDirectiveReferences: bt, + resolveLibrary: er, + resolveSingleModuleNameWithoutWatching: Nr, + removeResolutionsFromProjectReferenceRedirects: wn, + removeResolutionsOfFile: ki, + hasChangedAutomaticTypeDirectiveNames: () => h, + invalidateResolutionOfFile: Ks, + invalidateResolutionsOfFailedLookupLocations: Ct, + setFilesWithInvalidatedNonRelativeUnresolvedImports: xr, + createHasInvalidatedResolutions: Oe, + isFileWithInvalidatedNonRelativeUnresolvedImports: it, + updateTypeRootsWatch: Ke, + closeTypeRootsWatch: Ie, + clear: Ee, + onChangesAffectModuleResolution: oe + }; + function Ee() { + P_(Z, _p), P_(J, _p), Te.clear(), q.clear(), me.clear(), c.clear(), Ie(), R.clear(), V.clear(), m.clear(), _.clear(), u.clear(), C = void 0, D = void 0, w = void 0, T = void 0, S = void 0, A = !1, W.clear(), $.clear(), W.update(e.getCompilationSettings()), $.update(e.getCompilationSettings()), _e.clear(), g.clear(), U.clear(), h = !1; + } + function oe() { + A = !0, W.clearAllExceptPackageJsonInfoCache(), $.clearAllExceptPackageJsonInfoCache(), W.update(e.getCompilationSettings()), $.update(e.getCompilationSettings()); + } + function ke() { + i = []; + } + function ue() { + const Ye = i; + return i = void 0, Ye; + } + function it(Ye) { + if (!o) + return !1; + const _t = o.get(Ye); + return !!_t && !!_t.length; + } + function Oe(Ye, _t) { + Ct(); + const yt = s; + return s = void 0, { + hasInvalidatedResolutions: (We) => Ye(We) || A || !!yt?.has(We) || it(We), + hasInvalidatedLibResolutions: (We) => { + var Et; + return _t(We) || !!((Et = U?.get(We)) != null && Et.isInvalidated); + } + }; + } + function xe() { + W.isReadonly = void 0, $.isReadonly = void 0, _e.isReadonly = void 0, W.getPackageJsonInfoCache().isReadonly = void 0, W.clearAllExceptPackageJsonInfoCache(), $.clearAllExceptPackageJsonInfoCache(), _e.clearAllExceptPackageJsonInfoCache(), pi(), Te.clear(); + } + function he(Ye) { + U.forEach((_t, yt) => { + var We; + (We = Ye?.resolvedLibReferences) != null && We.has(yt) || (gt( + _t, + e.toPath(NO(e.getCompilationSettings(), O(), yt)), + cx + ), U.delete(yt)); + }); + } + function ne(Ye, _t) { + o = void 0, A = !1, pi(), Ye !== _t && (he(Ye), Ye?.getSourceFiles().forEach((yt) => { + var We; + const Et = ((We = yt.packageJsonLocations) == null ? void 0 : We.length) ?? 0, Xt = g.get(yt.resolvedPath) ?? He; + for (let rn = Xt.length; rn < Et; rn++) + Bt( + yt.packageJsonLocations[rn], + /*forResolution*/ + !1 + ); + if (Xt.length > Et) + for (let rn = Et; rn < Xt.length; rn++) + J.get(Xt[rn]).files--; + Et ? g.set(yt.resolvedPath, yt.packageJsonLocations) : g.delete(yt.resolvedPath); + }), g.forEach((yt, We) => { + const Et = Ye?.getSourceFileByPath(We); + (!Et || Et.resolvedPath !== We) && (yt.forEach((Xt) => J.get(Xt).files--), g.delete(We)); + })), Z.forEach(De), J.forEach(we), q.forEach(Ae), h = !1, W.isReadonly = !0, $.isReadonly = !0, _e.isReadonly = !0, W.getPackageJsonInfoCache().isReadonly = !0, Te.clear(); + } + function Ae(Ye, _t) { + Ye.dirPathToWatcher.size === 0 && q.delete(_t); + } + function De(Ye, _t) { + Ye.refCount === 0 && (Z.delete(_t), Ye.watcher.close()); + } + function we(Ye, _t) { + var yt; + Ye.files === 0 && Ye.resolutions === 0 && !((yt = Ye.symlinks) != null && yt.size) && (J.delete(_t), Ye.watcher.close()); + } + function Ue({ + entries: Ye, + containingFile: _t, + containingSourceFile: yt, + redirectedReference: We, + options: Et, + perFileCache: Xt, + reusedNames: rn, + loader: ye, + getResolutionWithResolvedFileName: ft, + deferWatchingNonRelativeResolution: fe, + shouldRetryResolution: L, + logChanges: ve + }) { + const X = e.toPath(_t), lt = Xt.get(X) || Xt.set(X, g6()).get(X), zt = [], de = ve && it(X), st = e.getCurrentProgram(), Gt = st && st.getResolvedProjectReferenceToRedirect(_t), Xr = Gt ? !We || We.sourceFile.path !== Gt.sourceFile.path : !!We, Rr = g6(); + for (const tt of Ye) { + const ut = ye.nameAndMode.getName(tt), Mt = ye.nameAndMode.getMode(tt, yt, We?.commandLine.options || Et); + let Pt = lt.get(ut, Mt); + if (!Rr.has(ut, Mt) && (A || Xr || !Pt || Pt.isInvalidated || // If the name is unresolved import that was invalidated, recalculate + de && !vl(ut) && L(Pt))) { + const Zt = Pt; + Pt = ye.resolve(ut, Mt), e.onDiscoveredSymlink && Mje(Pt) && e.onDiscoveredSymlink(), lt.set(ut, Mt, Pt), Pt !== Zt && (Qt(ut, Pt, X, ft, fe), Zt && gt(Zt, X, ft)), ve && i && !Jr(Zt, Pt) && (i.push(X), ve = !1); + } else { + const Zt = BO(e); + if (a1(Et, Zt) && !Rr.has(ut, Mt)) { + const fr = ft(Pt); + Yi( + Zt, + Xt === R ? fr?.resolvedFileName ? fr.packageId ? p.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : p.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : p.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved : fr?.resolvedFileName ? fr.packageId ? p.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : p.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : p.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved, + ut, + _t, + fr?.resolvedFileName, + fr?.packageId && K1(fr.packageId) + ); + } + } + E.assert(Pt !== void 0 && !Pt.isInvalidated), Rr.set(ut, Mt, !0), zt.push(Pt); + } + return rn?.forEach( + (tt) => Rr.set( + ye.nameAndMode.getName(tt), + ye.nameAndMode.getMode(tt, yt, We?.commandLine.options || Et), + !0 + ) + ), lt.size() !== Rr.size() && lt.forEach((tt, ut, Mt) => { + Rr.has(ut, Mt) || (gt(tt, X, ft), lt.delete(ut, Mt)); + }), zt; + function Jr(tt, ut) { + if (tt === ut) + return !0; + if (!tt || !ut) + return !1; + const Mt = ft(tt), Pt = ft(ut); + return Mt === Pt ? !0 : !Mt || !Pt ? !1 : Mt.resolvedFileName === Pt.resolvedFileName; + } + } + function bt(Ye, _t, yt, We, Et, Xt) { + return Ue({ + entries: Ye, + containingFile: _t, + containingSourceFile: Et, + redirectedReference: yt, + options: We, + reusedNames: Xt, + perFileCache: V, + loader: wO( + _t, + yt, + We, + BO(e), + $ + ), + getResolutionWithResolvedFileName: x7, + shouldRetryResolution: (rn) => rn.resolvedTypeReferenceDirective === void 0, + deferWatchingNonRelativeResolution: !1 + }); + } + function Lt(Ye, _t, yt, We, Et, Xt) { + return Ue({ + entries: Ye, + containingFile: _t, + containingSourceFile: Et, + redirectedReference: yt, + options: We, + reusedNames: Xt, + perFileCache: R, + loader: Jie( + _t, + yt, + We, + e, + W + ), + getResolutionWithResolvedFileName: cx, + shouldRetryResolution: (rn) => !rn.resolvedModule || !rD(rn.resolvedModule.extension), + logChanges: n, + deferWatchingNonRelativeResolution: !0 + // Defer non relative resolution watch because we could be using ambient modules + }); + } + function er(Ye, _t, yt, We) { + const Et = BO(e); + let Xt = U?.get(We); + if (!Xt || Xt.isInvalidated) { + const rn = Xt; + Xt = tO(Ye, _t, yt, Et, _e); + const ye = e.toPath(_t); + Qt( + Ye, + Xt, + ye, + cx, + /*deferWatchingNonRelativeResolution*/ + !1 + ), U.set(We, Xt), rn && gt(rn, ye, cx); + } else if (a1(yt, Et)) { + const rn = cx(Xt); + Yi( + Et, + rn?.resolvedFileName ? rn.packageId ? p.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : p.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : p.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved, + Ye, + _t, + rn?.resolvedFileName, + rn?.packageId && K1(rn.packageId) + ); + } + return Xt; + } + function Nr(Ye, _t) { + var yt, We; + const Et = e.toPath(_t), Xt = R.get(Et), rn = Xt?.get( + Ye, + /*mode*/ + void 0 + ); + if (rn && !rn.isInvalidated) return rn; + const ye = (yt = e.beforeResolveSingleModuleNameWithoutWatching) == null ? void 0 : yt.call(e, W), ft = BO(e), fe = WS( + Ye, + _t, + e.getCompilationSettings(), + ft, + W + ); + return (We = e.afterResolveSingleModuleNameWithoutWatching) == null || We.call(e, W, Ye, _t, fe, ye), fe; + } + function Dt(Ye) { + return Eo(Ye, "/node_modules/@types"); + } + function Qt(Ye, _t, yt, We, Et) { + if ((_t.files ?? (_t.files = /* @__PURE__ */ new Set())).add(yt), _t.files.size !== 1) return; + !Et || vl(Ye) ? yr(_t) : c.add(_t); + const Xt = We(_t); + if (Xt && Xt.resolvedFileName) { + const rn = e.toPath(Xt.resolvedFileName); + let ye = m.get(rn); + ye || m.set(rn, ye = /* @__PURE__ */ new Set()), ye.add(_t); + } + } + function Wr(Ye, _t) { + const yt = e.toPath(Ye), We = mU( + Ye, + yt, + re, + te, + ie, + le, + O, + e.preferNonRecursiveWatch + ); + if (We) { + const { dir: Et, dirPath: Xt, nonRecursive: rn, packageDir: ye, packageDirPath: ft } = We; + Xt === te ? (E.assert(rn), E.assert(!ye), _t = !0) : jr(Et, Xt, ye, ft, rn); + } + return _t; + } + function yr(Ye) { + var _t; + E.assert(!!((_t = Ye.files) != null && _t.size)); + const { failedLookupLocations: yt, affectingLocations: We, alternateResult: Et } = Ye; + if (!yt?.length && !We?.length && !Et) return; + (yt?.length || Et) && _.add(Ye); + let Xt = !1; + if (yt) + for (const rn of yt) + Xt = Wr(rn, Xt); + Et && (Xt = Wr(Et, Xt)), Xt && jr( + re, + te, + /*packageDir*/ + void 0, + /*packageDirPath*/ + void 0, + /*nonRecursive*/ + !0 + ), qn(Ye, !yt?.length && !Et); + } + function qn(Ye, _t) { + var yt; + E.assert(!!((yt = Ye.files) != null && yt.size)); + const { affectingLocations: We } = Ye; + if (We?.length) { + _t && u.add(Ye); + for (const Et of We) + Bt( + Et, + /*forResolution*/ + !0 + ); + } + } + function Bt(Ye, _t) { + const yt = J.get(Ye); + if (yt) { + _t ? yt.resolutions++ : yt.files++; + return; + } + let We = Ye, Et = !1, Xt; + e.realpath && (We = e.realpath(Ye), Ye !== We && (Et = !0, Xt = J.get(We))); + const rn = _t ? 1 : 0, ye = _t ? 0 : 1; + if (!Et || !Xt) { + const ft = { + watcher: Mie(e.toPath(We)) ? e.watchAffectingFileLocation(We, (fe, L) => { + F?.addOrDeleteFile(fe, e.toPath(We), L), bi(We, W.getPackageJsonInfoCache().getInternalMap()), e.scheduleInvalidateResolutionsOfFailedLookupLocations(); + }) : w6, + resolutions: Et ? 0 : rn, + files: Et ? 0 : ye, + symlinks: void 0 + }; + J.set(We, ft), Et && (Xt = ft); + } + if (Et) { + E.assert(!!Xt); + const ft = { + watcher: { + close: () => { + var fe; + const L = J.get(We); + (fe = L?.symlinks) != null && fe.delete(Ye) && !L.symlinks.size && !L.resolutions && !L.files && (J.delete(We), L.watcher.close()); + } + }, + resolutions: rn, + files: ye, + symlinks: void 0 + }; + J.set(Ye, ft), (Xt.symlinks ?? (Xt.symlinks = /* @__PURE__ */ new Set())).add(Ye); + } + } + function bi(Ye, _t) { + var yt; + const We = J.get(Ye); + We?.resolutions && (T ?? (T = /* @__PURE__ */ new Set())).add(Ye), We?.files && (S ?? (S = /* @__PURE__ */ new Set())).add(Ye), (yt = We?.symlinks) == null || yt.forEach((Et) => bi(Et, _t)), _t?.delete(e.toPath(Ye)); + } + function pi() { + c.forEach(yr), c.clear(); + } + function Xn(Ye, _t, yt, We, Et) { + E.assert(!Et); + let Xt = Te.get(We), rn = q.get(We); + if (Xt === void 0) { + const fe = e.realpath(yt); + Xt = fe !== yt && e.toPath(fe) !== We, Te.set(We, Xt), rn ? rn.isSymlink !== Xt && (rn.dirPathToWatcher.forEach((L) => { + tr(rn.isSymlink ? We : _t), L.watcher = ft(); + }), rn.isSymlink = Xt) : q.set( + We, + rn = { + dirPathToWatcher: /* @__PURE__ */ new Map(), + isSymlink: Xt + } + ); + } else + E.assertIsDefined(rn), E.assert(Xt === rn.isSymlink); + const ye = rn.dirPathToWatcher.get(_t); + ye ? ye.refCount++ : (rn.dirPathToWatcher.set(_t, { + watcher: ft(), + refCount: 1 + }), Xt && me.set(_t, (me.get(_t) ?? 0) + 1)); + function ft() { + return Xt ? di(yt, We, Et) : di(Ye, _t, Et); + } + } + function jr(Ye, _t, yt, We, Et) { + !We || !e.realpath ? di(Ye, _t, Et) : Xn(Ye, _t, yt, We, Et); + } + function di(Ye, _t, yt) { + let We = Z.get(_t); + return We ? (E.assert(!!yt == !!We.nonRecursive), We.refCount++) : Z.set(_t, We = { watcher: qr(Ye, _t, yt), refCount: 1, nonRecursive: yt }), We; + } + function Re(Ye, _t) { + const yt = e.toPath(Ye), We = mU( + Ye, + yt, + re, + te, + ie, + le, + O, + e.preferNonRecursiveWatch + ); + if (We) { + const { dirPath: Et, packageDirPath: Xt } = We; + if (Et === te) + _t = !0; + else if (Xt && e.realpath) { + const rn = q.get(Xt), ye = rn.dirPathToWatcher.get(Et); + if (ye.refCount--, ye.refCount === 0 && (tr(rn.isSymlink ? Xt : Et), rn.dirPathToWatcher.delete(Et), rn.isSymlink)) { + const ft = me.get(Et) - 1; + ft === 0 ? me.delete(Et) : me.set(Et, ft); + } + } else + tr(Et); + } + return _t; + } + function gt(Ye, _t, yt) { + if (E.checkDefined(Ye.files).delete(_t), Ye.files.size) return; + Ye.files = void 0; + const We = yt(Ye); + if (We && We.resolvedFileName) { + const ye = e.toPath(We.resolvedFileName), ft = m.get(ye); + ft?.delete(Ye) && !ft.size && m.delete(ye); + } + const { failedLookupLocations: Et, affectingLocations: Xt, alternateResult: rn } = Ye; + if (_.delete(Ye)) { + let ye = !1; + if (Et) + for (const ft of Et) + ye = Re(ft, ye); + rn && (ye = Re(rn, ye)), ye && tr(te); + } else Xt?.length && u.delete(Ye); + if (Xt) + for (const ye of Xt) { + const ft = J.get(ye); + ft.resolutions--; + } + } + function tr(Ye) { + const _t = Z.get(Ye); + _t.refCount--; + } + function qr(Ye, _t, yt) { + return e.watchDirectoryOfFailedLookupLocation( + Ye, + (We) => { + const Et = e.toPath(We); + F && F.addOrDeleteFileOrDirectory(We, Et), gs(Et, _t === Et); + }, + yt ? 0 : 1 + /* Recursive */ + ); + } + function Bn(Ye, _t, yt) { + const We = Ye.get(_t); + We && (We.forEach( + (Et) => gt( + Et, + _t, + yt + ) + ), Ye.delete(_t)); + } + function wn(Ye) { + if (!Bo( + Ye, + ".json" + /* Json */ + )) return; + const _t = e.getCurrentProgram(); + if (!_t) return; + const yt = _t.getResolvedProjectReferenceByPath(Ye); + yt && yt.commandLine.fileNames.forEach((We) => ki(e.toPath(We))); + } + function ki(Ye) { + Bn(R, Ye, cx), Bn(V, Ye, x7); + } + function Cs(Ye, _t) { + if (!Ye) return !1; + let yt = !1; + return Ye.forEach((We) => { + if (!(We.isInvalidated || !_t(We))) { + We.isInvalidated = yt = !0; + for (const Et of E.checkDefined(We.files)) + (s ?? (s = /* @__PURE__ */ new Set())).add(Et), h = h || Eo(Et, YD); + } + }), yt; + } + function Ks(Ye) { + ki(Ye); + const _t = h; + Cs(m.get(Ye), yb) && h && !_t && e.onChangedAutomaticTypeDirectiveNames(); + } + function xr(Ye) { + E.assert(o === Ye || o === void 0), o = Ye; + } + function gs(Ye, _t) { + if (_t) + (w || (w = /* @__PURE__ */ new Set())).add(Ye); + else { + const yt = jO(Ye); + if (!yt || (Ye = yt, e.fileIsOpen(Ye))) + return !1; + const We = Hn(Ye); + if (Dt(Ye) || XI(Ye) || Dt(We) || XI(We)) + (C || (C = /* @__PURE__ */ new Set())).add(Ye), (D || (D = /* @__PURE__ */ new Set())).add(Ye); + else { + if (oie(e.getCurrentProgram(), Ye) || Bo(Ye, ".map")) + return !1; + (C || (C = /* @__PURE__ */ new Set())).add(Ye), (D || (D = /* @__PURE__ */ new Set())).add(Ye); + const Et = BN( + Ye, + /*isFolder*/ + !0 + ); + Et && (D || (D = /* @__PURE__ */ new Set())).add(Et); + } + } + e.scheduleInvalidateResolutionsOfFailedLookupLocations(); + } + function Qe() { + const Ye = W.getPackageJsonInfoCache().getInternalMap(); + Ye && (C || D || w) && Ye.forEach((_t, yt) => Ve(yt) ? Ye.delete(yt) : void 0); + } + function Ct() { + var Ye; + if (A) + return S = void 0, Qe(), (C || D || w || T) && Cs(U, ee), C = void 0, D = void 0, w = void 0, T = void 0, !0; + let _t = !1; + return S && ((Ye = e.getCurrentProgram()) == null || Ye.getSourceFiles().forEach((yt) => { + at(yt.packageJsonLocations, (We) => S.has(We)) && ((s ?? (s = /* @__PURE__ */ new Set())).add(yt.path), _t = !0); + }), S = void 0), !C && !D && !w && !T || (_t = Cs(_, ee) || _t, Qe(), C = void 0, D = void 0, w = void 0, _t = Cs(u, K) || _t, T = void 0), _t; + } + function ee(Ye) { + var _t; + return K(Ye) ? !0 : !C && !D && !w ? !1 : ((_t = Ye.failedLookupLocations) == null ? void 0 : _t.some((yt) => Ve(e.toPath(yt)))) || !!Ye.alternateResult && Ve(e.toPath(Ye.alternateResult)); + } + function Ve(Ye) { + return C?.has(Ye) || _P(D?.keys() || [], (_t) => Vi(Ye, _t) ? !0 : void 0) || _P(w?.keys() || [], (_t) => Ye.length > _t.length && Vi(Ye, _t) && (oj(_t) || Ye[_t.length] === jo) ? !0 : void 0); + } + function K(Ye) { + var _t; + return !!T && ((_t = Ye.affectingLocations) == null ? void 0 : _t.some((yt) => T.has(yt))); + } + function Ie() { + P_(Ce, nd); + } + function $e(Ye) { + return Je(Ye) ? e.watchTypeRootsDirectory( + Ye, + (_t) => { + const yt = e.toPath(_t); + F && F.addOrDeleteFileOrDirectory(_t, yt), h = !0, e.onChangedAutomaticTypeDirectiveNames(); + const We = jie( + Ye, + e.toPath(Ye), + te, + ie, + le, + O, + e.preferNonRecursiveWatch, + (Et) => Z.has(Et) || me.has(Et) + ); + We && gs(yt, We === yt); + }, + 1 + /* Recursive */ + ) : w6; + } + function Ke() { + const Ye = e.getCompilationSettings(); + if (Ye.types) { + Ie(); + return; + } + const _t = LD(Ye, { getCurrentDirectory: O }); + _t ? Y4( + Ce, + new Set(_t), + { + createNewValue: $e, + onDeleteValue: nd + } + ) : Ie(); + } + function Je(Ye) { + return e.getCompilationSettings().typeRoots ? !0 : Lie(e.toPath(Ye)); + } + } + function Mje(e) { + var t, n; + return !!((t = e.resolvedModule) != null && t.originalPath || (n = e.resolvedTypeReferenceDirective) != null && n.originalPath); + } + var Pve = nl ? { + getCurrentDirectory: () => nl.getCurrentDirectory(), + getNewLine: () => nl.newLine, + getCanonicalFileName: Wl(nl.useCaseSensitiveFileNames) + } : void 0; + function ok(e, t) { + const n = e === nl && Pve ? Pve : { + getCurrentDirectory: () => e.getCurrentDirectory(), + getNewLine: () => e.newLine, + getCanonicalFileName: Wl(e.useCaseSensitiveFileNames) + }; + if (!t) + return (s) => e.write(XW(s, n)); + const i = new Array(1); + return (s) => { + i[0] = s, e.write(die(i, n) + n.getNewLine()), i[0] = void 0; + }; + } + function Nve(e, t, n) { + return e.clearScreen && !n.preserveWatchOutput && !n.extendedDiagnostics && !n.diagnostics && as(Ave, t.code) ? (e.clearScreen(), !0) : !1; + } + var Ave = [ + p.Starting_compilation_in_watch_mode.code, + p.File_change_detected_Starting_incremental_compilation.code + ]; + function Rje(e, t) { + return as(Ave, e.code) ? t + t : t; + } + function cA(e) { + return e.now ? ( + // On some systems / builds of Node, there's a non-breaking space between the time and AM/PM. + // This branch is solely for testing, so just switch it to a normal space for baseline stability. + // See: + // - https://github.com/nodejs/node/issues/45171 + // - https://github.com/nodejs/node/issues/45753 + e.now().toLocaleTimeString("en-US", { timeZone: "UTC" }).replace(" ", " ") + ) : (/* @__PURE__ */ new Date()).toLocaleTimeString(); + } + function hU(e, t) { + return t ? (n, i, s) => { + Nve(e, n, s); + let o = `[${c2( + cA(e), + "\x1B[90m" + /* Grey */ + )}] `; + o += `${vm(n.messageText, e.newLine)}${i + i}`, e.write(o); + } : (n, i, s) => { + let o = ""; + Nve(e, n, s) || (o += i), o += `${cA(e)} - `, o += `${vm(n.messageText, e.newLine)}${Rje(n, i)}`, e.write(o); + }; + } + function zie(e, t, n, i, s, o) { + const c = s; + c.onUnRecoverableConfigFileDiagnostic = (u) => Ove(s, o, u); + const _ = IN(e, t, c, n, i); + return c.onUnRecoverableConfigFileDiagnostic = void 0, _; + } + function JO(e) { + return b0( + e, + (t) => t.category === 1 + /* Error */ + ); + } + function zO(e) { + return kn( + e, + (n) => n.category === 1 + /* Error */ + ).map( + (n) => { + if (n.file !== void 0) + return `${n.file.fileName}`; + } + ).map((n) => { + if (n === void 0) + return; + const i = Pn(e, (s) => s.file !== void 0 && s.file.fileName === n); + if (i !== void 0) { + const { line: s } = js(i.file, i.start); + return { + fileName: n, + line: s + 1 + }; + } + }); + } + function yU(e) { + return e === 1 ? p.Found_1_error_Watching_for_file_changes : p.Found_0_errors_Watching_for_file_changes; + } + function Ive(e, t) { + const n = c2( + ":" + e.line, + "\x1B[90m" + /* Grey */ + ); + return i4(e.fileName) && i4(t) ? Df( + t, + e.fileName, + /*ignoreCase*/ + !1 + ) + n : e.fileName + n; + } + function vU(e, t, n, i) { + if (e === 0) return ""; + const s = t.filter((g) => g !== void 0), o = s.map((g) => `${g.fileName}:${g.line}`).filter((g, h, S) => S.indexOf(g) === h), c = s[0] && Ive(s[0], i.getCurrentDirectory()); + let _; + e === 1 ? _ = t[0] !== void 0 ? [p.Found_1_error_in_0, c] : [p.Found_1_error] : _ = o.length === 0 ? [p.Found_0_errors, e] : o.length === 1 ? [p.Found_0_errors_in_the_same_file_starting_at_Colon_1, e, c] : [p.Found_0_errors_in_1_files, e, o.length]; + const u = Ho(..._), m = o.length > 1 ? jje(s, i) : ""; + return `${n}${vm(u.messageText, n)}${n}${n}${m}`; + } + function jje(e, t) { + const n = e.filter((h, S, T) => S === T.findIndex((C) => C?.fileName === h?.fileName)); + if (n.length === 0) return ""; + const i = (h) => Math.log(h) * Math.LOG10E + 1, s = n.map((h) => [h, b0(e, (S) => S.fileName === h.fileName)]), o = wR(s, 0, (h) => h[1]), c = p.Errors_Files.message, _ = c.split(" ")[0].length, u = Math.max(_, i(o)), m = Math.max(i(o) - _, 0); + let g = ""; + return g += " ".repeat(m) + c + ` +`, s.forEach((h) => { + const [S, T] = h, C = Math.log(T) * Math.LOG10E + 1 | 0, D = C < u ? " ".repeat(u - C) : "", w = Ive(S, t.getCurrentDirectory()); + g += `${D}${T} ${w} +`; + }), g; + } + function bU(e) { + return !!e.state; + } + function Bje(e, t) { + const n = e.getCompilerOptions(); + n.explainFiles ? SU(bU(e) ? e.getProgram() : e, t) : (n.listFiles || n.listFilesOnly) && lr(e.getSourceFiles(), (i) => { + t(i.fileName); + }); + } + function SU(e, t) { + var n, i; + const s = e.getFileIncludeReasons(), o = (c) => s4(c, e.getCurrentDirectory(), e.getCanonicalFileName); + for (const c of e.getSourceFiles()) + t(`${D6(c, o)}`), (n = s.get(c.path)) == null || n.forEach((_) => t(` ${CU(e, _, o).messageText}`)), (i = TU(c, e.getCompilerOptionsForFile(c), o)) == null || i.forEach((_) => t(` ${_.messageText}`)); + } + function TU(e, t, n) { + var i; + let s; + if (e.path !== e.resolvedPath && (s ?? (s = [])).push(fs( + /*details*/ + void 0, + p.File_is_output_of_project_reference_source_0, + D6(e.originalFileName, n) + )), e.redirectInfo && (s ?? (s = [])).push(fs( + /*details*/ + void 0, + p.File_redirects_to_file_0, + D6(e.redirectInfo.redirectTarget, n) + )), $_(e)) + switch (GS(e, t)) { + case 99: + e.packageJsonScope && (s ?? (s = [])).push(fs( + /*details*/ + void 0, + p.File_is_ECMAScript_module_because_0_has_field_type_with_value_module, + D6(_a(e.packageJsonLocations), n) + )); + break; + case 1: + e.packageJsonScope ? (s ?? (s = [])).push(fs( + /*details*/ + void 0, + e.packageJsonScope.contents.packageJsonContent.type ? p.File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module : p.File_is_CommonJS_module_because_0_does_not_have_field_type, + D6(_a(e.packageJsonLocations), n) + )) : (i = e.packageJsonLocations) != null && i.length && (s ?? (s = [])).push(fs( + /*details*/ + void 0, + p.File_is_CommonJS_module_because_package_json_was_not_found + )); + break; + } + return s; + } + function xU(e, t) { + var n; + const i = e.getCompilerOptions().configFile; + if (!((n = i?.configFileSpecs) != null && n.validatedFilesSpec)) return; + const s = e.getCanonicalFileName(t), o = Hn(Xi(i.fileName, e.getCurrentDirectory())), c = ec(i.configFileSpecs.validatedFilesSpec, (_) => e.getCanonicalFileName(Xi(_, o)) === s); + return c !== -1 ? i.configFileSpecs.validatedFilesSpecBeforeSubstitution[c] : void 0; + } + function kU(e, t) { + var n, i; + const s = e.getCompilerOptions().configFile; + if (!((n = s?.configFileSpecs) != null && n.validatedIncludeSpecs)) return; + if (s.configFileSpecs.isDefaultIncludeSpec) return !0; + const o = Bo( + t, + ".json" + /* Json */ + ), c = Hn(Xi(s.fileName, e.getCurrentDirectory())), _ = e.useCaseSensitiveFileNames(), u = ec((i = s?.configFileSpecs) == null ? void 0 : i.validatedIncludeSpecs, (m) => { + if (o && !Eo( + m, + ".json" + /* Json */ + )) return !1; + const g = yJ(m, c, "files"); + return !!g && A0(`(${g})$`, _).test(t); + }); + return u !== -1 ? s.configFileSpecs.validatedIncludeSpecsBeforeSubstitution[u] : void 0; + } + function CU(e, t, n) { + var i, s; + const o = e.getCompilerOptions(); + if (Ev(t)) { + const c = ZD(e, t), _ = C6(c) ? c.file.text.substring(c.pos, c.end) : `"${c.text}"`; + let u; + switch (E.assert(C6(c) || t.kind === 3, "Only synthetic references are imports"), t.kind) { + case 3: + C6(c) ? u = c.packageId ? p.Imported_via_0_from_file_1_with_packageId_2 : p.Imported_via_0_from_file_1 : c.text === Wy ? u = c.packageId ? p.Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions : p.Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions : u = c.packageId ? p.Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions : p.Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions; + break; + case 4: + E.assert(!c.packageId), u = p.Referenced_via_0_from_file_1; + break; + case 5: + u = c.packageId ? p.Type_library_referenced_via_0_from_file_1_with_packageId_2 : p.Type_library_referenced_via_0_from_file_1; + break; + case 7: + E.assert(!c.packageId), u = p.Library_referenced_via_0_from_file_1; + break; + default: + E.assertNever(t); + } + return fs( + /*details*/ + void 0, + u, + _, + D6(c.file, n), + c.packageId && K1(c.packageId) + ); + } + switch (t.kind) { + case 0: + if (!((i = o.configFile) != null && i.configFileSpecs)) return fs( + /*details*/ + void 0, + p.Root_file_specified_for_compilation + ); + const c = Xi(e.getRootFileNames()[t.index], e.getCurrentDirectory()); + if (xU(e, c)) return fs( + /*details*/ + void 0, + p.Part_of_files_list_in_tsconfig_json + ); + const u = kU(e, c); + return rs(u) ? fs( + /*details*/ + void 0, + p.Matched_by_include_pattern_0_in_1, + u, + D6(o.configFile, n) + ) : ( + // Could be additional files specified as roots or matched by default include + fs( + /*details*/ + void 0, + u ? p.Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk : p.Root_file_specified_for_compilation + ) + ); + case 1: + case 2: + const m = t.kind === 2, g = E.checkDefined((s = e.getResolvedProjectReferences()) == null ? void 0 : s[t.index]); + return fs( + /*details*/ + void 0, + o.outFile ? m ? p.Output_from_referenced_project_0_included_because_1_specified : p.Source_from_referenced_project_0_included_because_1_specified : m ? p.Output_from_referenced_project_0_included_because_module_is_specified_as_none : p.Source_from_referenced_project_0_included_because_module_is_specified_as_none, + D6(g.sourceFile.fileName, n), + o.outFile ? "--outFile" : "--out" + ); + case 8: { + const h = o.types ? t.packageId ? [p.Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1, t.typeReference, K1(t.packageId)] : [p.Entry_point_of_type_library_0_specified_in_compilerOptions, t.typeReference] : t.packageId ? [p.Entry_point_for_implicit_type_library_0_with_packageId_1, t.typeReference, K1(t.packageId)] : [p.Entry_point_for_implicit_type_library_0, t.typeReference]; + return fs( + /*details*/ + void 0, + ...h + ); + } + case 6: { + if (t.index !== void 0) return fs( + /*details*/ + void 0, + p.Library_0_specified_in_compilerOptions, + o.lib[t.index] + ); + const h = A5(pa(o)), S = h ? [p.Default_library_for_target_0, h] : [p.Default_library]; + return fs( + /*details*/ + void 0, + ...S + ); + } + default: + E.assertNever(t); + } + } + function D6(e, t) { + const n = rs(e) ? e : e.fileName; + return t ? t(n) : n; + } + function WO(e, t, n, i, s, o, c, _) { + const u = e.getCompilerOptions(), m = e.getConfigFileParsingDiagnostics().slice(), g = m.length; + Nn(m, e.getSyntacticDiagnostics( + /*sourceFile*/ + void 0, + o + )), m.length === g && (Nn(m, e.getOptionsDiagnostics(o)), u.listFilesOnly || (Nn(m, e.getGlobalDiagnostics(o)), m.length === g && Nn(m, e.getSemanticDiagnostics( + /*sourceFile*/ + void 0, + o + )), u.noEmit && N_(u) && m.length === g && Nn(m, e.getDeclarationDiagnostics( + /*sourceFile*/ + void 0, + o + )))); + const h = u.listFilesOnly ? { emitSkipped: !0, diagnostics: He } : e.emit( + /*targetSourceFile*/ + void 0, + s, + o, + c, + _ + ); + Nn(m, h.diagnostics); + const S = mC(m); + if (S.forEach(t), n) { + const T = e.getCurrentDirectory(); + lr(h.emittedFiles, (C) => { + const D = Xi(C, T); + n(`TSFILE: ${D}`); + }), Bje(e, n); + } + return i && i(JO(S), zO(S)), { + emitResult: h, + diagnostics: S + }; + } + function EU(e, t, n, i, s, o, c, _) { + const { emitResult: u, diagnostics: m } = WO( + e, + t, + n, + i, + s, + o, + c, + _ + ); + return u.emitSkipped && m.length > 0 ? 1 : m.length > 0 ? 2 : 0; + } + var w6 = { close: Ja }, ew = () => w6; + function DU(e = nl, t) { + return { + onWatchStatusChange: t || hU(e), + watchFile: Is(e, e.watchFile) || ew, + watchDirectory: Is(e, e.watchDirectory) || ew, + setTimeout: Is(e, e.setTimeout) || Ja, + clearTimeout: Is(e, e.clearTimeout) || Ja, + preferNonRecursiveWatch: e.preferNonRecursiveWatch + }; + } + var Dl = { + ConfigFile: "Config file", + ExtendedConfigFile: "Extended config file", + SourceFile: "Source file", + MissingFile: "Missing file", + WildcardDirectory: "Wild card directory", + FailedLookupLocations: "Failed Lookup Locations", + AffectingFileLocation: "File location affecting resolution", + TypeRoots: "Type roots", + ConfigFileOfReferencedProject: "Config file of referened project", + ExtendedConfigOfReferencedProject: "Extended config file of referenced project", + WildcardDirectoryOfReferencedProject: "Wild card directory of referenced project", + PackageJson: "package.json file", + ClosedScriptInfo: "Closed Script info", + ConfigFileForInferredRoot: "Config file for the inferred project root", + NodeModules: "node_modules for closed script infos and package.jsons affecting module specifier cache", + MissingSourceMapFile: "Missing source map file", + NoopConfigFileForInferredRoot: "Noop Config file for the inferred project root", + MissingGeneratedFile: "Missing generated file", + NodeModulesForModuleSpecifierCache: "node_modules for module specifier cache invalidation", + TypingInstallerLocationFile: "File location for typing installer", + TypingInstallerLocationDirectory: "Directory location for typing installer" + }; + function wU(e, t) { + const n = e.trace ? t.extendedDiagnostics ? 2 : t.diagnostics ? 1 : 0 : 0, i = n !== 0 ? (o) => e.trace(o) : Ja, s = VW(e, n, i); + return s.writeLog = i, s; + } + function PU(e, t, n = e) { + const i = e.useCaseSensitiveFileNames(), s = { + getSourceFile: GW( + (o, c) => c ? e.readFile(o, c) : s.readFile(o), + /*setParentNodes*/ + void 0 + ), + getDefaultLibLocation: Is(e, e.getDefaultLibLocation), + getDefaultLibFileName: (o) => e.getDefaultLibFileName(o), + writeFile: $W( + (o, c, _) => e.writeFile(o, c, _), + (o) => e.createDirectory(o), + (o) => e.directoryExists(o) + ), + getCurrentDirectory: Iu(() => e.getCurrentDirectory()), + useCaseSensitiveFileNames: () => i, + getCanonicalFileName: Wl(i), + getNewLine: () => N0(t()), + fileExists: (o) => e.fileExists(o), + readFile: (o) => e.readFile(o), + trace: Is(e, e.trace), + directoryExists: Is(n, n.directoryExists), + getDirectories: Is(n, n.getDirectories), + realpath: Is(e, e.realpath), + getEnvironmentVariable: Is(e, e.getEnvironmentVariable) || (() => ""), + createHash: Is(e, e.createHash), + readDirectory: Is(e, e.readDirectory), + storeSignatureInfo: e.storeSignatureInfo, + jsDocParsingMode: e.jsDocParsingMode + }; + return s; + } + function UO(e, t) { + if (t.match(pne)) { + let n = t.length, i = n; + for (let s = n - 1; s >= 0; s--) { + const o = t.charCodeAt(s); + switch (o) { + case 10: + s && t.charCodeAt(s - 1) === 13 && s--; + // falls through + case 13: + break; + default: + if (o < 127 || !yu(o)) { + i = s; + continue; + } + break; + } + const c = t.substring(i, n); + if (c.match(hW)) { + t = t.substring(0, i); + break; + } else if (!c.match(yW)) + break; + n = i; + } + } + return (e.createHash || n4)(t); + } + function VO(e) { + const t = e.getSourceFile; + e.getSourceFile = (...n) => { + const i = t.call(e, ...n); + return i && (i.version = UO(e, i.text)), i; + }; + } + function NU(e, t) { + const n = Iu(() => Hn(Hs(e.getExecutingFilePath()))); + return { + useCaseSensitiveFileNames: () => e.useCaseSensitiveFileNames, + getNewLine: () => e.newLine, + getCurrentDirectory: Iu(() => e.getCurrentDirectory()), + getDefaultLibLocation: n, + getDefaultLibFileName: (i) => Ln(n(), wP(i)), + fileExists: (i) => e.fileExists(i), + readFile: (i, s) => e.readFile(i, s), + directoryExists: (i) => e.directoryExists(i), + getDirectories: (i) => e.getDirectories(i), + readDirectory: (i, s, o, c, _) => e.readDirectory(i, s, o, c, _), + realpath: Is(e, e.realpath), + getEnvironmentVariable: Is(e, e.getEnvironmentVariable), + trace: (i) => e.write(i + e.newLine), + createDirectory: (i) => e.createDirectory(i), + writeFile: (i, s, o) => e.writeFile(i, s, o), + createHash: Is(e, e.createHash), + createProgram: t || pU, + storeSignatureInfo: e.storeSignatureInfo, + now: Is(e, e.now) + }; + } + function Fve(e = nl, t, n, i) { + const s = (c) => e.write(c + e.newLine), o = NU(e, t); + return ER(o, DU(e, i)), o.afterProgramCreate = (c) => { + const _ = c.getCompilerOptions(), u = N0(_); + WO( + c, + n, + s, + (m) => o.onWatchStatusChange( + Ho(yU(m), m), + u, + _, + m + ) + ); + }, o; + } + function Ove(e, t, n) { + t(n), e.exit( + 1 + /* DiagnosticsPresent_OutputsSkipped */ + ); + } + function AU({ + configFileName: e, + optionsToExtend: t, + watchOptionsToExtend: n, + extraFileExtensions: i, + system: s, + createProgram: o, + reportDiagnostic: c, + reportWatchStatus: _ + }) { + const u = c || ok(s), m = Fve(s, o, u, _); + return m.onUnRecoverableConfigFileDiagnostic = (g) => Ove(s, u, g), m.configFileName = e, m.optionsToExtend = t, m.watchOptionsToExtend = n, m.extraFileExtensions = i, m; + } + function IU({ + rootFiles: e, + options: t, + watchOptions: n, + projectReferences: i, + system: s, + createProgram: o, + reportDiagnostic: c, + reportWatchStatus: _ + }) { + const u = Fve(s, o, c || ok(s), _); + return u.rootFiles = e, u.options = t, u.watchOptions = n, u.projectReferences = i, u; + } + function Wie(e) { + const t = e.system || nl, n = e.host || (e.host = HO(e.options, t)), i = Uie(e), s = EU( + i, + e.reportDiagnostic || ok(t), + (o) => n.trace && n.trace(o), + e.reportErrorSummary || e.options.pretty ? (o, c) => t.write(vU(o, c, t.newLine, n)) : void 0 + ); + return e.afterProgramEmitAndDiagnostics && e.afterProgramEmitAndDiagnostics(i), s; + } + function qO(e, t) { + const n = Cv(e); + if (!n) return; + let i; + if (t.getBuildInfo) + i = t.getBuildInfo(n, e.configFilePath); + else { + const s = t.readFile(n); + if (!s) return; + i = JW(n, s); + } + if (!(!i || i.version !== Xf || !aA(i))) + return Iie(i, n, t); + } + function HO(e, t = nl) { + const n = CO( + e, + /*setParentNodes*/ + void 0, + t + ); + return n.createHash = Is(t, t.createHash), n.storeSignatureInfo = t.storeSignatureInfo, VO(n), QD(n, (i) => oo(i, n.getCurrentDirectory(), n.getCanonicalFileName)), n; + } + function Uie({ + rootNames: e, + options: t, + configFileParsingDiagnostics: n, + projectReferences: i, + host: s, + createProgram: o + }) { + s = s || HO(t), o = o || pU; + const c = qO(t, s); + return o(e, t, s, c, n, i); + } + function Lve(e, t, n, i, s, o, c, _) { + return os(e) ? IU({ + rootFiles: e, + options: t, + watchOptions: _, + projectReferences: c, + system: n, + createProgram: i, + reportDiagnostic: s, + reportWatchStatus: o + }) : AU({ + configFileName: e, + optionsToExtend: t, + watchOptionsToExtend: c, + extraFileExtensions: _, + system: n, + createProgram: i, + reportDiagnostic: s, + reportWatchStatus: o + }); + } + function FU(e) { + let t, n, i, s, o = /* @__PURE__ */ new Map([[void 0, void 0]]), c, _, u, m, g = e.extendedConfigCache, h = !1; + const S = /* @__PURE__ */ new Map(); + let T, C = !1; + const D = e.useCaseSensitiveFileNames(), w = e.getCurrentDirectory(), { configFileName: A, optionsToExtend: O = {}, watchOptionsToExtend: F, extraFileExtensions: R, createProgram: W } = e; + let { rootFiles: V, options: $, watchOptions: U, projectReferences: _e } = e, Z, J, re = !1, te = !1; + const ie = A === void 0 ? void 0 : TO(e, w, D), le = ie || e, Te = OO(e, le); + let q = Nr(); + A && e.configFileParsingResult && (xr(e.configFileParsingResult), q = Nr()), Xn(p.Starting_compilation_in_watch_mode), A && !e.configFileParsingResult && (q = N0(O), E.assert(!V), Ks(), q = Nr()), E.assert($), E.assert(V); + const { watchFile: me, watchDirectory: Ce, writeLog: Ee } = wU(e, $), oe = Wl(D); + Ee(`Current directory: ${w} CaseSensitiveFileNames: ${D}`); + let ke; + A && (ke = me(A, qr, 2e3, U, Dl.ConfigFile)); + const ue = PU(e, () => $, le); + VO(ue); + const it = ue.getSourceFile; + ue.getSourceFile = (yt, ...We) => qn(yt, Dt(yt), ...We), ue.getSourceFileByPath = qn, ue.getNewLine = () => q, ue.fileExists = yr, ue.onReleaseOldSourceFile = pi, ue.onReleaseParsedCommandLine = Ct, ue.toPath = Dt, ue.getCompilationSettings = () => $, ue.useSourceOfProjectReferenceRedirect = Is(e, e.useSourceOfProjectReferenceRedirect), ue.preferNonRecursiveWatch = e.preferNonRecursiveWatch, ue.watchDirectoryOfFailedLookupLocation = (yt, We, Et) => Ce(yt, We, Et, U, Dl.FailedLookupLocations), ue.watchAffectingFileLocation = (yt, We) => me(yt, We, 2e3, U, Dl.AffectingFileLocation), ue.watchTypeRootsDirectory = (yt, We, Et) => Ce(yt, We, Et, U, Dl.TypeRoots), ue.getCachedDirectoryStructureHost = () => ie, ue.scheduleInvalidateResolutionsOfFailedLookupLocations = Re, ue.onInvalidatedResolution = tr, ue.onChangedAutomaticTypeDirectiveNames = tr, ue.fileIsOpen = Th, ue.getCurrentProgram = Ue, ue.writeLog = Ee, ue.getParsedCommandLine = gs; + const Oe = gU( + ue, + A ? Hn(Xi(A, w)) : w, + /*logChangesWhenResolvingModule*/ + !1 + ); + ue.resolveModuleNameLiterals = Is(e, e.resolveModuleNameLiterals), ue.resolveModuleNames = Is(e, e.resolveModuleNames), !ue.resolveModuleNameLiterals && !ue.resolveModuleNames && (ue.resolveModuleNameLiterals = Oe.resolveModuleNameLiterals.bind(Oe)), ue.resolveTypeReferenceDirectiveReferences = Is(e, e.resolveTypeReferenceDirectiveReferences), ue.resolveTypeReferenceDirectives = Is(e, e.resolveTypeReferenceDirectives), !ue.resolveTypeReferenceDirectiveReferences && !ue.resolveTypeReferenceDirectives && (ue.resolveTypeReferenceDirectiveReferences = Oe.resolveTypeReferenceDirectiveReferences.bind(Oe)), ue.resolveLibrary = e.resolveLibrary ? e.resolveLibrary.bind(e) : Oe.resolveLibrary.bind(Oe), ue.getModuleResolutionCache = e.resolveModuleNameLiterals || e.resolveModuleNames ? Is(e, e.getModuleResolutionCache) : () => Oe.getModuleResolutionCache(); + const he = !!e.resolveModuleNameLiterals || !!e.resolveTypeReferenceDirectiveReferences || !!e.resolveModuleNames || !!e.resolveTypeReferenceDirectives ? Is(e, e.hasInvalidatedResolutions) || yb : Th, ne = e.resolveLibrary ? Is(e, e.hasInvalidatedLibResolutions) || yb : Th; + return t = qO($, ue), bt(), A ? { getCurrentProgram: we, getProgram: wn, close: Ae, getResolutionCache: De } : { getCurrentProgram: we, getProgram: wn, updateRootFileNames: er, close: Ae, getResolutionCache: De }; + function Ae() { + di(), Oe.clear(), P_(S, (yt) => { + yt && yt.fileWatcher && (yt.fileWatcher.close(), yt.fileWatcher = void 0); + }), ke && (ke.close(), ke = void 0), g?.clear(), g = void 0, m && (P_(m, _p), m = void 0), s && (P_(s, _p), s = void 0), i && (P_(i, nd), i = void 0), u && (P_(u, (yt) => { + var We; + (We = yt.watcher) == null || We.close(), yt.watcher = void 0, yt.watchedDirectories && P_(yt.watchedDirectories, _p), yt.watchedDirectories = void 0; + }), u = void 0), t = void 0; + } + function De() { + return Oe; + } + function we() { + return t; + } + function Ue() { + return t && t.getProgramOrUndefined(); + } + function bt() { + Ee("Synchronizing program"), E.assert($), E.assert(V), di(); + const yt = we(); + C && (q = Nr(), yt && S7(yt.getCompilerOptions(), $) && Oe.onChangesAffectModuleResolution()); + const { hasInvalidatedResolutions: We, hasInvalidatedLibResolutions: Et } = Oe.createHasInvalidatedResolutions(he, ne), { + originalReadFile: Xt, + originalFileExists: rn, + originalDirectoryExists: ye, + originalCreateDirectory: ft, + originalWriteFile: fe, + readFileWithCache: L + } = QD(ue, Dt); + return rU(Ue(), V, $, (ve) => bi(ve, L), (ve) => ue.fileExists(ve), We, Et, jr, gs, _e) ? te && (h && Xn(p.File_change_detected_Starting_incremental_compilation), t = W( + /*rootNames*/ + void 0, + /*options*/ + void 0, + ue, + t, + J, + _e + ), te = !1) : (h && Xn(p.File_change_detected_Starting_incremental_compilation), Lt(We, Et)), h = !1, e.afterProgramCreate && yt !== t && e.afterProgramCreate(t), ue.readFile = Xt, ue.fileExists = rn, ue.directoryExists = ye, ue.createDirectory = ft, ue.writeFile = fe, o?.forEach((ve, X) => { + if (!X) + Ke(), A && Ye(Dt(A), $, U, Dl.ExtendedConfigFile); + else { + const lt = u?.get(X); + lt && _t(ve, X, lt); + } + }), o = void 0, t; + } + function Lt(yt, We) { + Ee("CreatingProgramWith::"), Ee(` roots: ${JSON.stringify(V)}`), Ee(` options: ${JSON.stringify($)}`), _e && Ee(` projectReferences: ${JSON.stringify(_e)}`); + const Et = C || !Ue(); + C = !1, te = !1, Oe.startCachingPerDirectoryResolution(), ue.hasInvalidatedResolutions = yt, ue.hasInvalidatedLibResolutions = We, ue.hasChangedAutomaticTypeDirectiveNames = jr; + const Xt = Ue(); + if (t = W(V, $, ue, t, J, _e), Oe.finishCachingPerDirectoryResolution(t.getProgram(), Xt), UW( + t.getProgram(), + i || (i = /* @__PURE__ */ new Map()), + Ie + ), Et && Oe.updateTypeRootsWatch(), T) { + for (const rn of T) + i.has(rn) || S.delete(rn); + T = void 0; + } + } + function er(yt) { + E.assert(!A, "Cannot update root file names with config file watch mode"), V = yt, tr(); + } + function Nr() { + return N0($ || O); + } + function Dt(yt) { + return oo(yt, w, oe); + } + function Qt(yt) { + return typeof yt == "boolean"; + } + function Wr(yt) { + return typeof yt.version == "boolean"; + } + function yr(yt) { + const We = Dt(yt); + return Qt(S.get(We)) ? !1 : le.fileExists(yt); + } + function qn(yt, We, Et, Xt, rn) { + const ye = S.get(We); + if (Qt(ye)) + return; + const ft = typeof Et == "object" ? Et.impliedNodeFormat : void 0; + if (ye === void 0 || rn || Wr(ye) || ye.sourceFile.impliedNodeFormat !== ft) { + const fe = it(yt, Et, Xt); + if (ye) + fe ? (ye.sourceFile = fe, ye.version = fe.version, ye.fileWatcher || (ye.fileWatcher = ee(We, yt, Ve, 250, U, Dl.SourceFile))) : (ye.fileWatcher && ye.fileWatcher.close(), S.set(We, !1)); + else if (fe) { + const L = ee(We, yt, Ve, 250, U, Dl.SourceFile); + S.set(We, { sourceFile: fe, version: fe.version, fileWatcher: L }); + } else + S.set(We, !1); + return fe; + } + return ye.sourceFile; + } + function Bt(yt) { + const We = S.get(yt); + We !== void 0 && (Qt(We) ? S.set(yt, { version: !1 }) : We.version = !1); + } + function bi(yt, We) { + const Et = S.get(yt); + if (!Et) return; + if (Et.version) return Et.version; + const Xt = We(yt); + return Xt !== void 0 ? UO(ue, Xt) : void 0; + } + function pi(yt, We, Et) { + const Xt = S.get(yt.resolvedPath); + Xt !== void 0 && (Qt(Xt) ? (T || (T = [])).push(yt.path) : Xt.sourceFile === yt && (Xt.fileWatcher && Xt.fileWatcher.close(), S.delete(yt.resolvedPath), Et || Oe.removeResolutionsOfFile(yt.path))); + } + function Xn(yt) { + e.onWatchStatusChange && e.onWatchStatusChange(Ho(yt), q, $ || O); + } + function jr() { + return Oe.hasChangedAutomaticTypeDirectiveNames(); + } + function di() { + return _ ? (e.clearTimeout(_), _ = void 0, !0) : !1; + } + function Re() { + if (!e.setTimeout || !e.clearTimeout) + return Oe.invalidateResolutionsOfFailedLookupLocations(); + const yt = di(); + Ee(`Scheduling invalidateFailedLookup${yt ? ", Cancelled earlier one" : ""}`), _ = e.setTimeout(gt, 250, "timerToInvalidateFailedLookupResolutions"); + } + function gt() { + _ = void 0, Oe.invalidateResolutionsOfFailedLookupLocations() && tr(); + } + function tr() { + !e.setTimeout || !e.clearTimeout || (c && e.clearTimeout(c), Ee("Scheduling update"), c = e.setTimeout(Bn, 250, "timerToUpdateProgram")); + } + function qr() { + E.assert(!!A), n = 2, tr(); + } + function Bn() { + c = void 0, h = !0, wn(); + } + function wn() { + switch (n) { + case 1: + ki(); + break; + case 2: + Cs(); + break; + default: + bt(); + break; + } + return we(); + } + function ki() { + Ee("Reloading new file names and options"), E.assert($), E.assert(A), n = 0, V = FD($.configFile.configFileSpecs, Xi(Hn(A), w), $, Te, R), GF( + V, + Xi(A, w), + $.configFile.configFileSpecs, + J, + re + ) && (te = !0), bt(); + } + function Cs() { + E.assert(A), Ee(`Reloading config file: ${A}`), n = 0, ie && ie.clearCache(), Ks(), C = !0, (o ?? (o = /* @__PURE__ */ new Map())).set(void 0, void 0), bt(); + } + function Ks() { + E.assert(A), xr( + IN( + A, + O, + Te, + g || (g = /* @__PURE__ */ new Map()), + F, + R + ) + ); + } + function xr(yt) { + V = yt.fileNames, $ = yt.options, U = yt.watchOptions, _e = yt.projectReferences, Z = yt.wildcardDirectories, J = l2(yt).slice(), re = RN(yt.raw), te = !0; + } + function gs(yt) { + const We = Dt(yt); + let Et = u?.get(We); + if (Et) { + if (!Et.updateLevel) return Et.parsedCommandLine; + if (Et.parsedCommandLine && Et.updateLevel === 1 && !e.getParsedCommandLine) { + Ee("Reloading new file names and options"), E.assert($); + const rn = FD( + Et.parsedCommandLine.options.configFile.configFileSpecs, + Xi(Hn(yt), w), + $, + Te + ); + return Et.parsedCommandLine = { ...Et.parsedCommandLine, fileNames: rn }, Et.updateLevel = void 0, Et.parsedCommandLine; + } + } + Ee(`Loading config file: ${yt}`); + const Xt = e.getParsedCommandLine ? e.getParsedCommandLine(yt) : Qe(yt); + return Et ? (Et.parsedCommandLine = Xt, Et.updateLevel = void 0) : (u || (u = /* @__PURE__ */ new Map())).set(We, Et = { parsedCommandLine: Xt }), (o ?? (o = /* @__PURE__ */ new Map())).set(We, yt), Xt; + } + function Qe(yt) { + const We = Te.onUnRecoverableConfigFileDiagnostic; + Te.onUnRecoverableConfigFileDiagnostic = Ja; + const Et = IN( + yt, + /*optionsToExtend*/ + void 0, + Te, + g || (g = /* @__PURE__ */ new Map()), + F + ); + return Te.onUnRecoverableConfigFileDiagnostic = We, Et; + } + function Ct(yt) { + var We; + const Et = Dt(yt), Xt = u?.get(Et); + Xt && (u.delete(Et), Xt.watchedDirectories && P_(Xt.watchedDirectories, _p), (We = Xt.watcher) == null || We.close(), WW(Et, m)); + } + function ee(yt, We, Et, Xt, rn, ye) { + return me(We, (ft, fe) => Et(ft, fe, yt), Xt, rn, ye); + } + function Ve(yt, We, Et) { + K(yt, Et, We), We === 2 && S.has(Et) && Oe.invalidateResolutionOfFile(Et), Bt(Et), tr(); + } + function K(yt, We, Et) { + ie && ie.addOrDeleteFile(yt, We, Et); + } + function Ie(yt, We) { + return u?.has(yt) ? w6 : ee( + yt, + We, + $e, + 500, + U, + Dl.MissingFile + ); + } + function $e(yt, We, Et) { + K(yt, Et, We), We === 0 && i.has(Et) && (i.get(Et).close(), i.delete(Et), Bt(Et), tr()); + } + function Ke() { + KN( + s || (s = /* @__PURE__ */ new Map()), + Z, + Je + ); + } + function Je(yt, We) { + return Ce( + yt, + (Et) => { + E.assert(A), E.assert($); + const Xt = Dt(Et); + ie && ie.addOrDeleteFileOrDirectory(Et, Xt), Bt(Xt), !eA({ + watchedDirPath: Dt(yt), + fileOrDirectory: Et, + fileOrDirectoryPath: Xt, + configFileName: A, + extraFileExtensions: R, + options: $, + program: we() || V, + currentDirectory: w, + useCaseSensitiveFileNames: D, + writeLog: Ee, + toPath: Dt + }) && n !== 2 && (n = 1, tr()); + }, + We, + U, + Dl.WildcardDirectory + ); + } + function Ye(yt, We, Et, Xt) { + xO( + yt, + We, + m || (m = /* @__PURE__ */ new Map()), + (rn, ye) => me( + rn, + (ft, fe) => { + var L; + K(rn, ye, fe), g && kO(g, ye, Dt); + const ve = (L = m.get(ye)) == null ? void 0 : L.projects; + ve?.size && ve.forEach((X) => { + if (A && Dt(A) === X) + n = 2; + else { + const lt = u?.get(X); + lt && (lt.updateLevel = 2), Oe.removeResolutionsFromProjectReferenceRedirects(X); + } + tr(); + }); + }, + 2e3, + Et, + Xt + ), + Dt + ); + } + function _t(yt, We, Et) { + var Xt, rn, ye, ft; + Et.watcher || (Et.watcher = me( + yt, + (fe, L) => { + K(yt, We, L); + const ve = u?.get(We); + ve && (ve.updateLevel = 2), Oe.removeResolutionsFromProjectReferenceRedirects(We), tr(); + }, + 2e3, + ((Xt = Et.parsedCommandLine) == null ? void 0 : Xt.watchOptions) || U, + Dl.ConfigFileOfReferencedProject + )), KN( + Et.watchedDirectories || (Et.watchedDirectories = /* @__PURE__ */ new Map()), + (rn = Et.parsedCommandLine) == null ? void 0 : rn.wildcardDirectories, + (fe, L) => { + var ve; + return Ce( + fe, + (X) => { + const lt = Dt(X); + ie && ie.addOrDeleteFileOrDirectory(X, lt), Bt(lt); + const zt = u?.get(We); + zt?.parsedCommandLine && (eA({ + watchedDirPath: Dt(fe), + fileOrDirectory: X, + fileOrDirectoryPath: lt, + configFileName: yt, + options: zt.parsedCommandLine.options, + program: zt.parsedCommandLine.fileNames, + currentDirectory: w, + useCaseSensitiveFileNames: D, + writeLog: Ee, + toPath: Dt + }) || zt.updateLevel !== 2 && (zt.updateLevel = 1, tr())); + }, + L, + ((ve = Et.parsedCommandLine) == null ? void 0 : ve.watchOptions) || U, + Dl.WildcardDirectoryOfReferencedProject + ); + } + ), Ye( + We, + (ye = Et.parsedCommandLine) == null ? void 0 : ye.options, + ((ft = Et.parsedCommandLine) == null ? void 0 : ft.watchOptions) || U, + Dl.ExtendedConfigOfReferencedProject + ); + } + } + var Vie = /* @__PURE__ */ ((e) => (e[e.Unbuildable = 0] = "Unbuildable", e[e.UpToDate = 1] = "UpToDate", e[e.UpToDateWithUpstreamTypes = 2] = "UpToDateWithUpstreamTypes", e[e.OutputMissing = 3] = "OutputMissing", e[e.ErrorReadingFile = 4] = "ErrorReadingFile", e[e.OutOfDateWithSelf = 5] = "OutOfDateWithSelf", e[e.OutOfDateWithUpstream = 6] = "OutOfDateWithUpstream", e[e.OutOfDateBuildInfoWithPendingEmit = 7] = "OutOfDateBuildInfoWithPendingEmit", e[e.OutOfDateBuildInfoWithErrors = 8] = "OutOfDateBuildInfoWithErrors", e[e.OutOfDateOptions = 9] = "OutOfDateOptions", e[e.OutOfDateRoots = 10] = "OutOfDateRoots", e[e.UpstreamOutOfDate = 11] = "UpstreamOutOfDate", e[e.UpstreamBlocked = 12] = "UpstreamBlocked", e[e.ComputingUpstream = 13] = "ComputingUpstream", e[e.TsVersionOutputOfDate = 14] = "TsVersionOutputOfDate", e[e.UpToDateWithInputFileText = 15] = "UpToDateWithInputFileText", e[e.ContainerOnly = 16] = "ContainerOnly", e[e.ForceBuild = 17] = "ForceBuild", e))(Vie || {}); + function OU(e) { + return Bo( + e, + ".json" + /* Json */ + ) ? e : Ln(e, "tsconfig.json"); + } + var Jje = /* @__PURE__ */ new Date(-864e13); + function zje(e, t, n) { + const i = e.get(t); + let s; + return i || (s = n(), e.set(t, s)), i || s; + } + function qie(e, t) { + return zje(e, t, () => /* @__PURE__ */ new Map()); + } + function LU(e) { + return e.now ? e.now() : /* @__PURE__ */ new Date(); + } + function ck(e) { + return !!e && !!e.buildOrder; + } + function lA(e) { + return ck(e) ? e.buildOrder : e; + } + function GO(e, t) { + return (n) => { + let i = t ? `[${c2( + cA(e), + "\x1B[90m" + /* Grey */ + )}] ` : `${cA(e)} - `; + i += `${vm(n.messageText, e.newLine)}${e.newLine + e.newLine}`, e.write(i); + }; + } + function Mve(e, t, n, i) { + const s = NU(e, t); + return s.getModifiedTime = e.getModifiedTime ? (o) => e.getModifiedTime(o) : vb, s.setModifiedTime = e.setModifiedTime ? (o, c) => e.setModifiedTime(o, c) : Ja, s.deleteFile = e.deleteFile ? (o) => e.deleteFile(o) : Ja, s.reportDiagnostic = n || ok(e), s.reportSolutionBuilderStatus = i || GO(e), s.now = Is(e, e.now), s; + } + function Hie(e = nl, t, n, i, s) { + const o = Mve(e, t, n, i); + return o.reportErrorSummary = s, o; + } + function Gie(e = nl, t, n, i, s) { + const o = Mve(e, t, n, i), c = DU(e, s); + return ER(o, c), o; + } + function Wje(e) { + const t = {}; + return MF.forEach((n) => { + ro(e, n.name) && (t[n.name] = e[n.name]); + }), t.tscBuild = !0, t; + } + function $ie(e, t, n) { + return nbe( + /*watch*/ + !1, + e, + t, + n + ); + } + function Xie(e, t, n, i) { + return nbe( + /*watch*/ + !0, + e, + t, + n, + i + ); + } + function Uje(e, t, n, i, s) { + const o = t, c = t, _ = Wje(i), u = PU(o, () => D.projectCompilerOptions); + VO(u), u.getParsedCommandLine = (w) => P6(D, w, cg(D, w)), u.resolveModuleNameLiterals = Is(o, o.resolveModuleNameLiterals), u.resolveTypeReferenceDirectiveReferences = Is(o, o.resolveTypeReferenceDirectiveReferences), u.resolveLibrary = Is(o, o.resolveLibrary), u.resolveModuleNames = Is(o, o.resolveModuleNames), u.resolveTypeReferenceDirectives = Is(o, o.resolveTypeReferenceDirectives), u.getModuleResolutionCache = Is(o, o.getModuleResolutionCache); + let m, g; + !u.resolveModuleNameLiterals && !u.resolveModuleNames && (m = h6(u.getCurrentDirectory(), u.getCanonicalFileName), u.resolveModuleNameLiterals = (w, A, O, F, R) => rA( + w, + A, + O, + F, + R, + o, + m, + KW + ), u.getModuleResolutionCache = () => m), !u.resolveTypeReferenceDirectiveReferences && !u.resolveTypeReferenceDirectives && (g = eO( + u.getCurrentDirectory(), + u.getCanonicalFileName, + /*options*/ + void 0, + m?.getPackageJsonInfoCache(), + m?.optionsToRedirectsKey + ), u.resolveTypeReferenceDirectiveReferences = (w, A, O, F, R) => rA( + w, + A, + O, + F, + R, + o, + g, + wO + )); + let h; + u.resolveLibrary || (h = h6( + u.getCurrentDirectory(), + u.getCanonicalFileName, + /*options*/ + void 0, + m?.getPackageJsonInfoCache() + ), u.resolveLibrary = (w, A, O) => tO( + w, + A, + O, + o, + h + )), u.getBuildInfo = (w, A) => $ve( + D, + w, + cg(D, A), + /*modifiedTime*/ + void 0 + ); + const { watchFile: S, watchDirectory: T, writeLog: C } = wU(c, i), D = { + host: o, + hostWithWatch: c, + parseConfigFileHost: OO(o), + write: Is(o, o.trace), + // State of solution + options: i, + baseCompilerOptions: _, + rootNames: n, + baseWatchOptions: s, + resolvedConfigFilePaths: /* @__PURE__ */ new Map(), + configFileCache: /* @__PURE__ */ new Map(), + projectStatus: /* @__PURE__ */ new Map(), + extendedConfigCache: /* @__PURE__ */ new Map(), + buildInfoCache: /* @__PURE__ */ new Map(), + outputTimeStamps: /* @__PURE__ */ new Map(), + builderPrograms: /* @__PURE__ */ new Map(), + diagnostics: /* @__PURE__ */ new Map(), + projectPendingBuild: /* @__PURE__ */ new Map(), + projectErrorsReported: /* @__PURE__ */ new Map(), + compilerHost: u, + moduleResolutionCache: m, + typeReferenceDirectiveResolutionCache: g, + libraryResolutionCache: h, + // Mutable state + buildOrder: void 0, + readFileWithCache: (w) => o.readFile(w), + projectCompilerOptions: _, + cache: void 0, + allProjectBuildPending: !0, + needsSummary: !0, + watchAllProjectsPending: e, + // Watch state + watch: e, + allWatchedWildcardDirectories: /* @__PURE__ */ new Map(), + allWatchedInputFiles: /* @__PURE__ */ new Map(), + allWatchedConfigFiles: /* @__PURE__ */ new Map(), + allWatchedExtendedConfigFiles: /* @__PURE__ */ new Map(), + allWatchedPackageJsonFiles: /* @__PURE__ */ new Map(), + filesWatched: /* @__PURE__ */ new Map(), + lastCachedPackageJsonLookups: /* @__PURE__ */ new Map(), + timerToBuildInvalidatedProject: void 0, + reportFileChangeDetected: !1, + watchFile: S, + watchDirectory: T, + writeLog: C + }; + return D; + } + function ad(e, t) { + return oo(t, e.compilerHost.getCurrentDirectory(), e.compilerHost.getCanonicalFileName); + } + function cg(e, t) { + const { resolvedConfigFilePaths: n } = e, i = n.get(t); + if (i !== void 0) return i; + const s = ad(e, t); + return n.set(t, s), s; + } + function Rve(e) { + return !!e.options; + } + function Vje(e, t) { + const n = e.configFileCache.get(t); + return n && Rve(n) ? n : void 0; + } + function P6(e, t, n) { + const { configFileCache: i } = e, s = i.get(n); + if (s) + return Rve(s) ? s : void 0; + Qo("SolutionBuilder::beforeConfigFileParsing"); + let o; + const { parseConfigFileHost: c, baseCompilerOptions: _, baseWatchOptions: u, extendedConfigCache: m, host: g } = e; + let h; + return g.getParsedCommandLine ? (h = g.getParsedCommandLine(t), h || (o = Ho(p.File_0_not_found, t))) : (c.onUnRecoverableConfigFileDiagnostic = (S) => o = S, h = IN(t, _, c, m, u), c.onUnRecoverableConfigFileDiagnostic = Ja), i.set(n, h || o), Qo("SolutionBuilder::afterConfigFileParsing"), Yf("SolutionBuilder::Config file parsing", "SolutionBuilder::beforeConfigFileParsing", "SolutionBuilder::afterConfigFileParsing"), h; + } + function uA(e, t) { + return OU(Iy(e.compilerHost.getCurrentDirectory(), t)); + } + function jve(e, t) { + const n = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s = []; + let o, c; + for (const u of t) + _(u); + return c ? { buildOrder: o || He, circularDiagnostics: c } : o || He; + function _(u, m) { + const g = cg(e, u); + if (i.has(g)) return; + if (n.has(g)) { + m || (c || (c = [])).push( + Ho( + p.Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0, + s.join(`\r +`) + ) + ); + return; + } + n.set(g, !0), s.push(u); + const h = P6(e, u, g); + if (h && h.projectReferences) + for (const S of h.projectReferences) { + const T = uA(e, S.path); + _(T, m || S.circular); + } + s.pop(), i.set(g, !0), (o || (o = [])).push(u); + } + } + function $O(e) { + return e.buildOrder || qje(e); + } + function qje(e) { + const t = jve(e, e.rootNames.map((s) => uA(e, s))); + e.resolvedConfigFilePaths.clear(); + const n = new Set( + lA(t).map( + (s) => cg(e, s) + ) + ), i = { onDeleteValue: Ja }; + return Vg(e.configFileCache, n, i), Vg(e.projectStatus, n, i), Vg(e.builderPrograms, n, i), Vg(e.diagnostics, n, i), Vg(e.projectPendingBuild, n, i), Vg(e.projectErrorsReported, n, i), Vg(e.buildInfoCache, n, i), Vg(e.outputTimeStamps, n, i), Vg(e.lastCachedPackageJsonLookups, n, i), e.watch && (Vg( + e.allWatchedConfigFiles, + n, + { onDeleteValue: nd } + ), e.allWatchedExtendedConfigFiles.forEach((s) => { + s.projects.forEach((o) => { + n.has(o) || s.projects.delete(o); + }), s.close(); + }), Vg( + e.allWatchedWildcardDirectories, + n, + { onDeleteValue: (s) => s.forEach(_p) } + ), Vg( + e.allWatchedInputFiles, + n, + { onDeleteValue: (s) => s.forEach(nd) } + ), Vg( + e.allWatchedPackageJsonFiles, + n, + { onDeleteValue: (s) => s.forEach(nd) } + )), e.buildOrder = t; + } + function Bve(e, t, n) { + const i = t && uA(e, t), s = $O(e); + if (ck(s)) return s; + if (i) { + const c = cg(e, i); + if (ec( + s, + (u) => cg(e, u) === c + ) === -1) return; + } + const o = i ? jve(e, [i]) : s; + return E.assert(!ck(o)), E.assert(!n || i !== void 0), E.assert(!n || o[o.length - 1] === i), n ? o.slice(0, o.length - 1) : o; + } + function Jve(e) { + e.cache && Qie(e); + const { compilerHost: t, host: n } = e, i = e.readFileWithCache, s = t.getSourceFile, { + originalReadFile: o, + originalFileExists: c, + originalDirectoryExists: _, + originalCreateDirectory: u, + originalWriteFile: m, + getSourceFileWithCache: g, + readFileWithCache: h + } = QD( + n, + (S) => ad(e, S), + (...S) => s.call(t, ...S) + ); + e.readFileWithCache = h, t.getSourceFile = g, e.cache = { + originalReadFile: o, + originalFileExists: c, + originalDirectoryExists: _, + originalCreateDirectory: u, + originalWriteFile: m, + originalReadFileWithCache: i, + originalGetSourceFile: s + }; + } + function Qie(e) { + if (!e.cache) return; + const { cache: t, host: n, compilerHost: i, extendedConfigCache: s, moduleResolutionCache: o, typeReferenceDirectiveResolutionCache: c, libraryResolutionCache: _ } = e; + n.readFile = t.originalReadFile, n.fileExists = t.originalFileExists, n.directoryExists = t.originalDirectoryExists, n.createDirectory = t.originalCreateDirectory, n.writeFile = t.originalWriteFile, i.getSourceFile = t.originalGetSourceFile, e.readFileWithCache = t.originalReadFileWithCache, s.clear(), o?.clear(), c?.clear(), _?.clear(), e.cache = void 0; + } + function zve(e, t) { + e.projectStatus.delete(t), e.diagnostics.delete(t); + } + function Wve({ projectPendingBuild: e }, t, n) { + const i = e.get(t); + (i === void 0 || i < n) && e.set(t, n); + } + function Uve(e, t) { + if (!e.allProjectBuildPending) return; + e.allProjectBuildPending = !1, e.options.watch && sse(e, p.Starting_compilation_in_watch_mode), Jve(e), lA($O(e)).forEach( + (i) => e.projectPendingBuild.set( + cg(e, i), + 0 + /* Update */ + ) + ), t && t.throwIfCancellationRequested(); + } + var Yie = /* @__PURE__ */ ((e) => (e[e.Build = 0] = "Build", e[e.UpdateOutputFileStamps = 1] = "UpdateOutputFileStamps", e))(Yie || {}); + function Vve(e, t) { + return e.projectPendingBuild.delete(t), e.diagnostics.has(t) ? 1 : 0; + } + function Hje(e, t, n, i, s) { + let o = !0; + return { + kind: 1, + project: t, + projectPath: n, + buildOrder: s, + getCompilerOptions: () => i.options, + getCurrentDirectory: () => e.compilerHost.getCurrentDirectory(), + updateOutputFileStatmps: () => { + Qve(e, i, n), o = !1; + }, + done: () => (o && Qve(e, i, n), Qo("SolutionBuilder::Timestamps only updates"), Vve(e, n)) + }; + } + function Gje(e, t, n, i, s, o, c) { + let _ = 0, u, m; + return { + kind: 0, + project: t, + projectPath: n, + buildOrder: c, + getCompilerOptions: () => s.options, + getCurrentDirectory: () => e.compilerHost.getCurrentDirectory(), + getBuilderProgram: () => h(lo), + getProgram: () => h( + (w) => w.getProgramOrUndefined() + ), + getSourceFile: (w) => h( + (A) => A.getSourceFile(w) + ), + getSourceFiles: () => S( + (w) => w.getSourceFiles() + ), + getOptionsDiagnostics: (w) => S( + (A) => A.getOptionsDiagnostics(w) + ), + getGlobalDiagnostics: (w) => S( + (A) => A.getGlobalDiagnostics(w) + ), + getConfigFileParsingDiagnostics: () => S( + (w) => w.getConfigFileParsingDiagnostics() + ), + getSyntacticDiagnostics: (w, A) => S( + (O) => O.getSyntacticDiagnostics(w, A) + ), + getAllDependencies: (w) => S( + (A) => A.getAllDependencies(w) + ), + getSemanticDiagnostics: (w, A) => S( + (O) => O.getSemanticDiagnostics(w, A) + ), + getSemanticDiagnosticsOfNextAffectedFile: (w, A) => h( + (O) => O.getSemanticDiagnosticsOfNextAffectedFile && O.getSemanticDiagnosticsOfNextAffectedFile(w, A) + ), + emit: (w, A, O, F, R) => w || F ? h( + (W) => { + var V, $; + return W.emit(w, A, O, F, R || (($ = (V = e.host).getCustomTransformers) == null ? void 0 : $.call(V, t))); + } + ) : (D(0, O), C(A, O, R)), + done: g + }; + function g(w, A, O) { + return D(3, w, A, O), Qo("SolutionBuilder::Projects built"), Vve(e, n); + } + function h(w) { + return D( + 0 + /* CreateProgram */ + ), u && w(u); + } + function S(w) { + return h(w) || He; + } + function T() { + var w, A, O; + if (E.assert(u === void 0), e.options.dry) { + ef(e, p.A_non_dry_build_would_build_project_0, t), m = 1, _ = 2; + return; + } + if (e.options.verbose && ef(e, p.Building_project_0, t), s.fileNames.length === 0) { + _A(e, n, l2(s)), m = 0, _ = 2; + return; + } + const { host: F, compilerHost: R } = e; + if (e.projectCompilerOptions = s.options, (w = e.moduleResolutionCache) == null || w.update(s.options), (A = e.typeReferenceDirectiveResolutionCache) == null || A.update(s.options), u = F.createProgram( + s.fileNames, + s.options, + R, + $je(e, n, s), + l2(s), + s.projectReferences + ), e.watch) { + const W = (O = e.moduleResolutionCache) == null ? void 0 : O.getPackageJsonInfoCache().getInternalMap(); + e.lastCachedPackageJsonLookups.set( + n, + W && new Set(Ki( + W.values(), + (V) => e.host.realpath && (KF(V) || V.directoryExists) ? e.host.realpath(Ln(V.packageDirectory, "package.json")) : Ln(V.packageDirectory, "package.json") + )) + ), e.builderPrograms.set(n, u); + } + _++; + } + function C(w, A, O) { + var F, R, W; + E.assertIsDefined(u), E.assert( + _ === 1 + /* Emit */ + ); + const { host: V, compilerHost: $ } = e, U = /* @__PURE__ */ new Map(), _e = u.getCompilerOptions(), Z = Vb(_e); + let J, re; + const { emitResult: te, diagnostics: ie } = WO( + u, + (le) => V.reportDiagnostic(le), + e.write, + /*reportSummary*/ + void 0, + (le, Te, q, me, Ce, Ee) => { + var oe; + const ke = ad(e, le); + if (U.set(ad(e, le), le), Ee?.buildInfo) { + re || (re = LU(e.host)); + const it = (oe = u.hasChangedEmitSignature) == null ? void 0 : oe.call(u), Oe = jU(e, le, n); + Oe ? (Oe.buildInfo = Ee.buildInfo, Oe.modifiedTime = re, it && (Oe.latestChangedDtsTime = re)) : e.buildInfoCache.set(n, { + path: ad(e, le), + buildInfo: Ee.buildInfo, + modifiedTime: re, + latestChangedDtsTime: it ? re : void 0 + }); + } + const ue = Ee?.differsOnlyInMap ? YT(e.host, le) : void 0; + (w || $.writeFile)( + le, + Te, + q, + me, + Ce, + Ee + ), Ee?.differsOnlyInMap ? e.host.setModifiedTime(le, ue) : !Z && e.watch && (J || (J = Kie(e, n))).set(ke, re || (re = LU(e.host))); + }, + A, + /*emitOnlyDtsFiles*/ + void 0, + O || ((R = (F = e.host).getCustomTransformers) == null ? void 0 : R.call(F, t)) + ); + return (!_e.noEmitOnError || !ie.length) && (U.size || o.type !== 8) && Xve(e, s, n, p.Updating_unchanged_output_timestamps_of_project_0, U), e.projectErrorsReported.set(n, !0), m = (W = u.hasChangedEmitSignature) != null && W.call(u) ? 0 : 2, ie.length ? (e.diagnostics.set(n, ie), e.projectStatus.set(n, { type: 0, reason: "it had errors" }), m |= 4) : (e.diagnostics.delete(n), e.projectStatus.set(n, { + type: 1, + oldestOutputFileName: pP(U.values()) ?? RW(s, !V.useCaseSensitiveFileNames()) + })), Xje(e, u), _ = 2, te; + } + function D(w, A, O, F) { + for (; _ <= w && _ < 3; ) { + const R = _; + switch (_) { + case 0: + T(); + break; + case 1: + C(O, A, F); + break; + case 2: + Kje(e, t, n, i, s, c, E.checkDefined(m)), _++; + break; + } + E.assert(_ > R); + } + } + } + function qve(e, t, n) { + if (!e.projectPendingBuild.size || ck(t)) return; + const { options: i, projectPendingBuild: s } = e; + for (let o = 0; o < t.length; o++) { + const c = t[o], _ = cg(e, c), u = e.projectPendingBuild.get(_); + if (u === void 0) continue; + n && (n = !1, abe(e, t)); + const m = P6(e, c, _); + if (!m) { + ibe(e, _), s.delete(_); + continue; + } + u === 2 ? (ebe(e, c, _, m), tbe(e, _, m), rbe(e, c, _, m), nse(e, c, _, m), ise(e, c, _, m)) : u === 1 && (m.fileNames = FD(m.options.configFile.configFileSpecs, Hn(c), m.options, e.parseConfigFileHost), GF( + m.fileNames, + c, + m.options.configFile.configFileSpecs, + m.errors, + RN(m.raw) + ), nse(e, c, _, m), ise(e, c, _, m)); + const g = tse(e, m, _); + if (!i.force) { + if (g.type === 1) { + JU(e, c, g), _A(e, _, l2(m)), s.delete(_), i.dry && ef(e, p.Project_0_is_up_to_date, c); + continue; + } + if (g.type === 2 || g.type === 15) + return _A(e, _, l2(m)), { + kind: 1, + status: g, + project: c, + projectPath: _, + projectIndex: o, + config: m + }; + } + if (g.type === 12) { + JU(e, c, g), _A(e, _, l2(m)), s.delete(_), i.verbose && ef( + e, + g.upstreamProjectBlocked ? p.Skipping_build_of_project_0_because_its_dependency_1_was_not_built : p.Skipping_build_of_project_0_because_its_dependency_1_has_errors, + c, + g.upstreamProjectName + ); + continue; + } + if (g.type === 16) { + JU(e, c, g), _A(e, _, l2(m)), s.delete(_); + continue; + } + return { + kind: 0, + status: g, + project: c, + projectPath: _, + projectIndex: o, + config: m + }; + } + } + function Hve(e, t, n) { + return JU(e, t.project, t.status), t.kind !== 1 ? Gje( + e, + t.project, + t.projectPath, + t.projectIndex, + t.config, + t.status, + n + ) : Hje( + e, + t.project, + t.projectPath, + t.config, + n + ); + } + function Zie(e, t, n) { + const i = qve(e, t, n); + return i && Hve(e, i, t); + } + function $je({ options: e, builderPrograms: t, compilerHost: n }, i, s) { + if (e.force) return; + const o = t.get(i); + return o || qO(s.options, n); + } + function Xje(e, t) { + t && (e.host.afterProgramEmitAndDiagnostics && e.host.afterProgramEmitAndDiagnostics(t), t.releaseProgram()), e.projectCompilerOptions = e.baseCompilerOptions; + } + function MU(e) { + return !!e.watcher; + } + function Gve(e, t) { + const n = ad(e, t), i = e.filesWatched.get(n); + if (e.watch && i) { + if (!MU(i)) return i; + if (i.modifiedTime) return i.modifiedTime; + } + const s = YT(e.host, t); + return e.watch && (i ? i.modifiedTime = s : e.filesWatched.set(n, s)), s; + } + function RU(e, t, n, i, s, o, c) { + const _ = ad(e, t), u = e.filesWatched.get(_); + if (u && MU(u)) + u.callbacks.push(n); + else { + const m = e.watchFile( + t, + (g, h, S) => { + const T = E.checkDefined(e.filesWatched.get(_)); + E.assert(MU(T)), T.modifiedTime = S, T.callbacks.forEach((C) => C(g, h, S)); + }, + i, + s, + o, + c + ); + e.filesWatched.set(_, { callbacks: [n], watcher: m, modifiedTime: u }); + } + return { + close: () => { + const m = E.checkDefined(e.filesWatched.get(_)); + E.assert(MU(m)), m.callbacks.length === 1 ? (e.filesWatched.delete(_), _p(m)) : XT(m.callbacks, n); + } + }; + } + function Kie(e, t) { + if (!e.watch) return; + let n = e.outputTimeStamps.get(t); + return n || e.outputTimeStamps.set(t, n = /* @__PURE__ */ new Map()), n; + } + function jU(e, t, n) { + const i = ad(e, t), s = e.buildInfoCache.get(n); + return s?.path === i ? s : void 0; + } + function $ve(e, t, n, i) { + const s = ad(e, t), o = e.buildInfoCache.get(n); + if (o !== void 0 && o.path === s) + return o.buildInfo || void 0; + const c = e.readFileWithCache(t), _ = c ? JW(t, c) : void 0; + return e.buildInfoCache.set(n, { path: s, buildInfo: _ || !1, modifiedTime: i || V_ }), _; + } + function ese(e, t, n, i) { + const s = Gve(e, t); + if (n < s) + return { + type: 5, + outOfDateOutputFileName: i, + newerInputFileName: t + }; + } + function Qje(e, t, n) { + var i, s, o, c, _; + if (Vz(t)) return { + type: 16 + /* ContainerOnly */ + }; + let u; + const m = !!e.options.force; + if (t.projectReferences) { + e.projectStatus.set(n, { + type: 13 + /* ComputingUpstream */ + }); + for (const ie of t.projectReferences) { + const le = ak(ie), Te = cg(e, le), q = P6(e, le, Te), me = tse(e, q, Te); + if (!(me.type === 13 || me.type === 16)) { + if (e.options.stopBuildOnErrors && (me.type === 0 || me.type === 12)) + return { + type: 12, + upstreamProjectName: ie.path, + upstreamProjectBlocked: me.type === 12 + /* UpstreamBlocked */ + }; + m || (u || (u = [])).push({ ref: ie, refStatus: me, resolvedRefPath: Te, resolvedConfig: q }); + } + } + } + if (m) return { + type: 17 + /* ForceBuild */ + }; + const { host: g } = e, h = Cv(t.options), S = Vb(t.options); + let T = jU(e, h, n); + const C = T?.modifiedTime || YT(g, h); + if (C === V_) + return T || e.buildInfoCache.set(n, { + path: ad(e, h), + buildInfo: !1, + modifiedTime: C + }), { + type: 3, + missingOutputFileName: h + }; + const D = $ve(e, h, n, C); + if (!D) + return { + type: 4, + fileName: h + }; + const w = S && aA(D) ? D : void 0; + if ((w || !S) && D.version !== Xf) + return { + type: 14, + version: D.version + }; + if (!t.options.noCheck && (D.errors || // TODO: syntax errors???? + D.checkPending)) + return { + type: 8, + buildInfoFile: h + }; + if (w) { + if (!t.options.noCheck && ((i = w.changeFileSet) != null && i.length || (s = w.semanticDiagnosticsPerFile) != null && s.length || N_(t.options) && ((o = w.emitDiagnosticsPerFile) != null && o.length))) + return { + type: 8, + buildInfoFile: h + }; + if (!t.options.noEmit && ((c = w.changeFileSet) != null && c.length || (_ = w.affectedFilesPendingEmit) != null && _.length || w.pendingEmit !== void 0)) + return { + type: 7, + buildInfoFile: h + }; + if ((!t.options.noEmit || t.options.noEmit && N_(t.options)) && MO( + t.options, + w.options || {}, + /*emitOnlyDtsFiles*/ + void 0, + !!t.options.noEmit + )) + return { + type: 9, + buildInfoFile: h + }; + } + let A = C, O = h, F, R = Jje, W = !1; + const V = /* @__PURE__ */ new Set(); + let $; + for (const ie of t.fileNames) { + const le = Gve(e, ie); + if (le === V_) + return { + type: 0, + reason: `${ie} does not exist` + }; + const Te = ad(e, ie); + if (C < le) { + let q, me; + if (w) { + $ || ($ = _U(w, h, g)); + const Ce = $.roots.get(Te); + q = $.fileInfos.get(Ce ?? Te); + const Ee = q ? e.readFileWithCache(Ce ?? ie) : void 0; + me = Ee !== void 0 ? UO(g, Ee) : void 0, q && q === me && (W = !0); + } + if (!q || q !== me) + return { + type: 5, + outOfDateOutputFileName: h, + newerInputFileName: ie + }; + } + le > R && (F = ie, R = le), V.add(Te); + } + let U; + if (w ? ($ || ($ = _U(w, h, g)), U = al( + $.roots, + // File was root file when project was built but its not any more + (ie, le) => V.has(le) ? void 0 : le + )) : U = lr( + Fie(D, h, g), + (ie) => V.has(ie) ? void 0 : ie + ), U) + return { + type: 10, + buildInfoFile: h, + inputFile: U + }; + if (!S) { + const ie = SO(t, !g.useCaseSensitiveFileNames()), le = Kie(e, n); + for (const Te of ie) { + if (Te === h) continue; + const q = ad(e, Te); + let me = le?.get(q); + if (me || (me = YT(e.host, Te), le?.set(q, me)), me === V_) + return { + type: 3, + missingOutputFileName: Te + }; + if (me < R) + return { + type: 5, + outOfDateOutputFileName: Te, + newerInputFileName: F + }; + me < A && (A = me, O = Te); + } + } + let _e = !1; + if (u) + for (const { ref: ie, refStatus: le, resolvedConfig: Te, resolvedRefPath: q } of u) { + if (le.newestInputFileTime && le.newestInputFileTime <= A) + continue; + if (Yje(e, T ?? (T = e.buildInfoCache.get(n)), q)) + return { + type: 6, + outOfDateOutputFileName: h, + newerProjectName: ie.path + }; + const me = Zje(e, Te.options, q); + if (me && me <= A) { + _e = !0; + continue; + } + return E.assert(O !== void 0, "Should have an oldest output filename here"), { + type: 6, + outOfDateOutputFileName: O, + newerProjectName: ie.path + }; + } + const Z = ese(e, t.options.configFilePath, A, O); + if (Z) return Z; + const J = lr(t.options.configFile.extendedSourceFiles || He, (ie) => ese(e, ie, A, O)); + if (J) return J; + const re = e.lastCachedPackageJsonLookups.get(n), te = re && jg( + re, + (ie) => ese(e, ie, A, O) + ); + return te || { + type: _e ? 2 : W ? 15 : 1, + newestInputFileTime: R, + newestInputFileName: F, + oldestOutputFileName: O + }; + } + function Yje(e, t, n) { + return e.buildInfoCache.get(n).path === t.path; + } + function tse(e, t, n) { + if (t === void 0) + return { type: 0, reason: "config file deleted mid-build" }; + const i = e.projectStatus.get(n); + if (i !== void 0) + return i; + Qo("SolutionBuilder::beforeUpToDateCheck"); + const s = Qje(e, t, n); + return Qo("SolutionBuilder::afterUpToDateCheck"), Yf("SolutionBuilder::Up-to-date check", "SolutionBuilder::beforeUpToDateCheck", "SolutionBuilder::afterUpToDateCheck"), e.projectStatus.set(n, s), s; + } + function Xve(e, t, n, i, s) { + if (t.options.noEmit) return; + let o; + const c = Cv(t.options), _ = Vb(t.options); + if (c && _) { + s?.has(ad(e, c)) || (e.options.verbose && ef(e, i, t.options.configFilePath), e.host.setModifiedTime(c, o = LU(e.host)), jU(e, c, n).modifiedTime = o), e.outputTimeStamps.delete(n); + return; + } + const { host: u } = e, m = SO(t, !u.useCaseSensitiveFileNames()), g = Kie(e, n), h = g ? /* @__PURE__ */ new Set() : void 0; + if (!s || m.length !== s.size) { + let S = !!e.options.verbose; + for (const T of m) { + const C = ad(e, T); + s?.has(C) || (S && (S = !1, ef(e, i, t.options.configFilePath)), u.setModifiedTime(T, o || (o = LU(e.host))), T === c ? jU(e, c, n).modifiedTime = o : g && (g.set(C, o), h.add(C))); + } + } + g?.forEach((S, T) => { + !s?.has(T) && !h.has(T) && g.delete(T); + }); + } + function Zje(e, t, n) { + if (!t.composite) return; + const i = E.checkDefined(e.buildInfoCache.get(n)); + if (i.latestChangedDtsTime !== void 0) return i.latestChangedDtsTime || void 0; + const s = i.buildInfo && aA(i.buildInfo) && i.buildInfo.latestChangedDtsFile ? e.host.getModifiedTime(Xi(i.buildInfo.latestChangedDtsFile, Hn(i.path))) : void 0; + return i.latestChangedDtsTime = s || !1, s; + } + function Qve(e, t, n) { + if (e.options.dry) + return ef(e, p.A_non_dry_build_would_update_timestamps_for_output_of_project_0, t.options.configFilePath); + Xve(e, t, n, p.Updating_output_timestamps_of_project_0), e.projectStatus.set(n, { + type: 1, + oldestOutputFileName: RW(t, !e.host.useCaseSensitiveFileNames()) + }); + } + function Kje(e, t, n, i, s, o, c) { + if (!(e.options.stopBuildOnErrors && c & 4) && s.options.composite) + for (let _ = i + 1; _ < o.length; _++) { + const u = o[_], m = cg(e, u); + if (e.projectPendingBuild.has(m)) continue; + const g = P6(e, u, m); + if (!(!g || !g.projectReferences)) + for (const h of g.projectReferences) { + const S = uA(e, h.path); + if (cg(e, S) !== n) continue; + const T = e.projectStatus.get(m); + if (T) + switch (T.type) { + case 1: + if (c & 2) { + T.type = 2; + break; + } + // falls through + case 15: + case 2: + c & 2 || e.projectStatus.set(m, { + type: 6, + outOfDateOutputFileName: T.oldestOutputFileName, + newerProjectName: t + }); + break; + case 12: + cg(e, uA(e, T.upstreamProjectName)) === n && zve(e, m); + break; + } + Wve( + e, + m, + 0 + /* Update */ + ); + break; + } + } + } + function Yve(e, t, n, i, s, o) { + Qo("SolutionBuilder::beforeBuild"); + const c = eBe(e, t, n, i, s, o); + return Qo("SolutionBuilder::afterBuild"), Yf("SolutionBuilder::Build", "SolutionBuilder::beforeBuild", "SolutionBuilder::afterBuild"), c; + } + function eBe(e, t, n, i, s, o) { + const c = Bve(e, t, o); + if (!c) return 3; + Uve(e, n); + let _ = !0, u = 0; + for (; ; ) { + const m = Zie(e, c, _); + if (!m) break; + _ = !1, m.done(n, i, s?.(m.project)), e.diagnostics.has(m.projectPath) || u++; + } + return Qie(e), sbe(e, c), iBe(e, c), ck(c) ? 4 : c.some((m) => e.diagnostics.has(cg(e, m))) ? u ? 2 : 1 : 0; + } + function Zve(e, t, n) { + Qo("SolutionBuilder::beforeClean"); + const i = tBe(e, t, n); + return Qo("SolutionBuilder::afterClean"), Yf("SolutionBuilder::Clean", "SolutionBuilder::beforeClean", "SolutionBuilder::afterClean"), i; + } + function tBe(e, t, n) { + const i = Bve(e, t, n); + if (!i) return 3; + if (ck(i)) + return BU(e, i.circularDiagnostics), 4; + const { options: s, host: o } = e, c = s.dry ? [] : void 0; + for (const _ of i) { + const u = cg(e, _), m = P6(e, _, u); + if (m === void 0) { + ibe(e, u); + continue; + } + const g = SO(m, !o.useCaseSensitiveFileNames()); + if (!g.length) continue; + const h = new Set(m.fileNames.map((S) => ad(e, S))); + for (const S of g) + h.has(ad(e, S)) || o.fileExists(S) && (c ? c.push(S) : (o.deleteFile(S), rse( + e, + u, + 0 + /* Update */ + ))); + } + return c && ef(e, p.A_non_dry_build_would_delete_the_following_files_Colon_0, c.map((_) => `\r + * ${_}`).join("")), 0; + } + function rse(e, t, n) { + e.host.getParsedCommandLine && n === 1 && (n = 2), n === 2 && (e.configFileCache.delete(t), e.buildOrder = void 0), e.needsSummary = !0, zve(e, t), Wve(e, t, n), Jve(e); + } + function XO(e, t, n) { + e.reportFileChangeDetected = !0, rse(e, t, n), Kve( + e, + 250, + /*changeDetected*/ + !0 + ); + } + function Kve(e, t, n) { + const { hostWithWatch: i } = e; + !i.setTimeout || !i.clearTimeout || (e.timerToBuildInvalidatedProject && i.clearTimeout(e.timerToBuildInvalidatedProject), e.timerToBuildInvalidatedProject = i.setTimeout(rBe, t, "timerToBuildInvalidatedProject", e, n)); + } + function rBe(e, t, n) { + Qo("SolutionBuilder::beforeBuild"); + const i = nBe(t, n); + Qo("SolutionBuilder::afterBuild"), Yf("SolutionBuilder::Build", "SolutionBuilder::beforeBuild", "SolutionBuilder::afterBuild"), i && sbe(t, i); + } + function nBe(e, t) { + e.timerToBuildInvalidatedProject = void 0, e.reportFileChangeDetected && (e.reportFileChangeDetected = !1, e.projectErrorsReported.clear(), sse(e, p.File_change_detected_Starting_incremental_compilation)); + let n = 0; + const i = $O(e), s = Zie( + e, + i, + /*reportQueue*/ + !1 + ); + if (s) + for (s.done(), n++; e.projectPendingBuild.size; ) { + if (e.timerToBuildInvalidatedProject) return; + const o = qve( + e, + i, + /*reportQueue*/ + !1 + ); + if (!o) break; + if (o.kind !== 1 && (t || n === 5)) { + Kve( + e, + 100, + /*changeDetected*/ + !1 + ); + return; + } + Hve(e, o, i).done(), o.kind !== 1 && n++; + } + return Qie(e), i; + } + function ebe(e, t, n, i) { + !e.watch || e.allWatchedConfigFiles.has(n) || e.allWatchedConfigFiles.set( + n, + RU( + e, + t, + () => XO( + e, + n, + 2 + /* Full */ + ), + 2e3, + i?.watchOptions, + Dl.ConfigFile, + t + ) + ); + } + function tbe(e, t, n) { + xO( + t, + n?.options, + e.allWatchedExtendedConfigFiles, + (i, s) => RU( + e, + i, + () => { + var o; + return (o = e.allWatchedExtendedConfigFiles.get(s)) == null ? void 0 : o.projects.forEach((c) => XO( + e, + c, + 2 + /* Full */ + )); + }, + 2e3, + n?.watchOptions, + Dl.ExtendedConfigFile + ), + (i) => ad(e, i) + ); + } + function rbe(e, t, n, i) { + e.watch && KN( + qie(e.allWatchedWildcardDirectories, n), + i.wildcardDirectories, + (s, o) => e.watchDirectory( + s, + (c) => { + var _; + eA({ + watchedDirPath: ad(e, s), + fileOrDirectory: c, + fileOrDirectoryPath: ad(e, c), + configFileName: t, + currentDirectory: e.compilerHost.getCurrentDirectory(), + options: i.options, + program: e.builderPrograms.get(n) || ((_ = Vje(e, n)) == null ? void 0 : _.fileNames), + useCaseSensitiveFileNames: e.parseConfigFileHost.useCaseSensitiveFileNames, + writeLog: (u) => e.writeLog(u), + toPath: (u) => ad(e, u) + }) || XO( + e, + n, + 1 + /* RootNamesAndUpdate */ + ); + }, + o, + i?.watchOptions, + Dl.WildcardDirectory, + t + ) + ); + } + function nse(e, t, n, i) { + e.watch && Y4( + qie(e.allWatchedInputFiles, n), + new Set(i.fileNames), + { + createNewValue: (s) => RU( + e, + s, + () => XO( + e, + n, + 0 + /* Update */ + ), + 250, + i?.watchOptions, + Dl.SourceFile, + t + ), + onDeleteValue: nd + } + ); + } + function ise(e, t, n, i) { + !e.watch || !e.lastCachedPackageJsonLookups || Y4( + qie(e.allWatchedPackageJsonFiles, n), + e.lastCachedPackageJsonLookups.get(n), + { + createNewValue: (s) => RU( + e, + s, + () => XO( + e, + n, + 0 + /* Update */ + ), + 2e3, + i?.watchOptions, + Dl.PackageJson, + t + ), + onDeleteValue: nd + } + ); + } + function iBe(e, t) { + if (e.watchAllProjectsPending) { + Qo("SolutionBuilder::beforeWatcherCreation"), e.watchAllProjectsPending = !1; + for (const n of lA(t)) { + const i = cg(e, n), s = P6(e, n, i); + ebe(e, n, i, s), tbe(e, i, s), s && (rbe(e, n, i, s), nse(e, n, i, s), ise(e, n, i, s)); + } + Qo("SolutionBuilder::afterWatcherCreation"), Yf("SolutionBuilder::Watcher creation", "SolutionBuilder::beforeWatcherCreation", "SolutionBuilder::afterWatcherCreation"); + } + } + function sBe(e) { + P_(e.allWatchedConfigFiles, nd), P_(e.allWatchedExtendedConfigFiles, _p), P_(e.allWatchedWildcardDirectories, (t) => P_(t, _p)), P_(e.allWatchedInputFiles, (t) => P_(t, nd)), P_(e.allWatchedPackageJsonFiles, (t) => P_(t, nd)); + } + function nbe(e, t, n, i, s) { + const o = Uje(e, t, n, i, s); + return { + build: (c, _, u, m) => Yve(o, c, _, u, m), + clean: (c) => Zve(o, c), + buildReferences: (c, _, u, m) => Yve( + o, + c, + _, + u, + m, + /*onlyReferences*/ + !0 + ), + cleanReferences: (c) => Zve( + o, + c, + /*onlyReferences*/ + !0 + ), + getNextInvalidatedProject: (c) => (Uve(o, c), Zie( + o, + $O(o), + /*reportQueue*/ + !1 + )), + getBuildOrder: () => $O(o), + getUpToDateStatusOfProject: (c) => { + const _ = uA(o, c), u = cg(o, _); + return tse(o, P6(o, _, u), u); + }, + invalidateProject: (c, _) => rse( + o, + c, + _ || 0 + /* Update */ + ), + close: () => sBe(o) + }; + } + function Zl(e, t) { + return s4(t, e.compilerHost.getCurrentDirectory(), e.compilerHost.getCanonicalFileName); + } + function ef(e, t, ...n) { + e.host.reportSolutionBuilderStatus(Ho(t, ...n)); + } + function sse(e, t, ...n) { + var i, s; + (s = (i = e.hostWithWatch).onWatchStatusChange) == null || s.call(i, Ho(t, ...n), e.host.getNewLine(), e.baseCompilerOptions); + } + function BU({ host: e }, t) { + t.forEach((n) => e.reportDiagnostic(n)); + } + function _A(e, t, n) { + BU(e, n), e.projectErrorsReported.set(t, !0), n.length && e.diagnostics.set(t, n); + } + function ibe(e, t) { + _A(e, t, [e.configFileCache.get(t)]); + } + function sbe(e, t) { + if (!e.needsSummary) return; + e.needsSummary = !1; + const n = e.watch || !!e.host.reportErrorSummary, { diagnostics: i } = e; + let s = 0, o = []; + ck(t) ? (abe(e, t.buildOrder), BU(e, t.circularDiagnostics), n && (s += JO(t.circularDiagnostics)), n && (o = [...o, ...zO(t.circularDiagnostics)])) : (t.forEach((c) => { + const _ = cg(e, c); + e.projectErrorsReported.has(_) || BU(e, i.get(_) || He); + }), n && i.forEach((c) => s += JO(c)), n && i.forEach((c) => [...o, ...zO(c)])), e.watch ? sse(e, yU(s), s) : e.host.reportErrorSummary && e.host.reportErrorSummary(s, o); + } + function abe(e, t) { + e.options.verbose && ef(e, p.Projects_in_this_build_Colon_0, t.map((n) => `\r + * ` + Zl(e, n)).join("")); + } + function aBe(e, t, n) { + switch (n.type) { + case 5: + return ef( + e, + p.Project_0_is_out_of_date_because_output_1_is_older_than_input_2, + Zl(e, t), + Zl(e, n.outOfDateOutputFileName), + Zl(e, n.newerInputFileName) + ); + case 6: + return ef( + e, + p.Project_0_is_out_of_date_because_output_1_is_older_than_input_2, + Zl(e, t), + Zl(e, n.outOfDateOutputFileName), + Zl(e, n.newerProjectName) + ); + case 3: + return ef( + e, + p.Project_0_is_out_of_date_because_output_file_1_does_not_exist, + Zl(e, t), + Zl(e, n.missingOutputFileName) + ); + case 4: + return ef( + e, + p.Project_0_is_out_of_date_because_there_was_error_reading_file_1, + Zl(e, t), + Zl(e, n.fileName) + ); + case 7: + return ef( + e, + p.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted, + Zl(e, t), + Zl(e, n.buildInfoFile) + ); + case 8: + return ef( + e, + p.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_program_needs_to_report_errors, + Zl(e, t), + Zl(e, n.buildInfoFile) + ); + case 9: + return ef( + e, + p.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions, + Zl(e, t), + Zl(e, n.buildInfoFile) + ); + case 10: + return ef( + e, + p.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more, + Zl(e, t), + Zl(e, n.buildInfoFile), + Zl(e, n.inputFile) + ); + case 1: + if (n.newestInputFileTime !== void 0) + return ef( + e, + p.Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2, + Zl(e, t), + Zl(e, n.newestInputFileName || ""), + Zl(e, n.oldestOutputFileName || "") + ); + break; + case 2: + return ef( + e, + p.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies, + Zl(e, t) + ); + case 15: + return ef( + e, + p.Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files, + Zl(e, t) + ); + case 11: + return ef( + e, + p.Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date, + Zl(e, t), + Zl(e, n.upstreamProjectName) + ); + case 12: + return ef( + e, + n.upstreamProjectBlocked ? p.Project_0_can_t_be_built_because_its_dependency_1_was_not_built : p.Project_0_can_t_be_built_because_its_dependency_1_has_errors, + Zl(e, t), + Zl(e, n.upstreamProjectName) + ); + case 0: + return ef( + e, + p.Project_0_is_out_of_date_because_1, + Zl(e, t), + n.reason + ); + case 14: + return ef( + e, + p.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2, + Zl(e, t), + n.version, + Xf + ); + case 17: + return ef( + e, + p.Project_0_is_being_forcibly_rebuilt, + Zl(e, t) + ); + } + } + function JU(e, t, n) { + e.options.verbose && aBe(e, t, n); + } + var ase = /* @__PURE__ */ ((e) => (e[e.time = 0] = "time", e[e.count = 1] = "count", e[e.memory = 2] = "memory", e))(ase || {}); + function oBe(e) { + const t = cBe(); + return lr(e.getSourceFiles(), (n) => { + const i = lBe(e, n), s = Ag(n).length; + t.set(i, t.get(i) + s); + }), t; + } + function cBe() { + const e = /* @__PURE__ */ new Map(); + return e.set("Library", 0), e.set("Definitions", 0), e.set("TypeScript", 0), e.set("JavaScript", 0), e.set("JSON", 0), e.set("Other", 0), e; + } + function lBe(e, t) { + if (e.isSourceFileDefaultLibrary(t)) + return "Library"; + if (t.isDeclarationFile) + return "Definitions"; + const n = t.path; + return vc(n, bJ) ? "TypeScript" : vc(n, GC) ? "JavaScript" : Bo( + n, + ".json" + /* Json */ + ) ? "JSON" : "Other"; + } + function zU(e, t, n) { + return QO(e, n) ? ok( + e, + /*pretty*/ + !0 + ) : t; + } + function obe(e) { + return !!e.writeOutputIsTTY && e.writeOutputIsTTY() && !e.getEnvironmentVariable("NO_COLOR"); + } + function QO(e, t) { + return !t || typeof t.pretty > "u" ? obe(e) : t.pretty; + } + function cbe(e) { + return e.options.all ? W_(Nd.concat(JS), (t, n) => gP(t.name, n.name)) : kn(Nd.concat(JS), (t) => !!t.showInSimplifiedHelpView); + } + function WU(e) { + e.write(g_(p.Version_0, Xf) + e.newLine); + } + function UU(e) { + if (!obe(e)) + return { + bold: (g) => g, + blue: (g) => g, + blueBackground: (g) => g, + brightWhite: (g) => g + }; + function n(g) { + return `\x1B[1m${g}\x1B[22m`; + } + const i = e.getEnvironmentVariable("OS") && e.getEnvironmentVariable("OS").toLowerCase().includes("windows"), s = e.getEnvironmentVariable("WT_SESSION"), o = e.getEnvironmentVariable("TERM_PROGRAM") && e.getEnvironmentVariable("TERM_PROGRAM") === "vscode"; + function c(g) { + return i && !s && !o ? m(g) : `\x1B[94m${g}\x1B[39m`; + } + const _ = e.getEnvironmentVariable("COLORTERM") === "truecolor" || e.getEnvironmentVariable("TERM") === "xterm-256color"; + function u(g) { + return _ ? `\x1B[48;5;68m${g}\x1B[39;49m` : `\x1B[44m${g}\x1B[39;49m`; + } + function m(g) { + return `\x1B[97m${g}\x1B[39m`; + } + return { + bold: n, + blue: c, + brightWhite: m, + blueBackground: u + }; + } + function lbe(e) { + return `--${e.name}${e.shortName ? `, -${e.shortName}` : ""}`; + } + function uBe(e, t, n, i) { + var s; + const o = [], c = UU(e), _ = lbe(t), u = C(t), m = typeof t.defaultValueDescription == "object" ? g_(t.defaultValueDescription) : h( + t.defaultValueDescription, + t.type === "list" || t.type === "listOrElement" ? t.element.type : t.type + ), g = ((s = e.getWidthOfTerminal) == null ? void 0 : s.call(e)) ?? 0; + if (g >= 80) { + let D = ""; + t.description && (D = g_(t.description)), o.push(...T( + _, + D, + n, + i, + g, + /*colorLeft*/ + !0 + ), e.newLine), S(u, t) && (u && o.push(...T( + u.valueType, + u.possibleValues, + n, + i, + g, + /*colorLeft*/ + !1 + ), e.newLine), m && o.push(...T( + g_(p.default_Colon), + m, + n, + i, + g, + /*colorLeft*/ + !1 + ), e.newLine)), o.push(e.newLine); + } else { + if (o.push(c.blue(_), e.newLine), t.description) { + const D = g_(t.description); + o.push(D); + } + if (o.push(e.newLine), S(u, t)) { + if (u && o.push(`${u.valueType} ${u.possibleValues}`), m) { + u && o.push(e.newLine); + const D = g_(p.default_Colon); + o.push(`${D} ${m}`); + } + o.push(e.newLine); + } + o.push(e.newLine); + } + return o; + function h(D, w) { + return D !== void 0 && typeof w == "object" ? Ki(w.entries()).filter(([, A]) => A === D).map(([A]) => A).join("/") : String(D); + } + function S(D, w) { + const A = ["string"], O = [void 0, "false", "n/a"], F = w.defaultValueDescription; + return !(w.category === p.Command_line_Options || as(A, D?.possibleValues) && as(O, F)); + } + function T(D, w, A, O, F, R) { + const W = []; + let V = !0, $ = w; + const U = F - O; + for (; $.length > 0; ) { + let _e = ""; + V ? (_e = D.padStart(A), _e = _e.padEnd(O), _e = R ? c.blue(_e) : _e) : _e = "".padStart(O); + const Z = $.substr(0, U); + $ = $.slice(U), W.push(`${_e}${Z}`), V = !1; + } + return W; + } + function C(D) { + if (D.type === "object") + return; + return { + valueType: w(D), + possibleValues: A(D) + }; + function w(O) { + switch (E.assert(O.type !== "listOrElement"), O.type) { + case "string": + case "number": + case "boolean": + return g_(p.type_Colon); + case "list": + return g_(p.one_or_more_Colon); + default: + return g_(p.one_of_Colon); + } + } + function A(O) { + let F; + switch (O.type) { + case "string": + case "number": + case "boolean": + F = O.type; + break; + case "list": + case "listOrElement": + F = A(O.element); + break; + case "object": + F = ""; + break; + default: + const R = {}; + return O.type.forEach((W, V) => { + var $; + ($ = O.deprecatedKeys) != null && $.has(V) || (R[W] || (R[W] = [])).push(V); + }), Object.entries(R).map(([, W]) => W.join("/")).join(", "); + } + return F; + } + } + } + function ube(e, t) { + let n = 0; + for (const c of t) { + const _ = lbe(c).length; + n = n > _ ? n : _; + } + const i = n + 2, s = i + 2; + let o = []; + for (const c of t) { + const _ = uBe(e, c, i, s); + o = [...o, ..._]; + } + return o[o.length - 2] !== e.newLine && o.push(e.newLine), o; + } + function fA(e, t, n, i, s, o) { + let c = []; + if (c.push(UU(e).bold(t) + e.newLine + e.newLine), s && c.push(s + e.newLine + e.newLine), !i) + return c = [...c, ...ube(e, n)], o && c.push(o + e.newLine + e.newLine), c; + const _ = /* @__PURE__ */ new Map(); + for (const u of n) { + if (!u.category) + continue; + const m = g_(u.category), g = _.get(m) ?? []; + g.push(u), _.set(m, g); + } + return _.forEach((u, m) => { + c.push(`### ${m}${e.newLine}${e.newLine}`), c = [...c, ...ube(e, u)]; + }), o && c.push(o + e.newLine + e.newLine), c; + } + function _Be(e, t) { + const n = UU(e); + let i = [...VU(e, `${g_(p.tsc_Colon_The_TypeScript_Compiler)} - ${g_(p.Version_0, Xf)}`)]; + i.push(n.bold(g_(p.COMMON_COMMANDS)) + e.newLine + e.newLine), c("tsc", p.Compiles_the_current_project_tsconfig_json_in_the_working_directory), c("tsc app.ts util.ts", p.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options), c("tsc -b", p.Build_a_composite_project_in_the_working_directory), c("tsc --init", p.Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory), c("tsc -p ./path/to/tsconfig.json", p.Compiles_the_TypeScript_project_located_at_the_specified_path), c("tsc --help --all", p.An_expanded_version_of_this_information_showing_all_possible_compiler_options), c(["tsc --noEmit", "tsc --target esnext"], p.Compiles_the_current_project_with_additional_settings); + const s = t.filter((_) => _.isCommandLineOnly || _.category === p.Command_line_Options), o = t.filter((_) => !as(s, _)); + i = [ + ...i, + ...fA( + e, + g_(p.COMMAND_LINE_FLAGS), + s, + /*subCategory*/ + !1, + /*beforeOptionsDescription*/ + void 0, + /*afterOptionsDescription*/ + void 0 + ), + ...fA( + e, + g_(p.COMMON_COMPILER_OPTIONS), + o, + /*subCategory*/ + !1, + /*beforeOptionsDescription*/ + void 0, + Dx(p.You_can_learn_about_all_of_the_compiler_options_at_0, "https://aka.ms/tsc") + ) + ]; + for (const _ of i) + e.write(_); + function c(_, u) { + const m = typeof _ == "string" ? [_] : _; + for (const g of m) + i.push(" " + n.blue(g) + e.newLine); + i.push(" " + g_(u) + e.newLine + e.newLine); + } + } + function fBe(e, t, n, i) { + let s = [...VU(e, `${g_(p.tsc_Colon_The_TypeScript_Compiler)} - ${g_(p.Version_0, Xf)}`)]; + s = [...s, ...fA( + e, + g_(p.ALL_COMPILER_OPTIONS), + t, + /*subCategory*/ + !0, + /*beforeOptionsDescription*/ + void 0, + Dx(p.You_can_learn_about_all_of_the_compiler_options_at_0, "https://aka.ms/tsc") + )], s = [...s, ...fA( + e, + g_(p.WATCH_OPTIONS), + i, + /*subCategory*/ + !1, + g_(p.Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon) + )], s = [...s, ...fA( + e, + g_(p.BUILD_OPTIONS), + kn(n, (o) => o !== JS), + /*subCategory*/ + !1, + Dx(p.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0, "https://aka.ms/tsc-composite-builds") + )]; + for (const o of s) + e.write(o); + } + function _be(e, t) { + let n = [...VU(e, `${g_(p.tsc_Colon_The_TypeScript_Compiler)} - ${g_(p.Version_0, Xf)}`)]; + n = [...n, ...fA( + e, + g_(p.BUILD_OPTIONS), + kn(t, (i) => i !== JS), + /*subCategory*/ + !1, + Dx(p.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0, "https://aka.ms/tsc-composite-builds") + )]; + for (const i of n) + e.write(i); + } + function VU(e, t) { + var n; + const i = UU(e), s = [], o = ((n = e.getWidthOfTerminal) == null ? void 0 : n.call(e)) ?? 0, c = 5, _ = i.blueBackground("".padStart(c)), u = i.blueBackground(i.brightWhite("TS ".padStart(c))); + if (o >= t.length + c) { + const g = (o > 120 ? 120 : o) - c; + s.push(t.padEnd(g) + _ + e.newLine), s.push("".padStart(g) + u + e.newLine); + } else + s.push(t + e.newLine), s.push(e.newLine); + return s; + } + function fbe(e, t) { + t.options.all ? fBe(e, cbe(t), Iz, ek) : _Be(e, cbe(t)); + } + function pbe(e, t, n) { + let i = ok(e), s; + if (n.options.locale && bj(n.options.locale, e, n.errors), n.errors.length > 0) + return n.errors.forEach(i), e.exit( + 1 + /* DiagnosticsPresent_OutputsSkipped */ + ); + if (n.options.init) + return gBe(e, i, n.options, n.fileNames), e.exit( + 0 + /* Success */ + ); + if (n.options.version) + return WU(e), e.exit( + 0 + /* Success */ + ); + if (n.options.help || n.options.all) + return fbe(e, n), e.exit( + 0 + /* Success */ + ); + if (n.options.watch && n.options.listFilesOnly) + return i(Ho(p.Options_0_and_1_cannot_be_combined, "watch", "listFilesOnly")), e.exit( + 1 + /* DiagnosticsPresent_OutputsSkipped */ + ); + if (n.options.project) { + if (n.fileNames.length !== 0) + return i(Ho(p.Option_project_cannot_be_mixed_with_source_files_on_a_command_line)), e.exit( + 1 + /* DiagnosticsPresent_OutputsSkipped */ + ); + const _ = Hs(n.options.project); + if (!_ || e.directoryExists(_)) { + if (s = Ln(_, "tsconfig.json"), !e.fileExists(s)) + return i(Ho(p.Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0, n.options.project)), e.exit( + 1 + /* DiagnosticsPresent_OutputsSkipped */ + ); + } else if (s = _, !e.fileExists(s)) + return i(Ho(p.The_specified_path_does_not_exist_Colon_0, n.options.project)), e.exit( + 1 + /* DiagnosticsPresent_OutputsSkipped */ + ); + } else if (n.fileNames.length === 0) { + const _ = Hs(e.getCurrentDirectory()); + s = qW(_, (u) => e.fileExists(u)); + } + if (n.fileNames.length === 0 && !s) + return n.options.showConfig ? i(Ho(p.Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0, Hs(e.getCurrentDirectory()))) : (WU(e), fbe(e, n)), e.exit( + 1 + /* DiagnosticsPresent_OutputsSkipped */ + ); + const o = e.getCurrentDirectory(), c = VF( + n.options, + (_) => Xi(_, o) + ); + if (s) { + const _ = /* @__PURE__ */ new Map(), u = zie(s, c, _, n.watchOptions, e, i); + if (c.showConfig) + return u.errors.length !== 0 ? (i = zU( + e, + i, + u.options + ), u.errors.forEach(i), e.exit( + 1 + /* DiagnosticsPresent_OutputsSkipped */ + )) : (e.write(JSON.stringify(Jz(u, s, e), null, 4) + e.newLine), e.exit( + 0 + /* Success */ + )); + if (i = zU( + e, + i, + u.options + ), iJ(u.options)) + return cse(e, i) ? void 0 : pBe( + e, + t, + i, + u, + c, + n.watchOptions, + _ + ); + Vb(u.options) ? hbe( + e, + t, + i, + u + ) : gbe( + e, + t, + i, + u + ); + } else { + if (c.showConfig) + return e.write(JSON.stringify(Jz(n, Ln(o, "tsconfig.json"), e), null, 4) + e.newLine), e.exit( + 0 + /* Success */ + ); + if (i = zU( + e, + i, + c + ), iJ(c)) + return cse(e, i) ? void 0 : dBe( + e, + t, + i, + n.fileNames, + c, + n.watchOptions + ); + Vb(c) ? hbe( + e, + t, + i, + { ...n, options: c } + ) : gbe( + e, + t, + i, + { ...n, options: c } + ); + } + } + function ose(e) { + if (e.length > 0 && e[0].charCodeAt(0) === 45) { + const t = e[0].slice(e[0].charCodeAt(1) === 45 ? 2 : 1).toLowerCase(); + return t === JS.name || t === JS.shortName; + } + return !1; + } + function dbe(e, t, n) { + if (ose(n)) { + const { buildOptions: s, watchOptions: o, projects: c, errors: _ } = Sre(n); + if (s.generateCpuProfile && e.enableCPUProfiler) + e.enableCPUProfiler(s.generateCpuProfile, () => mbe( + e, + t, + s, + o, + c, + _ + )); + else + return mbe( + e, + t, + s, + o, + c, + _ + ); + } + const i = vre(n, (s) => e.readFile(s)); + if (i.options.generateCpuProfile && e.enableCPUProfiler) + e.enableCPUProfiler(i.options.generateCpuProfile, () => pbe( + e, + t, + i + )); + else + return pbe(e, t, i); + } + function cse(e, t) { + return !e.watchFile || !e.watchDirectory ? (t(Ho(p.The_current_host_does_not_support_the_0_option, "--watch")), e.exit( + 1 + /* DiagnosticsPresent_OutputsSkipped */ + ), !0) : !1; + } + var YO = 2; + function mbe(e, t, n, i, s, o) { + const c = zU( + e, + ok(e), + n + ); + if (n.locale && bj(n.locale, e, o), o.length > 0) + return o.forEach(c), e.exit( + 1 + /* DiagnosticsPresent_OutputsSkipped */ + ); + if (n.help || s.length === 0) + return WU(e), _be(e, AN), e.exit( + 0 + /* Success */ + ); + if (!e.getModifiedTime || !e.setModifiedTime || n.clean && !e.deleteFile) + return c(Ho(p.The_current_host_does_not_support_the_0_option, "--build")), e.exit( + 1 + /* DiagnosticsPresent_OutputsSkipped */ + ); + if (n.watch) { + if (cse(e, c)) return; + const h = Gie( + e, + /*createProgram*/ + void 0, + c, + GO(e, QO(e, n)), + use(e, n) + ); + h.jsDocParsingMode = YO; + const S = Sbe(e, n); + ybe(e, t, h, S); + const T = h.onWatchStatusChange; + let C = !1; + h.onWatchStatusChange = (w, A, O, F) => { + T?.(w, A, O, F), C && (w.code === p.Found_0_errors_Watching_for_file_changes.code || w.code === p.Found_1_error_Watching_for_file_changes.code) && _se(D, S); + }; + const D = Xie(h, s, n, i); + return D.build(), _se(D, S), C = !0, D; + } + const _ = Hie( + e, + /*createProgram*/ + void 0, + c, + GO(e, QO(e, n)), + lse(e, n) + ); + _.jsDocParsingMode = YO; + const u = Sbe(e, n); + ybe(e, t, _, u); + const m = $ie(_, s, n), g = n.clean ? m.clean() : m.build(); + return _se(m, u), pQ(), e.exit(g); + } + function lse(e, t) { + return QO(e, t) ? (n, i) => e.write(vU(n, i, e.newLine, e)) : void 0; + } + function gbe(e, t, n, i) { + const { fileNames: s, options: o, projectReferences: c } = i, _ = CO( + o, + /*setParentNodes*/ + void 0, + e + ); + _.jsDocParsingMode = YO; + const u = _.getCurrentDirectory(), m = Wl(_.useCaseSensitiveFileNames()); + QD(_, (T) => oo(T, u, m)), fse( + e, + o, + /*isBuildMode*/ + !1 + ); + const g = { + rootNames: s, + options: o, + projectReferences: c, + host: _, + configFileParsingDiagnostics: l2(i) + }, h = iA(g), S = EU( + h, + n, + (T) => e.write(T + e.newLine), + lse(e, o) + ); + return HU( + e, + h, + /*solutionPerformance*/ + void 0 + ), t(h), e.exit(S); + } + function hbe(e, t, n, i) { + const { options: s, fileNames: o, projectReferences: c } = i; + fse( + e, + s, + /*isBuildMode*/ + !1 + ); + const _ = HO(s, e); + _.jsDocParsingMode = YO; + const u = Wie({ + host: _, + system: e, + rootNames: o, + options: s, + configFileParsingDiagnostics: l2(i), + projectReferences: c, + reportDiagnostic: n, + reportErrorSummary: lse(e, s), + afterProgramEmitAndDiagnostics: (m) => { + HU( + e, + m.getProgram(), + /*solutionPerformance*/ + void 0 + ), t(m); + } + }); + return e.exit(u); + } + function ybe(e, t, n, i) { + vbe( + e, + n, + /*isBuildMode*/ + !0 + ), n.afterProgramEmitAndDiagnostics = (s) => { + HU(e, s.getProgram(), i), t(s); + }; + } + function vbe(e, t, n) { + const i = t.createProgram; + t.createProgram = (s, o, c, _, u, m) => (E.assert(s !== void 0 || o === void 0 && !!_), o !== void 0 && fse(e, o, n), i(s, o, c, _, u, m)); + } + function bbe(e, t, n) { + n.jsDocParsingMode = YO, vbe( + e, + n, + /*isBuildMode*/ + !1 + ); + const i = n.afterProgramCreate; + n.afterProgramCreate = (s) => { + i(s), HU( + e, + s.getProgram(), + /*solutionPerformance*/ + void 0 + ), t(s); + }; + } + function use(e, t) { + return hU(e, QO(e, t)); + } + function pBe(e, t, n, i, s, o, c) { + const _ = AU({ + configFileName: i.options.configFilePath, + optionsToExtend: s, + watchOptionsToExtend: o, + system: e, + reportDiagnostic: n, + reportWatchStatus: use(e, i.options) + }); + return bbe(e, t, _), _.configFileParsingResult = i, _.extendedConfigCache = c, FU(_); + } + function dBe(e, t, n, i, s, o) { + const c = IU({ + rootFiles: i, + options: s, + watchOptions: o, + system: e, + reportDiagnostic: n, + reportWatchStatus: use(e, s) + }); + return bbe(e, t, c), FU(c); + } + function Sbe(e, t) { + if (e === nl && t.extendedDiagnostics) + return BR(), mBe(); + } + function mBe() { + let e; + return { + addAggregateStatistic: t, + forEachAggregateStatistics: n, + clear: i + }; + function t(s) { + const o = e?.get(s.name); + o ? o.type === 2 ? o.value = Math.max(o.value, s.value) : o.value += s.value : (e ?? (e = /* @__PURE__ */ new Map())).set(s.name, s); + } + function n(s) { + e?.forEach(s); + } + function i() { + e = void 0; + } + } + function _se(e, t) { + if (!t) return; + if (!uQ()) { + nl.write(p.Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found.message + ` +`); + return; + } + const n = []; + n.push( + { + name: "Projects in scope", + value: lA(e.getBuildOrder()).length, + type: 1 + /* count */ + } + ), i("SolutionBuilder::Projects built"), i("SolutionBuilder::Timestamps only updates"), i("SolutionBuilder::Bundles updated"), t.forEachAggregateStatistics((o) => { + o.name = `Aggregate ${o.name}`, n.push(o); + }), jR((o, c) => { + qU(o) && n.push({ + name: `${s(o)} time`, + value: c, + type: 0 + /* time */ + }); + }), _Q(), BR(), t.clear(), kbe(nl, n); + function i(o) { + const c = cge(o); + c && n.push({ + name: s(o), + value: c, + type: 1 + /* count */ + }); + } + function s(o) { + return o.replace("SolutionBuilder::", ""); + } + } + function Tbe(e, t) { + return e === nl && (t.diagnostics || t.extendedDiagnostics); + } + function xbe(e, t) { + return e === nl && t.generateTrace; + } + function fse(e, t, n) { + Tbe(e, t) && BR(e), xbe(e, t) && fQ(n ? "build" : "project", t.generateTrace, t.configFilePath); + } + function qU(e) { + return Vi(e, "SolutionBuilder::"); + } + function HU(e, t, n) { + var i; + const s = t.getCompilerOptions(); + xbe(e, s) && ((i = nn) == null || i.stopTracing()); + let o; + if (Tbe(e, s)) { + o = []; + const m = e.getMemoryUsage ? e.getMemoryUsage() : -1; + _("Files", t.getSourceFiles().length); + const g = oBe(t); + if (s.extendedDiagnostics) + for (const [w, A] of g.entries()) + _("Lines of " + w, A); + else + _("Lines", MX(g.values(), (w, A) => w + A, 0)); + _("Identifiers", t.getIdentifierCount()), _("Symbols", t.getSymbolCount()), _("Types", t.getTypeCount()), _("Instantiations", t.getInstantiationCount()), m >= 0 && c( + { + name: "Memory used", + value: m, + type: 2 + /* memory */ + }, + /*aggregate*/ + !0 + ); + const h = uQ(), S = h ? e4("Program") : 0, T = h ? e4("Bind") : 0, C = h ? e4("Check") : 0, D = h ? e4("Emit") : 0; + if (s.extendedDiagnostics) { + const w = t.getRelationCacheSizes(); + _("Assignability cache size", w.assignable), _("Identity cache size", w.identity), _("Subtype cache size", w.subtype), _("Strict subtype cache size", w.strictSubtype), h && jR((A, O) => { + qU(A) || u( + `${A} time`, + O, + /*aggregate*/ + !0 + ); + }); + } else h && (u( + "I/O read", + e4("I/O Read"), + /*aggregate*/ + !0 + ), u( + "I/O write", + e4("I/O Write"), + /*aggregate*/ + !0 + ), u( + "Parse time", + S, + /*aggregate*/ + !0 + ), u( + "Bind time", + T, + /*aggregate*/ + !0 + ), u( + "Check time", + C, + /*aggregate*/ + !0 + ), u( + "Emit time", + D, + /*aggregate*/ + !0 + )); + h && u( + "Total time", + S + T + C + D, + /*aggregate*/ + !1 + ), kbe(e, o), h ? n ? (jR((w) => { + qU(w) || uge(w); + }), lge((w) => { + qU(w) || _ge(w); + })) : _Q() : e.write(p.Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found.message + ` +`); + } + function c(m, g) { + o.push(m), g && n?.addAggregateStatistic(m); + } + function _(m, g) { + c( + { + name: m, + value: g, + type: 1 + /* count */ + }, + /*aggregate*/ + !0 + ); + } + function u(m, g, h) { + c({ + name: m, + value: g, + type: 0 + /* time */ + }, h); + } + } + function kbe(e, t) { + let n = 0, i = 0; + for (const s of t) { + s.name.length > n && (n = s.name.length); + const o = Cbe(s); + o.length > i && (i = o.length); + } + for (const s of t) + e.write(`${s.name}:`.padEnd(n + 2) + Cbe(s).toString().padStart(i) + e.newLine); + } + function Cbe(e) { + switch (e.type) { + case 1: + return "" + e.value; + case 0: + return (e.value / 1e3).toFixed(2) + "s"; + case 2: + return Math.round(e.value / 1e3) + "K"; + default: + E.assertNever(e.type); + } + } + function gBe(e, t, n, i) { + const s = e.getCurrentDirectory(), o = Hs(Ln(s, "tsconfig.json")); + if (e.fileExists(o)) + t(Ho(p.A_tsconfig_json_file_is_already_defined_at_Colon_0, o)); + else { + e.writeFile(o, Ere(n, i, e.newLine)); + const c = [e.newLine, ...VU(e, "Created a new tsconfig.json with:")]; + c.push(Cre(n, e.newLine) + e.newLine + e.newLine), c.push("You can learn more at https://aka.ms/tsconfig" + e.newLine); + for (const _ of c) + e.write(_); + } + } + function lg(e, t = !0) { + return { type: e, reportFallback: t }; + } + var pse = lg( + /*type*/ + void 0, + /*reportFallback*/ + !1 + ), Ebe = lg( + /*type*/ + void 0, + /*reportFallback*/ + !1 + ), tw = lg( + /*type*/ + void 0, + /*reportFallback*/ + !0 + ); + function dse(e, t) { + const n = lu(e, "strictNullChecks"); + return { + serializeTypeOfDeclaration: g, + serializeReturnTypeForSignature: S, + serializeTypeOfExpression: m, + serializeTypeOfAccessor: u, + tryReuseExistingTypeNode(ne, Ae) { + if (t.canReuseTypeNode(ne, Ae)) + return s(ne, Ae); + } + }; + function i(ne, Ae, De = Ae) { + return Ae === void 0 ? void 0 : t.markNodeReuse(ne, Ae.flags & 16 ? Ae : N.cloneNode(Ae), De ?? Ae); + } + function s(ne, Ae) { + const { finalizeBoundary: De, startRecoveryScope: we, hadError: Ue, markError: bt } = t.createRecoveryBoundary(ne), Lt = Xe(Ae, er, fi); + if (!De()) + return; + return ne.approximateLength += Ae.end - Ae.pos, Lt; + function er(Bt) { + if (Ue()) return Bt; + const bi = we(), pi = Uee(Bt) ? t.enterNewScope(ne, Bt) : void 0, Xn = qn(Bt); + return pi?.(), Ue() ? fi(Bt) && !zx(Bt) ? (bi(), t.serializeExistingTypeNode(ne, Bt)) : Bt : Xn ? t.markNodeReuse(ne, Xn, Bt) : void 0; + } + function Nr(Bt) { + const bi = M4(Bt); + switch (bi.kind) { + case 183: + return yr(bi); + case 186: + return Wr(bi); + case 199: + return Dt(bi); + case 198: + const pi = bi; + if (pi.operator === 143) + return Qt(pi); + } + return Xe(Bt, er, fi); + } + function Dt(Bt) { + const bi = Nr(Bt.objectType); + if (bi !== void 0) + return N.updateIndexedAccessTypeNode(Bt, bi, Xe(Bt.indexType, er, fi)); + } + function Qt(Bt) { + E.assertEqual( + Bt.operator, + 143 + /* KeyOfKeyword */ + ); + const bi = Nr(Bt.type); + if (bi !== void 0) + return N.updateTypeOperatorNode(Bt, bi); + } + function Wr(Bt) { + const { introducesError: bi, node: pi } = t.trackExistingEntityName(ne, Bt.exprName); + if (!bi) + return N.updateTypeQueryNode( + Bt, + pi, + Or(Bt.typeArguments, er, fi) + ); + const Xn = t.serializeTypeName( + ne, + Bt.exprName, + /*isTypeOf*/ + !0 + ); + if (Xn) + return t.markNodeReuse(ne, Xn, Bt.exprName); + } + function yr(Bt) { + if (t.canReuseTypeNode(ne, Bt)) { + const { introducesError: bi, node: pi } = t.trackExistingEntityName(ne, Bt.typeName), Xn = Or(Bt.typeArguments, er, fi); + if (bi) { + const jr = t.serializeTypeName( + ne, + Bt.typeName, + /*isTypeOf*/ + !1, + Xn + ); + if (jr) + return t.markNodeReuse(ne, jr, Bt.typeName); + } else { + const jr = N.updateTypeReferenceNode( + Bt, + pi, + Xn + ); + return t.markNodeReuse(ne, jr, Bt); + } + } + } + function qn(Bt) { + var bi; + if (hv(Bt)) + return Xe(Bt.type, er, fi); + if (Nte(Bt) || Bt.kind === 319) + return N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ); + if (Ate(Bt)) + return N.createKeywordTypeNode( + 159 + /* UnknownKeyword */ + ); + if (s6(Bt)) + return N.createUnionTypeNode([Xe(Bt.type, er, fi), N.createLiteralTypeNode(N.createNull())]); + if (tz(Bt)) + return N.createUnionTypeNode([Xe(Bt.type, er, fi), N.createKeywordTypeNode( + 157 + /* UndefinedKeyword */ + )]); + if (bF(Bt)) + return Xe(Bt.type, er); + if (SF(Bt)) + return N.createArrayTypeNode(Xe(Bt.type, er, fi)); + if (RS(Bt)) + return N.createTypeLiteralNode(gr(Bt.jsDocPropertyTags, (gt) => { + const tr = Xe(Me(gt.name) ? gt.name : gt.name.right, er, Me), qr = t.getJsDocPropertyOverride(ne, Bt, gt); + return N.createPropertySignature( + /*modifiers*/ + void 0, + tr, + gt.isBracketed || gt.typeExpression && tz(gt.typeExpression.type) ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0, + qr || gt.typeExpression && Xe(gt.typeExpression.type, er, fi) || N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ) + ); + })); + if (Y_(Bt) && Me(Bt.typeName) && Bt.typeName.escapedText === "") + return Sn(N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ), Bt); + if ((Lh(Bt) || Y_(Bt)) && X7(Bt)) + return N.createTypeLiteralNode([N.createIndexSignature( + /*modifiers*/ + void 0, + [N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "x", + /*questionToken*/ + void 0, + Xe(Bt.typeArguments[0], er, fi) + )], + Xe(Bt.typeArguments[1], er, fi) + )]); + if (a6(Bt)) + if (gx(Bt)) { + let gt; + return N.createConstructorTypeNode( + /*modifiers*/ + void 0, + Or(Bt.typeParameters, er, Ao), + Li(Bt.parameters, (tr, qr) => tr.name && Me(tr.name) && tr.name.escapedText === "new" ? (gt = tr.type, void 0) : N.createParameterDeclaration( + /*modifiers*/ + void 0, + jr(tr), + t.markNodeReuse(ne, N.createIdentifier(di(tr, qr)), tr), + N.cloneNode(tr.questionToken), + Xe(tr.type, er, fi), + /*initializer*/ + void 0 + )), + Xe(gt || Bt.type, er, fi) || N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ) + ); + } else + return N.createFunctionTypeNode( + Or(Bt.typeParameters, er, Ao), + gr(Bt.parameters, (gt, tr) => N.createParameterDeclaration( + /*modifiers*/ + void 0, + jr(gt), + t.markNodeReuse(ne, N.createIdentifier(di(gt, tr)), gt), + N.cloneNode(gt.questionToken), + Xe(gt.type, er, fi), + /*initializer*/ + void 0 + )), + Xe(Bt.type, er, fi) || N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ) + ); + if (bD(Bt)) + return t.canReuseTypeNode(ne, Bt) || bt(), Bt; + if (Ao(Bt)) { + const { node: gt } = t.trackExistingEntityName(ne, Bt.name); + return N.updateTypeParameterDeclaration( + Bt, + Or(Bt.modifiers, er, ia), + // resolver.markNodeReuse(context, typeParameterToName(getDeclaredTypeOfSymbol(getSymbolOfDeclaration(node)), context), node), + gt, + Xe(Bt.constraint, er, fi), + Xe(Bt.default, er, fi) + ); + } + if (Qb(Bt)) { + const gt = Dt(Bt); + return gt || (bt(), Bt); + } + if (Y_(Bt)) { + const gt = yr(Bt); + return gt || (bt(), Bt); + } + if (Dh(Bt)) + return ((bi = Bt.attributes) == null ? void 0 : bi.token) === 132 ? (bt(), Bt) : t.canReuseTypeNode(ne, Bt) ? N.updateImportTypeNode( + Bt, + N.updateLiteralTypeNode(Bt.argument, Re(Bt, Bt.argument.literal)), + Xe(Bt.attributes, er, LS), + Xe(Bt.qualifier, er, Hu), + Or(Bt.typeArguments, er, fi), + Bt.isTypeOf + ) : t.serializeExistingTypeNode(ne, Bt); + if (Hl(Bt) && Bt.name.kind === 167 && !t.hasLateBindableName(Bt)) { + if (!Ph(Bt)) + return pi(Bt, er); + if (t.shouldRemoveDeclaration(ne, Bt)) + return; + } + if (vs(Bt) && !Bt.type || ss(Bt) && !Bt.type && !Bt.initializer || m_(Bt) && !Bt.type && !Bt.initializer || Ii(Bt) && !Bt.type && !Bt.initializer) { + let gt = pi(Bt, er); + return gt === Bt && (gt = t.markNodeReuse(ne, N.cloneNode(Bt), Bt)), gt.type = N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ), Ii(Bt) && (gt.modifiers = void 0), gt; + } + if ($b(Bt)) { + const gt = Wr(Bt); + return gt || (bt(), Bt); + } + if (fa(Bt) && _o(Bt.expression)) { + const { node: gt, introducesError: tr } = t.trackExistingEntityName(ne, Bt.expression); + if (tr) { + const qr = t.serializeTypeOfExpression(ne, Bt.expression); + let Bn; + if (M0(qr)) + Bn = qr.literal; + else { + const wn = t.evaluateEntityNameExpression(Bt.expression), ki = typeof wn.value == "string" ? N.createStringLiteral( + wn.value, + /*isSingleQuote*/ + void 0 + ) : typeof wn.value == "number" ? N.createNumericLiteral( + wn.value, + /*numericLiteralFlags*/ + 0 + ) : void 0; + if (!ki) + return Ed(qr) && t.trackComputedName(ne, Bt.expression), Bt; + Bn = ki; + } + return Bn.kind === 11 && E_(Bn.text, pa(e)) ? N.createIdentifier(Bn.text) : Bn.kind === 9 && !Bn.text.startsWith("-") ? Bn : N.updateComputedPropertyName(Bt, Bn); + } else + return N.updateComputedPropertyName(Bt, gt); + } + if (zx(Bt)) { + let gt; + if (Me(Bt.parameterName)) { + const { node: tr, introducesError: qr } = t.trackExistingEntityName(ne, Bt.parameterName); + qr && bt(), gt = tr; + } else + gt = N.cloneNode(Bt.parameterName); + return N.updateTypePredicateNode(Bt, N.cloneNode(Bt.assertsModifier), gt, Xe(Bt.type, er, fi)); + } + if (Wx(Bt) || Qu(Bt) || FS(Bt)) { + const gt = pi(Bt, er), tr = t.markNodeReuse(ne, gt === Bt ? N.cloneNode(Bt) : gt, Bt), qr = va(tr); + return on(tr, qr | (ne.flags & 1024 && Qu(Bt) ? 0 : 1)), tr; + } + if (ea(Bt) && ne.flags & 268435456 && !Bt.singleQuote) { + const gt = N.cloneNode(Bt); + return gt.singleQuote = !0, gt; + } + if (Xb(Bt)) { + const gt = Xe(Bt.checkType, er, fi), tr = t.enterNewScope(ne, Bt), qr = Xe(Bt.extendsType, er, fi), Bn = Xe(Bt.trueType, er, fi); + tr(); + const wn = Xe(Bt.falseType, er, fi); + return N.updateConditionalTypeNode( + Bt, + gt, + qr, + Bn, + wn + ); + } + if (_v(Bt)) { + if (Bt.operator === 158 && Bt.type.kind === 155) { + if (!t.canReuseTypeNode(ne, Bt)) + return bt(), Bt; + } else if (Bt.operator === 143) { + const gt = Qt(Bt); + return gt || (bt(), Bt); + } + } + return pi(Bt, er); + function pi(gt, tr) { + const qr = !ne.enclosingFile || ne.enclosingFile !== Cr(gt); + return kr( + gt, + tr, + /*context*/ + void 0, + qr ? Xn : void 0 + ); + } + function Xn(gt, tr, qr, Bn, wn) { + let ki = Or(gt, tr, qr, Bn, wn); + return ki && (ki.pos !== -1 || ki.end !== -1) && (ki === gt && (ki = N.createNodeArray(gt.slice(), gt.hasTrailingComma)), Cd(ki, -1, -1)), ki; + } + function jr(gt) { + return gt.dotDotDotToken || (gt.type && SF(gt.type) ? N.createToken( + 26 + /* DotDotDotToken */ + ) : void 0); + } + function di(gt, tr) { + return gt.name && Me(gt.name) && gt.name.escapedText === "this" ? "this" : jr(gt) ? "args" : `arg${tr}`; + } + function Re(gt, tr) { + const qr = t.getModuleSpecifierOverride(ne, gt, tr); + return qr ? Sn(N.createStringLiteral(qr), tr) : Xe(tr, er, ea); + } + } + } + function o(ne, Ae, De) { + if (!ne) return; + let we; + return (!De || it(ne)) && t.canReuseTypeNode(Ae, ne) && (we = s(Ae, ne), we !== void 0 && (we = ue( + we, + De, + /*owner*/ + void 0, + Ae + ))), we; + } + function c(ne, Ae, De, we, Ue, bt = Ue !== void 0) { + if (!ne || !t.canReuseTypeNodeAnnotation(Ae, De, ne, we, Ue) && (!Ue || !t.canReuseTypeNodeAnnotation( + Ae, + De, + ne, + we, + /*requiresAddingUndefined*/ + !1 + ))) + return; + let Lt; + return (!Ue || it(ne)) && (Lt = o(ne, Ae, Ue)), Lt !== void 0 || !bt ? Lt : (Ae.tracker.reportInferenceFallback(De), t.serializeExistingTypeNode(Ae, ne, Ue) ?? N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + )); + } + function _(ne, Ae, De, we) { + if (!ne) return; + const Ue = o(ne, Ae, De); + return Ue !== void 0 ? Ue : (Ae.tracker.reportInferenceFallback(ne), t.serializeExistingTypeNode(Ae, ne, De) ?? N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + )); + } + function u(ne, Ae, De) { + return D(ne, Ae, De) ?? $(ne, t.getAllAccessorDeclarations(ne), De, Ae); + } + function m(ne, Ae, De, we) { + const Ue = Z( + ne, + Ae, + /*isConstContext*/ + !1, + De, + we + ); + return Ue.type !== void 0 ? Ue.type : W(ne, Ae, Ue.reportFallback); + } + function g(ne, Ae, De) { + switch (ne.kind) { + case 169: + case 341: + return A(ne, Ae, De); + case 260: + return w(ne, Ae, De); + case 171: + case 348: + case 172: + return F(ne, Ae, De); + case 208: + return R(ne, Ae, De); + case 277: + return m( + ne.expression, + De, + /*addUndefined*/ + void 0, + /*preserveLiterals*/ + !0 + ); + case 211: + case 212: + case 226: + return O(ne, Ae, De); + case 303: + case 304: + return h(ne, Ae, De); + default: + E.assertNever(ne, `Node needs to be an inferrable node, found ${E.formatSyntaxKind(ne.kind)}`); + } + } + function h(ne, Ae, De) { + const we = qc(ne); + let Ue; + if (we && t.canReuseTypeNodeAnnotation(De, ne, we, Ae) && (Ue = o(we, De)), !Ue && ne.kind === 303) { + const bt = ne.initializer, Lt = r2(bt) ? l6(bt) : bt.kind === 234 || bt.kind === 216 ? bt.type : void 0; + Lt && !Kp(Lt) && (Ue = o(Lt, De)); + } + return Ue ?? R( + ne, + Ae, + De, + /*reportFallback*/ + !1 + ); + } + function S(ne, Ae, De) { + switch (ne.kind) { + case 177: + return u(ne, Ae, De); + case 174: + case 262: + case 180: + case 173: + case 179: + case 176: + case 178: + case 181: + case 184: + case 185: + case 218: + case 219: + case 317: + case 323: + return Oe(ne, Ae, De); + default: + E.assertNever(ne, `Node needs to be an inferrable node, found ${E.formatSyntaxKind(ne.kind)}`); + } + } + function T(ne) { + if (ne) + return ne.kind === 177 ? an(ne) && Ly(ne) || pf(ne) : VB(ne); + } + function C(ne, Ae) { + let De = T(ne); + return !De && ne !== Ae.firstAccessor && (De = T(Ae.firstAccessor)), !De && Ae.secondAccessor && ne !== Ae.secondAccessor && (De = T(Ae.secondAccessor)), De; + } + function D(ne, Ae, De) { + const we = t.getAllAccessorDeclarations(ne), Ue = C(ne, we); + if (Ue && !zx(Ue)) + return U(De, ne, () => c(Ue, De, ne, Ae) ?? R(ne, Ae, De)); + if (we.getAccessor) + return U(De, we.getAccessor, () => Oe( + we.getAccessor, + /*symbol*/ + void 0, + De + )); + } + function w(ne, Ae, De) { + var we; + const Ue = qc(ne); + let bt = tw; + return Ue ? bt = lg(c(Ue, De, ne, Ae)) : ne.initializer && (((we = Ae.declarations) == null ? void 0 : we.length) === 1 || b0(Ae.declarations, Kn) === 1) && !t.isExpandoFunctionDeclaration(ne) && !he(ne) && (bt = Z( + ne.initializer, + De, + /*isConstContext*/ + void 0, + /*requiresAddingUndefined*/ + void 0, + XZ(ne) + )), bt.type !== void 0 ? bt.type : R(ne, Ae, De, bt.reportFallback); + } + function A(ne, Ae, De) { + const we = ne.parent; + if (we.kind === 178) + return u( + we, + /*symbol*/ + void 0, + De + ); + const Ue = qc(ne), bt = t.requiresAddingImplicitUndefined(ne, Ae, De.enclosingDeclaration); + let Lt = tw; + return Ue ? Lt = lg(c(Ue, De, ne, Ae, bt)) : Ii(ne) && ne.initializer && Me(ne.name) && !he(ne) && (Lt = Z( + ne.initializer, + De, + /*isConstContext*/ + void 0, + bt + )), Lt.type !== void 0 ? Lt.type : R(ne, Ae, De, Lt.reportFallback); + } + function O(ne, Ae, De) { + const we = qc(ne); + let Ue; + we && (Ue = c(we, De, ne, Ae)); + const bt = De.suppressReportInferenceFallback; + De.suppressReportInferenceFallback = !0; + const Lt = Ue ?? R( + ne, + Ae, + De, + /*reportFallback*/ + !1 + ); + return De.suppressReportInferenceFallback = bt, Lt; + } + function F(ne, Ae, De) { + const we = qc(ne), Ue = t.requiresAddingImplicitUndefined(ne, Ae, De.enclosingDeclaration); + let bt = tw; + if (we) + bt = lg(c(we, De, ne, Ae, Ue)); + else { + const Lt = ss(ne) ? ne.initializer : void 0; + if (Lt && !he(ne)) { + const er = t3(ne); + bt = Z( + Lt, + De, + /*isConstContext*/ + void 0, + Ue, + er + ); + } + } + return bt.type !== void 0 ? bt.type : R(ne, Ae, De, bt.reportFallback); + } + function R(ne, Ae, De, we = !0) { + return we && De.tracker.reportInferenceFallback(ne), De.noInferenceFallback === !0 ? N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ) : t.serializeTypeOfDeclaration(De, ne, Ae); + } + function W(ne, Ae, De = !0, we) { + return E.assert(!we), De && Ae.tracker.reportInferenceFallback(ne), Ae.noInferenceFallback === !0 ? N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ) : t.serializeTypeOfExpression(Ae, ne) ?? N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ); + } + function V(ne, Ae, De) { + return De && Ae.tracker.reportInferenceFallback(ne), Ae.noInferenceFallback === !0 ? N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ) : t.serializeReturnTypeForSignature(Ae, ne) ?? N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ); + } + function $(ne, Ae, De, we, Ue = !0) { + return ne.kind === 177 ? Oe(ne, we, De, Ue) : (Ue && De.tracker.reportInferenceFallback(ne), (Ae.getAccessor && Oe(Ae.getAccessor, we, De, Ue)) ?? t.serializeTypeOfDeclaration(De, ne, we) ?? N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + )); + } + function U(ne, Ae, De) { + const we = t.enterNewScope(ne, Ae), Ue = De(); + return we(), Ue; + } + function _e(ne, Ae, De, we) { + return Kp(Ae) ? Z( + ne, + De, + /*isConstContext*/ + !0, + we + ) : lg(_(Ae, De, we)); + } + function Z(ne, Ae, De = !1, we = !1, Ue = !1) { + switch (ne.kind) { + case 217: + return r2(ne) ? _e(ne.expression, l6(ne), Ae, we) : Z(ne.expression, Ae, De, we); + case 80: + if (t.isUndefinedIdentifierExpression(ne)) + return lg(oe()); + break; + case 106: + return lg(n ? ue(N.createLiteralTypeNode(N.createNull()), we, ne, Ae) : N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + )); + case 219: + case 218: + return E.type(ne), U(Ae, ne, () => J(ne, Ae)); + case 216: + case 234: + const bt = ne; + return _e(bt.expression, bt.type, Ae, we); + case 224: + const Lt = ne; + if (Z5(Lt)) + return ke( + Lt.operator === 40 ? Lt.operand : Lt, + Lt.operand.kind === 10 ? 163 : 150, + Ae, + De || Ue, + we + ); + break; + case 209: + return te(ne, Ae, De, we); + case 210: + return le(ne, Ae, De, we); + case 231: + return lg(W( + ne, + Ae, + /*reportFallback*/ + !0, + we + )); + case 228: + if (!De && !Ue) + return lg(N.createKeywordTypeNode( + 154 + /* StringKeyword */ + )); + break; + default: + let er, Nr = ne; + switch (ne.kind) { + case 9: + er = 150; + break; + case 15: + Nr = N.createStringLiteral(ne.text), er = 154; + break; + case 11: + er = 154; + break; + case 10: + er = 163; + break; + case 112: + case 97: + er = 136; + break; + } + if (er) + return ke(Nr, er, Ae, De || Ue, we); + } + return tw; + } + function J(ne, Ae) { + const De = Ae.noInferenceFallback; + return Ae.noInferenceFallback = !0, Oe( + ne, + /*symbol*/ + void 0, + Ae + ), me(ne.typeParameters, Ae), ne.parameters.map((we) => q(we, Ae)), Ae.noInferenceFallback = De, pse; + } + function re(ne, Ae, De) { + if (!De) + return Ae.tracker.reportInferenceFallback(ne), !1; + for (const we of ne.elements) + if (we.kind === 230) + return Ae.tracker.reportInferenceFallback(we), !1; + return !0; + } + function te(ne, Ae, De, we) { + if (!re(ne, Ae, De)) + return we || bl(rd(ne).parent) ? Ebe : lg(W( + ne, + Ae, + /*reportFallback*/ + !1, + we + )); + const Ue = Ae.noInferenceFallback; + Ae.noInferenceFallback = !0; + const bt = []; + for (const er of ne.elements) + if (E.assert( + er.kind !== 230 + /* SpreadElement */ + ), er.kind === 232) + bt.push( + oe() + ); + else { + const Nr = Z(er, Ae, De), Dt = Nr.type !== void 0 ? Nr.type : W(er, Ae, Nr.reportFallback); + bt.push(Dt); + } + const Lt = N.createTupleTypeNode(bt); + return Lt.emitNode = { flags: 1, autoGenerate: void 0, internalFlags: 0 }, Ae.noInferenceFallback = Ue, pse; + } + function ie(ne, Ae) { + let De = !0; + for (const we of ne.properties) { + if (we.flags & 262144) { + De = !1; + break; + } + if (we.kind === 304 || we.kind === 305) + Ae.tracker.reportInferenceFallback(we), De = !1; + else if (we.name.flags & 262144) { + De = !1; + break; + } else if (we.name.kind === 81) + De = !1; + else if (we.name.kind === 167) { + const Ue = we.name.expression; + !Z5( + Ue, + /*includeBigInt*/ + !1 + ) && !t.isDefinitelyReferenceToGlobalSymbolObject(Ue) && (Ae.tracker.reportInferenceFallback(we.name), De = !1); + } + } + return De; + } + function le(ne, Ae, De, we) { + if (!ie(ne, Ae)) + return we || bl(rd(ne).parent) ? Ebe : lg(W( + ne, + Ae, + /*reportFallback*/ + !1, + we + )); + const Ue = Ae.noInferenceFallback; + Ae.noInferenceFallback = !0; + const bt = [], Lt = Ae.flags; + Ae.flags |= 4194304; + for (const Nr of ne.properties) { + E.assert(!_u(Nr) && !Zg(Nr)); + const Dt = Nr.name; + let Qt; + switch (Nr.kind) { + case 174: + Qt = U(Ae, Nr, () => Ce(Nr, Dt, Ae, De)); + break; + case 303: + Qt = Te(Nr, Dt, Ae, De); + break; + case 178: + case 177: + Qt = Ee(Nr, Dt, Ae); + break; + } + Qt && (Hc(Qt, Nr), bt.push(Qt)); + } + Ae.flags = Lt; + const er = N.createTypeLiteralNode(bt); + return Ae.flags & 1024 || on( + er, + 1 + /* SingleLine */ + ), Ae.noInferenceFallback = Ue, pse; + } + function Te(ne, Ae, De, we) { + const Ue = we ? [N.createModifier( + 148 + /* ReadonlyKeyword */ + )] : [], bt = Z(ne.initializer, De, we), Lt = bt.type !== void 0 ? bt.type : R( + ne, + /*symbol*/ + void 0, + De, + bt.reportFallback + ); + return N.createPropertySignature( + Ue, + i(De, Ae), + /*questionToken*/ + void 0, + Lt + ); + } + function q(ne, Ae) { + return N.updateParameterDeclaration( + ne, + [], + i(Ae, ne.dotDotDotToken), + t.serializeNameOfParameter(Ae, ne), + t.isOptionalParameter(ne) ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0, + A( + ne, + /*symbol*/ + void 0, + Ae + ), + // Ignore private param props, since this type is going straight back into a param + /*initializer*/ + void 0 + ); + } + function me(ne, Ae) { + return ne?.map( + (De) => { + var we; + return N.updateTypeParameterDeclaration( + De, + (we = De.modifiers) == null ? void 0 : we.map((Ue) => i(Ae, Ue)), + i(Ae, De.name), + _(De.constraint, Ae), + _(De.default, Ae) + ); + } + ); + } + function Ce(ne, Ae, De, we) { + const Ue = Oe( + ne, + /*symbol*/ + void 0, + De + ), bt = me(ne.typeParameters, De), Lt = ne.parameters.map((er) => q(er, De)); + return we ? N.createPropertySignature( + [N.createModifier( + 148 + /* ReadonlyKeyword */ + )], + i(De, Ae), + i(De, ne.questionToken), + N.createFunctionTypeNode( + bt, + Lt, + Ue + ) + ) : (Me(Ae) && Ae.escapedText === "new" && (Ae = N.createStringLiteral("new")), N.createMethodSignature( + [], + i(De, Ae), + i(De, ne.questionToken), + bt, + Lt, + Ue + )); + } + function Ee(ne, Ae, De) { + const we = t.getAllAccessorDeclarations(ne), Ue = we.getAccessor && T(we.getAccessor), bt = we.setAccessor && T(we.setAccessor); + if (Ue !== void 0 && bt !== void 0) + return U(De, ne, () => { + const Lt = ne.parameters.map((er) => q(er, De)); + return k0(ne) ? N.updateGetAccessorDeclaration( + ne, + [], + i(De, Ae), + Lt, + _(Ue, De), + /*body*/ + void 0 + ) : N.updateSetAccessorDeclaration( + ne, + [], + i(De, Ae), + Lt, + /*body*/ + void 0 + ); + }); + if (we.firstAccessor === ne) { + const er = (Ue ? U(De, we.getAccessor, () => _(Ue, De)) : bt ? U(De, we.setAccessor, () => _(bt, De)) : void 0) ?? $( + ne, + we, + De, + /*symbol*/ + void 0 + ); + return N.createPropertySignature( + we.setAccessor === void 0 ? [N.createModifier( + 148 + /* ReadonlyKeyword */ + )] : [], + i(De, Ae), + /*questionToken*/ + void 0, + er + ); + } + } + function oe() { + return n ? N.createKeywordTypeNode( + 157 + /* UndefinedKeyword */ + ) : N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ); + } + function ke(ne, Ae, De, we, Ue) { + let bt; + return we ? (ne.kind === 224 && ne.operator === 40 && (bt = N.createLiteralTypeNode(i(De, ne.operand))), bt = N.createLiteralTypeNode(i(De, ne))) : bt = N.createKeywordTypeNode(Ae), lg(ue(bt, Ue, ne, De)); + } + function ue(ne, Ae, De, we) { + const Ue = De && rd(De).parent, bt = Ue && bl(Ue) && Ax(Ue); + return !n || !(Ae || bt) ? ne : (it(ne) || we.tracker.reportInferenceFallback(ne), L0(ne) ? N.createUnionTypeNode([...ne.types, N.createKeywordTypeNode( + 157 + /* UndefinedKeyword */ + )]) : N.createUnionTypeNode([ne, N.createKeywordTypeNode( + 157 + /* UndefinedKeyword */ + )])); + } + function it(ne) { + return !n || f_(ne.kind) || ne.kind === 201 || ne.kind === 184 || ne.kind === 185 || ne.kind === 188 || ne.kind === 189 || ne.kind === 187 || ne.kind === 203 || ne.kind === 197 ? !0 : ne.kind === 196 ? it(ne.type) : ne.kind === 192 || ne.kind === 193 ? ne.types.every(it) : !1; + } + function Oe(ne, Ae, De, we = !0) { + let Ue = tw; + const bt = gx(ne) ? qc(ne.parameters[0]) : pf(ne); + return bt ? Ue = lg(c(bt, De, ne, Ae)) : SS(ne) && (Ue = xe(ne, De)), Ue.type !== void 0 ? Ue.type : V(ne, De, we && Ue.reportFallback && !bt); + } + function xe(ne, Ae) { + let De; + if (ne && !tc(ne.body)) { + if (Oc(ne) & 3) return tw; + const Ue = ne.body; + Ue && ks(Ue) ? Hy(Ue, (bt) => { + if (bt.parent !== Ue) + return De = void 0, !0; + if (!De) + De = bt.expression; + else + return De = void 0, !0; + }) : De = Ue; + } + if (De) + if (he(De)) { + const we = r2(De) ? l6(De) : t6(De) || dF(De) ? De.type : void 0; + if (we && !Kp(we)) + return lg(o(we, Ae)); + } else + return Z(De, Ae); + return tw; + } + function he(ne) { + return ur(ne.parent, (Ae) => Fs(Ae) || !Ka(Ae) && !!qc(Ae) || gm(Ae) || n6(Ae)); + } + } + var f1 = {}; + Ec(f1, { + NameValidationResult: () => Fbe, + discoverTypings: () => vBe, + isTypingUpToDate: () => Abe, + loadSafeList: () => hBe, + loadTypesMap: () => yBe, + nonRelativeModuleNameForTypingCache: () => Ibe, + renderPackageNameValidationFailure: () => SBe, + validatePackageName: () => bBe + }); + var ZO = "action::set", KO = "action::invalidate", e9 = "action::packageInstalled", GU = "event::typesRegistry", $U = "event::beginInstallTypes", XU = "event::endInstallTypes", mse = "event::initializationFailed", pA = "action::watchTypingLocations", QU; + ((e) => { + e.GlobalCacheLocation = "--globalTypingsCacheLocation", e.LogFile = "--logFile", e.EnableTelemetry = "--enableTelemetry", e.TypingSafeListLocation = "--typingSafeListLocation", e.TypesMapLocation = "--typesMapLocation", e.NpmLocation = "--npmLocation", e.ValidateDefaultNpmLocation = "--validateDefaultNpmLocation"; + })(QU || (QU = {})); + function Dbe(e) { + return nl.args.includes(e); + } + function wbe(e) { + const t = nl.args.indexOf(e); + return t >= 0 && t < nl.args.length - 1 ? nl.args[t + 1] : void 0; + } + function Pbe() { + const e = /* @__PURE__ */ new Date(); + return `${e.getHours().toString().padStart(2, "0")}:${e.getMinutes().toString().padStart(2, "0")}:${e.getSeconds().toString().padStart(2, "0")}.${e.getMilliseconds().toString().padStart(3, "0")}`; + } + var Nbe = ` + `; + function rw(e) { + return Nbe + e.replace(/\n/g, Nbe); + } + function Dv(e) { + return rw(JSON.stringify(e, void 0, 2)); + } + function Abe(e, t) { + return new yd(FI(t, `ts${UE}`) || FI(t, "latest")).compareTo(e.version) <= 0; + } + function Ibe(e) { + return QC.has(e) ? "node" : e; + } + function hBe(e, t) { + const n = FN(t, (i) => e.readFile(i)); + return new Map(Object.entries(n.config)); + } + function yBe(e, t) { + var n; + const i = FN(t, (s) => e.readFile(s)); + if ((n = i.config) != null && n.simpleMap) + return new Map(Object.entries(i.config.simpleMap)); + } + function vBe(e, t, n, i, s, o, c, _, u, m) { + if (!c || !c.enable) + return { cachedTypingPaths: [], newTypingNames: [], filesToWatch: [] }; + const g = /* @__PURE__ */ new Map(); + n = Li(n, (R) => { + const W = Hs(R); + if (Gg(W)) + return W; + }); + const h = []; + c.include && A(c.include, "Explicitly included types"); + const S = c.exclude || []; + if (!m.types) { + const R = new Set(n.map(Hn)); + R.add(i), R.forEach((W) => { + O(W, "bower.json", "bower_components", h), O(W, "package.json", "node_modules", h); + }); + } + if (c.disableFilenameBasedTypeAcquisition || F(n), _) { + const R = hb( + _.map(Ibe), + bb, + cu + ); + A(R, "Inferred typings from unresolved imports"); + } + for (const R of S) + g.delete(R) && t && t(`Typing for ${R} is in exclude list, will be ignored.`); + o.forEach((R, W) => { + const V = u.get(W); + g.get(W) === !1 && V !== void 0 && Abe(R, V) && g.set(W, R.typingLocation); + }); + const T = [], C = []; + g.forEach((R, W) => { + R ? C.push(R) : T.push(W); + }); + const D = { cachedTypingPaths: C, newTypingNames: T, filesToWatch: h }; + return t && t(`Finished typings discovery:${Dv(D)}`), D; + function w(R) { + g.has(R) || g.set(R, !1); + } + function A(R, W) { + t && t(`${W}: ${JSON.stringify(R)}`), lr(R, w); + } + function O(R, W, V, $) { + const U = Ln(R, W); + let _e, Z; + e.fileExists(U) && ($.push(U), _e = FN(U, (ie) => e.readFile(ie)).config, Z = na([_e.dependencies, _e.devDependencies, _e.optionalDependencies, _e.peerDependencies], Zd), A(Z, `Typing names in '${U}' dependencies`)); + const J = Ln(R, V); + if ($.push(J), !e.directoryExists(J)) + return; + const re = [], te = Z ? Z.map((ie) => Ln(J, ie, W)) : e.readDirectory( + J, + [ + ".json" + /* Json */ + ], + /*excludes*/ + void 0, + /*includes*/ + void 0, + /*depth*/ + 3 + ).filter((ie) => { + if (Vc(ie) !== W) + return !1; + const le = Ul(Hs(ie)), Te = le[le.length - 3][0] === "@"; + return Te && Dy(le[le.length - 4]) === V || // `node_modules/@foo/bar` + !Te && Dy(le[le.length - 3]) === V; + }); + t && t(`Searching for typing names in ${J}; all files: ${JSON.stringify(te)}`); + for (const ie of te) { + const le = Hs(ie), q = FN(le, (Ce) => e.readFile(Ce)).config; + if (!q.name) + continue; + const me = q.types || q.typings; + if (me) { + const Ce = Xi(me, Hn(le)); + e.fileExists(Ce) ? (t && t(` Package '${q.name}' provides its own types.`), g.set(q.name, Ce)) : t && t(` Package '${q.name}' provides its own types but they are missing.`); + } else + re.push(q.name); + } + A(re, " Found package names"); + } + function F(R) { + const W = Li(R, ($) => { + if (!Gg($)) return; + const U = $u(Dy(Vc($))), _e = IR(U); + return s.get(_e); + }); + W.length && A(W, "Inferred typings from file names"), at(R, ($) => Bo( + $, + ".jsx" + /* Jsx */ + )) && (t && t("Inferred 'react' typings due to presence of '.jsx' extension"), w("react")); + } + } + var Fbe = /* @__PURE__ */ ((e) => (e[e.Ok = 0] = "Ok", e[e.EmptyName = 1] = "EmptyName", e[e.NameTooLong = 2] = "NameTooLong", e[e.NameStartsWithDot = 3] = "NameStartsWithDot", e[e.NameStartsWithUnderscore = 4] = "NameStartsWithUnderscore", e[e.NameContainsNonURISafeCharacters = 5] = "NameContainsNonURISafeCharacters", e))(Fbe || {}), Obe = 214; + function bBe(e) { + return gse( + e, + /*supportScopedPackage*/ + !0 + ); + } + function gse(e, t) { + if (!e) + return 1; + if (e.length > Obe) + return 2; + if (e.charCodeAt(0) === 46) + return 3; + if (e.charCodeAt(0) === 95) + return 4; + if (t) { + const n = /^@([^/]+)\/([^/]+)$/.exec(e); + if (n) { + const i = gse( + n[1], + /*supportScopedPackage*/ + !1 + ); + if (i !== 0) + return { name: n[1], isScopeName: !0, result: i }; + const s = gse( + n[2], + /*supportScopedPackage*/ + !1 + ); + return s !== 0 ? { name: n[2], isScopeName: !1, result: s } : 0; + } + } + return encodeURIComponent(e) !== e ? 5 : 0; + } + function SBe(e, t) { + return typeof e == "object" ? Lbe(t, e.result, e.name, e.isScopeName) : Lbe( + t, + e, + t, + /*isScopeName*/ + !1 + ); + } + function Lbe(e, t, n, i) { + const s = i ? "Scope" : "Package"; + switch (t) { + case 1: + return `'${e}':: ${s} name '${n}' cannot be empty`; + case 2: + return `'${e}':: ${s} name '${n}' should be less than ${Obe} characters`; + case 3: + return `'${e}':: ${s} name '${n}' cannot start with '.'`; + case 4: + return `'${e}':: ${s} name '${n}' cannot start with '_'`; + case 5: + return `'${e}':: ${s} name '${n}' contains non URI safe characters`; + case 0: + return E.fail(); + // Shouldn't have called this. + default: + E.assertNever(t); + } + } + var t9; + ((e) => { + class t { + constructor(s) { + this.text = s; + } + getText(s, o) { + return s === 0 && o === this.text.length ? this.text : this.text.substring(s, o); + } + getLength() { + return this.text.length; + } + getChangeRange() { + } + } + function n(i) { + return new t(i); + } + e.fromString = n; + })(t9 || (t9 = {})); + var hse = /* @__PURE__ */ ((e) => (e[e.Dependencies = 1] = "Dependencies", e[e.DevDependencies = 2] = "DevDependencies", e[e.PeerDependencies = 4] = "PeerDependencies", e[e.OptionalDependencies = 8] = "OptionalDependencies", e[e.All = 15] = "All", e))(hse || {}), yse = /* @__PURE__ */ ((e) => (e[e.Off = 0] = "Off", e[e.On = 1] = "On", e[e.Auto = 2] = "Auto", e))(yse || {}), vse = /* @__PURE__ */ ((e) => (e[e.Semantic = 0] = "Semantic", e[e.PartialSemantic = 1] = "PartialSemantic", e[e.Syntactic = 2] = "Syntactic", e))(vse || {}), zp = {}, bse = /* @__PURE__ */ ((e) => (e.Original = "original", e.TwentyTwenty = "2020", e))(bse || {}), YU = /* @__PURE__ */ ((e) => (e.All = "All", e.SortAndCombine = "SortAndCombine", e.RemoveUnused = "RemoveUnused", e))(YU || {}), ZU = /* @__PURE__ */ ((e) => (e[e.Invoked = 1] = "Invoked", e[e.TriggerCharacter = 2] = "TriggerCharacter", e[e.TriggerForIncompleteCompletions = 3] = "TriggerForIncompleteCompletions", e))(ZU || {}), Sse = /* @__PURE__ */ ((e) => (e.Type = "Type", e.Parameter = "Parameter", e.Enum = "Enum", e))(Sse || {}), Tse = /* @__PURE__ */ ((e) => (e.none = "none", e.definition = "definition", e.reference = "reference", e.writtenReference = "writtenReference", e))(Tse || {}), xse = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Block = 1] = "Block", e[e.Smart = 2] = "Smart", e))(xse || {}), KU = /* @__PURE__ */ ((e) => (e.Ignore = "ignore", e.Insert = "insert", e.Remove = "remove", e))(KU || {}); + function r9(e) { + return { + indentSize: 4, + tabSize: 4, + newLineCharacter: e || ` +`, + convertTabsToSpaces: !0, + indentStyle: 2, + insertSpaceAfterConstructor: !1, + insertSpaceAfterCommaDelimiter: !0, + insertSpaceAfterSemicolonInForStatements: !0, + insertSpaceBeforeAndAfterBinaryOperators: !0, + insertSpaceAfterKeywordsInControlFlowStatements: !0, + insertSpaceAfterFunctionKeywordForAnonymousFunctions: !1, + insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: !1, + insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: !1, + insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces: !0, + insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: !1, + insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces: !1, + insertSpaceBeforeFunctionParenthesis: !1, + placeOpenBraceOnNewLineForFunctions: !1, + placeOpenBraceOnNewLineForControlBlocks: !1, + semicolons: "ignore", + trimTrailingWhitespace: !0, + indentSwitchCase: !0 + }; + } + var Mbe = r9(` +`), n9 = /* @__PURE__ */ ((e) => (e[e.aliasName = 0] = "aliasName", e[e.className = 1] = "className", e[e.enumName = 2] = "enumName", e[e.fieldName = 3] = "fieldName", e[e.interfaceName = 4] = "interfaceName", e[e.keyword = 5] = "keyword", e[e.lineBreak = 6] = "lineBreak", e[e.numericLiteral = 7] = "numericLiteral", e[e.stringLiteral = 8] = "stringLiteral", e[e.localName = 9] = "localName", e[e.methodName = 10] = "methodName", e[e.moduleName = 11] = "moduleName", e[e.operator = 12] = "operator", e[e.parameterName = 13] = "parameterName", e[e.propertyName = 14] = "propertyName", e[e.punctuation = 15] = "punctuation", e[e.space = 16] = "space", e[e.text = 17] = "text", e[e.typeParameterName = 18] = "typeParameterName", e[e.enumMemberName = 19] = "enumMemberName", e[e.functionName = 20] = "functionName", e[e.regularExpressionLiteral = 21] = "regularExpressionLiteral", e[e.link = 22] = "link", e[e.linkName = 23] = "linkName", e[e.linkText = 24] = "linkText", e))(n9 || {}), kse = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.MayIncludeAutoImports = 1] = "MayIncludeAutoImports", e[e.IsImportStatementCompletion = 2] = "IsImportStatementCompletion", e[e.IsContinuation = 4] = "IsContinuation", e[e.ResolvedModuleSpecifiers = 8] = "ResolvedModuleSpecifiers", e[e.ResolvedModuleSpecifiersBeyondLimit = 16] = "ResolvedModuleSpecifiersBeyondLimit", e[e.MayIncludeMethodSnippets = 32] = "MayIncludeMethodSnippets", e))(kse || {}), Cse = /* @__PURE__ */ ((e) => (e.Comment = "comment", e.Region = "region", e.Code = "code", e.Imports = "imports", e))(Cse || {}), Ese = /* @__PURE__ */ ((e) => (e[e.JavaScript = 0] = "JavaScript", e[e.SourceMap = 1] = "SourceMap", e[e.Declaration = 2] = "Declaration", e))(Ese || {}), Dse = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.InMultiLineCommentTrivia = 1] = "InMultiLineCommentTrivia", e[e.InSingleQuoteStringLiteral = 2] = "InSingleQuoteStringLiteral", e[e.InDoubleQuoteStringLiteral = 3] = "InDoubleQuoteStringLiteral", e[e.InTemplateHeadOrNoSubstitutionTemplate = 4] = "InTemplateHeadOrNoSubstitutionTemplate", e[e.InTemplateMiddleOrTail = 5] = "InTemplateMiddleOrTail", e[e.InTemplateSubstitutionPosition = 6] = "InTemplateSubstitutionPosition", e))(Dse || {}), wse = /* @__PURE__ */ ((e) => (e[e.Punctuation = 0] = "Punctuation", e[e.Keyword = 1] = "Keyword", e[e.Operator = 2] = "Operator", e[e.Comment = 3] = "Comment", e[e.Whitespace = 4] = "Whitespace", e[e.Identifier = 5] = "Identifier", e[e.NumberLiteral = 6] = "NumberLiteral", e[e.BigIntLiteral = 7] = "BigIntLiteral", e[e.StringLiteral = 8] = "StringLiteral", e[e.RegExpLiteral = 9] = "RegExpLiteral", e))(wse || {}), Pse = /* @__PURE__ */ ((e) => (e.unknown = "", e.warning = "warning", e.keyword = "keyword", e.scriptElement = "script", e.moduleElement = "module", e.classElement = "class", e.localClassElement = "local class", e.interfaceElement = "interface", e.typeElement = "type", e.enumElement = "enum", e.enumMemberElement = "enum member", e.variableElement = "var", e.localVariableElement = "local var", e.variableUsingElement = "using", e.variableAwaitUsingElement = "await using", e.functionElement = "function", e.localFunctionElement = "local function", e.memberFunctionElement = "method", e.memberGetAccessorElement = "getter", e.memberSetAccessorElement = "setter", e.memberVariableElement = "property", e.memberAccessorVariableElement = "accessor", e.constructorImplementationElement = "constructor", e.callSignatureElement = "call", e.indexSignatureElement = "index", e.constructSignatureElement = "construct", e.parameterElement = "parameter", e.typeParameterElement = "type parameter", e.primitiveType = "primitive type", e.label = "label", e.alias = "alias", e.constElement = "const", e.letElement = "let", e.directory = "directory", e.externalModuleName = "external module name", e.jsxAttribute = "JSX attribute", e.string = "string", e.link = "link", e.linkName = "link name", e.linkText = "link text", e))(Pse || {}), Nse = /* @__PURE__ */ ((e) => (e.none = "", e.publicMemberModifier = "public", e.privateMemberModifier = "private", e.protectedMemberModifier = "protected", e.exportedModifier = "export", e.ambientModifier = "declare", e.staticModifier = "static", e.abstractModifier = "abstract", e.optionalModifier = "optional", e.deprecatedModifier = "deprecated", e.dtsModifier = ".d.ts", e.tsModifier = ".ts", e.tsxModifier = ".tsx", e.jsModifier = ".js", e.jsxModifier = ".jsx", e.jsonModifier = ".json", e.dmtsModifier = ".d.mts", e.mtsModifier = ".mts", e.mjsModifier = ".mjs", e.dctsModifier = ".d.cts", e.ctsModifier = ".cts", e.cjsModifier = ".cjs", e))(Nse || {}), Ase = /* @__PURE__ */ ((e) => (e.comment = "comment", e.identifier = "identifier", e.keyword = "keyword", e.numericLiteral = "number", e.bigintLiteral = "bigint", e.operator = "operator", e.stringLiteral = "string", e.whiteSpace = "whitespace", e.text = "text", e.punctuation = "punctuation", e.className = "class name", e.enumName = "enum name", e.interfaceName = "interface name", e.moduleName = "module name", e.typeParameterName = "type parameter name", e.typeAliasName = "type alias name", e.parameterName = "parameter name", e.docCommentTagName = "doc comment tag name", e.jsxOpenTagName = "jsx open tag name", e.jsxCloseTagName = "jsx close tag name", e.jsxSelfClosingTagName = "jsx self closing tag name", e.jsxAttribute = "jsx attribute", e.jsxText = "jsx text", e.jsxAttributeStringLiteralValue = "jsx attribute string literal value", e))(Ase || {}), eV = /* @__PURE__ */ ((e) => (e[e.comment = 1] = "comment", e[e.identifier = 2] = "identifier", e[e.keyword = 3] = "keyword", e[e.numericLiteral = 4] = "numericLiteral", e[e.operator = 5] = "operator", e[e.stringLiteral = 6] = "stringLiteral", e[e.regularExpressionLiteral = 7] = "regularExpressionLiteral", e[e.whiteSpace = 8] = "whiteSpace", e[e.text = 9] = "text", e[e.punctuation = 10] = "punctuation", e[e.className = 11] = "className", e[e.enumName = 12] = "enumName", e[e.interfaceName = 13] = "interfaceName", e[e.moduleName = 14] = "moduleName", e[e.typeParameterName = 15] = "typeParameterName", e[e.typeAliasName = 16] = "typeAliasName", e[e.parameterName = 17] = "parameterName", e[e.docCommentTagName = 18] = "docCommentTagName", e[e.jsxOpenTagName = 19] = "jsxOpenTagName", e[e.jsxCloseTagName = 20] = "jsxCloseTagName", e[e.jsxSelfClosingTagName = 21] = "jsxSelfClosingTagName", e[e.jsxAttribute = 22] = "jsxAttribute", e[e.jsxText = 23] = "jsxText", e[e.jsxAttributeStringLiteralValue = 24] = "jsxAttributeStringLiteralValue", e[e.bigintLiteral = 25] = "bigintLiteral", e))(eV || {}), Fl = Og( + 99, + /*skipTrivia*/ + !0 + ), Ise = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Value = 1] = "Value", e[e.Type = 2] = "Type", e[e.Namespace = 4] = "Namespace", e[e.All = 7] = "All", e))(Ise || {}); + function i9(e) { + switch (e.kind) { + case 260: + return an(e) && kj(e) ? 7 : 1; + case 169: + case 208: + case 172: + case 171: + case 303: + case 304: + case 174: + case 173: + case 176: + case 177: + case 178: + case 262: + case 218: + case 219: + case 299: + case 291: + return 1; + case 168: + case 264: + case 265: + case 187: + return 2; + case 346: + return e.name === void 0 ? 3 : 2; + case 306: + case 263: + return 3; + case 267: + return Ou(e) || jh(e) === 1 ? 5 : 4; + case 266: + case 275: + case 276: + case 271: + case 272: + case 277: + case 278: + return 7; + // An external module can be a Value + case 307: + return 5; + } + return 7; + } + function $S(e) { + e = pV(e); + const t = e.parent; + return e.kind === 307 ? 1 : Io(t) || Tu(t) || Mh(t) || ju(t) || id(t) || _l(t) && e === t.name ? 7 : s9(e) ? TBe(e) : tg(e) ? i9(t) : Hu(e) && ur(e, U_(ED, ax, yv)) ? 7 : EBe(e) ? 2 : xBe(e) ? 4 : Ao(t) ? (E.assert(Bp(t.parent)), 2) : M0(t) ? 3 : 1; + } + function TBe(e) { + const t = e.kind === 166 ? e : Xu(e.parent) && e.parent.right === e ? e.parent : void 0; + return t && t.parent.kind === 271 ? 7 : 4; + } + function s9(e) { + for (; e.parent.kind === 166; ) + e = e.parent; + return gS(e.parent) && e.parent.moduleReference === e; + } + function xBe(e) { + return kBe(e) || CBe(e); + } + function kBe(e) { + let t = e, n = !0; + if (t.parent.kind === 166) { + for (; t.parent && t.parent.kind === 166; ) + t = t.parent; + n = t.right === e; + } + return t.parent.kind === 183 && !n; + } + function CBe(e) { + let t = e, n = !0; + if (t.parent.kind === 211) { + for (; t.parent && t.parent.kind === 211; ) + t = t.parent; + n = t.name === e; + } + if (!n && t.parent.kind === 233 && t.parent.parent.kind === 298) { + const i = t.parent.parent.parent; + return i.kind === 263 && t.parent.parent.token === 119 || i.kind === 264 && t.parent.parent.token === 96; + } + return !1; + } + function EBe(e) { + switch (H4(e) && (e = e.parent), e.kind) { + case 110: + return !Td(e); + case 197: + return !0; + } + switch (e.parent.kind) { + case 183: + return !0; + case 205: + return !e.parent.isTypeOf; + case 233: + return im(e.parent); + } + return !1; + } + function tV(e, t = !1, n = !1) { + return dA(e, Fs, nV, t, n); + } + function nw(e, t = !1, n = !1) { + return dA(e, Yb, nV, t, n); + } + function rV(e, t = !1, n = !1) { + return dA(e, tm, nV, t, n); + } + function Fse(e, t = !1, n = !1) { + return dA(e, fv, DBe, t, n); + } + function Ose(e, t = !1, n = !1) { + return dA(e, ll, nV, t, n); + } + function Lse(e, t = !1, n = !1) { + return dA(e, bu, wBe, t, n); + } + function nV(e) { + return e.expression; + } + function DBe(e) { + return e.tag; + } + function wBe(e) { + return e.tagName; + } + function dA(e, t, n, i, s) { + let o = i ? PBe(e) : a9(e); + return s && (o = xc(o)), !!o && !!o.parent && t(o.parent) && n(o.parent) === o; + } + function a9(e) { + return N6(e) ? e.parent : e; + } + function PBe(e) { + return N6(e) || oV(e) ? e.parent : e; + } + function o9(e, t) { + for (; e; ) { + if (e.kind === 256 && e.label.escapedText === t) + return e.label; + e = e.parent; + } + } + function mA(e, t) { + return Tn(e.expression) ? e.expression.name.text === t : !1; + } + function gA(e) { + var t; + return Me(e) && ((t = jn(e.parent, g4)) == null ? void 0 : t.label) === e; + } + function iV(e) { + var t; + return Me(e) && ((t = jn(e.parent, i1)) == null ? void 0 : t.label) === e; + } + function sV(e) { + return iV(e) || gA(e); + } + function aV(e) { + var t; + return ((t = jn(e.parent, TC)) == null ? void 0 : t.tagName) === e; + } + function Mse(e) { + var t; + return ((t = jn(e.parent, Xu)) == null ? void 0 : t.right) === e; + } + function N6(e) { + var t; + return ((t = jn(e.parent, Tn)) == null ? void 0 : t.name) === e; + } + function oV(e) { + var t; + return ((t = jn(e.parent, fo)) == null ? void 0 : t.argumentExpression) === e; + } + function cV(e) { + var t; + return ((t = jn(e.parent, Lc)) == null ? void 0 : t.name) === e; + } + function lV(e) { + var t; + return Me(e) && ((t = jn(e.parent, vs)) == null ? void 0 : t.name) === e; + } + function c9(e) { + switch (e.parent.kind) { + case 172: + case 171: + case 303: + case 306: + case 174: + case 173: + case 177: + case 178: + case 267: + return is(e.parent) === e; + case 212: + return e.parent.argumentExpression === e; + case 167: + return !0; + case 201: + return e.parent.parent.kind === 199; + default: + return !1; + } + } + function Rse(e) { + return tv(e.parent.parent) && A4(e.parent.parent) === e; + } + function XS(e) { + for (Fp(e) && (e = e.parent.parent); ; ) { + if (e = e.parent, !e) + return; + switch (e.kind) { + case 307: + case 174: + case 173: + case 262: + case 218: + case 177: + case 178: + case 263: + case 264: + case 266: + case 267: + return e; + } + } + } + function u2(e) { + switch (e.kind) { + case 307: + return el(e) ? "module" : "script"; + case 267: + return "module"; + case 263: + case 231: + return "class"; + case 264: + return "interface"; + case 265: + case 338: + case 346: + return "type"; + case 266: + return "enum"; + case 260: + return t(e); + case 208: + return t(om(e)); + case 219: + case 262: + case 218: + return "function"; + case 177: + return "getter"; + case 178: + return "setter"; + case 174: + case 173: + return "method"; + case 303: + const { initializer: n } = e; + return vs(n) ? "method" : "property"; + case 172: + case 171: + case 304: + case 305: + return "property"; + case 181: + return "index"; + case 180: + return "construct"; + case 179: + return "call"; + case 176: + case 175: + return "constructor"; + case 168: + return "type parameter"; + case 306: + return "enum member"; + case 169: + return $n( + e, + 31 + /* ParameterPropertyModifier */ + ) ? "property" : "parameter"; + case 271: + case 276: + case 281: + case 274: + case 280: + return "alias"; + case 226: + const i = Sc(e), { right: s } = e; + switch (i) { + case 7: + case 8: + case 9: + case 0: + return ""; + case 1: + case 2: + const c = u2(s); + return c === "" ? "const" : c; + case 3: + return po(s) ? "method" : "property"; + case 4: + return "property"; + // property + case 5: + return po(s) ? "method" : "property"; + case 6: + return "local class"; + default: + return ""; + } + case 80: + return id(e.parent) ? "alias" : ""; + case 277: + const o = u2(e.expression); + return o === "" ? "const" : o; + default: + return ""; + } + function t(n) { + return wC(n) ? "const" : F7(n) ? "let" : "var"; + } + } + function A6(e) { + switch (e.kind) { + case 110: + return !0; + case 80: + return UB(e) && e.parent.kind === 169; + default: + return !1; + } + } + var NBe = /^\/\/\/\s*= n; + } + function iw(e, t, n) { + return u9(e.pos, e.end, t, n); + } + function l9(e, t, n, i) { + return u9(e.getStart(t), e.end, n, i); + } + function u9(e, t, n, i) { + const s = Math.max(e, n), o = Math.min(t, i); + return s < o; + } + function uV(e, t, n) { + return E.assert(e.pos <= t), t < e.end || !Fd(e, n); + } + function Fd(e, t) { + if (e === void 0 || tc(e)) + return !1; + switch (e.kind) { + case 263: + case 264: + case 266: + case 210: + case 206: + case 187: + case 241: + case 268: + case 269: + case 275: + case 279: + return _V(e, 20, t); + case 299: + return Fd(e.block, t); + case 214: + if (!e.arguments) + return !0; + // falls through + case 213: + case 217: + case 196: + return _V(e, 22, t); + case 184: + case 185: + return Fd(e.type, t); + case 176: + case 177: + case 178: + case 262: + case 218: + case 174: + case 173: + case 180: + case 179: + case 219: + return e.body ? Fd(e.body, t) : e.type ? Fd(e.type, t) : fV(e, 22, t); + case 267: + return !!e.body && Fd(e.body, t); + case 245: + return e.elseStatement ? Fd(e.elseStatement, t) : Fd(e.thenStatement, t); + case 244: + return Fd(e.expression, t) || fV(e, 27, t); + case 209: + case 207: + case 212: + case 167: + case 189: + return _V(e, 24, t); + case 181: + return e.type ? Fd(e.type, t) : fV(e, 24, t); + case 296: + case 297: + return !1; + case 248: + case 249: + case 250: + case 247: + return Fd(e.statement, t); + case 246: + return fV(e, 117, t) ? _V(e, 22, t) : Fd(e.statement, t); + case 186: + return Fd(e.exprName, t); + case 221: + case 220: + case 222: + case 229: + case 230: + return Fd(e.expression, t); + case 215: + return Fd(e.template, t); + case 228: + const i = Co(e.templateSpans); + return Fd(i, t); + case 239: + return Ap(e.literal); + case 278: + case 272: + return Ap(e.moduleSpecifier); + case 224: + return Fd(e.operand, t); + case 226: + return Fd(e.right, t); + case 227: + return Fd(e.whenFalse, t); + default: + return !0; + } + } + function _V(e, t, n) { + const i = e.getChildren(n); + if (i.length) { + const s = _a(i); + if (s.kind === t) + return !0; + if (s.kind === 27 && i.length !== 1) + return i[i.length - 2].kind === t; + } + return !1; + } + function Bse(e) { + const t = _9(e); + if (!t) + return; + const n = t.getChildren(); + return { + listItemIndex: CC(n, e), + list: t + }; + } + function fV(e, t, n) { + return !!Xa(e, t, n); + } + function Xa(e, t, n) { + return Pn(e.getChildren(n), (i) => i.kind === t); + } + function _9(e) { + const t = Pn(e.parent.getChildren(), (n) => c6(n) && p_(n, e)); + return E.assert(!t || as(t.getChildren(), e)), t; + } + function Rbe(e) { + return e.kind === 90; + } + function ABe(e) { + return e.kind === 86; + } + function IBe(e) { + return e.kind === 100; + } + function FBe(e) { + if (Hl(e)) + return e.name; + if ($c(e)) { + const t = e.modifiers && Pn(e.modifiers, Rbe); + if (t) return t; + } + if (Gc(e)) { + const t = Pn(e.getChildren(), ABe); + if (t) return t; + } + } + function OBe(e) { + if (Hl(e)) + return e.name; + if (Tc(e)) { + const t = Pn(e.modifiers, Rbe); + if (t) return t; + } + if (po(e)) { + const t = Pn(e.getChildren(), IBe); + if (t) return t; + } + } + function LBe(e) { + let t; + return ur(e, (n) => (fi(n) && (t = n), !Xu(n.parent) && !fi(n.parent) && !kb(n.parent))), t; + } + function f9(e, t) { + if (e.flags & 16777216) return; + const n = w9(e, t); + if (n) return n; + const i = LBe(e); + return i && t.getTypeAtLocation(i); + } + function MBe(e, t) { + if (!t) + switch (e.kind) { + case 263: + case 231: + return FBe(e); + case 262: + case 218: + return OBe(e); + case 176: + return e; + } + if (Hl(e)) + return e.name; + } + function jbe(e, t) { + if (e.importClause) { + if (e.importClause.name && e.importClause.namedBindings) + return; + if (e.importClause.name) + return e.importClause.name; + if (e.importClause.namedBindings) { + if (mm(e.importClause.namedBindings)) { + const n = Hm(e.importClause.namedBindings.elements); + return n ? n.name : void 0; + } else if (Yg(e.importClause.namedBindings)) + return e.importClause.namedBindings.name; + } + } + if (!t) + return e.moduleSpecifier; + } + function Bbe(e, t) { + if (e.exportClause) { + if (up(e.exportClause)) + return Hm(e.exportClause.elements) ? e.exportClause.elements[0].name : void 0; + if (ig(e.exportClause)) + return e.exportClause.name; + } + if (!t) + return e.moduleSpecifier; + } + function RBe(e) { + if (e.types.length === 1) + return e.types[0].expression; + } + function Jbe(e, t) { + const { parent: n } = e; + if (ia(e) && (t || e.kind !== 90) ? Jp(n) && as(n.modifiers, e) : e.kind === 86 ? $c(n) || Gc(e) : e.kind === 100 ? Tc(n) || po(e) : e.kind === 120 ? Yl(n) : e.kind === 94 ? Zb(n) : e.kind === 156 ? jp(n) : e.kind === 145 || e.kind === 144 ? Lc(n) : e.kind === 102 ? _l(n) : e.kind === 139 ? cp(n) : e.kind === 153 && A_(n)) { + const i = MBe(n, t); + if (i) + return i; + } + if ((e.kind === 115 || e.kind === 87 || e.kind === 121) && Il(n) && n.declarations.length === 1) { + const i = n.declarations[0]; + if (Me(i.name)) + return i.name; + } + if (e.kind === 156) { + if (id(n) && n.isTypeOnly) { + const i = jbe(n.parent, t); + if (i) + return i; + } + if (wc(n) && n.isTypeOnly) { + const i = Bbe(n, t); + if (i) + return i; + } + } + if (e.kind === 130) { + if (ju(n) && n.propertyName || Tu(n) && n.propertyName || Yg(n) || ig(n)) + return n.name; + if (wc(n) && n.exportClause && ig(n.exportClause)) + return n.exportClause.name; + } + if (e.kind === 102 && zo(n)) { + const i = jbe(n, t); + if (i) + return i; + } + if (e.kind === 95) { + if (wc(n)) { + const i = Bbe(n, t); + if (i) + return i; + } + if (Io(n)) + return xc(n.expression); + } + if (e.kind === 149 && Mh(n)) + return n.expression; + if (e.kind === 161 && (zo(n) || wc(n)) && n.moduleSpecifier) + return n.moduleSpecifier; + if ((e.kind === 96 || e.kind === 119) && Z_(n) && n.token === e.kind) { + const i = RBe(n); + if (i) + return i; + } + if (e.kind === 96) { + if (Ao(n) && n.constraint && Y_(n.constraint)) + return n.constraint.typeName; + if (Xb(n) && Y_(n.extendsType)) + return n.extendsType.typeName; + } + if (e.kind === 140 && AS(n)) + return n.typeParameter.name; + if (e.kind === 103 && Ao(n) && FS(n.parent)) + return n.name; + if (e.kind === 143 && _v(n) && n.operator === 143 && Y_(n.type)) + return n.type.typeName; + if (e.kind === 148 && _v(n) && n.operator === 148 && mN(n.type) && Y_(n.type.elementType)) + return n.type.elementType.typeName; + if (!t) { + if ((e.kind === 105 && Yb(n) || e.kind === 116 && Vx(n) || e.kind === 114 && e6(n) || e.kind === 135 && n1(n) || e.kind === 127 && gF(n) || e.kind === 91 && vte(n)) && n.expression) + return xc(n.expression); + if ((e.kind === 103 || e.kind === 104) && fn(n) && n.operatorToken === e) + return xc(n.right); + if (e.kind === 130 && t6(n) && Y_(n.type)) + return n.type.typeName; + if (e.kind === 103 && yF(n) || e.kind === 165 && gN(n)) + return xc(n.expression); + } + return e; + } + function pV(e) { + return Jbe( + e, + /*forRename*/ + !1 + ); + } + function p9(e) { + return Jbe( + e, + /*forRename*/ + !0 + ); + } + function h_(e, t) { + return F6(e, t, (n) => am(n) || f_(n.kind) || Ni(n)); + } + function F6(e, t, n) { + return zbe( + e, + t, + /*allowPositionInLeadingTrivia*/ + !1, + n, + /*includeEndPosition*/ + !1 + ); + } + function Si(e, t) { + return zbe( + e, + t, + /*allowPositionInLeadingTrivia*/ + !0, + /*includePrecedingTokenAtEndPosition*/ + void 0, + /*includeEndPosition*/ + !1 + ); + } + function zbe(e, t, n, i, s) { + let o = e, c; + e: + for (; ; ) { + const u = o.getChildren(e), m = HT(u, t, (g, h) => h, (g, h) => { + const S = u[g].getEnd(); + if (S < t) + return -1; + const T = n ? u[g].getFullStart() : u[g].getStart( + e, + /*includeJsDocComment*/ + !0 + ); + return T > t ? 1 : _(u[g], T, S) ? u[g - 1] && _(u[g - 1]) ? 1 : 0 : i && T === t && u[g - 1] && u[g - 1].getEnd() === t && _(u[g - 1]) ? 1 : -1; + }); + if (c) + return c; + if (m >= 0 && u[m]) { + o = u[m]; + continue e; + } + return o; + } + function _(u, m, g) { + if (g ?? (g = u.getEnd()), g < t || (m ?? (m = n ? u.getFullStart() : u.getStart( + e, + /*includeJsDocComment*/ + !0 + )), m > t)) + return !1; + if (t < g || t === g && (u.kind === 1 || s)) + return !0; + if (i && g === t) { + const h = tl(t, e, u); + if (h && i(h)) + return c = h, !0; + } + return !1; + } + } + function Jse(e, t) { + let n = Si(e, t); + for (; d9(n); ) { + const i = _2(n, n.parent, e); + if (!i) return; + n = i; + } + return n; + } + function sw(e, t) { + const n = Si(e, t); + return rx(n) && t > n.getStart(e) && t < n.getEnd() ? n : tl(t, e); + } + function _2(e, t, n) { + return i(t); + function i(s) { + return rx(s) && s.pos === e.end ? s : Dc(s.getChildren(n), (o) => /* previous token is enclosed somewhere in the child */ (o.pos <= e.pos && o.end > e.end || // previous token ends exactly at the beginning of child + o.pos === e.end) && Hse(o, n) ? i(o) : void 0); + } + } + function tl(e, t, n, i) { + const s = o(n || t); + return E.assert(!(s && d9(s))), s; + function o(c) { + if (Wbe(c) && c.kind !== 1) + return c; + const _ = c.getChildren(t), u = HT(_, e, (g, h) => h, (g, h) => e < _[g].end ? !_[g - 1] || e >= _[g - 1].end ? 0 : 1 : -1); + if (u >= 0 && _[u]) { + const g = _[u]; + if (e < g.end) + if (g.getStart( + t, + /*includeJsDoc*/ + !i + ) >= e || // cursor in the leading trivia + !Hse(g, t) || d9(g)) { + const T = Wse( + _, + /*exclusiveStartPosition*/ + u, + t, + c.kind + ); + return T ? !i && h7(T) && T.getChildren(t).length ? o(T) : zse(T, t) : void 0; + } else + return o(g); + } + E.assert(n !== void 0 || c.kind === 307 || c.kind === 1 || h7(c)); + const m = Wse( + _, + /*exclusiveStartPosition*/ + _.length, + t, + c.kind + ); + return m && zse(m, t); + } + } + function Wbe(e) { + return rx(e) && !d9(e); + } + function zse(e, t) { + if (Wbe(e)) + return e; + const n = e.getChildren(t); + if (n.length === 0) + return e; + const i = Wse( + n, + /*exclusiveStartPosition*/ + n.length, + t, + e.kind + ); + return i && zse(i, t); + } + function Wse(e, t, n, i) { + for (let s = t - 1; s >= 0; s--) { + const o = e[s]; + if (d9(o)) + s === 0 && (i === 12 || i === 285) && E.fail("`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`"); + else if (Hse(e[s], n)) + return e[s]; + } + } + function lk(e, t, n = tl(t, e)) { + if (n && Aj(n)) { + const i = n.getStart(e), s = n.getEnd(); + if (i < t && t < s) + return !0; + if (t === s) + return !!n.isUnterminated; + } + return !1; + } + function Use(e, t) { + const n = Si(e, t); + return n ? !!(n.kind === 12 || n.kind === 30 && n.parent.kind === 12 || n.kind === 30 && n.parent.kind === 294 || n && n.kind === 20 && n.parent.kind === 294 || n.kind === 30 && n.parent.kind === 287) : !1; + } + function d9(e) { + return Mx(e) && e.containsOnlyTriviaWhiteSpaces; + } + function dV(e, t) { + const n = Si(e, t); + return Ry(n.kind) && t > n.getStart(e); + } + function Vse(e, t) { + const n = Si(e, t); + return !!(Mx(n) || n.kind === 19 && n6(n.parent) && gm(n.parent.parent) || n.kind === 30 && bu(n.parent) && gm(n.parent.parent)); + } + function m9(e, t) { + function n(i) { + for (; i; ) + if (i.kind >= 285 && i.kind <= 294 || i.kind === 12 || i.kind === 30 || i.kind === 32 || i.kind === 80 || i.kind === 20 || i.kind === 19 || i.kind === 44) + i = i.parent; + else if (i.kind === 284) { + if (t > i.getStart(e)) return !0; + i = i.parent; + } else + return !1; + return !1; + } + return n(Si(e, t)); + } + function g9(e, t, n) { + const i = Xs(e.kind), s = Xs(t), o = e.getFullStart(), c = n.text.lastIndexOf(s, o); + if (c === -1) + return; + if (n.text.lastIndexOf(i, o - 1) < c) { + const m = tl(c + 1, n); + if (m && m.kind === t) + return m; + } + const _ = e.kind; + let u = 0; + for (; ; ) { + const m = tl(e.getFullStart(), n); + if (!m) + return; + if (e = m, e.kind === t) { + if (u === 0) + return e; + u--; + } else e.kind === _ && u++; + } + } + function jBe(e, t, n) { + return t ? e.getNonNullableType() : n ? e.getNonOptionalType() : e; + } + function vA(e, t, n) { + const i = gV(e, t); + return i !== void 0 && (im(i.called) || mV(i.called, i.nTypeArguments, n).length !== 0 || vA(i.called, t, n)); + } + function mV(e, t, n) { + let i = n.getTypeAtLocation(e); + return vu(e.parent) && (i = jBe( + i, + d4(e.parent), + /*isOptionalChain*/ + !0 + )), (Yb(e.parent) ? i.getConstructSignatures() : i.getCallSignatures()).filter((o) => !!o.typeParameters && o.typeParameters.length >= t); + } + function gV(e, t) { + if (t.text.lastIndexOf("<", e ? e.pos : t.text.length) === -1) + return; + let n = e, i = 0, s = 0; + for (; n; ) { + switch (n.kind) { + case 30: + if (n = tl(n.getFullStart(), t), n && n.kind === 29 && (n = tl(n.getFullStart(), t)), !n || !Me(n)) return; + if (!i) + return tg(n) ? void 0 : { called: n, nTypeArguments: s }; + i--; + break; + case 50: + i = 3; + break; + case 49: + i = 2; + break; + case 32: + i++; + break; + case 20: + if (n = g9(n, 19, t), !n) return; + break; + case 22: + if (n = g9(n, 21, t), !n) return; + break; + case 24: + if (n = g9(n, 23, t), !n) return; + break; + // Valid tokens in a type name. Skip. + case 28: + s++; + break; + case 39: + // falls through + case 80: + case 11: + case 9: + case 10: + case 112: + case 97: + // falls through + case 114: + case 96: + case 143: + case 25: + case 52: + case 58: + case 59: + break; + default: + if (fi(n)) + break; + return; + } + n = tl(n.getFullStart(), t); + } + } + function J0(e, t, n) { + return Qc.getRangeOfEnclosingComment( + e, + t, + /*precedingToken*/ + void 0, + n + ); + } + function qse(e, t) { + const n = Si(e, t); + return !!ur(n, Pd); + } + function Hse(e, t) { + return e.kind === 1 ? !!e.jsDoc : e.getWidth(t) !== 0; + } + function aw(e, t = 0) { + const n = [], i = bl(e) ? vj(e) & ~t : 0; + return i & 2 && n.push( + "private" + /* privateMemberModifier */ + ), i & 4 && n.push( + "protected" + /* protectedMemberModifier */ + ), i & 1 && n.push( + "public" + /* publicMemberModifier */ + ), (i & 256 || nc(e)) && n.push( + "static" + /* staticModifier */ + ), i & 64 && n.push( + "abstract" + /* abstractModifier */ + ), i & 32 && n.push( + "export" + /* exportedModifier */ + ), i & 65536 && n.push( + "deprecated" + /* deprecatedModifier */ + ), e.flags & 33554432 && n.push( + "declare" + /* ambientModifier */ + ), e.kind === 277 && n.push( + "export" + /* exportedModifier */ + ), n.length > 0 ? n.join(",") : ""; + } + function Gse(e) { + if (e.kind === 183 || e.kind === 213) + return e.typeArguments; + if (vs(e) || e.kind === 263 || e.kind === 264) + return e.typeParameters; + } + function h9(e) { + return e === 2 || e === 3; + } + function hV(e) { + return !!(e === 11 || e === 14 || Ry(e)); + } + function Ube(e, t, n) { + return !!(t.flags & 4) && e.isEmptyAnonymousObjectType(n); + } + function $se(e) { + if (!e.isIntersection()) + return !1; + const { types: t, checker: n } = e; + return t.length === 2 && (Ube(n, t[0], t[1]) || Ube(n, t[1], t[0])); + } + function bA(e, t, n) { + return Ry(e.kind) && e.getStart(n) < t && t < e.end || !!e.isUnterminated && t === e.end; + } + function yV(e) { + switch (e) { + case 125: + case 123: + case 124: + return !0; + } + return !1; + } + function vV(e) { + const t = HX(e); + return Wz(t, e && e.configFile), t; + } + function z0(e) { + return !!((e.kind === 209 || e.kind === 210) && (e.parent.kind === 226 && e.parent.left === e && e.parent.operatorToken.kind === 64 || e.parent.kind === 250 && e.parent.initializer === e || z0(e.parent.kind === 303 ? e.parent.parent : e.parent))); + } + function Xse(e, t) { + return Vbe( + e, + t, + /*shouldBeReference*/ + !0 + ); + } + function Qse(e, t) { + return Vbe( + e, + t, + /*shouldBeReference*/ + !1 + ); + } + function Vbe(e, t, n) { + const i = J0( + e, + t, + /*tokenAtPosition*/ + void 0 + ); + return !!i && n === NBe.test(e.text.substring(i.pos, i.end)); + } + function bV(e, t) { + if (e) + switch (e.kind) { + case 11: + case 15: + return SV(e, t); + default: + return e_(e); + } + } + function e_(e, t, n) { + return bc(e.getStart(t), (n || e).getEnd()); + } + function SV(e, t) { + let n = e.getEnd() - 1; + if (e.isUnterminated) { + if (e.getStart() === n) return; + n = Math.min(t, e.getEnd()); + } + return bc(e.getStart() + 1, n); + } + function TV(e, t) { + return np(e.getStart(t), e.end); + } + function W0(e) { + return bc(e.pos, e.end); + } + function y9(e) { + return np(e.start, e.start + e.length); + } + function v9(e, t, n) { + return SA(ql(e, t), n); + } + function SA(e, t) { + return { span: e, newText: t }; + } + var xV = [ + 133, + 131, + 163, + 136, + 97, + 140, + 143, + 146, + 106, + 150, + 151, + 148, + 154, + 155, + 114, + 112, + 116, + 157, + 158, + 159 + /* UnknownKeyword */ + ]; + function ow(e) { + return as(xV, e); + } + function qbe(e) { + return e.kind === 156; + } + function b9(e) { + return qbe(e) || Me(e) && e.text === "type"; + } + function O6() { + const e = []; + return (t) => { + const n = Aa(t); + return !e[n] && (e[n] = !0); + }; + } + function uk(e) { + return e.getText(0, e.getLength()); + } + function TA(e, t) { + let n = ""; + for (let i = 0; i < t; i++) + n += e; + return n; + } + function kV(e) { + return e.isTypeParameter() && e.getConstraint() || e; + } + function xA(e) { + return e.kind === 167 ? wf(e.expression) ? e.expression.text : void 0 : Ni(e) ? An(e) : rp(e); + } + function Yse(e) { + return e.getSourceFiles().some((t) => !t.isDeclarationFile && !e.isSourceFileFromExternalLibrary(t) && !!(t.externalModuleIndicator || t.commonJsModuleIndicator)); + } + function Zse(e) { + return e.getSourceFiles().some((t) => !t.isDeclarationFile && !e.isSourceFileFromExternalLibrary(t) && !!t.externalModuleIndicator); + } + function CV(e) { + return !!e.module || pa(e) >= 2 || !!e.noEmit; + } + function wv(e, t) { + return { + fileExists: (n) => e.fileExists(n), + getCurrentDirectory: () => t.getCurrentDirectory(), + readFile: Is(t, t.readFile), + useCaseSensitiveFileNames: Is(t, t.useCaseSensitiveFileNames) || e.useCaseSensitiveFileNames, + getSymlinkCache: Is(t, t.getSymlinkCache) || e.getSymlinkCache, + getModuleSpecifierCache: Is(t, t.getModuleSpecifierCache), + getPackageJsonInfoCache: () => { + var n; + return (n = e.getModuleResolutionCache()) == null ? void 0 : n.getPackageJsonInfoCache(); + }, + getGlobalTypingsCacheLocation: Is(t, t.getGlobalTypingsCacheLocation), + redirectTargetsMap: e.redirectTargetsMap, + getProjectReferenceRedirect: (n) => e.getProjectReferenceRedirect(n), + isSourceOfProjectReferenceRedirect: (n) => e.isSourceOfProjectReferenceRedirect(n), + getNearestAncestorDirectoryWithPackageJson: Is(t, t.getNearestAncestorDirectoryWithPackageJson), + getFileIncludeReasons: () => e.getFileIncludeReasons(), + getCommonSourceDirectory: () => e.getCommonSourceDirectory(), + getDefaultResolutionModeForFile: (n) => e.getDefaultResolutionModeForFile(n), + getModeForResolutionAtIndex: (n, i) => e.getModeForResolutionAtIndex(n, i) + }; + } + function EV(e, t) { + return { + ...wv(e, t), + getCommonSourceDirectory: () => e.getCommonSourceDirectory() + }; + } + function S9(e) { + return e === 2 || e >= 3 && e <= 99 || e === 100; + } + function p1(e, t, n, i, s) { + return N.createImportDeclaration( + /*modifiers*/ + void 0, + e || t ? N.createImportClause(!!s, e, t && t.length ? N.createNamedImports(t) : void 0) : void 0, + typeof n == "string" ? cw(n, i) : n, + /*attributes*/ + void 0 + ); + } + function cw(e, t) { + return N.createStringLiteral( + e, + t === 0 + /* Single */ + ); + } + var Kse = /* @__PURE__ */ ((e) => (e[e.Single = 0] = "Single", e[e.Double = 1] = "Double", e))(Kse || {}); + function DV(e, t) { + return Q7(e, t) ? 1 : 0; + } + function tf(e, t) { + if (t.quotePreference && t.quotePreference !== "auto") + return t.quotePreference === "single" ? 0 : 1; + { + const n = zg(e) && e.imports && Pn(e.imports, (i) => ea(i) && !no(i.parent)); + return n ? DV(n, e) : 1; + } + } + function wV(e) { + switch (e) { + case 0: + return "'"; + case 1: + return '"'; + default: + return E.assertNever(e); + } + } + function PV(e) { + const t = T9(e); + return t === void 0 ? void 0 : Pi(t); + } + function T9(e) { + return e.escapedName !== "default" ? e.escapedName : Dc(e.declarations, (t) => { + const n = is(t); + return n && n.kind === 80 ? n.escapedText : void 0; + }); + } + function x9(e) { + return Na(e) && (Mh(e.parent) || zo(e.parent) || ym(e.parent) || __( + e.parent, + /*requireStringLiteralLikeArgument*/ + !1 + ) && e.parent.arguments[0] === e || _f(e.parent) && e.parent.arguments[0] === e); + } + function kA(e) { + return ma(e) && Nf(e.parent) && Me(e.name) && !e.propertyName; + } + function k9(e, t) { + const n = e.getTypeAtLocation(t.parent); + return n && e.getPropertyOfType(n, t.name.text); + } + function CA(e, t, n) { + if (e) + for (; e.parent; ) { + if (Ei(e.parent) || !BBe(n, e.parent, t)) + return e; + e = e.parent; + } + } + function BBe(e, t, n) { + return gj(e, t.getStart(n)) && t.getEnd() <= Yo(e); + } + function L6(e, t) { + return Jp(e) ? Pn(e.modifiers, (n) => n.kind === t) : void 0; + } + function NV(e, t, n, i, s) { + var o; + const _ = (os(n) ? n[0] : n).kind === 243 ? f3 : ux, u = kn(t.statements, _), { comparer: m, isSorted: g } = Mv.getOrganizeImportsStringComparerWithDetection(u, s), h = os(n) ? W_(n, (S, T) => Mv.compareImportsOrRequireStatements(S, T, m)) : [n]; + if (!u?.length) { + if (zg(t)) + e.insertNodesAtTopOfFile(t, h, i); + else + for (const S of h) + e.insertStatementsInNewFile(t.fileName, [S], (o = Jo(S)) == null ? void 0 : o.getSourceFile()); + return; + } + if (E.assert(zg(t)), u && g) + for (const S of h) { + const T = Mv.getImportDeclarationInsertionIndex(u, S, m); + if (T === 0) { + const C = u[0] === t.statements[0] ? { leadingTriviaOption: sn.LeadingTriviaOption.Exclude } : {}; + e.insertNodeBefore( + t, + u[0], + S, + /*blankLineBetween*/ + !1, + C + ); + } else { + const C = u[T - 1]; + e.insertNodeAfter(t, C, S); + } + } + else { + const S = Co(u); + S ? e.insertNodesAfter(t, S, h) : e.insertNodesAtTopOfFile(t, h, i); + } + } + function AV(e, t) { + return E.assert(e.isTypeOnly), Ws(e.getChildAt(0, t), qbe); + } + function M6(e, t) { + return !!e && !!t && e.start === t.start && e.length === t.length; + } + function IV(e, t, n) { + return (n ? bb : Py)(e.fileName, t.fileName) && M6(e.textSpan, t.textSpan); + } + function FV(e) { + return (t, n) => IV(t, n, e); + } + function OV(e, t) { + if (e) { + for (let n = 0; n < e.length; n++) + if (e.indexOf(e[n]) === n) { + const i = t(e[n], n); + if (i) + return i; + } + } + } + function eae(e, t, n) { + for (let i = t; i < n; i++) + if (!Ig(e.charCodeAt(i))) + return !1; + return !0; + } + function lw(e, t, n) { + const i = t.tryGetSourcePosition(e); + return i && (!n || n(Hs(i.fileName)) ? i : void 0); + } + function C9(e, t, n) { + const { fileName: i, textSpan: s } = e, o = lw({ fileName: i, pos: s.start }, t, n); + if (!o) return; + const c = lw({ fileName: i, pos: s.start + s.length }, t, n), _ = c ? c.pos - o.pos : s.length; + return { + fileName: o.fileName, + textSpan: { + start: o.pos, + length: _ + }, + originalFileName: e.fileName, + originalTextSpan: e.textSpan, + contextSpan: LV(e, t, n), + originalContextSpan: e.contextSpan + }; + } + function LV(e, t, n) { + const i = e.contextSpan && lw( + { fileName: e.fileName, pos: e.contextSpan.start }, + t, + n + ), s = e.contextSpan && lw( + { fileName: e.fileName, pos: e.contextSpan.start + e.contextSpan.length }, + t, + n + ); + return i && s ? { start: i.pos, length: s.pos - i.pos } : void 0; + } + function MV(e) { + const t = e.declarations ? Uc(e.declarations) : void 0; + return !!ur(t, (n) => Ii(n) ? !0 : ma(n) || Nf(n) || R0(n) ? !1 : "quit"); + } + var tae = JBe(); + function JBe() { + const e = x4 * 10; + let t, n, i, s; + g(); + const o = (h) => _( + h, + 17 + /* text */ + ); + return { + displayParts: () => { + const h = t.length && t[t.length - 1].text; + return s > e && h && h !== "..." && (Ig(h.charCodeAt(h.length - 1)) || t.push(I_( + " ", + 16 + /* space */ + )), t.push(I_( + "...", + 15 + /* punctuation */ + ))), t; + }, + writeKeyword: (h) => _( + h, + 5 + /* keyword */ + ), + writeOperator: (h) => _( + h, + 12 + /* operator */ + ), + writePunctuation: (h) => _( + h, + 15 + /* punctuation */ + ), + writeTrailingSemicolon: (h) => _( + h, + 15 + /* punctuation */ + ), + writeSpace: (h) => _( + h, + 16 + /* space */ + ), + writeStringLiteral: (h) => _( + h, + 8 + /* stringLiteral */ + ), + writeParameter: (h) => _( + h, + 13 + /* parameterName */ + ), + writeProperty: (h) => _( + h, + 14 + /* propertyName */ + ), + writeLiteral: (h) => _( + h, + 8 + /* stringLiteral */ + ), + writeSymbol: u, + writeLine: m, + write: o, + writeComment: o, + getText: () => "", + getTextPos: () => 0, + getColumn: () => 0, + getLine: () => 0, + isAtStartOfLine: () => !1, + hasTrailingWhitespace: () => !1, + hasTrailingComment: () => !1, + rawWrite: qs, + getIndent: () => i, + increaseIndent: () => { + i++; + }, + decreaseIndent: () => { + i--; + }, + clear: g + }; + function c() { + if (!(s > e) && n) { + const h = o5(i); + h && (s += h.length, t.push(I_( + h, + 16 + /* space */ + ))), n = !1; + } + } + function _(h, S) { + s > e || (c(), s += h.length, t.push(I_(h, S))); + } + function u(h, S) { + s > e || (c(), s += h.length, t.push(zBe(h, S))); + } + function m() { + s > e || (s += 1, t.push(R6()), n = !0); + } + function g() { + t = [], n = !0, i = 0, s = 0; + } + } + function zBe(e, t) { + return I_(e, n(t)); + function n(i) { + const s = i.flags; + return s & 3 ? MV(i) ? 13 : 9 : s & 4 || s & 32768 || s & 65536 ? 14 : s & 8 ? 19 : s & 16 ? 20 : s & 32 ? 1 : s & 64 ? 4 : s & 384 ? 2 : s & 1536 ? 11 : s & 8192 ? 10 : s & 262144 ? 18 : s & 524288 || s & 2097152 ? 0 : 17; + } + } + function I_(e, t) { + return { text: e, kind: n9[t] }; + } + function cc() { + return I_( + " ", + 16 + /* space */ + ); + } + function rf(e) { + return I_( + Xs(e), + 5 + /* keyword */ + ); + } + function Cu(e) { + return I_( + Xs(e), + 15 + /* punctuation */ + ); + } + function uw(e) { + return I_( + Xs(e), + 12 + /* operator */ + ); + } + function rae(e) { + return I_( + e, + 13 + /* parameterName */ + ); + } + function nae(e) { + return I_( + e, + 14 + /* propertyName */ + ); + } + function RV(e) { + const t = sS(e); + return t === void 0 ? Lf(e) : rf(t); + } + function Lf(e) { + return I_( + e, + 17 + /* text */ + ); + } + function iae(e) { + return I_( + e, + 0 + /* aliasName */ + ); + } + function sae(e) { + return I_( + e, + 18 + /* typeParameterName */ + ); + } + function aae(e) { + return I_( + e, + 24 + /* linkText */ + ); + } + function WBe(e, t) { + return { + text: e, + kind: n9[ + 23 + /* linkName */ + ], + target: { + fileName: Cr(t).fileName, + textSpan: e_(t) + } + }; + } + function Hbe(e) { + return I_( + e, + 22 + /* link */ + ); + } + function oae(e, t) { + var n; + const i = wte(e) ? "link" : Pte(e) ? "linkcode" : "linkplain", s = [Hbe(`{@${i} `)]; + if (!e.name) + e.text && s.push(aae(e.text)); + else { + const o = t?.getSymbolAtLocation(e.name), c = o && t ? JV(o, t) : void 0, _ = VBe(e.text), u = qo(e.name) + e.text.slice(0, _), m = UBe(e.text.slice(_)), g = c?.valueDeclaration || ((n = c?.declarations) == null ? void 0 : n[0]); + if (g) + s.push(WBe(u, g)), m && s.push(aae(m)); + else { + const h = _ === 0 || e.text.charCodeAt(_) === 124 && u.charCodeAt(u.length - 1) !== 32 ? " " : ""; + s.push(aae(u + h + m)); + } + } + return s.push(Hbe("}")), s; + } + function UBe(e) { + let t = 0; + if (e.charCodeAt(t++) === 124) { + for (; t < e.length && e.charCodeAt(t) === 32; ) t++; + return e.slice(t); + } + return e; + } + function VBe(e) { + let t = e.indexOf("://"); + if (t === 0) { + for (; t < e.length && e.charCodeAt(t) !== 124; ) t++; + return t; + } + if (e.indexOf("()") === 0) return 2; + if (e.charAt(0) === "<") { + let n = 0, i = 0; + for (; i < e.length; ) + if (e[i] === "<" && n++, e[i] === ">" && n--, i++, !n) return i; + } + return 0; + } + var qBe = ` +`; + function Jh(e, t) { + var n; + return t?.newLineCharacter || ((n = e.getNewLine) == null ? void 0 : n.call(e)) || qBe; + } + function R6() { + return I_( + ` +`, + 6 + /* lineBreak */ + ); + } + function Pv(e) { + try { + return e(tae), tae.displayParts(); + } finally { + tae.clear(); + } + } + function EA(e, t, n, i = 0) { + return Pv((s) => { + e.writeType(t, n, i | 1024 | 16384, s); + }); + } + function _w(e, t, n, i, s = 0) { + return Pv((o) => { + e.writeSymbol(t, n, i, s | 8, o); + }); + } + function jV(e, t, n, i = 0) { + return i |= 25632, Pv((s) => { + e.writeSignature( + t, + n, + i, + /*kind*/ + void 0, + s + ); + }); + } + function cae(e) { + return !!e.parent && jy(e.parent) && e.parent.propertyName === e; + } + function BV(e, t) { + return j5(e, t.getScriptKind && t.getScriptKind(e)); + } + function JV(e, t) { + let n = e; + for (; HBe(n) || Rg(n) && n.links.target; ) + Rg(n) && n.links.target ? n = n.links.target : n = Gl(n, t); + return n; + } + function HBe(e) { + return (e.flags & 2097152) !== 0; + } + function lae(e, t) { + return Zs(Gl(e, t)); + } + function uae(e, t) { + for (; Ig(e.charCodeAt(t)); ) + t += 1; + return t; + } + function E9(e, t) { + for (; t > -1 && em(e.charCodeAt(t)); ) + t -= 1; + return t + 1; + } + function Wa(e, t = !0) { + const n = e && Gbe(e); + return n && !t && nf(n), lv( + n, + /*incremental*/ + !1 + ); + } + function DA(e, t, n) { + let i = n(e); + return i ? Sn(i, e) : i = Gbe(e, n), i && !t && nf(i), i; + } + function Gbe(e, t) { + const n = t ? (o) => DA( + o, + /*includeTrivia*/ + !0, + t + ) : Wa, s = kr( + e, + n, + /*context*/ + void 0, + t ? (o) => o && zV( + o, + /*includeTrivia*/ + !0, + t + ) : (o) => o && f2(o), + n + ); + if (s === e) { + const o = ea(e) ? Sn(N.createStringLiteralFromNode(e), e) : d_(e) ? Sn(N.createNumericLiteral(e.text, e.numericLiteralFlags), e) : N.cloneNode(e); + return ot(o, e); + } + return s.parent = void 0, s; + } + function f2(e, t = !0) { + if (e) { + const n = N.createNodeArray(e.map((i) => Wa(i, t)), e.hasTrailingComma); + return ot(n, e), n; + } + return e; + } + function zV(e, t, n) { + return N.createNodeArray(e.map((i) => DA(i, t, n)), e.hasTrailingComma); + } + function nf(e) { + WV(e), _ae(e); + } + function WV(e) { + fae(e, 1024, $Be); + } + function _ae(e) { + fae(e, 2048, aJ); + } + function QS(e, t) { + const n = e.getSourceFile(), i = n.text; + GBe(e, i) ? j6(e, t, n) : PA(e, t, n), fw(e, t, n); + } + function GBe(e, t) { + const n = e.getFullStart(), i = e.getStart(); + for (let s = n; s < i; s++) + if (t.charCodeAt(s) === 10) return !0; + return !1; + } + function fae(e, t, n) { + _m(e, t); + const i = n(e); + i && fae(i, t, n); + } + function $Be(e) { + return e.forEachChild((t) => t); + } + function YS(e, t) { + let n = e; + for (let i = 1; !E7(t, n); i++) + n = `${e}_${i}`; + return n; + } + function wA(e, t, n, i) { + let s = 0, o = -1; + for (const { fileName: c, textChanges: _ } of e) { + E.assert(c === t); + for (const u of _) { + const { span: m, newText: g } = u, h = XBe(g, rg(n)); + if (h !== -1 && (o = m.start + s + h, !i)) + return o; + s += g.length - m.length; + } + } + return E.assert(i), E.assert(o >= 0), o; + } + function j6(e, t, n, i, s) { + CP(n.text, e.pos, pae(t, n, i, s, Gb)); + } + function fw(e, t, n, i, s) { + EP(n.text, e.end, pae(t, n, i, s, dD)); + } + function PA(e, t, n, i, s) { + EP(n.text, e.pos, pae(t, n, i, s, Gb)); + } + function pae(e, t, n, i, s) { + return (o, c, _, u) => { + _ === 3 ? (o += 2, c -= 2) : o += 2, s(e, n || _, t.text.slice(o, c), i !== void 0 ? i : u); + }; + } + function XBe(e, t) { + if (Vi(e, t)) return 0; + let n = e.indexOf(" " + t); + return n === -1 && (n = e.indexOf("." + t)), n === -1 && (n = e.indexOf('"' + t)), n === -1 ? -1 : n + 1; + } + function D9(e) { + return fn(e) && e.operatorToken.kind === 28 || oa(e) || (t6(e) || hF(e)) && oa(e.expression); + } + function w9(e, t, n) { + const i = rd(e.parent); + switch (i.kind) { + case 214: + return t.getContextualType(i, n); + case 226: { + const { left: s, operatorToken: o, right: c } = i; + return P9(o.kind) ? t.getTypeAtLocation(e === c ? s : c) : t.getContextualType(e, n); + } + case 296: + return VV(i, t); + default: + return t.getContextualType(e, n); + } + } + function pw(e, t, n) { + const i = tf(e, t), s = JSON.stringify(n); + return i === 0 ? `'${Op(s).replace(/'/g, () => "\\'").replace(/\\"/g, '"')}'` : s; + } + function P9(e) { + switch (e) { + case 37: + case 35: + case 38: + case 36: + return !0; + default: + return !1; + } + } + function dae(e) { + switch (e.kind) { + case 11: + case 15: + case 228: + case 215: + return !0; + default: + return !1; + } + } + function UV(e) { + return !!e.getStringIndexType() || !!e.getNumberIndexType(); + } + function VV(e, t) { + return t.getTypeAtLocation(e.parent.parent.expression); + } + var qV = "anonymous function"; + function dw(e, t, n, i) { + const s = n.getTypeChecker(); + let o = !0; + const c = () => o = !1, _ = s.typeToTypeNode(e, t, 1, 8, { + trackSymbol: (u, m, g) => (o = o && s.isSymbolAccessible( + u, + m, + g, + /*shouldComputeAliasToMarkVisible*/ + !1 + ).accessibility === 0, !o), + reportInaccessibleThisError: c, + reportPrivateInBaseOfClassExpression: c, + reportInaccessibleUniqueSymbolError: c, + moduleResolverHost: EV(n, i) + }); + return o ? _ : void 0; + } + function mae(e) { + return e === 179 || e === 180 || e === 181 || e === 171 || e === 173; + } + function $be(e) { + return e === 262 || e === 176 || e === 174 || e === 177 || e === 178; + } + function Xbe(e) { + return e === 267; + } + function gae(e) { + return e === 243 || e === 244 || e === 246 || e === 251 || e === 252 || e === 253 || e === 257 || e === 259 || e === 172 || e === 265 || e === 272 || e === 271 || e === 278 || e === 270 || e === 277; + } + var QBe = U_( + mae, + $be, + Xbe, + gae + ); + function YBe(e, t) { + const n = e.getLastToken(t); + if (n && n.kind === 27) + return !1; + if (mae(e.kind)) { + if (n && n.kind === 28) + return !1; + } else if (Xbe(e.kind)) { + const _ = _a(e.getChildren(t)); + if (_ && dm(_)) + return !1; + } else if ($be(e.kind)) { + const _ = _a(e.getChildren(t)); + if (_ && Nb(_)) + return !1; + } else if (!gae(e.kind)) + return !1; + if (e.kind === 246) + return !0; + const i = ur(e, (_) => !_.parent), s = _2(e, i, t); + if (!s || s.kind === 20) + return !0; + const o = t.getLineAndCharacterOfPosition(e.getEnd()).line, c = t.getLineAndCharacterOfPosition(s.getStart(t)).line; + return o !== c; + } + function N9(e, t, n) { + const i = ur(t, (s) => s.end !== e ? "quit" : QBe(s.kind)); + return !!i && YBe(i, n); + } + function NA(e) { + let t = 0, n = 0; + const i = 5; + return ms(e, function s(o) { + if (gae(o.kind)) { + const c = o.getLastToken(e); + c?.kind === 27 ? t++ : n++; + } else if (mae(o.kind)) { + const c = o.getLastToken(e); + if (c?.kind === 27) + t++; + else if (c && c.kind !== 28) { + const _ = js(e, c.getStart(e)).line, u = js(e, rm(e, c.end).start).line; + _ !== u && n++; + } + } + return t + n >= i ? !0 : ms(o, s); + }), t === 0 && n <= 1 ? !0 : t / n > 1 / i; + } + function A9(e, t) { + return hae(e, e.getDirectories, t) || []; + } + function HV(e, t, n, i, s) { + return hae(e, e.readDirectory, t, n, i, s) || He; + } + function mw(e, t) { + return hae(e, e.fileExists, t); + } + function I9(e, t) { + return F9(() => xd(t, e)) || !1; + } + function F9(e) { + try { + return e(); + } catch { + return; + } + } + function hae(e, t, ...n) { + return F9(() => t && t.apply(e, n)); + } + function GV(e, t) { + const n = []; + return sg( + t, + e, + (i) => { + const s = Ln(i, "package.json"); + mw(t, s) && n.push(s); + } + ), n; + } + function yae(e, t) { + let n; + return sg( + t, + e, + (i) => { + if (i === "node_modules" || (n = qW(i, (s) => mw(t, s), "package.json"), n)) + return !0; + } + ), n; + } + function ZBe(e, t) { + if (!t.fileExists) + return []; + const n = []; + return sg( + t, + Hn(e), + (i) => { + const s = Ln(i, "package.json"); + if (t.fileExists(s)) { + const o = $V(s, t); + o && n.push(o); + } + } + ), n; + } + function $V(e, t) { + if (!t.readFile) + return; + const n = ["dependencies", "devDependencies", "optionalDependencies", "peerDependencies"], i = t.readFile(e) || "", s = b5(i), o = {}; + if (s) + for (const u of n) { + const m = s[u]; + if (!m) + continue; + const g = /* @__PURE__ */ new Map(); + for (const h in m) + g.set(h, m[h]); + o[u] = g; + } + const c = [ + [1, o.dependencies], + [2, o.devDependencies], + [8, o.optionalDependencies], + [4, o.peerDependencies] + ]; + return { + ...o, + parseable: !!s, + fileName: e, + get: _, + has(u, m) { + return !!_(u, m); + } + }; + function _(u, m = 15) { + for (const [g, h] of c) + if (h && m & g) { + const S = h.get(u); + if (S !== void 0) + return S; + } + } + } + function B6(e, t, n) { + const i = (n.getPackageJsonsVisibleToFile && n.getPackageJsonsVisibleToFile(e.fileName) || ZBe(e.fileName, n)).filter((C) => C.parseable); + let s, o, c; + return { + allowsImportingAmbientModule: u, + getSourceFileInfo: m, + allowsImportingSpecifier: g + }; + function _(C) { + const D = T(C); + for (const w of i) + if (w.has(D) || w.has(sO(D))) + return !0; + return !1; + } + function u(C, D) { + if (!i.length || !C.valueDeclaration) + return !0; + if (!o) + o = /* @__PURE__ */ new Map(); + else { + const R = o.get(C); + if (R !== void 0) + return R; + } + const w = Op(C.getName()); + if (h(w)) + return o.set(C, !0), !0; + const A = C.valueDeclaration.getSourceFile(), O = S(A.fileName, D); + if (typeof O > "u") + return o.set(C, !0), !0; + const F = _(O) || _(w); + return o.set(C, F), F; + } + function m(C, D) { + if (!i.length) + return { importable: !0, packageName: void 0 }; + if (!c) + c = /* @__PURE__ */ new Map(); + else { + const F = c.get(C); + if (F !== void 0) + return F; + } + const w = S(C.fileName, D); + if (!w) { + const F = { importable: !0, packageName: w }; + return c.set(C, F), F; + } + const O = { importable: _(w), packageName: w }; + return c.set(C, O), O; + } + function g(C) { + return !i.length || h(C) || lf(C) || q_(C) ? !0 : _(C); + } + function h(C) { + return !!(zg(e) && Gu(e) && QC.has(C) && (s === void 0 && (s = O9(e)), s)); + } + function S(C, D) { + if (!C.includes("node_modules")) + return; + const w = Bh.getNodeModulesPackageName( + n.getCompilationSettings(), + e, + C, + D, + t + ); + if (w && !lf(w) && !q_(w)) + return T(w); + } + function T(C) { + const D = Ul(BD(C)).slice(1); + return Vi(D[0], "@") ? `${D[0]}/${D[1]}` : D[0]; + } + } + function O9(e) { + return at(e.imports, ({ text: t }) => QC.has(t)); + } + function AA(e) { + return as(Ul(e), "node_modules"); + } + function Qbe(e) { + return e.file !== void 0 && e.start !== void 0 && e.length !== void 0; + } + function vae(e, t) { + const n = e_(e), i = HT(t, n, lo, LI); + if (i >= 0) { + const s = t[i]; + return E.assertEqual(s.file, e.getSourceFile(), "Diagnostics proided to 'findDiagnosticForNode' must be from a single SourceFile"), Ws(s, Qbe); + } + } + function bae(e, t) { + var n; + let i = HT(t, e.start, (c) => c.start, uo); + for (i < 0 && (i = ~i); ((n = t[i - 1]) == null ? void 0 : n.start) === e.start; ) + i--; + const s = [], o = Yo(e); + for (; ; ) { + const c = jn(t[i], Qbe); + if (!c || c.start > o) + break; + AY(e, c) && s.push(c), i++; + } + return s; + } + function _k({ startPosition: e, endPosition: t }) { + return bc(e, t === void 0 ? e : t); + } + function XV(e, t) { + const n = Si(e, t.start); + return ur(n, (s) => s.getStart(e) < t.start || s.getEnd() > Yo(t) ? "quit" : ct(s) && M6(t, e_(s, e))); + } + function QV(e, t, n = lo) { + return e ? os(e) ? n(gr(e, t)) : t(e, 0) : void 0; + } + function YV(e) { + return os(e) ? ya(e) : e; + } + function L9(e, t, n) { + return e.escapedName === "export=" || e.escapedName === "default" ? ZV(e) || IA(KBe(e), t, !!n) : e.name; + } + function ZV(e) { + return Dc(e.declarations, (t) => { + var n, i, s; + if (Io(t)) + return (n = jn(xc(t.expression), Me)) == null ? void 0 : n.text; + if (Tu(t) && t.symbol.flags === 2097152) + return (i = jn(t.propertyName, Me)) == null ? void 0 : i.text; + const o = (s = jn(is(t), Me)) == null ? void 0 : s.text; + if (o) + return o; + if (e.parent && !ox(e.parent)) + return e.parent.getName(); + }); + } + function KBe(e) { + var t; + return E.checkDefined( + e.parent, + `Symbol parent was undefined. Flags: ${E.formatSymbolFlags(e.flags)}. Declarations: ${(t = e.declarations) == null ? void 0 : t.map((n) => { + const i = E.formatSyntaxKind(n.kind), s = an(n), { expression: o } = n; + return (s ? "[JS]" : "") + i + (o ? ` (expression: ${E.formatSyntaxKind(o.kind)})` : ""); + }).join(", ")}.` + ); + } + function IA(e, t, n) { + return FA($u(Op(e.name)), t, n); + } + function FA(e, t, n) { + const i = Vc(lC(e, "/index")); + let s = "", o = !0; + const c = i.charCodeAt(0); + Qm(c, t) ? (s += String.fromCharCode(c), n && (s = s.toUpperCase())) : o = !1; + for (let _ = 1; _ < i.length; _++) { + const u = i.charCodeAt(_), m = kh(u, t); + if (m) { + let g = String.fromCharCode(u); + o || (g = g.toUpperCase()), s += g; + } + o = m; + } + return yx(s) ? `_${s}` : s || "_"; + } + function Sae(e, t, n) { + const i = t.length; + if (i + n > e.length) + return !1; + for (let s = 0; s < i; s++) + if (t.charCodeAt(s) !== e.charCodeAt(s + n)) return !1; + return !0; + } + function KV(e) { + return e.charCodeAt(0) === 95; + } + function M9(e) { + return !!(vj(e) & 65536); + } + function R9(e, t) { + let n; + for (const i of e.imports) + if (QC.has(i.text) && !eF.has(i.text)) { + if (Vi(i.text, "node:")) + return !0; + n = !1; + } + return n ?? t.usesUriStyleNodeCoreModules; + } + function OA(e) { + return e === ` +` ? 1 : 0; + } + function p2(e) { + return os(e) ? qg(us(e[0]), e.slice(1)) : us(e); + } + function j9({ options: e }, t) { + const n = !e.semicolons || e.semicolons === "ignore", i = e.semicolons === "remove" || n && !NA(t); + return { + ...e, + semicolons: i ? "remove" : "ignore" + /* Ignore */ + }; + } + function eq(e) { + return e === 2 || e === 3; + } + function J6(e, t) { + return e.isSourceFileFromExternalLibrary(t) || e.isSourceFileDefaultLibrary(t); + } + function B9(e, t) { + const n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(); + for (const _ of t) + if (!CD(_)) { + const u = za(_.expression); + if (cS(u)) + switch (u.kind) { + case 15: + case 11: + n.add(u.text); + break; + case 9: + i.add(parseInt(u.text)); + break; + case 10: + const m = Dee(Eo(u.text, "n") ? u.text.slice(0, -1) : u.text); + m && s.add(qb(m)); + break; + } + else { + const m = e.getSymbolAtLocation(_.expression); + if (m && m.valueDeclaration && j0(m.valueDeclaration)) { + const g = e.getConstantValue(m.valueDeclaration); + g !== void 0 && o(g); + } + } + } + return { + addValue: o, + hasValue: c + }; + function o(_) { + switch (typeof _) { + case "string": + n.add(_); + break; + case "number": + i.add(_); + } + } + function c(_) { + switch (typeof _) { + case "string": + return n.has(_); + case "number": + return i.has(_); + case "object": + return s.has(qb(_)); + } + } + } + function tq(e, t, n, i) { + var s; + const o = typeof e == "string" ? e : e.fileName; + if (!Gg(o)) + return !1; + const c = typeof e == "string" ? t.getCompilerOptions() : t.getCompilerOptionsForFile(e), _ = Ru(c), u = typeof e == "string" ? { + fileName: e, + impliedNodeFormat: nA(oo(e, n.getCurrentDirectory(), Nh(n)), (s = t.getPackageJsonInfoCache) == null ? void 0 : s.call(t), n, c) + } : e, m = GS(u, c); + if (m === 99) + return !1; + if (m === 1 || c.verbatimModuleSyntax && _ === 1) + return !0; + if (c.verbatimModuleSyntax && X3(_)) + return !1; + if (typeof e == "object") { + if (e.commonJsModuleIndicator) + return !0; + if (e.externalModuleIndicator) + return !1; + } + return i; + } + function fk(e) { + switch (e.kind) { + case 241: + case 307: + case 268: + case 296: + return !0; + default: + return !1; + } + } + function J9(e, t, n, i) { + var s; + const o = AO(e, (s = n.getPackageJsonInfoCache) == null ? void 0 : s.call(n), i, n.getCompilerOptions()); + let c, _; + return typeof o == "object" && (c = o.impliedNodeFormat, _ = o.packageJsonScope), { + path: oo(e, n.getCurrentDirectory(), n.getCanonicalFileName), + fileName: e, + externalModuleIndicator: t === 99 ? !0 : void 0, + commonJsModuleIndicator: t === 1 ? !0 : void 0, + impliedNodeFormat: c, + packageJsonScope: _, + statements: He, + imports: He + }; + } + var Tae = /* @__PURE__ */ ((e) => (e[e.Named = 0] = "Named", e[e.Default = 1] = "Default", e[e.Namespace = 2] = "Namespace", e[e.CommonJS = 3] = "CommonJS", e))(Tae || {}), xae = /* @__PURE__ */ ((e) => (e[e.Named = 0] = "Named", e[e.Default = 1] = "Default", e[e.ExportEquals = 2] = "ExportEquals", e[e.UMD = 3] = "UMD", e[e.Module = 4] = "Module", e))(xae || {}); + function rq(e) { + let t = 1; + const n = wp(), i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(); + let o; + const c = { + isUsableByFile: (T) => T === o, + isEmpty: () => !n.size, + clear: () => { + n.clear(), i.clear(), o = void 0; + }, + add: (T, C, D, w, A, O, F, R) => { + T !== o && (c.clear(), o = T); + let W; + if (A) { + const Te = $5(A.fileName); + if (Te) { + const { topLevelNodeModulesIndex: q, topLevelPackageNameIndex: me, packageRootIndex: Ce } = Te; + if (W = zN(BD(A.fileName.substring(me + 1, Ce))), Vi(T, A.path.substring(0, q))) { + const Ee = s.get(W), oe = A.fileName.substring(0, me + 1); + if (Ee) { + const ke = Ee.indexOf(Kg); + q > ke && s.set(W, oe); + } else + s.set(W, oe); + } + } + } + const $ = O === 1 && G4(C) || C, U = O === 0 || ox($) ? Pi(D) : tJe( + $, + R, + /*scriptTarget*/ + void 0 + ), _e = typeof U == "string" ? U : U[0], Z = typeof U == "string" ? void 0 : U[1], J = Op(w.name), re = t++, te = Gl(C, R), ie = C.flags & 33554432 ? void 0 : C, le = w.flags & 33554432 ? void 0 : w; + (!ie || !le) && i.set(re, [C, w]), n.add(u(_e, C, vl(J) ? void 0 : J, R), { + id: re, + symbolTableKey: D, + symbolName: _e, + capitalizedSymbolName: Z, + moduleName: J, + moduleFile: A, + moduleFileName: A?.fileName, + packageName: W, + exportKind: O, + targetFlags: te.flags, + isFromPackageJson: F, + symbol: ie, + moduleSymbol: le + }); + }, + get: (T, C) => { + if (T !== o) return; + const D = n.get(C); + return D?.map(_); + }, + search: (T, C, D, w) => { + if (T === o) + return al(n, (A, O) => { + const { symbolName: F, ambientModuleName: R } = m(O), W = C && A[0].capitalizedSymbolName || F; + if (D(W, A[0].targetFlags)) { + const $ = A.map(_).filter((U, _e) => S(U, A[_e].packageName)); + if ($.length) { + const U = w($, W, !!R, O); + if (U !== void 0) return U; + } + } + }); + }, + releaseSymbols: () => { + i.clear(); + }, + onFileChanged: (T, C, D) => g(T) && g(C) ? !1 : o && o !== C.path || // If ATA is enabled, auto-imports uses existing imports to guess whether you want auto-imports from node. + // Adding or removing imports from node could change the outcome of that guess, so could change the suggestions list. + D && O9(T) !== O9(C) || // Module agumentation and ambient module changes can add or remove exports available to be auto-imported. + // Changes elsewhere in the file can change the *type* of an export in a module augmentation, + // but type info is gathered in getCompletionEntryDetails, which doesn't use the cache. + !Ef(T.moduleAugmentations, C.moduleAugmentations) || !h(T, C) ? (c.clear(), !0) : (o = C.path, !1) + }; + return E.isDebugging && Object.defineProperty(c, "__cache", { value: n }), c; + function _(T) { + if (T.symbol && T.moduleSymbol) return T; + const { id: C, exportKind: D, targetFlags: w, isFromPackageJson: A, moduleFileName: O } = T, [F, R] = i.get(C) || He; + if (F && R) + return { + symbol: F, + moduleSymbol: R, + moduleFileName: O, + exportKind: D, + targetFlags: w, + isFromPackageJson: A + }; + const W = (A ? e.getPackageJsonAutoImportProvider() : e.getCurrentProgram()).getTypeChecker(), V = T.moduleSymbol || R || E.checkDefined( + T.moduleFile ? W.getMergedSymbol(T.moduleFile.symbol) : W.tryFindAmbientModule(T.moduleName) + ), $ = T.symbol || F || E.checkDefined( + D === 2 ? W.resolveExternalModuleSymbol(V) : W.tryGetMemberInModuleExportsAndProperties(Pi(T.symbolTableKey), V), + `Could not find symbol '${T.symbolName}' by key '${T.symbolTableKey}' in module ${V.name}` + ); + return i.set(C, [$, V]), { + symbol: $, + moduleSymbol: V, + moduleFileName: O, + exportKind: D, + targetFlags: w, + isFromPackageJson: A + }; + } + function u(T, C, D, w) { + const A = D || ""; + return `${T.length} ${Zs(Gl(C, w))} ${T} ${A}`; + } + function m(T) { + const C = T.indexOf(" "), D = T.indexOf(" ", C + 1), w = parseInt(T.substring(0, C), 10), A = T.substring(D + 1), O = A.substring(0, w), F = A.substring(w + 1); + return { symbolName: O, ambientModuleName: F === "" ? void 0 : F }; + } + function g(T) { + return !T.commonJsModuleIndicator && !T.externalModuleIndicator && !T.moduleAugmentations && !T.ambientModuleNames; + } + function h(T, C) { + if (!Ef(T.ambientModuleNames, C.ambientModuleNames)) + return !1; + let D = -1, w = -1; + for (const A of C.ambientModuleNames) { + const O = (F) => Kj(F) && F.name.text === A; + if (D = ec(T.statements, O, D + 1), w = ec(C.statements, O, w + 1), T.statements[D] !== C.statements[w]) + return !1; + } + return !0; + } + function S(T, C) { + if (!C || !T.moduleFileName) return !0; + const D = e.getGlobalTypingsCacheLocation(); + if (D && Vi(T.moduleFileName, D)) return !0; + const w = s.get(C); + return !w || Vi(T.moduleFileName, w); + } + } + function nq(e, t, n, i, s, o, c, _) { + var u; + if (!n) { + let T; + const C = Op(i.name); + return QC.has(C) && (T = R9(t, e)) !== void 0 ? T === Vi(C, "node:") : !o || o.allowsImportingAmbientModule(i, c) || kae(t, C); + } + if (E.assertIsDefined(n), t === n) return !1; + const m = _?.get(t.path, n.path, s, {}); + if (m?.isBlockedByPackageJsonDependencies !== void 0) + return !m.isBlockedByPackageJsonDependencies || !!m.packageName && kae(t, m.packageName); + const g = Nh(c), h = (u = c.getGlobalTypingsCacheLocation) == null ? void 0 : u.call(c), S = !!Bh.forEachFileNameOfModule( + t.fileName, + n.fileName, + c, + /*preferSymlinks*/ + !1, + (T) => { + const C = e.getSourceFile(T); + return (C === n || !C) && eJe( + t.fileName, + T, + g, + h, + c + ); + } + ); + if (o) { + const T = S ? o.getSourceFileInfo(n, c) : void 0; + return _?.setBlockedByPackageJsonDependencies(t.path, n.path, s, {}, T?.packageName, !T?.importable), !!T?.importable || S && !!T?.packageName && kae(t, T.packageName); + } + return S; + } + function kae(e, t) { + return e.imports && e.imports.some((n) => n.text === t || n.text.startsWith(t + "/")); + } + function eJe(e, t, n, i, s) { + const o = sg( + s, + t, + (_) => Vc(_) === "node_modules" ? _ : void 0 + ), c = o && Hn(n(o)); + return c === void 0 || Vi(n(e), c) || !!i && Vi(n(i), c); + } + function iq(e, t, n, i, s) { + var o, c; + const _ = xS(t), u = n.autoImportFileExcludePatterns && Ybe(n, _); + Zbe(e.getTypeChecker(), e.getSourceFiles(), u, t, (g, h) => s( + g, + h, + e, + /*isFromPackageJson*/ + !1 + )); + const m = i && ((o = t.getPackageJsonAutoImportProvider) == null ? void 0 : o.call(t)); + if (m) { + const g = ao(), h = e.getTypeChecker(); + Zbe(m.getTypeChecker(), m.getSourceFiles(), u, t, (S, T) => { + (T && !e.getSourceFile(T.fileName) || !T && !h.resolveName( + S.name, + /*location*/ + void 0, + 1536, + /*excludeGlobals*/ + !1 + )) && s( + S, + T, + m, + /*isFromPackageJson*/ + !0 + ); + }), (c = t.log) == null || c.call(t, `forEachExternalModuleToImportFrom autoImportProvider: ${ao() - g}`); + } + } + function Ybe(e, t) { + return Li(e.autoImportFileExcludePatterns, (n) => { + const i = M5(n, "", "exclude"); + return i ? A0(i, t) : void 0; + }); + } + function Zbe(e, t, n, i, s) { + var o; + const c = n && Kbe(n, i); + for (const _ of e.getAmbientModules()) + !_.name.includes("*") && !(n && ((o = _.declarations) != null && o.every((u) => c(u.getSourceFile())))) && s( + _, + /*sourceFile*/ + void 0 + ); + for (const _ of t) + $_(_) && !c?.(_) && s(e.getMergedSymbol(_.symbol), _); + } + function Kbe(e, t) { + var n; + const i = (n = t.getSymlinkCache) == null ? void 0 : n.call(t).getSymlinkedDirectoriesByRealpath(); + return ({ fileName: s, path: o }) => { + if (e.some((c) => c.test(s))) return !0; + if (i?.size && c1(s)) { + let c = Hn(s); + return sg( + t, + Hn(o), + (_) => { + const u = i.get(il(_)); + if (u) + return u.some((m) => e.some((g) => g.test(s.replace(c, m)))); + c = Hn(c); + } + ) ?? !1; + } + return !1; + }; + } + function Cae(e, t) { + return t.autoImportFileExcludePatterns ? Kbe(Ybe(t, xS(e)), e) : () => !1; + } + function LA(e, t, n, i, s) { + var o, c, _, u, m; + const g = ao(); + (o = t.getPackageJsonAutoImportProvider) == null || o.call(t); + const h = ((c = t.getCachedExportInfoMap) == null ? void 0 : c.call(t)) || rq({ + getCurrentProgram: () => n, + getPackageJsonAutoImportProvider: () => { + var T; + return (T = t.getPackageJsonAutoImportProvider) == null ? void 0 : T.call(t); + }, + getGlobalTypingsCacheLocation: () => { + var T; + return (T = t.getGlobalTypingsCacheLocation) == null ? void 0 : T.call(t); + } + }); + if (h.isUsableByFile(e.path)) + return (_ = t.log) == null || _.call(t, "getExportInfoMap: cache hit"), h; + (u = t.log) == null || u.call(t, "getExportInfoMap: cache miss or empty; calculating new results"); + let S = 0; + try { + iq( + n, + t, + i, + /*useAutoImportProvider*/ + !0, + (T, C, D, w) => { + ++S % 100 === 0 && s?.throwIfCancellationRequested(); + const A = /* @__PURE__ */ new Set(), O = D.getTypeChecker(), F = z9(T, O); + F && e2e(F.symbol, O) && h.add( + e.path, + F.symbol, + F.exportKind === 1 ? "default" : "export=", + T, + C, + F.exportKind, + w, + O + ), O.forEachExportAndPropertyOfModule(T, (R, W) => { + R !== F?.symbol && e2e(R, O) && Lp(A, W) && h.add( + e.path, + R, + W, + T, + C, + 0, + w, + O + ); + }); + } + ); + } catch (T) { + throw h.clear(), T; + } + return (m = t.log) == null || m.call(t, `getExportInfoMap: done in ${ao() - g} ms`), h; + } + function z9(e, t) { + const n = t.resolveExternalModuleSymbol(e); + if (n !== e) { + const s = t.tryGetMemberInModuleExports("default", n); + return s ? { + symbol: s, + exportKind: 1 + /* Default */ + } : { + symbol: n, + exportKind: 2 + /* ExportEquals */ + }; + } + const i = t.tryGetMemberInModuleExports("default", e); + if (i) return { + symbol: i, + exportKind: 1 + /* Default */ + }; + } + function e2e(e, t) { + return !t.isUndefinedSymbol(e) && !t.isUnknownSymbol(e) && !N3(e) && !CK(e); + } + function tJe(e, t, n) { + let i; + return W9(e, t, n, (s, o) => (i = o ? [s, o] : s, !0)), E.checkDefined(i); + } + function W9(e, t, n, i) { + let s, o = e; + const c = /* @__PURE__ */ new Set(); + for (; o; ) { + const _ = ZV(o); + if (_) { + const u = i(_); + if (u) return u; + } + if (o.escapedName !== "default" && o.escapedName !== "export=") { + const u = i(o.name); + if (u) return u; + } + if (s = Pr(s, o), !Lp(c, o)) break; + o = o.flags & 2097152 ? t.getImmediateAliasedSymbol(o) : void 0; + } + for (const _ of s ?? He) + if (_.parent && ox(_.parent)) { + const u = i( + IA( + _.parent, + n, + /*forceCapitalize*/ + !1 + ), + IA( + _.parent, + n, + /*forceCapitalize*/ + !0 + ) + ); + if (u) return u; + } + } + function t2e() { + const e = Og( + 99, + /*skipTrivia*/ + !1 + ); + function t(i, s, o) { + return sJe(n(i, s, o), i); + } + function n(i, s, o) { + let c = 0, _ = 0; + const u = [], { prefix: m, pushTemplate: g } = cJe(s); + i = m + i; + const h = m.length; + g && u.push( + 16 + /* TemplateHead */ + ), e.setText(i); + let S = 0; + const T = []; + let C = 0; + do { + c = e.scan(), RC(c) || (D(), _ = c); + const w = e.getTokenEnd(); + if (iJe(e.getTokenStart(), w, h, _Je(c), T), w >= i.length) { + const A = nJe(e, c, Co(u)); + A !== void 0 && (S = A); + } + } while (c !== 1); + function D() { + switch (c) { + case 44: + case 69: + !rJe[_] && e.reScanSlashToken() === 14 && (c = 14); + break; + case 30: + _ === 80 && C++; + break; + case 32: + C > 0 && C--; + break; + case 133: + case 154: + case 150: + case 136: + case 155: + C > 0 && !o && (c = 80); + break; + case 16: + u.push(c); + break; + case 19: + u.length > 0 && u.push(c); + break; + case 20: + if (u.length > 0) { + const w = Co(u); + w === 16 ? (c = e.reScanTemplateToken( + /*isTaggedTemplate*/ + !1 + ), c === 18 ? u.pop() : E.assertEqual(c, 17, "Should have been a template middle.")) : (E.assertEqual(w, 19, "Should have been an open brace"), u.pop()); + } + break; + default: + if (!f_(c)) + break; + (_ === 25 || f_(_) && f_(c) && !oJe(_, c)) && (c = 80); + } + } + return { endOfLineState: S, spans: T }; + } + return { getClassificationsForLine: t, getEncodedLexicalClassifications: n }; + } + var rJe = qX( + [ + 80, + 11, + 9, + 10, + 14, + 110, + 46, + 47, + 22, + 24, + 20, + 112, + 97 + /* FalseKeyword */ + ], + (e) => e, + () => !0 + ); + function nJe(e, t, n) { + switch (t) { + case 11: { + if (!e.isUnterminated()) return; + const i = e.getTokenText(), s = i.length - 1; + let o = 0; + for (; i.charCodeAt(s - o) === 92; ) + o++; + return o & 1 ? i.charCodeAt(0) === 34 ? 3 : 2 : void 0; + } + case 3: + return e.isUnterminated() ? 1 : void 0; + default: + if (Ry(t)) { + if (!e.isUnterminated()) + return; + switch (t) { + case 18: + return 5; + case 15: + return 4; + default: + return E.fail("Only 'NoSubstitutionTemplateLiteral's and 'TemplateTail's can be unterminated; got SyntaxKind #" + t); + } + } + return n === 16 ? 6 : void 0; + } + } + function iJe(e, t, n, i, s) { + if (i === 8) + return; + e === 0 && n > 0 && (e += n); + const o = t - e; + o > 0 && s.push(e - n, o, i); + } + function sJe(e, t) { + const n = [], i = e.spans; + let s = 0; + for (let c = 0; c < i.length; c += 3) { + const _ = i[c], u = i[c + 1], m = i[c + 2]; + if (s >= 0) { + const g = _ - s; + g > 0 && n.push({ + length: g, + classification: 4 + /* Whitespace */ + }); + } + n.push({ length: u, classification: aJe(m) }), s = _ + u; + } + const o = t.length - s; + return o > 0 && n.push({ + length: o, + classification: 4 + /* Whitespace */ + }), { entries: n, finalLexState: e.endOfLineState }; + } + function aJe(e) { + switch (e) { + case 1: + return 3; + case 3: + return 1; + case 4: + return 6; + case 25: + return 7; + case 5: + return 2; + case 6: + return 8; + case 8: + return 4; + case 10: + return 0; + case 2: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 9: + case 17: + return 5; + default: + return; + } + } + function oJe(e, t) { + if (!yV(e)) + return !0; + switch (t) { + case 139: + case 153: + case 137: + case 126: + case 129: + return !0; + // Allow things like "public get", "public constructor" and "public static". + default: + return !1; + } + } + function cJe(e) { + switch (e) { + case 3: + return { prefix: `"\\ +` }; + case 2: + return { prefix: `'\\ +` }; + case 1: + return { prefix: `/* +` }; + case 4: + return { prefix: "`\n" }; + case 5: + return { prefix: `} +`, pushTemplate: !0 }; + case 6: + return { prefix: "", pushTemplate: !0 }; + case 0: + return { prefix: "" }; + default: + return E.assertNever(e); + } + } + function lJe(e) { + switch (e) { + case 42: + case 44: + case 45: + case 40: + case 41: + case 48: + case 49: + case 50: + case 30: + case 32: + case 33: + case 34: + case 104: + case 103: + case 130: + case 152: + case 35: + case 36: + case 37: + case 38: + case 51: + case 53: + case 52: + case 56: + case 57: + case 75: + case 74: + case 79: + case 71: + case 72: + case 73: + case 65: + case 66: + case 67: + case 69: + case 70: + case 64: + case 28: + case 61: + case 76: + case 77: + case 78: + return !0; + default: + return !1; + } + } + function uJe(e) { + switch (e) { + case 40: + case 41: + case 55: + case 54: + case 46: + case 47: + return !0; + default: + return !1; + } + } + function _Je(e) { + if (f_(e)) + return 3; + if (lJe(e) || uJe(e)) + return 5; + if (e >= 19 && e <= 79) + return 10; + switch (e) { + case 9: + return 4; + case 10: + return 25; + case 11: + return 6; + case 14: + return 7; + case 7: + case 3: + case 2: + return 1; + case 5: + case 4: + return 8; + case 80: + default: + return Ry(e) ? 6 : 2; + } + } + function Eae(e, t, n, i, s) { + return i2e(sq(e, t, n, i, s)); + } + function r2e(e, t) { + switch (t) { + case 267: + case 263: + case 264: + case 262: + case 231: + case 218: + case 219: + e.throwIfCancellationRequested(); + } + } + function sq(e, t, n, i, s) { + const o = []; + return n.forEachChild(function _(u) { + if (!(!u || !NP(s, u.pos, u.getFullWidth()))) { + if (r2e(t, u.kind), Me(u) && !tc(u) && i.has(u.escapedText)) { + const m = e.getSymbolAtLocation(u), g = m && n2e(m, $S(u), e); + g && c(u.getStart(n), u.getEnd(), g); + } + u.forEachChild(_); + } + }), { + spans: o, + endOfLineState: 0 + /* None */ + }; + function c(_, u, m) { + const g = u - _; + E.assert(g > 0, `Classification had non-positive length of ${g}`), o.push(_), o.push(g), o.push(m); + } + } + function n2e(e, t, n) { + const i = e.getFlags(); + if (i & 2885600) + return i & 32 ? 11 : i & 384 ? 12 : i & 524288 ? 16 : i & 1536 ? t & 4 || t & 1 && fJe(e) ? 14 : void 0 : i & 2097152 ? n2e(n.getAliasedSymbol(e), t, n) : t & 2 ? i & 64 ? 13 : i & 262144 ? 15 : void 0 : void 0; + } + function fJe(e) { + return at( + e.declarations, + (t) => Lc(t) && jh(t) === 1 + /* Instantiated */ + ); + } + function pJe(e) { + switch (e) { + case 1: + return "comment"; + case 2: + return "identifier"; + case 3: + return "keyword"; + case 4: + return "number"; + case 25: + return "bigint"; + case 5: + return "operator"; + case 6: + return "string"; + case 8: + return "whitespace"; + case 9: + return "text"; + case 10: + return "punctuation"; + case 11: + return "class name"; + case 12: + return "enum name"; + case 13: + return "interface name"; + case 14: + return "module name"; + case 15: + return "type parameter name"; + case 16: + return "type alias name"; + case 17: + return "parameter name"; + case 18: + return "doc comment tag name"; + case 19: + return "jsx open tag name"; + case 20: + return "jsx close tag name"; + case 21: + return "jsx self closing tag name"; + case 22: + return "jsx attribute"; + case 23: + return "jsx text"; + case 24: + return "jsx attribute string literal value"; + default: + return; + } + } + function i2e(e) { + E.assert(e.spans.length % 3 === 0); + const t = e.spans, n = []; + for (let i = 0; i < t.length; i += 3) + n.push({ + textSpan: ql(t[i], t[i + 1]), + classificationType: pJe(t[i + 2]) + }); + return n; + } + function Dae(e, t, n) { + return i2e(aq(e, t, n)); + } + function aq(e, t, n) { + const i = n.start, s = n.length, o = Og( + 99, + /*skipTrivia*/ + !1, + t.languageVariant, + t.text + ), c = Og( + 99, + /*skipTrivia*/ + !1, + t.languageVariant, + t.text + ), _ = []; + return R(t), { + spans: _, + endOfLineState: 0 + /* None */ + }; + function u(W, V, $) { + _.push(W), _.push(V), _.push($); + } + function m(W) { + for (o.resetTokenState(W.pos); ; ) { + const V = o.getTokenEnd(); + if (!CY(t.text, V)) + return V; + const $ = o.scan(), U = o.getTokenEnd(), _e = U - V; + if (!RC($)) + return V; + switch ($) { + case 4: + case 5: + continue; + case 2: + case 3: + g(W, $, V, _e), o.resetTokenState(U); + continue; + case 7: + const Z = t.text, J = Z.charCodeAt(V); + if (J === 60 || J === 62) { + u( + V, + _e, + 1 + /* comment */ + ); + continue; + } + E.assert( + J === 124 || J === 61 + /* equals */ + ), D(Z, V, U); + break; + case 6: + break; + default: + E.assertNever($); + } + } + } + function g(W, V, $, U) { + if (V === 3) { + const _e = ire(t.text, $, U); + if (_e && _e.jsDoc) { + Fa(_e.jsDoc, W), S(_e.jsDoc); + return; + } + } else if (V === 2 && T($, U)) + return; + h($, U); + } + function h(W, V) { + u( + W, + V, + 1 + /* comment */ + ); + } + function S(W) { + var V, $, U, _e, Z, J, re, te; + let ie = W.pos; + if (W.tags) + for (const Te of W.tags) { + Te.pos !== ie && h(ie, Te.pos - ie), u( + Te.pos, + 1, + 10 + /* punctuation */ + ), u( + Te.tagName.pos, + Te.tagName.end - Te.tagName.pos, + 18 + /* docCommentTagName */ + ), ie = Te.tagName.end; + let q = Te.tagName.end; + switch (Te.kind) { + case 341: + const me = Te; + le(me), q = me.isNameFirst && ((V = me.typeExpression) == null ? void 0 : V.end) || me.name.end; + break; + case 348: + const Ce = Te; + q = Ce.isNameFirst && (($ = Ce.typeExpression) == null ? void 0 : $.end) || Ce.name.end; + break; + case 345: + C(Te), ie = Te.end, q = Te.typeParameters.end; + break; + case 346: + const Ee = Te; + q = ((U = Ee.typeExpression) == null ? void 0 : U.kind) === 309 && ((_e = Ee.fullName) == null ? void 0 : _e.end) || ((Z = Ee.typeExpression) == null ? void 0 : Z.end) || q; + break; + case 338: + q = Te.typeExpression.end; + break; + case 344: + R(Te.typeExpression), ie = Te.end, q = Te.typeExpression.end; + break; + case 343: + case 340: + q = Te.typeExpression.end; + break; + case 342: + R(Te.typeExpression), ie = Te.end, q = ((J = Te.typeExpression) == null ? void 0 : J.end) || q; + break; + case 347: + q = ((re = Te.name) == null ? void 0 : re.end) || q; + break; + case 328: + case 329: + q = Te.class.end; + break; + case 349: + R(Te.typeExpression), ie = Te.end, q = ((te = Te.typeExpression) == null ? void 0 : te.end) || q; + break; + } + typeof Te.comment == "object" ? h(Te.comment.pos, Te.comment.end - Te.comment.pos) : typeof Te.comment == "string" && h(q, Te.end - q); + } + ie !== W.end && h(ie, W.end - ie); + return; + function le(Te) { + Te.isNameFirst && (h(ie, Te.name.pos - ie), u( + Te.name.pos, + Te.name.end - Te.name.pos, + 17 + /* parameterName */ + ), ie = Te.name.end), Te.typeExpression && (h(ie, Te.typeExpression.pos - ie), R(Te.typeExpression), ie = Te.typeExpression.end), Te.isNameFirst || (h(ie, Te.name.pos - ie), u( + Te.name.pos, + Te.name.end - Te.name.pos, + 17 + /* parameterName */ + ), ie = Te.name.end); + } + } + function T(W, V) { + const $ = /^(\/\/\/\s*)(<)(?:(\S+)((?:[^/]|\/[^>])*)(\/>)?)?/m, U = /(\s)(\S+)(\s*)(=)(\s*)('[^']+'|"[^"]+")/g, _e = t.text.substr(W, V), Z = $.exec(_e); + if (!Z || !Z[3] || !(Z[3] in UI)) + return !1; + let J = W; + h(J, Z[1].length), J += Z[1].length, u( + J, + Z[2].length, + 10 + /* punctuation */ + ), J += Z[2].length, u( + J, + Z[3].length, + 21 + /* jsxSelfClosingTagName */ + ), J += Z[3].length; + const re = Z[4]; + let te = J; + for (; ; ) { + const le = U.exec(re); + if (!le) + break; + const Te = J + le.index + le[1].length; + Te > te && (h(te, Te - te), te = Te), u( + te, + le[2].length, + 22 + /* jsxAttribute */ + ), te += le[2].length, le[3].length && (h(te, le[3].length), te += le[3].length), u( + te, + le[4].length, + 5 + /* operator */ + ), te += le[4].length, le[5].length && (h(te, le[5].length), te += le[5].length), u( + te, + le[6].length, + 24 + /* jsxAttributeStringLiteralValue */ + ), te += le[6].length; + } + J += Z[4].length, J > te && h(te, J - te), Z[5] && (u( + J, + Z[5].length, + 10 + /* punctuation */ + ), J += Z[5].length); + const ie = W + V; + return J < ie && h(J, ie - J), !0; + } + function C(W) { + for (const V of W.getChildren()) + R(V); + } + function D(W, V, $) { + let U; + for (U = V; U < $ && !yu(W.charCodeAt(U)); U++) + ; + for (u( + V, + U - V, + 1 + /* comment */ + ), c.resetTokenState(U); c.getTokenEnd() < $; ) + w(); + } + function w() { + const W = c.getTokenEnd(), V = c.scan(), $ = c.getTokenEnd(), U = F(V); + U && u(W, $ - W, U); + } + function A(W) { + if (Pd(W) || tc(W)) + return !0; + const V = O(W); + if (!rx(W) && W.kind !== 12 && V === void 0) + return !1; + const $ = W.kind === 12 ? W.pos : m(W), U = W.end - $; + if (E.assert(U >= 0), U > 0) { + const _e = V || F(W.kind, W); + _e && u($, U, _e); + } + return !0; + } + function O(W) { + switch (W.parent && W.parent.kind) { + case 286: + if (W.parent.tagName === W) + return 19; + break; + case 287: + if (W.parent.tagName === W) + return 20; + break; + case 285: + if (W.parent.tagName === W) + return 21; + break; + case 291: + if (W.parent.name === W) + return 22; + break; + } + } + function F(W, V) { + if (f_(W)) + return 3; + if ((W === 30 || W === 32) && V && Gse(V.parent)) + return 10; + if (EB(W)) { + if (V) { + const $ = V.parent; + if (W === 64 && ($.kind === 260 || $.kind === 172 || $.kind === 169 || $.kind === 291) || $.kind === 226 || $.kind === 224 || $.kind === 225 || $.kind === 227) + return 5; + } + return 10; + } else { + if (W === 9) + return 4; + if (W === 10) + return 25; + if (W === 11) + return V && V.parent.kind === 291 ? 24 : 6; + if (W === 14) + return 6; + if (Ry(W)) + return 6; + if (W === 12) + return 23; + if (W === 80) { + if (V) { + switch (V.parent.kind) { + case 263: + return V.parent.name === V ? 11 : void 0; + case 168: + return V.parent.name === V ? 15 : void 0; + case 264: + return V.parent.name === V ? 13 : void 0; + case 266: + return V.parent.name === V ? 12 : void 0; + case 267: + return V.parent.name === V ? 14 : void 0; + case 169: + return V.parent.name === V ? Xy(V) ? 3 : 17 : void 0; + } + if (Kp(V.parent)) + return 3; + } + return 2; + } + } + } + function R(W) { + if (W && AP(i, s, W.pos, W.getFullWidth())) { + r2e(e, W.kind); + for (const V of W.getChildren(t)) + A(V) || R(V); + } + } + } + var U9; + ((e) => { + function t(J, re, te, ie, le) { + const Te = h_(te, ie); + if (Te.parent && (Dd(Te.parent) && Te.parent.tagName === Te || Kb(Te.parent))) { + const { openingElement: q, closingElement: me } = Te.parent.parent, Ce = [q, me].map(({ tagName: Ee }) => n(Ee, te)); + return [{ fileName: te.fileName, highlightSpans: Ce }]; + } + return i(ie, Te, J, re, le) || s(Te, te); + } + e.getDocumentHighlights = t; + function n(J, re) { + return { + fileName: re.fileName, + textSpan: e_(J, re), + kind: "none" + /* none */ + }; + } + function i(J, re, te, ie, le) { + const Te = new Set(le.map((Ee) => Ee.fileName)), q = So.getReferenceEntriesForNode( + J, + re, + te, + le, + ie, + /*options*/ + void 0, + Te + ); + if (!q) return; + const me = dP(q.map(So.toHighlightSpan), (Ee) => Ee.fileName, (Ee) => Ee.span), Ce = Wl(te.useCaseSensitiveFileNames()); + return Ki(Ty(me.entries(), ([Ee, oe]) => { + if (!Te.has(Ee)) { + if (!te.redirectTargetsMap.has(oo(Ee, te.getCurrentDirectory(), Ce))) + return; + const ke = te.getSourceFile(Ee); + Ee = Pn(le, (it) => !!it.redirectInfo && it.redirectInfo.redirectTarget === ke).fileName, E.assert(Te.has(Ee)); + } + return { fileName: Ee, highlightSpans: oe }; + })); + } + function s(J, re) { + const te = o(J, re); + return te && [{ fileName: re.fileName, highlightSpans: te }]; + } + function o(J, re) { + switch (J.kind) { + case 101: + case 93: + return dv(J.parent) ? U(J.parent, re) : void 0; + case 107: + return ie(J.parent, Rp, R); + case 111: + return ie(J.parent, ez, F); + case 113: + case 85: + case 98: + const Te = J.kind === 85 ? J.parent.parent : J.parent; + return ie(Te, OS, O); + case 109: + return ie(J.parent, xD, A); + case 84: + case 90: + return CD(J.parent) || i6(J.parent) ? ie(J.parent.parent.parent, xD, A) : void 0; + case 83: + case 88: + return ie(J.parent, g4, w); + case 99: + case 117: + case 92: + return ie(J.parent, (q) => zy( + q, + /*lookInLabeledStatements*/ + !0 + ), D); + case 137: + return te(Go, [ + 137 + /* ConstructorKeyword */ + ]); + case 139: + case 153: + return te(Jy, [ + 139, + 153 + /* SetKeyword */ + ]); + case 135: + return ie(J.parent, n1, W); + case 134: + return le(W(J)); + case 127: + return le(V(J)); + case 103: + case 147: + return; + default: + return By(J.kind) && (bl(J.parent) || pc(J.parent)) ? le(S(J.kind, J.parent)) : void 0; + } + function te(Te, q) { + return ie(J.parent, Te, (me) => { + var Ce; + return Li((Ce = jn(me, bd)) == null ? void 0 : Ce.symbol.declarations, (Ee) => Te(Ee) ? Pn(Ee.getChildren(re), (oe) => as(q, oe.kind)) : void 0); + }); + } + function ie(Te, q, me) { + return q(Te) ? le(me(Te, re)) : void 0; + } + function le(Te) { + return Te && Te.map((q) => n(q, re)); + } + } + function c(J) { + return ez(J) ? [J] : OS(J) ? Wi( + J.catchClause ? c(J.catchClause) : J.tryBlock && c(J.tryBlock), + J.finallyBlock && c(J.finallyBlock) + ) : vs(J) ? void 0 : m(J, c); + } + function _(J) { + let re = J; + for (; re.parent; ) { + const te = re.parent; + if (Nb(te) || te.kind === 307) + return te; + if (OS(te) && te.tryBlock === re && te.catchClause) + return re; + re = te; + } + } + function u(J) { + return g4(J) ? [J] : vs(J) ? void 0 : m(J, u); + } + function m(J, re) { + const te = []; + return J.forEachChild((ie) => { + const le = re(ie); + le !== void 0 && te.push(...$T(le)); + }), te; + } + function g(J, re) { + const te = h(re); + return !!te && te === J; + } + function h(J) { + return ur(J, (re) => { + switch (re.kind) { + case 255: + if (J.kind === 251) + return !1; + // falls through + case 248: + case 249: + case 250: + case 247: + case 246: + return !J.label || Z(re, J.label.escapedText); + default: + return vs(re) && "quit"; + } + }); + } + function S(J, re) { + return Li(T(re, Sx(J)), (te) => L6(te, J)); + } + function T(J, re) { + const te = J.parent; + switch (te.kind) { + case 268: + case 307: + case 241: + case 296: + case 297: + return re & 64 && $c(J) ? [...J.members, J] : te.statements; + case 176: + case 174: + case 262: + return [...te.parameters, ...Zn(te.parent) ? te.parent.members : []]; + case 263: + case 231: + case 264: + case 187: + const ie = te.members; + if (re & 15) { + const le = Pn(te.members, Go); + if (le) + return [...ie, ...le.parameters]; + } else if (re & 64) + return [...ie, te]; + return ie; + // Syntactically invalid positions that the parser might produce anyway + default: + return; + } + } + function C(J, re, ...te) { + return re && as(te, re.kind) ? (J.push(re), !0) : !1; + } + function D(J) { + const re = []; + if (C( + re, + J.getFirstToken(), + 99, + 117, + 92 + /* DoKeyword */ + ) && J.kind === 246) { + const te = J.getChildren(); + for (let ie = te.length - 1; ie >= 0 && !C( + re, + te[ie], + 117 + /* WhileKeyword */ + ); ie--) + ; + } + return lr(u(J.statement), (te) => { + g(J, te) && C( + re, + te.getFirstToken(), + 83, + 88 + /* ContinueKeyword */ + ); + }), re; + } + function w(J) { + const re = h(J); + if (re) + switch (re.kind) { + case 248: + case 249: + case 250: + case 246: + case 247: + return D(re); + case 255: + return A(re); + } + } + function A(J) { + const re = []; + return C( + re, + J.getFirstToken(), + 109 + /* SwitchKeyword */ + ), lr(J.caseBlock.clauses, (te) => { + C( + re, + te.getFirstToken(), + 84, + 90 + /* DefaultKeyword */ + ), lr(u(te), (ie) => { + g(J, ie) && C( + re, + ie.getFirstToken(), + 83 + /* BreakKeyword */ + ); + }); + }), re; + } + function O(J, re) { + const te = []; + if (C( + te, + J.getFirstToken(), + 113 + /* TryKeyword */ + ), J.catchClause && C( + te, + J.catchClause.getFirstToken(), + 85 + /* CatchKeyword */ + ), J.finallyBlock) { + const ie = Xa(J, 98, re); + C( + te, + ie, + 98 + /* FinallyKeyword */ + ); + } + return te; + } + function F(J, re) { + const te = _(J); + if (!te) + return; + const ie = []; + return lr(c(te), (le) => { + ie.push(Xa(le, 111, re)); + }), Nb(te) && Hy(te, (le) => { + ie.push(Xa(le, 107, re)); + }), ie; + } + function R(J, re) { + const te = ff(J); + if (!te) + return; + const ie = []; + return Hy(Ws(te.body, ks), (le) => { + ie.push(Xa(le, 107, re)); + }), lr(c(te.body), (le) => { + ie.push(Xa(le, 111, re)); + }), ie; + } + function W(J) { + const re = ff(J); + if (!re) + return; + const te = []; + return re.modifiers && re.modifiers.forEach((ie) => { + C( + te, + ie, + 134 + /* AsyncKeyword */ + ); + }), ms(re, (ie) => { + $(ie, (le) => { + n1(le) && C( + te, + le.getFirstToken(), + 135 + /* AwaitKeyword */ + ); + }); + }), te; + } + function V(J) { + const re = ff(J); + if (!re) + return; + const te = []; + return ms(re, (ie) => { + $(ie, (le) => { + gF(le) && C( + te, + le.getFirstToken(), + 127 + /* YieldKeyword */ + ); + }); + }), te; + } + function $(J, re) { + re(J), !vs(J) && !Zn(J) && !Yl(J) && !Lc(J) && !jp(J) && !fi(J) && ms(J, (te) => $(te, re)); + } + function U(J, re) { + const te = _e(J, re), ie = []; + for (let le = 0; le < te.length; le++) { + if (te[le].kind === 93 && le < te.length - 1) { + const Te = te[le], q = te[le + 1]; + let me = !0; + for (let Ce = q.getStart(re) - 1; Ce >= Te.end; Ce--) + if (!em(re.text.charCodeAt(Ce))) { + me = !1; + break; + } + if (me) { + ie.push({ + fileName: re.fileName, + textSpan: bc(Te.getStart(), q.end), + kind: "reference" + /* reference */ + }), le++; + continue; + } + } + ie.push(n(te[le], re)); + } + return ie; + } + function _e(J, re) { + const te = []; + for (; dv(J.parent) && J.parent.elseStatement === J; ) + J = J.parent; + for (; ; ) { + const ie = J.getChildren(re); + C( + te, + ie[0], + 101 + /* IfKeyword */ + ); + for (let le = ie.length - 1; le >= 0 && !C( + te, + ie[le], + 93 + /* ElseKeyword */ + ); le--) + ; + if (!J.elseStatement || !dv(J.elseStatement)) + break; + J = J.elseStatement; + } + return te; + } + function Z(J, re) { + return !!ur(J.parent, (te) => i1(te) ? te.label.escapedText === re : "quit"); + } + })(U9 || (U9 = {})); + function MA(e) { + return !!e.sourceFile; + } + function wae(e, t, n) { + return oq(e, t, n); + } + function oq(e, t = "", n, i) { + const s = /* @__PURE__ */ new Map(), o = Wl(!!e); + function c() { + const w = Ki(s.keys()).filter((A) => A && A.charAt(0) === "_").map((A) => { + const O = s.get(A), F = []; + return O.forEach((R, W) => { + MA(R) ? F.push({ + name: W, + scriptKind: R.sourceFile.scriptKind, + refCount: R.languageServiceRefCount + }) : R.forEach((V, $) => F.push({ name: W, scriptKind: $, refCount: V.languageServiceRefCount })); + }), F.sort((R, W) => W.refCount - R.refCount), { + bucket: A, + sourceFiles: F + }; + }); + return JSON.stringify(w, void 0, 2); + } + function _(w) { + return typeof w.getCompilationSettings == "function" ? w.getCompilationSettings() : w; + } + function u(w, A, O, F, R, W) { + const V = oo(w, t, o), $ = cq(_(A)); + return m(w, V, A, $, O, F, R, W); + } + function m(w, A, O, F, R, W, V, $) { + return T( + w, + A, + O, + F, + R, + W, + /*acquiring*/ + !0, + V, + $ + ); + } + function g(w, A, O, F, R, W) { + const V = oo(w, t, o), $ = cq(_(A)); + return h(w, V, A, $, O, F, R, W); + } + function h(w, A, O, F, R, W, V, $) { + return T( + w, + A, + _(O), + F, + R, + W, + /*acquiring*/ + !1, + V, + $ + ); + } + function S(w, A) { + const O = MA(w) ? w : w.get(E.checkDefined(A, "If there are more than one scriptKind's for same document the scriptKind should be provided")); + return E.assert(A === void 0 || !O || O.sourceFile.scriptKind === A, `Script kind should match provided ScriptKind:${A} and sourceFile.scriptKind: ${O?.sourceFile.scriptKind}, !entry: ${!O}`), O; + } + function T(w, A, O, F, R, W, V, $, U) { + var _e, Z, J, re; + $ = j5(w, $); + const te = _(O), ie = O === te ? void 0 : O, le = $ === 6 ? 100 : pa(te), Te = typeof U == "object" ? U : { + languageVersion: le, + impliedNodeFormat: ie && nA(A, (re = (J = (Z = (_e = ie.getCompilerHost) == null ? void 0 : _e.call(ie)) == null ? void 0 : Z.getModuleResolutionCache) == null ? void 0 : J.call(Z)) == null ? void 0 : re.getPackageJsonInfoCache(), ie, te), + setExternalModuleIndicator: q3(te), + jsDocParsingMode: n + }; + Te.languageVersion = le, E.assertEqual(n, Te.jsDocParsingMode); + const q = s.size, me = Pae(F, Te.impliedNodeFormat), Ce = HE(s, me, () => /* @__PURE__ */ new Map()); + if (nn) { + s.size > q && nn.instant(nn.Phase.Session, "createdDocumentRegistryBucket", { configFilePath: te.configFilePath, key: me }); + const ue = !fl(A) && al(s, (it, Oe) => Oe !== me && it.has(A) && Oe); + ue && nn.instant(nn.Phase.Session, "documentRegistryBucketOverlap", { path: A, key1: ue, key2: me }); + } + const Ee = Ce.get(A); + let oe = Ee && S(Ee, $); + if (!oe && i) { + const ue = i.getDocument(me, A); + ue && ue.scriptKind === $ && ue.text === uk(R) && (E.assert(V), oe = { + sourceFile: ue, + languageServiceRefCount: 0 + }, ke()); + } + if (oe) + oe.sourceFile.version !== W && (oe.sourceFile = zq(oe.sourceFile, R, W, R.getChangeRange(oe.sourceFile.scriptSnapshot)), i && i.setDocument(me, A, oe.sourceFile)), V && oe.languageServiceRefCount++; + else { + const ue = sL( + w, + R, + Te, + W, + /*setNodeParents*/ + !1, + $ + ); + i && i.setDocument(me, A, ue), oe = { + sourceFile: ue, + languageServiceRefCount: 1 + }, ke(); + } + return E.assert(oe.languageServiceRefCount !== 0), oe.sourceFile; + function ke() { + if (!Ee) + Ce.set(A, oe); + else if (MA(Ee)) { + const ue = /* @__PURE__ */ new Map(); + ue.set(Ee.sourceFile.scriptKind, Ee), ue.set($, oe), Ce.set(A, ue); + } else + Ee.set($, oe); + } + } + function C(w, A, O, F) { + const R = oo(w, t, o), W = cq(A); + return D(R, W, O, F); + } + function D(w, A, O, F) { + const R = E.checkDefined(s.get(Pae(A, F))), W = R.get(w), V = S(W, O); + V.languageServiceRefCount--, E.assert(V.languageServiceRefCount >= 0), V.languageServiceRefCount === 0 && (MA(W) ? R.delete(w) : (W.delete(O), W.size === 1 && R.set(w, _P(W.values(), lo)))); + } + return { + acquireDocument: u, + acquireDocumentWithKey: m, + updateDocument: g, + updateDocumentWithKey: h, + releaseDocument: C, + releaseDocumentWithKey: D, + getKeyForCompilationSettings: cq, + getDocumentRegistryBucketKeyWithMode: Pae, + reportStats: c, + getBuckets: () => s + }; + } + function cq(e) { + return Xz(e, Az); + } + function Pae(e, t) { + return t ? `${e}|${t}` : e; + } + function Nae(e, t, n, i, s, o, c) { + const _ = xS(i), u = Wl(_), m = lq(t, n, u, c), g = lq(n, t, u, c); + return sn.ChangeTracker.with({ host: i, formatContext: s, preferences: o }, (h) => { + mJe(e, h, m, t, n, i.getCurrentDirectory(), _), gJe(e, h, m, g, i, u); + }); + } + function lq(e, t, n, i) { + const s = n(e); + return (c) => { + const _ = i && i.tryGetSourcePosition({ fileName: c, pos: 0 }), u = o(_ ? _.fileName : c); + return _ ? u === void 0 ? void 0 : dJe(_.fileName, u, c, n) : u; + }; + function o(c) { + if (n(c) === s) return t; + const _ = gJ(c, s, n); + return _ === void 0 ? void 0 : t + "/" + _; + } + } + function dJe(e, t, n, i) { + const s = fC(e, t, i); + return Aae(Hn(n), s); + } + function mJe(e, t, n, i, s, o, c) { + const { configFile: _ } = e.getCompilerOptions(); + if (!_) return; + const u = Hn(_.fileName), m = P4(_); + if (!m) return; + Iae(m, (T, C) => { + switch (C) { + case "files": + case "include": + case "exclude": { + if (g(T) || C !== "include" || !Ql(T.initializer)) return; + const w = Li(T.initializer.elements, (O) => ea(O) ? O.text : void 0); + if (w.length === 0) return; + const A = R5( + u, + /*excludes*/ + [], + w, + c, + o + ); + A0(E.checkDefined(A.includeFilePattern), c).test(i) && !A0(E.checkDefined(A.includeFilePattern), c).test(s) && t.insertNodeAfter(_, _a(T.initializer.elements), N.createStringLiteral(S(s))); + return; + } + case "compilerOptions": + Iae(T.initializer, (D, w) => { + const A = Lz(w); + E.assert(A?.type !== "listOrElement"), A && (A.isFilePath || A.type === "list" && A.element.isFilePath) ? g(D) : w === "paths" && Iae(D.initializer, (O) => { + if (Ql(O.initializer)) + for (const F of O.initializer.elements) + h(F); + }); + }); + return; + } + }); + function g(T) { + const C = Ql(T.initializer) ? T.initializer.elements : [T.initializer]; + let D = !1; + for (const w of C) + D = h(w) || D; + return D; + } + function h(T) { + if (!ea(T)) return !1; + const C = Aae(u, T.text), D = n(C); + return D !== void 0 ? (t.replaceRangeWithText(_, a2e(T, _), S(D)), !0) : !1; + } + function S(T) { + return Df( + u, + T, + /*ignoreCase*/ + !c + ); + } + } + function gJe(e, t, n, i, s, o) { + const c = e.getSourceFiles(); + for (const _ of c) { + const u = n(_.fileName), m = u ?? _.fileName, g = Hn(m), h = i(_.fileName), S = h || _.fileName, T = Hn(S), C = u !== void 0 || h !== void 0; + vJe(_, t, (D) => { + if (!lf(D)) return; + const w = Aae(T, D), A = n(w); + return A === void 0 ? void 0 : iS(Df(g, A, o)); + }, (D) => { + const w = e.getTypeChecker().getSymbolAtLocation(D); + if (w?.declarations && w.declarations.some((O) => Ou(O))) return; + const A = h !== void 0 ? s2e(D, WS(D.text, S, e.getCompilerOptions(), s), n, c) : yJe(w, D, _, e, s, n); + return A !== void 0 && (A.updated || C && lf(D.text)) ? Bh.updateModuleSpecifier(e.getCompilerOptions(), _, m, A.newFileName, wv(e, s), D.text) : void 0; + }); + } + } + function hJe(e, t) { + return Hs(Ln(e, t)); + } + function Aae(e, t) { + return iS(hJe(e, t)); + } + function yJe(e, t, n, i, s, o) { + if (e) { + const c = Pn(e.declarations, Ei).fileName, _ = o(c); + return _ === void 0 ? { newFileName: c, updated: !1 } : { newFileName: _, updated: !0 }; + } else { + const c = i.getModeForUsageLocation(n, t), _ = s.resolveModuleNameLiterals || !s.resolveModuleNames ? i.getResolvedModuleFromModuleSpecifier(t, n) : s.getResolvedModuleWithFailedLookupLocationsFromCache && s.getResolvedModuleWithFailedLookupLocationsFromCache(t.text, n.fileName, c); + return s2e(t, _, o, i.getSourceFiles()); + } + } + function s2e(e, t, n, i) { + if (!t) return; + if (t.resolvedModule) { + const u = _(t.resolvedModule.resolvedFileName); + if (u) return u; + } + const s = lr(t.failedLookupLocations, o) || lf(e.text) && lr(t.failedLookupLocations, c); + if (s) return s; + return t.resolvedModule && { newFileName: t.resolvedModule.resolvedFileName, updated: !1 }; + function o(u) { + const m = n(u); + return m && Pn(i, (g) => g.fileName === m) ? c(u) : void 0; + } + function c(u) { + return Eo(u, "/package.json") ? void 0 : _(u); + } + function _(u) { + const m = n(u); + return m && { newFileName: m, updated: !0 }; + } + } + function vJe(e, t, n, i) { + for (const s of e.referencedFiles || He) { + const o = n(s.fileName); + o !== void 0 && o !== e.text.slice(s.pos, s.end) && t.replaceRangeWithText(e, s, o); + } + for (const s of e.imports) { + const o = i(s); + o !== void 0 && o !== s.text && t.replaceRangeWithText(e, a2e(s, e), o); + } + } + function a2e(e, t) { + return np(e.getStart(t) + 1, e.end - 1); + } + function Iae(e, t) { + if (oa(e)) + for (const n of e.properties) + Xc(n) && ea(n.name) && t(n, n.name.text); + } + var uq = /* @__PURE__ */ ((e) => (e[e.exact = 0] = "exact", e[e.prefix = 1] = "prefix", e[e.substring = 2] = "substring", e[e.camelCase = 3] = "camelCase", e))(uq || {}); + function gw(e, t) { + return { + kind: e, + isCaseSensitive: t + }; + } + function Fae(e) { + const t = /* @__PURE__ */ new Map(), n = e.trim().split(".").map((i) => xJe(i.trim())); + if (n.length === 1 && n[0].totalTextChunk.text === "") + return { + getMatchForLastSegmentOfPattern: () => gw( + 2, + /*isCaseSensitive*/ + !0 + ), + getFullMatch: () => gw( + 2, + /*isCaseSensitive*/ + !0 + ), + patternContainsDots: !1 + }; + if (!n.some((i) => !i.subWordTextChunks.length)) + return { + getFullMatch: (i, s) => bJe(i, s, n, t), + getMatchForLastSegmentOfPattern: (i) => Oae(i, _a(n), t), + patternContainsDots: n.length > 1 + }; + } + function bJe(e, t, n, i) { + if (!Oae(t, _a(n), i) || n.length - 1 > e.length) + return; + let o; + for (let c = n.length - 2, _ = e.length - 1; c >= 0; c -= 1, _ -= 1) + o = l2e(o, Oae(e[_], n[c], i)); + return o; + } + function o2e(e, t) { + let n = t.get(e); + return n || t.set(e, n = Jae(e)), n; + } + function c2e(e, t, n) { + const i = kJe(e, t.textLowerCase); + if (i === 0) + return gw( + t.text.length === e.length ? 0 : 1, + /*isCaseSensitive:*/ + Vi(e, t.text) + ); + if (t.isLowerCase) { + if (i === -1) return; + const s = o2e(e, n); + for (const o of s) + if (Lae( + e, + o, + t.text, + /*ignoreCase*/ + !0 + )) + return gw( + 2, + /*isCaseSensitive:*/ + Lae( + e, + o, + t.text, + /*ignoreCase*/ + !1 + ) + ); + if (t.text.length < e.length && z6(e.charCodeAt(i))) + return gw( + 2, + /*isCaseSensitive*/ + !1 + ); + } else { + if (e.indexOf(t.text) > 0) + return gw( + 2, + /*isCaseSensitive*/ + !0 + ); + if (t.characterSpans.length > 0) { + const s = o2e(e, n), o = u2e( + e, + s, + t, + /*ignoreCase*/ + !1 + ) ? !0 : u2e( + e, + s, + t, + /*ignoreCase*/ + !0 + ) ? !1 : void 0; + if (o !== void 0) + return gw(3, o); + } + } + } + function Oae(e, t, n) { + if (_q( + t.totalTextChunk.text, + (o) => o !== 32 && o !== 42 + /* asterisk */ + )) { + const o = c2e(e, t.totalTextChunk, n); + if (o) return o; + } + const i = t.subWordTextChunks; + let s; + for (const o of i) + s = l2e(s, c2e(e, o, n)); + return s; + } + function l2e(e, t) { + return PR([e, t], SJe); + } + function SJe(e, t) { + return e === void 0 ? 1 : t === void 0 ? -1 : uo(e.kind, t.kind) || $1(!e.isCaseSensitive, !t.isCaseSensitive); + } + function Lae(e, t, n, i, s = { start: 0, length: n.length }) { + return s.length <= t.length && d2e(0, s.length, (o) => TJe(n.charCodeAt(s.start + o), e.charCodeAt(t.start + o), i)); + } + function TJe(e, t, n) { + return n ? Mae(e) === Mae(t) : e === t; + } + function u2e(e, t, n, i) { + const s = n.characterSpans; + let o = 0, c = 0; + for (; ; ) { + if (c === s.length) + return !0; + if (o === t.length) + return !1; + let _ = t[o], u = !1; + for (; c < s.length; c++) { + const m = s[c]; + if (u && (!z6(n.text.charCodeAt(s[c - 1].start)) || !z6(n.text.charCodeAt(s[c].start))) || !Lae(e, _, n.text, i, m)) + break; + u = !0, _ = ql(_.start + m.length, _.length - m.length); + } + o++; + } + } + function xJe(e) { + return { + totalTextChunk: jae(e), + subWordTextChunks: EJe(e) + }; + } + function z6(e) { + if (e >= 65 && e <= 90) + return !0; + if (e < 127 || !YI( + e, + 99 + /* Latest */ + )) + return !1; + const t = String.fromCharCode(e); + return t === t.toUpperCase(); + } + function _2e(e) { + if (e >= 97 && e <= 122) + return !0; + if (e < 127 || !YI( + e, + 99 + /* Latest */ + )) + return !1; + const t = String.fromCharCode(e); + return t === t.toLowerCase(); + } + function kJe(e, t) { + const n = e.length - t.length; + for (let i = 0; i <= n; i++) + if (_q(t, (s, o) => Mae(e.charCodeAt(o + i)) === s)) + return i; + return -1; + } + function Mae(e) { + return e >= 65 && e <= 90 ? 97 + (e - 65) : e < 127 ? e : String.fromCharCode(e).toLowerCase().charCodeAt(0); + } + function Rae(e) { + return e >= 48 && e <= 57; + } + function CJe(e) { + return z6(e) || _2e(e) || Rae(e) || e === 95 || e === 36; + } + function EJe(e) { + const t = []; + let n = 0, i = 0; + for (let s = 0; s < e.length; s++) { + const o = e.charCodeAt(s); + CJe(o) ? (i === 0 && (n = s), i++) : i > 0 && (t.push(jae(e.substr(n, i))), i = 0); + } + return i > 0 && t.push(jae(e.substr(n, i))), t; + } + function jae(e) { + const t = e.toLowerCase(); + return { + text: e, + textLowerCase: t, + isLowerCase: e === t, + characterSpans: Bae(e) + }; + } + function Bae(e) { + return f2e( + e, + /*word*/ + !1 + ); + } + function Jae(e) { + return f2e( + e, + /*word*/ + !0 + ); + } + function f2e(e, t) { + const n = []; + let i = 0; + for (let s = 1; s < e.length; s++) { + const o = Rae(e.charCodeAt(s - 1)), c = Rae(e.charCodeAt(s)), _ = wJe(e, t, s), u = t && DJe(e, s, i); + (zae(e.charCodeAt(s - 1)) || zae(e.charCodeAt(s)) || o !== c || _ || u) && (p2e(e, i, s) || n.push(ql(i, s - i)), i = s); + } + return p2e(e, i, e.length) || n.push(ql(i, e.length - i)), n; + } + function zae(e) { + switch (e) { + case 33: + case 34: + case 35: + case 37: + case 38: + case 39: + case 40: + case 41: + case 42: + case 44: + case 45: + case 46: + case 47: + case 58: + case 59: + case 63: + case 64: + case 91: + case 92: + case 93: + case 95: + case 123: + case 125: + return !0; + } + return !1; + } + function p2e(e, t, n) { + return _q(e, (i) => zae(i) && i !== 95, t, n); + } + function DJe(e, t, n) { + return t !== n && t + 1 < e.length && z6(e.charCodeAt(t)) && _2e(e.charCodeAt(t + 1)) && _q(e, z6, n, t); + } + function wJe(e, t, n) { + const i = z6(e.charCodeAt(n - 1)); + return z6(e.charCodeAt(n)) && (!t || !i); + } + function d2e(e, t, n) { + for (let i = e; i < t; i++) + if (!n(i)) + return !1; + return !0; + } + function _q(e, t, n = 0, i = e.length) { + return d2e(n, i, (s) => t(e.charCodeAt(s), s)); + } + function m2e(e, t = !0, n = !1) { + const i = { + languageVersion: 1, + // controls whether the token scanner considers unicode identifiers or not - shouldn't matter, since we're only using it for trivia + pragmas: void 0, + checkJsDirective: void 0, + referencedFiles: [], + typeReferenceDirectives: [], + libReferenceDirectives: [], + amdDependencies: [], + hasNoDefaultLib: void 0, + moduleName: void 0 + }, s = []; + let o, c, _, u = 0, m = !1; + function g() { + return c = _, _ = Fl.scan(), _ === 19 ? u++ : _ === 20 && u--, _; + } + function h() { + const W = Fl.getTokenValue(), V = Fl.getTokenStart(); + return { fileName: W, pos: V, end: V + W.length }; + } + function S() { + o || (o = []), o.push({ ref: h(), depth: u }); + } + function T() { + s.push(h()), C(); + } + function C() { + u === 0 && (m = !0); + } + function D() { + let W = Fl.getToken(); + return W === 138 ? (W = g(), W === 144 && (W = g(), W === 11 && S()), !0) : !1; + } + function w() { + if (c === 25) + return !1; + let W = Fl.getToken(); + if (W === 102) { + if (W = g(), W === 21) { + if (W = g(), W === 11 || W === 15) + return T(), !0; + } else { + if (W === 11) + return T(), !0; + if (W === 156 && Fl.lookAhead(() => { + const $ = Fl.scan(); + return $ !== 161 && ($ === 42 || $ === 19 || $ === 80 || f_($)); + }) && (W = g()), W === 80 || f_(W)) + if (W = g(), W === 161) { + if (W = g(), W === 11) + return T(), !0; + } else if (W === 64) { + if (O( + /*skipCurrentToken*/ + !0 + )) + return !0; + } else if (W === 28) + W = g(); + else + return !0; + if (W === 19) { + for (W = g(); W !== 20 && W !== 1; ) + W = g(); + W === 20 && (W = g(), W === 161 && (W = g(), W === 11 && T())); + } else W === 42 && (W = g(), W === 130 && (W = g(), (W === 80 || f_(W)) && (W = g(), W === 161 && (W = g(), W === 11 && T())))); + } + return !0; + } + return !1; + } + function A() { + let W = Fl.getToken(); + if (W === 95) { + if (C(), W = g(), W === 156 && Fl.lookAhead(() => { + const $ = Fl.scan(); + return $ === 42 || $ === 19; + }) && (W = g()), W === 19) { + for (W = g(); W !== 20 && W !== 1; ) + W = g(); + W === 20 && (W = g(), W === 161 && (W = g(), W === 11 && T())); + } else if (W === 42) + W = g(), W === 161 && (W = g(), W === 11 && T()); + else if (W === 102 && (W = g(), W === 156 && Fl.lookAhead(() => { + const $ = Fl.scan(); + return $ === 80 || f_($); + }) && (W = g()), (W === 80 || f_(W)) && (W = g(), W === 64 && O( + /*skipCurrentToken*/ + !0 + )))) + return !0; + return !0; + } + return !1; + } + function O(W, V = !1) { + let $ = W ? g() : Fl.getToken(); + return $ === 149 ? ($ = g(), $ === 21 && ($ = g(), ($ === 11 || V && $ === 15) && T()), !0) : !1; + } + function F() { + let W = Fl.getToken(); + if (W === 80 && Fl.getTokenValue() === "define") { + if (W = g(), W !== 21) + return !0; + if (W = g(), W === 11 || W === 15) + if (W = g(), W === 28) + W = g(); + else + return !0; + if (W !== 23) + return !0; + for (W = g(); W !== 24 && W !== 1; ) + (W === 11 || W === 15) && T(), W = g(); + return !0; + } + return !1; + } + function R() { + for (Fl.setText(e), g(); Fl.getToken() !== 1; ) { + if (Fl.getToken() === 16) { + const W = [Fl.getToken()]; + e: + for (; Ir(W); ) { + const V = Fl.scan(); + switch (V) { + case 1: + break e; + case 102: + w(); + break; + case 16: + W.push(V); + break; + case 19: + Ir(W) && W.push(V); + break; + case 20: + Ir(W) && (Co(W) === 16 ? Fl.reScanTemplateToken( + /*isTaggedTemplate*/ + !1 + ) === 18 && W.pop() : W.pop()); + break; + } + } + g(); + } + D() || w() || A() || n && (O( + /*skipCurrentToken*/ + !1, + /*allowTemplateLiterals*/ + !0 + ) || F()) || g(); + } + Fl.setText(void 0); + } + if (t && R(), Ez(i, e), Dz(i, Ja), m) { + if (o) + for (const W of o) + s.push(W.ref); + return { referencedFiles: i.referencedFiles, typeReferenceDirectives: i.typeReferenceDirectives, libReferenceDirectives: i.libReferenceDirectives, importedFiles: s, isLibFile: !!i.hasNoDefaultLib, ambientExternalModules: void 0 }; + } else { + let W; + if (o) + for (const V of o) + V.depth === 0 ? (W || (W = []), W.push(V.ref.fileName)) : s.push(V.ref); + return { referencedFiles: i.referencedFiles, typeReferenceDirectives: i.typeReferenceDirectives, libReferenceDirectives: i.libReferenceDirectives, importedFiles: s, isLibFile: !!i.hasNoDefaultLib, ambientExternalModules: W }; + } + } + var PJe = /^data:(?:application\/json;charset=[uU][tT][fF]-8;base64,([A-Za-z0-9+/=]+)$)?/; + function Wae(e) { + const t = Wl(e.useCaseSensitiveFileNames()), n = e.getCurrentDirectory(), i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(); + return { + tryGetSourcePosition: _, + tryGetGeneratedPosition: u, + toLineColumnOffset: S, + clearCache: T, + documentPositionMappers: s + }; + function o(C) { + return oo(C, n, t); + } + function c(C, D) { + const w = o(C), A = s.get(w); + if (A) return A; + let O; + if (e.getDocumentPositionMapper) + O = e.getDocumentPositionMapper(C, D); + else if (e.readFile) { + const F = h(C); + O = F && fq( + { getSourceFileLike: h, getCanonicalFileName: t, log: (R) => e.log(R) }, + C, + vW(F.text, Ag(F)), + (R) => !e.fileExists || e.fileExists(R) ? e.readFile(R) : void 0 + ); + } + return s.set(w, O || SW), O || SW; + } + function _(C) { + if (!fl(C.fileName) || !m(C.fileName)) return; + const w = c(C.fileName).getSourcePosition(C); + return !w || w === C ? void 0 : _(w) || w; + } + function u(C) { + if (fl(C.fileName)) return; + const D = m(C.fileName); + if (!D) return; + const w = e.getProgram(); + if (w.isSourceOfProjectReferenceRedirect(D.fileName)) + return; + const O = w.getCompilerOptions().outFile, F = O ? $u(O) + ".d.ts" : c5(C.fileName, w.getCompilerOptions(), w); + if (F === void 0) return; + const R = c(F, C.fileName).getGeneratedPosition(C); + return R === C ? void 0 : R; + } + function m(C) { + const D = e.getProgram(); + if (!D) return; + const w = o(C), A = D.getSourceFileByPath(w); + return A && A.resolvedPath === w ? A : void 0; + } + function g(C) { + const D = o(C), w = i.get(D); + if (w !== void 0) return w || void 0; + if (!e.readFile || e.fileExists && !e.fileExists(C)) { + i.set(D, !1); + return; + } + const A = e.readFile(C), O = A ? NJe(A) : !1; + return i.set(D, O), O || void 0; + } + function h(C) { + return e.getSourceFileLike ? e.getSourceFileLike(C) : m(C) || g(C); + } + function S(C, D) { + return h(C).getLineAndCharacterOfPosition(D); + } + function T() { + i.clear(), s.clear(); + } + } + function fq(e, t, n, i) { + let s = dne(n); + if (s) { + const _ = PJe.exec(s); + if (_) { + if (_[1]) { + const u = _[1]; + return g2e(e, $K(nl, u), t); + } + s = void 0; + } + } + const o = []; + s && o.push(s), o.push(t + ".map"); + const c = s && Xi(s, Hn(t)); + for (const _ of o) { + const u = Xi(_, Hn(t)), m = i(u, c); + if (rs(m)) + return g2e(e, m, u); + if (m !== void 0) + return m || void 0; + } + } + function g2e(e, t, n) { + const i = mne(t); + if (!(!i || !i.sources || !i.file || !i.mappings) && !(i.sourcesContent && i.sourcesContent.some(rs))) + return hne(e, i, n); + } + function NJe(e, t) { + return { + text: e, + lineMap: t, + getLineAndCharacterOfPosition(n) { + return pC(Ag(this), n); + } + }; + } + var Uae = /* @__PURE__ */ new Map(); + function pq(e, t, n) { + var i; + t.getSemanticDiagnostics(e, n); + const s = [], o = t.getTypeChecker(); + !(t.getImpliedNodeFormatForEmit(e) === 1 || vc(e.fileName, [ + ".cts", + ".cjs" + /* Cjs */ + ])) && e.commonJsModuleIndicator && (Zse(t) || CV(t.getCompilerOptions())) && AJe(e) && s.push(tn(LJe(e.commonJsModuleIndicator), p.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module)); + const _ = Gu(e); + if (Uae.clear(), u(e), wx(t.getCompilerOptions())) + for (const m of e.imports) { + const g = O4(m), h = IJe(g); + if (!h) continue; + const S = (i = t.getResolvedModuleFromModuleSpecifier(m, e)) == null ? void 0 : i.resolvedModule, T = S && t.getSourceFile(S.resolvedFileName); + T && T.externalModuleIndicator && T.externalModuleIndicator !== !0 && Io(T.externalModuleIndicator) && T.externalModuleIndicator.isExportEquals && s.push(tn(h, p.Import_may_be_converted_to_a_default_import)); + } + return Nn(s, e.bindSuggestionDiagnostics), Nn(s, t.getSuggestionDiagnostics(e, n)), s.sort((m, g) => m.start - g.start), s; + function u(m) { + if (_) + RJe(m, o) && s.push(tn(Kn(m.parent) ? m.parent.name : m, p.This_constructor_function_may_be_converted_to_a_class_declaration)); + else { + if (pc(m) && m.parent === e && m.declarationList.flags & 2 && m.declarationList.declarations.length === 1) { + const h = m.declarationList.declarations[0].initializer; + h && __( + h, + /*requireStringLiteralLikeArgument*/ + !0 + ) && s.push(tn(h, p.require_call_may_be_converted_to_an_import)); + } + const g = Eu.getJSDocTypedefNodes(m); + for (const h of g) + s.push(tn(h, p.JSDoc_typedef_may_be_converted_to_TypeScript_type)); + Eu.parameterShouldGetTypeFromJSDoc(m) && s.push(tn(m.name || m, p.JSDoc_types_may_be_moved_to_TypeScript_types)); + } + gq(m) && FJe(m, o, s), m.forEachChild(u); + } + } + function AJe(e) { + return e.statements.some((t) => { + switch (t.kind) { + case 243: + return t.declarationList.declarations.some((n) => !!n.initializer && __( + h2e(n.initializer), + /*requireStringLiteralLikeArgument*/ + !0 + )); + case 244: { + const { expression: n } = t; + if (!fn(n)) return __( + n, + /*requireStringLiteralLikeArgument*/ + !0 + ); + const i = Sc(n); + return i === 1 || i === 2; + } + default: + return !1; + } + }); + } + function h2e(e) { + return Tn(e) ? h2e(e.expression) : e; + } + function IJe(e) { + switch (e.kind) { + case 272: + const { importClause: t, moduleSpecifier: n } = e; + return t && !t.name && t.namedBindings && t.namedBindings.kind === 274 && ea(n) ? t.namedBindings.name : void 0; + case 271: + return e.name; + default: + return; + } + } + function FJe(e, t, n) { + OJe(e, t) && !Uae.has(S2e(e)) && n.push(tn( + !e.name && Kn(e.parent) && Me(e.parent.name) ? e.parent.name : e, + p.This_may_be_converted_to_an_async_function + )); + } + function OJe(e, t) { + return !J4(e) && e.body && ks(e.body) && MJe(e.body, t) && dq(e, t); + } + function dq(e, t) { + const n = t.getSignatureFromDeclaration(e), i = n ? t.getReturnTypeOfSignature(n) : void 0; + return !!i && !!t.getPromisedTypeOfPromise(i); + } + function LJe(e) { + return fn(e) ? e.left : e; + } + function MJe(e, t) { + return !!Hy(e, (n) => V9(n, t)); + } + function V9(e, t) { + return Rp(e) && !!e.expression && mq(e.expression, t); + } + function mq(e, t) { + if (!y2e(e) || !v2e(e) || !e.arguments.every((i) => b2e(i, t))) + return !1; + let n = e.expression.expression; + for (; y2e(n) || Tn(n); ) + if (Fs(n)) { + if (!v2e(n) || !n.arguments.every((i) => b2e(i, t))) + return !1; + n = n.expression.expression; + } else + n = n.expression; + return !0; + } + function y2e(e) { + return Fs(e) && (mA(e, "then") || mA(e, "catch") || mA(e, "finally")); + } + function v2e(e) { + const t = e.expression.name.text, n = t === "then" ? 2 : t === "catch" || t === "finally" ? 1 : 0; + return e.arguments.length > n ? !1 : e.arguments.length < n ? !0 : n === 1 || at(e.arguments, (i) => i.kind === 106 || Me(i) && i.text === "undefined"); + } + function b2e(e, t) { + switch (e.kind) { + case 262: + case 218: + if (Oc(e) & 1) + return !1; + // falls through + case 219: + Uae.set(S2e(e), !0); + // falls through + case 106: + return !0; + case 80: + case 211: { + const i = t.getSymbolAtLocation(e); + return i ? t.isUndefinedSymbol(i) || at(Gl(i, t).declarations, (s) => vs(s) || C0(s) && !!s.initializer && vs(s.initializer)) : !1; + } + default: + return !1; + } + } + function S2e(e) { + return `${e.pos.toString()}:${e.end.toString()}`; + } + function RJe(e, t) { + var n, i, s, o; + if (po(e)) { + if (Kn(e.parent) && ((n = e.symbol.members) != null && n.size)) + return !0; + const c = t.getSymbolOfExpando( + e, + /*allowDeclaration*/ + !1 + ); + return !!(c && ((i = c.exports) != null && i.size || (s = c.members) != null && s.size)); + } + return Tc(e) ? !!((o = e.symbol.members) != null && o.size) : !1; + } + function gq(e) { + switch (e.kind) { + case 262: + case 174: + case 218: + case 219: + return !0; + default: + return !1; + } + } + var jJe = /* @__PURE__ */ new Set([ + "isolatedModules" + ]); + function Vae(e, t) { + return x2e( + e, + t, + /*declaration*/ + !1 + ); + } + function T2e(e, t) { + return x2e( + e, + t, + /*declaration*/ + !0 + ); + } + var BJe = `/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number {} +interface Object {} +interface RegExp {} +interface String {} +interface Array { length: number; [n: number]: T; } +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +}`, q9 = "lib.d.ts", qae; + function x2e(e, t, n) { + qae ?? (qae = Zx(q9, BJe, { + languageVersion: 99 + /* Latest */ + })); + const i = [], s = t.compilerOptions ? hq(t.compilerOptions, i) : {}, o = iL(); + for (const D in o) + ro(o, D) && s[D] === void 0 && (s[D] = o[D]); + for (const D of dre) + s.verbatimModuleSyntax && jJe.has(D.name) || (s[D.name] = D.transpileOptionValue); + s.suppressOutputPathCheck = !0, s.allowNonTsExtensions = !0, n ? (s.declaration = !0, s.emitDeclarationOnly = !0, s.isolatedDeclarations = !0) : (s.declaration = !1, s.declarationMap = !1); + const c = N0(s), _ = { + getSourceFile: (D) => D === Hs(u) ? m : D === Hs(q9) ? qae : void 0, + writeFile: (D, w) => { + Bo(D, ".map") ? (E.assertEqual(h, void 0, "Unexpected multiple source map outputs, file:", D), h = w) : (E.assertEqual(g, void 0, "Unexpected multiple outputs, file:", D), g = w); + }, + getDefaultLibFileName: () => q9, + useCaseSensitiveFileNames: () => !1, + getCanonicalFileName: (D) => D, + getCurrentDirectory: () => "", + getNewLine: () => c, + fileExists: (D) => D === u || !!n && D === q9, + readFile: () => "", + directoryExists: () => !0, + getDirectories: () => [] + }, u = t.fileName || (t.compilerOptions && t.compilerOptions.jsx ? "module.tsx" : "module.ts"), m = Zx( + u, + e, + { + languageVersion: pa(s), + impliedNodeFormat: nA( + oo(u, "", _.getCanonicalFileName), + /*packageJsonInfoCache*/ + void 0, + _, + s + ), + setExternalModuleIndicator: q3(s), + jsDocParsingMode: t.jsDocParsingMode ?? 0 + /* ParseAll */ + } + ); + t.moduleName && (m.moduleName = t.moduleName), t.renamedDependencies && (m.renamedDependencies = new Map(Object.entries(t.renamedDependencies))); + let g, h; + const T = iA(n ? [u, q9] : [u], s, _); + t.reportDiagnostics && (Nn( + /*to*/ + i, + /*from*/ + T.getSyntacticDiagnostics(m) + ), Nn( + /*to*/ + i, + /*from*/ + T.getOptionsDiagnostics() + )); + const C = T.emit( + /*targetSourceFile*/ + void 0, + /*writeFile*/ + void 0, + /*cancellationToken*/ + void 0, + /*emitOnlyDtsFiles*/ + n, + t.transformers, + /*forceDtsEmit*/ + n + ); + return Nn( + /*to*/ + i, + /*from*/ + C.diagnostics + ), g === void 0 ? E.fail("Output generation failed") : { outputText: g, diagnostics: i, sourceMapText: h }; + } + function k2e(e, t, n, i, s) { + const o = Vae(e, { compilerOptions: t, fileName: n, reportDiagnostics: !!i, moduleName: s }); + return Nn(i, o.diagnostics), o.outputText; + } + var Hae; + function hq(e, t) { + Hae = Hae || kn(Nd, (n) => typeof n.type == "object" && !al(n.type, (i) => typeof i != "number")), e = vV(e); + for (const n of Hae) { + if (!ro(e, n.name)) + continue; + const i = e[n.name]; + rs(i) ? e[n.name] = BF(n, i, t) : al(n.type, (s) => s === i) || t.push(gre(n)); + } + return e; + } + var Gae = {}; + Ec(Gae, { + getNavigateToItems: () => C2e + }); + function C2e(e, t, n, i, s, o, c) { + const _ = Fae(i); + if (!_) return He; + const u = [], m = e.length === 1 ? e[0] : void 0; + for (const g of e) + n.throwIfCancellationRequested(), !(o && g.isDeclarationFile) && (E2e(g, !!c, m) || g.getNamedDeclarations().forEach((h, S) => { + JJe(_, S, h, t, g.fileName, !!c, m, u); + })); + return u.sort(VJe), (s === void 0 ? u : u.slice(0, s)).map(qJe); + } + function E2e(e, t, n) { + return e !== n && t && (AA(e.path) || e.hasNoDefaultLib); + } + function JJe(e, t, n, i, s, o, c, _) { + const u = e.getMatchForLastSegmentOfPattern(t); + if (u) { + for (const m of n) + if (zJe(m, i, o, c)) + if (e.patternContainsDots) { + const g = e.getFullMatch(UJe(m), t); + g && _.push({ name: t, fileName: s, matchKind: g.kind, isCaseSensitive: g.isCaseSensitive, declaration: m }); + } else + _.push({ name: t, fileName: s, matchKind: u.kind, isCaseSensitive: u.isCaseSensitive, declaration: m }); + } + } + function zJe(e, t, n, i) { + var s; + switch (e.kind) { + case 273: + case 276: + case 271: + const o = t.getSymbolAtLocation(e.name), c = t.getAliasedSymbol(o); + return o.escapedName !== c.escapedName && !((s = c.declarations) != null && s.every((_) => E2e(_.getSourceFile(), n, i))); + default: + return !0; + } + } + function WJe(e, t) { + const n = is(e); + return !!n && (D2e(n, t) || n.kind === 167 && $ae(n.expression, t)); + } + function $ae(e, t) { + return D2e(e, t) || Tn(e) && (t.push(e.name.text), !0) && $ae(e.expression, t); + } + function D2e(e, t) { + return am(e) && (t.push(rp(e)), !0); + } + function UJe(e) { + const t = [], n = is(e); + if (n && n.kind === 167 && !$ae(n.expression, t)) + return He; + t.shift(); + let i = XS(e); + for (; i; ) { + if (!WJe(i, t)) + return He; + i = XS(i); + } + return t.reverse(), t; + } + function VJe(e, t) { + return uo(e.matchKind, t.matchKind) || hP(e.name, t.name); + } + function qJe(e) { + const t = e.declaration, n = XS(t), i = n && is(n); + return { + name: e.name, + kind: u2(t), + kindModifiers: aw(t), + matchKind: uq[e.matchKind], + isCaseSensitive: e.isCaseSensitive, + fileName: e.fileName, + textSpan: e_(t), + // TODO(jfreeman): What should be the containerName when the container has a computed name? + containerName: i ? i.text : "", + containerKind: i ? u2(n) : "" + /* unknown */ + }; + } + var Xae = {}; + Ec(Xae, { + getNavigationBarItems: () => P2e, + getNavigationTree: () => N2e + }); + var HJe = /\s+/g, Qae = 150, yq, RA, H9 = [], U0, w2e = [], W6, Yae = []; + function P2e(e, t) { + yq = t, RA = e; + try { + return gr(YJe(F2e(e)), ZJe); + } finally { + A2e(); + } + } + function N2e(e, t) { + yq = t, RA = e; + try { + return W2e(F2e(e)); + } finally { + A2e(); + } + } + function A2e() { + RA = void 0, yq = void 0, H9 = [], U0 = void 0, Yae = []; + } + function G9(e) { + return hw(e.getText(RA)); + } + function vq(e) { + return e.node.kind; + } + function I2e(e, t) { + e.children ? e.children.push(t) : e.children = [t]; + } + function F2e(e) { + E.assert(!H9.length); + const t = { node: e, name: void 0, additionalNodes: void 0, parent: void 0, children: void 0, indent: 0 }; + U0 = t; + for (const n of e.statements) + pk(n); + return Nv(), E.assert(!U0 && !H9.length), t; + } + function d2(e, t) { + I2e(U0, Zae(e, t)); + } + function Zae(e, t) { + return { + node: e, + name: t || (bl(e) || ct(e) ? is(e) : void 0), + additionalNodes: void 0, + parent: U0, + children: void 0, + indent: U0.indent + 1 + }; + } + function O2e(e) { + W6 || (W6 = /* @__PURE__ */ new Map()), W6.set(e, !0); + } + function L2e(e) { + for (let t = 0; t < e; t++) Nv(); + } + function M2e(e, t) { + const n = []; + for (; !am(t); ) { + const i = g3(t), s = wh(t); + t = t.expression, !(s === "prototype" || Ni(i)) && n.push(i); + } + n.push(t); + for (let i = n.length - 1; i > 0; i--) { + const s = n[i]; + m2(e, s); + } + return [n.length - 1, n[0]]; + } + function m2(e, t) { + const n = Zae(e, t); + I2e(U0, n), H9.push(U0), w2e.push(W6), W6 = void 0, U0 = n; + } + function Nv() { + U0.children && (bq(U0.children, U0), toe(U0.children)), U0 = H9.pop(), W6 = w2e.pop(); + } + function Av(e, t, n) { + m2(e, n), pk(t), Nv(); + } + function R2e(e) { + e.initializer && eze(e.initializer) ? (m2(e), ms(e.initializer, pk), Nv()) : Av(e, e.initializer); + } + function Kae(e) { + const t = is(e); + if (t === void 0) return !1; + if (fa(t)) { + const n = t.expression; + return _o(n) || d_(n) || wf(n); + } + return !!t; + } + function pk(e) { + if (yq.throwIfCancellationRequested(), !(!e || rx(e))) + switch (e.kind) { + case 176: + const t = e; + Av(t, t.body); + for (const c of t.parameters) + H_(c, t) && d2(c); + break; + case 174: + case 177: + case 178: + case 173: + Kae(e) && Av(e, e.body); + break; + case 172: + Kae(e) && R2e(e); + break; + case 171: + Kae(e) && d2(e); + break; + case 273: + const n = e; + n.name && d2(n.name); + const { namedBindings: i } = n; + if (i) + if (i.kind === 274) + d2(i); + else + for (const c of i.elements) + d2(c); + break; + case 304: + Av(e, e.name); + break; + case 305: + const { expression: s } = e; + Me(s) ? d2(e, s) : d2(e); + break; + case 208: + case 303: + case 260: { + const c = e; + Ds(c.name) ? pk(c.name) : R2e(c); + break; + } + case 262: + const o = e.name; + o && Me(o) && O2e(o.text), Av(e, e.body); + break; + case 219: + case 218: + Av(e, e.body); + break; + case 266: + m2(e); + for (const c of e.members) + KJe(c) || d2(c); + Nv(); + break; + case 263: + case 231: + case 264: + m2(e); + for (const c of e.members) + pk(c); + Nv(); + break; + case 267: + Av(e, V2e(e).body); + break; + case 277: { + const c = e.expression, _ = oa(c) || Fs(c) ? c : bo(c) || po(c) ? c.body : void 0; + _ ? (m2(e), pk(_), Nv()) : d2(e); + break; + } + case 281: + case 271: + case 181: + case 179: + case 180: + case 265: + d2(e); + break; + case 213: + case 226: { + const c = Sc(e); + switch (c) { + case 1: + case 2: + Av(e, e.right); + return; + case 6: + case 3: { + const _ = e, u = _.left, m = c === 3 ? u.expression : u; + let g = 0, h; + Me(m.expression) ? (O2e(m.expression.text), h = m.expression) : [g, h] = M2e(_, m.expression), c === 6 ? oa(_.right) && _.right.properties.length > 0 && (m2(_, h), ms(_.right, pk), Nv()) : po(_.right) || bo(_.right) ? Av(e, _.right, h) : (m2(_, h), Av(e, _.right, u.name), Nv()), L2e(g); + return; + } + case 7: + case 9: { + const _ = e, u = c === 7 ? _.arguments[0] : _.arguments[0].expression, m = _.arguments[1], [g, h] = M2e(e, u); + m2(e, h), m2(e, ot(N.createIdentifier(m.text), m)), pk(e.arguments[2]), Nv(), Nv(), L2e(g); + return; + } + case 5: { + const _ = e, u = _.left, m = u.expression; + if (Me(m) && wh(u) !== "prototype" && W6 && W6.has(m.text)) { + po(_.right) || bo(_.right) ? Av(e, _.right, m) : Fb(u) && (m2(_, m), Av(_.left, _.right, g3(u)), Nv()); + return; + } + break; + } + case 4: + case 0: + case 8: + break; + default: + E.assertNever(c); + } + } + // falls through + default: + uf(e) && lr(e.jsDoc, (c) => { + lr(c.tags, (_) => { + Fp(_) && d2(_); + }); + }), ms(e, pk); + } + } + function bq(e, t) { + const n = /* @__PURE__ */ new Map(); + dR(e, (i, s) => { + const o = i.name || is(i.node), c = o && G9(o); + if (!c) + return !0; + const _ = n.get(c); + if (!_) + return n.set(c, i), !0; + if (_ instanceof Array) { + for (const u of _) + if (j2e(u, i, s, t)) + return !1; + return _.push(i), !0; + } else { + const u = _; + return j2e(u, i, s, t) ? !1 : (n.set(c, [u, i]), !0); + } + }); + } + var jA = { + 5: !0, + 3: !0, + 7: !0, + 9: !0, + 0: !1, + 1: !1, + 2: !1, + 8: !1, + 6: !0, + 4: !1 + }; + function GJe(e, t, n, i) { + function s(_) { + return po(_) || Tc(_) || Kn(_); + } + const o = fn(t.node) || Fs(t.node) ? Sc(t.node) : 0, c = fn(e.node) || Fs(e.node) ? Sc(e.node) : 0; + if (jA[o] && jA[c] || s(e.node) && jA[o] || s(t.node) && jA[c] || $c(e.node) && eoe(e.node) && jA[o] || $c(t.node) && jA[c] || $c(e.node) && eoe(e.node) && s(t.node) || $c(t.node) && s(e.node) && eoe(e.node)) { + let _ = e.additionalNodes && Co(e.additionalNodes) || e.node; + if (!$c(e.node) && !$c(t.node) || s(e.node) || s(t.node)) { + const m = s(e.node) ? e.node : s(t.node) ? t.node : void 0; + if (m !== void 0) { + const g = ot( + N.createConstructorDeclaration( + /*modifiers*/ + void 0, + [], + /*body*/ + void 0 + ), + m + ), h = Zae(g); + h.indent = e.indent + 1, h.children = e.node === m ? e.children : t.children, e.children = e.node === m ? Wi([h], t.children || [t]) : Wi(e.children || [{ ...e }], [h]); + } else + (e.children || t.children) && (e.children = Wi(e.children || [{ ...e }], t.children || [t]), e.children && (bq(e.children, e), toe(e.children))); + _ = e.node = ot( + N.createClassDeclaration( + /*modifiers*/ + void 0, + e.name || N.createIdentifier("__class__"), + /*typeParameters*/ + void 0, + /*heritageClauses*/ + void 0, + [] + ), + e.node + ); + } else + e.children = Wi(e.children, t.children), e.children && bq(e.children, e); + const u = t.node; + return i.children[n - 1].node.end === _.end ? ot(_, { pos: _.pos, end: u.end }) : (e.additionalNodes || (e.additionalNodes = []), e.additionalNodes.push(ot( + N.createClassDeclaration( + /*modifiers*/ + void 0, + e.name || N.createIdentifier("__class__"), + /*typeParameters*/ + void 0, + /*heritageClauses*/ + void 0, + [] + ), + t.node + ))), !0; + } + return o !== 0; + } + function j2e(e, t, n, i) { + return GJe(e, t, n, i) ? !0 : $Je(e.node, t.node, i) ? (XJe(e, t), !0) : !1; + } + function $Je(e, t, n) { + if (e.kind !== t.kind || e.parent !== t.parent && !(B2e(e, n) && B2e(t, n))) + return !1; + switch (e.kind) { + case 172: + case 174: + case 177: + case 178: + return Vs(e) === Vs(t); + case 267: + return J2e(e, t) && ioe(e) === ioe(t); + default: + return !0; + } + } + function eoe(e) { + return !!(e.flags & 16); + } + function B2e(e, t) { + if (e.parent === void 0) return !1; + const n = dm(e.parent) ? e.parent.parent : e.parent; + return n === t.node || as(t.additionalNodes, n); + } + function J2e(e, t) { + return !e.body || !t.body ? e.body === t.body : e.body.kind === t.body.kind && (e.body.kind !== 267 || J2e(e.body, t.body)); + } + function XJe(e, t) { + e.additionalNodes = e.additionalNodes || [], e.additionalNodes.push(t.node), t.additionalNodes && e.additionalNodes.push(...t.additionalNodes), e.children = Wi(e.children, t.children), e.children && (bq(e.children, e), toe(e.children)); + } + function toe(e) { + e.sort(QJe); + } + function QJe(e, t) { + return hP(z2e(e.node), z2e(t.node)) || uo(vq(e), vq(t)); + } + function z2e(e) { + if (e.kind === 267) + return U2e(e); + const t = is(e); + if (t && Fc(t)) { + const n = TS(t); + return n && Pi(n); + } + switch (e.kind) { + case 218: + case 219: + case 231: + return H2e(e); + default: + return; + } + } + function roe(e, t) { + if (e.kind === 267) + return hw(U2e(e)); + if (t) { + const n = Me(t) ? t.text : fo(t) ? `[${G9(t.argumentExpression)}]` : G9(t); + if (n.length > 0) + return hw(n); + } + switch (e.kind) { + case 307: + const n = e; + return el(n) ? `"${rg(Vc($u(Hs(n.fileName))))}"` : ""; + case 277: + return Io(e) && e.isExportEquals ? "export=" : "default"; + case 219: + case 262: + case 218: + case 263: + case 231: + return w0(e) & 2048 ? "default" : H2e(e); + case 176: + return "constructor"; + case 180: + return "new()"; + case 179: + return "()"; + case 181: + return "[]"; + default: + return ""; + } + } + function YJe(e) { + const t = []; + function n(s) { + if (i(s) && (t.push(s), s.children)) + for (const o of s.children) + n(o); + } + return n(e), t; + function i(s) { + if (s.children) + return !0; + switch (vq(s)) { + case 263: + case 231: + case 266: + case 264: + case 267: + case 307: + case 265: + case 346: + case 338: + return !0; + case 219: + case 262: + case 218: + return o(s); + default: + return !1; + } + function o(c) { + if (!c.node.body) + return !1; + switch (vq(c.parent)) { + case 268: + case 307: + case 174: + case 176: + return !0; + default: + return !1; + } + } + } + } + function W2e(e) { + return { + text: roe(e.node, e.name), + kind: u2(e.node), + kindModifiers: q2e(e.node), + spans: noe(e), + nameSpan: e.name && soe(e.name), + childItems: gr(e.children, W2e) + }; + } + function ZJe(e) { + return { + text: roe(e.node, e.name), + kind: u2(e.node), + kindModifiers: q2e(e.node), + spans: noe(e), + childItems: gr(e.children, t) || Yae, + indent: e.indent, + bolded: !1, + grayed: !1 + }; + function t(n) { + return { + text: roe(n.node, n.name), + kind: u2(n.node), + kindModifiers: aw(n.node), + spans: noe(n), + childItems: Yae, + indent: 0, + bolded: !1, + grayed: !1 + }; + } + } + function noe(e) { + const t = [soe(e.node)]; + if (e.additionalNodes) + for (const n of e.additionalNodes) + t.push(soe(n)); + return t; + } + function U2e(e) { + return Ou(e) ? qo(e.name) : ioe(e); + } + function ioe(e) { + const t = [rp(e.name)]; + for (; e.body && e.body.kind === 267; ) + e = e.body, t.push(rp(e.name)); + return t.join("."); + } + function V2e(e) { + return e.body && Lc(e.body) ? V2e(e.body) : e; + } + function KJe(e) { + return !e.name || e.name.kind === 167; + } + function soe(e) { + return e.kind === 307 ? W0(e) : e_(e, RA); + } + function q2e(e) { + return e.parent && e.parent.kind === 260 && (e = e.parent), aw(e); + } + function H2e(e) { + const { parent: t } = e; + if (e.name && GP(e.name) > 0) + return hw(co(e.name)); + if (Kn(t)) + return hw(co(t.name)); + if (fn(t) && t.operatorToken.kind === 64) + return G9(t.left).replace(HJe, ""); + if (Xc(t)) + return G9(t.name); + if (w0(e) & 2048) + return "default"; + if (Zn(e)) + return ""; + if (Fs(t)) { + let n = G2e(t.expression); + if (n !== void 0) { + if (n = hw(n), n.length > Qae) + return `${n} callback`; + const i = hw(Li(t.arguments, (s) => Na(s) || sx(s) ? s.getText(RA) : void 0).join(", ")); + return `${n}(${i}) callback`; + } + } + return ""; + } + function G2e(e) { + if (Me(e)) + return e.text; + if (Tn(e)) { + const t = G2e(e.expression), n = e.name.text; + return t === void 0 ? n : `${t}.${n}`; + } else + return; + } + function eze(e) { + switch (e.kind) { + case 219: + case 218: + case 231: + return !0; + default: + return !1; + } + } + function hw(e) { + return e = e.length > Qae ? e.substring(0, Qae) + "..." : e, e.replace(/\\?(?:\r?\n|[\r\u2028\u2029])/g, ""); + } + var dk = {}; + Ec(dk, { + addExportsInOldFile: () => goe, + addImportsForMovedSymbols: () => hoe, + addNewFileToTsconfig: () => moe, + addOrRemoveBracesToArrowFunction: () => Xze, + addTargetFileImports: () => Eoe, + containsJsx: () => boe, + convertArrowFunctionOrFunctionExpression: () => eWe, + convertParamsToDestructuredObject: () => _We, + convertStringOrTemplateLiteral: () => PWe, + convertToOptionalChainExpression: () => BWe, + createNewFileName: () => voe, + doChangeNamedToNamespaceOrDefault: () => K2e, + extractSymbol: () => qSe, + generateGetAccessorAndSetAccessor: () => TUe, + getApplicableRefactors: () => tze, + getEditsForRefactor: () => rze, + getExistingLocals: () => koe, + getIdentifierForNode: () => Coe, + getNewStatementsAndRemoveFromOldFile: () => doe, + getStatementsToMove: () => BA, + getUsageInfo: () => $9, + inferFunctionReturnType: () => xUe, + isInImport: () => Pq, + isRefactorErrorInfo: () => zh, + refactorKindBeginsWith: () => Iv, + registerRefactor: () => eh + }); + var aoe = /* @__PURE__ */ new Map(); + function eh(e, t) { + aoe.set(e, t); + } + function tze(e, t) { + return Ki(mR(aoe.values(), (n) => { + var i; + return e.cancellationToken && e.cancellationToken.isCancellationRequested() || !((i = n.kinds) != null && i.some((s) => Iv(s, e.kind))) ? void 0 : n.getAvailableActions(e, t); + })); + } + function rze(e, t, n, i) { + const s = aoe.get(t); + return s && s.getEditsForAction(e, n, i); + } + var ooe = "Convert export", Sq = { + name: "Convert default export to named export", + description: us(p.Convert_default_export_to_named_export), + kind: "refactor.rewrite.export.named" + }, Tq = { + name: "Convert named export to default export", + description: us(p.Convert_named_export_to_default_export), + kind: "refactor.rewrite.export.default" + }; + eh(ooe, { + kinds: [ + Sq.kind, + Tq.kind + ], + getAvailableActions: function(t) { + const n = $2e(t, t.triggerReason === "invoked"); + if (!n) return He; + if (!zh(n)) { + const i = n.wasDefault ? Sq : Tq; + return [{ name: ooe, description: i.description, actions: [i] }]; + } + return t.preferences.provideRefactorNotApplicableReason ? [ + { + name: ooe, + description: us(p.Convert_default_export_to_named_export), + actions: [ + { ...Sq, notApplicableReason: n.error }, + { ...Tq, notApplicableReason: n.error } + ] + } + ] : He; + }, + getEditsForAction: function(t, n) { + E.assert(n === Sq.name || n === Tq.name, "Unexpected action name"); + const i = $2e(t); + return E.assert(i && !zh(i), "Expected applicable refactor info"), { edits: sn.ChangeTracker.with(t, (o) => nze(t.file, t.program, i, o, t.cancellationToken)), renameFilename: void 0, renameLocation: void 0 }; + } + }); + function $2e(e, t = !0) { + const { file: n, program: i } = e, s = _k(e), o = Si(n, s.start), c = o.parent && w0(o.parent) & 32 && t ? o.parent : CA(o, n, s); + if (!c || !Ei(c.parent) && !(dm(c.parent) && Ou(c.parent.parent))) + return { error: us(p.Could_not_find_export_statement) }; + const _ = i.getTypeChecker(), u = cze(c.parent, _), m = w0(c) || (Io(c) && !c.isExportEquals ? 2080 : 0), g = !!(m & 2048); + if (!(m & 32) || !g && u.exports.has( + "default" + /* Default */ + )) + return { error: us(p.This_file_already_has_a_default_export) }; + const h = (S) => Me(S) && _.getSymbolAtLocation(S) ? void 0 : { error: us(p.Can_only_convert_named_export) }; + switch (c.kind) { + case 262: + case 263: + case 264: + case 266: + case 265: + case 267: { + const S = c; + return S.name ? h(S.name) || { exportNode: S, exportName: S.name, wasDefault: g, exportingModuleSymbol: u } : void 0; + } + case 243: { + const S = c; + if (!(S.declarationList.flags & 2) || S.declarationList.declarations.length !== 1) + return; + const T = ya(S.declarationList.declarations); + return T.initializer ? (E.assert(!g, "Can't have a default flag here"), h(T.name) || { exportNode: S, exportName: T.name, wasDefault: g, exportingModuleSymbol: u }) : void 0; + } + case 277: { + const S = c; + return S.isExportEquals ? void 0 : h(S.expression) || { exportNode: S, exportName: S.expression, wasDefault: g, exportingModuleSymbol: u }; + } + default: + return; + } + } + function nze(e, t, n, i, s) { + ize(e, n, i, t.getTypeChecker()), sze(t, n, i, s); + } + function ize(e, { wasDefault: t, exportNode: n, exportName: i }, s, o) { + if (t) + if (Io(n) && !n.isExportEquals) { + const c = n.expression, _ = X2e(c.text, c.text); + s.replaceNode(e, n, N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createNamedExports([_]) + )); + } else + s.delete(e, E.checkDefined(L6( + n, + 90 + /* DefaultKeyword */ + ), "Should find a default keyword in modifier list")); + else { + const c = E.checkDefined(L6( + n, + 95 + /* ExportKeyword */ + ), "Should find an export keyword in modifier list"); + switch (n.kind) { + case 262: + case 263: + case 264: + s.insertNodeAfter(e, c, N.createToken( + 90 + /* DefaultKeyword */ + )); + break; + case 243: + const _ = ya(n.declarationList.declarations); + if (!So.Core.isSymbolReferencedInFile(i, o, e) && !_.type) { + s.replaceNode(e, n, N.createExportDefault(E.checkDefined(_.initializer, "Initializer was previously known to be present"))); + break; + } + // falls through + case 266: + case 265: + case 267: + s.deleteModifier(e, c), s.insertNodeAfter(e, n, N.createExportDefault(N.createIdentifier(i.text))); + break; + default: + E.fail(`Unexpected exportNode kind ${n.kind}`); + } + } + } + function sze(e, { wasDefault: t, exportName: n, exportingModuleSymbol: i }, s, o) { + const c = e.getTypeChecker(), _ = E.checkDefined(c.getSymbolAtLocation(n), "Export name should resolve to a symbol"); + So.Core.eachExportReference(e.getSourceFiles(), c, o, _, i, n.text, t, (u) => { + if (n === u) return; + const m = u.getSourceFile(); + t ? aze(m, u, s, n.text) : oze(m, u, s); + }); + } + function aze(e, t, n, i) { + const { parent: s } = t; + switch (s.kind) { + case 211: + n.replaceNode(e, t, N.createIdentifier(i)); + break; + case 276: + case 281: { + const c = s; + n.replaceNode(e, c, coe(i, c.name.text)); + break; + } + case 273: { + const c = s; + E.assert(c.name === t, "Import clause name should match provided ref"); + const _ = coe(i, t.text), { namedBindings: u } = c; + if (!u) + n.replaceNode(e, t, N.createNamedImports([_])); + else if (u.kind === 274) { + n.deleteRange(e, { pos: t.getStart(e), end: u.getStart(e) }); + const m = ea(c.parent.moduleSpecifier) ? DV(c.parent.moduleSpecifier, e) : 1, g = p1( + /*defaultImport*/ + void 0, + [coe(i, t.text)], + c.parent.moduleSpecifier, + m + ); + n.insertNodeAfter(e, c.parent, g); + } else + n.delete(e, t), n.insertNodeAtEndOfList(e, u.elements, _); + break; + } + case 205: + const o = s; + n.replaceNode(e, s, N.createImportTypeNode(o.argument, o.attributes, N.createIdentifier(i), o.typeArguments, o.isTypeOf)); + break; + default: + E.failBadSyntaxKind(s); + } + } + function oze(e, t, n) { + const i = t.parent; + switch (i.kind) { + case 211: + n.replaceNode(e, t, N.createIdentifier("default")); + break; + case 276: { + const s = N.createIdentifier(i.name.text); + i.parent.elements.length === 1 ? n.replaceNode(e, i.parent, s) : (n.delete(e, i), n.insertNodeBefore(e, i.parent, s)); + break; + } + case 281: { + n.replaceNode(e, i, X2e("default", i.name.text)); + break; + } + default: + E.assertNever(i, `Unexpected parent kind ${i.kind}`); + } + } + function coe(e, t) { + return N.createImportSpecifier( + /*isTypeOnly*/ + !1, + e === t ? void 0 : N.createIdentifier(e), + N.createIdentifier(t) + ); + } + function X2e(e, t) { + return N.createExportSpecifier( + /*isTypeOnly*/ + !1, + e === t ? void 0 : N.createIdentifier(e), + N.createIdentifier(t) + ); + } + function cze(e, t) { + if (Ei(e)) + return e.symbol; + const n = e.parent.symbol; + return n.valueDeclaration && Pb(n.valueDeclaration) ? t.getMergedSymbol(n) : n; + } + var loe = "Convert import", xq = { + 0: { + name: "Convert namespace import to named imports", + description: us(p.Convert_namespace_import_to_named_imports), + kind: "refactor.rewrite.import.named" + }, + 2: { + name: "Convert named imports to namespace import", + description: us(p.Convert_named_imports_to_namespace_import), + kind: "refactor.rewrite.import.namespace" + }, + 1: { + name: "Convert named imports to default import", + description: us(p.Convert_named_imports_to_default_import), + kind: "refactor.rewrite.import.default" + } + }; + eh(loe, { + kinds: GT(xq).map((e) => e.kind), + getAvailableActions: function(t) { + const n = Q2e(t, t.triggerReason === "invoked"); + if (!n) return He; + if (!zh(n)) { + const i = xq[n.convertTo]; + return [{ name: loe, description: i.description, actions: [i] }]; + } + return t.preferences.provideRefactorNotApplicableReason ? GT(xq).map((i) => ({ + name: loe, + description: i.description, + actions: [{ ...i, notApplicableReason: n.error }] + })) : He; + }, + getEditsForAction: function(t, n) { + E.assert(at(GT(xq), (o) => o.name === n), "Unexpected action name"); + const i = Q2e(t); + return E.assert(i && !zh(i), "Expected applicable refactor info"), { edits: sn.ChangeTracker.with(t, (o) => lze(t.file, t.program, o, i)), renameFilename: void 0, renameLocation: void 0 }; + } + }); + function Q2e(e, t = !0) { + const { file: n } = e, i = _k(e), s = Si(n, i.start), o = t ? ur(s, U_(zo, ym)) : CA(s, n, i); + if (o === void 0 || !(zo(o) || ym(o))) return { error: "Selection is not an import declaration." }; + const c = i.start + i.length, _ = _2(o, o.parent, n); + if (_ && c > _.getStart()) return; + const { importClause: u } = o; + return u ? u.namedBindings ? u.namedBindings.kind === 274 ? { convertTo: 0, import: u.namedBindings } : Y2e(e.program, u) ? { convertTo: 1, import: u.namedBindings } : { convertTo: 2, import: u.namedBindings } : { error: us(p.Could_not_find_namespace_import_or_named_imports) } : { error: us(p.Could_not_find_import_clause) }; + } + function Y2e(e, t) { + return wx(e.getCompilerOptions()) && fze(t.parent.moduleSpecifier, e.getTypeChecker()); + } + function lze(e, t, n, i) { + const s = t.getTypeChecker(); + i.convertTo === 0 ? uze(e, s, n, i.import, wx(t.getCompilerOptions())) : K2e( + e, + t, + n, + i.import, + i.convertTo === 1 + /* Default */ + ); + } + function uze(e, t, n, i, s) { + let o = !1; + const c = [], _ = /* @__PURE__ */ new Map(); + So.Core.eachSymbolReferenceInFile(i.name, t, e, (h) => { + if (!WP(h.parent)) + o = !0; + else { + const S = Z2e(h.parent).text; + t.resolveName( + S, + h, + -1, + /*excludeGlobals*/ + !0 + ) && _.set(S, !0), E.assert(_ze(h.parent) === h, "Parent expression should match id"), c.push(h.parent); + } + }); + const u = /* @__PURE__ */ new Map(); + for (const h of c) { + const S = Z2e(h).text; + let T = u.get(S); + T === void 0 && u.set(S, T = _.has(S) ? YS(S, e) : S), n.replaceNode(e, h, N.createIdentifier(T)); + } + const m = []; + u.forEach((h, S) => { + m.push(N.createImportSpecifier( + /*isTypeOnly*/ + !1, + h === S ? void 0 : N.createIdentifier(S), + N.createIdentifier(h) + )); + }); + const g = i.parent.parent; + if (o && !s && zo(g)) + n.insertNodeAfter(e, g, eSe( + g, + /*defaultImportName*/ + void 0, + m + )); + else { + const h = o ? N.createIdentifier(i.name.text) : void 0; + n.replaceNode(e, i.parent, tSe(h, m)); + } + } + function Z2e(e) { + return Tn(e) ? e.name : e.right; + } + function _ze(e) { + return Tn(e) ? e.expression : e.left; + } + function K2e(e, t, n, i, s = Y2e(t, i.parent)) { + const o = t.getTypeChecker(), c = i.parent.parent, { moduleSpecifier: _ } = c, u = /* @__PURE__ */ new Set(); + i.elements.forEach((C) => { + const D = o.getSymbolAtLocation(C.name); + D && u.add(D); + }); + const m = _ && ea(_) ? FA( + _.text, + 99 + /* ESNext */ + ) : "module"; + function g(C) { + return !!So.Core.eachSymbolReferenceInFile(C.name, o, e, (D) => { + const w = o.resolveName( + m, + D, + -1, + /*excludeGlobals*/ + !0 + ); + return w ? u.has(w) ? Tu(D.parent) : !0 : !1; + }); + } + const S = i.elements.some(g) ? YS(m, e) : m, T = /* @__PURE__ */ new Set(); + for (const C of i.elements) { + const D = C.propertyName || C.name; + So.Core.eachSymbolReferenceInFile(C.name, o, e, (w) => { + const A = D.kind === 11 ? N.createElementAccessExpression(N.createIdentifier(S), N.cloneNode(D)) : N.createPropertyAccessExpression(N.createIdentifier(S), N.cloneNode(D)); + _u(w.parent) ? n.replaceNode(e, w.parent, N.createPropertyAssignment(w.text, A)) : Tu(w.parent) ? T.add(C) : n.replaceNode(e, w, A); + }); + } + if (n.replaceNode( + e, + i, + s ? N.createIdentifier(S) : N.createNamespaceImport(N.createIdentifier(S)) + ), T.size && zo(c)) { + const C = Ki(T.values(), (D) => N.createImportSpecifier(D.isTypeOnly, D.propertyName && N.cloneNode(D.propertyName), N.cloneNode(D.name))); + n.insertNodeAfter(e, i.parent.parent, eSe( + c, + /*defaultImportName*/ + void 0, + C + )); + } + } + function fze(e, t) { + const n = t.resolveExternalModuleName(e); + if (!n) return !1; + const i = t.resolveExternalModuleSymbol(n); + return n !== i; + } + function eSe(e, t, n) { + return N.createImportDeclaration( + /*modifiers*/ + void 0, + tSe(t, n), + e.moduleSpecifier, + /*attributes*/ + void 0 + ); + } + function tSe(e, t) { + return N.createImportClause( + /*isTypeOnly*/ + !1, + e, + t && t.length ? N.createNamedImports(t) : void 0 + ); + } + var uoe = "Extract type", kq = { + name: "Extract to type alias", + description: us(p.Extract_to_type_alias), + kind: "refactor.extract.type" + }, Cq = { + name: "Extract to interface", + description: us(p.Extract_to_interface), + kind: "refactor.extract.interface" + }, Eq = { + name: "Extract to typedef", + description: us(p.Extract_to_typedef), + kind: "refactor.extract.typedef" + }; + eh(uoe, { + kinds: [ + kq.kind, + Cq.kind, + Eq.kind + ], + getAvailableActions: function(t) { + const { info: n, affectedTextRange: i } = rSe(t, t.triggerReason === "invoked"); + return n ? zh(n) ? t.preferences.provideRefactorNotApplicableReason ? [{ + name: uoe, + description: us(p.Extract_type), + actions: [ + { ...Eq, notApplicableReason: n.error }, + { ...kq, notApplicableReason: n.error }, + { ...Cq, notApplicableReason: n.error } + ] + }] : He : [{ + name: uoe, + description: us(p.Extract_type), + actions: n.isJS ? [Eq] : Pr([kq], n.typeElements && Cq) + }].map((o) => ({ + ...o, + actions: o.actions.map((c) => ({ + ...c, + range: i ? { + start: { line: js(t.file, i.pos).line, offset: js(t.file, i.pos).character }, + end: { line: js(t.file, i.end).line, offset: js(t.file, i.end).character } + } : void 0 + })) + })) : He; + }, + getEditsForAction: function(t, n) { + const { file: i } = t, { info: s } = rSe(t); + E.assert(s && !zh(s), "Expected to find a range to extract"); + const o = YS("NewType", i), c = sn.ChangeTracker.with(t, (m) => { + switch (n) { + case kq.name: + return E.assert(!s.isJS, "Invalid actionName/JS combo"), mze(m, i, o, s); + case Eq.name: + return E.assert(s.isJS, "Invalid actionName/JS combo"), hze(m, t, i, o, s); + case Cq.name: + return E.assert(!s.isJS && !!s.typeElements, "Invalid actionName/JS combo"), gze(m, i, o, s); + default: + E.fail("Unexpected action name"); + } + }), _ = i.fileName, u = wA( + c, + _, + o, + /*preferLastLocation*/ + !1 + ); + return { edits: c, renameFilename: _, renameLocation: u }; + } + }); + function rSe(e, t = !0) { + const { file: n, startPosition: i } = e, s = Gu(n), o = y9(_k(e)), c = o.pos === o.end && t, _ = pze(n, i, o, c); + if (!_ || !fi(_)) return { info: { error: us(p.Selection_is_not_a_valid_type_node) }, affectedTextRange: void 0 }; + const u = e.program.getTypeChecker(), m = yze(_, s); + if (m === void 0) return { info: { error: us(p.No_type_could_be_extracted_from_this_type_node) }, affectedTextRange: void 0 }; + const g = vze(_, m); + if (!fi(g)) return { info: { error: us(p.Selection_is_not_a_valid_type_node) }, affectedTextRange: void 0 }; + const h = []; + (L0(g.parent) || Ux(g.parent)) && o.end > _.end && Nn( + h, + g.parent.types.filter((w) => l9(w, n, o.pos, o.end)) + ); + const S = h.length > 1 ? h : g, { typeParameters: T, affectedTextRange: C } = dze(u, S, m, n); + if (!T) return { info: { error: us(p.No_type_could_be_extracted_from_this_type_node) }, affectedTextRange: void 0 }; + const D = Dq(u, S); + return { info: { isJS: s, selection: S, enclosingNode: m, typeParameters: T, typeElements: D }, affectedTextRange: C }; + } + function pze(e, t, n, i) { + const s = [ + () => Si(e, t), + () => F6(e, t, () => !0) + ]; + for (const o of s) { + const c = o(), _ = l9(c, e, n.pos, n.end), u = ur(c, (m) => m.parent && fi(m) && !g2(n, m.parent, e) && (i || _)); + if (u) + return u; + } + } + function Dq(e, t) { + if (t) { + if (os(t)) { + const n = []; + for (const i of t) { + const s = Dq(e, i); + if (!s) return; + Nn(n, s); + } + return n; + } + if (Ux(t)) { + const n = [], i = /* @__PURE__ */ new Set(); + for (const s of t.types) { + const o = Dq(e, s); + if (!o || !o.every((c) => c.name && Lp(i, xA(c.name)))) + return; + Nn(n, o); + } + return n; + } else { + if (IS(t)) + return Dq(e, t.type); + if (Qu(t)) + return t.members; + } + } + } + function g2(e, t, n) { + return yA(e, aa(n.text, t.pos), t.end); + } + function dze(e, t, n, i) { + const s = [], o = $T(t), c = { pos: o[0].getStart(i), end: o[o.length - 1].end }; + for (const u of o) + if (_(u)) return { typeParameters: void 0, affectedTextRange: void 0 }; + return { typeParameters: s, affectedTextRange: c }; + function _(u) { + if (Y_(u)) { + if (Me(u.typeName)) { + const m = u.typeName, g = e.resolveName( + m.text, + m, + 262144, + /*excludeGlobals*/ + !0 + ); + for (const h of g?.declarations || He) + if (Ao(h) && h.getSourceFile() === i) { + if (h.name.escapedText === m.escapedText && g2(h, c, i)) + return !0; + if (g2(n, h, i) && !g2(c, h, i)) { + Qf(s, h); + break; + } + } + } + } else if (AS(u)) { + const m = ur(u, (g) => Xb(g) && g2(g.extendsType, u, i)); + if (!m || !g2(c, m, i)) + return !0; + } else if (zx(u) || bD(u)) { + const m = ur(u.parent, vs); + if (m && m.type && g2(m.type, u, i) && !g2(c, m, i)) + return !0; + } else if ($b(u)) { + if (Me(u.exprName)) { + const m = e.resolveName( + u.exprName.text, + u.exprName, + 111551, + /*excludeGlobals*/ + !1 + ); + if (m?.valueDeclaration && g2(n, m.valueDeclaration, i) && !g2(c, m.valueDeclaration, i)) + return !0; + } else if (Xy(u.exprName.left) && !g2(c, u.parent, i)) + return !0; + } + return i && Wx(u) && js(i, u.pos).line === js(i, u.end).line && on( + u, + 1 + /* SingleLine */ + ), ms(u, _); + } + } + function mze(e, t, n, i) { + const { enclosingNode: s, typeParameters: o } = i, { firstTypeNode: c, lastTypeNode: _, newTypeNode: u } = _oe(i), m = N.createTypeAliasDeclaration( + /*modifiers*/ + void 0, + n, + o.map((g) => N.updateTypeParameterDeclaration( + g, + g.modifiers, + g.name, + g.constraint, + /*defaultType*/ + void 0 + )), + u + ); + e.insertNodeBefore( + t, + s, + VJ(m), + /*blankLineBetween*/ + !0 + ), e.replaceNodeRange(t, c, _, N.createTypeReferenceNode(n, o.map((g) => N.createTypeReferenceNode( + g.name, + /*typeArguments*/ + void 0 + ))), { leadingTriviaOption: sn.LeadingTriviaOption.Exclude, trailingTriviaOption: sn.TrailingTriviaOption.ExcludeWhitespace }); + } + function gze(e, t, n, i) { + var s; + const { enclosingNode: o, typeParameters: c, typeElements: _ } = i, u = N.createInterfaceDeclaration( + /*modifiers*/ + void 0, + n, + c, + /*heritageClauses*/ + void 0, + _ + ); + ot(u, (s = _[0]) == null ? void 0 : s.parent), e.insertNodeBefore( + t, + o, + VJ(u), + /*blankLineBetween*/ + !0 + ); + const { firstTypeNode: m, lastTypeNode: g } = _oe(i); + e.replaceNodeRange(t, m, g, N.createTypeReferenceNode(n, c.map((h) => N.createTypeReferenceNode( + h.name, + /*typeArguments*/ + void 0 + ))), { leadingTriviaOption: sn.LeadingTriviaOption.Exclude, trailingTriviaOption: sn.TrailingTriviaOption.ExcludeWhitespace }); + } + function hze(e, t, n, i, s) { + var o; + $T(s.selection).forEach((C) => { + on( + C, + 7168 + /* NoNestedComments */ + ); + }); + const { enclosingNode: c, typeParameters: _ } = s, { firstTypeNode: u, lastTypeNode: m, newTypeNode: g } = _oe(s), h = N.createJSDocTypedefTag( + N.createIdentifier("typedef"), + N.createJSDocTypeExpression(g), + N.createIdentifier(i) + ), S = []; + lr(_, (C) => { + const D = hC(C), w = N.createTypeParameterDeclaration( + /*modifiers*/ + void 0, + C.name + ), A = N.createJSDocTemplateTag( + N.createIdentifier("template"), + D && Ws(D, hv), + [w] + ); + S.push(A); + }); + const T = N.createJSDocComment( + /*comment*/ + void 0, + N.createNodeArray(Wi(S, [h])) + ); + if (Pd(c)) { + const C = c.getStart(n), D = Jh(t.host, (o = t.formatContext) == null ? void 0 : o.options); + e.insertNodeAt(n, c.getStart(n), T, { + suffix: D + D + n.text.slice(E9(n.text, C - 1), C) + }); + } else + e.insertNodeBefore( + n, + c, + T, + /*blankLineBetween*/ + !0 + ); + e.replaceNodeRange(n, u, m, N.createTypeReferenceNode(i, _.map((C) => N.createTypeReferenceNode( + C.name, + /*typeArguments*/ + void 0 + )))); + } + function _oe(e) { + return os(e.selection) ? { + firstTypeNode: e.selection[0], + lastTypeNode: e.selection[e.selection.length - 1], + newTypeNode: L0(e.selection[0].parent) ? N.createUnionTypeNode(e.selection) : N.createIntersectionTypeNode(e.selection) + } : { + firstTypeNode: e.selection, + lastTypeNode: e.selection, + newTypeNode: e.selection + }; + } + function yze(e, t) { + return ur(e, xi) || (t ? ur(e, Pd) : void 0); + } + function vze(e, t) { + return ur(e, (n) => n === t ? "quit" : !!(L0(n.parent) || Ux(n.parent))) ?? e; + } + var wq = "Move to file", foe = us(p.Move_to_file), poe = { + name: "Move to file", + description: foe, + kind: "refactor.move.file" + }; + eh(wq, { + kinds: [poe.kind], + getAvailableActions: function(t, n) { + const i = t.file, s = BA(t); + if (!n) + return He; + if (t.triggerReason === "implicit" && t.endPosition !== void 0) { + const o = ur(Si(i, t.startPosition), fk), c = ur(Si(i, t.endPosition), fk); + if (o && !Ei(o) && c && !Ei(c)) + return He; + } + if (t.preferences.allowTextChangesInNewFiles && s) { + const o = { + start: { line: js(i, s.all[0].getStart(i)).line, offset: js(i, s.all[0].getStart(i)).character }, + end: { line: js(i, _a(s.all).end).line, offset: js(i, _a(s.all).end).character } + }; + return [{ name: wq, description: foe, actions: [{ ...poe, range: o }] }]; + } + return t.preferences.provideRefactorNotApplicableReason ? [{ name: wq, description: foe, actions: [{ ...poe, notApplicableReason: us(p.Selection_is_not_a_valid_statement_or_statements) }] }] : He; + }, + getEditsForAction: function(t, n, i) { + E.assert(n === wq, "Wrong refactor invoked"); + const s = E.checkDefined(BA(t)), { host: o, program: c } = t; + E.assert(i, "No interactive refactor arguments available"); + const _ = i.targetFile; + return Gg(_) || ES(_) ? o.fileExists(_) && c.getSourceFile(_) === void 0 ? nSe(us(p.Cannot_move_statements_to_the_selected_file)) : { edits: sn.ChangeTracker.with(t, (m) => bze(t, t.file, i.targetFile, t.program, s, m, t.host, t.preferences)), renameFilename: void 0, renameLocation: void 0 } : nSe(us(p.Cannot_move_to_file_selected_file_is_invalid)); + } + }); + function nSe(e) { + return { edits: [], renameFilename: void 0, renameLocation: void 0, notApplicableReason: e }; + } + function bze(e, t, n, i, s, o, c, _) { + const u = i.getTypeChecker(), m = !c.fileExists(n), g = m ? J9(n, t.externalModuleIndicator ? 99 : t.commonJsModuleIndicator ? 1 : void 0, i, c) : E.checkDefined(i.getSourceFile(n)), h = Eu.createImportAdder(t, e.program, e.preferences, e.host), S = Eu.createImportAdder(g, e.program, e.preferences, e.host); + doe(t, g, $9(t, s.all, u, m ? void 0 : koe(g, s.all, u)), o, s, i, c, _, S, h), m && moe(i, o, t.fileName, n, Nh(c)); + } + function doe(e, t, n, i, s, o, c, _, u, m) { + const g = o.getTypeChecker(), h = LR(e.statements, nm), S = !tq(t.fileName, o, c, !!e.commonJsModuleIndicator), T = tf(e, _); + hoe(n.oldFileImportsFromTargetFile, t.fileName, m, o), Tze(e, s.all, n.unusedImportsFromOldFile, m), m.writeFixes(i, T), Sze(e, s.ranges, i), xze(i, o, c, e, n.movedSymbols, t.fileName, T), goe(e, n.targetFileImportsFromOldFile, i, S), Eoe(e, n.oldImportsNeededByTargetFile, n.targetFileImportsFromOldFile, g, o, u), !zg(t) && h.length && i.insertStatementsInNewFile(t.fileName, h, e), u.writeFixes(i, T); + const C = Pze(e, s.all, Ki(n.oldFileImportsFromTargetFile.keys()), S); + zg(t) && t.statements.length > 0 ? qze(i, o, C, t, s) : zg(t) ? i.insertNodesAtEndOfFile( + t, + C, + /*blankLineBetween*/ + !1 + ) : i.insertStatementsInNewFile(t.fileName, u.hasFixes() ? [4, ...C] : C, e); + } + function moe(e, t, n, i, s) { + const o = e.getCompilerOptions().configFile; + if (!o) return; + const c = Hs(Ln(n, "..", i)), _ = fC(o.fileName, c, s), u = o.statements[0] && jn(o.statements[0].expression, oa), m = u && Pn(u.properties, (g) => Xc(g) && ea(g.name) && g.name.text === "files"); + m && Ql(m.initializer) && t.insertNodeInListAfter(o, _a(m.initializer.elements), N.createStringLiteral(_), m.initializer.elements); + } + function Sze(e, t, n) { + for (const { first: i, afterLast: s } of t) + n.deleteNodeRangeExcludingEnd(e, i, s); + } + function Tze(e, t, n, i) { + for (const s of e.statements) + as(t, s) || sSe(s, (o) => { + aSe(o, (c) => { + n.has(c.symbol) && i.removeExistingImport(c); + }); + }); + } + function goe(e, t, n, i) { + const s = O6(); + t.forEach((o, c) => { + if (c.declarations) + for (const _ of c.declarations) { + if (!xoe(_)) continue; + const u = Rze(_); + if (!u) continue; + const m = uSe(_); + s(m) && jze(e, m, u, n, i); + } + }); + } + function xze(e, t, n, i, s, o, c) { + const _ = t.getTypeChecker(); + for (const u of t.getSourceFiles()) + if (u !== i) + for (const m of u.statements) + sSe(m, (g) => { + if (_.getSymbolAtLocation(Dze(g)) !== i.symbol) return; + const h = (w) => { + const A = ma(w.parent) ? k9(_, w.parent) : Gl(_.getSymbolAtLocation(w), _); + return !!A && s.has(A); + }; + Nze(u, g, e, h); + const S = Iy(Hn(Xi(i.fileName, t.getCurrentDirectory())), o); + if (cC(!t.useCaseSensitiveFileNames())(S, u.fileName) === 0) return; + const T = Bh.getModuleSpecifier(t.getCompilerOptions(), u, u.fileName, S, wv(t, n)), C = Oze(g, cw(T, c), h); + C && e.insertNodeAfter(u, m, C); + const D = kze(g); + D && Cze(e, u, _, s, T, D, g, c); + }); + } + function kze(e) { + switch (e.kind) { + case 272: + return e.importClause && e.importClause.namedBindings && e.importClause.namedBindings.kind === 274 ? e.importClause.namedBindings.name : void 0; + case 271: + return e.name; + case 260: + return jn(e.name, Me); + default: + return E.assertNever(e, `Unexpected node kind ${e.kind}`); + } + } + function Cze(e, t, n, i, s, o, c, _) { + const u = FA( + s, + 99 + /* ESNext */ + ); + let m = !1; + const g = []; + if (So.Core.eachSymbolReferenceInFile(o, n, t, (h) => { + Tn(h.parent) && (m = m || !!n.resolveName( + u, + h, + -1, + /*excludeGlobals*/ + !0 + ), i.has(n.getSymbolAtLocation(h.parent.name)) && g.push(h)); + }), g.length) { + const h = m ? YS(u, t) : u; + for (const S of g) + e.replaceNode(t, S, N.createIdentifier(h)); + e.insertNodeAfter(t, c, Eze(c, u, s, _)); + } + } + function Eze(e, t, n, i) { + const s = N.createIdentifier(t), o = cw(n, i); + switch (e.kind) { + case 272: + return N.createImportDeclaration( + /*modifiers*/ + void 0, + N.createImportClause( + /*isTypeOnly*/ + !1, + /*name*/ + void 0, + N.createNamespaceImport(s) + ), + o, + /*attributes*/ + void 0 + ); + case 271: + return N.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + s, + N.createExternalModuleReference(o) + ); + case 260: + return N.createVariableDeclaration( + s, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + iSe(o) + ); + default: + return E.assertNever(e, `Unexpected node kind ${e.kind}`); + } + } + function iSe(e) { + return N.createCallExpression( + N.createIdentifier("require"), + /*typeArguments*/ + void 0, + [e] + ); + } + function Dze(e) { + return e.kind === 272 ? e.moduleSpecifier : e.kind === 271 ? e.moduleReference.expression : e.initializer.arguments[0]; + } + function sSe(e, t) { + if (zo(e)) + ea(e.moduleSpecifier) && t(e); + else if (_l(e)) + Mh(e.moduleReference) && Na(e.moduleReference.expression) && t(e); + else if (pc(e)) + for (const n of e.declarationList.declarations) + n.initializer && __( + n.initializer, + /*requireStringLiteralLikeArgument*/ + !0 + ) && t(n); + } + function aSe(e, t) { + var n, i, s, o, c; + if (e.kind === 272) { + if ((n = e.importClause) != null && n.name && t(e.importClause), ((s = (i = e.importClause) == null ? void 0 : i.namedBindings) == null ? void 0 : s.kind) === 274 && t(e.importClause.namedBindings), ((c = (o = e.importClause) == null ? void 0 : o.namedBindings) == null ? void 0 : c.kind) === 275) + for (const _ of e.importClause.namedBindings.elements) + t(_); + } else if (e.kind === 271) + t(e); + else if (e.kind === 260) { + if (e.name.kind === 80) + t(e); + else if (e.name.kind === 206) + for (const _ of e.name.elements) + Me(_.name) && t(_); + } + } + function hoe(e, t, n, i) { + for (const [s, o] of e) { + const c = L9(s, pa(i.getCompilerOptions())), _ = s.name === "default" && s.parent ? 1 : 0; + n.addImportForNonExistentExport(c, t, _, s.flags, o); + } + } + function wze(e, t, n, i = 2) { + return N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList([N.createVariableDeclaration( + e, + /*exclamationToken*/ + void 0, + t, + n + )], i) + ); + } + function Pze(e, t, n, i) { + return na(t, (s) => { + if (cSe(s) && !oSe(e, s, i) && Toe(s, (o) => { + var c; + return n.includes(E.checkDefined((c = jn(o, bd)) == null ? void 0 : c.symbol)); + })) { + const o = Aze(Wa(s), i); + if (o) return o; + } + return Wa(s); + }); + } + function oSe(e, t, n, i) { + var s; + return n ? !El(t) && $n( + t, + 32 + /* Export */ + ) || !!(i && e.symbol && ((s = e.symbol.exports) != null && s.has(i.escapedText))) : !!e.symbol && !!e.symbol.exports && yoe(t).some((o) => e.symbol.exports.has(Zo(o))); + } + function Nze(e, t, n, i) { + if (t.kind === 272 && t.importClause) { + const { name: s, namedBindings: o } = t.importClause; + if ((!s || i(s)) && (!o || o.kind === 275 && o.elements.length !== 0 && o.elements.every((c) => i(c.name)))) + return n.delete(e, t); + } + aSe(t, (s) => { + s.name && Me(s.name) && i(s.name) && n.delete(e, s); + }); + } + function cSe(e) { + return E.assert(Ei(e.parent), "Node parent should be a SourceFile"), pSe(e) || pc(e); + } + function Aze(e, t) { + return t ? [Ize(e)] : Fze(e); + } + function Ize(e) { + const t = Jp(e) ? Wi([N.createModifier( + 95 + /* ExportKeyword */ + )], Tb(e)) : void 0; + switch (e.kind) { + case 262: + return N.updateFunctionDeclaration(e, t, e.asteriskToken, e.name, e.typeParameters, e.parameters, e.type, e.body); + case 263: + const n = n2(e) ? Oy(e) : void 0; + return N.updateClassDeclaration(e, Wi(n, t), e.name, e.typeParameters, e.heritageClauses, e.members); + case 243: + return N.updateVariableStatement(e, t, e.declarationList); + case 267: + return N.updateModuleDeclaration(e, t, e.name, e.body); + case 266: + return N.updateEnumDeclaration(e, t, e.name, e.members); + case 265: + return N.updateTypeAliasDeclaration(e, t, e.name, e.typeParameters, e.type); + case 264: + return N.updateInterfaceDeclaration(e, t, e.name, e.typeParameters, e.heritageClauses, e.members); + case 271: + return N.updateImportEqualsDeclaration(e, t, e.isTypeOnly, e.name, e.moduleReference); + case 244: + return E.fail(); + default: + return E.assertNever(e, `Unexpected declaration kind ${e.kind}`); + } + } + function Fze(e) { + return [e, ...yoe(e).map(lSe)]; + } + function lSe(e) { + return N.createExpressionStatement( + N.createBinaryExpression( + N.createPropertyAccessExpression(N.createIdentifier("exports"), N.createIdentifier(e)), + 64, + N.createIdentifier(e) + ) + ); + } + function yoe(e) { + switch (e.kind) { + case 262: + case 263: + return [e.name.text]; + // TODO: GH#18217 + case 243: + return Li(e.declarationList.declarations, (t) => Me(t.name) ? t.name.text : void 0); + case 267: + case 266: + case 265: + case 264: + case 271: + return He; + case 244: + return E.fail("Can't export an ExpressionStatement"); + default: + return E.assertNever(e, `Unexpected decl kind ${e.kind}`); + } + } + function Oze(e, t, n) { + switch (e.kind) { + case 272: { + const i = e.importClause; + if (!i) return; + const s = i.name && n(i.name) ? i.name : void 0, o = i.namedBindings && Lze(i.namedBindings, n); + return s || o ? N.createImportDeclaration( + /*modifiers*/ + void 0, + N.createImportClause(i.isTypeOnly, s, o), + Wa(t), + /*attributes*/ + void 0 + ) : void 0; + } + case 271: + return n(e.name) ? e : void 0; + case 260: { + const i = Mze(e.name, n); + return i ? wze(i, e.type, iSe(t), e.parent.flags) : void 0; + } + default: + return E.assertNever(e, `Unexpected import kind ${e.kind}`); + } + } + function Lze(e, t) { + if (e.kind === 274) + return t(e.name) ? e : void 0; + { + const n = e.elements.filter((i) => t(i.name)); + return n.length ? N.createNamedImports(n) : void 0; + } + } + function Mze(e, t) { + switch (e.kind) { + case 80: + return t(e) ? e : void 0; + case 207: + return e; + case 206: { + const n = e.elements.filter((i) => i.propertyName || !Me(i.name) || t(i.name)); + return n.length ? N.createObjectBindingPattern(n) : void 0; + } + } + } + function Rze(e) { + return El(e) ? jn(e.expression.left.name, Me) : jn(e.name, Me); + } + function uSe(e) { + switch (e.kind) { + case 260: + return e.parent.parent; + case 208: + return uSe( + Ws(e.parent.parent, (t) => Kn(t) || ma(t)) + ); + default: + return e; + } + } + function jze(e, t, n, i, s) { + if (!oSe(e, t, s, n)) + if (s) + El(t) || i.insertExportModifier(e, t); + else { + const o = yoe(t); + o.length !== 0 && i.insertNodesAfter(e, t, o.map(lSe)); + } + } + function voe(e, t, n, i) { + const s = t.getTypeChecker(); + if (i) { + const o = $9(e, i.all, s), c = Hn(e.fileName), _ = nD(e.fileName); + return Ln( + // new file is always placed in the same directory as the old file + c, + // ensures the filename computed below isn't already taken + Wze( + // infers a name for the new file from the symbols being moved + Uze(o.oldFileImportsFromTargetFile, o.movedSymbols), + _, + c, + n + ) + ) + _; + } + return ""; + } + function Bze(e) { + const { file: t } = e, n = y9(_k(e)), { statements: i } = t; + let s = ec(i, (m) => m.end > n.pos); + if (s === -1) return; + const o = i[s], c = dSe(t, o); + c && (s = c.start); + let _ = ec(i, (m) => m.end >= n.end, s); + _ !== -1 && n.end <= i[_].getStart() && _--; + const u = dSe(t, i[_]); + return u && (_ = u.end), { + toMove: i.slice(s, _ === -1 ? i.length : _ + 1), + afterLast: _ === -1 ? void 0 : i[_ + 1] + }; + } + function BA(e) { + const t = Bze(e); + if (t === void 0) return; + const n = [], i = [], { toMove: s, afterLast: o } = t; + return yR(s, Jze, (c, _) => { + for (let u = c; u < _; u++) n.push(s[u]); + i.push({ first: s[c], afterLast: o }); + }), n.length === 0 ? void 0 : { all: n, ranges: i }; + } + function boe(e) { + return Pn(e, (t) => !!(t.transformFlags & 2)); + } + function Jze(e) { + return !zze(e) && !nm(e); + } + function zze(e) { + switch (e.kind) { + case 272: + return !0; + case 271: + return !$n( + e, + 32 + /* Export */ + ); + case 243: + return e.declarationList.declarations.every((t) => !!t.initializer && __( + t.initializer, + /*requireStringLiteralLikeArgument*/ + !0 + )); + default: + return !1; + } + } + function $9(e, t, n, i = /* @__PURE__ */ new Set(), s) { + var o; + const c = /* @__PURE__ */ new Set(), _ = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), m = S(boe(t)); + m && _.set(m, [!1, jn((o = m.declarations) == null ? void 0 : o[0], (T) => ju(T) || id(T) || Yg(T) || _l(T) || ma(T) || Kn(T))]); + for (const T of t) + Toe(T, (C) => { + c.add(E.checkDefined(El(C) ? n.getSymbolAtLocation(C.expression.left) : C.symbol, "Need a symbol here")); + }); + const g = /* @__PURE__ */ new Set(); + for (const T of t) + Soe(T, n, s, (C, D) => { + if (!C.declarations) + return; + if (i.has(Gl(C, n))) { + g.add(C); + return; + } + const w = Pn(C.declarations, Pq); + if (w) { + const A = _.get(C); + _.set(C, [ + (A === void 0 || A) && D, + jn(w, (O) => ju(O) || id(O) || Yg(O) || _l(O) || ma(O) || Kn(O)) + ]); + } else !c.has(C) && Ri(C.declarations, (A) => xoe(A) && Vze(A) === e) && u.set(C, D); + }); + for (const T of _.keys()) + g.add(T); + const h = /* @__PURE__ */ new Map(); + for (const T of e.statements) + as(t, T) || (m && T.transformFlags & 2 && g.delete(m), Soe(T, n, s, (C, D) => { + c.has(C) && h.set(C, D), g.delete(C); + })); + return { movedSymbols: c, targetFileImportsFromOldFile: u, oldFileImportsFromTargetFile: h, oldImportsNeededByTargetFile: _, unusedImportsFromOldFile: g }; + function S(T) { + if (T === void 0) + return; + const C = n.getJsxNamespace(T), D = n.resolveName( + C, + T, + 1920, + /*excludeGlobals*/ + !0 + ); + return D && at(D.declarations, Pq) ? D : void 0; + } + } + function Wze(e, t, n, i) { + let s = e; + for (let o = 1; ; o++) { + const c = Ln(n, s + t); + if (!i.fileExists(c)) return s; + s = `${e}.${o}`; + } + } + function Uze(e, t) { + return jg(e, PV) || jg(t, PV) || "newFile"; + } + function Soe(e, t, n, i) { + e.forEachChild(function s(o) { + if (Me(o) && !tg(o)) { + if (n && !p_(n, o)) + return; + const c = t.getSymbolAtLocation(o); + c && i(c, cv(o)); + } else + o.forEachChild(s); + }); + } + function Toe(e, t) { + switch (e.kind) { + case 262: + case 263: + case 267: + case 266: + case 265: + case 264: + case 271: + return t(e); + case 243: + return Dc(e.declarationList.declarations, (n) => fSe(n.name, t)); + case 244: { + const { expression: n } = e; + return fn(n) && Sc(n) === 1 ? t(e) : void 0; + } + } + } + function Pq(e) { + switch (e.kind) { + case 271: + case 276: + case 273: + case 274: + return !0; + case 260: + return _Se(e); + case 208: + return Kn(e.parent.parent) && _Se(e.parent.parent); + default: + return !1; + } + } + function _Se(e) { + return Ei(e.parent.parent.parent) && !!e.initializer && __( + e.initializer, + /*requireStringLiteralLikeArgument*/ + !0 + ); + } + function xoe(e) { + return pSe(e) && Ei(e.parent) || Kn(e) && Ei(e.parent.parent.parent); + } + function Vze(e) { + return Kn(e) ? e.parent.parent.parent : e.parent; + } + function fSe(e, t) { + switch (e.kind) { + case 80: + return t(Ws(e.parent, (n) => Kn(n) || ma(n))); + case 207: + case 206: + return Dc(e.elements, (n) => ul(n) ? void 0 : fSe(n.name, t)); + default: + return E.assertNever(e, `Unexpected name kind ${e.kind}`); + } + } + function pSe(e) { + switch (e.kind) { + case 262: + case 263: + case 267: + case 266: + case 265: + case 264: + case 271: + return !0; + default: + return !1; + } + } + function qze(e, t, n, i, s) { + var o; + const c = /* @__PURE__ */ new Set(), _ = (o = i.symbol) == null ? void 0 : o.exports; + if (_) { + const m = t.getTypeChecker(), g = /* @__PURE__ */ new Map(); + for (const h of s.all) + cSe(h) && $n( + h, + 32 + /* Export */ + ) && Toe(h, (S) => { + var T; + const C = bd(S) ? (T = _.get(S.symbol.escapedName)) == null ? void 0 : T.declarations : void 0, D = Dc(C, (w) => wc(w) ? w : Tu(w) ? jn(w.parent.parent, wc) : void 0); + D && D.moduleSpecifier && g.set(D, (g.get(D) || /* @__PURE__ */ new Set()).add(S)); + }); + for (const [h, S] of Ki(g)) + if (h.exportClause && up(h.exportClause) && Ir(h.exportClause.elements)) { + const T = h.exportClause.elements, C = kn(T, (D) => Pn(Gl(D.symbol, m).declarations, (w) => xoe(w) && S.has(w)) === void 0); + if (Ir(C) === 0) { + e.deleteNode(i, h), c.add(h); + continue; + } + Ir(C) < Ir(T) && e.replaceNode(i, h, N.updateExportDeclaration(h, h.modifiers, h.isTypeOnly, N.updateNamedExports(h.exportClause, N.createNodeArray(C, T.hasTrailingComma)), h.moduleSpecifier, h.attributes)); + } + } + const u = gb(i.statements, (m) => wc(m) && !!m.moduleSpecifier && !c.has(m)); + u ? e.insertNodesBefore( + i, + u, + n, + /*blankLineBetween*/ + !0 + ) : e.insertNodesAfter(i, i.statements[i.statements.length - 1], n); + } + function dSe(e, t) { + if (Ka(t)) { + const n = t.symbol.declarations; + if (n === void 0 || Ir(n) <= 1 || !as(n, t)) + return; + const i = n[0], s = n[Ir(n) - 1], o = Li(n, (u) => Cr(u) === e && xi(u) ? u : void 0), c = ec(e.statements, (u) => u.end >= s.end), _ = ec(e.statements, (u) => u.end >= i.end); + return { toMove: o, start: _, end: c }; + } + } + function koe(e, t, n) { + const i = /* @__PURE__ */ new Set(); + for (const s of e.imports) { + const o = O4(s); + if (zo(o) && o.importClause && o.importClause.namedBindings && mm(o.importClause.namedBindings)) + for (const c of o.importClause.namedBindings.elements) { + const _ = n.getSymbolAtLocation(c.propertyName || c.name); + _ && i.add(Gl(_, n)); + } + if (_3(o.parent) && Nf(o.parent.name)) + for (const c of o.parent.name.elements) { + const _ = n.getSymbolAtLocation(c.propertyName || c.name); + _ && i.add(Gl(_, n)); + } + } + for (const s of t) + Soe( + s, + n, + /*enclosingRange*/ + void 0, + (o) => { + const c = Gl(o, n); + c.valueDeclaration && Cr(c.valueDeclaration).path === e.path && i.add(c); + } + ); + return i; + } + function zh(e) { + return e.error !== void 0; + } + function Iv(e, t) { + return t ? e.substr(0, t.length) === t : !0; + } + function Coe(e, t, n, i) { + return Tn(e) && !Zn(t) && !n.resolveName( + e.name.text, + e, + 111551, + /*excludeGlobals*/ + !1 + ) && !Ni(e.name) && !aS(e.name) ? e.name.text : YS(Zn(t) ? "newProperty" : "newLocal", i); + } + function Eoe(e, t, n, i, s, o) { + t.forEach(([c, _], u) => { + var m; + const g = Gl(u, i); + i.isUnknownSymbol(g) ? o.addVerbatimImport(E.checkDefined(_ ?? ur((m = u.declarations) == null ? void 0 : m[0], JZ))) : g.parent === void 0 ? (E.assert(_ !== void 0, "expected module symbol to have a declaration"), o.addImportForModuleSymbol(u, c, _)) : o.addImportFromExportedSymbol(g, c, _); + }), hoe(n, e.fileName, o, s); + } + var X9 = "Inline variable", Doe = us(p.Inline_variable), woe = { + name: X9, + description: Doe, + kind: "refactor.inline.variable" + }; + eh(X9, { + kinds: [woe.kind], + getAvailableActions(e) { + const { + file: t, + program: n, + preferences: i, + startPosition: s, + triggerReason: o + } = e, c = mSe(t, s, o === "invoked", n); + return c ? dk.isRefactorErrorInfo(c) ? i.provideRefactorNotApplicableReason ? [{ + name: X9, + description: Doe, + actions: [{ + ...woe, + notApplicableReason: c.error + }] + }] : He : [{ + name: X9, + description: Doe, + actions: [woe] + }] : He; + }, + getEditsForAction(e, t) { + E.assert(t === X9, "Unexpected refactor invoked"); + const { file: n, program: i, startPosition: s } = e, o = mSe( + n, + s, + /*tryWithReferenceToken*/ + !0, + i + ); + if (!o || dk.isRefactorErrorInfo(o)) + return; + const { references: c, declaration: _, replacement: u } = o; + return { edits: sn.ChangeTracker.with(e, (g) => { + for (const h of c) { + const S = ea(u) && Me(h) && rd(h.parent); + S && r6(S) && !fv(S.parent.parent) ? Gze(g, n, S, u) : g.replaceNode(n, h, Hze(h, u)); + } + g.delete(n, _); + }) }; + } + }); + function mSe(e, t, n, i) { + var s, o; + const c = i.getTypeChecker(), _ = h_(e, t), u = _.parent; + if (Me(_)) { + if (U3(u) && w4(u) && Me(u.name)) { + if (((s = c.getMergedSymbol(u.symbol).declarations) == null ? void 0 : s.length) !== 1) + return { error: us(p.Variables_with_multiple_declarations_cannot_be_inlined) }; + if (gSe(u)) + return; + const m = hSe(u, c, e); + return m && { references: m, declaration: u, replacement: u.initializer }; + } + if (n) { + let m = c.resolveName( + _.text, + _, + 111551, + /*excludeGlobals*/ + !1 + ); + if (m = m && c.getMergedSymbol(m), ((o = m?.declarations) == null ? void 0 : o.length) !== 1) + return { error: us(p.Variables_with_multiple_declarations_cannot_be_inlined) }; + const g = m.declarations[0]; + if (!U3(g) || !w4(g) || !Me(g.name) || gSe(g)) + return; + const h = hSe(g, c, e); + return h && { references: h, declaration: g, replacement: g.initializer }; + } + return { error: us(p.Could_not_find_variable_to_inline) }; + } + } + function gSe(e) { + const t = Ws(e.parent.parent, pc); + return at(t.modifiers, jx); + } + function hSe(e, t, n) { + const i = [], s = So.Core.eachSymbolReferenceInFile(e.name, t, n, (o) => { + if (So.isWriteAccessForReference(o) && !_u(o.parent) || Tu(o.parent) || Io(o.parent) || $b(o.parent) || PP(e, o.pos)) + return !0; + i.push(o); + }); + return i.length === 0 || s ? void 0 : i; + } + function Hze(e, t) { + t = Wa(t); + const { parent: n } = e; + return ct(n) && (W4(t) < W4(n) || D9(n)) || vs(t) && (Cb(n) || Tn(n)) || Tn(n) && (d_(t) || oa(t)) ? N.createParenthesizedExpression(t) : Me(e) && _u(n) ? N.createPropertyAssignment(e, t) : t; + } + function Gze(e, t, n, i) { + const s = n.parent, o = s.templateSpans.indexOf(n), c = o === 0 ? s.head : s.templateSpans[o - 1]; + e.replaceRangeWithText( + t, + { + pos: c.getEnd() - 2, + end: n.literal.getStart() + 1 + }, + i.text.replace(/\\/g, "\\\\").replace(/`/g, "\\`") + ); + } + var Q9 = "Move to a new file", Poe = us(p.Move_to_a_new_file), Noe = { + name: Q9, + description: Poe, + kind: "refactor.move.newFile" + }; + eh(Q9, { + kinds: [Noe.kind], + getAvailableActions: function(t) { + const n = BA(t), i = t.file; + if (t.triggerReason === "implicit" && t.endPosition !== void 0) { + const s = ur(Si(i, t.startPosition), fk), o = ur(Si(i, t.endPosition), fk); + if (s && !Ei(s) && o && !Ei(o)) + return He; + } + if (t.preferences.allowTextChangesInNewFiles && n) { + const s = t.file, o = { + start: { line: js(s, n.all[0].getStart(s)).line, offset: js(s, n.all[0].getStart(s)).character }, + end: { line: js(s, _a(n.all).end).line, offset: js(s, _a(n.all).end).character } + }; + return [{ name: Q9, description: Poe, actions: [{ ...Noe, range: o }] }]; + } + return t.preferences.provideRefactorNotApplicableReason ? [{ name: Q9, description: Poe, actions: [{ ...Noe, notApplicableReason: us(p.Selection_is_not_a_valid_statement_or_statements) }] }] : He; + }, + getEditsForAction: function(t, n) { + E.assert(n === Q9, "Wrong refactor invoked"); + const i = E.checkDefined(BA(t)); + return { edits: sn.ChangeTracker.with(t, (o) => $ze(t.file, t.program, i, o, t.host, t, t.preferences)), renameFilename: void 0, renameLocation: void 0 }; + } + }); + function $ze(e, t, n, i, s, o, c) { + const _ = t.getTypeChecker(), u = $9(e, n.all, _), m = voe(e, t, s, n), g = J9(m, e.externalModuleIndicator ? 99 : e.commonJsModuleIndicator ? 1 : void 0, t, s), h = Eu.createImportAdder(e, o.program, o.preferences, o.host), S = Eu.createImportAdder(g, o.program, o.preferences, o.host); + doe(e, g, u, i, n, t, s, c, S, h), moe(t, i, e.fileName, m, Nh(s)); + } + var Xze = {}, Aoe = "Convert overload list to single signature", ySe = us(p.Convert_overload_list_to_single_signature), vSe = { + name: Aoe, + description: ySe, + kind: "refactor.rewrite.function.overloadList" + }; + eh(Aoe, { + kinds: [vSe.kind], + getEditsForAction: Yze, + getAvailableActions: Qze + }); + function Qze(e) { + const { file: t, startPosition: n, program: i } = e; + return SSe(t, n, i) ? [{ + name: Aoe, + description: ySe, + actions: [vSe] + }] : He; + } + function Yze(e) { + const { file: t, startPosition: n, program: i } = e, s = SSe(t, n, i); + if (!s) return; + const o = i.getTypeChecker(), c = s[s.length - 1]; + let _ = c; + switch (c.kind) { + case 173: { + _ = N.updateMethodSignature( + c, + c.modifiers, + c.name, + c.questionToken, + c.typeParameters, + m(s), + c.type + ); + break; + } + case 174: { + _ = N.updateMethodDeclaration( + c, + c.modifiers, + c.asteriskToken, + c.name, + c.questionToken, + c.typeParameters, + m(s), + c.type, + c.body + ); + break; + } + case 179: { + _ = N.updateCallSignature( + c, + c.typeParameters, + m(s), + c.type + ); + break; + } + case 176: { + _ = N.updateConstructorDeclaration( + c, + c.modifiers, + m(s), + c.body + ); + break; + } + case 180: { + _ = N.updateConstructSignature( + c, + c.typeParameters, + m(s), + c.type + ); + break; + } + case 262: { + _ = N.updateFunctionDeclaration( + c, + c.modifiers, + c.asteriskToken, + c.name, + c.typeParameters, + m(s), + c.type, + c.body + ); + break; + } + default: + return E.failBadSyntaxKind(c, "Unhandled signature kind in overload list conversion refactoring"); + } + if (_ === c) + return; + return { renameFilename: void 0, renameLocation: void 0, edits: sn.ChangeTracker.with(e, (S) => { + S.replaceNodeRange(t, s[0], s[s.length - 1], _); + }) }; + function m(S) { + const T = S[S.length - 1]; + return Ka(T) && T.body && (S = S.slice(0, S.length - 1)), N.createNodeArray([ + N.createParameterDeclaration( + /*modifiers*/ + void 0, + N.createToken( + 26 + /* DotDotDotToken */ + ), + "args", + /*questionToken*/ + void 0, + N.createUnionTypeNode(gr(S, g)) + ) + ]); + } + function g(S) { + const T = gr(S.parameters, h); + return on( + N.createTupleTypeNode(T), + at(T, (C) => !!Ir(YC(C))) ? 0 : 1 + /* SingleLine */ + ); + } + function h(S) { + E.assert(Me(S.name)); + const T = ot( + N.createNamedTupleMember( + S.dotDotDotToken, + S.name, + S.questionToken, + S.type || N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ) + ), + S + ), C = S.symbol && S.symbol.getDocumentationComment(o); + if (C) { + const D = WA(C); + D.length && uv(T, [{ + text: `* +${D.split(` +`).map((w) => ` * ${w}`).join(` +`)} + `, + kind: 3, + pos: -1, + end: -1, + hasTrailingNewLine: !0, + hasLeadingNewline: !0 + }]); + } + return T; + } + } + function bSe(e) { + switch (e.kind) { + case 173: + case 174: + case 179: + case 176: + case 180: + case 262: + return !0; + } + return !1; + } + function SSe(e, t, n) { + const i = Si(e, t), s = ur(i, bSe); + if (!s || Ka(s) && s.body && I6(s.body, t)) + return; + const o = n.getTypeChecker(), c = s.symbol; + if (!c) + return; + const _ = c.declarations; + if (Ir(_) <= 1 || !Ri(_, (S) => Cr(S) === e) || !bSe(_[0])) + return; + const u = _[0].kind; + if (!Ri(_, (S) => S.kind === u)) + return; + const m = _; + if (at(m, (S) => !!S.typeParameters || at(S.parameters, (T) => !!T.modifiers || !Me(T.name)))) + return; + const g = Li(m, (S) => o.getSignatureFromDeclaration(S)); + if (Ir(g) !== Ir(_)) + return; + const h = o.getReturnTypeOfSignature(g[0]); + if (Ri(g, (S) => o.getReturnTypeOfSignature(S) === h)) + return m; + } + var Ioe = "Add or remove braces in an arrow function", TSe = us(p.Add_or_remove_braces_in_an_arrow_function), Nq = { + name: "Add braces to arrow function", + description: us(p.Add_braces_to_arrow_function), + kind: "refactor.rewrite.arrow.braces.add" + }, Y9 = { + name: "Remove braces from arrow function", + description: us(p.Remove_braces_from_arrow_function), + kind: "refactor.rewrite.arrow.braces.remove" + }; + eh(Ioe, { + kinds: [Y9.kind], + getEditsForAction: Kze, + getAvailableActions: Zze + }); + function Zze(e) { + const { file: t, startPosition: n, triggerReason: i } = e, s = xSe(t, n, i === "invoked"); + return s ? zh(s) ? e.preferences.provideRefactorNotApplicableReason ? [{ + name: Ioe, + description: TSe, + actions: [ + { ...Nq, notApplicableReason: s.error }, + { ...Y9, notApplicableReason: s.error } + ] + }] : He : [{ + name: Ioe, + description: TSe, + actions: [ + s.addBraces ? Nq : Y9 + ] + }] : He; + } + function Kze(e, t) { + const { file: n, startPosition: i } = e, s = xSe(n, i); + E.assert(s && !zh(s), "Expected applicable refactor info"); + const { expression: o, returnStatement: c, func: _ } = s; + let u; + if (t === Nq.name) { + const g = N.createReturnStatement(o); + u = N.createBlock( + [g], + /*multiLine*/ + !0 + ), j6( + o, + g, + n, + 3, + /*hasTrailingNewLine*/ + !0 + ); + } else if (t === Y9.name && c) { + const g = o || N.createVoidZero(); + u = D9(g) ? N.createParenthesizedExpression(g) : g, PA( + c, + u, + n, + 3, + /*hasTrailingNewLine*/ + !1 + ), j6( + c, + u, + n, + 3, + /*hasTrailingNewLine*/ + !1 + ), fw( + c, + u, + n, + 3, + /*hasTrailingNewLine*/ + !1 + ); + } else + E.fail("invalid action"); + return { renameFilename: void 0, renameLocation: void 0, edits: sn.ChangeTracker.with(e, (g) => { + g.replaceNode(n, _.body, u); + }) }; + } + function xSe(e, t, n = !0, i) { + const s = Si(e, t), o = ff(s); + if (!o) + return { + error: us(p.Could_not_find_a_containing_arrow_function) + }; + if (!bo(o)) + return { + error: us(p.Containing_function_is_not_an_arrow_function) + }; + if (!(!p_(o, s) || p_(o.body, s) && !n)) { + if (Iv(Nq.kind, i) && ct(o.body)) + return { func: o, addBraces: !0, expression: o.body }; + if (Iv(Y9.kind, i) && ks(o.body) && o.body.statements.length === 1) { + const c = ya(o.body.statements); + if (Rp(c)) { + const _ = c.expression && oa(qC( + c.expression, + /*stopAtCallExpressions*/ + !1 + )) ? N.createParenthesizedExpression(c.expression) : c.expression; + return { func: o, addBraces: !1, expression: _, returnStatement: c }; + } + } + } + } + var eWe = {}, kSe = "Convert arrow function or function expression", tWe = us(p.Convert_arrow_function_or_function_expression), Z9 = { + name: "Convert to anonymous function", + description: us(p.Convert_to_anonymous_function), + kind: "refactor.rewrite.function.anonymous" + }, K9 = { + name: "Convert to named function", + description: us(p.Convert_to_named_function), + kind: "refactor.rewrite.function.named" + }, eL = { + name: "Convert to arrow function", + description: us(p.Convert_to_arrow_function), + kind: "refactor.rewrite.function.arrow" + }; + eh(kSe, { + kinds: [ + Z9.kind, + K9.kind, + eL.kind + ], + getEditsForAction: nWe, + getAvailableActions: rWe + }); + function rWe(e) { + const { file: t, startPosition: n, program: i, kind: s } = e, o = ESe(t, n, i); + if (!o) return He; + const { selectedVariableDeclaration: c, func: _ } = o, u = [], m = []; + if (Iv(K9.kind, s)) { + const g = c || bo(_) && Kn(_.parent) ? void 0 : us(p.Could_not_convert_to_named_function); + g ? m.push({ ...K9, notApplicableReason: g }) : u.push(K9); + } + if (Iv(Z9.kind, s)) { + const g = !c && bo(_) ? void 0 : us(p.Could_not_convert_to_anonymous_function); + g ? m.push({ ...Z9, notApplicableReason: g }) : u.push(Z9); + } + if (Iv(eL.kind, s)) { + const g = po(_) ? void 0 : us(p.Could_not_convert_to_arrow_function); + g ? m.push({ ...eL, notApplicableReason: g }) : u.push(eL); + } + return [{ + name: kSe, + description: tWe, + actions: u.length === 0 && e.preferences.provideRefactorNotApplicableReason ? m : u + }]; + } + function nWe(e, t) { + const { file: n, startPosition: i, program: s } = e, o = ESe(n, i, s); + if (!o) return; + const { func: c } = o, _ = []; + switch (t) { + case Z9.name: + _.push(...oWe(e, c)); + break; + case K9.name: + const u = aWe(c); + if (!u) return; + _.push(...cWe(e, c, u)); + break; + case eL.name: + if (!po(c)) return; + _.push(...lWe(e, c)); + break; + default: + return E.fail("invalid action"); + } + return { renameFilename: void 0, renameLocation: void 0, edits: _ }; + } + function CSe(e) { + let t = !1; + return e.forEachChild(function n(i) { + if (A6(i)) { + t = !0; + return; + } + !Zn(i) && !Tc(i) && !po(i) && ms(i, n); + }), t; + } + function ESe(e, t, n) { + const i = Si(e, t), s = n.getTypeChecker(), o = sWe(e, s, i.parent); + if (o && !CSe(o.body) && !s.containsArgumentsReference(o)) + return { selectedVariableDeclaration: !0, func: o }; + const c = ff(i); + if (c && (po(c) || bo(c)) && !p_(c.body, i) && !CSe(c.body) && !s.containsArgumentsReference(c)) + return po(c) && wSe(e, s, c) ? void 0 : { selectedVariableDeclaration: !1, func: c }; + } + function iWe(e) { + return Kn(e) || Il(e) && e.declarations.length === 1; + } + function sWe(e, t, n) { + if (!iWe(n)) + return; + const s = (Kn(n) ? n : ya(n.declarations)).initializer; + if (s && (bo(s) || po(s) && !wSe(e, t, s))) + return s; + } + function DSe(e) { + if (ct(e)) { + const t = N.createReturnStatement(e), n = e.getSourceFile(); + return ot(t, e), nf(t), PA( + e, + t, + n, + /*commentKind*/ + void 0, + /*hasTrailingNewLine*/ + !0 + ), N.createBlock( + [t], + /*multiLine*/ + !0 + ); + } else + return e; + } + function aWe(e) { + const t = e.parent; + if (!Kn(t) || !w4(t)) return; + const n = t.parent, i = n.parent; + if (!(!Il(n) || !pc(i) || !Me(t.name))) + return { variableDeclaration: t, variableDeclarationList: n, statement: i, name: t.name }; + } + function oWe(e, t) { + const { file: n } = e, i = DSe(t.body), s = N.createFunctionExpression( + t.modifiers, + t.asteriskToken, + /*name*/ + void 0, + t.typeParameters, + t.parameters, + t.type, + i + ); + return sn.ChangeTracker.with(e, (o) => o.replaceNode(n, t, s)); + } + function cWe(e, t, n) { + const { file: i } = e, s = DSe(t.body), { variableDeclaration: o, variableDeclarationList: c, statement: _, name: u } = n; + WV(_); + const m = Q1(o) & 32 | Mu(t), g = N.createModifiersFromModifierFlags(m), h = N.createFunctionDeclaration(Ir(g) ? g : void 0, t.asteriskToken, u, t.typeParameters, t.parameters, t.type, s); + return c.declarations.length === 1 ? sn.ChangeTracker.with(e, (S) => S.replaceNode(i, _, h)) : sn.ChangeTracker.with(e, (S) => { + S.delete(i, o), S.insertNodeAfter(i, _, h); + }); + } + function lWe(e, t) { + const { file: n } = e, s = t.body.statements[0]; + let o; + uWe(t.body, s) ? (o = s.expression, nf(o), QS(s, o)) : o = t.body; + const c = N.createArrowFunction(t.modifiers, t.typeParameters, t.parameters, t.type, N.createToken( + 39 + /* EqualsGreaterThanToken */ + ), o); + return sn.ChangeTracker.with(e, (_) => _.replaceNode(n, t, c)); + } + function uWe(e, t) { + return e.statements.length === 1 && Rp(t) && !!t.expression; + } + function wSe(e, t, n) { + return !!n.name && So.Core.isSymbolReferencedInFile(n.name, t, e); + } + var _We = {}, Aq = "Convert parameters to destructured object", fWe = 1, PSe = us(p.Convert_parameters_to_destructured_object), NSe = { + name: Aq, + description: PSe, + kind: "refactor.rewrite.parameters.toDestructured" + }; + eh(Aq, { + kinds: [NSe.kind], + getEditsForAction: dWe, + getAvailableActions: pWe + }); + function pWe(e) { + const { file: t, startPosition: n } = e; + return Gu(t) || !FSe(t, n, e.program.getTypeChecker()) ? He : [{ + name: Aq, + description: PSe, + actions: [NSe] + }]; + } + function dWe(e, t) { + E.assert(t === Aq, "Unexpected action name"); + const { file: n, startPosition: i, program: s, cancellationToken: o, host: c } = e, _ = FSe(n, i, s.getTypeChecker()); + if (!_ || !o) return; + const u = gWe(_, s, o); + return u.valid ? { renameFilename: void 0, renameLocation: void 0, edits: sn.ChangeTracker.with(e, (g) => mWe(n, s, c, g, _, u)) } : { edits: [] }; + } + function mWe(e, t, n, i, s, o) { + const c = o.signature, _ = gr(RSe(s, t, n), (g) => Wa(g)); + if (c) { + const g = gr(RSe(c, t, n), (h) => Wa(h)); + m(c, g); + } + m(s, _); + const u = GE( + o.functionCalls, + /*comparer*/ + (g, h) => uo(g.pos, h.pos) + ); + for (const g of u) + if (g.arguments && g.arguments.length) { + const h = Wa( + EWe(s, g.arguments), + /*includeTrivia*/ + !0 + ); + i.replaceNodeRange( + Cr(g), + ya(g.arguments), + _a(g.arguments), + h, + { leadingTriviaOption: sn.LeadingTriviaOption.IncludeAll, trailingTriviaOption: sn.TrailingTriviaOption.Include } + ); + } + function m(g, h) { + i.replaceNodeRangeWithNodes( + e, + ya(g.parameters), + _a(g.parameters), + h, + { + joiner: ", ", + // indentation is set to 0 because otherwise the object parameter will be indented if there is a `this` parameter + indentation: 0, + leadingTriviaOption: sn.LeadingTriviaOption.IncludeAll, + trailingTriviaOption: sn.TrailingTriviaOption.Include + } + ); + } + } + function gWe(e, t, n) { + const i = wWe(e), s = Go(e) ? DWe(e) : [], o = hb([...i, ...s], wy), c = t.getTypeChecker(), _ = na( + o, + /*mapfn*/ + (h) => So.getReferenceEntriesForNode(-1, h, t, t.getSourceFiles(), n) + ), u = m(_); + return Ri( + u.declarations, + /*callback*/ + (h) => as(o, h) + ) || (u.valid = !1), u; + function m(h) { + const S = { accessExpressions: [], typeUsages: [] }, T = { functionCalls: [], declarations: [], classReferences: S, valid: !0 }, C = gr(i, g), D = gr(s, g), w = Go(e), A = gr(i, (O) => Foe(O, c)); + for (const O of h) { + if (O.kind === So.EntryKind.Span) { + T.valid = !1; + continue; + } + if (as(A, g(O.node))) { + if (bWe(O.node.parent)) { + T.signature = O.node.parent; + continue; + } + const R = ISe(O); + if (R) { + T.functionCalls.push(R); + continue; + } + } + const F = Foe(O.node, c); + if (F && as(A, F)) { + const R = Ooe(O); + if (R) { + T.declarations.push(R); + continue; + } + } + if (as(C, g(O.node)) || nw(O.node)) { + if (ASe(O)) + continue; + const W = Ooe(O); + if (W) { + T.declarations.push(W); + continue; + } + const V = ISe(O); + if (V) { + T.functionCalls.push(V); + continue; + } + } + if (w && as(D, g(O.node))) { + if (ASe(O)) + continue; + const W = Ooe(O); + if (W) { + T.declarations.push(W); + continue; + } + const V = hWe(O); + if (V) { + S.accessExpressions.push(V); + continue; + } + if ($c(e.parent)) { + const $ = yWe(O); + if ($) { + S.typeUsages.push($); + continue; + } + } + } + T.valid = !1; + } + return T; + } + function g(h) { + const S = c.getSymbolAtLocation(h); + return S && JV(S, c); + } + } + function Foe(e, t) { + const n = UA(e); + if (n) { + const i = t.getContextualTypeForObjectLiteralElement(n), s = i?.getSymbol(); + if (s && !(rc(s) & 6)) + return s; + } + } + function ASe(e) { + const t = e.node; + if (ju(t.parent) || id(t.parent) || _l(t.parent) || Yg(t.parent) || Tu(t.parent) || Io(t.parent)) + return t; + } + function Ooe(e) { + if (bl(e.node.parent)) + return e.node; + } + function ISe(e) { + if (e.node.parent) { + const t = e.node, n = t.parent; + switch (n.kind) { + // foo(...) or super(...) or new Foo(...) + case 213: + case 214: + const i = jn(n, tm); + if (i && i.expression === t) + return i; + break; + // x.foo(...) + case 211: + const s = jn(n, Tn); + if (s && s.parent && s.name === t) { + const c = jn(s.parent, tm); + if (c && c.expression === s) + return c; + } + break; + // x["foo"](...) + case 212: + const o = jn(n, fo); + if (o && o.parent && o.argumentExpression === t) { + const c = jn(o.parent, tm); + if (c && c.expression === o) + return c; + } + break; + } + } + } + function hWe(e) { + if (e.node.parent) { + const t = e.node, n = t.parent; + switch (n.kind) { + // `C.foo` + case 211: + const i = jn(n, Tn); + if (i && i.expression === t) + return i; + break; + // `C["foo"]` + case 212: + const s = jn(n, fo); + if (s && s.expression === t) + return s; + break; + } + } + } + function yWe(e) { + const t = e.node; + if ($S(t) === 2 || h5(t.parent)) + return t; + } + function FSe(e, t, n) { + const i = F6(e, t), s = iK(i); + if (!vWe(i) && s && SWe(s, n) && p_(s, i) && !(s.body && p_(s.body, i))) + return s; + } + function vWe(e) { + const t = ur(e, SC); + if (t) { + const n = ur(t, (i) => !SC(i)); + return !!n && Ka(n); + } + return !1; + } + function bWe(e) { + return pm(e) && (Yl(e.parent) || Qu(e.parent)); + } + function SWe(e, t) { + var n; + if (!TWe(e.parameters, t)) return !1; + switch (e.kind) { + case 262: + return OSe(e) && tL(e, t); + case 174: + if (oa(e.parent)) { + const i = Foe(e.name, t); + return ((n = i?.declarations) == null ? void 0 : n.length) === 1 && tL(e, t); + } + return tL(e, t); + case 176: + return $c(e.parent) ? OSe(e.parent) && tL(e, t) : LSe(e.parent.parent) && tL(e, t); + case 218: + case 219: + return LSe(e.parent); + } + return !1; + } + function tL(e, t) { + return !!e.body && !t.isImplementationOfOverload(e); + } + function OSe(e) { + return e.name ? !0 : !!L6( + e, + 90 + /* DefaultKeyword */ + ); + } + function TWe(e, t) { + return kWe(e) >= fWe && Ri( + e, + /*callback*/ + (n) => xWe(n, t) + ); + } + function xWe(e, t) { + if (Zm(e)) { + const n = t.getTypeAtLocation(e); + if (!t.isArrayType(n) && !t.isTupleType(n)) return !1; + } + return !e.modifiers && Me(e.name); + } + function LSe(e) { + return Kn(e) && wC(e) && Me(e.name) && !e.type; + } + function Loe(e) { + return e.length > 0 && A6(e[0].name); + } + function kWe(e) { + return Loe(e) ? e.length - 1 : e.length; + } + function MSe(e) { + return Loe(e) && (e = N.createNodeArray(e.slice(1), e.hasTrailingComma)), e; + } + function CWe(e, t) { + return Me(t) && rp(t) === e ? N.createShorthandPropertyAssignment(e) : N.createPropertyAssignment(e, t); + } + function EWe(e, t) { + const n = MSe(e.parameters), i = Zm(_a(n)), s = i ? t.slice(0, n.length - 1) : t, o = gr(s, (_, u) => { + const m = Iq(n[u]), g = CWe(m, _); + return nf(g.name), Xc(g) && nf(g.initializer), QS(_, g), g; + }); + if (i && t.length >= n.length) { + const _ = t.slice(n.length - 1), u = N.createPropertyAssignment(Iq(_a(n)), N.createArrayLiteralExpression(_)); + o.push(u); + } + return N.createObjectLiteralExpression( + o, + /*multiLine*/ + !1 + ); + } + function RSe(e, t, n) { + const i = t.getTypeChecker(), s = MSe(e.parameters), o = gr(s, g), c = N.createObjectBindingPattern(o), _ = h(s); + let u; + Ri(s, C) && (u = N.createObjectLiteralExpression()); + const m = N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + c, + /*questionToken*/ + void 0, + _, + u + ); + if (Loe(e.parameters)) { + const D = e.parameters[0], w = N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + D.name, + /*questionToken*/ + void 0, + D.type + ); + return nf(w.name), QS(D.name, w.name), D.type && (nf(w.type), QS(D.type, w.type)), N.createNodeArray([w, m]); + } + return N.createNodeArray([m]); + function g(D) { + const w = N.createBindingElement( + /*dotDotDotToken*/ + void 0, + /*propertyName*/ + void 0, + Iq(D), + Zm(D) && C(D) ? N.createArrayLiteralExpression() : D.initializer + ); + return nf(w), D.initializer && w.initializer && QS(D.initializer, w.initializer), w; + } + function h(D) { + const w = gr(D, S); + return _m( + N.createTypeLiteralNode(w), + 1 + /* SingleLine */ + ); + } + function S(D) { + let w = D.type; + !w && (D.initializer || Zm(D)) && (w = T(D)); + const A = N.createPropertySignature( + /*modifiers*/ + void 0, + Iq(D), + C(D) ? N.createToken( + 58 + /* QuestionToken */ + ) : D.questionToken, + w + ); + return nf(A), QS(D.name, A.name), D.type && A.type && QS(D.type, A.type), A; + } + function T(D) { + const w = i.getTypeAtLocation(D); + return dw(w, D, t, n); + } + function C(D) { + if (Zm(D)) { + const w = i.getTypeAtLocation(D); + return !i.isTupleType(w); + } + return i.isOptionalParameter(D); + } + } + function Iq(e) { + return rp(e.name); + } + function DWe(e) { + switch (e.parent.kind) { + case 263: + const t = e.parent; + return t.name ? [t.name] : [E.checkDefined( + L6( + t, + 90 + /* DefaultKeyword */ + ), + "Nameless class declaration should be a default export" + )]; + case 231: + const i = e.parent, s = e.parent.parent, o = i.name; + return o ? [o, s.name] : [s.name]; + } + } + function wWe(e) { + switch (e.kind) { + case 262: + return e.name ? [e.name] : [E.checkDefined( + L6( + e, + 90 + /* DefaultKeyword */ + ), + "Nameless function declaration should be a default export" + )]; + case 174: + return [e.name]; + case 176: + const n = E.checkDefined( + Xa(e, 137, e.getSourceFile()), + "Constructor declaration should have constructor keyword" + ); + return e.parent.kind === 231 ? [e.parent.parent.name, n] : [n]; + case 219: + return [e.parent.name]; + case 218: + return e.name ? [e.name, e.parent.name] : [e.parent.name]; + default: + return E.assertNever(e, `Unexpected function declaration kind ${e.kind}`); + } + } + var PWe = {}, Moe = "Convert to template string", Roe = us(p.Convert_to_template_string), joe = { + name: Moe, + description: Roe, + kind: "refactor.rewrite.string" + }; + eh(Moe, { + kinds: [joe.kind], + getEditsForAction: AWe, + getAvailableActions: NWe + }); + function NWe(e) { + const { file: t, startPosition: n } = e, i = jSe(t, n), s = Boe(i), o = ea(s), c = { name: Moe, description: Roe, actions: [] }; + return o && e.triggerReason !== "invoked" ? He : Td(s) && (o || fn(s) && Joe(s).isValidConcatenation) ? (c.actions.push(joe), [c]) : e.preferences.provideRefactorNotApplicableReason ? (c.actions.push({ ...joe, notApplicableReason: us(p.Can_only_convert_string_concatenations_and_string_literals) }), [c]) : He; + } + function jSe(e, t) { + const n = Si(e, t), i = Boe(n); + return !Joe(i).isValidConcatenation && Yu(i.parent) && fn(i.parent.parent) ? i.parent.parent : n; + } + function AWe(e, t) { + const { file: n, startPosition: i } = e, s = jSe(n, i); + switch (t) { + case Roe: + return { edits: IWe(e, s) }; + default: + return E.fail("invalid action"); + } + } + function IWe(e, t) { + const n = Boe(t), i = e.file, s = RWe(Joe(n), i), o = Fy(i.text, n.end); + if (o) { + const c = o[o.length - 1], _ = { pos: o[0].pos, end: c.end }; + return sn.ChangeTracker.with(e, (u) => { + u.deleteRange(i, _), u.replaceNode(i, n, s); + }); + } else + return sn.ChangeTracker.with(e, (c) => c.replaceNode(i, n, s)); + } + function FWe(e) { + return !(e.operatorToken.kind === 64 || e.operatorToken.kind === 65); + } + function Boe(e) { + return ur(e.parent, (n) => { + switch (n.kind) { + case 211: + case 212: + return !1; + case 228: + case 226: + return !(fn(n.parent) && FWe(n.parent)); + default: + return "quit"; + } + }) || e; + } + function Joe(e) { + const t = (c) => { + if (!fn(c)) + return { nodes: [c], operators: [], validOperators: !0, hasString: ea(c) || NS(c) }; + const { nodes: _, operators: u, hasString: m, validOperators: g } = t(c.left); + if (!(m || ea(c.right) || mF(c.right))) + return { nodes: [c], operators: [], hasString: !1, validOperators: !0 }; + const h = c.operatorToken.kind === 40, S = g && h; + return _.push(c.right), u.push(c.operatorToken), { nodes: _, operators: u, hasString: !0, validOperators: S }; + }, { nodes: n, operators: i, validOperators: s, hasString: o } = t(e); + return { nodes: n, operators: i, isValidConcatenation: s && o }; + } + var OWe = (e, t) => (n, i) => { + n < e.length && fw( + e[n], + i, + t, + 3, + /*hasTrailingNewLine*/ + !1 + ); + }, LWe = (e, t, n) => (i, s) => { + for (; i.length > 0; ) { + const o = i.shift(); + fw( + e[o], + s, + t, + 3, + /*hasTrailingNewLine*/ + !1 + ), n(o, s); + } + }; + function MWe(e) { + return e.replace(/\\.|[$`]/g, (t) => t[0] === "\\" ? t : "\\" + t); + } + function BSe(e) { + const t = Rx(e) || HJ(e) ? -2 : -1; + return qo(e).slice(1, t); + } + function JSe(e, t) { + const n = []; + let i = "", s = ""; + for (; e < t.length; ) { + const o = t[e]; + if (Na(o)) + i += o.text, s += MWe(qo(o).slice(1, -1)), n.push(e), e++; + else if (mF(o)) { + i += o.head.text, s += BSe(o.head); + break; + } else + break; + } + return [e, i, s, n]; + } + function RWe({ nodes: e, operators: t }, n) { + const i = OWe(t, n), s = LWe(e, n, i), [o, c, _, u] = JSe(0, e); + if (o === e.length) { + const h = N.createNoSubstitutionTemplateLiteral(c, _); + return s(u, h), h; + } + const m = [], g = N.createTemplateHead(c, _); + s(u, g); + for (let h = o; h < e.length; h++) { + const S = jWe(e[h]); + i(h, S); + const [T, C, D, w] = JSe(h + 1, e); + h = T - 1; + const A = h === e.length - 1; + if (mF(S)) { + const O = gr(S.templateSpans, (F, R) => { + zSe(F); + const W = R === S.templateSpans.length - 1, V = F.literal.text + (W ? C : ""), $ = BSe(F.literal) + (W ? D : ""); + return N.createTemplateSpan( + F.expression, + A && W ? N.createTemplateTail(V, $) : N.createTemplateMiddle(V, $) + ); + }); + m.push(...O); + } else { + const O = A ? N.createTemplateTail(C, D) : N.createTemplateMiddle(C, D); + s(w, O), m.push(N.createTemplateSpan(S, O)); + } + } + return N.createTemplateExpression(g, m); + } + function zSe(e) { + const t = e.getSourceFile(); + fw( + e, + e.expression, + t, + 3, + /*hasTrailingNewLine*/ + !1 + ), PA( + e.expression, + e.expression, + t, + 3, + /*hasTrailingNewLine*/ + !1 + ); + } + function jWe(e) { + return Yu(e) && (zSe(e), e = e.expression), e; + } + var BWe = {}, Fq = "Convert to optional chain expression", zoe = us(p.Convert_to_optional_chain_expression), Woe = { + name: Fq, + description: zoe, + kind: "refactor.rewrite.expression.optionalChain" + }; + eh(Fq, { + kinds: [Woe.kind], + getEditsForAction: zWe, + getAvailableActions: JWe + }); + function JWe(e) { + const t = WSe(e, e.triggerReason === "invoked"); + return t ? zh(t) ? e.preferences.provideRefactorNotApplicableReason ? [{ + name: Fq, + description: zoe, + actions: [{ ...Woe, notApplicableReason: t.error }] + }] : He : [{ + name: Fq, + description: zoe, + actions: [Woe] + }] : He; + } + function zWe(e, t) { + const n = WSe(e); + return E.assert(n && !zh(n), "Expected applicable refactor info"), { edits: sn.ChangeTracker.with(e, (s) => XWe(e.file, e.program.getTypeChecker(), s, n)), renameFilename: void 0, renameLocation: void 0 }; + } + function Oq(e) { + return fn(e) || qx(e); + } + function WWe(e) { + return El(e) || Rp(e) || pc(e); + } + function Lq(e) { + return Oq(e) || WWe(e); + } + function WSe(e, t = !0) { + const { file: n, program: i } = e, s = _k(e), o = s.length === 0; + if (o && !t) return; + const c = Si(n, s.start), _ = sw(n, s.start + s.length), u = bc(c.pos, _ && _.end >= c.pos ? _.getEnd() : c.getEnd()), m = o ? GWe(c) : HWe(c, u), g = m && Lq(m) ? $We(m) : void 0; + if (!g) return { error: us(p.Could_not_find_convertible_access_expression) }; + const h = i.getTypeChecker(); + return qx(g) ? UWe(g, h) : VWe(g); + } + function UWe(e, t) { + const n = e.condition, i = Voe(e.whenTrue); + if (!i || t.isNullableType(t.getTypeAtLocation(i))) + return { error: us(p.Could_not_find_convertible_access_expression) }; + if ((Tn(n) || Me(n)) && Uoe(n, i.expression)) + return { finalExpression: i, occurrences: [n], expression: e }; + if (fn(n)) { + const s = USe(i.expression, n); + return s ? { finalExpression: i, occurrences: s, expression: e } : { error: us(p.Could_not_find_matching_access_expressions) }; + } + } + function VWe(e) { + if (e.operatorToken.kind !== 56) + return { error: us(p.Can_only_convert_logical_AND_access_chains) }; + const t = Voe(e.right); + if (!t) return { error: us(p.Could_not_find_convertible_access_expression) }; + const n = USe(t.expression, e.left); + return n ? { finalExpression: t, occurrences: n, expression: e } : { error: us(p.Could_not_find_matching_access_expressions) }; + } + function USe(e, t) { + const n = []; + for (; fn(t) && t.operatorToken.kind === 56; ) { + const s = Uoe(za(e), za(t.right)); + if (!s) + break; + n.push(s), e = s, t = t.left; + } + const i = Uoe(e, t); + return i && n.push(i), n.length > 0 ? n : void 0; + } + function Uoe(e, t) { + if (!(!Me(t) && !Tn(t) && !fo(t))) + return qWe(e, t) ? t : void 0; + } + function qWe(e, t) { + for (; (Fs(e) || Tn(e) || fo(e)) && JA(e) !== JA(t); ) + e = e.expression; + for (; Tn(e) && Tn(t) || fo(e) && fo(t); ) { + if (JA(e) !== JA(t)) return !1; + e = e.expression, t = t.expression; + } + return Me(e) && Me(t) && e.getText() === t.getText(); + } + function JA(e) { + if (Me(e) || wf(e)) + return e.getText(); + if (Tn(e)) + return JA(e.name); + if (fo(e)) + return JA(e.argumentExpression); + } + function HWe(e, t) { + for (; e.parent; ) { + if (Lq(e) && t.length !== 0 && e.end >= t.start + t.length) + return e; + e = e.parent; + } + } + function GWe(e) { + for (; e.parent; ) { + if (Lq(e) && !Lq(e.parent)) + return e; + e = e.parent; + } + } + function $We(e) { + if (Oq(e)) + return e; + if (pc(e)) { + const t = hx(e), n = t?.initializer; + return n && Oq(n) ? n : void 0; + } + return e.expression && Oq(e.expression) ? e.expression : void 0; + } + function Voe(e) { + if (e = za(e), fn(e)) + return Voe(e.left); + if ((Tn(e) || fo(e) || Fs(e)) && !vu(e)) + return e; + } + function VSe(e, t, n) { + if (Tn(t) || fo(t) || Fs(t)) { + const i = VSe(e, t.expression, n), s = n.length > 0 ? n[n.length - 1] : void 0, o = s?.getText() === t.expression.getText(); + if (o && n.pop(), Fs(t)) + return o ? N.createCallChain(i, N.createToken( + 29 + /* QuestionDotToken */ + ), t.typeArguments, t.arguments) : N.createCallChain(i, t.questionDotToken, t.typeArguments, t.arguments); + if (Tn(t)) + return o ? N.createPropertyAccessChain(i, N.createToken( + 29 + /* QuestionDotToken */ + ), t.name) : N.createPropertyAccessChain(i, t.questionDotToken, t.name); + if (fo(t)) + return o ? N.createElementAccessChain(i, N.createToken( + 29 + /* QuestionDotToken */ + ), t.argumentExpression) : N.createElementAccessChain(i, t.questionDotToken, t.argumentExpression); + } + return t; + } + function XWe(e, t, n, i, s) { + const { finalExpression: o, occurrences: c, expression: _ } = i, u = c[c.length - 1], m = VSe(t, o, c); + m && (Tn(m) || fo(m) || Fs(m)) && (fn(_) ? n.replaceNodeRange(e, u, o, m) : qx(_) && n.replaceNode(e, _, N.createBinaryExpression(m, N.createToken( + 61 + /* QuestionQuestionToken */ + ), _.whenFalse))); + } + var qSe = {}; + Ec(qSe, { + Messages: () => Kl, + RangeFacts: () => $Se, + getRangeToExtract: () => qoe, + getRefactorActionsToExtractSymbol: () => HSe, + getRefactorEditsToExtractSymbol: () => GSe + }); + var yw = "Extract Symbol", vw = { + name: "Extract Constant", + description: us(p.Extract_constant), + kind: "refactor.extract.constant" + }, bw = { + name: "Extract Function", + description: us(p.Extract_function), + kind: "refactor.extract.function" + }; + eh(yw, { + kinds: [ + vw.kind, + bw.kind + ], + getEditsForAction: GSe, + getAvailableActions: HSe + }); + function HSe(e) { + const t = e.kind, n = qoe(e.file, _k(e), e.triggerReason === "invoked"), i = n.targetRange; + if (i === void 0) { + if (!n.errors || n.errors.length === 0 || !e.preferences.provideRefactorNotApplicableReason) + return He; + const D = []; + return Iv(bw.kind, t) && D.push({ + name: yw, + description: bw.description, + actions: [{ ...bw, notApplicableReason: C(n.errors) }] + }), Iv(vw.kind, t) && D.push({ + name: yw, + description: vw.description, + actions: [{ ...vw, notApplicableReason: C(n.errors) }] + }), D; + } + const { affectedTextRange: s, extractions: o } = tUe(i, e); + if (o === void 0) + return He; + const c = [], _ = /* @__PURE__ */ new Map(); + let u; + const m = [], g = /* @__PURE__ */ new Map(); + let h, S = 0; + for (const { functionExtraction: D, constantExtraction: w } of o) { + if (Iv(bw.kind, t)) { + const A = D.description; + D.errors.length === 0 ? _.has(A) || (_.set(A, !0), c.push({ + description: A, + name: `function_scope_${S}`, + kind: bw.kind, + range: { + start: { line: js(e.file, s.pos).line, offset: js(e.file, s.pos).character }, + end: { line: js(e.file, s.end).line, offset: js(e.file, s.end).character } + } + })) : u || (u = { + description: A, + name: `function_scope_${S}`, + notApplicableReason: C(D.errors), + kind: bw.kind + }); + } + if (Iv(vw.kind, t)) { + const A = w.description; + w.errors.length === 0 ? g.has(A) || (g.set(A, !0), m.push({ + description: A, + name: `constant_scope_${S}`, + kind: vw.kind, + range: { + start: { line: js(e.file, s.pos).line, offset: js(e.file, s.pos).character }, + end: { line: js(e.file, s.end).line, offset: js(e.file, s.end).character } + } + })) : h || (h = { + description: A, + name: `constant_scope_${S}`, + notApplicableReason: C(w.errors), + kind: vw.kind + }); + } + S++; + } + const T = []; + return c.length ? T.push({ + name: yw, + description: us(p.Extract_function), + actions: c + }) : e.preferences.provideRefactorNotApplicableReason && u && T.push({ + name: yw, + description: us(p.Extract_function), + actions: [u] + }), m.length ? T.push({ + name: yw, + description: us(p.Extract_constant), + actions: m + }) : e.preferences.provideRefactorNotApplicableReason && h && T.push({ + name: yw, + description: us(p.Extract_constant), + actions: [h] + }), T.length ? T : He; + function C(D) { + let w = D[0].messageText; + return typeof w != "string" && (w = w.messageText), w; + } + } + function GSe(e, t) { + const i = qoe(e.file, _k(e)).targetRange, s = /^function_scope_(\d+)$/.exec(t); + if (s) { + const c = +s[1]; + return E.assert(isFinite(c), "Expected to parse a finite number from the function scope index"), KWe(i, e, c); + } + const o = /^constant_scope_(\d+)$/.exec(t); + if (o) { + const c = +o[1]; + return E.assert(isFinite(c), "Expected to parse a finite number from the constant scope index"), eUe(i, e, c); + } + E.fail("Unrecognized action name"); + } + var Kl; + ((e) => { + function t(n) { + return { message: n, code: 0, category: 3, key: n }; + } + e.cannotExtractRange = t("Cannot extract range."), e.cannotExtractImport = t("Cannot extract import statement."), e.cannotExtractSuper = t("Cannot extract super call."), e.cannotExtractJSDoc = t("Cannot extract JSDoc."), e.cannotExtractEmpty = t("Cannot extract empty range."), e.expressionExpected = t("expression expected."), e.uselessConstantType = t("No reason to extract constant of type."), e.statementOrExpressionExpected = t("Statement or expression expected."), e.cannotExtractRangeContainingConditionalBreakOrContinueStatements = t("Cannot extract range containing conditional break or continue statements."), e.cannotExtractRangeContainingConditionalReturnStatement = t("Cannot extract range containing conditional return statement."), e.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange = t("Cannot extract range containing labeled break or continue with target outside of the range."), e.cannotExtractRangeThatContainsWritesToReferencesLocatedOutsideOfTheTargetRangeInGenerators = t("Cannot extract range containing writes to references located outside of the target range in generators."), e.typeWillNotBeVisibleInTheNewScope = t("Type will not visible in the new scope."), e.functionWillNotBeVisibleInTheNewScope = t("Function will not visible in the new scope."), e.cannotExtractIdentifier = t("Select more than a single identifier."), e.cannotExtractExportedEntity = t("Cannot extract exported declaration"), e.cannotWriteInExpression = t("Cannot write back side-effects when extracting an expression"), e.cannotExtractReadonlyPropertyInitializerOutsideConstructor = t("Cannot move initialization of read-only class property outside of the constructor"), e.cannotExtractAmbientBlock = t("Cannot extract code from ambient contexts"), e.cannotAccessVariablesFromNestedScopes = t("Cannot access variables from nested scopes"), e.cannotExtractToJSClass = t("Cannot extract constant to a class scope in JS"), e.cannotExtractToExpressionArrowFunction = t("Cannot extract constant to an arrow function without a block"), e.cannotExtractFunctionsContainingThisToMethod = t("Cannot extract functions containing this to method"); + })(Kl || (Kl = {})); + var $Se = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.HasReturn = 1] = "HasReturn", e[e.IsGenerator = 2] = "IsGenerator", e[e.IsAsyncFunction = 4] = "IsAsyncFunction", e[e.UsesThis = 8] = "UsesThis", e[e.UsesThisInFunction = 16] = "UsesThisInFunction", e[e.InStaticRegion = 32] = "InStaticRegion", e))($Se || {}); + function qoe(e, t, n = !0) { + const { length: i } = t; + if (i === 0 && !n) + return { errors: [ol(e, t.start, i, Kl.cannotExtractEmpty)] }; + const s = i === 0 && n, o = Jse(e, t.start), c = sw(e, Yo(t)), _ = o && c && n ? QWe(o, c, e) : t, u = s ? SUe(o) : CA(o, e, _), m = s ? u : CA(c, e, _); + let g = 0, h; + if (!u || !m) + return { errors: [ol(e, t.start, i, Kl.cannotExtractRange)] }; + if (u.flags & 16777216) + return { errors: [ol(e, t.start, i, Kl.cannotExtractJSDoc)] }; + if (u.parent !== m.parent) + return { errors: [ol(e, t.start, i, Kl.cannotExtractRange)] }; + if (u !== m) { + if (!fk(u.parent)) + return { errors: [ol(e, t.start, i, Kl.cannotExtractRange)] }; + const O = []; + for (const F of u.parent.statements) { + if (F === u || O.length) { + const R = A(F); + if (R) + return { errors: R }; + O.push(F); + } + if (F === m) + break; + } + return O.length ? { targetRange: { range: O, facts: g, thisNode: h } } : { errors: [ol(e, t.start, i, Kl.cannotExtractRange)] }; + } + if (Rp(u) && !u.expression) + return { errors: [ol(e, t.start, i, Kl.cannotExtractRange)] }; + const S = C(u), T = D(S) || A(S); + if (T) + return { errors: T }; + return { targetRange: { range: YWe(S), facts: g, thisNode: h } }; + function C(O) { + if (Rp(O)) { + if (O.expression) + return O.expression; + } else if (pc(O) || Il(O)) { + const F = pc(O) ? O.declarationList.declarations : O.declarations; + let R = 0, W; + for (const V of F) + V.initializer && (R++, W = V.initializer); + if (R === 1) + return W; + } else if (Kn(O) && O.initializer) + return O.initializer; + return O; + } + function D(O) { + if (Me(El(O) ? O.expression : O)) + return [tn(O, Kl.cannotExtractIdentifier)]; + } + function w(O, F) { + let R = O; + for (; R !== F; ) { + if (R.kind === 172) { + Vs(R) && (g |= 32); + break; + } else if (R.kind === 169) { + ff(R).kind === 176 && (g |= 32); + break; + } else R.kind === 174 && Vs(R) && (g |= 32); + R = R.parent; + } + } + function A(O) { + let F; + if (((_e) => { + _e[_e.None = 0] = "None", _e[_e.Break = 1] = "Break", _e[_e.Continue = 2] = "Continue", _e[_e.Return = 4] = "Return"; + })(F || (F = {})), E.assert(O.pos <= O.end, "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809 (1)"), E.assert(!kd(O.pos), "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809 (2)"), !xi(O) && !(Td(O) && XSe(O)) && !Qoe(O)) + return [tn(O, Kl.statementOrExpressionExpected)]; + if (O.flags & 33554432) + return [tn(O, Kl.cannotExtractAmbientBlock)]; + const R = Al(O); + R && w(O, R); + let W, V = 4, $; + if (U(O), g & 8) { + const _e = Lu( + O, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + (_e.kind === 262 || _e.kind === 174 && _e.parent.kind === 210 || _e.kind === 218) && (g |= 16); + } + return W; + function U(_e) { + if (W) + return !0; + if (bl(_e)) { + const J = _e.kind === 260 ? _e.parent.parent : _e; + if ($n( + J, + 32 + /* Export */ + )) + return (W || (W = [])).push(tn(_e, Kl.cannotExtractExportedEntity)), !0; + } + switch (_e.kind) { + case 272: + return (W || (W = [])).push(tn(_e, Kl.cannotExtractImport)), !0; + case 277: + return (W || (W = [])).push(tn(_e, Kl.cannotExtractExportedEntity)), !0; + case 108: + if (_e.parent.kind === 213) { + const J = Al(_e); + if (J === void 0 || J.pos < t.start || J.end >= t.start + t.length) + return (W || (W = [])).push(tn(_e, Kl.cannotExtractSuper)), !0; + } else + g |= 8, h = _e; + break; + case 219: + ms(_e, function J(re) { + if (A6(re)) + g |= 8, h = _e; + else { + if (Zn(re) || vs(re) && !bo(re)) + return !1; + ms(re, J); + } + }); + // falls through + case 263: + case 262: + Ei(_e.parent) && _e.parent.externalModuleIndicator === void 0 && (W || (W = [])).push(tn(_e, Kl.functionWillNotBeVisibleInTheNewScope)); + // falls through + case 231: + case 218: + case 174: + case 176: + case 177: + case 178: + return !1; + } + const Z = V; + switch (_e.kind) { + case 245: + V &= -5; + break; + case 258: + V = 0; + break; + case 241: + _e.parent && _e.parent.kind === 258 && _e.parent.finallyBlock === _e && (V = 4); + break; + case 297: + case 296: + V |= 1; + break; + default: + zy( + _e, + /*lookInLabeledStatements*/ + !1 + ) && (V |= 3); + break; + } + switch (_e.kind) { + case 197: + case 110: + g |= 8, h = _e; + break; + case 256: { + const J = _e.label; + ($ || ($ = [])).push(J.escapedText), ms(_e, U), $.pop(); + break; + } + case 252: + case 251: { + const J = _e.label; + J ? as($, J.escapedText) || (W || (W = [])).push(tn(_e, Kl.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange)) : V & (_e.kind === 252 ? 1 : 2) || (W || (W = [])).push(tn(_e, Kl.cannotExtractRangeContainingConditionalBreakOrContinueStatements)); + break; + } + case 223: + g |= 4; + break; + case 229: + g |= 2; + break; + case 253: + V & 4 ? g |= 1 : (W || (W = [])).push(tn(_e, Kl.cannotExtractRangeContainingConditionalReturnStatement)); + break; + default: + ms(_e, U); + break; + } + V = Z; + } + } + } + function QWe(e, t, n) { + const i = e.getStart(n); + let s = t.getEnd(); + return n.text.charCodeAt(s) === 59 && s++, { start: i, length: s - i }; + } + function YWe(e) { + if (xi(e)) + return [e]; + if (Td(e)) + return El(e.parent) ? [e.parent] : e; + if (Qoe(e)) + return e; + } + function Hoe(e) { + return bo(e) ? jj(e.body) : Ka(e) || Ei(e) || dm(e) || Zn(e); + } + function ZWe(e) { + let t = V0(e.range) ? ya(e.range) : e.range; + if (e.facts & 8 && !(e.facts & 16)) { + const i = Al(t); + if (i) { + const s = ur(t, Ka); + return s ? [s, i] : [i]; + } + } + const n = []; + for (; ; ) + if (t = t.parent, t.kind === 169 && (t = ur(t, (i) => Ka(i)).parent), Hoe(t) && (n.push(t), t.kind === 307)) + return n; + } + function KWe(e, t, n) { + const { scopes: i, readsAndWrites: { target: s, usagesPerScope: o, functionErrorsPerScope: c, exposedVariableDeclarations: _ } } = Goe(e, t); + return E.assert(!c[n].length, "The extraction went missing? How?"), t.cancellationToken.throwIfCancellationRequested(), oUe(s, i[n], o[n], _, e, t); + } + function eUe(e, t, n) { + const { scopes: i, readsAndWrites: { target: s, usagesPerScope: o, constantErrorsPerScope: c, exposedVariableDeclarations: _ } } = Goe(e, t); + E.assert(!c[n].length, "The extraction went missing? How?"), E.assert(_.length === 0, "Extract constant accepted a range containing a variable declaration?"), t.cancellationToken.throwIfCancellationRequested(); + const u = ct(s) ? s : s.statements[0].expression; + return cUe(u, i[n], o[n], e.facts, t); + } + function tUe(e, t) { + const { scopes: n, affectedTextRange: i, readsAndWrites: { functionErrorsPerScope: s, constantErrorsPerScope: o } } = Goe(e, t), c = n.map((_, u) => { + const m = rUe(_), g = nUe(_), h = Ka(_) ? iUe(_) : Zn(_) ? sUe(_) : aUe(_); + let S, T; + return h === 1 ? (S = qg(us(p.Extract_to_0_in_1_scope), [m, "global"]), T = qg(us(p.Extract_to_0_in_1_scope), [g, "global"])) : h === 0 ? (S = qg(us(p.Extract_to_0_in_1_scope), [m, "module"]), T = qg(us(p.Extract_to_0_in_1_scope), [g, "module"])) : (S = qg(us(p.Extract_to_0_in_1), [m, h]), T = qg(us(p.Extract_to_0_in_1), [g, h])), u === 0 && !Zn(_) && (T = qg(us(p.Extract_to_0_in_enclosing_scope), [g])), { + functionExtraction: { + description: S, + errors: s[u] + }, + constantExtraction: { + description: T, + errors: o[u] + } + }; + }); + return { affectedTextRange: i, extractions: c }; + } + function Goe(e, t) { + const { file: n } = t, i = ZWe(e), s = vUe(e, n), o = bUe( + e, + i, + s, + n, + t.program.getTypeChecker(), + t.cancellationToken + ); + return { scopes: i, affectedTextRange: s, readsAndWrites: o }; + } + function rUe(e) { + return Ka(e) ? "inner function" : Zn(e) ? "method" : "function"; + } + function nUe(e) { + return Zn(e) ? "readonly field" : "constant"; + } + function iUe(e) { + switch (e.kind) { + case 176: + return "constructor"; + case 218: + case 262: + return e.name ? `function '${e.name.text}'` : qV; + case 219: + return "arrow function"; + case 174: + return `method '${e.name.getText()}'`; + case 177: + return `'get ${e.name.getText()}'`; + case 178: + return `'set ${e.name.getText()}'`; + default: + E.assertNever(e, `Unexpected scope kind ${e.kind}`); + } + } + function sUe(e) { + return e.kind === 263 ? e.name ? `class '${e.name.text}'` : "anonymous class declaration" : e.name ? `class expression '${e.name.text}'` : "anonymous class expression"; + } + function aUe(e) { + return e.kind === 268 ? `namespace '${e.parent.name.getText()}'` : e.externalModuleIndicator ? 0 : 1; + } + function oUe(e, t, { usages: n, typeParameterUsages: i, substitutions: s }, o, c, _) { + const u = _.program.getTypeChecker(), m = pa(_.program.getCompilerOptions()), g = Eu.createImportAdder(_.file, _.program, _.preferences, _.host), h = t.getSourceFile(), S = YS(Zn(t) ? "newMethod" : "newFunction", h), T = an(t), C = N.createIdentifier(S); + let D; + const w = [], A = []; + let O; + n.forEach((oe, ke) => { + let ue; + if (!T) { + let Oe = u.getTypeOfSymbolAtLocation(oe.symbol, oe.node); + Oe = u.getBaseTypeOfLiteralType(Oe), ue = Eu.typeToAutoImportableTypeNode( + u, + g, + Oe, + t, + m, + 1, + 8 + /* AllowUnresolvedNames */ + ); + } + const it = N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + /*name*/ + ke, + /*questionToken*/ + void 0, + ue + ); + w.push(it), oe.usage === 2 && (O || (O = [])).push(oe), A.push(N.createIdentifier(ke)); + }); + const F = Ki(i.values(), (oe) => ({ type: oe, declaration: uUe(oe, _.startPosition) })); + F.sort(_Ue); + const R = F.length === 0 ? void 0 : Li(F, ({ declaration: oe }) => oe), W = R !== void 0 ? R.map((oe) => N.createTypeReferenceNode( + oe.name, + /*typeArguments*/ + void 0 + )) : void 0; + if (ct(e) && !T) { + const oe = u.getContextualType(e); + D = u.typeToTypeNode( + oe, + t, + 1, + 8 + /* AllowUnresolvedNames */ + ); + } + const { body: V, returnValueProperty: $ } = pUe(e, o, O, s, !!(c.facts & 1)); + nf(V); + let U; + const _e = !!(c.facts & 16); + if (Zn(t)) { + const oe = T ? [] : [N.createModifier( + 123 + /* PrivateKeyword */ + )]; + c.facts & 32 && oe.push(N.createModifier( + 126 + /* StaticKeyword */ + )), c.facts & 4 && oe.push(N.createModifier( + 134 + /* AsyncKeyword */ + )), U = N.createMethodDeclaration( + oe.length ? oe : void 0, + c.facts & 2 ? N.createToken( + 42 + /* AsteriskToken */ + ) : void 0, + C, + /*questionToken*/ + void 0, + R, + w, + D, + V + ); + } else + _e && w.unshift( + N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + /*name*/ + "this", + /*questionToken*/ + void 0, + u.typeToTypeNode( + u.getTypeAtLocation(c.thisNode), + t, + 1, + 8 + /* AllowUnresolvedNames */ + ), + /*initializer*/ + void 0 + ) + ), U = N.createFunctionDeclaration( + c.facts & 4 ? [N.createToken( + 134 + /* AsyncKeyword */ + )] : void 0, + c.facts & 2 ? N.createToken( + 42 + /* AsteriskToken */ + ) : void 0, + C, + R, + w, + D, + V + ); + const Z = sn.ChangeTracker.fromContext(_), J = (V0(c.range) ? _a(c.range) : c.range).end, re = gUe(J, t); + re ? Z.insertNodeBefore( + _.file, + re, + U, + /*blankLineBetween*/ + !0 + ) : Z.insertNodeAtEndOfScope(_.file, t, U), g.writeFixes(Z); + const te = [], ie = fUe(t, c, S); + _e && A.unshift(N.createIdentifier("this")); + let le = N.createCallExpression( + _e ? N.createPropertyAccessExpression( + ie, + "call" + ) : ie, + W, + // Note that no attempt is made to take advantage of type argument inference + A + ); + if (c.facts & 2 && (le = N.createYieldExpression(N.createToken( + 42 + /* AsteriskToken */ + ), le)), c.facts & 4 && (le = N.createAwaitExpression(le)), Xoe(e) && (le = N.createJsxExpression( + /*dotDotDotToken*/ + void 0, + le + )), o.length && !O) + if (E.assert(!$, "Expected no returnValueProperty"), E.assert(!(c.facts & 1), "Expected RangeFacts.HasReturn flag to be unset"), o.length === 1) { + const oe = o[0]; + te.push(N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [N.createVariableDeclaration( + Wa(oe.name), + /*exclamationToken*/ + void 0, + /*type*/ + Wa(oe.type), + /*initializer*/ + le + )], + oe.parent.flags + ) + )); + } else { + const oe = [], ke = []; + let ue = o[0].parent.flags, it = !1; + for (const xe of o) { + oe.push(N.createBindingElement( + /*dotDotDotToken*/ + void 0, + /*propertyName*/ + void 0, + /*name*/ + Wa(xe.name) + )); + const he = u.typeToTypeNode( + u.getBaseTypeOfLiteralType(u.getTypeAtLocation(xe)), + t, + 1, + 8 + /* AllowUnresolvedNames */ + ); + ke.push(N.createPropertySignature( + /*modifiers*/ + void 0, + /*name*/ + xe.symbol.name, + /*questionToken*/ + void 0, + /*type*/ + he + )), it = it || xe.type !== void 0, ue = ue & xe.parent.flags; + } + const Oe = it ? N.createTypeLiteralNode(ke) : void 0; + Oe && on( + Oe, + 1 + /* SingleLine */ + ), te.push(N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [N.createVariableDeclaration( + N.createObjectBindingPattern(oe), + /*exclamationToken*/ + void 0, + /*type*/ + Oe, + /*initializer*/ + le + )], + ue + ) + )); + } + else if (o.length || O) { + if (o.length) + for (const ke of o) { + let ue = ke.parent.flags; + ue & 2 && (ue = ue & -3 | 1), te.push(N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [N.createVariableDeclaration( + ke.symbol.name, + /*exclamationToken*/ + void 0, + Ee(ke.type) + )], + ue + ) + )); + } + $ && te.push(N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [N.createVariableDeclaration( + $, + /*exclamationToken*/ + void 0, + Ee(D) + )], + 1 + /* Let */ + ) + )); + const oe = $oe(o, O); + $ && oe.unshift(N.createShorthandPropertyAssignment($)), oe.length === 1 ? (E.assert(!$, "Shouldn't have returnValueProperty here"), te.push(N.createExpressionStatement(N.createAssignment(oe[0].name, le))), c.facts & 1 && te.push(N.createReturnStatement())) : (te.push(N.createExpressionStatement(N.createAssignment(N.createObjectLiteralExpression(oe), le))), $ && te.push(N.createReturnStatement(N.createIdentifier($)))); + } else + c.facts & 1 ? te.push(N.createReturnStatement(le)) : V0(c.range) ? te.push(N.createExpressionStatement(le)) : te.push(le); + V0(c.range) ? Z.replaceNodeRangeWithNodes(_.file, ya(c.range), _a(c.range), te) : Z.replaceNodeWithNodes(_.file, c.range, te); + const Te = Z.getChanges(), me = (V0(c.range) ? ya(c.range) : c.range).getSourceFile().fileName, Ce = wA( + Te, + me, + S, + /*preferLastLocation*/ + !1 + ); + return { renameFilename: me, renameLocation: Ce, edits: Te }; + function Ee(oe) { + if (oe === void 0) + return; + const ke = Wa(oe); + let ue = ke; + for (; IS(ue); ) + ue = ue.type; + return L0(ue) && Pn( + ue.types, + (it) => it.kind === 157 + /* UndefinedKeyword */ + ) ? ke : N.createUnionTypeNode([ke, N.createKeywordTypeNode( + 157 + /* UndefinedKeyword */ + )]); + } + } + function cUe(e, t, { substitutions: n }, i, s) { + const o = s.program.getTypeChecker(), c = t.getSourceFile(), _ = Coe(e, t, o, c), u = an(t); + let m = u || !o.isContextSensitive(e) ? void 0 : o.typeToTypeNode( + o.getContextualType(e), + t, + 1, + 8 + /* AllowUnresolvedNames */ + ), g = dUe(za(e), n); + ({ variableType: m, initializer: g } = D(m, g)), nf(g); + const h = sn.ChangeTracker.fromContext(s); + if (Zn(t)) { + E.assert(!u, "Cannot extract to a JS class"); + const w = []; + w.push(N.createModifier( + 123 + /* PrivateKeyword */ + )), i & 32 && w.push(N.createModifier( + 126 + /* StaticKeyword */ + )), w.push(N.createModifier( + 148 + /* ReadonlyKeyword */ + )); + const A = N.createPropertyDeclaration( + w, + _, + /*questionOrExclamationToken*/ + void 0, + m, + g + ); + let O = N.createPropertyAccessExpression( + i & 32 ? N.createIdentifier(t.name.getText()) : N.createThis(), + N.createIdentifier(_) + ); + Xoe(e) && (O = N.createJsxExpression( + /*dotDotDotToken*/ + void 0, + O + )); + const F = e.pos, R = hUe(F, t); + h.insertNodeBefore( + s.file, + R, + A, + /*blankLineBetween*/ + !0 + ), h.replaceNode(s.file, e, O); + } else { + const w = N.createVariableDeclaration( + _, + /*exclamationToken*/ + void 0, + m, + g + ), A = lUe(e, t); + if (A) { + h.insertNodeBefore(s.file, A, w); + const O = N.createIdentifier(_); + h.replaceNode(s.file, e, O); + } else if (e.parent.kind === 244 && t === ur(e, Hoe)) { + const O = N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [w], + 2 + /* Const */ + ) + ); + h.replaceNode(s.file, e.parent, O); + } else { + const O = N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [w], + 2 + /* Const */ + ) + ), F = yUe(e, t); + if (F.pos === 0 ? h.insertNodeAtTopOfFile( + s.file, + O, + /*blankLineBetween*/ + !1 + ) : h.insertNodeBefore( + s.file, + F, + O, + /*blankLineBetween*/ + !1 + ), e.parent.kind === 244) + h.delete(s.file, e.parent); + else { + let R = N.createIdentifier(_); + Xoe(e) && (R = N.createJsxExpression( + /*dotDotDotToken*/ + void 0, + R + )), h.replaceNode(s.file, e, R); + } + } + } + const S = h.getChanges(), T = e.getSourceFile().fileName, C = wA( + S, + T, + _, + /*preferLastLocation*/ + !0 + ); + return { renameFilename: T, renameLocation: C, edits: S }; + function D(w, A) { + if (w === void 0) return { variableType: w, initializer: A }; + if (!po(A) && !bo(A) || A.typeParameters) return { variableType: w, initializer: A }; + const O = o.getTypeAtLocation(e), F = Hm(o.getSignaturesOfType( + O, + 0 + /* Call */ + )); + if (!F) return { variableType: w, initializer: A }; + if (F.getTypeParameters()) return { variableType: w, initializer: A }; + const R = []; + let W = !1; + for (const V of A.parameters) + if (V.type) + R.push(V); + else { + const $ = o.getTypeAtLocation(V); + $ === o.getAnyType() && (W = !0), R.push(N.updateParameterDeclaration(V, V.modifiers, V.dotDotDotToken, V.name, V.questionToken, V.type || o.typeToTypeNode( + $, + t, + 1, + 8 + /* AllowUnresolvedNames */ + ), V.initializer)); + } + if (W) return { variableType: w, initializer: A }; + if (w = void 0, bo(A)) + A = N.updateArrowFunction(A, Jp(e) ? Tb(e) : void 0, A.typeParameters, R, A.type || o.typeToTypeNode( + F.getReturnType(), + t, + 1, + 8 + /* AllowUnresolvedNames */ + ), A.equalsGreaterThanToken, A.body); + else { + if (F && F.thisParameter) { + const V = Uc(R); + if (!V || Me(V.name) && V.name.escapedText !== "this") { + const $ = o.getTypeOfSymbolAtLocation(F.thisParameter, e); + R.splice( + 0, + 0, + N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "this", + /*questionToken*/ + void 0, + o.typeToTypeNode( + $, + t, + 1, + 8 + /* AllowUnresolvedNames */ + ) + ) + ); + } + } + A = N.updateFunctionExpression(A, Jp(e) ? Tb(e) : void 0, A.asteriskToken, A.name, A.typeParameters, R, A.type || o.typeToTypeNode( + F.getReturnType(), + t, + 1 + /* NoTruncation */ + ), A.body); + } + return { variableType: w, initializer: A }; + } + } + function lUe(e, t) { + let n; + for (; e !== void 0 && e !== t; ) { + if (Kn(e) && e.initializer === n && Il(e.parent) && e.parent.declarations.length > 1) + return e; + n = e, e = e.parent; + } + } + function uUe(e, t) { + let n; + const i = e.symbol; + if (i && i.declarations) + for (const s of i.declarations) + (n === void 0 || s.pos < n.pos) && s.pos < t && (n = s); + return n; + } + function _Ue({ type: e, declaration: t }, { type: n, declaration: i }) { + return YX(t, i, "pos", uo) || cu( + e.symbol ? e.symbol.getName() : "", + n.symbol ? n.symbol.getName() : "" + ) || uo(e.id, n.id); + } + function fUe(e, t, n) { + const i = N.createIdentifier(n); + if (Zn(e)) { + const s = t.facts & 32 ? N.createIdentifier(e.name.text) : N.createThis(); + return N.createPropertyAccessExpression(s, i); + } else + return i; + } + function pUe(e, t, n, i, s) { + const o = n !== void 0 || t.length > 0; + if (ks(e) && !o && i.size === 0) + return { body: N.createBlock( + e.statements, + /*multiLine*/ + !0 + ), returnValueProperty: void 0 }; + let c, _ = !1; + const u = N.createNodeArray(ks(e) ? e.statements.slice(0) : [xi(e) ? e : N.createReturnStatement(za(e))]); + if (o || i.size) { + const g = Or(u, m, xi).slice(); + if (o && !s && xi(e)) { + const h = $oe(t, n); + h.length === 1 ? g.push(N.createReturnStatement(h[0].name)) : g.push(N.createReturnStatement(N.createObjectLiteralExpression(h))); + } + return { body: N.createBlock( + g, + /*multiLine*/ + !0 + ), returnValueProperty: c }; + } else + return { body: N.createBlock( + u, + /*multiLine*/ + !0 + ), returnValueProperty: void 0 }; + function m(g) { + if (!_ && Rp(g) && o) { + const h = $oe(t, n); + return g.expression && (c || (c = "__return"), h.unshift(N.createPropertyAssignment(c, Xe(g.expression, m, ct)))), h.length === 1 ? N.createReturnStatement(h[0].name) : N.createReturnStatement(N.createObjectLiteralExpression(h)); + } else { + const h = _; + _ = _ || Ka(g) || Zn(g); + const S = i.get(Aa(g).toString()), T = S ? Wa(S) : kr( + g, + m, + /*context*/ + void 0 + ); + return _ = h, T; + } + } + } + function dUe(e, t) { + return t.size ? n(e) : e; + function n(i) { + const s = t.get(Aa(i).toString()); + return s ? Wa(s) : kr( + i, + n, + /*context*/ + void 0 + ); + } + } + function mUe(e) { + if (Ka(e)) { + const t = e.body; + if (ks(t)) + return t.statements; + } else { + if (dm(e) || Ei(e)) + return e.statements; + if (Zn(e)) + return e.members; + } + return He; + } + function gUe(e, t) { + return Pn(mUe(t), (n) => n.pos >= e && Ka(n) && !Go(n)); + } + function hUe(e, t) { + const n = t.members; + E.assert(n.length > 0, "Found no members"); + let i, s = !0; + for (const o of n) { + if (o.pos > e) + return i || n[0]; + if (s && !ss(o)) { + if (i !== void 0) + return o; + s = !1; + } + i = o; + } + return i === void 0 ? E.fail() : i; + } + function yUe(e, t) { + E.assert(!Zn(t)); + let n; + for (let i = e; i !== t; i = i.parent) + Hoe(i) && (n = i); + for (let i = (n || e).parent; ; i = i.parent) { + if (fk(i)) { + let s; + for (const o of i.statements) { + if (o.pos > e.pos) + break; + s = o; + } + return !s && i6(i) ? (E.assert(xD(i.parent.parent), "Grandparent isn't a switch statement"), i.parent.parent) : E.checkDefined(s, "prevStatement failed to get set"); + } + E.assert(i !== t, "Didn't encounter a block-like before encountering scope"); + } + } + function $oe(e, t) { + const n = gr(e, (s) => N.createShorthandPropertyAssignment(s.symbol.name)), i = gr(t, (s) => N.createShorthandPropertyAssignment(s.symbol.name)); + return n === void 0 ? i : i === void 0 ? n : n.concat(i); + } + function V0(e) { + return os(e); + } + function vUe(e, t) { + return V0(e.range) ? { pos: ya(e.range).getStart(t), end: _a(e.range).getEnd() } : e.range; + } + function bUe(e, t, n, i, s, o) { + const c = /* @__PURE__ */ new Map(), _ = [], u = [], m = [], g = [], h = [], S = /* @__PURE__ */ new Map(), T = []; + let C; + const D = V0(e.range) ? e.range.length === 1 && El(e.range[0]) ? e.range[0].expression : void 0 : e.range; + let w; + if (D === void 0) { + const te = e.range, ie = ya(te).getStart(), le = _a(te).end; + w = ol(i, ie, le - ie, Kl.expressionExpected); + } else s.getTypeAtLocation(D).flags & 147456 && (w = tn(D, Kl.uselessConstantType)); + for (const te of t) { + _.push({ usages: /* @__PURE__ */ new Map(), typeParameterUsages: /* @__PURE__ */ new Map(), substitutions: /* @__PURE__ */ new Map() }), u.push(/* @__PURE__ */ new Map()), m.push([]); + const ie = []; + w && ie.push(w), Zn(te) && an(te) && ie.push(tn(te, Kl.cannotExtractToJSClass)), bo(te) && !ks(te.body) && ie.push(tn(te, Kl.cannotExtractToExpressionArrowFunction)), g.push(ie); + } + const A = /* @__PURE__ */ new Map(), O = V0(e.range) ? N.createBlock(e.range) : e.range, F = V0(e.range) ? ya(e.range) : e.range, R = W(F); + if ($(O), R && !V0(e.range) && !hm(e.range)) { + const te = s.getContextualType(e.range); + V(te); + } + if (c.size > 0) { + const te = /* @__PURE__ */ new Map(); + let ie = 0; + for (let le = F; le !== void 0 && ie < t.length; le = le.parent) + if (le === t[ie] && (te.forEach((Te, q) => { + _[ie].typeParameterUsages.set(q, Te); + }), ie++), sB(le)) + for (const Te of My(le)) { + const q = s.getTypeAtLocation(Te); + c.has(q.id.toString()) && te.set(q.id.toString(), q); + } + E.assert(ie === t.length, "Should have iterated all scopes"); + } + if (h.length) { + const te = iB(t[0], t[0].parent) ? t[0] : Sd(t[0]); + ms(te, Z); + } + for (let te = 0; te < t.length; te++) { + const ie = _[te]; + if (te > 0 && (ie.usages.size > 0 || ie.typeParameterUsages.size > 0)) { + const q = V0(e.range) ? e.range[0] : e.range; + g[te].push(tn(q, Kl.cannotAccessVariablesFromNestedScopes)); + } + e.facts & 16 && Zn(t[te]) && m[te].push(tn(e.thisNode, Kl.cannotExtractFunctionsContainingThisToMethod)); + let le = !1, Te; + if (_[te].usages.forEach((q) => { + q.usage === 2 && (le = !0, q.symbol.flags & 106500 && q.symbol.valueDeclaration && Q_( + q.symbol.valueDeclaration, + 8 + /* Readonly */ + ) && (Te = q.symbol.valueDeclaration)); + }), E.assert(V0(e.range) || T.length === 0, "No variable declarations expected if something was extracted"), le && !V0(e.range)) { + const q = tn(e.range, Kl.cannotWriteInExpression); + m[te].push(q), g[te].push(q); + } else if (Te && te > 0) { + const q = tn(Te, Kl.cannotExtractReadonlyPropertyInitializerOutsideConstructor); + m[te].push(q), g[te].push(q); + } else if (C) { + const q = tn(C, Kl.cannotExtractExportedEntity); + m[te].push(q), g[te].push(q); + } + } + return { target: O, usagesPerScope: _, functionErrorsPerScope: m, constantErrorsPerScope: g, exposedVariableDeclarations: T }; + function W(te) { + return !!ur(te, (ie) => sB(ie) && My(ie).length !== 0); + } + function V(te) { + const ie = s.getSymbolWalker(() => (o.throwIfCancellationRequested(), !0)), { visitedTypes: le } = ie.walkType(te); + for (const Te of le) + Te.isTypeParameter() && c.set(Te.id.toString(), Te); + } + function $(te, ie = 1) { + if (R) { + const le = s.getTypeAtLocation(te); + V(le); + } + if (bl(te) && te.symbol && h.push(te), Cl(te)) + $( + te.left, + 2 + /* Write */ + ), $(te.right); + else if (fZ(te)) + $( + te.operand, + 2 + /* Write */ + ); + else if (Tn(te) || fo(te)) + ms(te, $); + else if (Me(te)) { + if (!te.parent || Xu(te.parent) && te !== te.parent.left || Tn(te.parent) && te !== te.parent.expression) + return; + U( + te, + ie, + /*isTypeNode*/ + im(te) + ); + } else + ms(te, $); + } + function U(te, ie, le) { + const Te = _e(te, ie, le); + if (Te) + for (let q = 0; q < t.length; q++) { + const me = u[q].get(Te); + me && _[q].substitutions.set(Aa(te).toString(), me); + } + } + function _e(te, ie, le) { + const Te = J(te); + if (!Te) + return; + const q = Zs(Te).toString(), me = A.get(q); + if (me && me >= ie) + return q; + if (A.set(q, ie), me) { + for (const oe of _) + oe.usages.get(te.text) && oe.usages.set(te.text, { usage: ie, symbol: Te, node: te }); + return q; + } + const Ce = Te.getDeclarations(), Ee = Ce && Pn(Ce, (oe) => oe.getSourceFile() === i); + if (Ee && !yA(n, Ee.getStart(), Ee.end)) { + if (e.facts & 2 && ie === 2) { + const oe = tn(te, Kl.cannotExtractRangeThatContainsWritesToReferencesLocatedOutsideOfTheTargetRangeInGenerators); + for (const ke of m) + ke.push(oe); + for (const ke of g) + ke.push(oe); + } + for (let oe = 0; oe < t.length; oe++) { + const ke = t[oe]; + if (s.resolveName( + Te.name, + ke, + Te.flags, + /*excludeGlobals*/ + !1 + ) !== Te && !u[oe].has(q)) { + const it = re(Te.exportSymbol || Te, ke, le); + if (it) + u[oe].set(q, it); + else if (le) { + if (!(Te.flags & 262144)) { + const Oe = tn(te, Kl.typeWillNotBeVisibleInTheNewScope); + m[oe].push(Oe), g[oe].push(Oe); + } + } else + _[oe].usages.set(te.text, { usage: ie, symbol: Te, node: te }); + } + } + return q; + } + } + function Z(te) { + if (te === e.range || V0(e.range) && e.range.includes(te)) + return; + const ie = Me(te) ? J(te) : s.getSymbolAtLocation(te); + if (ie) { + const le = Pn(h, (Te) => Te.symbol === ie); + if (le) + if (Kn(le)) { + const Te = le.symbol.id.toString(); + S.has(Te) || (T.push(le), S.set(Te, !0)); + } else + C = C || le; + } + ms(te, Z); + } + function J(te) { + return te.parent && _u(te.parent) && te.parent.name === te ? s.getShorthandAssignmentValueSymbol(te.parent) : s.getSymbolAtLocation(te); + } + function re(te, ie, le) { + if (!te) + return; + const Te = te.getDeclarations(); + if (Te && Te.some((me) => me.parent === ie)) + return N.createIdentifier(te.name); + const q = re(te.parent, ie, le); + if (q !== void 0) + return le ? N.createQualifiedName(q, N.createIdentifier(te.name)) : N.createPropertyAccessExpression(q, te.name); + } + } + function SUe(e) { + return ur(e, (t) => t.parent && XSe(t) && !fn(t.parent)); + } + function XSe(e) { + const { parent: t } = e; + switch (t.kind) { + case 306: + return !1; + } + switch (e.kind) { + case 11: + return t.kind !== 272 && t.kind !== 276; + case 230: + case 206: + case 208: + return !1; + case 80: + return t.kind !== 208 && t.kind !== 276 && t.kind !== 281; + } + return !0; + } + function Xoe(e) { + return Qoe(e) || (gm(e) || MS(e) || gv(e)) && (gm(e.parent) || gv(e.parent)); + } + function Qoe(e) { + return ea(e) && e.parent && hm(e.parent); + } + var TUe = {}, Mq = "Generate 'get' and 'set' accessors", Yoe = us(p.Generate_get_and_set_accessors), Zoe = { + name: Mq, + description: Yoe, + kind: "refactor.rewrite.property.generateAccessors" + }; + eh(Mq, { + kinds: [Zoe.kind], + getEditsForAction: function(t, n) { + if (!t.endPosition) return; + const i = Eu.getAccessorConvertiblePropertyAtPosition(t.file, t.program, t.startPosition, t.endPosition); + E.assert(i && !zh(i), "Expected applicable refactor info"); + const s = Eu.generateAccessorFromProperty(t.file, t.program, t.startPosition, t.endPosition, t, n); + if (!s) return; + const o = t.file.fileName, c = i.renameAccessor ? i.accessorName : i.fieldName, u = (Me(c) ? 0 : -1) + wA( + s, + o, + c.text, + /*preferLastLocation*/ + Ii(i.declaration) + ); + return { renameFilename: o, renameLocation: u, edits: s }; + }, + getAvailableActions(e) { + if (!e.endPosition) return He; + const t = Eu.getAccessorConvertiblePropertyAtPosition(e.file, e.program, e.startPosition, e.endPosition, e.triggerReason === "invoked"); + return t ? zh(t) ? e.preferences.provideRefactorNotApplicableReason ? [{ + name: Mq, + description: Yoe, + actions: [{ ...Zoe, notApplicableReason: t.error }] + }] : He : [{ + name: Mq, + description: Yoe, + actions: [Zoe] + }] : He; + } + }); + var xUe = {}, Rq = "Infer function return type", Koe = us(p.Infer_function_return_type), jq = { + name: Rq, + description: Koe, + kind: "refactor.rewrite.function.returnType" + }; + eh(Rq, { + kinds: [jq.kind], + getEditsForAction: kUe, + getAvailableActions: CUe + }); + function kUe(e) { + const t = QSe(e); + if (t && !zh(t)) + return { renameFilename: void 0, renameLocation: void 0, edits: sn.ChangeTracker.with(e, (i) => EUe(e.file, i, t.declaration, t.returnTypeNode)) }; + } + function CUe(e) { + const t = QSe(e); + return t ? zh(t) ? e.preferences.provideRefactorNotApplicableReason ? [{ + name: Rq, + description: Koe, + actions: [{ ...jq, notApplicableReason: t.error }] + }] : He : [{ + name: Rq, + description: Koe, + actions: [jq] + }] : He; + } + function EUe(e, t, n, i) { + const s = Xa(n, 22, e), o = bo(n) && s === void 0, c = o ? ya(n.parameters) : s; + c && (o && (t.insertNodeBefore(e, c, N.createToken( + 21 + /* OpenParenToken */ + )), t.insertNodeAfter(e, c, N.createToken( + 22 + /* CloseParenToken */ + ))), t.insertNodeAt(e, c.end, i, { prefix: ": " })); + } + function QSe(e) { + if (an(e.file) || !Iv(jq.kind, e.kind)) return; + const t = h_(e.file, e.startPosition), n = ur(t, (c) => ks(c) || c.parent && bo(c.parent) && (c.kind === 39 || c.parent.body === c) ? "quit" : DUe(c)); + if (!n || !n.body || n.type) + return { error: us(p.Return_type_must_be_inferred_from_a_function) }; + const i = e.program.getTypeChecker(); + let s; + if (i.isImplementationOfOverload(n)) { + const c = i.getTypeAtLocation(n).getCallSignatures(); + c.length > 1 && (s = i.getUnionType(Li(c, (_) => _.getReturnType()))); + } + if (!s) { + const c = i.getSignatureFromDeclaration(n); + if (c) { + const _ = i.getTypePredicateOfSignature(c); + if (_ && _.type) { + const u = i.typePredicateToTypePredicateNode( + _, + n, + 1, + 8 + /* AllowUnresolvedNames */ + ); + if (u) + return { declaration: n, returnTypeNode: u }; + } else + s = i.getReturnTypeOfSignature(c); + } + } + if (!s) + return { error: us(p.Could_not_determine_function_return_type) }; + const o = i.typeToTypeNode( + s, + n, + 1, + 8 + /* AllowUnresolvedNames */ + ); + if (o) + return { declaration: n, returnTypeNode: o }; + } + function DUe(e) { + switch (e.kind) { + case 262: + case 218: + case 219: + case 174: + return !0; + default: + return !1; + } + } + var YSe = /* @__PURE__ */ ((e) => (e[e.typeOffset = 8] = "typeOffset", e[e.modifierMask = 255] = "modifierMask", e))(YSe || {}), ZSe = /* @__PURE__ */ ((e) => (e[e.class = 0] = "class", e[e.enum = 1] = "enum", e[e.interface = 2] = "interface", e[e.namespace = 3] = "namespace", e[e.typeParameter = 4] = "typeParameter", e[e.type = 5] = "type", e[e.parameter = 6] = "parameter", e[e.variable = 7] = "variable", e[e.enumMember = 8] = "enumMember", e[e.property = 9] = "property", e[e.function = 10] = "function", e[e.member = 11] = "member", e))(ZSe || {}), KSe = /* @__PURE__ */ ((e) => (e[e.declaration = 0] = "declaration", e[e.static = 1] = "static", e[e.async = 2] = "async", e[e.readonly = 3] = "readonly", e[e.defaultLibrary = 4] = "defaultLibrary", e[e.local = 5] = "local", e))(KSe || {}); + function eTe(e, t, n, i) { + const s = ece(e, t, n, i); + E.assert(s.spans.length % 3 === 0); + const o = s.spans, c = []; + for (let _ = 0; _ < o.length; _ += 3) + c.push({ + textSpan: ql(o[_], o[_ + 1]), + classificationType: o[_ + 2] + }); + return c; + } + function ece(e, t, n, i) { + return { + spans: wUe(e, n, i, t), + endOfLineState: 0 + /* None */ + }; + } + function wUe(e, t, n, i) { + const s = []; + return e && t && PUe(e, t, n, (c, _, u) => { + s.push(c.getStart(t), c.getWidth(t), (_ + 1 << 8) + u); + }, i), s; + } + function PUe(e, t, n, i, s) { + const o = e.getTypeChecker(); + let c = !1; + function _(u) { + switch (u.kind) { + case 267: + case 263: + case 264: + case 262: + case 231: + case 218: + case 219: + s.throwIfCancellationRequested(); + } + if (!u || !NP(n, u.pos, u.getFullWidth()) || u.getFullWidth() === 0) + return; + const m = c; + if ((gm(u) || MS(u)) && (c = !0), n6(u) && (c = !1), Me(u) && !c && !FUe(u) && !lD(u.escapedText)) { + let g = o.getSymbolAtLocation(u); + if (g) { + g.flags & 2097152 && (g = o.getAliasedSymbol(g)); + let h = NUe(g, $S(u)); + if (h !== void 0) { + let S = 0; + u.parent && (ma(u.parent) || nTe.get(u.parent.kind) === h) && u.parent.name === u && (S = 1), h === 6 && rTe(u) && (h = 9), h = AUe(o, u, h); + const T = g.valueDeclaration; + if (T) { + const C = Q1(T), D = Ch(T); + C & 256 && (S |= 2), C & 1024 && (S |= 4), h !== 0 && h !== 2 && (C & 8 || D & 2 || g.getFlags() & 8) && (S |= 8), (h === 7 || h === 10) && IUe(T, t) && (S |= 32), e.isSourceFileDefaultLibrary(T.getSourceFile()) && (S |= 16); + } else g.declarations && g.declarations.some((C) => e.isSourceFileDefaultLibrary(C.getSourceFile())) && (S |= 16); + i(u, h, S); + } + } + } + ms(u, _), c = m; + } + _(t); + } + function NUe(e, t) { + const n = e.getFlags(); + if (n & 32) + return 0; + if (n & 384) + return 1; + if (n & 524288) + return 5; + if (n & 64) { + if (t & 2) + return 2; + } else if (n & 262144) + return 4; + let i = e.valueDeclaration || e.declarations && e.declarations[0]; + return i && ma(i) && (i = tTe(i)), i && nTe.get(i.kind); + } + function AUe(e, t, n) { + if (n === 7 || n === 9 || n === 6) { + const i = e.getTypeAtLocation(t); + if (i) { + const s = (o) => o(i) || i.isUnion() && i.types.some(o); + if (n !== 6 && s((o) => o.getConstructSignatures().length > 0)) + return 0; + if (s((o) => o.getCallSignatures().length > 0) && !s((o) => o.getProperties().length > 0) || OUe(t)) + return n === 9 ? 11 : 10; + } + } + return n; + } + function IUe(e, t) { + return ma(e) && (e = tTe(e)), Kn(e) ? (!Ei(e.parent.parent.parent) || t2(e.parent)) && e.getSourceFile() === t : Tc(e) ? !Ei(e.parent) && e.getSourceFile() === t : !1; + } + function tTe(e) { + for (; ; ) + if (ma(e.parent.parent)) + e = e.parent.parent; + else + return e.parent.parent; + } + function FUe(e) { + const t = e.parent; + return t && (id(t) || ju(t) || Yg(t)); + } + function OUe(e) { + for (; rTe(e); ) + e = e.parent; + return Fs(e.parent) && e.parent.expression === e; + } + function rTe(e) { + return Xu(e.parent) && e.parent.right === e || Tn(e.parent) && e.parent.name === e; + } + var nTe = /* @__PURE__ */ new Map([ + [ + 260, + 7 + /* variable */ + ], + [ + 169, + 6 + /* parameter */ + ], + [ + 172, + 9 + /* property */ + ], + [ + 267, + 3 + /* namespace */ + ], + [ + 266, + 1 + /* enum */ + ], + [ + 306, + 8 + /* enumMember */ + ], + [ + 263, + 0 + /* class */ + ], + [ + 174, + 11 + /* member */ + ], + [ + 262, + 10 + /* function */ + ], + [ + 218, + 10 + /* function */ + ], + [ + 173, + 11 + /* member */ + ], + [ + 177, + 9 + /* property */ + ], + [ + 178, + 9 + /* property */ + ], + [ + 171, + 9 + /* property */ + ], + [ + 264, + 2 + /* interface */ + ], + [ + 265, + 5 + /* type */ + ], + [ + 168, + 4 + /* typeParameter */ + ], + [ + 303, + 9 + /* property */ + ], + [ + 304, + 9 + /* property */ + ] + ]), iTe = "0.8"; + function sTe(e, t, n, i) { + const s = l7(e) ? new tce(e, t, n) : e === 80 ? new oTe(80, t, n) : e === 81 ? new cTe(81, t, n) : new aTe(e, t, n); + return s.parent = i, s.flags = i.flags & 101441536, s; + } + var tce = class { + constructor(e, t, n) { + this.pos = t, this.end = n, this.kind = e, this.id = 0, this.flags = 0, this.modifierFlagsCache = 0, this.transformFlags = 0, this.parent = void 0, this.original = void 0, this.emitNode = void 0; + } + assertHasRealPosition(e) { + E.assert(!kd(this.pos) && !kd(this.end), e || "Node must have a real position for this operation"); + } + getSourceFile() { + return Cr(this); + } + getStart(e, t) { + return this.assertHasRealPosition(), Vy(this, e, t); + } + getFullStart() { + return this.assertHasRealPosition(), this.pos; + } + getEnd() { + return this.assertHasRealPosition(), this.end; + } + getWidth(e) { + return this.assertHasRealPosition(), this.getEnd() - this.getStart(e); + } + getFullWidth() { + return this.assertHasRealPosition(), this.end - this.pos; + } + getLeadingTriviaWidth(e) { + return this.assertHasRealPosition(), this.getStart(e) - this.pos; + } + getFullText(e) { + return this.assertHasRealPosition(), (e || this.getSourceFile()).text.substring(this.pos, this.end); + } + getText(e) { + return this.assertHasRealPosition(), e || (e = this.getSourceFile()), e.text.substring(this.getStart(e), this.getEnd()); + } + getChildCount(e) { + return this.getChildren(e).length; + } + getChildAt(e, t) { + return this.getChildren(t)[e]; + } + getChildren(e = Cr(this)) { + return this.assertHasRealPosition("Node without a real position cannot be scanned and thus has no token nodes - use forEachChild and collect the result if that's fine"), lz(this, e) ?? Ote(this, e, LUe(this, e)); + } + getFirstToken(e) { + this.assertHasRealPosition(); + const t = this.getChildren(e); + if (!t.length) + return; + const n = Pn( + t, + (i) => i.kind < 309 || i.kind > 351 + /* LastJSDocNode */ + ); + return n.kind < 166 ? n : n.getFirstToken(e); + } + getLastToken(e) { + this.assertHasRealPosition(); + const t = this.getChildren(e), n = Co(t); + if (n) + return n.kind < 166 ? n : n.getLastToken(e); + } + forEachChild(e, t) { + return ms(this, e, t); + } + }; + function LUe(e, t) { + const n = []; + if (h7(e)) + return e.forEachChild((c) => { + n.push(c); + }), n; + Fl.setText((t || e.getSourceFile()).text); + let i = e.pos; + const s = (c) => { + rL(n, i, c.pos, e), n.push(c), i = c.end; + }, o = (c) => { + rL(n, i, c.pos, e), n.push(MUe(c, e)), i = c.end; + }; + return lr(e.jsDoc, s), i = e.pos, e.forEachChild(s, o), rL(n, i, e.end, e), Fl.setText(void 0), n; + } + function rL(e, t, n, i) { + for (Fl.resetTokenState(t); t < n; ) { + const s = Fl.scan(), o = Fl.getTokenEnd(); + if (o <= n) { + if (s === 80) { + if (Oee(i)) + continue; + E.fail(`Did not expect ${E.formatSyntaxKind(i.kind)} to have an Identifier in its trivia`); + } + e.push(sTe(s, t, o, i)); + } + if (t = o, s === 1) + break; + } + } + function MUe(e, t) { + const n = sTe(352, e.pos, e.end, t), i = []; + let s = e.pos; + for (const o of e) + rL(i, s, o.pos, t), i.push(o), s = o.end; + return rL(i, s, e.end, t), n._children = i, n; + } + var rce = class { + constructor(e, t, n) { + this.pos = t, this.end = n, this.kind = e, this.id = 0, this.flags = 0, this.transformFlags = 0, this.parent = void 0, this.emitNode = void 0; + } + getSourceFile() { + return Cr(this); + } + getStart(e, t) { + return Vy(this, e, t); + } + getFullStart() { + return this.pos; + } + getEnd() { + return this.end; + } + getWidth(e) { + return this.getEnd() - this.getStart(e); + } + getFullWidth() { + return this.end - this.pos; + } + getLeadingTriviaWidth(e) { + return this.getStart(e) - this.pos; + } + getFullText(e) { + return (e || this.getSourceFile()).text.substring(this.pos, this.end); + } + getText(e) { + return e || (e = this.getSourceFile()), e.text.substring(this.getStart(e), this.getEnd()); + } + getChildCount() { + return this.getChildren().length; + } + getChildAt(e) { + return this.getChildren()[e]; + } + getChildren() { + return this.kind === 1 && this.jsDoc || He; + } + getFirstToken() { + } + getLastToken() { + } + forEachChild() { + } + }, RUe = class { + constructor(e, t) { + this.flags = e, this.escapedName = t, this.declarations = void 0, this.valueDeclaration = void 0, this.id = 0, this.mergeId = 0, this.parent = void 0, this.members = void 0, this.exports = void 0, this.exportSymbol = void 0, this.constEnumOnlyModule = void 0, this.isReferenced = void 0, this.lastAssignmentPos = void 0, this.links = void 0; + } + getFlags() { + return this.flags; + } + get name() { + return _c(this); + } + getEscapedName() { + return this.escapedName; + } + getName() { + return this.name; + } + getDeclarations() { + return this.declarations; + } + getDocumentationComment(e) { + if (!this.documentationComment) + if (this.documentationComment = He, !this.declarations && Rg(this) && this.links.target && Rg(this.links.target) && this.links.target.links.tupleLabelDeclaration) { + const t = this.links.target.links.tupleLabelDeclaration; + this.documentationComment = nL([t], e); + } else + this.documentationComment = nL(this.declarations, e); + return this.documentationComment; + } + getContextualDocumentationComment(e, t) { + if (e) { + if (k0(e) && (this.contextualGetAccessorDocumentationComment || (this.contextualGetAccessorDocumentationComment = He, this.contextualGetAccessorDocumentationComment = nL(kn(this.declarations, k0), t)), Ir(this.contextualGetAccessorDocumentationComment))) + return this.contextualGetAccessorDocumentationComment; + if (Mg(e) && (this.contextualSetAccessorDocumentationComment || (this.contextualSetAccessorDocumentationComment = He, this.contextualSetAccessorDocumentationComment = nL(kn(this.declarations, Mg), t)), Ir(this.contextualSetAccessorDocumentationComment))) + return this.contextualSetAccessorDocumentationComment; + } + return this.getDocumentationComment(t); + } + getJsDocTags(e) { + return this.tags === void 0 && (this.tags = He, this.tags = Bq(this.declarations, e)), this.tags; + } + getContextualJsDocTags(e, t) { + if (e) { + if (k0(e) && (this.contextualGetAccessorTags || (this.contextualGetAccessorTags = He, this.contextualGetAccessorTags = Bq(kn(this.declarations, k0), t)), Ir(this.contextualGetAccessorTags))) + return this.contextualGetAccessorTags; + if (Mg(e) && (this.contextualSetAccessorTags || (this.contextualSetAccessorTags = He, this.contextualSetAccessorTags = Bq(kn(this.declarations, Mg), t)), Ir(this.contextualSetAccessorTags))) + return this.contextualSetAccessorTags; + } + return this.getJsDocTags(t); + } + }, aTe = class extends rce { + constructor(e, t, n) { + super(e, t, n); + } + }, oTe = class extends rce { + constructor(e, t, n) { + super(e, t, n); + } + get text() { + return An(this); + } + }, cTe = class extends rce { + constructor(e, t, n) { + super(e, t, n); + } + get text() { + return An(this); + } + }, jUe = class { + constructor(e, t) { + this.flags = t, this.checker = e; + } + getFlags() { + return this.flags; + } + getSymbol() { + return this.symbol; + } + getProperties() { + return this.checker.getPropertiesOfType(this); + } + getProperty(e) { + return this.checker.getPropertyOfType(this, e); + } + getApparentProperties() { + return this.checker.getAugmentedPropertiesOfType(this); + } + getCallSignatures() { + return this.checker.getSignaturesOfType( + this, + 0 + /* Call */ + ); + } + getConstructSignatures() { + return this.checker.getSignaturesOfType( + this, + 1 + /* Construct */ + ); + } + getStringIndexType() { + return this.checker.getIndexTypeOfType( + this, + 0 + /* String */ + ); + } + getNumberIndexType() { + return this.checker.getIndexTypeOfType( + this, + 1 + /* Number */ + ); + } + getBaseTypes() { + return this.isClassOrInterface() ? this.checker.getBaseTypes(this) : void 0; + } + isNullableType() { + return this.checker.isNullableType(this); + } + getNonNullableType() { + return this.checker.getNonNullableType(this); + } + getNonOptionalType() { + return this.checker.getNonOptionalType(this); + } + getConstraint() { + return this.checker.getBaseConstraintOfType(this); + } + getDefault() { + return this.checker.getDefaultFromTypeParameter(this); + } + isUnion() { + return !!(this.flags & 1048576); + } + isIntersection() { + return !!(this.flags & 2097152); + } + isUnionOrIntersection() { + return !!(this.flags & 3145728); + } + isLiteral() { + return !!(this.flags & 2432); + } + isStringLiteral() { + return !!(this.flags & 128); + } + isNumberLiteral() { + return !!(this.flags & 256); + } + isTypeParameter() { + return !!(this.flags & 262144); + } + isClassOrInterface() { + return !!(Cn(this) & 3); + } + isClass() { + return !!(Cn(this) & 1); + } + isIndexType() { + return !!(this.flags & 4194304); + } + /** + * This polyfills `referenceType.typeArguments` for API consumers + */ + get typeArguments() { + if (Cn(this) & 4) + return this.checker.getTypeArguments(this); + } + }, BUe = class { + // same + constructor(e, t) { + this.flags = t, this.checker = e; + } + getDeclaration() { + return this.declaration; + } + getTypeParameters() { + return this.typeParameters; + } + getParameters() { + return this.parameters; + } + getReturnType() { + return this.checker.getReturnTypeOfSignature(this); + } + getTypeParameterAtPosition(e) { + const t = this.checker.getParameterType(this, e); + if (t.isIndexType() && uD(t.type)) { + const n = t.type.getConstraint(); + if (n) + return this.checker.getIndexType(n); + } + return t; + } + getDocumentationComment() { + return this.documentationComment || (this.documentationComment = nL(QT(this.declaration), this.checker)); + } + getJsDocTags() { + return this.jsDocTags || (this.jsDocTags = Bq(QT(this.declaration), this.checker)); + } + }; + function lTe(e) { + return Z1(e).some((t) => t.tagName.text === "inheritDoc" || t.tagName.text === "inheritdoc"); + } + function Bq(e, t) { + if (!e) return He; + let n = Lv.getJsDocTagsFromDeclarations(e, t); + if (t && (n.length === 0 || e.some(lTe))) { + const i = /* @__PURE__ */ new Set(); + for (const s of e) { + const o = uTe(t, s, (c) => { + var _; + if (!i.has(c)) + return i.add(c), s.kind === 177 || s.kind === 178 ? c.getContextualJsDocTags(s, t) : ((_ = c.declarations) == null ? void 0 : _.length) === 1 ? c.getJsDocTags(t) : void 0; + }); + o && (n = [...o, ...n]); + } + } + return n; + } + function nL(e, t) { + if (!e) return He; + let n = Lv.getJsDocCommentsFromDeclarations(e, t); + if (t && (n.length === 0 || e.some(lTe))) { + const i = /* @__PURE__ */ new Set(); + for (const s of e) { + const o = uTe(t, s, (c) => { + if (!i.has(c)) + return i.add(c), s.kind === 177 || s.kind === 178 ? c.getContextualDocumentationComment(s, t) : c.getDocumentationComment(t); + }); + o && (n = n.length === 0 ? o.slice() : o.concat(R6(), n)); + } + } + return n; + } + function uTe(e, t, n) { + var i; + const s = ((i = t.parent) == null ? void 0 : i.kind) === 176 ? t.parent.parent : t.parent; + if (!s) return; + const o = Kc(t); + return Dc(j4(s), (c) => { + const _ = e.getTypeAtLocation(c), u = o && _.symbol ? e.getTypeOfSymbol(_.symbol) : _, m = e.getPropertyOfType(u, t.symbol.name); + return m ? n(m) : void 0; + }); + } + var JUe = class extends tce { + constructor(e, t, n) { + super(e, t, n); + } + update(e, t) { + return kz(this, e, t); + } + getLineAndCharacterOfPosition(e) { + return js(this, e); + } + getLineStarts() { + return Ag(this); + } + getPositionOfLineAndCharacter(e, t, n) { + return ZI(Ag(this), e, t, this.text, n); + } + getLineEndOfPosition(e) { + const { line: t } = this.getLineAndCharacterOfPosition(e), n = this.getLineStarts(); + let i; + t + 1 >= n.length && (i = this.getEnd()), i || (i = n[t + 1] - 1); + const s = this.getFullText(); + return s[i] === ` +` && s[i - 1] === "\r" ? i - 1 : i; + } + getNamedDeclarations() { + return this.namedDeclarations || (this.namedDeclarations = this.computeNamedDeclarations()), this.namedDeclarations; + } + computeNamedDeclarations() { + const e = wp(); + return this.forEachChild(s), e; + function t(o) { + const c = i(o); + c && e.add(c, o); + } + function n(o) { + let c = e.get(o); + return c || e.set(o, c = []), c; + } + function i(o) { + const c = t7(o); + return c && (fa(c) && Tn(c.expression) ? c.expression.name.text : Fc(c) ? xA(c) : void 0); + } + function s(o) { + switch (o.kind) { + case 262: + case 218: + case 174: + case 173: + const c = o, _ = i(c); + if (_) { + const g = n(_), h = Co(g); + h && c.parent === h.parent && c.symbol === h.symbol ? c.body && !h.body && (g[g.length - 1] = c) : g.push(c); + } + ms(o, s); + break; + case 263: + case 231: + case 264: + case 265: + case 266: + case 267: + case 271: + case 281: + case 276: + case 273: + case 274: + case 177: + case 178: + case 187: + t(o), ms(o, s); + break; + case 169: + if (!$n( + o, + 31 + /* ParameterPropertyModifier */ + )) + break; + // falls through + case 260: + case 208: { + const g = o; + if (Ds(g.name)) { + ms(g.name, s); + break; + } + g.initializer && s(g.initializer); + } + // falls through + case 306: + case 172: + case 171: + t(o); + break; + case 278: + const u = o; + u.exportClause && (up(u.exportClause) ? lr(u.exportClause.elements, s) : s(u.exportClause.name)); + break; + case 272: + const m = o.importClause; + m && (m.name && t(m.name), m.namedBindings && (m.namedBindings.kind === 274 ? t(m.namedBindings) : lr(m.namedBindings.elements, s))); + break; + case 226: + Sc(o) !== 0 && t(o); + // falls through + default: + ms(o, s); + } + } + } + }, zUe = class { + constructor(e, t, n) { + this.fileName = e, this.text = t, this.skipTrivia = n || ((i) => i); + } + getLineAndCharacterOfPosition(e) { + return js(this, e); + } + }; + function WUe() { + return { + getNodeConstructor: () => tce, + getTokenConstructor: () => aTe, + getIdentifierConstructor: () => oTe, + getPrivateIdentifierConstructor: () => cTe, + getSourceFileConstructor: () => JUe, + getSymbolConstructor: () => RUe, + getTypeConstructor: () => jUe, + getSignatureConstructor: () => BUe, + getSourceMapSourceConstructor: () => zUe + }; + } + function zA(e) { + let t = !0; + for (const i in e) + if (ro(e, i) && !_Te(i)) { + t = !1; + break; + } + if (t) + return e; + const n = {}; + for (const i in e) + if (ro(e, i)) { + const s = _Te(i) ? i : i.charAt(0).toLowerCase() + i.substr(1); + n[s] = e[i]; + } + return n; + } + function _Te(e) { + return !e.length || e.charAt(0) === e.charAt(0).toLowerCase(); + } + function WA(e) { + return e ? gr(e, (t) => t.text).join("") : ""; + } + function iL() { + return { + target: 1, + jsx: 1 + /* Preserve */ + }; + } + function Jq() { + return Eu.getSupportedErrorCodes(); + } + var UUe = class { + constructor(e) { + this.host = e; + } + getCurrentSourceFile(e) { + var t, n, i, s, o, c, _, u; + const m = this.host.getScriptSnapshot(e); + if (!m) + throw new Error("Could not find file: '" + e + "'."); + const g = BV(e, this.host), h = this.host.getScriptVersion(e); + let S; + if (this.currentFileName !== e) { + const T = { + languageVersion: 99, + impliedNodeFormat: nA( + oo(e, this.host.getCurrentDirectory(), ((i = (n = (t = this.host).getCompilerHost) == null ? void 0 : n.call(t)) == null ? void 0 : i.getCanonicalFileName) || Nh(this.host)), + (u = (_ = (c = (o = (s = this.host).getCompilerHost) == null ? void 0 : o.call(s)) == null ? void 0 : c.getModuleResolutionCache) == null ? void 0 : _.call(c)) == null ? void 0 : u.getPackageJsonInfoCache(), + this.host, + this.host.getCompilationSettings() + ), + setExternalModuleIndicator: q3(this.host.getCompilationSettings()), + // These files are used to produce syntax-based highlighting, which reads JSDoc, so we must use ParseAll. + jsDocParsingMode: 0 + /* ParseAll */ + }; + S = sL( + e, + m, + T, + h, + /*setNodeParents*/ + !0, + g + ); + } else if (this.currentFileVersion !== h) { + const T = m.getChangeRange(this.currentFileScriptSnapshot); + S = zq(this.currentSourceFile, m, h, T); + } + return S && (this.currentFileVersion = h, this.currentFileName = e, this.currentFileScriptSnapshot = m, this.currentSourceFile = S), this.currentSourceFile; + } + }; + function fTe(e, t, n) { + e.version = n, e.scriptSnapshot = t; + } + function sL(e, t, n, i, s, o) { + const c = Zx(e, uk(t), n, s, o); + return fTe(c, t, i), c; + } + function zq(e, t, n, i, s) { + if (i && n !== e.version) { + let c; + const _ = i.span.start !== 0 ? e.text.substr(0, i.span.start) : "", u = Yo(i.span) !== e.text.length ? e.text.substr(Yo(i.span)) : ""; + if (i.newLength === 0) + c = _ && u ? _ + u : _ || u; + else { + const g = t.getText(i.span.start, i.span.start + i.newLength); + c = _ && u ? _ + g + u : _ ? _ + g : g + u; + } + const m = kz(e, c, i, s); + return fTe(m, t, n), m.nameTable = void 0, e !== m && e.scriptSnapshot && (e.scriptSnapshot.dispose && e.scriptSnapshot.dispose(), e.scriptSnapshot = void 0), m; + } + const o = { + languageVersion: e.languageVersion, + impliedNodeFormat: e.impliedNodeFormat, + setExternalModuleIndicator: e.setExternalModuleIndicator, + jsDocParsingMode: e.jsDocParsingMode + }; + return sL( + e.fileName, + t, + o, + n, + /*setNodeParents*/ + !0, + e.scriptKind + ); + } + var VUe = { + isCancellationRequested: Th, + throwIfCancellationRequested: Ja + }, qUe = class { + constructor(e) { + this.cancellationToken = e; + } + isCancellationRequested() { + return this.cancellationToken.isCancellationRequested(); + } + throwIfCancellationRequested() { + var e; + if (this.isCancellationRequested()) + throw (e = nn) == null || e.instant(nn.Phase.Session, "cancellationThrown", { kind: "CancellationTokenObject" }), new t4(); + } + }, nce = class { + constructor(e, t = 20) { + this.hostCancellationToken = e, this.throttleWaitMilliseconds = t, this.lastCancellationCheckTime = 0; + } + isCancellationRequested() { + const e = ao(); + return Math.abs(e - this.lastCancellationCheckTime) >= this.throttleWaitMilliseconds ? (this.lastCancellationCheckTime = e, this.hostCancellationToken.isCancellationRequested()) : !1; + } + throwIfCancellationRequested() { + var e; + if (this.isCancellationRequested()) + throw (e = nn) == null || e.instant(nn.Phase.Session, "cancellationThrown", { kind: "ThrottledCancellationToken" }), new t4(); + } + }, pTe = [ + "getSemanticDiagnostics", + "getSuggestionDiagnostics", + "getCompilerOptionsDiagnostics", + "getSemanticClassifications", + "getEncodedSemanticClassifications", + "getCodeFixesAtPosition", + "getCombinedCodeFix", + "applyCodeActionCommand", + "organizeImports", + "getEditsForFileRename", + "getEmitOutput", + "getApplicableRefactors", + "getEditsForRefactor", + "prepareCallHierarchy", + "provideCallHierarchyIncomingCalls", + "provideCallHierarchyOutgoingCalls", + "provideInlayHints", + "getSupportedCodeFixes", + "getPasteEdits" + ], HUe = [ + ...pTe, + "getCompletionsAtPosition", + "getCompletionEntryDetails", + "getCompletionEntrySymbol", + "getSignatureHelpItems", + "getQuickInfoAtPosition", + "getDefinitionAtPosition", + "getDefinitionAndBoundSpan", + "getImplementationAtPosition", + "getTypeDefinitionAtPosition", + "getReferencesAtPosition", + "findReferences", + "getDocumentHighlights", + "getNavigateToItems", + "getRenameInfo", + "findRenameLocations", + "getApplicableRefactors", + "preparePasteEditsForFile" + ]; + function ice(e, t = wae(e.useCaseSensitiveFileNames && e.useCaseSensitiveFileNames(), e.getCurrentDirectory(), e.jsDocParsingMode), n) { + var i; + let s; + n === void 0 ? s = 0 : typeof n == "boolean" ? s = n ? 2 : 0 : s = n; + const o = new UUe(e); + let c, _, u = 0; + const m = e.getCancellationToken ? new qUe(e.getCancellationToken()) : VUe, g = e.getCurrentDirectory(); + aee((i = e.getLocalizedDiagnosticMessages) == null ? void 0 : i.bind(e)); + function h(tt) { + e.log && e.log(tt); + } + const S = xS(e), T = Wl(S), C = Wae({ + useCaseSensitiveFileNames: () => S, + getCurrentDirectory: () => g, + getProgram: O, + fileExists: Is(e, e.fileExists), + readFile: Is(e, e.readFile), + getDocumentPositionMapper: Is(e, e.getDocumentPositionMapper), + getSourceFileLike: Is(e, e.getSourceFileLike), + log: h + }); + function D(tt) { + const ut = c.getSourceFile(tt); + if (!ut) { + const Mt = new Error(`Could not find source file: '${tt}'.`); + throw Mt.ProgramFiles = c.getSourceFiles().map((Pt) => Pt.fileName), Mt; + } + return ut; + } + function w() { + e.updateFromProject && !e.updateFromProjectInProgress ? e.updateFromProject() : A(); + } + function A() { + var tt, ut, Mt; + if (E.assert( + s !== 2 + /* Syntactic */ + ), e.getProjectVersion) { + const Zi = e.getProjectVersion(); + if (Zi) { + if (_ === Zi && !((tt = e.hasChangedAutomaticTypeDirectiveNames) != null && tt.call(e))) + return; + _ = Zi; + } + } + const Pt = e.getTypeRootsVersion ? e.getTypeRootsVersion() : 0; + u !== Pt && (h("TypeRoots version has changed; provide new program"), c = void 0, u = Pt); + const Zt = e.getScriptFileNames().slice(), fr = e.getCompilationSettings() || iL(), Vt = e.hasInvalidatedResolutions || Th, ir = Is(e, e.hasInvalidatedLibResolutions) || Th, Tr = Is(e, e.hasChangedAutomaticTypeDirectiveNames), _r = (ut = e.getProjectReferences) == null ? void 0 : ut.call(e); + let Ot, mi = { + getSourceFile: Yc, + getSourceFileByPath: Sl, + getCancellationToken: () => m, + getCanonicalFileName: T, + useCaseSensitiveFileNames: () => S, + getNewLine: () => N0(fr), + getDefaultLibFileName: (Zi) => e.getDefaultLibFileName(Zi), + writeFile: Ja, + getCurrentDirectory: () => g, + fileExists: (Zi) => e.fileExists(Zi), + readFile: (Zi) => e.readFile && e.readFile(Zi), + getSymlinkCache: Is(e, e.getSymlinkCache), + realpath: Is(e, e.realpath), + directoryExists: (Zi) => xd(Zi, e), + getDirectories: (Zi) => e.getDirectories ? e.getDirectories(Zi) : [], + readDirectory: (Zi, Gs, Ca, Oi, qt) => (E.checkDefined(e.readDirectory, "'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"), e.readDirectory(Zi, Gs, Ca, Oi, qt)), + onReleaseOldSourceFile: Bu, + onReleaseParsedCommandLine: eu, + hasInvalidatedResolutions: Vt, + hasInvalidatedLibResolutions: ir, + hasChangedAutomaticTypeDirectiveNames: Tr, + trace: Is(e, e.trace), + resolveModuleNames: Is(e, e.resolveModuleNames), + getModuleResolutionCache: Is(e, e.getModuleResolutionCache), + createHash: Is(e, e.createHash), + resolveTypeReferenceDirectives: Is(e, e.resolveTypeReferenceDirectives), + resolveModuleNameLiterals: Is(e, e.resolveModuleNameLiterals), + resolveTypeReferenceDirectiveReferences: Is(e, e.resolveTypeReferenceDirectiveReferences), + resolveLibrary: Is(e, e.resolveLibrary), + useSourceOfProjectReferenceRedirect: Is(e, e.useSourceOfProjectReferenceRedirect), + getParsedCommandLine: ri, + jsDocParsingMode: e.jsDocParsingMode, + getGlobalTypingsCacheLocation: Is(e, e.getGlobalTypingsCacheLocation) + }; + const Js = mi.getSourceFile, { getSourceFileWithCache: Ms } = QD( + mi, + (Zi) => oo(Zi, g, T), + (...Zi) => Js.call(mi, ...Zi) + ); + mi.getSourceFile = Ms, (Mt = e.setCompilerHost) == null || Mt.call(e, mi); + const Ns = { + useCaseSensitiveFileNames: S, + fileExists: (Zi) => mi.fileExists(Zi), + readFile: (Zi) => mi.readFile(Zi), + directoryExists: (Zi) => mi.directoryExists(Zi), + getDirectories: (Zi) => mi.getDirectories(Zi), + realpath: mi.realpath, + readDirectory: (...Zi) => mi.readDirectory(...Zi), + trace: mi.trace, + getCurrentDirectory: mi.getCurrentDirectory, + onUnRecoverableConfigFileDiagnostic: Ja + }, kc = t.getKeyForCompilationSettings(fr); + let Wo = /* @__PURE__ */ new Set(); + if (rU(c, Zt, fr, (Zi, Gs) => e.getScriptVersion(Gs), (Zi) => mi.fileExists(Zi), Vt, ir, Tr, ri, _r)) { + mi = void 0, Ot = void 0, Wo = void 0; + return; + } + c = iA({ + rootNames: Zt, + options: fr, + host: mi, + oldProgram: c, + projectReferences: _r + }), mi = void 0, Ot = void 0, Wo = void 0, C.clearCache(), c.getTypeChecker(); + return; + function ri(Zi) { + const Gs = oo(Zi, g, T), Ca = Ot?.get(Gs); + if (Ca !== void 0) return Ca || void 0; + const Oi = e.getParsedCommandLine ? e.getParsedCommandLine(Zi) : zs(Zi); + return (Ot || (Ot = /* @__PURE__ */ new Map())).set(Gs, Oi || !1), Oi; + } + function zs(Zi) { + const Gs = Yc( + Zi, + 100 + /* JSON */ + ); + if (Gs) + return Gs.path = oo(Zi, g, T), Gs.resolvedPath = Gs.path, Gs.originalFileName = Gs.fileName, LN( + Gs, + Ns, + Xi(Hn(Zi), g), + /*existingOptions*/ + void 0, + Xi(Zi, g) + ); + } + function eu(Zi, Gs, Ca) { + var Oi; + e.getParsedCommandLine ? (Oi = e.onReleaseParsedCommandLine) == null || Oi.call(e, Zi, Gs, Ca) : Gs && hs(Gs.sourceFile, Ca); + } + function hs(Zi, Gs) { + const Ca = t.getKeyForCompilationSettings(Gs); + t.releaseDocumentWithKey(Zi.resolvedPath, Ca, Zi.scriptKind, Zi.impliedNodeFormat); + } + function Bu(Zi, Gs, Ca, Oi) { + var qt; + hs(Zi, Gs), (qt = e.onReleaseOldSourceFile) == null || qt.call(e, Zi, Gs, Ca, Oi); + } + function Yc(Zi, Gs, Ca, Oi) { + return Sl(Zi, oo(Zi, g, T), Gs, Ca, Oi); + } + function Sl(Zi, Gs, Ca, Oi, qt) { + E.assert(mi, "getOrCreateSourceFileByPath called after typical CompilerHost lifetime, check the callstack something with a reference to an old host."); + const Qa = e.getScriptSnapshot(Zi); + if (!Qa) + return; + const Mc = BV(Zi, e), Ol = e.getScriptVersion(Zi); + if (!qt) { + const Ll = c && c.getSourceFileByPath(Gs); + if (Ll) { + if (Mc === Ll.scriptKind || Wo.has(Ll.resolvedPath)) + return t.updateDocumentWithKey(Zi, Gs, e, kc, Qa, Ol, Mc, Ca); + t.releaseDocumentWithKey(Ll.resolvedPath, t.getKeyForCompilationSettings(c.getCompilerOptions()), Ll.scriptKind, Ll.impliedNodeFormat), Wo.add(Ll.resolvedPath); + } + } + return t.acquireDocumentWithKey(Zi, Gs, e, kc, Qa, Ol, Mc, Ca); + } + } + function O() { + if (s === 2) { + E.assert(c === void 0); + return; + } + return w(), c; + } + function F() { + var tt; + return (tt = e.getPackageJsonAutoImportProvider) == null ? void 0 : tt.call(e); + } + function R(tt, ut) { + const Mt = c.getTypeChecker(), Pt = Zt(); + if (!Pt) return !1; + for (const Vt of tt) + for (const ir of Vt.references) { + const Tr = fr(ir); + if (E.assertIsDefined(Tr), ut.has(ir) || So.isDeclarationOfSymbol(Tr, Pt)) { + ut.add(ir), ir.isDefinition = !0; + const _r = C9(ir, C, Is(e, e.fileExists)); + _r && ut.add(_r); + } else + ir.isDefinition = !1; + } + return !0; + function Zt() { + for (const Vt of tt) + for (const ir of Vt.references) { + if (ut.has(ir)) { + const _r = fr(ir); + return E.assertIsDefined(_r), Mt.getSymbolAtLocation(_r); + } + const Tr = C9(ir, C, Is(e, e.fileExists)); + if (Tr && ut.has(Tr)) { + const _r = fr(Tr); + if (_r) + return Mt.getSymbolAtLocation(_r); + } + } + } + function fr(Vt) { + const ir = c.getSourceFile(Vt.fileName); + if (!ir) return; + const Tr = h_(ir, Vt.textSpan.start); + return So.Core.getAdjustedNode(Tr, { use: So.FindReferencesUse.References }); + } + } + function W() { + if (c) { + const tt = t.getKeyForCompilationSettings(c.getCompilerOptions()); + lr(c.getSourceFiles(), (ut) => t.releaseDocumentWithKey(ut.resolvedPath, tt, ut.scriptKind, ut.impliedNodeFormat)), c = void 0; + } + } + function V() { + W(), e = void 0; + } + function $(tt) { + return w(), c.getSyntacticDiagnostics(D(tt), m).slice(); + } + function U(tt) { + w(); + const ut = D(tt), Mt = c.getSemanticDiagnostics(ut, m); + if (!N_(c.getCompilerOptions())) + return Mt.slice(); + const Pt = c.getDeclarationDiagnostics(ut, m); + return [...Mt, ...Pt]; + } + function _e(tt, ut) { + w(); + const Mt = D(tt), Pt = c.getCompilerOptions(); + if ($C(Mt, Pt, c) || !sD(Mt, Pt) || c.getCachedSemanticDiagnostics(Mt)) + return; + const Zt = Z(Mt, ut); + if (!Zt) + return; + const fr = yj(Zt.map((ir) => bc(ir.getFullStart(), ir.getEnd()))); + return { + diagnostics: c.getSemanticDiagnostics(Mt, m, Zt).slice(), + spans: fr + }; + } + function Z(tt, ut) { + const Mt = [], Pt = yj(ut.map((Zt) => W0(Zt))); + for (const Zt of Pt) { + const fr = J(tt, Zt); + if (!fr) + return; + Mt.push(...fr); + } + if (Mt.length) + return Mt; + } + function J(tt, ut) { + if (hj(ut, tt)) + return; + const Mt = sw(tt, Yo(ut)) || tt, Pt = ur(Mt, (fr) => IY(fr, ut)), Zt = []; + if (re(ut, Pt, Zt), tt.end === ut.start + ut.length && Zt.push(tt.endOfFileToken), !at(Zt, Ei)) + return Zt; + } + function re(tt, ut, Mt) { + return te(ut, tt) ? hj(tt, ut) ? (ie(ut, Mt), !0) : fk(ut) ? le(tt, ut, Mt) : Zn(ut) ? Te(tt, ut, Mt) : (ie(ut, Mt), !0) : !1; + } + function te(tt, ut) { + const Mt = ut.start + ut.length; + return tt.pos < Mt && tt.end > ut.start; + } + function ie(tt, ut) { + for (; tt.parent && !jee(tt); ) + tt = tt.parent; + ut.push(tt); + } + function le(tt, ut, Mt) { + const Pt = []; + return ut.statements.filter((fr) => re(tt, fr, Pt)).length === ut.statements.length ? (ie(ut, Mt), !0) : (Mt.push(...Pt), !1); + } + function Te(tt, ut, Mt) { + var Pt, Zt, fr; + const Vt = (_r) => MY(_r, tt); + if ((Pt = ut.modifiers) != null && Pt.some(Vt) || ut.name && Vt(ut.name) || (Zt = ut.typeParameters) != null && Zt.some(Vt) || (fr = ut.heritageClauses) != null && fr.some(Vt)) + return ie(ut, Mt), !0; + const ir = []; + return ut.members.filter((_r) => re(tt, _r, ir)).length === ut.members.length ? (ie(ut, Mt), !0) : (Mt.push(...ir), !1); + } + function q(tt) { + return w(), pq(D(tt), c, m); + } + function me() { + return w(), [...c.getOptionsDiagnostics(m), ...c.getGlobalDiagnostics(m)]; + } + function Ce(tt, ut, Mt = zp, Pt) { + const Zt = { + ...Mt, + // avoid excess property check + includeCompletionsForModuleExports: Mt.includeCompletionsForModuleExports || Mt.includeExternalModuleExports, + includeCompletionsWithInsertText: Mt.includeCompletionsWithInsertText || Mt.includeInsertTextCompletions + }; + return w(), bk.getCompletionsAtPosition( + e, + c, + h, + D(tt), + ut, + Zt, + Mt.triggerCharacter, + Mt.triggerKind, + m, + Pt && Qc.getFormatContext(Pt, e), + Mt.includeSymbol + ); + } + function Ee(tt, ut, Mt, Pt, Zt, fr = zp, Vt) { + return w(), bk.getCompletionEntryDetails( + c, + h, + D(tt), + ut, + { name: Mt, source: Zt, data: Vt }, + e, + Pt && Qc.getFormatContext(Pt, e), + // TODO: GH#18217 + fr, + m + ); + } + function oe(tt, ut, Mt, Pt, Zt = zp) { + return w(), bk.getCompletionEntrySymbol(c, h, D(tt), ut, { name: Mt, source: Pt }, e, Zt); + } + function ke(tt, ut) { + w(); + const Mt = D(tt), Pt = h_(Mt, ut); + if (Pt === Mt) + return; + const Zt = c.getTypeChecker(), fr = Oe(Pt), Vt = QUe(fr, Zt); + if (!Vt || Zt.isUnknownSymbol(Vt)) { + const mi = xe(Mt, fr, ut) ? Zt.getTypeAtLocation(fr) : void 0; + return mi && { + kind: "", + kindModifiers: "", + textSpan: e_(fr, Mt), + displayParts: Zt.runWithCancellationToken(m, (Js) => EA(Js, mi, XS(fr))), + documentation: mi.symbol ? mi.symbol.getDocumentationComment(Zt) : void 0, + tags: mi.symbol ? mi.symbol.getJsDocTags(Zt) : void 0 + }; + } + const { symbolKind: ir, displayParts: Tr, documentation: _r, tags: Ot } = Zt.runWithCancellationToken(m, (mi) => q0.getSymbolDisplayPartsDocumentationAndSymbolKind(mi, Vt, Mt, XS(fr), fr)); + return { + kind: ir, + kindModifiers: q0.getSymbolModifiers(Zt, Vt), + textSpan: e_(fr, Mt), + displayParts: Tr, + documentation: _r, + tags: Ot + }; + } + function ue(tt, ut) { + return w(), ZH.preparePasteEdits( + D(tt), + ut, + c.getTypeChecker() + ); + } + function it(tt, ut) { + return w(), KH.pasteEditsProvider( + D(tt.targetFile), + tt.pastedText, + tt.pasteLocations, + tt.copiedFrom ? { file: D(tt.copiedFrom.file), range: tt.copiedFrom.range } : void 0, + e, + tt.preferences, + Qc.getFormatContext(ut, e), + m + ); + } + function Oe(tt) { + return Yb(tt.parent) && tt.pos === tt.parent.pos ? tt.parent.expression : KC(tt.parent) && tt.pos === tt.parent.pos || PC(tt.parent) && tt.parent.name === tt || wd(tt.parent) ? tt.parent : tt; + } + function xe(tt, ut, Mt) { + switch (ut.kind) { + case 80: + return ut.flags & 16777216 && !an(ut) && (ut.parent.kind === 171 && ut.parent.name === ut || ur( + ut, + (Pt) => Pt.kind === 169 + /* Parameter */ + )) ? !1 : !sV(ut) && !aV(ut) && !Kp(ut.parent); + case 211: + case 166: + return !J0(tt, Mt); + case 110: + case 197: + case 108: + case 202: + return !0; + case 236: + return PC(ut); + default: + return !1; + } + } + function he(tt, ut, Mt, Pt) { + return w(), H6.getDefinitionAtPosition(c, D(tt), ut, Mt, Pt); + } + function ne(tt, ut) { + return w(), H6.getDefinitionAndBoundSpan(c, D(tt), ut); + } + function Ae(tt, ut) { + return w(), H6.getTypeDefinitionAtPosition(c.getTypeChecker(), D(tt), ut); + } + function De(tt, ut) { + return w(), So.getImplementationsAtPosition(c, m, c.getSourceFiles(), D(tt), ut); + } + function we(tt, ut, Mt) { + const Pt = Hs(tt); + E.assert(Mt.some((Vt) => Hs(Vt) === Pt)), w(); + const Zt = Li(Mt, (Vt) => c.getSourceFile(Vt)), fr = D(tt); + return U9.getDocumentHighlights(c, m, fr, ut, Zt); + } + function Ue(tt, ut, Mt, Pt, Zt) { + w(); + const fr = D(tt), Vt = p9(h_(fr, ut)); + if (DL.nodeIsEligibleForRename(Vt)) + if (Me(Vt) && (Dd(Vt.parent) || Kb(Vt.parent)) && BC(Vt.escapedText)) { + const { openingElement: ir, closingElement: Tr } = Vt.parent.parent; + return [ir, Tr].map((_r) => { + const Ot = e_(_r.tagName, fr); + return { + fileName: fr.fileName, + textSpan: Ot, + ...So.toContextSpan(Ot, fr, _r.parent) + }; + }); + } else { + const ir = tf(fr, Zt ?? zp), Tr = typeof Zt == "boolean" ? Zt : Zt?.providePrefixAndSuffixTextForRename; + return Lt(Vt, ut, { findInStrings: Mt, findInComments: Pt, providePrefixAndSuffixTextForRename: Tr, use: So.FindReferencesUse.Rename }, (_r, Ot, mi) => So.toRenameLocation(_r, Ot, mi, Tr || !1, ir)); + } + } + function bt(tt, ut) { + return w(), Lt(h_(D(tt), ut), ut, { use: So.FindReferencesUse.References }, So.toReferenceEntry); + } + function Lt(tt, ut, Mt, Pt) { + w(); + const Zt = Mt && Mt.use === So.FindReferencesUse.Rename ? c.getSourceFiles().filter((fr) => !c.isSourceFileDefaultLibrary(fr)) : c.getSourceFiles(); + return So.findReferenceOrRenameEntries(c, m, Zt, tt, ut, Mt, Pt); + } + function er(tt, ut) { + return w(), So.findReferencedSymbols(c, m, c.getSourceFiles(), D(tt), ut); + } + function Nr(tt) { + return w(), So.Core.getReferencesForFileName(tt, c, c.getSourceFiles()).map(So.toReferenceEntry); + } + function Dt(tt, ut, Mt, Pt = !1, Zt = !1) { + w(); + const fr = Mt ? [D(Mt)] : c.getSourceFiles(); + return C2e(fr, c.getTypeChecker(), m, tt, ut, Pt, Zt); + } + function Qt(tt, ut, Mt) { + w(); + const Pt = D(tt), Zt = e.getCustomTransformers && e.getCustomTransformers(); + return yie(c, Pt, !!ut, m, Zt, Mt); + } + function Wr(tt, ut, { triggerReason: Mt } = zp) { + w(); + const Pt = D(tt); + return i8.getSignatureHelpItems(c, Pt, ut, Mt, m); + } + function yr(tt) { + return o.getCurrentSourceFile(tt); + } + function qn(tt, ut, Mt) { + const Pt = o.getCurrentSourceFile(tt), Zt = h_(Pt, ut); + if (Zt === Pt) + return; + switch (Zt.kind) { + case 211: + case 166: + case 11: + case 97: + case 112: + case 106: + case 108: + case 110: + case 197: + case 80: + break; + // Cant create the text span + default: + return; + } + let fr = Zt; + for (; ; ) + if (N6(fr) || Mse(fr)) + fr = fr.parent; + else if (cV(fr)) + if (fr.parent.parent.kind === 267 && fr.parent.parent.body === fr.parent) + fr = fr.parent.parent.name; + else + break; + else + break; + return bc(fr.getStart(), Zt.getEnd()); + } + function Bt(tt, ut) { + const Mt = o.getCurrentSourceFile(tt); + return Uq.spanInSourceFileAtLocation(Mt, ut); + } + function bi(tt) { + return P2e(o.getCurrentSourceFile(tt), m); + } + function pi(tt) { + return N2e(o.getCurrentSourceFile(tt), m); + } + function Xn(tt, ut, Mt) { + return w(), (Mt || "original") === "2020" ? eTe(c, m, D(tt), ut) : Eae(c.getTypeChecker(), m, D(tt), c.getClassifiableNames(), ut); + } + function jr(tt, ut, Mt) { + return w(), (Mt || "original") === "original" ? sq(c.getTypeChecker(), m, D(tt), c.getClassifiableNames(), ut) : ece(c, m, D(tt), ut); + } + function di(tt, ut) { + return Dae(m, o.getCurrentSourceFile(tt), ut); + } + function Re(tt, ut) { + return aq(m, o.getCurrentSourceFile(tt), ut); + } + function gt(tt) { + const ut = o.getCurrentSourceFile(tt); + return RH.collectElements(ut, m); + } + const tr = new Map(Object.entries({ + 19: 20, + 21: 22, + 23: 24, + 32: 30 + /* LessThanToken */ + })); + tr.forEach((tt, ut) => tr.set(tt.toString(), Number(ut))); + function qr(tt, ut) { + const Mt = o.getCurrentSourceFile(tt), Pt = F6(Mt, ut), Zt = Pt.getStart(Mt) === ut ? tr.get(Pt.kind.toString()) : void 0, fr = Zt && Xa(Pt.parent, Zt, Mt); + return fr ? [e_(Pt, Mt), e_(fr, Mt)].sort((Vt, ir) => Vt.start - ir.start) : He; + } + function Bn(tt, ut, Mt) { + let Pt = ao(); + const Zt = zA(Mt), fr = o.getCurrentSourceFile(tt); + h("getIndentationAtPosition: getCurrentSourceFile: " + (ao() - Pt)), Pt = ao(); + const Vt = Qc.SmartIndenter.getIndentation(ut, fr, Zt); + return h("getIndentationAtPosition: computeIndentation : " + (ao() - Pt)), Vt; + } + function wn(tt, ut, Mt, Pt) { + const Zt = o.getCurrentSourceFile(tt); + return Qc.formatSelection(ut, Mt, Zt, Qc.getFormatContext(zA(Pt), e)); + } + function ki(tt, ut) { + return Qc.formatDocument(o.getCurrentSourceFile(tt), Qc.getFormatContext(zA(ut), e)); + } + function Cs(tt, ut, Mt, Pt) { + const Zt = o.getCurrentSourceFile(tt), fr = Qc.getFormatContext(zA(Pt), e); + if (!J0(Zt, ut)) + switch (Mt) { + case "{": + return Qc.formatOnOpeningCurly(ut, Zt, fr); + case "}": + return Qc.formatOnClosingCurly(ut, Zt, fr); + case ";": + return Qc.formatOnSemicolon(ut, Zt, fr); + case ` +`: + return Qc.formatOnEnter(ut, Zt, fr); + } + return []; + } + function Ks(tt, ut, Mt, Pt, Zt, fr = zp) { + w(); + const Vt = D(tt), ir = bc(ut, Mt), Tr = Qc.getFormatContext(Zt, e); + return na(hb(Pt, wy, uo), (_r) => (m.throwIfCancellationRequested(), Eu.getFixes({ errorCode: _r, sourceFile: Vt, span: ir, program: c, host: e, cancellationToken: m, formatContext: Tr, preferences: fr }))); + } + function xr(tt, ut, Mt, Pt = zp) { + w(), E.assert(tt.type === "file"); + const Zt = D(tt.fileName), fr = Qc.getFormatContext(Mt, e); + return Eu.getAllFixes({ fixId: ut, sourceFile: Zt, program: c, host: e, cancellationToken: m, formatContext: fr, preferences: Pt }); + } + function gs(tt, ut, Mt = zp) { + w(), E.assert(tt.type === "file"); + const Pt = D(tt.fileName); + if (lx(Pt)) return He; + const Zt = Qc.getFormatContext(ut, e), fr = tt.mode ?? (tt.skipDestructiveCodeActions ? "SortAndCombine" : "All"); + return Mv.organizeImports(Pt, Zt, e, c, Mt, fr); + } + function Qe(tt, ut, Mt, Pt = zp) { + return Nae(O(), tt, ut, e, Qc.getFormatContext(Mt, e), Pt, C); + } + function Ct(tt, ut) { + const Mt = typeof tt == "string" ? ut : tt; + return os(Mt) ? Promise.all(Mt.map((Pt) => ee(Pt))) : ee(Mt); + } + function ee(tt) { + const ut = (Mt) => oo(Mt, g, T); + return E.assertEqual(tt.type, "install package"), e.installPackage ? e.installPackage({ fileName: ut(tt.file), packageName: tt.packageName }) : Promise.reject("Host does not implement `installPackage`"); + } + function Ve(tt, ut, Mt, Pt) { + const Zt = Pt ? Qc.getFormatContext(Pt, e).options : void 0; + return Lv.getDocCommentTemplateAtPosition(Jh(e, Zt), o.getCurrentSourceFile(tt), ut, Mt); + } + function K(tt, ut, Mt) { + if (Mt === 60) + return !1; + const Pt = o.getCurrentSourceFile(tt); + if (lk(Pt, ut)) + return !1; + if (Use(Pt, ut)) + return Mt === 123; + if (dV(Pt, ut)) + return !1; + switch (Mt) { + case 39: + case 34: + case 96: + return !J0(Pt, ut); + } + return !0; + } + function Ie(tt, ut) { + const Mt = o.getCurrentSourceFile(tt), Pt = tl(ut, Mt); + if (!Pt) return; + const Zt = Pt.kind === 32 && Dd(Pt.parent) ? Pt.parent.parent : Mx(Pt) && gm(Pt.parent) ? Pt.parent : void 0; + if (Zt && We(Zt)) + return { newText: `` }; + const fr = Pt.kind === 32 && sd(Pt.parent) ? Pt.parent.parent : Mx(Pt) && gv(Pt.parent) ? Pt.parent : void 0; + if (fr && Et(fr)) + return { newText: "" }; + } + function $e(tt, ut) { + const Mt = o.getCurrentSourceFile(tt), Pt = tl(ut, Mt); + if (!Pt || Pt.parent.kind === 307) return; + const Zt = "[a-zA-Z0-9:\\-\\._$]*"; + if (gv(Pt.parent.parent)) { + const fr = Pt.parent.parent.openingFragment, Vt = Pt.parent.parent.closingFragment; + if (lx(fr) || lx(Vt)) return; + const ir = fr.getStart(Mt) + 1, Tr = Vt.getStart(Mt) + 2; + return ut !== ir && ut !== Tr ? void 0 : { + ranges: [{ start: ir, length: 0 }, { start: Tr, length: 0 }], + wordPattern: Zt + }; + } else { + const fr = ur(Pt.parent, (Ms) => !!(Dd(Ms) || Kb(Ms))); + if (!fr) return; + E.assert(Dd(fr) || Kb(fr), "tag should be opening or closing element"); + const Vt = fr.parent.openingElement, ir = fr.parent.closingElement, Tr = Vt.tagName.getStart(Mt), _r = Vt.tagName.end, Ot = ir.tagName.getStart(Mt), mi = ir.tagName.end; + return Tr === Vt.getStart(Mt) || Ot === ir.getStart(Mt) || _r === Vt.getEnd() || mi === ir.getEnd() || !(Tr <= ut && ut <= _r || Ot <= ut && ut <= mi) || Vt.tagName.getText(Mt) !== ir.tagName.getText(Mt) ? void 0 : { + ranges: [{ start: Tr, length: _r - Tr }, { start: Ot, length: mi - Ot }], + wordPattern: Zt + }; + } + } + function Ke(tt, ut) { + return { + lineStarts: tt.getLineStarts(), + firstLine: tt.getLineAndCharacterOfPosition(ut.pos).line, + lastLine: tt.getLineAndCharacterOfPosition(ut.end).line + }; + } + function Je(tt, ut, Mt) { + const Pt = o.getCurrentSourceFile(tt), Zt = [], { lineStarts: fr, firstLine: Vt, lastLine: ir } = Ke(Pt, ut); + let Tr = Mt || !1, _r = Number.MAX_VALUE; + const Ot = /* @__PURE__ */ new Map(), mi = new RegExp(/\S/), Js = m9(Pt, fr[Vt]), Ms = Js ? "{/*" : "//"; + for (let Ns = Vt; Ns <= ir; Ns++) { + const kc = Pt.text.substring(fr[Ns], Pt.getLineEndOfPosition(fr[Ns])), Wo = mi.exec(kc); + Wo && (_r = Math.min(_r, Wo.index), Ot.set(Ns.toString(), Wo.index), kc.substr(Wo.index, Ms.length) !== Ms && (Tr = Mt === void 0 || Mt)); + } + for (let Ns = Vt; Ns <= ir; Ns++) { + if (Vt !== ir && fr[Ns] === ut.end) + continue; + const kc = Ot.get(Ns.toString()); + kc !== void 0 && (Js ? Zt.push(...Ye(tt, { pos: fr[Ns] + _r, end: Pt.getLineEndOfPosition(fr[Ns]) }, Tr, Js)) : Tr ? Zt.push({ + newText: Ms, + span: { + length: 0, + start: fr[Ns] + _r + } + }) : Pt.text.substr(fr[Ns] + kc, Ms.length) === Ms && Zt.push({ + newText: "", + span: { + length: Ms.length, + start: fr[Ns] + kc + } + })); + } + return Zt; + } + function Ye(tt, ut, Mt, Pt) { + var Zt; + const fr = o.getCurrentSourceFile(tt), Vt = [], { text: ir } = fr; + let Tr = !1, _r = Mt || !1; + const Ot = []; + let { pos: mi } = ut; + const Js = Pt !== void 0 ? Pt : m9(fr, mi), Ms = Js ? "{/*" : "/*", Ns = Js ? "*/}" : "*/", kc = Js ? "\\{\\/\\*" : "\\/\\*", Wo = Js ? "\\*\\/\\}" : "\\*\\/"; + for (; mi <= ut.end; ) { + const sc = ir.substr(mi, Ms.length) === Ms ? Ms.length : 0, ri = J0(fr, mi + sc); + if (ri) + Js && (ri.pos--, ri.end++), Ot.push(ri.pos), ri.kind === 3 && Ot.push(ri.end), Tr = !0, mi = ri.end + 1; + else { + const zs = ir.substring(mi, ut.end).search(`(${kc})|(${Wo})`); + _r = Mt !== void 0 ? Mt : _r || !eae(ir, mi, zs === -1 ? ut.end : mi + zs), mi = zs === -1 ? ut.end + 1 : mi + zs + Ns.length; + } + } + if (_r || !Tr) { + ((Zt = J0(fr, ut.pos)) == null ? void 0 : Zt.kind) !== 2 && xy(Ot, ut.pos, uo), xy(Ot, ut.end, uo); + const sc = Ot[0]; + ir.substr(sc, Ms.length) !== Ms && Vt.push({ + newText: Ms, + span: { + length: 0, + start: sc + } + }); + for (let ri = 1; ri < Ot.length - 1; ri++) + ir.substr(Ot[ri] - Ns.length, Ns.length) !== Ns && Vt.push({ + newText: Ns, + span: { + length: 0, + start: Ot[ri] + } + }), ir.substr(Ot[ri], Ms.length) !== Ms && Vt.push({ + newText: Ms, + span: { + length: 0, + start: Ot[ri] + } + }); + Vt.length % 2 !== 0 && Vt.push({ + newText: Ns, + span: { + length: 0, + start: Ot[Ot.length - 1] + } + }); + } else + for (const sc of Ot) { + const ri = sc - Ns.length > 0 ? sc - Ns.length : 0, zs = ir.substr(ri, Ns.length) === Ns ? Ns.length : 0; + Vt.push({ + newText: "", + span: { + length: Ms.length, + start: sc - zs + } + }); + } + return Vt; + } + function _t(tt, ut) { + const Mt = o.getCurrentSourceFile(tt), { firstLine: Pt, lastLine: Zt } = Ke(Mt, ut); + return Pt === Zt && ut.pos !== ut.end ? Ye( + tt, + ut, + /*insertComment*/ + !0 + ) : Je( + tt, + ut, + /*insertComment*/ + !0 + ); + } + function yt(tt, ut) { + const Mt = o.getCurrentSourceFile(tt), Pt = [], { pos: Zt } = ut; + let { end: fr } = ut; + Zt === fr && (fr += m9(Mt, Zt) ? 2 : 1); + for (let Vt = Zt; Vt <= fr; Vt++) { + const ir = J0(Mt, Vt); + if (ir) { + switch (ir.kind) { + case 2: + Pt.push(...Je( + tt, + { end: ir.end, pos: ir.pos + 1 }, + /*insertComment*/ + !1 + )); + break; + case 3: + Pt.push(...Ye( + tt, + { end: ir.end, pos: ir.pos + 1 }, + /*insertComment*/ + !1 + )); + } + Vt = ir.end + 1; + } + } + return Pt; + } + function We({ openingElement: tt, closingElement: ut, parent: Mt }) { + return !Tv(tt.tagName, ut.tagName) || gm(Mt) && Tv(tt.tagName, Mt.openingElement.tagName) && We(Mt); + } + function Et({ closingFragment: tt, parent: ut }) { + return !!(tt.flags & 262144) || gv(ut) && Et(ut); + } + function Xt(tt, ut, Mt) { + const Pt = o.getCurrentSourceFile(tt), Zt = Qc.getRangeOfEnclosingComment(Pt, ut); + return Zt && (!Mt || Zt.kind === 3) ? W0(Zt) : void 0; + } + function rn(tt, ut) { + w(); + const Mt = D(tt); + m.throwIfCancellationRequested(); + const Pt = Mt.text, Zt = []; + if (ut.length > 0 && !Tr(Mt.fileName)) { + const _r = Vt(); + let Ot; + for (; Ot = _r.exec(Pt); ) { + m.throwIfCancellationRequested(); + const mi = 3; + E.assert(Ot.length === ut.length + mi); + const Js = Ot[1], Ms = Ot.index + Js.length; + if (!J0(Mt, Ms)) + continue; + let Ns; + for (let Wo = 0; Wo < ut.length; Wo++) + Ot[Wo + mi] && (Ns = ut[Wo]); + if (Ns === void 0) return E.fail(); + if (ir(Pt.charCodeAt(Ms + Ns.text.length))) + continue; + const kc = Ot[2]; + Zt.push({ descriptor: Ns, message: kc, position: Ms }); + } + } + return Zt; + function fr(_r) { + return _r.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&"); + } + function Vt() { + const _r = /(?:\/{2,}\s*)/.source, Ot = /(?:\/\*+\s*)/.source, Js = "(" + /(?:^(?:\s|\*)*)/.source + "|" + _r + "|" + Ot + ")", Ms = "(?:" + gr(ut, (ri) => "(" + fr(ri.text) + ")").join("|") + ")", Ns = /(?:$|\*\/)/.source, kc = /(?:.*?)/.source, Wo = "(" + Ms + kc + ")", sc = Js + Wo + Ns; + return new RegExp(sc, "gim"); + } + function ir(_r) { + return _r >= 97 && _r <= 122 || _r >= 65 && _r <= 90 || _r >= 48 && _r <= 57; + } + function Tr(_r) { + return _r.includes("/node_modules/"); + } + } + function ye(tt, ut, Mt) { + return w(), DL.getRenameInfo(c, D(tt), ut, Mt || {}); + } + function ft(tt, ut, Mt, Pt, Zt, fr) { + const [Vt, ir] = typeof ut == "number" ? [ut, void 0] : [ut.pos, ut.end]; + return { + file: tt, + startPosition: Vt, + endPosition: ir, + program: O(), + host: e, + formatContext: Qc.getFormatContext(Pt, e), + // TODO: GH#18217 + cancellationToken: m, + preferences: Mt, + triggerReason: Zt, + kind: fr + }; + } + function fe(tt, ut, Mt) { + return { + file: tt, + program: O(), + host: e, + span: ut, + preferences: Mt, + cancellationToken: m + }; + } + function L(tt, ut) { + return JH.getSmartSelectionRange(ut, o.getCurrentSourceFile(tt)); + } + function ve(tt, ut, Mt = zp, Pt, Zt, fr) { + w(); + const Vt = D(tt); + return dk.getApplicableRefactors(ft(Vt, ut, Mt, zp, Pt, Zt), fr); + } + function X(tt, ut, Mt = zp) { + w(); + const Pt = D(tt), Zt = E.checkDefined(c.getSourceFiles()), fr = nD(tt), Vt = BA(ft(Pt, ut, Mt, zp)), ir = boe(Vt?.all), Tr = Li(Zt, (_r) => { + const Ot = nD(_r.fileName); + return !c?.isSourceFileFromExternalLibrary(Pt) && !(Pt === D(_r.fileName) || fr === ".ts" && Ot === ".d.ts" || fr === ".d.ts" && Vi(Vc(_r.fileName), "lib.") && Ot === ".d.ts") && (fr === Ot || (fr === ".tsx" && Ot === ".ts" || fr === ".jsx" && Ot === ".js") && !ir) ? _r.fileName : void 0; + }); + return { newFileName: voe(Pt, c, e, Vt), files: Tr }; + } + function lt(tt, ut, Mt, Pt, Zt, fr = zp, Vt) { + w(); + const ir = D(tt); + return dk.getEditsForRefactor(ft(ir, Mt, fr, ut), Pt, Zt, Vt); + } + function zt(tt, ut) { + return ut === 0 ? { line: 0, character: 0 } : C.toLineColumnOffset(tt, ut); + } + function de(tt, ut) { + w(); + const Mt = mk.resolveCallHierarchyDeclaration(c, h_(D(tt), ut)); + return Mt && QV(Mt, (Pt) => mk.createCallHierarchyItem(c, Pt)); + } + function st(tt, ut) { + w(); + const Mt = D(tt), Pt = YV(mk.resolveCallHierarchyDeclaration(c, ut === 0 ? Mt : h_(Mt, ut))); + return Pt ? mk.getIncomingCalls(c, Pt, m) : []; + } + function Gt(tt, ut) { + w(); + const Mt = D(tt), Pt = YV(mk.resolveCallHierarchyDeclaration(c, ut === 0 ? Mt : h_(Mt, ut))); + return Pt ? mk.getOutgoingCalls(c, Pt) : []; + } + function Xr(tt, ut, Mt = zp) { + w(); + const Pt = D(tt); + return OH.provideInlayHints(fe(Pt, ut, Mt)); + } + function Rr(tt, ut, Mt, Pt, Zt) { + return LH.mapCode( + o.getCurrentSourceFile(tt), + ut, + Mt, + e, + Qc.getFormatContext(Pt, e), + Zt + ); + } + const Jr = { + dispose: V, + cleanupSemanticCache: W, + getSyntacticDiagnostics: $, + getSemanticDiagnostics: U, + getRegionSemanticDiagnostics: _e, + getSuggestionDiagnostics: q, + getCompilerOptionsDiagnostics: me, + getSyntacticClassifications: di, + getSemanticClassifications: Xn, + getEncodedSyntacticClassifications: Re, + getEncodedSemanticClassifications: jr, + getCompletionsAtPosition: Ce, + getCompletionEntryDetails: Ee, + getCompletionEntrySymbol: oe, + getSignatureHelpItems: Wr, + getQuickInfoAtPosition: ke, + getDefinitionAtPosition: he, + getDefinitionAndBoundSpan: ne, + getImplementationAtPosition: De, + getTypeDefinitionAtPosition: Ae, + getReferencesAtPosition: bt, + findReferences: er, + getFileReferences: Nr, + getDocumentHighlights: we, + getNameOrDottedNameSpan: qn, + getBreakpointStatementAtPosition: Bt, + getNavigateToItems: Dt, + getRenameInfo: ye, + getSmartSelectionRange: L, + findRenameLocations: Ue, + getNavigationBarItems: bi, + getNavigationTree: pi, + getOutliningSpans: gt, + getTodoComments: rn, + getBraceMatchingAtPosition: qr, + getIndentationAtPosition: Bn, + getFormattingEditsForRange: wn, + getFormattingEditsForDocument: ki, + getFormattingEditsAfterKeystroke: Cs, + getDocCommentTemplateAtPosition: Ve, + isValidBraceCompletionAtPosition: K, + getJsxClosingTagAtPosition: Ie, + getLinkedEditingRangeAtPosition: $e, + getSpanOfEnclosingComment: Xt, + getCodeFixesAtPosition: Ks, + getCombinedCodeFix: xr, + applyCodeActionCommand: Ct, + organizeImports: gs, + getEditsForFileRename: Qe, + getEmitOutput: Qt, + getNonBoundSourceFile: yr, + getProgram: O, + getCurrentProgram: () => c, + getAutoImportProvider: F, + updateIsDefinitionOfReferencedSymbols: R, + getApplicableRefactors: ve, + getEditsForRefactor: lt, + getMoveToRefactoringFileSuggestions: X, + toLineColumnOffset: zt, + getSourceMapper: () => C, + clearSourceMapperCache: () => C.clearCache(), + prepareCallHierarchy: de, + provideCallHierarchyIncomingCalls: st, + provideCallHierarchyOutgoingCalls: Gt, + toggleLineComment: Je, + toggleMultilineComment: Ye, + commentSelection: _t, + uncommentSelection: yt, + provideInlayHints: Xr, + getSupportedCodeFixes: Jq, + preparePasteEditsForFile: ue, + getPasteEdits: it, + mapCode: Rr + }; + switch (s) { + case 0: + break; + case 1: + pTe.forEach( + (tt) => Jr[tt] = () => { + throw new Error(`LanguageService Operation: ${tt} not allowed in LanguageServiceMode.PartialSemantic`); + } + ); + break; + case 2: + HUe.forEach( + (tt) => Jr[tt] = () => { + throw new Error(`LanguageService Operation: ${tt} not allowed in LanguageServiceMode.Syntactic`); + } + ); + break; + default: + E.assertNever(s); + } + return Jr; + } + function Wq(e) { + return e.nameTable || GUe(e), e.nameTable; + } + function GUe(e) { + const t = e.nameTable = /* @__PURE__ */ new Map(); + e.forEachChild(function n(i) { + if (Me(i) && !aV(i) && i.escapedText || wf(i) && $Ue(i)) { + const s = z4(i); + t.set(s, t.get(s) === void 0 ? i.pos : -1); + } else if (Ni(i)) { + const s = i.escapedText; + t.set(s, t.get(s) === void 0 ? i.pos : -1); + } + if (ms(i, n), uf(i)) + for (const s of i.jsDoc) + ms(s, n); + }); + } + function $Ue(e) { + return tg(e) || e.parent.kind === 283 || YUe(e) || E3(e); + } + function UA(e) { + const t = XUe(e); + return t && (oa(t.parent) || e2(t.parent)) ? t : void 0; + } + function XUe(e) { + switch (e.kind) { + case 11: + case 15: + case 9: + if (e.parent.kind === 167) + return Jj(e.parent.parent) ? e.parent.parent : void 0; + // falls through + case 80: + return Jj(e.parent) && (e.parent.parent.kind === 210 || e.parent.parent.kind === 292) && e.parent.name === e ? e.parent : void 0; + } + } + function QUe(e, t) { + const n = UA(e); + if (n) { + const i = t.getContextualType(n.parent), s = i && aL( + n, + t, + i, + /*unionSymbolOk*/ + !1 + ); + if (s && s.length === 1) + return ya(s); + } + return t.getSymbolAtLocation(e); + } + function aL(e, t, n, i) { + const s = xA(e.name); + if (!s) return He; + if (!n.isUnion()) { + const _ = n.getProperty(s); + return _ ? [_] : He; + } + const o = oa(e.parent) || e2(e.parent) ? kn(n.types, (_) => !t.isTypeInvalidDueToUnionDiscriminant(_, e.parent)) : n.types, c = Li(o, (_) => _.getProperty(s)); + if (i && (c.length === 0 || c.length === n.types.length)) { + const _ = n.getProperty(s); + if (_) return [_]; + } + return !o.length && !c.length ? Li(n.types, (_) => _.getProperty(s)) : hb(c, wy); + } + function YUe(e) { + return e && e.parent && e.parent.kind === 212 && e.parent.argumentExpression === e; + } + function sce(e) { + if (nl) + return Ln(Hn(Hs(nl.getExecutingFilePath())), wP(e)); + throw new Error("getDefaultLibFilePath is only supported when consumed as a node module. "); + } + iee(WUe()); + function dTe(e, t, n) { + const i = []; + n = hq(n, i); + const s = os(e) ? e : [e], o = QN( + /*resolver*/ + void 0, + /*host*/ + void 0, + N, + n, + s, + t, + /*allowDtsFiles*/ + !0 + ); + return o.diagnostics = Wi(o.diagnostics, i), o; + } + var Uq = {}; + Ec(Uq, { + spanInSourceFileAtLocation: () => ZUe + }); + function ZUe(e, t) { + if (e.isDeclarationFile) + return; + let n = Si(e, t); + const i = e.getLineAndCharacterOfPosition(t).line; + if (e.getLineAndCharacterOfPosition(n.getStart(e)).line > i) { + const h = tl(n.pos, e); + if (!h || e.getLineAndCharacterOfPosition(h.getEnd()).line !== i) + return; + n = h; + } + if (n.flags & 33554432) + return; + return g(n); + function s(h, S) { + const T = n2(h) ? gb(h.modifiers, ll) : void 0, C = T ? aa(e.text, T.end) : h.getStart(e); + return bc(C, (S || h).getEnd()); + } + function o(h, S) { + return s(h, _2(S, S.parent, e)); + } + function c(h, S) { + return h && i === e.getLineAndCharacterOfPosition(h.getStart(e)).line ? g(h) : g(S); + } + function _(h, S, T) { + if (h) { + const C = h.indexOf(S); + if (C >= 0) { + let D = C, w = C + 1; + for (; D > 0 && T(h[D - 1]); ) D--; + for (; w < h.length && T(h[w]); ) w++; + return bc(aa(e.text, h[D].pos), h[w - 1].end); + } + } + return s(S); + } + function u(h) { + return g(tl(h.pos, e)); + } + function m(h) { + return g(_2(h, h.parent, e)); + } + function g(h) { + if (h) { + const { parent: q } = h; + switch (h.kind) { + case 243: + return T(h.declarationList.declarations[0]); + case 260: + case 172: + case 171: + return T(h); + case 169: + return D(h); + case 262: + case 174: + case 173: + case 177: + case 178: + case 176: + case 218: + case 219: + return A(h); + case 241: + if (Nb(h)) + return O(h); + // falls through + case 268: + return F(h); + case 299: + return F(h.block); + case 244: + return s(h.expression); + case 253: + return s(h.getChildAt(0), h.expression); + case 247: + return o(h, h.expression); + case 246: + return g(h.statement); + case 259: + return s(h.getChildAt(0)); + case 245: + return o(h, h.expression); + case 256: + return g(h.statement); + case 252: + case 251: + return s(h.getChildAt(0), h.label); + case 248: + return W(h); + case 249: + return o(h, h.expression); + case 250: + return R(h); + case 255: + return o(h, h.expression); + case 296: + case 297: + return g(h.statements[0]); + case 258: + return F(h.tryBlock); + case 257: + return s(h, h.expression); + case 277: + return s(h, h.expression); + case 271: + return s(h, h.moduleReference); + case 272: + return s(h, h.moduleSpecifier); + case 278: + return s(h, h.moduleSpecifier); + case 267: + if (jh(h) !== 1) + return; + // falls through + case 263: + case 266: + case 306: + case 208: + return s(h); + case 254: + return g(h.statement); + case 170: + return _(q.modifiers, h, ll); + case 206: + case 207: + return V(h); + // No breakpoint in interface, type alias + case 264: + case 265: + return; + // Tokens: + case 27: + case 1: + return c(tl(h.pos, e)); + case 28: + return u(h); + case 19: + return U(h); + case 20: + return _e(h); + case 24: + return Z(h); + case 21: + return J(h); + case 22: + return re(h); + case 59: + return te(h); + case 32: + case 30: + return ie(h); + // Keywords: + case 117: + return le(h); + case 93: + case 85: + case 98: + return m(h); + case 165: + return Te(h); + default: + if (z0(h)) + return $(h); + if ((h.kind === 80 || h.kind === 230 || h.kind === 303 || h.kind === 304) && z0(q)) + return s(h); + if (h.kind === 226) { + const { left: me, operatorToken: Ce } = h; + if (z0(me)) + return $( + me + ); + if (Ce.kind === 64 && z0(h.parent)) + return s(h); + if (Ce.kind === 28) + return g(me); + } + if (Td(h)) + switch (q.kind) { + case 246: + return u(h); + case 170: + return g(h.parent); + case 248: + case 250: + return s(h); + case 226: + if (h.parent.operatorToken.kind === 28) + return s(h); + break; + case 219: + if (h.parent.body === h) + return s(h); + break; + } + switch (h.parent.kind) { + case 303: + if (h.parent.name === h && !z0(h.parent.parent)) + return g(h.parent.initializer); + break; + case 216: + if (h.parent.type === h) + return m(h.parent.type); + break; + case 260: + case 169: { + const { initializer: me, type: Ce } = h.parent; + if (me === h || Ce === h || Ah(h.kind)) + return u(h); + break; + } + case 226: { + const { left: me } = h.parent; + if (z0(me) && h !== me) + return u(h); + break; + } + default: + if (vs(h.parent) && h.parent.type === h) + return u(h); + } + return g(h.parent); + } + } + function S(q) { + return Il(q.parent) && q.parent.declarations[0] === q ? s(tl(q.pos, e, q.parent), q) : s(q); + } + function T(q) { + if (q.parent.parent.kind === 249) + return g(q.parent.parent); + const me = q.parent; + if (Ds(q.name)) + return V(q.name); + if (fS(q) && q.initializer || $n( + q, + 32 + /* Export */ + ) || me.parent.kind === 250) + return S(q); + if (Il(q.parent) && q.parent.declarations[0] !== q) + return g(tl(q.pos, e, q.parent)); + } + function C(q) { + return !!q.initializer || q.dotDotDotToken !== void 0 || $n( + q, + 3 + /* Private */ + ); + } + function D(q) { + if (Ds(q.name)) + return V(q.name); + if (C(q)) + return s(q); + { + const me = q.parent, Ce = me.parameters.indexOf(q); + return E.assert(Ce !== -1), Ce !== 0 ? D(me.parameters[Ce - 1]) : g(me.body); + } + } + function w(q) { + return $n( + q, + 32 + /* Export */ + ) || q.parent.kind === 263 && q.kind !== 176; + } + function A(q) { + if (q.body) + return w(q) ? s(q) : g(q.body); + } + function O(q) { + const me = q.statements.length ? q.statements[0] : q.getLastToken(); + return w(q.parent) ? c(q.parent, me) : g(me); + } + function F(q) { + switch (q.parent.kind) { + case 267: + if (jh(q.parent) !== 1) + return; + // Set on parent if on same line otherwise on first statement + // falls through + case 247: + case 245: + case 249: + return c(q.parent, q.statements[0]); + // Set span on previous token if it starts on same line otherwise on the first statement of the block + case 248: + case 250: + return c(tl(q.pos, e, q.parent), q.statements[0]); + } + return g(q.statements[0]); + } + function R(q) { + if (q.initializer.kind === 261) { + const me = q.initializer; + if (me.declarations.length > 0) + return g(me.declarations[0]); + } else + return g(q.initializer); + } + function W(q) { + if (q.initializer) + return R(q); + if (q.condition) + return s(q.condition); + if (q.incrementor) + return s(q.incrementor); + } + function V(q) { + const me = lr(q.elements, (Ce) => Ce.kind !== 232 ? Ce : void 0); + return me ? g(me) : q.parent.kind === 208 ? s(q.parent) : S(q.parent); + } + function $(q) { + E.assert( + q.kind !== 207 && q.kind !== 206 + /* ObjectBindingPattern */ + ); + const me = q.kind === 209 ? q.elements : q.properties, Ce = lr(me, (Ee) => Ee.kind !== 232 ? Ee : void 0); + return Ce ? g(Ce) : s(q.parent.kind === 226 ? q.parent : q); + } + function U(q) { + switch (q.parent.kind) { + case 266: + const me = q.parent; + return c(tl(q.pos, e, q.parent), me.members.length ? me.members[0] : me.getLastToken(e)); + case 263: + const Ce = q.parent; + return c(tl(q.pos, e, q.parent), Ce.members.length ? Ce.members[0] : Ce.getLastToken(e)); + case 269: + return c(q.parent.parent, q.parent.clauses[0]); + } + return g(q.parent); + } + function _e(q) { + switch (q.parent.kind) { + case 268: + if (jh(q.parent.parent) !== 1) + return; + // falls through + case 266: + case 263: + return s(q); + case 241: + if (Nb(q.parent)) + return s(q); + // falls through + case 299: + return g(Co(q.parent.statements)); + case 269: + const me = q.parent, Ce = Co(me.clauses); + return Ce ? g(Co(Ce.statements)) : void 0; + case 206: + const Ee = q.parent; + return g(Co(Ee.elements) || Ee); + // Default to parent node + default: + if (z0(q.parent)) { + const oe = q.parent; + return s(Co(oe.properties) || oe); + } + return g(q.parent); + } + } + function Z(q) { + switch (q.parent.kind) { + case 207: + const me = q.parent; + return s(Co(me.elements) || me); + default: + if (z0(q.parent)) { + const Ce = q.parent; + return s(Co(Ce.elements) || Ce); + } + return g(q.parent); + } + } + function J(q) { + return q.parent.kind === 246 || // Go to while keyword and do action instead + q.parent.kind === 213 || q.parent.kind === 214 ? u(q) : q.parent.kind === 217 ? m(q) : g(q.parent); + } + function re(q) { + switch (q.parent.kind) { + case 218: + case 262: + case 219: + case 174: + case 173: + case 177: + case 178: + case 176: + case 247: + case 246: + case 248: + case 250: + case 213: + case 214: + case 217: + return u(q); + // Default to parent node + default: + return g(q.parent); + } + } + function te(q) { + return vs(q.parent) || q.parent.kind === 303 || q.parent.kind === 169 ? u(q) : g(q.parent); + } + function ie(q) { + return q.parent.kind === 216 ? m(q) : g(q.parent); + } + function le(q) { + return q.parent.kind === 246 ? o(q, q.parent.expression) : g(q.parent); + } + function Te(q) { + return q.parent.kind === 250 ? m(q) : g(q.parent); + } + } + } + var mk = {}; + Ec(mk, { + createCallHierarchyItem: () => ace, + getIncomingCalls: () => aVe, + getOutgoingCalls: () => gVe, + resolveCallHierarchyDeclaration: () => TTe + }); + function KUe(e) { + return (po(e) || Gc(e)) && Hl(e); + } + function mTe(e) { + return ss(e) || Kn(e); + } + function VA(e) { + return (po(e) || bo(e) || Gc(e)) && mTe(e.parent) && e === e.parent.initializer && Me(e.parent.name) && (!!(Ch(e.parent) & 2) || ss(e.parent)); + } + function gTe(e) { + return Ei(e) || Lc(e) || Tc(e) || po(e) || $c(e) || Gc(e) || nc(e) || fc(e) || pm(e) || cp(e) || A_(e); + } + function U6(e) { + return Ei(e) || Lc(e) && Me(e.name) || Tc(e) || $c(e) || nc(e) || fc(e) || pm(e) || cp(e) || A_(e) || KUe(e) || VA(e); + } + function hTe(e) { + return Ei(e) ? e : Hl(e) ? e.name : VA(e) ? e.parent.name : E.checkDefined(e.modifiers && Pn(e.modifiers, yTe)); + } + function yTe(e) { + return e.kind === 90; + } + function vTe(e, t) { + const n = hTe(t); + return n && e.getSymbolAtLocation(n); + } + function eVe(e, t) { + if (Ei(t)) + return { text: t.fileName, pos: 0, end: 0 }; + if ((Tc(t) || $c(t)) && !Hl(t)) { + const s = t.modifiers && Pn(t.modifiers, yTe); + if (s) + return { text: "default", pos: s.getStart(), end: s.getEnd() }; + } + if (nc(t)) { + const s = t.getSourceFile(), o = aa(s.text, um(t).pos), c = o + 6, _ = e.getTypeChecker(), u = _.getSymbolAtLocation(t.parent); + return { text: `${u ? `${_.symbolToString(u, t.parent)} ` : ""}static {}`, pos: o, end: c }; + } + const n = VA(t) ? t.parent.name : E.checkDefined(is(t), "Expected call hierarchy item to have a name"); + let i = Me(n) ? An(n) : wf(n) ? n.text : fa(n) && wf(n.expression) ? n.expression.text : void 0; + if (i === void 0) { + const s = e.getTypeChecker(), o = s.getSymbolAtLocation(n); + o && (i = s.symbolToString(o, t)); + } + if (i === void 0) { + const s = zW(); + i = kC((o) => s.writeNode(4, t, t.getSourceFile(), o)); + } + return { text: i, pos: n.getStart(), end: n.getEnd() }; + } + function tVe(e) { + var t, n, i, s; + if (VA(e)) + return ss(e.parent) && Zn(e.parent.parent) ? Gc(e.parent.parent) ? (t = r7(e.parent.parent)) == null ? void 0 : t.getText() : (n = e.parent.parent.name) == null ? void 0 : n.getText() : dm(e.parent.parent.parent.parent) && Me(e.parent.parent.parent.parent.parent.name) ? e.parent.parent.parent.parent.parent.name.getText() : void 0; + switch (e.kind) { + case 177: + case 178: + case 174: + return e.parent.kind === 210 ? (i = r7(e.parent)) == null ? void 0 : i.getText() : (s = is(e.parent)) == null ? void 0 : s.getText(); + case 262: + case 263: + case 267: + if (dm(e.parent) && Me(e.parent.parent.name)) + return e.parent.parent.name.getText(); + } + } + function bTe(e, t) { + if (t.body) + return t; + if (Go(t)) + return Ug(t.parent); + if (Tc(t) || fc(t)) { + const n = vTe(e, t); + return n && n.valueDeclaration && Ka(n.valueDeclaration) && n.valueDeclaration.body ? n.valueDeclaration : void 0; + } + return t; + } + function STe(e, t) { + const n = vTe(e, t); + let i; + if (n && n.declarations) { + const s = II(n.declarations), o = gr(n.declarations, (u) => ({ file: u.getSourceFile().fileName, pos: u.pos })); + s.sort((u, m) => cu(o[u].file, o[m].file) || o[u].pos - o[m].pos); + const c = gr(s, (u) => n.declarations[u]); + let _; + for (const u of c) + U6(u) && ((!_ || _.parent !== u.parent || _.end !== u.pos) && (i = Pr(i, u)), _ = u); + } + return i; + } + function Vq(e, t) { + return nc(t) ? t : Ka(t) ? bTe(e, t) ?? STe(e, t) ?? t : STe(e, t) ?? t; + } + function TTe(e, t) { + const n = e.getTypeChecker(); + let i = !1; + for (; ; ) { + if (U6(t)) + return Vq(n, t); + if (gTe(t)) { + const s = ur(t, U6); + return s && Vq(n, s); + } + if (tg(t)) { + if (U6(t.parent)) + return Vq(n, t.parent); + if (gTe(t.parent)) { + const s = ur(t.parent, U6); + return s && Vq(n, s); + } + return mTe(t.parent) && t.parent.initializer && VA(t.parent.initializer) ? t.parent.initializer : void 0; + } + if (Go(t)) + return U6(t.parent) ? t.parent : void 0; + if (t.kind === 126 && nc(t.parent)) { + t = t.parent; + continue; + } + if (Kn(t) && t.initializer && VA(t.initializer)) + return t.initializer; + if (!i) { + let s = n.getSymbolAtLocation(t); + if (s && (s.flags & 2097152 && (s = n.getAliasedSymbol(s)), s.valueDeclaration)) { + i = !0, t = s.valueDeclaration; + continue; + } + } + return; + } + } + function ace(e, t) { + const n = t.getSourceFile(), i = eVe(e, t), s = tVe(t), o = u2(t), c = aw(t), _ = bc(aa( + n.text, + t.getFullStart(), + /*stopAfterLineBreak*/ + !1, + /*stopAtComments*/ + !0 + ), t.getEnd()), u = bc(i.pos, i.end); + return { file: n.fileName, kind: o, kindModifiers: c, name: i.text, containerName: s, span: _, selectionSpan: u }; + } + function rVe(e) { + return e !== void 0; + } + function nVe(e) { + if (e.kind === So.EntryKind.Node) { + const { node: t } = e; + if (rV( + t, + /*includeElementAccess*/ + !0, + /*skipPastOuterExpressions*/ + !0 + ) || Fse( + t, + /*includeElementAccess*/ + !0, + /*skipPastOuterExpressions*/ + !0 + ) || Ose( + t, + /*includeElementAccess*/ + !0, + /*skipPastOuterExpressions*/ + !0 + ) || Lse( + t, + /*includeElementAccess*/ + !0, + /*skipPastOuterExpressions*/ + !0 + ) || N6(t) || oV(t)) { + const n = t.getSourceFile(); + return { declaration: ur(t, U6) || n, range: TV(t, n) }; + } + } + } + function xTe(e) { + return Aa(e.declaration); + } + function iVe(e, t) { + return { from: e, fromSpans: t }; + } + function sVe(e, t) { + return iVe(ace(e, t[0].declaration), gr(t, (n) => W0(n.range))); + } + function aVe(e, t, n) { + if (Ei(t) || Lc(t) || nc(t)) + return []; + const i = hTe(t), s = kn(So.findReferenceOrRenameEntries( + e, + n, + e.getSourceFiles(), + i, + /*position*/ + 0, + { use: So.FindReferencesUse.References }, + nVe + ), rVe); + return s ? oC(s, xTe, (o) => sVe(e, o)) : []; + } + function oVe(e, t) { + function n(s) { + const o = fv(s) ? s.tag : bu(s) ? s.tagName : vo(s) || nc(s) ? s : s.expression, c = TTe(e, o); + if (c) { + const _ = TV(o, s.getSourceFile()); + if (os(c)) + for (const u of c) + t.push({ declaration: u, range: _ }); + else + t.push({ declaration: c, range: _ }); + } + } + function i(s) { + if (s && !(s.flags & 33554432)) { + if (U6(s)) { + if (Zn(s)) + for (const o of s.members) + o.name && fa(o.name) && i(o.name.expression); + return; + } + switch (s.kind) { + case 80: + case 271: + case 272: + case 278: + case 264: + case 265: + return; + case 175: + n(s); + return; + case 216: + case 234: + i(s.expression); + return; + case 260: + case 169: + i(s.name), i(s.initializer); + return; + case 213: + n(s), i(s.expression), lr(s.arguments, i); + return; + case 214: + n(s), i(s.expression), lr(s.arguments, i); + return; + case 215: + n(s), i(s.tag), i(s.template); + return; + case 286: + case 285: + n(s), i(s.tagName), i(s.attributes); + return; + case 170: + n(s), i(s.expression); + return; + case 211: + case 212: + n(s), ms(s, i); + break; + case 238: + i(s.expression); + return; + } + im(s) || ms(s, i); + } + } + return i; + } + function cVe(e, t) { + lr(e.statements, t); + } + function lVe(e, t) { + !$n( + e, + 128 + /* Ambient */ + ) && e.body && dm(e.body) && lr(e.body.statements, t); + } + function uVe(e, t, n) { + const i = bTe(e, t); + i && (lr(i.parameters, n), n(i.body)); + } + function _Ve(e, t) { + t(e.body); + } + function fVe(e, t) { + lr(e.modifiers, t); + const n = Mb(e); + n && t(n.expression); + for (const i of e.members) + Jp(i) && lr(i.modifiers, t), ss(i) ? t(i.initializer) : Go(i) && i.body ? (lr(i.parameters, t), t(i.body)) : nc(i) && t(i); + } + function pVe(e, t) { + const n = [], i = oVe(e, n); + switch (t.kind) { + case 307: + cVe(t, i); + break; + case 267: + lVe(t, i); + break; + case 262: + case 218: + case 219: + case 174: + case 177: + case 178: + uVe(e.getTypeChecker(), t, i); + break; + case 263: + case 231: + fVe(t, i); + break; + case 175: + _Ve(t, i); + break; + default: + E.assertNever(t); + } + return n; + } + function dVe(e, t) { + return { to: e, fromSpans: t }; + } + function mVe(e, t) { + return dVe(ace(e, t[0].declaration), gr(t, (n) => W0(n.range))); + } + function gVe(e, t) { + return t.flags & 33554432 || pm(t) ? [] : oC(pVe(e, t), xTe, (n) => mVe(e, n)); + } + var oce = {}; + Ec(oce, { + v2020: () => kTe + }); + var kTe = {}; + Ec(kTe, { + TokenEncodingConsts: () => YSe, + TokenModifier: () => KSe, + TokenType: () => ZSe, + getEncodedSemanticClassifications: () => ece, + getSemanticClassifications: () => eTe + }); + var Eu = {}; + Ec(Eu, { + PreserveOptionalFlags: () => R6e, + addNewNodeForMemberSymbol: () => j6e, + codeFixAll: () => Ga, + createCodeFixAction: () => Os, + createCodeFixActionMaybeFixAll: () => uce, + createCodeFixActionWithoutFixAll: () => Od, + createCombinedCodeActions: () => gk, + createFileTextChanges: () => CTe, + createImportAdder: () => y2, + createImportSpecifierResolver: () => Cqe, + createMissingMemberNodes: () => Ale, + createSignatureDeclarationFromCallExpression: () => Ile, + createSignatureDeclarationFromSignature: () => gH, + createStubbedBody: () => pL, + eachDiagnostic: () => hk, + findAncestorMatchingSpan: () => Ble, + generateAccessorFromProperty: () => H6e, + getAccessorConvertiblePropertyAtPosition: () => X6e, + getAllFixes: () => bVe, + getAllSupers: () => Jle, + getFixes: () => vVe, + getImportCompletionAction: () => Eqe, + getImportKind: () => tH, + getJSDocTypedefNodes: () => xqe, + getNoopSymbolTrackerWithResolver: () => q6, + getPromoteTypeOnlyCompletionAction: () => Dqe, + getSupportedErrorCodes: () => hVe, + importFixName: () => Gxe, + importSymbols: () => ZS, + parameterShouldGetTypeFromJSDoc: () => rxe, + registerCodeFix: () => Qs, + setJsonCompilerOptionValue: () => Rle, + setJsonCompilerOptionValues: () => Mle, + tryGetAutoImportableReferenceFromTypeNode: () => v2, + typeNodeToAutoImportableTypeNode: () => Fle, + typePredicateToAutoImportableTypeNode: () => z6e, + typeToAutoImportableTypeNode: () => hH, + typeToMinimizedReferenceType: () => J6e + }); + var cce = wp(), lce = /* @__PURE__ */ new Map(); + function Od(e, t, n) { + return _ce( + e, + p2(n), + t, + /*fixId*/ + void 0, + /*fixAllDescription*/ + void 0 + ); + } + function Os(e, t, n, i, s, o) { + return _ce(e, p2(n), t, i, p2(s), o); + } + function uce(e, t, n, i, s, o) { + return _ce(e, p2(n), t, i, s && p2(s), o); + } + function _ce(e, t, n, i, s, o) { + return { fixName: e, description: t, changes: n, fixId: i, fixAllDescription: s, commands: o ? [o] : void 0 }; + } + function Qs(e) { + for (const t of e.errorCodes) + fce = void 0, cce.add(String(t), e); + if (e.fixIds) + for (const t of e.fixIds) + E.assert(!lce.has(t)), lce.set(t, e); + } + var fce; + function hVe() { + return fce ?? (fce = Ki(cce.keys())); + } + function yVe(e, t) { + const { errorCodes: n } = e; + let i = 0; + for (const o of t) + if (as(n, o.code) && i++, i > 1) break; + const s = i < 2; + return ({ fixId: o, fixAllDescription: c, ..._ }) => s ? _ : { ..._, fixId: o, fixAllDescription: c }; + } + function vVe(e) { + const t = ETe(e), n = cce.get(String(e.errorCode)); + return na(n, (i) => gr(i.getCodeActions(e), yVe(i, t))); + } + function bVe(e) { + return lce.get(Ws(e.fixId, rs)).getAllCodeActions(e); + } + function gk(e, t) { + return { changes: e, commands: t }; + } + function CTe(e, t) { + return { fileName: e, textChanges: t }; + } + function Ga(e, t, n) { + const i = [], s = sn.ChangeTracker.with(e, (o) => hk(e, t, (c) => n(o, c, i))); + return gk(s, i.length === 0 ? void 0 : i); + } + function hk(e, t, n) { + for (const i of ETe(e)) + as(t, i.code) && n(i); + } + function ETe({ program: e, sourceFile: t, cancellationToken: n }) { + const i = [ + ...e.getSemanticDiagnostics(t, n), + ...e.getSyntacticDiagnostics(t, n), + ...pq(t, e, n) + ]; + return N_(e.getCompilerOptions()) && i.push( + ...e.getDeclarationDiagnostics(t, n) + ), i; + } + var pce = "addConvertToUnknownForNonOverlappingTypes", DTe = [p.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first.code]; + Qs({ + errorCodes: DTe, + getCodeActions: function(t) { + const n = PTe(t.sourceFile, t.span.start); + if (n === void 0) return; + const i = sn.ChangeTracker.with(t, (s) => wTe(s, t.sourceFile, n)); + return [Os(pce, i, p.Add_unknown_conversion_for_non_overlapping_types, pce, p.Add_unknown_to_all_conversions_of_non_overlapping_types)]; + }, + fixIds: [pce], + getAllCodeActions: (e) => Ga(e, DTe, (t, n) => { + const i = PTe(n.file, n.start); + i && wTe(t, n.file, i); + }) + }); + function wTe(e, t, n) { + const i = t6(n) ? N.createAsExpression(n.expression, N.createKeywordTypeNode( + 159 + /* UnknownKeyword */ + )) : N.createTypeAssertion(N.createKeywordTypeNode( + 159 + /* UnknownKeyword */ + ), n.expression); + e.replaceNode(t, n.expression, i); + } + function PTe(e, t) { + if (!an(e)) + return ur(Si(e, t), (n) => t6(n) || dF(n)); + } + Qs({ + errorCodes: [ + p.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code, + p.await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code, + p.for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code + ], + getCodeActions: function(t) { + const { sourceFile: n } = t, i = sn.ChangeTracker.with(t, (s) => { + const o = N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createNamedExports([]), + /*moduleSpecifier*/ + void 0 + ); + s.insertNodeAtEndOfScope(n, n, o); + }); + return [Od("addEmptyExportDeclaration", i, p.Add_export_to_make_this_file_into_a_module)]; + } + }); + var dce = "addMissingAsync", NTe = [ + p.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code, + p.Type_0_is_not_assignable_to_type_1.code, + p.Type_0_is_not_comparable_to_type_1.code + ]; + Qs({ + fixIds: [dce], + errorCodes: NTe, + getCodeActions: function(t) { + const { sourceFile: n, errorCode: i, cancellationToken: s, program: o, span: c } = t, _ = Pn(o.getTypeChecker().getDiagnostics(n, s), TVe(c, i)), u = _ && _.relatedInformation && Pn(_.relatedInformation, (h) => h.code === p.Did_you_mean_to_mark_this_function_as_async.code), m = ITe(n, u); + return m ? [ATe(t, m, (h) => sn.ChangeTracker.with(t, h))] : void 0; + }, + getAllCodeActions: (e) => { + const { sourceFile: t } = e, n = /* @__PURE__ */ new Set(); + return Ga(e, NTe, (i, s) => { + const o = s.relatedInformation && Pn(s.relatedInformation, (u) => u.code === p.Did_you_mean_to_mark_this_function_as_async.code), c = ITe(t, o); + return c ? ATe(e, c, (u) => (u(i), []), n) : void 0; + }); + } + }); + function ATe(e, t, n, i) { + const s = n((o) => SVe(o, e.sourceFile, t, i)); + return Os(dce, s, p.Add_async_modifier_to_containing_function, dce, p.Add_all_missing_async_modifiers); + } + function SVe(e, t, n, i) { + if (i && i.has(Aa(n))) + return; + i?.add(Aa(n)); + const s = N.replaceModifiers( + Wa( + n, + /*includeTrivia*/ + !0 + ), + N.createNodeArray(N.createModifiersFromModifierFlags( + w0(n) | 1024 + /* Async */ + )) + ); + e.replaceNode( + t, + n, + s + ); + } + function ITe(e, t) { + if (!t) return; + const n = Si(e, t.start); + return ur(n, (s) => s.getStart(e) < t.start || s.getEnd() > Yo(t) ? "quit" : (bo(s) || fc(s) || po(s) || Tc(s)) && M6(t, e_(s, e))); + } + function TVe(e, t) { + return ({ start: n, length: i, relatedInformation: s, code: o }) => Ey(n) && Ey(i) && M6({ start: n, length: i }, e) && o === t && !!s && at(s, (c) => c.code === p.Did_you_mean_to_mark_this_function_as_async.code); + } + var mce = "addMissingAwait", FTe = p.Property_0_does_not_exist_on_type_1.code, OTe = [ + p.This_expression_is_not_callable.code, + p.This_expression_is_not_constructable.code + ], gce = [ + p.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type.code, + p.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type.code, + p.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type.code, + p.Operator_0_cannot_be_applied_to_type_1.code, + p.Operator_0_cannot_be_applied_to_types_1_and_2.code, + p.This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap.code, + p.This_condition_will_always_return_true_since_this_0_is_always_defined.code, + p.Type_0_is_not_an_array_type.code, + p.Type_0_is_not_an_array_type_or_a_string_type.code, + p.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher.code, + p.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code, + p.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code, + p.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator.code, + p.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator.code, + p.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code, + FTe, + ...OTe + ]; + Qs({ + fixIds: [mce], + errorCodes: gce, + getCodeActions: function(t) { + const { sourceFile: n, errorCode: i, span: s, cancellationToken: o, program: c } = t, _ = LTe(n, i, s, o, c); + if (!_) + return; + const u = t.program.getTypeChecker(), m = (g) => sn.ChangeTracker.with(t, g); + return fP([ + MTe(t, _, i, u, m), + RTe(t, _, i, u, m) + ]); + }, + getAllCodeActions: (e) => { + const { sourceFile: t, program: n, cancellationToken: i } = e, s = e.program.getTypeChecker(), o = /* @__PURE__ */ new Set(); + return Ga(e, gce, (c, _) => { + const u = LTe(t, _.code, _, i, n); + if (!u) + return; + const m = (g) => (g(c), []); + return MTe(e, u, _.code, s, m, o) || RTe(e, u, _.code, s, m, o); + }); + } + }); + function LTe(e, t, n, i, s) { + const o = XV(e, n); + return o && xVe(e, t, n, i, s) && jTe(o) ? o : void 0; + } + function MTe(e, t, n, i, s, o) { + const { sourceFile: c, program: _, cancellationToken: u } = e, m = kVe(t, c, u, _, i); + if (m) { + const g = s((h) => { + lr(m.initializers, ({ expression: S }) => hce(h, n, c, i, S, o)), o && m.needsSecondPassForFixAll && hce(h, n, c, i, t, o); + }); + return Od( + "addMissingAwaitToInitializer", + g, + m.initializers.length === 1 ? [p.Add_await_to_initializer_for_0, m.initializers[0].declarationSymbol.name] : p.Add_await_to_initializers + ); + } + } + function RTe(e, t, n, i, s, o) { + const c = s((_) => hce(_, n, e.sourceFile, i, t, o)); + return Os(mce, c, p.Add_await, mce, p.Fix_all_expressions_possibly_missing_await); + } + function xVe(e, t, n, i, s) { + const c = s.getTypeChecker().getDiagnostics(e, i); + return at(c, ({ start: _, length: u, relatedInformation: m, code: g }) => Ey(_) && Ey(u) && M6({ start: _, length: u }, n) && g === t && !!m && at(m, (h) => h.code === p.Did_you_forget_to_use_await.code)); + } + function kVe(e, t, n, i, s) { + const o = CVe(e, s); + if (!o) + return; + let c = o.isCompleteFix, _; + for (const u of o.identifiers) { + const m = s.getSymbolAtLocation(u); + if (!m) + continue; + const g = jn(m.valueDeclaration, Kn), h = g && jn(g.name, Me), S = sv( + g, + 243 + /* VariableStatement */ + ); + if (!g || !S || g.type || !g.initializer || S.getSourceFile() !== t || $n( + S, + 32 + /* Export */ + ) || !h || !jTe(g.initializer)) { + c = !1; + continue; + } + const T = i.getSemanticDiagnostics(t, n); + if (So.Core.eachSymbolReferenceInFile(h, s, t, (D) => u !== D && !EVe(D, T, t, s))) { + c = !1; + continue; + } + (_ || (_ = [])).push({ + expression: g.initializer, + declarationSymbol: m + }); + } + return _ && { + initializers: _, + needsSecondPassForFixAll: !c + }; + } + function CVe(e, t) { + if (Tn(e.parent) && Me(e.parent.expression)) + return { identifiers: [e.parent.expression], isCompleteFix: !0 }; + if (Me(e)) + return { identifiers: [e], isCompleteFix: !0 }; + if (fn(e)) { + let n, i = !0; + for (const s of [e.left, e.right]) { + const o = t.getTypeAtLocation(s); + if (t.getPromisedTypeOfPromise(o)) { + if (!Me(s)) { + i = !1; + continue; + } + (n || (n = [])).push(s); + } + } + return n && { identifiers: n, isCompleteFix: i }; + } + } + function EVe(e, t, n, i) { + const s = Tn(e.parent) ? e.parent.name : fn(e.parent) ? e.parent : e, o = Pn(t, (c) => c.start === s.getStart(n) && c.start + c.length === s.getEnd()); + return o && as(gce, o.code) || // A Promise is usually not correct in a binary expression (it's not valid + // in an arithmetic expression and an equality comparison seems unusual), + // but if the other side of the binary expression has an error, the side + // is typed `any` which will squash the error that would identify this + // Promise as an invalid operand. So if the whole binary expression is + // typed `any` as a result, there is a strong likelihood that this Promise + // is accidentally missing `await`. + i.getTypeAtLocation(s).flags & 1; + } + function jTe(e) { + return e.flags & 65536 || !!ur(e, (t) => t.parent && bo(t.parent) && t.parent.body === t || ks(t) && (t.parent.kind === 262 || t.parent.kind === 218 || t.parent.kind === 219 || t.parent.kind === 174)); + } + function hce(e, t, n, i, s, o) { + if (gN(s.parent) && !s.parent.awaitModifier) { + const c = i.getTypeAtLocation(s), _ = i.getAnyAsyncIterableType(); + if (_ && i.isTypeAssignableTo(c, _)) { + const u = s.parent; + e.replaceNode(n, u, N.updateForOfStatement(u, N.createToken( + 135 + /* AwaitKeyword */ + ), u.initializer, u.expression, u.statement)); + return; + } + } + if (fn(s)) + for (const c of [s.left, s.right]) { + if (o && Me(c)) { + const m = i.getSymbolAtLocation(c); + if (m && o.has(Zs(m))) + continue; + } + const _ = i.getTypeAtLocation(c), u = i.getPromisedTypeOfPromise(_) ? N.createAwaitExpression(c) : c; + e.replaceNode(n, c, u); + } + else if (t === FTe && Tn(s.parent)) { + if (o && Me(s.parent.expression)) { + const c = i.getSymbolAtLocation(s.parent.expression); + if (c && o.has(Zs(c))) + return; + } + e.replaceNode( + n, + s.parent.expression, + N.createParenthesizedExpression(N.createAwaitExpression(s.parent.expression)) + ), BTe(e, s.parent.expression, n); + } else if (as(OTe, t) && tm(s.parent)) { + if (o && Me(s)) { + const c = i.getSymbolAtLocation(s); + if (c && o.has(Zs(c))) + return; + } + e.replaceNode(n, s, N.createParenthesizedExpression(N.createAwaitExpression(s))), BTe(e, s, n); + } else { + if (o && Kn(s.parent) && Me(s.parent.name)) { + const c = i.getSymbolAtLocation(s.parent.name); + if (c && !S0(o, Zs(c))) + return; + } + e.replaceNode(n, s, N.createAwaitExpression(s)); + } + } + function BTe(e, t, n) { + const i = tl(t.pos, n); + i && N9(i.end, i.parent, n) && e.insertText(n, t.getStart(n), ";"); + } + var yce = "addMissingConst", JTe = [ + p.Cannot_find_name_0.code, + p.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code + ]; + Qs({ + errorCodes: JTe, + getCodeActions: function(t) { + const n = sn.ChangeTracker.with(t, (i) => zTe(i, t.sourceFile, t.span.start, t.program)); + if (n.length > 0) + return [Os(yce, n, p.Add_const_to_unresolved_variable, yce, p.Add_const_to_all_unresolved_variables)]; + }, + fixIds: [yce], + getAllCodeActions: (e) => { + const t = /* @__PURE__ */ new Set(); + return Ga(e, JTe, (n, i) => zTe(n, i.file, i.start, e.program, t)); + } + }); + function zTe(e, t, n, i, s) { + const o = Si(t, n), c = ur(o, (m) => _S(m.parent) ? m.parent.initializer === m : DVe(m) ? !1 : "quit"); + if (c) return qq(e, c, t, s); + const _ = o.parent; + if (fn(_) && _.operatorToken.kind === 64 && El(_.parent)) + return qq(e, o, t, s); + if (Ql(_)) { + const m = i.getTypeChecker(); + return Ri(_.elements, (g) => wVe(g, m)) ? qq(e, _, t, s) : void 0; + } + const u = ur(o, (m) => El(m.parent) ? !0 : PVe(m) ? !1 : "quit"); + if (u) { + const m = i.getTypeChecker(); + return WTe(u, m) ? qq(e, u, t, s) : void 0; + } + } + function qq(e, t, n, i) { + (!i || S0(i, t)) && e.insertModifierBefore(n, 87, t); + } + function DVe(e) { + switch (e.kind) { + case 80: + case 209: + case 210: + case 303: + case 304: + return !0; + default: + return !1; + } + } + function wVe(e, t) { + const n = Me(e) ? e : Cl( + e, + /*excludeCompoundAssignment*/ + !0 + ) && Me(e.left) ? e.left : void 0; + return !!n && !t.getSymbolAtLocation(n); + } + function PVe(e) { + switch (e.kind) { + case 80: + case 226: + case 28: + return !0; + default: + return !1; + } + } + function WTe(e, t) { + return fn(e) ? e.operatorToken.kind === 28 ? Ri([e.left, e.right], (n) => WTe(n, t)) : e.operatorToken.kind === 64 && Me(e.left) && !t.getSymbolAtLocation(e.left) : !1; + } + var vce = "addMissingDeclareProperty", UTe = [ + p.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration.code + ]; + Qs({ + errorCodes: UTe, + getCodeActions: function(t) { + const n = sn.ChangeTracker.with(t, (i) => VTe(i, t.sourceFile, t.span.start)); + if (n.length > 0) + return [Os(vce, n, p.Prefix_with_declare, vce, p.Prefix_all_incorrect_property_declarations_with_declare)]; + }, + fixIds: [vce], + getAllCodeActions: (e) => { + const t = /* @__PURE__ */ new Set(); + return Ga(e, UTe, (n, i) => VTe(n, i.file, i.start, t)); + } + }); + function VTe(e, t, n, i) { + const s = Si(t, n); + if (!Me(s)) + return; + const o = s.parent; + o.kind === 172 && (!i || S0(i, o)) && e.insertModifierBefore(t, 138, o); + } + var bce = "addMissingInvocationForDecorator", qTe = [p._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0.code]; + Qs({ + errorCodes: qTe, + getCodeActions: function(t) { + const n = sn.ChangeTracker.with(t, (i) => HTe(i, t.sourceFile, t.span.start)); + return [Os(bce, n, p.Call_decorator_expression, bce, p.Add_to_all_uncalled_decorators)]; + }, + fixIds: [bce], + getAllCodeActions: (e) => Ga(e, qTe, (t, n) => HTe(t, n.file, n.start)) + }); + function HTe(e, t, n) { + const i = Si(t, n), s = ur(i, ll); + E.assert(!!s, "Expected position to be owned by a decorator."); + const o = N.createCallExpression( + s.expression, + /*typeArguments*/ + void 0, + /*argumentsArray*/ + void 0 + ); + e.replaceNode(t, s.expression, o); + } + var Sce = "addMissingResolutionModeImportAttribute", GTe = [ + p.Type_only_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute.code, + p.Type_import_of_an_ECMAScript_module_from_a_CommonJS_module_must_have_a_resolution_mode_attribute.code + ]; + Qs({ + errorCodes: GTe, + getCodeActions: function(t) { + const n = sn.ChangeTracker.with(t, (i) => $Te(i, t.sourceFile, t.span.start, t.program, t.host, t.preferences)); + return [Os(Sce, n, p.Add_resolution_mode_import_attribute, Sce, p.Add_resolution_mode_import_attribute_to_all_type_only_imports_that_need_it)]; + }, + fixIds: [Sce], + getAllCodeActions: (e) => Ga(e, GTe, (t, n) => $Te(t, n.file, n.start, e.program, e.host, e.preferences)) + }); + function $Te(e, t, n, i, s, o) { + var c, _, u; + const m = Si(t, n), g = ur(m, U_(zo, Ed)); + E.assert(!!g, "Expected position to be owned by an ImportDeclaration or ImportType."); + const h = tf(t, o) === 0, S = px(g), T = !S || ((c = WS( + S.text, + t.fileName, + i.getCompilerOptions(), + s, + i.getModuleResolutionCache(), + /*redirectedReference*/ + void 0, + 99 + /* ESNext */ + ).resolvedModule) == null ? void 0 : c.resolvedFileName) === ((u = (_ = i.getResolvedModuleFromModuleSpecifier( + S, + t + )) == null ? void 0 : _.resolvedModule) == null ? void 0 : u.resolvedFileName), C = g.attributes ? N.updateImportAttributes( + g.attributes, + N.createNodeArray([ + ...g.attributes.elements, + N.createImportAttribute( + N.createStringLiteral("resolution-mode", h), + N.createStringLiteral(T ? "import" : "require", h) + ) + ], g.attributes.elements.hasTrailingComma), + g.attributes.multiLine + ) : N.createImportAttributes( + N.createNodeArray([ + N.createImportAttribute( + N.createStringLiteral("resolution-mode", h), + N.createStringLiteral(T ? "import" : "require", h) + ) + ]) + ); + g.kind === 272 ? e.replaceNode( + t, + g, + N.updateImportDeclaration( + g, + g.modifiers, + g.importClause, + g.moduleSpecifier, + C + ) + ) : e.replaceNode( + t, + g, + N.updateImportTypeNode( + g, + g.argument, + C, + g.qualifier, + g.typeArguments + ) + ); + } + var Tce = "addNameToNamelessParameter", XTe = [p.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1.code]; + Qs({ + errorCodes: XTe, + getCodeActions: function(t) { + const n = sn.ChangeTracker.with(t, (i) => QTe(i, t.sourceFile, t.span.start)); + return [Os(Tce, n, p.Add_parameter_name, Tce, p.Add_names_to_all_parameters_without_names)]; + }, + fixIds: [Tce], + getAllCodeActions: (e) => Ga(e, XTe, (t, n) => QTe(t, n.file, n.start)) + }); + function QTe(e, t, n) { + const i = Si(t, n), s = i.parent; + if (!Ii(s)) + return E.fail("Tried to add a parameter name to a non-parameter: " + E.formatSyntaxKind(i.kind)); + const o = s.parent.parameters.indexOf(s); + E.assert(!s.type, "Tried to add a parameter name to a parameter that already had one."), E.assert(o > -1, "Parameter not found in parent parameter list."); + let c = s.name.getEnd(), _ = N.createTypeReferenceNode( + s.name, + /*typeArguments*/ + void 0 + ), u = YTe(t, s); + for (; u; ) + _ = N.createArrayTypeNode(_), c = u.getEnd(), u = YTe(t, u); + const m = N.createParameterDeclaration( + s.modifiers, + s.dotDotDotToken, + "arg" + o, + s.questionToken, + s.dotDotDotToken && !mN(_) ? N.createArrayTypeNode(_) : _, + s.initializer + ); + e.replaceRange(t, np(s.getStart(t), c), m); + } + function YTe(e, t) { + const n = _2(t.name, t.parent, e); + if (n && n.kind === 23 && R0(n.parent) && Ii(n.parent.parent)) + return n.parent.parent; + } + var ZTe = "addOptionalPropertyUndefined", NVe = [ + p.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target.code, + p.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code, + p.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code + ]; + Qs({ + errorCodes: NVe, + getCodeActions(e) { + const t = e.program.getTypeChecker(), n = AVe(e.sourceFile, e.span, t); + if (!n.length) + return; + const i = sn.ChangeTracker.with(e, (s) => FVe(s, n)); + return [Od(ZTe, i, p.Add_undefined_to_optional_property_type)]; + }, + fixIds: [ZTe] + }); + function AVe(e, t, n) { + var i, s; + const o = KTe(XV(e, t), n); + if (!o) + return He; + const { source: c, target: _ } = o, u = IVe(c, _, n) ? n.getTypeAtLocation(_.expression) : n.getTypeAtLocation(_); + return (s = (i = u.symbol) == null ? void 0 : i.declarations) != null && s.some((m) => Cr(m).fileName.match(/\.d\.ts$/)) ? He : n.getExactOptionalProperties(u); + } + function IVe(e, t, n) { + return Tn(t) && !!n.getExactOptionalProperties(n.getTypeAtLocation(t.expression)).length && n.getTypeAtLocation(e) === n.getUndefinedType(); + } + function KTe(e, t) { + var n; + if (e) { + if (fn(e.parent) && e.parent.operatorToken.kind === 64) + return { source: e.parent.right, target: e.parent.left }; + if (Kn(e.parent) && e.parent.initializer) + return { source: e.parent.initializer, target: e.parent.name }; + if (Fs(e.parent)) { + const i = t.getSymbolAtLocation(e.parent.expression); + if (!i?.valueDeclaration || !nx(i.valueDeclaration.kind) || !ct(e)) return; + const s = e.parent.arguments.indexOf(e); + if (s === -1) return; + const o = i.valueDeclaration.parameters[s].name; + if (Me(o)) return { source: e, target: o }; + } else if (Xc(e.parent) && Me(e.parent.name) || _u(e.parent)) { + const i = KTe(e.parent.parent, t); + if (!i) return; + const s = t.getPropertyOfType(t.getTypeAtLocation(i.target), e.parent.name.text), o = (n = s?.declarations) == null ? void 0 : n[0]; + return o ? { + source: Xc(e.parent) ? e.parent.initializer : e.parent.name, + target: o + } : void 0; + } + } else return; + } + function FVe(e, t) { + for (const n of t) { + const i = n.valueDeclaration; + if (i && (m_(i) || ss(i)) && i.type) { + const s = N.createUnionTypeNode([ + ...i.type.kind === 192 ? i.type.types : [i.type], + N.createTypeReferenceNode("undefined") + ]); + e.replaceNode(i.getSourceFile(), i.type, s); + } + } + } + var xce = "annotateWithTypeFromJSDoc", exe = [p.JSDoc_types_may_be_moved_to_TypeScript_types.code]; + Qs({ + errorCodes: exe, + getCodeActions(e) { + const t = txe(e.sourceFile, e.span.start); + if (!t) return; + const n = sn.ChangeTracker.with(e, (i) => ixe(i, e.sourceFile, t)); + return [Os(xce, n, p.Annotate_with_type_from_JSDoc, xce, p.Annotate_everything_with_types_from_JSDoc)]; + }, + fixIds: [xce], + getAllCodeActions: (e) => Ga(e, exe, (t, n) => { + const i = txe(n.file, n.start); + i && ixe(t, n.file, i); + }) + }); + function txe(e, t) { + const n = Si(e, t); + return jn(Ii(n.parent) ? n.parent.parent : n.parent, rxe); + } + function rxe(e) { + return OVe(e) && nxe(e); + } + function nxe(e) { + return Ka(e) ? e.parameters.some(nxe) || !e.type && !!OP(e) : !e.type && !!Ly(e); + } + function ixe(e, t, n) { + if (Ka(n) && (OP(n) || n.parameters.some((i) => !!Ly(i)))) { + if (!n.typeParameters) { + const s = d5(n); + s.length && e.insertTypeParameters(t, n, s); + } + const i = bo(n) && !Xa(n, 21, t); + i && e.insertNodeBefore(t, ya(n.parameters), N.createToken( + 21 + /* OpenParenToken */ + )); + for (const s of n.parameters) + if (!s.type) { + const o = Ly(s); + o && e.tryInsertTypeAnnotation(t, s, Xe(o, h2, fi)); + } + if (i && e.insertNodeAfter(t, _a(n.parameters), N.createToken( + 22 + /* CloseParenToken */ + )), !n.type) { + const s = OP(n); + s && e.tryInsertTypeAnnotation(t, n, Xe(s, h2, fi)); + } + } else { + const i = E.checkDefined(Ly(n), "A JSDocType for this declaration should exist"); + E.assert(!n.type, "The JSDocType decl should have a type"), e.tryInsertTypeAnnotation(t, n, Xe(i, h2, fi)); + } + } + function OVe(e) { + return Ka(e) || e.kind === 260 || e.kind === 171 || e.kind === 172; + } + function h2(e) { + switch (e.kind) { + case 312: + case 313: + return N.createTypeReferenceNode("any", He); + case 316: + return MVe(e); + case 315: + return h2(e.type); + case 314: + return RVe(e); + case 318: + return jVe(e); + case 317: + return BVe(e); + case 183: + return zVe(e); + case 322: + return LVe(e); + default: + const t = kr( + e, + h2, + /*context*/ + void 0 + ); + return on( + t, + 1 + /* SingleLine */ + ), t; + } + } + function LVe(e) { + const t = N.createTypeLiteralNode(gr(e.jsDocPropertyTags, (n) => N.createPropertySignature( + /*modifiers*/ + void 0, + Me(n.name) ? n.name : n.name.right, + nN(n) ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0, + n.typeExpression && Xe(n.typeExpression.type, h2, fi) || N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ) + ))); + return on( + t, + 1 + /* SingleLine */ + ), t; + } + function MVe(e) { + return N.createUnionTypeNode([Xe(e.type, h2, fi), N.createTypeReferenceNode("undefined", He)]); + } + function RVe(e) { + return N.createUnionTypeNode([Xe(e.type, h2, fi), N.createTypeReferenceNode("null", He)]); + } + function jVe(e) { + return N.createArrayTypeNode(Xe(e.type, h2, fi)); + } + function BVe(e) { + return N.createFunctionTypeNode(He, e.parameters.map(JVe), e.type ?? N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + )); + } + function JVe(e) { + const t = e.parent.parameters.indexOf(e), n = e.type.kind === 318 && t === e.parent.parameters.length - 1, i = e.name || (n ? "rest" : "arg" + t), s = n ? N.createToken( + 26 + /* DotDotDotToken */ + ) : e.dotDotDotToken; + return N.createParameterDeclaration(e.modifiers, s, i, e.questionToken, Xe(e.type, h2, fi), e.initializer); + } + function zVe(e) { + let t = e.typeName, n = e.typeArguments; + if (Me(e.typeName)) { + if (X7(e)) + return WVe(e); + let i = e.typeName.text; + switch (e.typeName.text) { + case "String": + case "Boolean": + case "Object": + case "Number": + i = i.toLowerCase(); + break; + case "array": + case "date": + case "promise": + i = i[0].toUpperCase() + i.slice(1); + break; + } + t = N.createIdentifier(i), (i === "Array" || i === "Promise") && !e.typeArguments ? n = N.createNodeArray([N.createTypeReferenceNode("any", He)]) : n = Or(e.typeArguments, h2, fi); + } + return N.createTypeReferenceNode(t, n); + } + function WVe(e) { + const t = N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + e.typeArguments[0].kind === 150 ? "n" : "s", + /*questionToken*/ + void 0, + N.createTypeReferenceNode(e.typeArguments[0].kind === 150 ? "number" : "string", []), + /*initializer*/ + void 0 + ), n = N.createTypeLiteralNode([N.createIndexSignature( + /*modifiers*/ + void 0, + [t], + e.typeArguments[1] + )]); + return on( + n, + 1 + /* SingleLine */ + ), n; + } + var kce = "convertFunctionToEs6Class", sxe = [p.This_constructor_function_may_be_converted_to_a_class_declaration.code]; + Qs({ + errorCodes: sxe, + getCodeActions(e) { + const t = sn.ChangeTracker.with(e, (n) => axe(n, e.sourceFile, e.span.start, e.program.getTypeChecker(), e.preferences, e.program.getCompilerOptions())); + return [Os(kce, t, p.Convert_function_to_an_ES2015_class, kce, p.Convert_all_constructor_functions_to_classes)]; + }, + fixIds: [kce], + getAllCodeActions: (e) => Ga(e, sxe, (t, n) => axe(t, n.file, n.start, e.program.getTypeChecker(), e.preferences, e.program.getCompilerOptions())) + }); + function axe(e, t, n, i, s, o) { + const c = i.getSymbolAtLocation(Si(t, n)); + if (!c || !c.valueDeclaration || !(c.flags & 19)) + return; + const _ = c.valueDeclaration; + if (Tc(_) || po(_)) + e.replaceNode(t, _, g(_)); + else if (Kn(_)) { + const h = m(_); + if (!h) + return; + const S = _.parent.parent; + Il(_.parent) && _.parent.declarations.length > 1 ? (e.delete(t, _), e.insertNodeAfter(t, S, h)) : e.replaceNode(t, S, h); + } + function u(h) { + const S = []; + return h.exports && h.exports.forEach((D) => { + if (D.name === "prototype" && D.declarations) { + const w = D.declarations[0]; + if (D.declarations.length === 1 && Tn(w) && fn(w.parent) && w.parent.operatorToken.kind === 64 && oa(w.parent.right)) { + const A = w.parent.right; + C( + A.symbol, + /*modifiers*/ + void 0, + S + ); + } + } else + C(D, [N.createToken( + 126 + /* StaticKeyword */ + )], S); + }), h.members && h.members.forEach((D, w) => { + var A, O, F, R; + if (w === "constructor" && D.valueDeclaration) { + const W = (R = (F = (O = (A = h.exports) == null ? void 0 : A.get("prototype")) == null ? void 0 : O.declarations) == null ? void 0 : F[0]) == null ? void 0 : R.parent; + W && fn(W) && oa(W.right) && at(W.right.properties, Gq) || e.delete(t, D.valueDeclaration.parent); + return; + } + C( + D, + /*modifiers*/ + void 0, + S + ); + }), S; + function T(D, w) { + return vo(D) ? Tn(D) && Gq(D) ? !0 : vs(w) : Ri(D.properties, (A) => !!(fc(A) || MP(A) || Xc(A) && po(A.initializer) && A.name || Gq(A))); + } + function C(D, w, A) { + if (!(D.flags & 8192) && !(D.flags & 4096)) + return; + const O = D.valueDeclaration, F = O.parent, R = F.right; + if (!T(O, R) || at(A, (_e) => { + const Z = is(_e); + return !!(Z && Me(Z) && An(Z) === _c(D)); + })) + return; + const W = F.parent && F.parent.kind === 244 ? F.parent : F; + if (e.delete(t, W), !R) { + A.push(N.createPropertyDeclaration( + w, + D.name, + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + )); + return; + } + if (vo(O) && (po(R) || bo(R))) { + const _e = tf(t, s), Z = UVe(O, o, _e); + Z && V(A, R, Z); + return; + } else if (oa(R)) { + lr( + R.properties, + (_e) => { + (fc(_e) || MP(_e)) && A.push(_e), Xc(_e) && po(_e.initializer) && V(A, _e.initializer, _e.name), Gq(_e); + } + ); + return; + } else { + if (Gu(t) || !Tn(O)) return; + const _e = N.createPropertyDeclaration( + w, + O.name, + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + R + ); + j6(F.parent, _e, t), A.push(_e); + return; + } + function V(_e, Z, J) { + return po(Z) ? $(_e, Z, J) : U(_e, Z, J); + } + function $(_e, Z, J) { + const re = Wi(w, Hq( + Z, + 134 + /* AsyncKeyword */ + )), te = N.createMethodDeclaration( + re, + /*asteriskToken*/ + void 0, + J, + /*questionToken*/ + void 0, + /*typeParameters*/ + void 0, + Z.parameters, + /*type*/ + void 0, + Z.body + ); + j6(F, te, t), _e.push(te); + } + function U(_e, Z, J) { + const re = Z.body; + let te; + re.kind === 241 ? te = re : te = N.createBlock([N.createReturnStatement(re)]); + const ie = Wi(w, Hq( + Z, + 134 + /* AsyncKeyword */ + )), le = N.createMethodDeclaration( + ie, + /*asteriskToken*/ + void 0, + J, + /*questionToken*/ + void 0, + /*typeParameters*/ + void 0, + Z.parameters, + /*type*/ + void 0, + te + ); + j6(F, le, t), _e.push(le); + } + } + } + function m(h) { + const S = h.initializer; + if (!S || !po(S) || !Me(h.name)) + return; + const T = u(h.symbol); + S.body && T.unshift(N.createConstructorDeclaration( + /*modifiers*/ + void 0, + S.parameters, + S.body + )); + const C = Hq( + h.parent.parent, + 95 + /* ExportKeyword */ + ); + return N.createClassDeclaration( + C, + h.name, + /*typeParameters*/ + void 0, + /*heritageClauses*/ + void 0, + T + ); + } + function g(h) { + const S = u(c); + h.body && S.unshift(N.createConstructorDeclaration( + /*modifiers*/ + void 0, + h.parameters, + h.body + )); + const T = Hq( + h, + 95 + /* ExportKeyword */ + ); + return N.createClassDeclaration( + T, + h.name, + /*typeParameters*/ + void 0, + /*heritageClauses*/ + void 0, + S + ); + } + } + function Hq(e, t) { + return Jp(e) ? kn(e.modifiers, (n) => n.kind === t) : void 0; + } + function Gq(e) { + return e.name ? !!(Me(e.name) && e.name.text === "constructor") : !1; + } + function UVe(e, t, n) { + if (Tn(e)) + return e.name; + const i = e.argumentExpression; + if (d_(i)) + return i; + if (Na(i)) + return E_(i.text, pa(t)) ? N.createIdentifier(i.text) : NS(i) ? N.createStringLiteral( + i.text, + n === 0 + /* Single */ + ) : i; + } + var Cce = "convertToAsyncFunction", oxe = [p.This_may_be_converted_to_an_async_function.code], $q = !0; + Qs({ + errorCodes: oxe, + getCodeActions(e) { + $q = !0; + const t = sn.ChangeTracker.with(e, (n) => cxe(n, e.sourceFile, e.span.start, e.program.getTypeChecker())); + return $q ? [Os(Cce, t, p.Convert_to_async_function, Cce, p.Convert_all_to_async_functions)] : []; + }, + fixIds: [Cce], + getAllCodeActions: (e) => Ga(e, oxe, (t, n) => cxe(t, n.file, n.start, e.program.getTypeChecker())) + }); + function cxe(e, t, n, i) { + const s = Si(t, n); + let o; + if (Me(s) && Kn(s.parent) && s.parent.initializer && Ka(s.parent.initializer) ? o = s.parent.initializer : o = jn(ff(Si(t, n)), gq), !o) + return; + const c = /* @__PURE__ */ new Map(), _ = an(o), u = qVe(o, i), m = HVe(o, i, c); + if (!dq(m, i)) + return; + const g = m.body && ks(m.body) ? VVe(m.body, i) : He, h = { checker: i, synthNamesMap: c, setOfExpressionsToReturn: u, isInJSFile: _ }; + if (!g.length) + return; + const S = aa(t.text, um(o).pos); + e.insertModifierAt(t, S, 134, { suffix: " " }); + for (const T of g) + if (ms(T, function C(D) { + if (Fs(D)) { + const w = V6( + D, + D, + h, + /*hasContinuation*/ + !1 + ); + if (yk()) + return !0; + e.replaceNodeWithNodes(t, T, w); + } else if (!vs(D) && (ms(D, C), yk())) + return !0; + }), yk()) + return; + } + function VVe(e, t) { + const n = []; + return Hy(e, (i) => { + V9(i, t) && n.push(i); + }), n; + } + function qVe(e, t) { + if (!e.body) + return /* @__PURE__ */ new Set(); + const n = /* @__PURE__ */ new Set(); + return ms(e.body, function i(s) { + qA(s, t, "then") ? (n.add(Aa(s)), lr(s.arguments, i)) : qA(s, t, "catch") || qA(s, t, "finally") ? (n.add(Aa(s)), ms(s, i)) : uxe(s, t) ? n.add(Aa(s)) : ms(s, i); + }), n; + } + function qA(e, t, n) { + if (!Fs(e)) return !1; + const s = mA(e, n) && t.getTypeAtLocation(e); + return !!(s && t.getPromisedTypeOfPromise(s)); + } + function lxe(e, t) { + return (Cn(e) & 4) !== 0 && e.target === t; + } + function Xq(e, t, n) { + if (e.expression.name.escapedText === "finally") + return; + const i = n.getTypeAtLocation(e.expression.expression); + if (lxe(i, n.getPromiseType()) || lxe(i, n.getPromiseLikeType())) + if (e.expression.name.escapedText === "then") { + if (t === ky(e.arguments, 0)) + return ky(e.typeArguments, 0); + if (t === ky(e.arguments, 1)) + return ky(e.typeArguments, 1); + } else + return ky(e.typeArguments, 0); + } + function uxe(e, t) { + return ct(e) ? !!t.getPromisedTypeOfPromise(t.getTypeAtLocation(e)) : !1; + } + function HVe(e, t, n) { + const i = /* @__PURE__ */ new Map(), s = wp(); + return ms(e, function o(c) { + if (!Me(c)) { + ms(c, o); + return; + } + const _ = t.getSymbolAtLocation(c); + if (_) { + const u = t.getTypeAtLocation(c), m = gxe(u, t), g = Zs(_).toString(); + if (m && !Ii(c.parent) && !Ka(c.parent) && !n.has(g)) { + const h = Uc(m.parameters), S = h?.valueDeclaration && Ii(h.valueDeclaration) && jn(h.valueDeclaration.name, Me) || N.createUniqueName( + "result", + 16 + /* Optimistic */ + ), T = _xe(S, s); + n.set(g, T), s.add(S.text, _); + } else if (c.parent && (Ii(c.parent) || Kn(c.parent) || ma(c.parent))) { + const h = c.text, S = s.get(h); + if (S && S.some((T) => T !== _)) { + const T = _xe(c, s); + i.set(g, T.identifier), n.set(g, T), s.add(h, _); + } else { + const T = Wa(c); + n.set(g, Sw(T)), s.add(h, _); + } + } + } + }), DA( + e, + /*includeTrivia*/ + !0, + (o) => { + if (ma(o) && Me(o.name) && Nf(o.parent)) { + const c = t.getSymbolAtLocation(o.name), _ = c && i.get(String(Zs(c))); + if (_ && _.text !== (o.name || o.propertyName).getText()) + return N.createBindingElement( + o.dotDotDotToken, + o.propertyName || o.name, + _, + o.initializer + ); + } else if (Me(o)) { + const c = t.getSymbolAtLocation(o), _ = c && i.get(String(Zs(c))); + if (_) + return N.createIdentifier(_.text); + } + } + ); + } + function _xe(e, t) { + const n = (t.get(e.text) || He).length, i = n === 0 ? e : N.createIdentifier(e.text + "_" + n); + return Sw(i); + } + function yk() { + return !$q; + } + function Fv() { + return $q = !1, He; + } + function V6(e, t, n, i, s) { + if (qA(t, n.checker, "then")) + return XVe(t, ky(t.arguments, 0), ky(t.arguments, 1), n, i, s); + if (qA(t, n.checker, "catch")) + return dxe(t, ky(t.arguments, 0), n, i, s); + if (qA(t, n.checker, "finally")) + return $Ve(t, ky(t.arguments, 0), n, i, s); + if (Tn(t)) + return V6(e, t.expression, n, i, s); + const o = n.checker.getTypeAtLocation(t); + return o && n.checker.getPromisedTypeOfPromise(o) ? (E.assertNode(Jo(t).parent, Tn), QVe(e, t, n, i, s)) : Fv(); + } + function Qq({ checker: e }, t) { + if (t.kind === 106) return !0; + if (Me(t) && !Fo(t) && An(t) === "undefined") { + const n = e.getSymbolAtLocation(t); + return !n || e.isUndefinedSymbol(n); + } + return !1; + } + function GVe(e) { + const t = N.createUniqueName( + e.identifier.text, + 16 + /* Optimistic */ + ); + return Sw(t); + } + function fxe(e, t, n) { + let i; + return n && !GA(e, t) && (HA(n) ? (i = n, t.synthNamesMap.forEach((s, o) => { + if (s.identifier.text === n.identifier.text) { + const c = GVe(n); + t.synthNamesMap.set(o, c); + } + })) : i = Sw(N.createUniqueName( + "result", + 16 + /* Optimistic */ + ), n.types), Pce(i)), i; + } + function pxe(e, t, n, i, s) { + const o = []; + let c; + if (i && !GA(e, t)) { + c = Wa(Pce(i)); + const _ = i.types, u = t.checker.getUnionType( + _, + 2 + /* Subtype */ + ), m = t.isInJSFile ? void 0 : t.checker.typeToTypeNode( + u, + /*enclosingDeclaration*/ + void 0, + /*flags*/ + void 0 + ), g = [N.createVariableDeclaration( + c, + /*exclamationToken*/ + void 0, + m + )], h = N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + g, + 1 + /* Let */ + ) + ); + o.push(h); + } + return o.push(n), s && c && KVe(s) && o.push(N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [ + N.createVariableDeclaration( + Wa(bxe(s)), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + c + ) + ], + 2 + /* Const */ + ) + )), o; + } + function $Ve(e, t, n, i, s) { + if (!t || Qq(n, t)) + return V6( + /* returnContextNode */ + e, + e.expression.expression, + n, + i, + s + ); + const o = fxe(e, n, s), c = V6( + /*returnContextNode*/ + e, + e.expression.expression, + n, + /*hasContinuation*/ + !0, + o + ); + if (yk()) return Fv(); + const _ = Dce( + t, + i, + /*continuationArgName*/ + void 0, + /*inputArgName*/ + void 0, + e, + n + ); + if (yk()) return Fv(); + const u = N.createBlock(c), m = N.createBlock(_), g = N.createTryStatement( + u, + /*catchClause*/ + void 0, + m + ); + return pxe(e, n, g, o, s); + } + function dxe(e, t, n, i, s) { + if (!t || Qq(n, t)) + return V6( + /* returnContextNode */ + e, + e.expression.expression, + n, + i, + s + ); + const o = yxe(t, n), c = fxe(e, n, s), _ = V6( + /*returnContextNode*/ + e, + e.expression.expression, + n, + /*hasContinuation*/ + !0, + c + ); + if (yk()) return Fv(); + const u = Dce(t, i, c, o, e, n); + if (yk()) return Fv(); + const m = N.createBlock(_), g = N.createCatchClause(o && Wa(oL(o)), N.createBlock(u)), h = N.createTryStatement( + m, + g, + /*finallyBlock*/ + void 0 + ); + return pxe(e, n, h, c, s); + } + function XVe(e, t, n, i, s, o) { + if (!t || Qq(i, t)) + return dxe(e, n, i, s, o); + if (n && !Qq(i, n)) + return Fv(); + const c = yxe(t, i), _ = V6( + e.expression.expression, + e.expression.expression, + i, + /*hasContinuation*/ + !0, + c + ); + if (yk()) return Fv(); + const u = Dce(t, s, o, c, e, i); + return yk() ? Fv() : Wi(_, u); + } + function QVe(e, t, n, i, s) { + if (GA(e, n)) { + let o = Wa(t); + return i && (o = N.createAwaitExpression(o)), [N.createReturnStatement(o)]; + } + return Yq( + s, + N.createAwaitExpression(t), + /*typeAnnotation*/ + void 0 + ); + } + function Yq(e, t, n) { + return !e || vxe(e) ? [N.createExpressionStatement(t)] : HA(e) && e.hasBeenDeclared ? [N.createExpressionStatement(N.createAssignment(Wa(wce(e)), t))] : [ + N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [ + N.createVariableDeclaration( + Wa(oL(e)), + /*exclamationToken*/ + void 0, + n, + t + ) + ], + 2 + /* Const */ + ) + ) + ]; + } + function Ece(e, t) { + if (t && e) { + const n = N.createUniqueName( + "result", + 16 + /* Optimistic */ + ); + return [ + ...Yq(Sw(n), e, t), + N.createReturnStatement(n) + ]; + } + return [N.createReturnStatement(e)]; + } + function Dce(e, t, n, i, s, o) { + var c; + switch (e.kind) { + case 106: + break; + case 211: + case 80: + if (!i) + break; + const _ = N.createCallExpression( + Wa(e), + /*typeArguments*/ + void 0, + HA(i) ? [wce(i)] : [] + ); + if (GA(s, o)) + return Ece(_, Xq(s, e, o.checker)); + const u = o.checker.getTypeAtLocation(e), m = o.checker.getSignaturesOfType( + u, + 0 + /* Call */ + ); + if (!m.length) + return Fv(); + const g = m[0].getReturnType(), h = Yq(n, N.createAwaitExpression(_), Xq(s, e, o.checker)); + return n && n.types.push(o.checker.getAwaitedType(g) || g), h; + case 218: + case 219: { + const S = e.body, T = (c = gxe(o.checker.getTypeAtLocation(e), o.checker)) == null ? void 0 : c.getReturnType(); + if (ks(S)) { + let C = [], D = !1; + for (const w of S.statements) + if (Rp(w)) + if (D = !0, V9(w, o.checker)) + C = C.concat(hxe(o, w, t, n)); + else { + const A = T && w.expression ? mxe(o.checker, T, w.expression) : w.expression; + C.push(...Ece(A, Xq(s, e, o.checker))); + } + else { + if (t && Hy(w, yb)) + return Fv(); + C.push(w); + } + return GA(s, o) ? C.map((w) => Wa(w)) : YVe( + C, + n, + o, + D + ); + } else { + const C = mq(S, o.checker) ? hxe(o, N.createReturnStatement(S), t, n) : He; + if (C.length > 0) + return C; + if (T) { + const D = mxe(o.checker, T, S); + if (GA(s, o)) + return Ece(D, Xq(s, e, o.checker)); + { + const w = Yq( + n, + D, + /*typeAnnotation*/ + void 0 + ); + return n && n.types.push(o.checker.getAwaitedType(T) || T), w; + } + } else + return Fv(); + } + } + default: + return Fv(); + } + return He; + } + function mxe(e, t, n) { + const i = Wa(n); + return e.getPromisedTypeOfPromise(t) ? N.createAwaitExpression(i) : i; + } + function gxe(e, t) { + const n = t.getSignaturesOfType( + e, + 0 + /* Call */ + ); + return Co(n); + } + function YVe(e, t, n, i) { + const s = []; + for (const o of e) + if (Rp(o)) { + if (o.expression) { + const c = uxe(o.expression, n.checker) ? N.createAwaitExpression(o.expression) : o.expression; + t === void 0 ? s.push(N.createExpressionStatement(c)) : HA(t) && t.hasBeenDeclared ? s.push(N.createExpressionStatement(N.createAssignment(wce(t), c))) : s.push(N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [N.createVariableDeclaration( + oL(t), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + c + )], + 2 + /* Const */ + ) + )); + } + } else + s.push(Wa(o)); + return !i && t !== void 0 && s.push(N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [N.createVariableDeclaration( + oL(t), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + N.createIdentifier("undefined") + )], + 2 + /* Const */ + ) + )), s; + } + function hxe(e, t, n, i) { + let s = []; + return ms(t, function o(c) { + if (Fs(c)) { + const _ = V6(c, c, e, n, i); + if (s = s.concat(_), s.length > 0) + return; + } else vs(c) || ms(c, o); + }), s; + } + function yxe(e, t) { + const n = []; + let i; + if (Ka(e)) { + if (e.parameters.length > 0) { + const u = e.parameters[0].name; + i = s(u); + } + } else Me(e) ? i = o(e) : Tn(e) && Me(e.name) && (i = o(e.name)); + if (!i || "identifier" in i && i.identifier.text === "undefined") + return; + return i; + function s(u) { + if (Me(u)) return o(u); + const m = na(u.elements, (g) => ul(g) ? [] : [s(g.name)]); + return ZVe(u, m); + } + function o(u) { + const m = _(u), g = c(m); + return g && t.synthNamesMap.get(Zs(g).toString()) || Sw(u, n); + } + function c(u) { + var m; + return ((m = jn(u, bd)) == null ? void 0 : m.symbol) ?? t.checker.getSymbolAtLocation(u); + } + function _(u) { + return u.original ? u.original : u; + } + } + function vxe(e) { + return e ? HA(e) ? !e.identifier.text : Ri(e.elements, vxe) : !0; + } + function Sw(e, t = []) { + return { kind: 0, identifier: e, types: t, hasBeenDeclared: !1, hasBeenReferenced: !1 }; + } + function ZVe(e, t = He, n = []) { + return { kind: 1, bindingPattern: e, elements: t, types: n }; + } + function wce(e) { + return e.hasBeenReferenced = !0, e.identifier; + } + function oL(e) { + return HA(e) ? Pce(e) : bxe(e); + } + function bxe(e) { + for (const t of e.elements) + oL(t); + return e.bindingPattern; + } + function Pce(e) { + return e.hasBeenDeclared = !0, e.identifier; + } + function HA(e) { + return e.kind === 0; + } + function KVe(e) { + return e.kind === 1; + } + function GA(e, t) { + return !!e.original && t.setOfExpressionsToReturn.has(Aa(e.original)); + } + Qs({ + errorCodes: [p.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module.code], + getCodeActions(e) { + const { sourceFile: t, program: n, preferences: i } = e, s = sn.ChangeTracker.with(e, (o) => { + if (tqe(t, n.getTypeChecker(), o, pa(n.getCompilerOptions()), tf(t, i))) + for (const _ of n.getSourceFiles()) + eqe(_, t, n, o, tf(_, i)); + }); + return [Od("convertToEsModule", s, p.Convert_to_ES_module)]; + } + }); + function eqe(e, t, n, i, s) { + var o; + for (const c of e.imports) { + const _ = (o = n.getResolvedModuleFromModuleSpecifier(c, e)) == null ? void 0 : o.resolvedModule; + if (!_ || _.resolvedFileName !== t.fileName) + continue; + const u = O4(c); + switch (u.kind) { + case 271: + i.replaceNode(e, u, p1( + u.name, + /*namedImports*/ + void 0, + c, + s + )); + break; + case 213: + __( + u, + /*requireStringLiteralLikeArgument*/ + !1 + ) && i.replaceNode(e, u, N.createPropertyAccessExpression(Wa(u), "default")); + break; + } + } + } + function tqe(e, t, n, i, s) { + const o = { original: dqe(e), additional: /* @__PURE__ */ new Set() }, c = rqe(e, t, o); + nqe(e, c, n); + let _ = !1, u; + for (const m of kn(e.statements, pc)) { + const g = Txe(e, m, n, t, o, i, s); + g && T7(g, u ?? (u = /* @__PURE__ */ new Map())); + } + for (const m of kn(e.statements, (g) => !pc(g))) { + const g = iqe(e, m, t, n, o, i, c, u, s); + _ = _ || g; + } + return u?.forEach((m, g) => { + n.replaceNode(e, g, m); + }), _; + } + function rqe(e, t, n) { + const i = /* @__PURE__ */ new Map(); + return Sxe(e, (s) => { + const { text: o } = s.name; + !i.has(o) && (wB(s.name) || t.resolveName( + o, + s, + 111551, + /*excludeGlobals*/ + !0 + )) && i.set(o, Zq(`_${o}`, n)); + }), i; + } + function nqe(e, t, n) { + Sxe(e, (i, s) => { + if (s) + return; + const { text: o } = i.name; + n.replaceNode(e, i, N.createIdentifier(t.get(o) || o)); + }); + } + function Sxe(e, t) { + e.forEachChild(function n(i) { + if (Tn(i) && i2(e, i.expression) && Me(i.name)) { + const { parent: s } = i; + t( + i, + fn(s) && s.left === i && s.operatorToken.kind === 64 + /* EqualsToken */ + ); + } + i.forEachChild(n); + }); + } + function iqe(e, t, n, i, s, o, c, _, u) { + switch (t.kind) { + case 243: + return Txe(e, t, i, n, s, o, u), !1; + case 244: { + const { expression: m } = t; + switch (m.kind) { + case 213: + return __( + m, + /*requireStringLiteralLikeArgument*/ + !0 + ) && i.replaceNode(e, t, p1( + /*defaultImport*/ + void 0, + /*namedImports*/ + void 0, + m.arguments[0], + u + )), !1; + case 226: { + const { operatorToken: g } = m; + return g.kind === 64 && aqe(e, n, m, i, c, _); + } + } + } + // falls through + default: + return !1; + } + } + function Txe(e, t, n, i, s, o, c) { + const { declarationList: _ } = t; + let u = !1; + const m = gr(_.declarations, (g) => { + const { name: h, initializer: S } = g; + if (S) { + if (i2(e, S)) + return u = !0, Tw([]); + if (__( + S, + /*requireStringLiteralLikeArgument*/ + !0 + )) + return u = !0, fqe(h, S.arguments[0], i, s, o, c); + if (Tn(S) && __( + S.expression, + /*requireStringLiteralLikeArgument*/ + !0 + )) + return u = !0, sqe(h, S.name.text, S.expression.arguments[0], s, c); + } + return Tw([N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList([g], _.flags) + )]); + }); + if (u) { + n.replaceNodeWithNodes(e, t, na(m, (h) => h.newImports)); + let g; + return lr(m, (h) => { + h.useSitesToUnqualify && T7(h.useSitesToUnqualify, g ?? (g = /* @__PURE__ */ new Map())); + }), g; + } + } + function sqe(e, t, n, i, s) { + switch (e.kind) { + case 206: + case 207: { + const o = Zq(t, i); + return Tw([ + Exe(o, t, n, s), + Kq( + /*modifiers*/ + void 0, + e, + N.createIdentifier(o) + ) + ]); + } + case 80: + return Tw([Exe(e.text, t, n, s)]); + default: + return E.assertNever(e, `Convert to ES module got invalid syntax form ${e.kind}`); + } + } + function aqe(e, t, n, i, s, o) { + const { left: c, right: _ } = n; + if (!Tn(c)) + return !1; + if (i2(e, c)) + if (i2(e, _)) + i.delete(e, n.parent); + else { + const u = oa(_) ? oqe(_, o) : __( + _, + /*requireStringLiteralLikeArgument*/ + !0 + ) ? lqe(_.arguments[0], t) : void 0; + return u ? (i.replaceNodeWithNodes(e, n.parent, u[0]), u[1]) : (i.replaceRangeWithText(e, np(c.getStart(e), _.pos), "export default"), !0); + } + else i2(e, c.expression) && cqe(e, n, i, s); + return !1; + } + function oqe(e, t) { + const n = gR(e.properties, (i) => { + switch (i.kind) { + case 177: + case 178: + // TODO: Maybe we should handle this? See fourslash test `refactorConvertToEs6Module_export_object_shorthand.ts`. + // falls through + case 304: + case 305: + return; + case 303: + return Me(i.name) ? _qe(i.name.text, i.initializer, t) : void 0; + case 174: + return Me(i.name) ? Cxe(i.name.text, [N.createToken( + 95 + /* ExportKeyword */ + )], i, t) : void 0; + default: + E.assertNever(i, `Convert to ES6 got invalid prop kind ${i.kind}`); + } + }); + return n && [n, !1]; + } + function cqe(e, t, n, i) { + const { text: s } = t.left.name, o = i.get(s); + if (o !== void 0) { + const c = [ + Kq( + /*modifiers*/ + void 0, + o, + t.right + ), + Ice([N.createExportSpecifier( + /*isTypeOnly*/ + !1, + o, + s + )]) + ]; + n.replaceNodeWithNodes(e, t.parent, c); + } else + uqe(t, e, n); + } + function lqe(e, t) { + const n = e.text, i = t.getSymbolAtLocation(e), s = i ? i.exports : _R; + return s.has( + "export=" + /* ExportEquals */ + ) ? [[Nce(n)], !0] : s.has( + "default" + /* Default */ + ) ? ( + // If there's some non-default export, must include both `export *` and `export default`. + s.size > 1 ? [[xxe(n), Nce(n)], !0] : [[Nce(n)], !0] + ) : [[xxe(n)], !1]; + } + function xxe(e) { + return Ice( + /*exportSpecifiers*/ + void 0, + e + ); + } + function Nce(e) { + return Ice([N.createExportSpecifier( + /*isTypeOnly*/ + !1, + /*propertyName*/ + void 0, + "default" + )], e); + } + function uqe({ left: e, right: t, parent: n }, i, s) { + const o = e.name.text; + if ((po(t) || bo(t) || Gc(t)) && (!t.name || t.name.text === o)) { + s.replaceRange(i, { pos: e.getStart(i), end: t.getStart(i) }, N.createToken( + 95 + /* ExportKeyword */ + ), { suffix: " " }), t.name || s.insertName(i, t, o); + const c = Xa(n, 27, i); + c && s.delete(i, c); + } else + s.replaceNodeRangeWithNodes(i, e.expression, Xa(e, 25, i), [N.createToken( + 95 + /* ExportKeyword */ + ), N.createToken( + 87 + /* ConstKeyword */ + )], { joiner: " ", suffix: " " }); + } + function _qe(e, t, n) { + const i = [N.createToken( + 95 + /* ExportKeyword */ + )]; + switch (t.kind) { + case 218: { + const { name: o } = t; + if (o && o.text !== e) + return s(); + } + // falls through + case 219: + return Cxe(e, i, t, n); + case 231: + return gqe(e, i, t, n); + default: + return s(); + } + function s() { + return Kq(i, N.createIdentifier(e), Ace(t, n)); + } + } + function Ace(e, t) { + if (!t || !at(Ki(t.keys()), (i) => p_(e, i))) + return e; + return os(e) ? zV( + e, + /*includeTrivia*/ + !0, + n + ) : DA( + e, + /*includeTrivia*/ + !0, + n + ); + function n(i) { + if (i.kind === 211) { + const s = t.get(i); + return t.delete(i), s; + } + } + } + function fqe(e, t, n, i, s, o) { + switch (e.kind) { + case 206: { + const c = gR(e.elements, (_) => _.dotDotDotToken || _.initializer || _.propertyName && !Me(_.propertyName) || !Me(_.name) ? void 0 : Dxe(_.propertyName && _.propertyName.text, _.name.text)); + if (c) + return Tw([p1( + /*defaultImport*/ + void 0, + c, + t, + o + )]); + } + // falls through -- object destructuring has an interesting pattern and must be a variable declaration + case 207: { + const c = Zq(FA(t.text, s), i); + return Tw([ + p1( + N.createIdentifier(c), + /*namedImports*/ + void 0, + t, + o + ), + Kq( + /*modifiers*/ + void 0, + Wa(e), + N.createIdentifier(c) + ) + ]); + } + case 80: + return pqe(e, t, n, i, o); + default: + return E.assertNever(e, `Convert to ES module got invalid name kind ${e.kind}`); + } + } + function pqe(e, t, n, i, s) { + const o = n.getSymbolAtLocation(e), c = /* @__PURE__ */ new Map(); + let _ = !1, u; + for (const g of i.original.get(e.text)) { + if (n.getSymbolAtLocation(g) !== o || g === e) + continue; + const { parent: h } = g; + if (Tn(h)) { + const { name: { text: S } } = h; + if (S === "default") { + _ = !0; + const T = g.getText(); + (u ?? (u = /* @__PURE__ */ new Map())).set(h, N.createIdentifier(T)); + } else { + E.assert(h.expression === g, "Didn't expect expression === use"); + let T = c.get(S); + T === void 0 && (T = Zq(S, i), c.set(S, T)), (u ?? (u = /* @__PURE__ */ new Map())).set(h, N.createIdentifier(T)); + } + } else + _ = !0; + } + const m = c.size === 0 ? void 0 : Ki(VE(c.entries(), ([g, h]) => N.createImportSpecifier( + /*isTypeOnly*/ + !1, + g === h ? void 0 : N.createIdentifier(g), + N.createIdentifier(h) + ))); + return m || (_ = !0), Tw( + [p1(_ ? Wa(e) : void 0, m, t, s)], + u + ); + } + function Zq(e, t) { + for (; t.original.has(e) || t.additional.has(e); ) + e = `_${e}`; + return t.additional.add(e), e; + } + function dqe(e) { + const t = wp(); + return kxe(e, (n) => t.add(n.text, n)), t; + } + function kxe(e, t) { + Me(e) && mqe(e) && t(e), e.forEachChild((n) => kxe(n, t)); + } + function mqe(e) { + const { parent: t } = e; + switch (t.kind) { + case 211: + return t.name !== e; + case 208: + return t.propertyName !== e; + case 276: + return t.propertyName !== e; + default: + return !0; + } + } + function Cxe(e, t, n, i) { + return N.createFunctionDeclaration( + Wi(t, f2(n.modifiers)), + Wa(n.asteriskToken), + e, + f2(n.typeParameters), + f2(n.parameters), + Wa(n.type), + N.converters.convertToFunctionBlock(Ace(n.body, i)) + ); + } + function gqe(e, t, n, i) { + return N.createClassDeclaration( + Wi(t, f2(n.modifiers)), + e, + f2(n.typeParameters), + f2(n.heritageClauses), + Ace(n.members, i) + ); + } + function Exe(e, t, n, i) { + return t === "default" ? p1( + N.createIdentifier(e), + /*namedImports*/ + void 0, + n, + i + ) : p1( + /*defaultImport*/ + void 0, + [Dxe(t, e)], + n, + i + ); + } + function Dxe(e, t) { + return N.createImportSpecifier( + /*isTypeOnly*/ + !1, + e !== void 0 && e !== t ? N.createIdentifier(e) : void 0, + N.createIdentifier(t) + ); + } + function Kq(e, t, n) { + return N.createVariableStatement( + e, + N.createVariableDeclarationList( + [N.createVariableDeclaration( + t, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + n + )], + 2 + /* Const */ + ) + ); + } + function Ice(e, t) { + return N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + e && N.createNamedExports(e), + t === void 0 ? void 0 : N.createStringLiteral(t) + ); + } + function Tw(e, t) { + return { + newImports: e, + useSitesToUnqualify: t + }; + } + var Fce = "correctQualifiedNameToIndexedAccessType", wxe = [p.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1.code]; + Qs({ + errorCodes: wxe, + getCodeActions(e) { + const t = Pxe(e.sourceFile, e.span.start); + if (!t) return; + const n = sn.ChangeTracker.with(e, (s) => Nxe(s, e.sourceFile, t)), i = `${t.left.text}["${t.right.text}"]`; + return [Os(Fce, n, [p.Rewrite_as_the_indexed_access_type_0, i], Fce, p.Rewrite_all_as_indexed_access_types)]; + }, + fixIds: [Fce], + getAllCodeActions: (e) => Ga(e, wxe, (t, n) => { + const i = Pxe(n.file, n.start); + i && Nxe(t, n.file, i); + }) + }); + function Pxe(e, t) { + const n = ur(Si(e, t), Xu); + return E.assert(!!n, "Expected position to be owned by a qualified name."), Me(n.left) ? n : void 0; + } + function Nxe(e, t, n) { + const i = n.right.text, s = N.createIndexedAccessTypeNode( + N.createTypeReferenceNode( + n.left, + /*typeArguments*/ + void 0 + ), + N.createLiteralTypeNode(N.createStringLiteral(i)) + ); + e.replaceNode(t, n, s); + } + var Oce = [p.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type.code], Lce = "convertToTypeOnlyExport"; + Qs({ + errorCodes: Oce, + getCodeActions: function(t) { + const n = sn.ChangeTracker.with(t, (i) => Ixe(i, Axe(t.span, t.sourceFile), t)); + if (n.length) + return [Os(Lce, n, p.Convert_to_type_only_export, Lce, p.Convert_all_re_exported_types_to_type_only_exports)]; + }, + fixIds: [Lce], + getAllCodeActions: function(t) { + const n = /* @__PURE__ */ new Set(); + return Ga(t, Oce, (i, s) => { + const o = Axe(s, t.sourceFile); + o && Lp(n, Aa(o.parent.parent)) && Ixe(i, o, t); + }); + } + }); + function Axe(e, t) { + return jn(Si(t, e.start).parent, Tu); + } + function Ixe(e, t, n) { + if (!t) + return; + const i = t.parent, s = i.parent, o = hqe(t, n); + if (o.length === i.elements.length) + e.insertModifierBefore(n.sourceFile, 156, i); + else { + const c = N.updateExportDeclaration( + s, + s.modifiers, + /*isTypeOnly*/ + !1, + N.updateNamedExports(i, kn(i.elements, (u) => !as(o, u))), + s.moduleSpecifier, + /*attributes*/ + void 0 + ), _ = N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !0, + N.createNamedExports(o), + s.moduleSpecifier, + /*attributes*/ + void 0 + ); + e.replaceNode(n.sourceFile, s, c, { + leadingTriviaOption: sn.LeadingTriviaOption.IncludeAll, + trailingTriviaOption: sn.TrailingTriviaOption.Exclude + }), e.insertNodeAfter(n.sourceFile, s, _); + } + } + function hqe(e, t) { + const n = e.parent; + if (n.elements.length === 1) + return n.elements; + const i = bae( + e_(n), + t.program.getSemanticDiagnostics(t.sourceFile, t.cancellationToken) + ); + return kn(n.elements, (s) => { + var o; + return s === e || ((o = vae(s, i)) == null ? void 0 : o.code) === Oce[0]; + }); + } + var Fxe = [ + p._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled.code, + p._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled.code + ], eH = "convertToTypeOnlyImport"; + Qs({ + errorCodes: Fxe, + getCodeActions: function(t) { + var n; + const i = Oxe(t.sourceFile, t.span.start); + if (i) { + const s = sn.ChangeTracker.with(t, (_) => cL(_, t.sourceFile, i)), o = i.kind === 276 && zo(i.parent.parent.parent) && Lxe(i, t.sourceFile, t.program) ? sn.ChangeTracker.with(t, (_) => cL(_, t.sourceFile, i.parent.parent.parent)) : void 0, c = Os( + eH, + s, + i.kind === 276 ? [p.Use_type_0, ((n = i.propertyName) == null ? void 0 : n.text) ?? i.name.text] : p.Use_import_type, + eH, + p.Fix_all_with_type_only_imports + ); + return at(o) ? [ + Od(eH, o, p.Use_import_type), + c + ] : [c]; + } + }, + fixIds: [eH], + getAllCodeActions: function(t) { + const n = /* @__PURE__ */ new Set(); + return Ga(t, Fxe, (i, s) => { + const o = Oxe(s.file, s.start); + o?.kind === 272 && !n.has(o) ? (cL(i, s.file, o), n.add(o)) : o?.kind === 276 && zo(o.parent.parent.parent) && !n.has(o.parent.parent.parent) && Lxe(o, s.file, t.program) ? (cL(i, s.file, o.parent.parent.parent), n.add(o.parent.parent.parent)) : o?.kind === 276 && cL(i, s.file, o); + }); + } + }); + function Oxe(e, t) { + const { parent: n } = Si(e, t); + return ju(n) || zo(n) && n.importClause ? n : void 0; + } + function Lxe(e, t, n) { + if (e.parent.parent.name) + return !1; + const i = e.parent.elements.filter((o) => !o.isTypeOnly); + if (i.length === 1) + return !0; + const s = n.getTypeChecker(); + for (const o of i) + if (So.Core.eachSymbolReferenceInFile(o.name, s, t, (_) => { + const u = s.getSymbolAtLocation(_); + return !!u && s.symbolIsValue(u) || !cv(_); + })) + return !1; + return !0; + } + function cL(e, t, n) { + var i; + if (ju(n)) + e.replaceNode(t, n, N.updateImportSpecifier( + n, + /*isTypeOnly*/ + !0, + n.propertyName, + n.name + )); + else { + const s = n.importClause; + if (s.name && s.namedBindings) + e.replaceNodeWithNodes(t, n, [ + N.createImportDeclaration( + f2( + n.modifiers, + /*includeTrivia*/ + !0 + ), + N.createImportClause( + /*isTypeOnly*/ + !0, + Wa( + s.name, + /*includeTrivia*/ + !0 + ), + /*namedBindings*/ + void 0 + ), + Wa( + n.moduleSpecifier, + /*includeTrivia*/ + !0 + ), + Wa( + n.attributes, + /*includeTrivia*/ + !0 + ) + ), + N.createImportDeclaration( + f2( + n.modifiers, + /*includeTrivia*/ + !0 + ), + N.createImportClause( + /*isTypeOnly*/ + !0, + /*name*/ + void 0, + Wa( + s.namedBindings, + /*includeTrivia*/ + !0 + ) + ), + Wa( + n.moduleSpecifier, + /*includeTrivia*/ + !0 + ), + Wa( + n.attributes, + /*includeTrivia*/ + !0 + ) + ) + ]); + else { + const o = ((i = s.namedBindings) == null ? void 0 : i.kind) === 275 ? N.updateNamedImports( + s.namedBindings, + Wc(s.namedBindings.elements, (_) => N.updateImportSpecifier( + _, + /*isTypeOnly*/ + !1, + _.propertyName, + _.name + )) + ) : s.namedBindings, c = N.updateImportDeclaration(n, n.modifiers, N.updateImportClause( + s, + /*isTypeOnly*/ + !0, + s.name, + o + ), n.moduleSpecifier, n.attributes); + e.replaceNode(t, n, c); + } + } + } + var Mce = "convertTypedefToType", Mxe = [p.JSDoc_typedef_may_be_converted_to_TypeScript_type.code]; + Qs({ + fixIds: [Mce], + errorCodes: Mxe, + getCodeActions(e) { + const t = Jh(e.host, e.formatContext.options), n = Si( + e.sourceFile, + e.span.start + ); + if (!n) return; + const i = sn.ChangeTracker.with(e, (s) => Rxe(s, n, e.sourceFile, t)); + if (i.length > 0) + return [ + Os( + Mce, + i, + p.Convert_typedef_to_TypeScript_type, + Mce, + p.Convert_all_typedef_to_TypeScript_types + ) + ]; + }, + getAllCodeActions: (e) => Ga( + e, + Mxe, + (t, n) => { + const i = Jh(e.host, e.formatContext.options), s = Si(n.file, n.start); + s && Rxe(t, s, n.file, i, !0); + } + ) + }); + function Rxe(e, t, n, i, s = !1) { + if (!jS(t)) return; + const o = vqe(t); + if (!o) return; + const c = t.parent, { leftSibling: _, rightSibling: u } = yqe(t); + let m = c.getStart(), g = ""; + !_ && c.comment && (m = jxe(c, c.getStart(), t.getStart()), g = `${i} */${i}`), _ && (s && jS(_) ? (m = t.getStart(), g = "") : (m = jxe(c, _.getStart(), t.getStart()), g = `${i} */${i}`)); + let h = c.getEnd(), S = ""; + u && (s && jS(u) ? (h = u.getStart(), S = `${i}${i}`) : (h = u.getStart(), S = `${i}/**${i} * `)), e.replaceRange(n, { pos: m, end: h }, o, { prefix: g, suffix: S }); + } + function yqe(e) { + const t = e.parent, n = t.getChildCount() - 1, i = t.getChildren().findIndex( + (c) => c.getStart() === e.getStart() && c.getEnd() === e.getEnd() + ), s = i > 0 ? t.getChildAt(i - 1) : void 0, o = i < n ? t.getChildAt(i + 1) : void 0; + return { leftSibling: s, rightSibling: o }; + } + function jxe(e, t, n) { + const i = e.getText().substring(t - e.getStart(), n - e.getStart()); + for (let s = i.length; s > 0; s--) + if (!/[*/\s]/.test(i.substring(s - 1, s))) + return t + s; + return n; + } + function vqe(e) { + var t; + const { typeExpression: n } = e; + if (!n) return; + const i = (t = e.name) == null ? void 0 : t.getText(); + if (i) { + if (n.kind === 322) + return bqe(i, n); + if (n.kind === 309) + return Sqe(i, n); + } + } + function bqe(e, t) { + const n = Bxe(t); + if (at(n)) + return N.createInterfaceDeclaration( + /*modifiers*/ + void 0, + e, + /*typeParameters*/ + void 0, + /*heritageClauses*/ + void 0, + n + ); + } + function Sqe(e, t) { + const n = Wa(t.type); + if (n) + return N.createTypeAliasDeclaration( + /*modifiers*/ + void 0, + N.createIdentifier(e), + /*typeParameters*/ + void 0, + n + ); + } + function Bxe(e) { + const t = e.jsDocPropertyTags; + return at(t) ? Li(t, (i) => { + var s; + const o = Tqe(i), c = (s = i.typeExpression) == null ? void 0 : s.type, _ = i.isBracketed; + let u; + if (c && RS(c)) { + const m = Bxe(c); + u = N.createTypeLiteralNode(m); + } else c && (u = Wa(c)); + if (u && o) { + const m = _ ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0; + return N.createPropertySignature( + /*modifiers*/ + void 0, + o, + m, + u + ); + } + }) : void 0; + } + function Tqe(e) { + return e.name.kind === 80 ? e.name.text : e.name.right.text; + } + function xqe(e) { + return uf(e) ? na(e.jsDoc, (t) => { + var n; + return (n = t.tags) == null ? void 0 : n.filter((i) => jS(i)); + }) : []; + } + var Rce = "convertLiteralTypeToMappedType", Jxe = [p._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0.code]; + Qs({ + errorCodes: Jxe, + getCodeActions: function(t) { + const { sourceFile: n, span: i } = t, s = zxe(n, i.start); + if (!s) + return; + const { name: o, constraint: c } = s, _ = sn.ChangeTracker.with(t, (u) => Wxe(u, n, s)); + return [Os(Rce, _, [p.Convert_0_to_1_in_0, c, o], Rce, p.Convert_all_type_literals_to_mapped_type)]; + }, + fixIds: [Rce], + getAllCodeActions: (e) => Ga(e, Jxe, (t, n) => { + const i = zxe(n.file, n.start); + i && Wxe(t, n.file, i); + }) + }); + function zxe(e, t) { + const n = Si(e, t); + if (Me(n)) { + const i = Ws(n.parent.parent, m_), s = n.getText(e); + return { + container: Ws(i.parent, Qu), + typeNode: i.type, + constraint: s, + name: s === "K" ? "P" : "K" + }; + } + } + function Wxe(e, t, { container: n, typeNode: i, constraint: s, name: o }) { + e.replaceNode( + t, + n, + N.createMappedTypeNode( + /*readonlyToken*/ + void 0, + N.createTypeParameterDeclaration( + /*modifiers*/ + void 0, + o, + N.createTypeReferenceNode(s) + ), + /*nameType*/ + void 0, + /*questionToken*/ + void 0, + i, + /*members*/ + void 0 + ) + ); + } + var Uxe = [ + p.Class_0_incorrectly_implements_interface_1.code, + p.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass.code + ], jce = "fixClassIncorrectlyImplementsInterface"; + Qs({ + errorCodes: Uxe, + getCodeActions(e) { + const { sourceFile: t, span: n } = e, i = Vxe(t, n.start); + return Li(MC(i), (s) => { + const o = sn.ChangeTracker.with(e, (c) => Hxe(e, s, t, i, c, e.preferences)); + return o.length === 0 ? void 0 : Os(jce, o, [p.Implement_interface_0, s.getText(t)], jce, p.Implement_all_unimplemented_interfaces); + }); + }, + fixIds: [jce], + getAllCodeActions(e) { + const t = /* @__PURE__ */ new Set(); + return Ga(e, Uxe, (n, i) => { + const s = Vxe(i.file, i.start); + if (Lp(t, Aa(s))) + for (const o of MC(s)) + Hxe(e, o, i.file, s, n, e.preferences); + }); + } + }); + function Vxe(e, t) { + return E.checkDefined(Al(Si(e, t)), "There should be a containing class"); + } + function qxe(e) { + return !e.valueDeclaration || !(Mu(e.valueDeclaration) & 2); + } + function Hxe(e, t, n, i, s, o) { + const c = e.program.getTypeChecker(), _ = kqe(i, c), u = c.getTypeAtLocation(t), g = c.getPropertiesOfType(u).filter(RI(qxe, (w) => !_.has(w.escapedName))), h = c.getTypeAtLocation(i), S = Pn(i.members, (w) => Go(w)); + h.getNumberIndexType() || C( + u, + 1 + /* Number */ + ), h.getStringIndexType() || C( + u, + 0 + /* String */ + ); + const T = y2(n, e.program, o, e.host); + Ale(i, g, n, e, o, T, (w) => D(n, i, w)), T.writeFixes(s); + function C(w, A) { + const O = c.getIndexInfoOfType(w, A); + O && D(n, i, c.indexInfoToIndexSignatureDeclaration( + O, + i, + /*flags*/ + void 0, + /*internalFlags*/ + void 0, + q6(e) + )); + } + function D(w, A, O) { + S ? s.insertNodeAfter(w, S, O) : s.insertMemberAtStart(w, A, O); + } + } + function kqe(e, t) { + const n = sm(e); + if (!n) return Us(); + const i = t.getTypeAtLocation(n), s = t.getPropertiesOfType(i); + return Us(s.filter(qxe)); + } + var Gxe = "import", $xe = "fixMissingImport", Xxe = [ + p.Cannot_find_name_0.code, + p.Cannot_find_name_0_Did_you_mean_1.code, + p.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code, + p.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code, + p.Cannot_find_namespace_0.code, + p._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code, + p._0_only_refers_to_a_type_but_is_being_used_as_a_value_here.code, + p.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code, + p._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code, + p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery.code, + p.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later.code, + p.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom.code, + p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig.code, + p.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code, + p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig.code, + p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha.code, + p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode.code, + p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig.code, + p.Cannot_find_namespace_0_Did_you_mean_1.code, + p.This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found.code + ]; + Qs({ + errorCodes: Xxe, + getCodeActions(e) { + const { errorCode: t, preferences: n, sourceFile: i, span: s, program: o } = e, c = tke( + e, + t, + s.start, + /*useAutoImportProvider*/ + !0 + ); + if (c) + return c.map( + ({ fix: _, symbolName: u, errorIdentifierText: m }) => zce( + e, + i, + u, + _, + /*includeSymbolNameInDescription*/ + u !== m, + o, + n + ) + ); + }, + fixIds: [$xe], + getAllCodeActions: (e) => { + const { sourceFile: t, program: n, preferences: i, host: s, cancellationToken: o } = e, c = Qxe( + t, + n, + /*useAutoImportProvider*/ + !0, + i, + s, + o + ); + return hk(e, Xxe, (_) => c.addImportFromDiagnostic(_, e)), gk(sn.ChangeTracker.with(e, c.writeFixes)); + } + }); + function y2(e, t, n, i, s) { + return Qxe( + e, + t, + /*useAutoImportProvider*/ + !1, + n, + i, + s + ); + } + function Qxe(e, t, n, i, s, o) { + const c = t.getCompilerOptions(), _ = [], u = [], m = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Set(), S = /* @__PURE__ */ new Map(); + return { addImportFromDiagnostic: D, addImportFromExportedSymbol: w, addImportForModuleSymbol: A, writeFixes: W, hasFixes: $, addImportForUnresolvedIdentifier: C, addImportForNonExistentExport: O, removeExistingImport: F, addVerbatimImport: T }; + function T(U) { + h.add(U); + } + function C(U, _e, Z) { + const J = Lqe(U, _e, Z); + !J || !J.length || R(ya(J)); + } + function D(U, _e) { + const Z = tke(_e, U.code, U.start, n); + !Z || !Z.length || R(ya(Z)); + } + function w(U, _e, Z) { + var J, re; + const te = E.checkDefined(U.parent, "Expected exported symbol to have module symbol as parent"), ie = L9(U, pa(c)), le = t.getTypeChecker(), Te = le.getMergedSymbol(Gl(U, le)), q = Zxe( + e, + Te, + ie, + te, + /*preferCapitalized*/ + !1, + t, + s, + i, + o + ); + if (!q) { + E.assert((J = i.autoImportFileExcludePatterns) == null ? void 0 : J.length); + return; + } + const me = $A(e, t); + let Ce = Bce( + e, + q, + t, + /*position*/ + void 0, + !!_e, + me, + s, + i + ); + if (Ce) { + const Ee = ((re = jn(Z?.name, Me)) == null ? void 0 : re.text) ?? ie; + let oe, ke; + Z && yC(Z) && (Ce.kind === 3 || Ce.kind === 2) && Ce.addAsTypeOnly === 1 && (oe = 2), U.name !== Ee && (ke = U.name), Ce = { + ...Ce, + ...oe === void 0 ? {} : { addAsTypeOnly: oe }, + ...ke === void 0 ? {} : { propertyName: ke } + }, R({ fix: Ce, symbolName: Ee ?? ie, errorIdentifierText: void 0 }); + } + } + function A(U, _e, Z) { + var J, re, te; + const ie = t.getTypeChecker(), le = ie.getAliasedSymbol(U); + E.assert(le.flags & 1536, "Expected symbol to be a module"); + const Te = wv(t, s), q = Bh.getModuleSpecifiersWithCacheInfo( + le, + ie, + c, + e, + Te, + i, + /*options*/ + void 0, + /*forAutoImport*/ + !0 + ), me = $A(e, t); + let Ce = uL( + _e, + /*isForNewImportDeclaration*/ + !0, + /*symbol*/ + void 0, + U.flags, + t.getTypeChecker(), + c + ); + Ce = Ce === 1 && yC(Z) ? 2 : 1; + const Ee = zo(Z) ? bS(Z) ? 1 : 2 : ju(Z) ? 0 : id(Z) && Z.name ? 1 : 2, oe = [{ + symbol: U, + moduleSymbol: le, + moduleFileName: (te = (re = (J = le.declarations) == null ? void 0 : J[0]) == null ? void 0 : re.getSourceFile()) == null ? void 0 : te.fileName, + exportKind: 4, + targetFlags: U.flags, + isFromPackageJson: !1 + }], ke = Bce( + e, + oe, + t, + /*position*/ + void 0, + !!_e, + me, + s, + i + ); + let ue; + ke && Ee !== 2 ? ue = { + ...ke, + addAsTypeOnly: Ce, + importKind: Ee + } : ue = { + kind: 3, + moduleSpecifierKind: ke !== void 0 ? ke.moduleSpecifierKind : q.kind, + moduleSpecifier: ke !== void 0 ? ke.moduleSpecifier : ya(q.moduleSpecifiers), + importKind: Ee, + addAsTypeOnly: Ce, + useRequire: me + }, R({ fix: ue, symbolName: U.name, errorIdentifierText: void 0 }); + } + function O(U, _e, Z, J, re) { + const te = t.getSourceFile(_e), ie = $A(e, t); + if (te && te.symbol) { + const { fixes: le } = lL( + [{ + exportKind: Z, + isFromPackageJson: !1, + moduleFileName: _e, + moduleSymbol: te.symbol, + targetFlags: J + }], + /*usagePosition*/ + void 0, + re, + ie, + t, + e, + s, + i + ); + le.length && R({ fix: le[0], symbolName: U, errorIdentifierText: U }); + } else { + const le = J9(_e, 99, t, s), Te = Bh.getLocalModuleSpecifierBetweenFileNames( + e, + _e, + c, + wv(t, s), + i + ), q = tH(le, Z, t), me = uL( + re, + /*isForNewImportDeclaration*/ + !0, + /*symbol*/ + void 0, + J, + t.getTypeChecker(), + c + ); + R({ fix: { + kind: 3, + moduleSpecifierKind: "relative", + moduleSpecifier: Te, + importKind: q, + addAsTypeOnly: me, + useRequire: ie + }, symbolName: U, errorIdentifierText: U }); + } + } + function F(U) { + U.kind === 273 && E.assertIsDefined(U.name, "ImportClause should have a name if it's being removed"), g.add(U); + } + function R(U) { + var _e, Z, J; + const { fix: re, symbolName: te } = U; + switch (re.kind) { + case 0: + _.push(re); + break; + case 1: + u.push(re); + break; + case 2: { + const { importClauseOrBindingPattern: q, importKind: me, addAsTypeOnly: Ce, propertyName: Ee } = re; + let oe = m.get(q); + if (oe || m.set(q, oe = { importClauseOrBindingPattern: q, defaultImport: void 0, namedImports: /* @__PURE__ */ new Map() }), me === 0) { + const ke = (_e = oe?.namedImports.get(te)) == null ? void 0 : _e.addAsTypeOnly; + oe.namedImports.set(te, { addAsTypeOnly: ie(ke, Ce), propertyName: Ee }); + } else + E.assert(oe.defaultImport === void 0 || oe.defaultImport.name === te, "(Add to Existing) Default import should be missing or match symbolName"), oe.defaultImport = { + name: te, + addAsTypeOnly: ie((Z = oe.defaultImport) == null ? void 0 : Z.addAsTypeOnly, Ce) + }; + break; + } + case 3: { + const { moduleSpecifier: q, importKind: me, useRequire: Ce, addAsTypeOnly: Ee, propertyName: oe } = re, ke = le(q, me, Ce, Ee); + switch (E.assert(ke.useRequire === Ce, "(Add new) Tried to add an `import` and a `require` for the same module"), me) { + case 1: + E.assert(ke.defaultImport === void 0 || ke.defaultImport.name === te, "(Add new) Default import should be missing or match symbolName"), ke.defaultImport = { name: te, addAsTypeOnly: ie((J = ke.defaultImport) == null ? void 0 : J.addAsTypeOnly, Ee) }; + break; + case 0: + const ue = (ke.namedImports || (ke.namedImports = /* @__PURE__ */ new Map())).get(te); + ke.namedImports.set(te, [ie(ue, Ee), oe]); + break; + case 3: + if (c.verbatimModuleSyntax) { + const it = (ke.namedImports || (ke.namedImports = /* @__PURE__ */ new Map())).get(te); + ke.namedImports.set(te, [ie(it, Ee), oe]); + } else + E.assert(ke.namespaceLikeImport === void 0 || ke.namespaceLikeImport.name === te, "Namespacelike import shoudl be missing or match symbolName"), ke.namespaceLikeImport = { importKind: me, name: te, addAsTypeOnly: Ee }; + break; + case 2: + E.assert(ke.namespaceLikeImport === void 0 || ke.namespaceLikeImport.name === te, "Namespacelike import shoudl be missing or match symbolName"), ke.namespaceLikeImport = { importKind: me, name: te, addAsTypeOnly: Ee }; + break; + } + break; + } + case 4: + break; + default: + E.assertNever(re, `fix wasn't never - got kind ${re.kind}`); + } + function ie(q, me) { + return Math.max(q ?? 0, me); + } + function le(q, me, Ce, Ee) { + const oe = Te( + q, + /*topLevelTypeOnly*/ + !0 + ), ke = Te( + q, + /*topLevelTypeOnly*/ + !1 + ), ue = S.get(oe), it = S.get(ke), Oe = { + defaultImport: void 0, + namedImports: void 0, + namespaceLikeImport: void 0, + useRequire: Ce + }; + return me === 1 && Ee === 2 ? ue || (S.set(oe, Oe), Oe) : Ee === 1 && (ue || it) ? ue || it : it || (S.set(ke, Oe), Oe); + } + function Te(q, me) { + return `${me ? 1 : 0}|${q}`; + } + } + function W(U, _e) { + var Z, J; + let re; + e.imports !== void 0 && e.imports.length === 0 && _e !== void 0 ? re = _e : re = tf(e, i); + for (const le of _) + Wce(U, e, le); + for (const le of u) + uke(U, e, le, re); + let te; + if (g.size) { + E.assert(zg(e), "Cannot remove imports from a future source file"); + const le = new Set(Li([...g], (Ee) => ur(Ee, zo))), Te = new Set(Li([...g], (Ee) => ur(Ee, _3))), q = [...le].filter( + (Ee) => { + var oe, ke, ue; + return ( + // nothing added to the import declaration + !m.has(Ee.importClause) && // no default, or default is being removed + (!((oe = Ee.importClause) != null && oe.name) || g.has(Ee.importClause)) && // no namespace import, or namespace import is being removed + (!jn((ke = Ee.importClause) == null ? void 0 : ke.namedBindings, Yg) || g.has(Ee.importClause.namedBindings)) && // no named imports, or all named imports are being removed + (!jn((ue = Ee.importClause) == null ? void 0 : ue.namedBindings, mm) || Ri(Ee.importClause.namedBindings.elements, (it) => g.has(it))) + ); + } + ), me = [...Te].filter( + (Ee) => ( + // no binding elements being added to the variable declaration + (Ee.name.kind !== 206 || !m.has(Ee.name)) && // no binding elements, or all binding elements are being removed + (Ee.name.kind !== 206 || Ri(Ee.name.elements, (oe) => g.has(oe))) + ) + ), Ce = [...le].filter( + (Ee) => { + var oe, ke; + return ( + // has named bindings + ((oe = Ee.importClause) == null ? void 0 : oe.namedBindings) && // is not being fully removed + q.indexOf(Ee) === -1 && // is not gaining named imports + !((ke = m.get(Ee.importClause)) != null && ke.namedImports) && // all named imports are being removed + (Ee.importClause.namedBindings.kind === 274 || Ri(Ee.importClause.namedBindings.elements, (ue) => g.has(ue))) + ); + } + ); + for (const Ee of [...q, ...me]) + U.delete(e, Ee); + for (const Ee of Ce) + U.replaceNode( + e, + Ee.importClause, + N.updateImportClause( + Ee.importClause, + Ee.importClause.isTypeOnly, + Ee.importClause.name, + /*namedBindings*/ + void 0 + ) + ); + for (const Ee of g) { + const oe = ur(Ee, zo); + oe && q.indexOf(oe) === -1 && Ce.indexOf(oe) === -1 ? Ee.kind === 273 ? U.delete(e, Ee.name) : (E.assert(Ee.kind === 276, "NamespaceImport should have been handled earlier"), (Z = m.get(oe.importClause)) != null && Z.namedImports ? (te ?? (te = /* @__PURE__ */ new Set())).add(Ee) : U.delete(e, Ee)) : Ee.kind === 208 ? (J = m.get(Ee.parent)) != null && J.namedImports ? (te ?? (te = /* @__PURE__ */ new Set())).add(Ee) : U.delete(e, Ee) : Ee.kind === 271 && U.delete(e, Ee); + } + } + m.forEach(({ importClauseOrBindingPattern: le, defaultImport: Te, namedImports: q }) => { + lke( + U, + e, + le, + Te, + Ki(q.entries(), ([me, { addAsTypeOnly: Ce, propertyName: Ee }]) => ({ addAsTypeOnly: Ce, propertyName: Ee, name: me })), + te, + i + ); + }); + let ie; + S.forEach(({ useRequire: le, defaultImport: Te, namedImports: q, namespaceLikeImport: me }, Ce) => { + const Ee = Ce.slice(2), ke = (le ? pke : fke)( + Ee, + re, + Te, + q && Ki(q.entries(), ([ue, [it, Oe]]) => ({ addAsTypeOnly: it, propertyName: Oe, name: ue })), + me, + c, + i + ); + ie = qT(ie, ke); + }), ie = qT(ie, V()), ie && NV( + U, + e, + ie, + /*blankLineBetween*/ + !0, + i + ); + } + function V() { + if (!h.size) return; + const U = new Set(Li([...h], (Z) => ur(Z, zo))), _e = new Set(Li([...h], (Z) => ur(Z, f3))); + return [ + ...Li([...h], (Z) => Z.kind === 271 ? Wa( + Z, + /*includeTrivia*/ + !0 + ) : void 0), + ...[...U].map((Z) => { + var J; + return h.has(Z) ? Wa( + Z, + /*includeTrivia*/ + !0 + ) : Wa( + N.updateImportDeclaration( + Z, + Z.modifiers, + Z.importClause && N.updateImportClause( + Z.importClause, + Z.importClause.isTypeOnly, + h.has(Z.importClause) ? Z.importClause.name : void 0, + h.has(Z.importClause.namedBindings) ? Z.importClause.namedBindings : (J = jn(Z.importClause.namedBindings, mm)) != null && J.elements.some((re) => h.has(re)) ? N.updateNamedImports( + Z.importClause.namedBindings, + Z.importClause.namedBindings.elements.filter((re) => h.has(re)) + ) : void 0 + ), + Z.moduleSpecifier, + Z.attributes + ), + /*includeTrivia*/ + !0 + ); + }), + ...[..._e].map((Z) => h.has(Z) ? Wa( + Z, + /*includeTrivia*/ + !0 + ) : Wa( + N.updateVariableStatement( + Z, + Z.modifiers, + N.updateVariableDeclarationList( + Z.declarationList, + Li(Z.declarationList.declarations, (J) => h.has(J) ? J : N.updateVariableDeclaration( + J, + J.name.kind === 206 ? N.updateObjectBindingPattern( + J.name, + J.name.elements.filter((re) => h.has(re)) + ) : J.name, + J.exclamationToken, + J.type, + J.initializer + )) + ) + ), + /*includeTrivia*/ + !0 + )) + ]; + } + function $() { + return _.length > 0 || u.length > 0 || m.size > 0 || S.size > 0 || h.size > 0 || g.size > 0; + } + } + function Cqe(e, t, n, i) { + const s = B6(e, i, n), o = Kxe(e, t); + return { getModuleSpecifierForBestExportInfo: c }; + function c(_, u, m, g) { + const { fixes: h, computedWithoutCacheCount: S } = lL( + _, + u, + m, + /*useRequire*/ + !1, + t, + e, + n, + i, + o, + g + ), T = nke(h, e, t, s, n, i); + return T && { ...T, computedWithoutCacheCount: S }; + } + } + function Eqe(e, t, n, i, s, o, c, _, u, m, g, h) { + let S; + n ? (S = LA(i, c, _, g, h).get(i.path, n), E.assertIsDefined(S, "Some exportInfo should match the specified exportMapKey")) : (S = cj(Op(t.name)) ? [wqe(e, s, t, _, c)] : Zxe(i, e, s, t, o, _, c, g, h), E.assertIsDefined(S, "Some exportInfo should match the specified symbol / moduleSymbol")); + const T = $A(i, _), C = cv(Si(i, m)), D = E.checkDefined(Bce(i, S, _, m, C, T, c, g)); + return { + moduleSpecifier: D.moduleSpecifier, + codeAction: Yxe(zce( + { host: c, formatContext: u, preferences: g }, + i, + s, + D, + /*includeSymbolNameInDescription*/ + !1, + _, + g + )) + }; + } + function Dqe(e, t, n, i, s, o) { + const c = n.getCompilerOptions(), _ = xR(Jce(e, n.getTypeChecker(), t, c)), u = oke(e, t, _, n), m = _ !== t.text; + return u && Yxe(zce( + { host: i, formatContext: s, preferences: o }, + e, + _, + u, + m, + n, + o + )); + } + function Bce(e, t, n, i, s, o, c, _) { + const u = B6(e, _, c); + return nke(lL(t, i, s, o, n, e, c, _).fixes, e, n, u, c, _); + } + function Yxe({ description: e, changes: t, commands: n }) { + return { description: e, changes: t, commands: n }; + } + function Zxe(e, t, n, i, s, o, c, _, u) { + const m = eke(o, c), g = _.autoImportFileExcludePatterns && Cae(c, _), h = o.getTypeChecker().getMergedSymbol(i), S = g && h.declarations && Lo( + h, + 307 + /* SourceFile */ + ), T = S && g(S); + return LA(e, c, o, _, u).search(e.path, s, (C) => C === n, (C) => { + const D = m(C[0].isFromPackageJson); + if (D.getMergedSymbol(Gl(C[0].symbol, D)) === t && (T || C.some((w) => D.getMergedSymbol(w.moduleSymbol) === i || w.symbol.parent === i))) + return C; + }); + } + function wqe(e, t, n, i, s) { + var o, c; + const _ = m( + i.getTypeChecker(), + /*isFromPackageJson*/ + !1 + ); + if (_) + return _; + const u = (c = (o = s.getPackageJsonAutoImportProvider) == null ? void 0 : o.call(s)) == null ? void 0 : c.getTypeChecker(); + return E.checkDefined(u && m( + u, + /*isFromPackageJson*/ + !0 + ), "Could not find symbol in specified module for code actions"); + function m(g, h) { + const S = z9(n, g); + if (S && Gl(S.symbol, g) === e) + return { symbol: S.symbol, moduleSymbol: n, moduleFileName: void 0, exportKind: S.exportKind, targetFlags: Gl(e, g).flags, isFromPackageJson: h }; + const T = g.tryGetMemberInModuleExportsAndProperties(t, n); + if (T && Gl(T, g) === e) + return { symbol: T, moduleSymbol: n, moduleFileName: void 0, exportKind: 0, targetFlags: Gl(e, g).flags, isFromPackageJson: h }; + } + } + function lL(e, t, n, i, s, o, c, _, u = zg(o) ? Kxe(o, s) : void 0, m) { + const g = s.getTypeChecker(), h = u ? na(e, u.getImportsForExportInfo) : He, S = t !== void 0 && Pqe(h, t), T = Aqe(h, n, g, s.getCompilerOptions()); + if (T) + return { + computedWithoutCacheCount: 0, + fixes: [...S ? [S] : He, T] + }; + const { fixes: C, computedWithoutCacheCount: D = 0 } = Fqe( + e, + h, + s, + o, + t, + n, + i, + c, + _, + m + ); + return { + computedWithoutCacheCount: D, + fixes: [...S ? [S] : He, ...C] + }; + } + function Pqe(e, t) { + return Dc(e, ({ declaration: n, importKind: i }) => { + var s; + if (i !== 0) return; + const o = Nqe(n), c = o && ((s = px(n)) == null ? void 0 : s.text); + if (c) + return { kind: 0, namespacePrefix: o, usagePosition: t, moduleSpecifierKind: void 0, moduleSpecifier: c }; + }); + } + function Nqe(e) { + var t, n, i; + switch (e.kind) { + case 260: + return (t = jn(e.name, Me)) == null ? void 0 : t.text; + case 271: + return e.name.text; + case 351: + case 272: + return (i = jn((n = e.importClause) == null ? void 0 : n.namedBindings, Yg)) == null ? void 0 : i.name.text; + default: + return E.assertNever(e); + } + } + function uL(e, t, n, i, s, o) { + return e ? n && o.verbatimModuleSyntax && (!(i & 111551) || s.getTypeOnlyAliasDeclaration(n)) ? 2 : 1 : 4; + } + function Aqe(e, t, n, i) { + let s; + for (const c of e) { + const _ = o(c); + if (!_) continue; + const u = yC(_.importClauseOrBindingPattern); + if (_.addAsTypeOnly !== 4 && u || _.addAsTypeOnly === 4 && !u) + return _; + s ?? (s = _); + } + return s; + function o({ declaration: c, importKind: _, symbol: u, targetFlags: m }) { + if (_ === 3 || _ === 2 || c.kind === 271) + return; + if (c.kind === 260) + return (_ === 0 || _ === 1) && c.name.kind === 206 ? { + kind: 2, + importClauseOrBindingPattern: c.name, + importKind: _, + moduleSpecifierKind: void 0, + moduleSpecifier: c.initializer.arguments[0].text, + addAsTypeOnly: 4 + /* NotAllowed */ + } : void 0; + const { importClause: g } = c; + if (!g || !Na(c.moduleSpecifier)) + return; + const { name: h, namedBindings: S } = g; + if (g.isTypeOnly && !(_ === 0 && S)) + return; + const T = uL( + t, + /*isForNewImportDeclaration*/ + !1, + u, + m, + n, + i + ); + if (!(_ === 1 && (h || // Cannot add a default import to a declaration that already has one + T === 2 && S)) && !(_ === 0 && S?.kind === 274)) + return { + kind: 2, + importClauseOrBindingPattern: g, + importKind: _, + moduleSpecifierKind: void 0, + moduleSpecifier: c.moduleSpecifier.text, + addAsTypeOnly: T + }; + } + } + function Kxe(e, t) { + const n = t.getTypeChecker(); + let i; + for (const s of e.imports) { + const o = O4(s); + if (_3(o.parent)) { + const c = n.resolveExternalModuleName(s); + c && (i || (i = wp())).add(Zs(c), o.parent); + } else if (o.kind === 272 || o.kind === 271 || o.kind === 351) { + const c = n.getSymbolAtLocation(s); + c && (i || (i = wp())).add(Zs(c), o); + } + } + return { + getImportsForExportInfo: ({ moduleSymbol: s, exportKind: o, targetFlags: c, symbol: _ }) => { + const u = i?.get(Zs(s)); + if (!u || Gu(e) && !(c & 111551) && !Ri(u, ym)) return He; + const m = tH(e, o, t); + return u.map((g) => ({ declaration: g, importKind: m, symbol: _, targetFlags: c })); + } + }; + } + function $A(e, t) { + if (!Gg(e.fileName)) + return !1; + if (e.commonJsModuleIndicator && !e.externalModuleIndicator) return !0; + if (e.externalModuleIndicator && !e.commonJsModuleIndicator) return !1; + const n = t.getCompilerOptions(); + if (n.configFile) + return Ru(n) < 5; + if (Vce(e, t) === 1) return !0; + if (Vce(e, t) === 99) return !1; + for (const i of t.getSourceFiles()) + if (!(i === e || !Gu(i) || t.isSourceFileFromExternalLibrary(i))) { + if (i.commonJsModuleIndicator && !i.externalModuleIndicator) return !0; + if (i.externalModuleIndicator && !i.commonJsModuleIndicator) return !1; + } + return !0; + } + function eke(e, t) { + return Kd((n) => n ? t.getPackageJsonAutoImportProvider().getTypeChecker() : e.getTypeChecker()); + } + function Iqe(e, t, n, i, s, o, c, _, u) { + const m = Gg(t.fileName), g = e.getCompilerOptions(), h = wv(e, c), S = eke(e, c), T = Su(g), C = S9(T), D = u ? (O) => Bh.tryGetModuleSpecifiersFromCache(O.moduleSymbol, t, h, _) : (O, F) => Bh.getModuleSpecifiersWithCacheInfo( + O.moduleSymbol, + F, + g, + t, + h, + _, + /*options*/ + void 0, + /*forAutoImport*/ + !0 + ); + let w = 0; + const A = na(o, (O, F) => { + const R = S(O.isFromPackageJson), { computedWithoutCache: W, moduleSpecifiers: V, kind: $ } = D(O, R) ?? {}, U = !!(O.targetFlags & 111551), _e = uL( + i, + /*isForNewImportDeclaration*/ + !0, + O.symbol, + O.targetFlags, + R, + g + ); + return w += W ? 1 : 0, Li(V, (Z) => { + if (C && c1(Z)) + return; + if (!U && m && n !== void 0) + return { kind: 1, moduleSpecifierKind: $, moduleSpecifier: Z, usagePosition: n, exportInfo: O, isReExport: F > 0 }; + const J = tH(t, O.exportKind, e); + let re; + if (n !== void 0 && J === 3 && O.exportKind === 0) { + const te = R.resolveExternalModuleSymbol(O.moduleSymbol); + let ie; + te !== O.moduleSymbol && (ie = W9(te, R, pa(g), lo)), ie || (ie = IA( + O.moduleSymbol, + pa(g), + /*forceCapitalize*/ + !1 + )), re = { namespacePrefix: ie, usagePosition: n }; + } + return { + kind: 3, + moduleSpecifierKind: $, + moduleSpecifier: Z, + importKind: J, + useRequire: s, + addAsTypeOnly: _e, + exportInfo: O, + isReExport: F > 0, + qualification: re + }; + }); + }); + return { computedWithoutCacheCount: w, fixes: A }; + } + function Fqe(e, t, n, i, s, o, c, _, u, m) { + const g = Dc(t, (h) => Oqe(h, o, c, n.getTypeChecker(), n.getCompilerOptions())); + return g ? { fixes: [g] } : Iqe(n, i, s, o, c, e, _, u, m); + } + function Oqe({ declaration: e, importKind: t, symbol: n, targetFlags: i }, s, o, c, _) { + var u; + const m = (u = px(e)) == null ? void 0 : u.text; + if (m) { + const g = o ? 4 : uL( + s, + /*isForNewImportDeclaration*/ + !0, + n, + i, + c, + _ + ); + return { kind: 3, moduleSpecifierKind: void 0, moduleSpecifier: m, importKind: t, addAsTypeOnly: g, useRequire: o }; + } + } + function tke(e, t, n, i) { + const s = Si(e.sourceFile, n); + let o; + if (t === p._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code) + o = Bqe(e, s); + else if (Me(s)) + if (t === p._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code) { + const _ = xR(Jce(e.sourceFile, e.program.getTypeChecker(), s, e.program.getCompilerOptions())), u = oke(e.sourceFile, s, _, e.program); + return u && [{ fix: u, symbolName: _, errorIdentifierText: s.text }]; + } else + o = ake(e, s, i); + else return; + const c = B6(e.sourceFile, e.preferences, e.host); + return o && rke(o, e.sourceFile, e.program, c, e.host, e.preferences); + } + function rke(e, t, n, i, s, o) { + const c = (_) => oo(_, s.getCurrentDirectory(), Nh(s)); + return W_(e, (_, u) => $1(!!_.isJsxNamespaceFix, !!u.isJsxNamespaceFix) || uo(_.fix.kind, u.fix.kind) || ike(_.fix, u.fix, t, n, o, i.allowsImportingSpecifier, c)); + } + function Lqe(e, t, n) { + const i = ake(e, t, n), s = B6(e.sourceFile, e.preferences, e.host); + return i && rke(i, e.sourceFile, e.program, s, e.host, e.preferences); + } + function nke(e, t, n, i, s, o) { + if (at(e)) + return e[0].kind === 0 || e[0].kind === 2 ? e[0] : e.reduce( + (c, _) => ( + // Takes true branch of conditional if `fix` is better than `best` + ike( + _, + c, + t, + n, + o, + i.allowsImportingSpecifier, + (u) => oo(u, s.getCurrentDirectory(), Nh(s)) + ) === -1 ? _ : c + ) + ); + } + function ike(e, t, n, i, s, o, c) { + return e.kind !== 0 && t.kind !== 0 ? $1( + t.moduleSpecifierKind !== "node_modules" || o(t.moduleSpecifier), + e.moduleSpecifierKind !== "node_modules" || o(e.moduleSpecifier) + ) || Mqe(e, t, s) || jqe(e.moduleSpecifier, t.moduleSpecifier, n, i) || $1( + ske(e, n.path, c), + ske(t, n.path, c) + ) || K3(e.moduleSpecifier, t.moduleSpecifier) : 0; + } + function Mqe(e, t, n) { + return n.importModuleSpecifierPreference === "non-relative" || n.importModuleSpecifierPreference === "project-relative" ? $1(e.moduleSpecifierKind === "relative", t.moduleSpecifierKind === "relative") : 0; + } + function ske(e, t, n) { + var i; + if (e.isReExport && ((i = e.exportInfo) != null && i.moduleFileName) && Rqe(e.exportInfo.moduleFileName)) { + const s = n(Hn(e.exportInfo.moduleFileName)); + return Vi(t, s); + } + return !1; + } + function Rqe(e) { + return Vc( + e, + [".js", ".jsx", ".d.ts", ".ts", ".tsx"], + /*ignoreCase*/ + !0 + ) === "index"; + } + function jqe(e, t, n, i) { + return Vi(e, "node:") && !Vi(t, "node:") ? R9(n, i) ? -1 : 1 : Vi(t, "node:") && !Vi(e, "node:") ? R9(n, i) ? 1 : -1 : 0; + } + function Bqe({ sourceFile: e, program: t, host: n, preferences: i }, s) { + const o = t.getTypeChecker(), c = Jqe(s, o); + if (!c) return; + const _ = o.getAliasedSymbol(c), u = c.name, m = [{ symbol: c, moduleSymbol: _, moduleFileName: void 0, exportKind: 3, targetFlags: _.flags, isFromPackageJson: !1 }], g = $A(e, t); + return lL( + m, + /*usagePosition*/ + void 0, + /*isValidTypeOnlyUseSite*/ + !1, + g, + t, + e, + n, + i + ).fixes.map((S) => { + var T; + return { fix: S, symbolName: u, errorIdentifierText: (T = jn(s, Me)) == null ? void 0 : T.text }; + }); + } + function Jqe(e, t) { + const n = Me(e) ? t.getSymbolAtLocation(e) : void 0; + if (k5(n)) return n; + const { parent: i } = e; + if (bu(i) && i.tagName === e || sd(i)) { + const s = t.resolveName( + t.getJsxNamespace(i), + bu(i) ? e : i, + 111551, + /*excludeGlobals*/ + !1 + ); + if (k5(s)) + return s; + } + } + function tH(e, t, n, i) { + if (n.getCompilerOptions().verbatimModuleSyntax && Gqe(e, n) === 1) + return 3; + switch (t) { + case 0: + return 0; + case 1: + return 1; + case 2: + return Vqe(e, n.getCompilerOptions(), !!i); + case 3: + return zqe(e, n, !!i); + case 4: + return 2; + default: + return E.assertNever(t); + } + } + function zqe(e, t, n) { + if (wx(t.getCompilerOptions())) + return 1; + const i = Ru(t.getCompilerOptions()); + switch (i) { + case 2: + case 1: + case 3: + return Gg(e.fileName) && (e.externalModuleIndicator || n) ? 2 : 3; + case 4: + case 5: + case 6: + case 7: + case 99: + case 0: + case 200: + return 2; + case 100: + case 199: + return Vce(e, t) === 99 ? 2 : 3; + default: + return E.assertNever(i, `Unexpected moduleKind ${i}`); + } + } + function ake({ sourceFile: e, program: t, cancellationToken: n, host: i, preferences: s }, o, c) { + const _ = t.getTypeChecker(), u = t.getCompilerOptions(); + return na(Jce(e, _, o, u), (m) => { + if (m === "default") + return; + const g = cv(o), h = $A(e, t), S = Uqe(m, IC(o), $S(o), n, e, t, c, i, s); + return Ki( + mR(S.values(), (T) => lL(T, o.getStart(e), g, h, t, e, i, s).fixes), + (T) => ({ fix: T, symbolName: m, errorIdentifierText: o.text, isJsxNamespaceFix: m !== o.text }) + ); + }); + } + function oke(e, t, n, i) { + const s = i.getTypeChecker(), o = s.resolveName( + n, + t, + 111551, + /*excludeGlobals*/ + !0 + ); + if (!o) return; + const c = s.getTypeOnlyAliasDeclaration(o); + if (!(!c || Cr(c) !== e)) + return { kind: 4, typeOnlyAliasDeclaration: c }; + } + function Jce(e, t, n, i) { + const s = n.parent; + if ((bu(s) || Kb(s)) && s.tagName === n && eq(i.jsx)) { + const o = t.getJsxNamespace(e); + if (Wqe(o, n, t)) + return !BC(n.text) && !t.resolveName( + n.text, + n, + 111551, + /*excludeGlobals*/ + !1 + ) ? [n.text, o] : [o]; + } + return [n.text]; + } + function Wqe(e, t, n) { + if (BC(t.text)) return !0; + const i = n.resolveName( + e, + t, + 111551, + /*excludeGlobals*/ + !0 + ); + return !i || at(i.declarations, x0) && !(i.flags & 111551); + } + function Uqe(e, t, n, i, s, o, c, _, u) { + var m; + const g = wp(), h = B6(s, u, _), S = (m = _.getModuleSpecifierCache) == null ? void 0 : m.call(_), T = Kd((D) => wv(D ? _.getPackageJsonAutoImportProvider() : o, _)); + function C(D, w, A, O, F, R) { + const W = T(R); + if (nq(F, s, w, D, u, h, W, S)) { + const V = F.getTypeChecker(); + g.add(lae(A, V).toString(), { symbol: A, moduleSymbol: D, moduleFileName: w?.fileName, exportKind: O, targetFlags: Gl(A, V).flags, isFromPackageJson: R }); + } + } + return iq(o, _, u, c, (D, w, A, O) => { + const F = A.getTypeChecker(); + i.throwIfCancellationRequested(); + const R = A.getCompilerOptions(), W = z9(D, F); + W && mke(F.getSymbolFlags(W.symbol), n) && W9(W.symbol, F, pa(R), ($, U) => (t ? U ?? $ : $) === e) && C(D, w, W.symbol, W.exportKind, A, O); + const V = F.tryGetMemberInModuleExportsAndProperties(e, D); + V && mke(F.getSymbolFlags(V), n) && C(D, w, V, 0, A, O); + }), g; + } + function Vqe(e, t, n) { + const i = wx(t), s = Gg(e.fileName); + if (!s && Ru(t) >= 5) + return i ? 1 : 2; + if (s) + return e.externalModuleIndicator || n ? i ? 1 : 2 : 3; + for (const o of e.statements ?? He) + if (_l(o) && !tc(o.moduleReference)) + return 3; + return i ? 1 : 3; + } + function zce(e, t, n, i, s, o, c) { + let _; + const u = sn.ChangeTracker.with(e, (m) => { + _ = qqe(m, t, n, i, s, o, c); + }); + return Os(Gxe, u, _, $xe, p.Add_all_missing_imports); + } + function qqe(e, t, n, i, s, o, c) { + const _ = tf(t, c); + switch (i.kind) { + case 0: + return Wce(e, t, i), [p.Change_0_to_1, n, `${i.namespacePrefix}.${n}`]; + case 1: + return uke(e, t, i, _), [p.Change_0_to_1, n, _ke(i.moduleSpecifier, _) + n]; + case 2: { + const { importClauseOrBindingPattern: u, importKind: m, addAsTypeOnly: g, moduleSpecifier: h } = i; + lke( + e, + t, + u, + m === 1 ? { name: n, addAsTypeOnly: g } : void 0, + m === 0 ? [{ name: n, addAsTypeOnly: g }] : He, + /*removeExistingImportSpecifiers*/ + void 0, + c + ); + const S = Op(h); + return s ? [p.Import_0_from_1, n, S] : [p.Update_import_from_0, S]; + } + case 3: { + const { importKind: u, moduleSpecifier: m, addAsTypeOnly: g, useRequire: h, qualification: S } = i, T = h ? pke : fke, C = u === 1 ? { name: n, addAsTypeOnly: g } : void 0, D = u === 0 ? [{ name: n, addAsTypeOnly: g }] : void 0, w = u === 2 || u === 3 ? { importKind: u, name: S?.namespacePrefix || n, addAsTypeOnly: g } : void 0; + return NV( + e, + t, + T( + m, + _, + C, + D, + w, + o.getCompilerOptions(), + c + ), + /*blankLineBetween*/ + !0, + c + ), S && Wce(e, t, S), s ? [p.Import_0_from_1, n, m] : [p.Add_import_from_0, m]; + } + case 4: { + const { typeOnlyAliasDeclaration: u } = i, m = Hqe(e, u, o, t, c); + return m.kind === 276 ? [p.Remove_type_from_import_of_0_from_1, n, cke(m.parent.parent)] : [p.Remove_type_from_import_declaration_from_0, cke(m)]; + } + default: + return E.assertNever(i, `Unexpected fix kind ${i.kind}`); + } + } + function cke(e) { + var t, n; + return e.kind === 271 ? ((n = jn((t = jn(e.moduleReference, Mh)) == null ? void 0 : t.expression, Na)) == null ? void 0 : n.text) || e.moduleReference.getText() : Ws(e.parent.moduleSpecifier, ea).text; + } + function Hqe(e, t, n, i, s) { + const o = n.getCompilerOptions(), c = o.verbatimModuleSyntax; + switch (t.kind) { + case 276: + if (t.isTypeOnly) { + if (t.parent.elements.length > 1) { + const u = N.updateImportSpecifier( + t, + /*isTypeOnly*/ + !1, + t.propertyName, + t.name + ), { specifierComparer: m } = Mv.getNamedImportSpecifierComparerWithDetection(t.parent.parent.parent, s, i), g = Mv.getImportSpecifierInsertionIndex(t.parent.elements, u, m); + if (g !== t.parent.elements.indexOf(t)) + return e.delete(i, t), e.insertImportSpecifierAtIndex(i, u, t.parent, g), t; + } + return e.deleteRange(i, { pos: Vy(t.getFirstToken()), end: Vy(t.propertyName ?? t.name) }), t; + } else + return E.assert(t.parent.parent.isTypeOnly), _(t.parent.parent), t.parent.parent; + case 273: + return _(t), t; + case 274: + return _(t.parent), t.parent; + case 271: + return e.deleteRange(i, t.getChildAt(1)), t; + default: + E.failBadSyntaxKind(t); + } + function _(u) { + var m; + if (e.delete(i, AV(u, i)), !o.allowImportingTsExtensions) { + const g = px(u.parent), h = g && ((m = n.getResolvedModuleFromModuleSpecifier(g, i)) == null ? void 0 : m.resolvedModule); + if (h?.resolvedUsingTsExtension) { + const S = TP(g.text, ZN(g.text, o)); + e.replaceNode(i, g, N.createStringLiteral(S)); + } + } + if (c) { + const g = jn(u.namedBindings, mm); + if (g && g.elements.length > 1) { + Mv.getNamedImportSpecifierComparerWithDetection(u.parent, s, i).isSorted !== !1 && t.kind === 276 && g.elements.indexOf(t) !== 0 && (e.delete(i, t), e.insertImportSpecifierAtIndex(i, t, g, 0)); + for (const S of g.elements) + S !== t && !S.isTypeOnly && e.insertModifierBefore(i, 156, S); + } + } + } + } + function lke(e, t, n, i, s, o, c) { + var _; + if (n.kind === 206) { + if (o && n.elements.some((h) => o.has(h))) { + e.replaceNode( + t, + n, + N.createObjectBindingPattern([ + ...n.elements.filter((h) => !o.has(h)), + ...i ? [N.createBindingElement( + /*dotDotDotToken*/ + void 0, + /*propertyName*/ + "default", + i.name + )] : He, + ...s.map((h) => N.createBindingElement( + /*dotDotDotToken*/ + void 0, + h.propertyName, + h.name + )) + ]) + ); + return; + } + i && g(n, i.name, "default"); + for (const h of s) + g(n, h.name, h.propertyName); + return; + } + const u = n.isTypeOnly && at( + [i, ...s], + (h) => h?.addAsTypeOnly === 4 + /* NotAllowed */ + ), m = n.namedBindings && ((_ = jn(n.namedBindings, mm)) == null ? void 0 : _.elements); + if (i && (E.assert(!n.name, "Cannot add a default import to an import clause that already has one"), e.insertNodeAt(t, n.getStart(t), N.createIdentifier(i.name), { suffix: ", " })), s.length) { + const { specifierComparer: h, isSorted: S } = Mv.getNamedImportSpecifierComparerWithDetection(n.parent, c, t), T = W_( + s.map( + (C) => N.createImportSpecifier( + (!n.isTypeOnly || u) && rH(C, c), + C.propertyName === void 0 ? void 0 : N.createIdentifier(C.propertyName), + N.createIdentifier(C.name) + ) + ), + h + ); + if (o) + e.replaceNode( + t, + n.namedBindings, + N.updateNamedImports( + n.namedBindings, + W_([...m.filter((C) => !o.has(C)), ...T], h) + ) + ); + else if (m?.length && S !== !1) { + const C = u && m ? N.updateNamedImports( + n.namedBindings, + Wc(m, (D) => N.updateImportSpecifier( + D, + /*isTypeOnly*/ + !0, + D.propertyName, + D.name + )) + ).elements : m; + for (const D of T) { + const w = Mv.getImportSpecifierInsertionIndex(C, D, h); + e.insertImportSpecifierAtIndex(t, D, n.namedBindings, w); + } + } else if (m?.length) + for (const C of T) + e.insertNodeInListAfter(t, _a(m), C, m); + else if (T.length) { + const C = N.createNamedImports(T); + n.namedBindings ? e.replaceNode(t, n.namedBindings, C) : e.insertNodeAfter(t, E.checkDefined(n.name, "Import clause must have either named imports or a default import"), C); + } + } + if (u && (e.delete(t, AV(n, t)), m)) + for (const h of m) + e.insertModifierBefore(t, 156, h); + function g(h, S, T) { + const C = N.createBindingElement( + /*dotDotDotToken*/ + void 0, + T, + S + ); + h.elements.length ? e.insertNodeInListAfter(t, _a(h.elements), C) : e.replaceNode(t, h, N.createObjectBindingPattern([C])); + } + } + function Wce(e, t, { namespacePrefix: n, usagePosition: i }) { + e.insertText(t, i, n + "."); + } + function uke(e, t, { moduleSpecifier: n, usagePosition: i }, s) { + e.insertText(t, i, _ke(n, s)); + } + function _ke(e, t) { + const n = wV(t); + return `import(${n}${e}${n}).`; + } + function Uce({ addAsTypeOnly: e }) { + return e === 2; + } + function rH(e, t) { + return Uce(e) || !!t.preferTypeOnlyAutoImports && e.addAsTypeOnly !== 4; + } + function fke(e, t, n, i, s, o, c) { + const _ = cw(e, t); + let u; + if (n !== void 0 || i?.length) { + const m = (!n || Uce(n)) && Ri(i, Uce) || (o.verbatimModuleSyntax || c.preferTypeOnlyAutoImports) && n?.addAsTypeOnly !== 4 && !at( + i, + (g) => g.addAsTypeOnly === 4 + /* NotAllowed */ + ); + u = qT( + u, + p1( + n && N.createIdentifier(n.name), + i?.map( + (g) => N.createImportSpecifier( + !m && rH(g, c), + g.propertyName === void 0 ? void 0 : N.createIdentifier(g.propertyName), + N.createIdentifier(g.name) + ) + ), + e, + t, + m + ) + ); + } + if (s) { + const m = s.importKind === 3 ? N.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + rH(s, c), + N.createIdentifier(s.name), + N.createExternalModuleReference(_) + ) : N.createImportDeclaration( + /*modifiers*/ + void 0, + N.createImportClause( + rH(s, c), + /*name*/ + void 0, + N.createNamespaceImport(N.createIdentifier(s.name)) + ), + _, + /*attributes*/ + void 0 + ); + u = qT(u, m); + } + return E.checkDefined(u); + } + function pke(e, t, n, i, s) { + const o = cw(e, t); + let c; + if (n || i?.length) { + const _ = i?.map(({ name: m, propertyName: g }) => N.createBindingElement( + /*dotDotDotToken*/ + void 0, + g, + m + )) || []; + n && _.unshift(N.createBindingElement( + /*dotDotDotToken*/ + void 0, + "default", + n.name + )); + const u = dke(N.createObjectBindingPattern(_), o); + c = qT(c, u); + } + if (s) { + const _ = dke(s.name, o); + c = qT(c, _); + } + return E.checkDefined(c); + } + function dke(e, t) { + return N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [ + N.createVariableDeclaration( + typeof e == "string" ? N.createIdentifier(e) : e, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + N.createCallExpression( + N.createIdentifier("require"), + /*typeArguments*/ + void 0, + [t] + ) + ) + ], + 2 + /* Const */ + ) + ); + } + function mke(e, t) { + return t === 7 ? !0 : t & 1 ? !!(e & 111551) : t & 2 ? !!(e & 788968) : t & 4 ? !!(e & 1920) : !1; + } + function Vce(e, t) { + return zg(e) ? t.getImpliedNodeFormatForEmit(e) : GS(e, t.getCompilerOptions()); + } + function Gqe(e, t) { + return zg(e) ? t.getEmitModuleFormatOfFile(e) : KD(e, t.getCompilerOptions()); + } + var qce = "addMissingConstraint", gke = [ + // We want errors this could be attached to: + // Diagnostics.This_type_parameter_probably_needs_an_extends_0_constraint + p.Type_0_is_not_comparable_to_type_1.code, + p.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated.code, + p.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code, + p.Type_0_is_not_assignable_to_type_1.code, + p.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code, + p.Property_0_is_incompatible_with_index_signature.code, + p.Property_0_in_type_1_is_not_assignable_to_type_2.code, + p.Type_0_does_not_satisfy_the_constraint_1.code + ]; + Qs({ + errorCodes: gke, + getCodeActions(e) { + const { sourceFile: t, span: n, program: i, preferences: s, host: o } = e, c = hke(i, t, n); + if (c === void 0) return; + const _ = sn.ChangeTracker.with(e, (u) => yke(u, i, s, o, t, c)); + return [Os(qce, _, p.Add_extends_constraint, qce, p.Add_extends_constraint_to_all_type_parameters)]; + }, + fixIds: [qce], + getAllCodeActions: (e) => { + const { program: t, preferences: n, host: i } = e, s = /* @__PURE__ */ new Set(); + return gk(sn.ChangeTracker.with(e, (o) => { + hk(e, gke, (c) => { + const _ = hke(t, c.file, ql(c.start, c.length)); + if (_ && Lp(s, Aa(_.declaration))) + return yke(o, t, n, i, c.file, _); + }); + })); + } + }); + function hke(e, t, n) { + const i = Pn(e.getSemanticDiagnostics(t), (c) => c.start === n.start && c.length === n.length); + if (i === void 0 || i.relatedInformation === void 0) return; + const s = Pn(i.relatedInformation, (c) => c.code === p.This_type_parameter_might_need_an_extends_0_constraint.code); + if (s === void 0 || s.file === void 0 || s.start === void 0 || s.length === void 0) return; + let o = Ble(s.file, ql(s.start, s.length)); + if (o !== void 0 && (Me(o) && Ao(o.parent) && (o = o.parent), Ao(o))) { + if (FS(o.parent)) return; + const c = Si(t, n.start), _ = e.getTypeChecker(); + return { constraint: Xqe(_, c) || $qe(s.messageText), declaration: o, token: c }; + } + } + function yke(e, t, n, i, s, o) { + const { declaration: c, constraint: _ } = o, u = t.getTypeChecker(); + if (rs(_)) + e.insertText(s, c.name.end, ` extends ${_}`); + else { + const m = pa(t.getCompilerOptions()), g = q6({ program: t, host: i }), h = y2(s, t, n, i), S = hH( + u, + h, + _, + /*contextNode*/ + void 0, + m, + /*flags*/ + void 0, + /*internalFlags*/ + void 0, + g + ); + S && (e.replaceNode(s, c, N.updateTypeParameterDeclaration( + c, + /*modifiers*/ + void 0, + c.name, + S, + c.default + )), h.writeFixes(e)); + } + } + function $qe(e) { + const [, t] = vm(e, ` +`, 0).match(/`extends (.*)`/) || []; + return t; + } + function Xqe(e, t) { + return fi(t.parent) ? e.getTypeArgumentConstraint(t.parent) : (ct(t) ? e.getContextualType(t) : void 0) || e.getTypeAtLocation(t); + } + var vke = "fixOverrideModifier", XA = "fixAddOverrideModifier", _L = "fixRemoveOverrideModifier", bke = [ + p.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code, + p.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code, + p.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code, + p.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code, + p.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code, + p.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code, + p.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code, + p.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code, + p.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code + ], Ske = { + // case #1: + [p.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code]: { + descriptions: p.Add_override_modifier, + fixId: XA, + fixAllDescriptions: p.Add_all_missing_override_modifiers + }, + [p.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code]: { + descriptions: p.Add_override_modifier, + fixId: XA, + fixAllDescriptions: p.Add_all_missing_override_modifiers + }, + // case #2: + [p.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code]: { + descriptions: p.Remove_override_modifier, + fixId: _L, + fixAllDescriptions: p.Remove_all_unnecessary_override_modifiers + }, + [p.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code]: { + descriptions: p.Remove_override_modifier, + fixId: _L, + fixAllDescriptions: p.Remove_override_modifier + }, + // case #3: + [p.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code]: { + descriptions: p.Add_override_modifier, + fixId: XA, + fixAllDescriptions: p.Add_all_missing_override_modifiers + }, + [p.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code]: { + descriptions: p.Add_override_modifier, + fixId: XA, + fixAllDescriptions: p.Add_all_missing_override_modifiers + }, + // case #4: + [p.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code]: { + descriptions: p.Add_override_modifier, + fixId: XA, + fixAllDescriptions: p.Remove_all_unnecessary_override_modifiers + }, + // case #5: + [p.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code]: { + descriptions: p.Remove_override_modifier, + fixId: _L, + fixAllDescriptions: p.Remove_all_unnecessary_override_modifiers + }, + [p.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code]: { + descriptions: p.Remove_override_modifier, + fixId: _L, + fixAllDescriptions: p.Remove_all_unnecessary_override_modifiers + } + }; + Qs({ + errorCodes: bke, + getCodeActions: function(t) { + const { errorCode: n, span: i } = t, s = Ske[n]; + if (!s) return He; + const { descriptions: o, fixId: c, fixAllDescriptions: _ } = s, u = sn.ChangeTracker.with(t, (m) => Tke(m, t, n, i.start)); + return [ + uce(vke, u, o, c, _) + ]; + }, + fixIds: [vke, XA, _L], + getAllCodeActions: (e) => Ga(e, bke, (t, n) => { + const { code: i, start: s } = n, o = Ske[i]; + !o || o.fixId !== e.fixId || Tke(t, e, i, s); + }) + }); + function Tke(e, t, n, i) { + switch (n) { + case p.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code: + case p.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code: + case p.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code: + case p.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code: + case p.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code: + return Qqe(e, t.sourceFile, i); + case p.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code: + case p.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code: + case p.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code: + case p.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code: + return Yqe(e, t.sourceFile, i); + default: + E.fail("Unexpected error code: " + n); + } + } + function Qqe(e, t, n) { + const i = kke(t, n); + if (Gu(t)) { + e.addJSDocTags(t, i, [N.createJSDocOverrideTag(N.createIdentifier("override"))]); + return; + } + const s = i.modifiers || He, o = Pn(s, Bx), c = Pn(s, dte), _ = Pn(s, (h) => yV(h.kind)), u = gb(s, ll), m = c ? c.end : o ? o.end : _ ? _.end : u ? aa(t.text, u.end) : i.getStart(t), g = _ || o || c ? { prefix: " " } : { suffix: " " }; + e.insertModifierAt(t, m, 164, g); + } + function Yqe(e, t, n) { + const i = kke(t, n); + if (Gu(t)) { + e.filterJSDocTags(t, i, jI(TF)); + return; + } + const s = Pn(i.modifiers, mte); + E.assertIsDefined(s), e.deleteModifier(t, s); + } + function xke(e) { + switch (e.kind) { + case 176: + case 172: + case 174: + case 177: + case 178: + return !0; + case 169: + return H_(e, e.parent); + default: + return !1; + } + } + function kke(e, t) { + const n = Si(e, t), i = ur(n, (s) => Zn(s) ? "quit" : xke(s)); + return E.assert(i && xke(i)), i; + } + var Hce = "fixNoPropertyAccessFromIndexSignature", Cke = [ + p.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0.code + ]; + Qs({ + errorCodes: Cke, + fixIds: [Hce], + getCodeActions(e) { + const { sourceFile: t, span: n, preferences: i } = e, s = Dke(t, n.start), o = sn.ChangeTracker.with(e, (c) => Eke(c, e.sourceFile, s, i)); + return [Os(Hce, o, [p.Use_element_access_for_0, s.name.text], Hce, p.Use_element_access_for_all_undeclared_properties)]; + }, + getAllCodeActions: (e) => Ga(e, Cke, (t, n) => Eke(t, n.file, Dke(n.file, n.start), e.preferences)) + }); + function Eke(e, t, n, i) { + const s = tf(t, i), o = N.createStringLiteral( + n.name.text, + s === 0 + /* Single */ + ); + e.replaceNode( + t, + n, + a7(n) ? N.createElementAccessChain(n.expression, n.questionDotToken, o) : N.createElementAccessExpression(n.expression, o) + ); + } + function Dke(e, t) { + return Ws(Si(e, t).parent, Tn); + } + var Gce = "fixImplicitThis", wke = [p.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code]; + Qs({ + errorCodes: wke, + getCodeActions: function(t) { + const { sourceFile: n, program: i, span: s } = t; + let o; + const c = sn.ChangeTracker.with(t, (_) => { + o = Pke(_, n, s.start, i.getTypeChecker()); + }); + return o ? [Os(Gce, c, o, Gce, p.Fix_all_implicit_this_errors)] : He; + }, + fixIds: [Gce], + getAllCodeActions: (e) => Ga(e, wke, (t, n) => { + Pke(t, n.file, n.start, e.program.getTypeChecker()); + }) + }); + function Pke(e, t, n, i) { + const s = Si(t, n); + if (!A6(s)) return; + const o = Lu( + s, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + if (!(!Tc(o) && !po(o)) && !Ei(Lu( + o, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ))) { + const c = E.checkDefined(Xa(o, 100, t)), { name: _ } = o, u = E.checkDefined(o.body); + return po(o) ? _ && So.Core.isSymbolReferencedInFile(_, i, t, u) ? void 0 : (e.delete(t, c), _ && e.delete(t, _), e.insertText(t, u.pos, " =>"), [p.Convert_function_expression_0_to_arrow_function, _ ? _.text : qV]) : (e.replaceNode(t, c, N.createToken( + 87 + /* ConstKeyword */ + )), e.insertText(t, _.end, " = "), e.insertText(t, u.pos, " =>"), [p.Convert_function_declaration_0_to_arrow_function, _.text]); + } + } + var $ce = "fixImportNonExportedMember", Nke = [ + p.Module_0_declares_1_locally_but_it_is_not_exported.code + ]; + Qs({ + errorCodes: Nke, + fixIds: [$ce], + getCodeActions(e) { + const { sourceFile: t, span: n, program: i } = e, s = Ake(t, n.start, i); + if (s === void 0) return; + const o = sn.ChangeTracker.with(e, (c) => Zqe(c, i, s)); + return [Os($ce, o, [p.Export_0_from_module_1, s.exportName.node.text, s.moduleSpecifier], $ce, p.Export_all_referenced_locals)]; + }, + getAllCodeActions(e) { + const { program: t } = e; + return gk(sn.ChangeTracker.with(e, (n) => { + const i = /* @__PURE__ */ new Map(); + hk(e, Nke, (s) => { + const o = Ake(s.file, s.start, t); + if (o === void 0) return; + const { exportName: c, node: _, moduleSourceFile: u } = o; + if (nH(u, c.isTypeOnly) === void 0 && rN(_)) + n.insertExportModifier(u, _); + else { + const m = i.get(u) || { typeOnlyExports: [], exports: [] }; + c.isTypeOnly ? m.typeOnlyExports.push(c) : m.exports.push(c), i.set(u, m); + } + }), i.forEach((s, o) => { + const c = nH( + o, + /*isTypeOnly*/ + !0 + ); + c && c.isTypeOnly ? (Xce(n, t, o, s.typeOnlyExports, c), Xce(n, t, o, s.exports, nH( + o, + /*isTypeOnly*/ + !1 + ))) : Xce(n, t, o, [...s.exports, ...s.typeOnlyExports], c); + }); + })); + } + }); + function Ake(e, t, n) { + var i, s; + const o = Si(e, t); + if (Me(o)) { + const c = ur(o, zo); + if (c === void 0) return; + const _ = ea(c.moduleSpecifier) ? c.moduleSpecifier : void 0; + if (_ === void 0) return; + const u = (i = n.getResolvedModuleFromModuleSpecifier(_, e)) == null ? void 0 : i.resolvedModule; + if (u === void 0) return; + const m = n.getSourceFile(u.resolvedFileName); + if (m === void 0 || J6(n, m)) return; + const g = m.symbol, h = (s = jn(g.valueDeclaration, Ym)) == null ? void 0 : s.locals; + if (h === void 0) return; + const S = h.get(o.escapedText); + if (S === void 0) return; + const T = Kqe(S); + return T === void 0 ? void 0 : { exportName: { node: o, isTypeOnly: Nx(T) }, node: T, moduleSourceFile: m, moduleSpecifier: _.text }; + } + } + function Zqe(e, t, { exportName: n, node: i, moduleSourceFile: s }) { + const o = nH(s, n.isTypeOnly); + o ? Ike(e, t, s, o, [n]) : rN(i) ? e.insertExportModifier(s, i) : Fke(e, t, s, [n]); + } + function Xce(e, t, n, i, s) { + Ir(i) && (s ? Ike(e, t, n, s, i) : Fke(e, t, n, i)); + } + function nH(e, t) { + const n = (i) => wc(i) && (t && i.isTypeOnly || !i.isTypeOnly); + return gb(e.statements, n); + } + function Ike(e, t, n, i, s) { + const o = i.exportClause && up(i.exportClause) ? i.exportClause.elements : N.createNodeArray([]), c = !i.isTypeOnly && !!(Mp(t.getCompilerOptions()) || Pn(o, (_) => _.isTypeOnly)); + e.replaceNode( + n, + i, + N.updateExportDeclaration( + i, + i.modifiers, + i.isTypeOnly, + N.createNamedExports( + N.createNodeArray( + [...o, ...Oke(s, c)], + /*hasTrailingComma*/ + o.hasTrailingComma + ) + ), + i.moduleSpecifier, + i.attributes + ) + ); + } + function Fke(e, t, n, i) { + e.insertNodeAtEndOfScope(n, n, N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createNamedExports(Oke( + i, + /*allowTypeModifier*/ + Mp(t.getCompilerOptions()) + )), + /*moduleSpecifier*/ + void 0, + /*attributes*/ + void 0 + )); + } + function Oke(e, t) { + return N.createNodeArray(gr(e, (n) => N.createExportSpecifier( + t && n.isTypeOnly, + /*propertyName*/ + void 0, + n.node + ))); + } + function Kqe(e) { + if (e.valueDeclaration === void 0) + return Uc(e.declarations); + const t = e.valueDeclaration, n = Kn(t) ? jn(t.parent.parent, pc) : void 0; + return n && Ir(n.declarationList.declarations) === 1 ? n : t; + } + var Qce = "fixIncorrectNamedTupleSyntax", eHe = [ + p.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type.code, + p.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type.code + ]; + Qs({ + errorCodes: eHe, + getCodeActions: function(t) { + const { sourceFile: n, span: i } = t, s = tHe(n, i.start), o = sn.ChangeTracker.with(t, (c) => rHe(c, n, s)); + return [Os(Qce, o, p.Move_labeled_tuple_element_modifiers_to_labels, Qce, p.Move_labeled_tuple_element_modifiers_to_labels)]; + }, + fixIds: [Qce] + }); + function tHe(e, t) { + const n = Si(e, t); + return ur( + n, + (i) => i.kind === 202 + /* NamedTupleMember */ + ); + } + function rHe(e, t, n) { + if (!n) + return; + let i = n.type, s = !1, o = !1; + for (; i.kind === 190 || i.kind === 191 || i.kind === 196; ) + i.kind === 190 ? s = !0 : i.kind === 191 && (o = !0), i = i.type; + const c = N.updateNamedTupleMember( + n, + n.dotDotDotToken || (o ? N.createToken( + 26 + /* DotDotDotToken */ + ) : void 0), + n.name, + n.questionToken || (s ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0), + i + ); + c !== n && e.replaceNode(t, n, c); + } + var Lke = "fixSpelling", Mke = [ + p.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code, + p.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code, + p.Cannot_find_name_0_Did_you_mean_1.code, + p.Could_not_find_name_0_Did_you_mean_1.code, + p.Cannot_find_namespace_0_Did_you_mean_1.code, + p.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code, + p.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code, + p._0_has_no_exported_member_named_1_Did_you_mean_2.code, + p.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1.code, + p.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1.code, + // for JSX class components + p.No_overload_matches_this_call.code, + // for JSX FC + p.Type_0_is_not_assignable_to_type_1.code + ]; + Qs({ + errorCodes: Mke, + getCodeActions(e) { + const { sourceFile: t, errorCode: n } = e, i = Rke(t, e.span.start, e, n); + if (!i) return; + const { node: s, suggestedSymbol: o } = i, c = pa(e.host.getCompilationSettings()), _ = sn.ChangeTracker.with(e, (u) => jke(u, t, s, o, c)); + return [Os("spelling", _, [p.Change_spelling_to_0, _c(o)], Lke, p.Fix_all_detected_spelling_errors)]; + }, + fixIds: [Lke], + getAllCodeActions: (e) => Ga(e, Mke, (t, n) => { + const i = Rke(n.file, n.start, e, n.code), s = pa(e.host.getCompilationSettings()); + i && jke(t, e.sourceFile, i.node, i.suggestedSymbol, s); + }) + }); + function Rke(e, t, n, i) { + const s = Si(e, t), o = s.parent; + if ((i === p.No_overload_matches_this_call.code || i === p.Type_0_is_not_assignable_to_type_1.code) && !hm(o)) return; + const c = n.program.getTypeChecker(); + let _; + if (Tn(o) && o.name === s) { + E.assert(Lg(s), "Expected an identifier for spelling (property access)"); + let u = c.getTypeAtLocation(o.expression); + o.flags & 64 && (u = c.getNonNullableType(u)), _ = c.getSuggestedSymbolForNonexistentProperty(s, u); + } else if (fn(o) && o.operatorToken.kind === 103 && o.left === s && Ni(s)) { + const u = c.getTypeAtLocation(o.right); + _ = c.getSuggestedSymbolForNonexistentProperty(s, u); + } else if (Xu(o) && o.right === s) { + const u = c.getSymbolAtLocation(o.left); + u && u.flags & 1536 && (_ = c.getSuggestedSymbolForNonexistentModule(o.right, u)); + } else if (ju(o) && o.name === s) { + E.assertNode(s, Me, "Expected an identifier for spelling (import)"); + const u = ur(s, zo), m = iHe(n, u, e); + m && m.symbol && (_ = c.getSuggestedSymbolForNonexistentModule(s, m.symbol)); + } else if (hm(o) && o.name === s) { + E.assertNode(s, Me, "Expected an identifier for JSX attribute"); + const u = ur(s, bu), m = c.getContextualTypeForArgumentAtIndex(u, 0); + _ = c.getSuggestedSymbolForNonexistentJSXAttribute(s, m); + } else if (m5(o) && sl(o) && o.name === s) { + const u = ur(s, Zn), m = u ? sm(u) : void 0, g = m ? c.getTypeAtLocation(m) : void 0; + g && (_ = c.getSuggestedSymbolForNonexistentClassMember(qo(s), g)); + } else { + const u = $S(s), m = qo(s); + E.assert(m !== void 0, "name should be defined"), _ = c.getSuggestedSymbolForNonexistentSymbol(s, m, nHe(u)); + } + return _ === void 0 ? void 0 : { node: s, suggestedSymbol: _ }; + } + function jke(e, t, n, i, s) { + const o = _c(i); + if (!E_(o, s) && Tn(n.parent)) { + const c = i.valueDeclaration; + c && Hl(c) && Ni(c.name) ? e.replaceNode(t, n, N.createIdentifier(o)) : e.replaceNode(t, n.parent, N.createElementAccessExpression(n.parent.expression, N.createStringLiteral(o))); + } else + e.replaceNode(t, n, N.createIdentifier(o)); + } + function nHe(e) { + let t = 0; + return e & 4 && (t |= 1920), e & 2 && (t |= 788968), e & 1 && (t |= 111551), t; + } + function iHe(e, t, n) { + var i; + if (!t || !Na(t.moduleSpecifier)) return; + const s = (i = e.program.getResolvedModuleFromModuleSpecifier(t.moduleSpecifier, n)) == null ? void 0 : i.resolvedModule; + if (s) + return e.program.getSourceFile(s.resolvedFileName); + } + var Yce = "returnValueCorrect", Zce = "fixAddReturnStatement", Kce = "fixRemoveBracesFromArrowFunctionBody", ele = "fixWrapTheBlockWithParen", Bke = [ + p.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value.code, + p.Type_0_is_not_assignable_to_type_1.code, + p.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code + ]; + Qs({ + errorCodes: Bke, + fixIds: [Zce, Kce, ele], + getCodeActions: function(t) { + const { program: n, sourceFile: i, span: { start: s }, errorCode: o } = t, c = zke(n.getTypeChecker(), i, s, o); + if (c) + return c.kind === 0 ? Pr( + [aHe(t, c.expression, c.statement)], + bo(c.declaration) ? oHe(t, c.declaration, c.expression, c.commentSource) : void 0 + ) : [cHe(t, c.declaration, c.expression)]; + }, + getAllCodeActions: (e) => Ga(e, Bke, (t, n) => { + const i = zke(e.program.getTypeChecker(), n.file, n.start, n.code); + if (i) + switch (e.fixId) { + case Zce: + Wke(t, n.file, i.expression, i.statement); + break; + case Kce: + if (!bo(i.declaration)) return; + Uke( + t, + n.file, + i.declaration, + i.expression, + i.commentSource + ); + break; + case ele: + if (!bo(i.declaration)) return; + Vke(t, n.file, i.declaration, i.expression); + break; + default: + E.fail(JSON.stringify(e.fixId)); + } + }) + }); + function Jke(e, t, n) { + const i = e.createSymbol(4, t.escapedText); + i.links.type = e.getTypeAtLocation(n); + const s = Us([i]); + return e.createAnonymousType( + /*symbol*/ + void 0, + s, + [], + [], + [] + ); + } + function tle(e, t, n, i) { + if (!t.body || !ks(t.body) || Ir(t.body.statements) !== 1) return; + const s = ya(t.body.statements); + if (El(s) && rle(e, t, e.getTypeAtLocation(s.expression), n, i)) + return { + declaration: t, + kind: 0, + expression: s.expression, + statement: s, + commentSource: s.expression + }; + if (i1(s) && El(s.statement)) { + const o = N.createObjectLiteralExpression([N.createPropertyAssignment(s.label, s.statement.expression)]), c = Jke(e, s.label, s.statement.expression); + if (rle(e, t, c, n, i)) + return bo(t) ? { + declaration: t, + kind: 1, + expression: o, + statement: s, + commentSource: s.statement.expression + } : { + declaration: t, + kind: 0, + expression: o, + statement: s, + commentSource: s.statement.expression + }; + } else if (ks(s) && Ir(s.statements) === 1) { + const o = ya(s.statements); + if (i1(o) && El(o.statement)) { + const c = N.createObjectLiteralExpression([N.createPropertyAssignment(o.label, o.statement.expression)]), _ = Jke(e, o.label, o.statement.expression); + if (rle(e, t, _, n, i)) + return { + declaration: t, + kind: 0, + expression: c, + statement: s, + commentSource: o + }; + } + } + } + function rle(e, t, n, i, s) { + if (s) { + const o = e.getSignatureFromDeclaration(t); + if (o) { + $n( + t, + 1024 + /* Async */ + ) && (n = e.createPromiseType(n)); + const c = e.createSignature( + t, + o.typeParameters, + o.thisParameter, + o.parameters, + n, + /*typePredicate*/ + void 0, + o.minArgumentCount, + o.flags + ); + n = e.createAnonymousType( + /*symbol*/ + void 0, + Us(), + [c], + [], + [] + ); + } else + n = e.getAnyType(); + } + return e.isTypeAssignableTo(n, i); + } + function zke(e, t, n, i) { + const s = Si(t, n); + if (!s.parent) return; + const o = ur(s.parent, Ka); + switch (i) { + case p.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value.code: + return !o || !o.body || !o.type || !p_(o.type, s) ? void 0 : tle( + e, + o, + e.getTypeFromTypeNode(o.type), + /*isFunctionType*/ + !1 + ); + case p.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code: + if (!o || !Fs(o.parent) || !o.body) return; + const c = o.parent.arguments.indexOf(o); + if (c === -1) return; + const _ = e.getContextualTypeForArgumentAtIndex(o.parent, c); + return _ ? tle( + e, + o, + _, + /*isFunctionType*/ + !0 + ) : void 0; + case p.Type_0_is_not_assignable_to_type_1.code: + if (!tg(s) || !D4(s.parent) && !hm(s.parent)) return; + const u = sHe(s.parent); + return !u || !Ka(u) || !u.body ? void 0 : tle( + e, + u, + e.getTypeAtLocation(s.parent), + /*isFunctionType*/ + !0 + ); + } + } + function sHe(e) { + switch (e.kind) { + case 260: + case 169: + case 208: + case 172: + case 303: + return e.initializer; + case 291: + return e.initializer && (n6(e.initializer) ? e.initializer.expression : void 0); + case 304: + case 171: + case 306: + case 348: + case 341: + return; + } + } + function Wke(e, t, n, i) { + nf(n); + const s = NA(t); + e.replaceNode(t, i, N.createReturnStatement(n), { + leadingTriviaOption: sn.LeadingTriviaOption.Exclude, + trailingTriviaOption: sn.TrailingTriviaOption.Exclude, + suffix: s ? ";" : void 0 + }); + } + function Uke(e, t, n, i, s, o) { + const c = D9(i) ? N.createParenthesizedExpression(i) : i; + nf(s), QS(s, c), e.replaceNode(t, n.body, c); + } + function Vke(e, t, n, i) { + e.replaceNode(t, n.body, N.createParenthesizedExpression(i)); + } + function aHe(e, t, n) { + const i = sn.ChangeTracker.with(e, (s) => Wke(s, e.sourceFile, t, n)); + return Os(Yce, i, p.Add_a_return_statement, Zce, p.Add_all_missing_return_statement); + } + function oHe(e, t, n, i) { + const s = sn.ChangeTracker.with(e, (o) => Uke( + o, + e.sourceFile, + t, + n, + i + )); + return Os(Yce, s, p.Remove_braces_from_arrow_function_body, Kce, p.Remove_braces_from_all_arrow_function_bodies_with_relevant_issues); + } + function cHe(e, t, n) { + const i = sn.ChangeTracker.with(e, (s) => Vke(s, e.sourceFile, t, n)); + return Os(Yce, i, p.Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal, ele, p.Wrap_all_object_literal_with_parentheses); + } + var Ov = "fixMissingMember", iH = "fixMissingProperties", sH = "fixMissingAttributes", aH = "fixMissingFunctionDeclaration", qke = [ + p.Property_0_does_not_exist_on_type_1.code, + p.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code, + p.Property_0_is_missing_in_type_1_but_required_in_type_2.code, + p.Type_0_is_missing_the_following_properties_from_type_1_Colon_2.code, + p.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more.code, + p.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code, + p.Cannot_find_name_0.code + ]; + Qs({ + errorCodes: qke, + getCodeActions(e) { + const t = e.program.getTypeChecker(), n = Hke(e.sourceFile, e.span.start, e.errorCode, t, e.program); + if (n) { + if (n.kind === 3) { + const i = sn.ChangeTracker.with(e, (s) => rCe(s, e, n)); + return [Os(iH, i, p.Add_missing_properties, iH, p.Add_all_missing_properties)]; + } + if (n.kind === 4) { + const i = sn.ChangeTracker.with(e, (s) => tCe(s, e, n)); + return [Os(sH, i, p.Add_missing_attributes, sH, p.Add_all_missing_attributes)]; + } + if (n.kind === 2 || n.kind === 5) { + const i = sn.ChangeTracker.with(e, (s) => eCe(s, e, n)); + return [Os(aH, i, [p.Add_missing_function_declaration_0, n.token.text], aH, p.Add_all_missing_function_declarations)]; + } + if (n.kind === 1) { + const i = sn.ChangeTracker.with(e, (s) => Kke(s, e.program.getTypeChecker(), n)); + return [Os(Ov, i, [p.Add_missing_enum_member_0, n.token.text], Ov, p.Add_all_missing_members)]; + } + return Wi(pHe(e, n), lHe(e, n)); + } + }, + fixIds: [Ov, aH, iH, sH], + getAllCodeActions: (e) => { + const { program: t, fixId: n } = e, i = t.getTypeChecker(), s = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map(); + return gk(sn.ChangeTracker.with(e, (c) => { + hk(e, qke, (_) => { + const u = Hke(_.file, _.start, _.code, i, e.program); + if (!(!u || !Lp(s, Aa(u.parentDeclaration) + "#" + (u.kind === 3 ? u.identifier : u.token.text)))) { + if (n === aH && (u.kind === 2 || u.kind === 5)) + eCe(c, e, u); + else if (n === iH && u.kind === 3) + rCe(c, e, u); + else if (n === sH && u.kind === 4) + tCe(c, e, u); + else if (u.kind === 1 && Kke(c, i, u), u.kind === 0) { + const { parentDeclaration: m, token: g } = u, h = HE(o, m, () => []); + h.some((S) => S.token.text === g.text) || h.push(u); + } + } + }), o.forEach((_, u) => { + const m = Qu(u) ? void 0 : Jle(u, i); + for (const g of _) { + if (m?.some((A) => { + const O = o.get(A); + return !!O && O.some(({ token: F }) => F.text === g.token.text); + })) continue; + const { parentDeclaration: h, declSourceFile: S, modifierFlags: T, token: C, call: D, isJSFile: w } = g; + if (D && !Ni(C)) + Zke(e, c, D, C, T & 256, h, S); + else if (w && !Yl(h) && !Qu(h)) + Gke(c, S, h, C, !!(T & 256)); + else { + const A = Xke(i, h, C); + Qke( + c, + S, + h, + C.text, + A, + T & 256 + /* Static */ + ); + } + } + }); + })); + } + }); + function Hke(e, t, n, i, s) { + var o, c, _; + const u = Si(e, t), m = u.parent; + if (n === p.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code) { + if (!(u.kind === 19 && oa(m) && Fs(m.parent))) return; + const D = ec(m.parent.arguments, (F) => F === m); + if (D < 0) return; + const w = i.getResolvedSignature(m.parent); + if (!(w && w.declaration && w.parameters[D])) return; + const A = w.parameters[D].valueDeclaration; + if (!(A && Ii(A) && Me(A.name))) return; + const O = Ki(i.getUnmatchedProperties( + i.getTypeAtLocation(m), + i.getParameterType(w, D).getNonNullableType(), + /*requireOptionalProperties*/ + !1, + /*matchDiscriminantProperties*/ + !1 + )); + return Ir(O) ? { kind: 3, token: A.name, identifier: A.name.text, properties: O, parentDeclaration: m } : void 0; + } + if (u.kind === 19 && oa(m)) { + const D = (o = i.getContextualType(m) || i.getTypeAtLocation(m)) == null ? void 0 : o.getNonNullableType(), w = Ki(i.getUnmatchedProperties( + i.getTypeAtLocation(m), + D, + /*requireOptionalProperties*/ + !1, + /*matchDiscriminantProperties*/ + !1 + )); + return Ir(w) ? { kind: 3, token: m, identifier: "", properties: w, parentDeclaration: m } : void 0; + } + if (!Lg(u)) return; + if (Me(u) && C0(m) && m.initializer && oa(m.initializer)) { + const D = (c = i.getContextualType(u) || i.getTypeAtLocation(u)) == null ? void 0 : c.getNonNullableType(), w = Ki(i.getUnmatchedProperties( + i.getTypeAtLocation(m.initializer), + D, + /*requireOptionalProperties*/ + !1, + /*matchDiscriminantProperties*/ + !1 + )); + return Ir(w) ? { kind: 3, token: u, identifier: u.text, properties: w, parentDeclaration: m.initializer } : void 0; + } + if (Me(u) && bu(u.parent)) { + const D = pa(s.getCompilerOptions()), w = mHe(i, D, u.parent); + return Ir(w) ? { kind: 4, token: u, attributes: w, parentDeclaration: u.parent } : void 0; + } + if (Me(u)) { + const D = (_ = i.getContextualType(u)) == null ? void 0 : _.getNonNullableType(); + if (D && Cn(D) & 16) { + const w = Uc(i.getSignaturesOfType( + D, + 0 + /* Call */ + )); + return w === void 0 ? void 0 : { kind: 5, token: u, signature: w, sourceFile: e, parentDeclaration: nCe(u) }; + } + if (Fs(m) && m.expression === u) + return { kind: 2, token: u, call: m, sourceFile: e, modifierFlags: 0, parentDeclaration: nCe(u) }; + } + if (!Tn(m)) return; + const g = kV(i.getTypeAtLocation(m.expression)), h = g.symbol; + if (!h || !h.declarations) return; + if (Me(u) && Fs(m.parent)) { + const D = Pn(h.declarations, Lc), w = D?.getSourceFile(); + if (D && w && !J6(s, w)) + return { kind: 2, token: u, call: m.parent, sourceFile: w, modifierFlags: 32, parentDeclaration: D }; + const A = Pn(h.declarations, Ei); + if (e.commonJsModuleIndicator) return; + if (A && !J6(s, A)) + return { kind: 2, token: u, call: m.parent, sourceFile: A, modifierFlags: 32, parentDeclaration: A }; + } + const S = Pn(h.declarations, Zn); + if (!S && Ni(u)) return; + const T = S || Pn(h.declarations, (D) => Yl(D) || Qu(D)); + if (T && !J6(s, T.getSourceFile())) { + const D = !Qu(T) && (g.target || g) !== i.getDeclaredTypeOfSymbol(h); + if (D && (Ni(u) || Yl(T))) return; + const w = T.getSourceFile(), A = Qu(T) ? 0 : (D ? 256 : 0) | (KV(u.text) ? 2 : 0), O = Gu(w), F = jn(m.parent, Fs); + return { kind: 0, token: u, call: F, modifierFlags: A, parentDeclaration: T, declSourceFile: w, isJSFile: O }; + } + const C = Pn(h.declarations, Zb); + if (C && !(g.flags & 1056) && !Ni(u) && !J6(s, C.getSourceFile())) + return { kind: 1, token: u, parentDeclaration: C }; + } + function lHe(e, t) { + return t.isJSFile ? QT(uHe(e, t)) : _He(e, t); + } + function uHe(e, { parentDeclaration: t, declSourceFile: n, modifierFlags: i, token: s }) { + if (Yl(t) || Qu(t)) + return; + const o = sn.ChangeTracker.with(e, (_) => Gke(_, n, t, s, !!(i & 256))); + if (o.length === 0) + return; + const c = i & 256 ? p.Initialize_static_property_0 : Ni(s) ? p.Declare_a_private_field_named_0 : p.Initialize_property_0_in_the_constructor; + return Os(Ov, o, [c, s.text], Ov, p.Add_all_missing_members); + } + function Gke(e, t, n, i, s) { + const o = i.text; + if (s) { + if (n.kind === 231) + return; + const c = n.name.getText(), _ = $ke(N.createIdentifier(c), o); + e.insertNodeAfter(t, n, _); + } else if (Ni(i)) { + const c = N.createPropertyDeclaration( + /*modifiers*/ + void 0, + o, + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ), _ = Yke(n); + _ ? e.insertNodeAfter(t, _, c) : e.insertMemberAtStart(t, n, c); + } else { + const c = Ug(n); + if (!c) + return; + const _ = $ke(N.createThis(), o); + e.insertNodeAtConstructorEnd(t, c, _); + } + } + function $ke(e, t) { + return N.createExpressionStatement(N.createAssignment(N.createPropertyAccessExpression(e, t), vk())); + } + function _He(e, { parentDeclaration: t, declSourceFile: n, modifierFlags: i, token: s }) { + const o = s.text, c = i & 256, _ = Xke(e.program.getTypeChecker(), t, s), u = (g) => sn.ChangeTracker.with(e, (h) => Qke(h, n, t, o, _, g)), m = [Os(Ov, u( + i & 256 + /* Static */ + ), [c ? p.Declare_static_property_0 : p.Declare_property_0, o], Ov, p.Add_all_missing_members)]; + return c || Ni(s) || (i & 2 && m.unshift(Od(Ov, u( + 2 + /* Private */ + ), [p.Declare_private_property_0, o])), m.push(fHe(e, n, t, s.text, _))), m; + } + function Xke(e, t, n) { + let i; + if (n.parent.parent.kind === 226) { + const s = n.parent.parent, o = n.parent === s.left ? s.right : s.left, c = e.getWidenedType(e.getBaseTypeOfLiteralType(e.getTypeAtLocation(o))); + i = e.typeToTypeNode( + c, + t, + 1, + 8 + /* AllowUnresolvedNames */ + ); + } else { + const s = e.getContextualType(n.parent); + i = s ? e.typeToTypeNode( + s, + /*enclosingDeclaration*/ + void 0, + 1, + 8 + /* AllowUnresolvedNames */ + ) : void 0; + } + return i || N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ); + } + function Qke(e, t, n, i, s, o) { + const c = o ? N.createNodeArray(N.createModifiersFromModifierFlags(o)) : void 0, _ = Zn(n) ? N.createPropertyDeclaration( + c, + i, + /*questionOrExclamationToken*/ + void 0, + s, + /*initializer*/ + void 0 + ) : N.createPropertySignature( + /*modifiers*/ + void 0, + i, + /*questionToken*/ + void 0, + s + ), u = Yke(n); + u ? e.insertNodeAfter(t, u, _) : e.insertMemberAtStart(t, n, _); + } + function Yke(e) { + let t; + for (const n of e.members) { + if (!ss(n)) break; + t = n; + } + return t; + } + function fHe(e, t, n, i, s) { + const o = N.createKeywordTypeNode( + 154 + /* StringKeyword */ + ), c = N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "x", + /*questionToken*/ + void 0, + o, + /*initializer*/ + void 0 + ), _ = N.createIndexSignature( + /*modifiers*/ + void 0, + [c], + s + ), u = sn.ChangeTracker.with(e, (m) => m.insertMemberAtStart(t, n, _)); + return Od(Ov, u, [p.Add_index_signature_for_property_0, i]); + } + function pHe(e, t) { + const { parentDeclaration: n, declSourceFile: i, modifierFlags: s, token: o, call: c } = t; + if (c === void 0) + return; + const _ = o.text, u = (g) => sn.ChangeTracker.with(e, (h) => Zke(e, h, c, o, g, n, i)), m = [Os(Ov, u( + s & 256 + /* Static */ + ), [s & 256 ? p.Declare_static_method_0 : p.Declare_method_0, _], Ov, p.Add_all_missing_members)]; + return s & 2 && m.unshift(Od(Ov, u( + 2 + /* Private */ + ), [p.Declare_private_method_0, _])), m; + } + function Zke(e, t, n, i, s, o, c) { + const _ = y2(c, e.program, e.preferences, e.host), u = Zn(o) ? 174 : 173, m = Ile(u, e, _, n, i, s, o), g = gHe(o, n); + g ? t.insertNodeAfter(c, g, m) : t.insertMemberAtStart(c, o, m), _.writeFixes(t); + } + function Kke(e, t, { token: n, parentDeclaration: i }) { + const s = at(i.members, (u) => { + const m = t.getTypeAtLocation(u); + return !!(m && m.flags & 402653316); + }), o = i.getSourceFile(), c = N.createEnumMember(n, s ? N.createStringLiteral(n.text) : void 0), _ = Co(i.members); + _ ? e.insertNodeInListAfter(o, _, c, i.members) : e.insertMemberAtStart(o, i, c); + } + function eCe(e, t, n) { + const i = tf(t.sourceFile, t.preferences), s = y2(t.sourceFile, t.program, t.preferences, t.host), o = n.kind === 2 ? Ile(262, t, s, n.call, An(n.token), n.modifierFlags, n.parentDeclaration) : gH( + 262, + t, + i, + n.signature, + pL(p.Function_not_implemented.message, i), + n.token, + /*modifiers*/ + void 0, + /*optional*/ + void 0, + /*enclosingDeclaration*/ + void 0, + s + ); + o === void 0 && E.fail("fixMissingFunctionDeclaration codefix got unexpected error."), Rp(n.parentDeclaration) ? e.insertNodeBefore( + n.sourceFile, + n.parentDeclaration, + o, + /*blankLineBetween*/ + !0 + ) : e.insertNodeAtEndOfScope(n.sourceFile, n.parentDeclaration, o), s.writeFixes(e); + } + function tCe(e, t, n) { + const i = y2(t.sourceFile, t.program, t.preferences, t.host), s = tf(t.sourceFile, t.preferences), o = t.program.getTypeChecker(), c = n.parentDeclaration.attributes, _ = at(c.properties, $x), u = gr(n.attributes, (h) => { + const S = oH(t, o, i, s, o.getTypeOfSymbol(h), n.parentDeclaration), T = N.createIdentifier(h.name), C = N.createJsxAttribute(T, N.createJsxExpression( + /*dotDotDotToken*/ + void 0, + S + )); + return Fa(T, C), C; + }), m = N.createJsxAttributes(_ ? [...u, ...c.properties] : [...c.properties, ...u]), g = { prefix: c.pos === c.end ? " " : void 0 }; + e.replaceNode(t.sourceFile, c, m, g), i.writeFixes(e); + } + function rCe(e, t, n) { + const i = y2(t.sourceFile, t.program, t.preferences, t.host), s = tf(t.sourceFile, t.preferences), o = pa(t.program.getCompilerOptions()), c = t.program.getTypeChecker(), _ = gr(n.properties, (m) => { + const g = oH(t, c, i, s, c.getTypeOfSymbol(m), n.parentDeclaration); + return N.createPropertyAssignment(hHe(m, o, s, c), g); + }), u = { + leadingTriviaOption: sn.LeadingTriviaOption.Exclude, + trailingTriviaOption: sn.TrailingTriviaOption.Exclude, + indentation: n.indentation + }; + e.replaceNode(t.sourceFile, n.parentDeclaration, N.createObjectLiteralExpression( + [...n.parentDeclaration.properties, ..._], + /*multiLine*/ + !0 + ), u), i.writeFixes(e); + } + function oH(e, t, n, i, s, o) { + if (s.flags & 3) + return vk(); + if (s.flags & 134217732) + return N.createStringLiteral( + "", + /* isSingleQuote */ + i === 0 + /* Single */ + ); + if (s.flags & 8) + return N.createNumericLiteral(0); + if (s.flags & 64) + return N.createBigIntLiteral("0n"); + if (s.flags & 16) + return N.createFalse(); + if (s.flags & 1056) { + const c = s.symbol.exports ? pP(s.symbol.exports.values()) : s.symbol, _ = s.symbol.parent && s.symbol.parent.flags & 256 ? s.symbol.parent : s.symbol, u = t.symbolToExpression( + _, + 111551, + /*enclosingDeclaration*/ + void 0, + /*flags*/ + 64 + /* UseFullyQualifiedType */ + ); + return c === void 0 || u === void 0 ? N.createNumericLiteral(0) : N.createPropertyAccessExpression(u, t.symbolToString(c)); + } + if (s.flags & 256) + return N.createNumericLiteral(s.value); + if (s.flags & 2048) + return N.createBigIntLiteral(s.value); + if (s.flags & 128) + return N.createStringLiteral( + s.value, + /* isSingleQuote */ + i === 0 + /* Single */ + ); + if (s.flags & 512) + return s === t.getFalseType() || s === t.getFalseType( + /*fresh*/ + !0 + ) ? N.createFalse() : N.createTrue(); + if (s.flags & 65536) + return N.createNull(); + if (s.flags & 1048576) + return Dc(s.types, (_) => oH(e, t, n, i, _, o)) ?? vk(); + if (t.isArrayLikeType(s)) + return N.createArrayLiteralExpression(); + if (dHe(s)) { + const c = gr(t.getPropertiesOfType(s), (_) => { + const u = oH(e, t, n, i, t.getTypeOfSymbol(_), o); + return N.createPropertyAssignment(_.name, u); + }); + return N.createObjectLiteralExpression( + c, + /*multiLine*/ + !0 + ); + } + if (Cn(s) & 16) { + if (Pn(s.symbol.declarations || He, U_(ng, pm, fc)) === void 0) return vk(); + const _ = t.getSignaturesOfType( + s, + 0 + /* Call */ + ); + return _ === void 0 ? vk() : gH( + 218, + e, + i, + _[0], + pL(p.Function_not_implemented.message, i), + /*name*/ + void 0, + /*modifiers*/ + void 0, + /*optional*/ + void 0, + /*enclosingDeclaration*/ + o, + n + ) ?? vk(); + } + if (Cn(s) & 1) { + const c = Fh(s.symbol); + if (c === void 0 || Wb(c)) return vk(); + const _ = Ug(c); + return _ && Ir(_.parameters) ? vk() : N.createNewExpression( + N.createIdentifier(s.symbol.name), + /*typeArguments*/ + void 0, + /*argumentsArray*/ + void 0 + ); + } + return vk(); + } + function vk() { + return N.createIdentifier("undefined"); + } + function dHe(e) { + return e.flags & 524288 && (Cn(e) & 128 || e.symbol && jn(Hm(e.symbol.declarations), Qu)); + } + function mHe(e, t, n) { + const i = e.getContextualType(n.attributes); + if (i === void 0) return He; + const s = i.getProperties(); + if (!Ir(s)) return He; + const o = /* @__PURE__ */ new Set(); + for (const c of n.attributes.properties) + if (hm(c) && o.add(_D(c.name)), $x(c)) { + const _ = e.getTypeAtLocation(c.expression); + for (const u of _.getProperties()) + o.add(u.escapedName); + } + return kn(s, (c) => E_( + c.name, + t, + 1 + /* JSX */ + ) && !(c.flags & 16777216 || rc(c) & 48 || o.has(c.escapedName))); + } + function gHe(e, t) { + if (Qu(e)) + return; + const n = ur(t, (i) => fc(i) || Go(i)); + return n && n.parent === e ? n : void 0; + } + function hHe(e, t, n, i) { + if (Rg(e)) { + const s = i.symbolToNode( + e, + 111551, + /*enclosingDeclaration*/ + void 0, + /*flags*/ + void 0, + 1 + /* WriteComputedProps */ + ); + if (s && fa(s)) return s; + } + return G5( + e.name, + t, + n === 0, + /*stringNamed*/ + !1, + /*isMethod*/ + !1 + ); + } + function nCe(e) { + if (ur(e, n6)) { + const t = ur(e.parent, Rp); + if (t) return t; + } + return Cr(e); + } + var nle = "addMissingNewOperator", iCe = [p.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new.code]; + Qs({ + errorCodes: iCe, + getCodeActions(e) { + const { sourceFile: t, span: n } = e, i = sn.ChangeTracker.with(e, (s) => sCe(s, t, n)); + return [Os(nle, i, p.Add_missing_new_operator_to_call, nle, p.Add_missing_new_operator_to_all_calls)]; + }, + fixIds: [nle], + getAllCodeActions: (e) => Ga(e, iCe, (t, n) => sCe(t, e.sourceFile, n)) + }); + function sCe(e, t, n) { + const i = Ws(yHe(t, n), Fs), s = N.createNewExpression(i.expression, i.typeArguments, i.arguments); + e.replaceNode(t, i, s); + } + function yHe(e, t) { + let n = Si(e, t.start); + const i = Yo(t); + for (; n.end < i; ) + n = n.parent; + return n; + } + var cH = "addMissingParam", lH = "addOptionalParam", aCe = [p.Expected_0_arguments_but_got_1.code]; + Qs({ + errorCodes: aCe, + fixIds: [cH, lH], + getCodeActions(e) { + const t = oCe(e.sourceFile, e.program, e.span.start); + if (t === void 0) return; + const { name: n, declarations: i, newParameters: s, newOptionalParameters: o } = t, c = []; + return Ir(s) && Pr( + c, + Os( + cH, + sn.ChangeTracker.with(e, (_) => uH(_, e.program, e.preferences, e.host, i, s)), + [Ir(s) > 1 ? p.Add_missing_parameters_to_0 : p.Add_missing_parameter_to_0, n], + cH, + p.Add_all_missing_parameters + ) + ), Ir(o) && Pr( + c, + Os( + lH, + sn.ChangeTracker.with(e, (_) => uH(_, e.program, e.preferences, e.host, i, o)), + [Ir(o) > 1 ? p.Add_optional_parameters_to_0 : p.Add_optional_parameter_to_0, n], + lH, + p.Add_all_optional_parameters + ) + ), c; + }, + getAllCodeActions: (e) => Ga(e, aCe, (t, n) => { + const i = oCe(e.sourceFile, e.program, n.start); + if (i) { + const { declarations: s, newParameters: o, newOptionalParameters: c } = i; + e.fixId === cH && uH(t, e.program, e.preferences, e.host, s, o), e.fixId === lH && uH(t, e.program, e.preferences, e.host, s, c); + } + }) + }); + function oCe(e, t, n) { + const i = Si(e, n), s = ur(i, Fs); + if (s === void 0 || Ir(s.arguments) === 0) + return; + const o = t.getTypeChecker(), c = o.getTypeAtLocation(s.expression), _ = kn(c.symbol.declarations, cCe); + if (_ === void 0) + return; + const u = Co(_); + if (u === void 0 || u.body === void 0 || J6(t, u.getSourceFile())) + return; + const m = vHe(u); + if (m === void 0) + return; + const g = [], h = [], S = Ir(u.parameters), T = Ir(s.arguments); + if (S > T) + return; + const C = [u, ...SHe(u, _)]; + for (let D = 0, w = 0, A = 0; D < T; D++) { + const O = s.arguments[D], F = vo(O) ? cJ(O) : O, R = o.getWidenedType(o.getBaseTypeOfLiteralType(o.getTypeAtLocation(O))), W = w < S ? u.parameters[w] : void 0; + if (W && o.isTypeAssignableTo(R, o.getTypeAtLocation(W))) { + w++; + continue; + } + const V = F && Me(F) ? F.text : `p${A++}`, $ = bHe(o, R, u); + Pr(g, { + pos: D, + declaration: uCe( + V, + $, + /*questionToken*/ + void 0 + ) + }), !xHe(C, w) && Pr(h, { + pos: D, + declaration: uCe(V, $, N.createToken( + 58 + /* QuestionToken */ + )) + }); + } + return { + newParameters: g, + newOptionalParameters: h, + name: co(m), + declarations: C + }; + } + function vHe(e) { + const t = is(e); + if (t) + return t; + if (Kn(e.parent) && Me(e.parent.name) || ss(e.parent) || Ii(e.parent)) + return e.parent.name; + } + function bHe(e, t, n) { + return e.typeToTypeNode( + e.getWidenedType(t), + n, + 1, + 8 + /* AllowUnresolvedNames */ + ) ?? N.createKeywordTypeNode( + 159 + /* UnknownKeyword */ + ); + } + function uH(e, t, n, i, s, o) { + const c = pa(t.getCompilerOptions()); + lr(s, (_) => { + const u = Cr(_), m = y2(u, t, n, i); + Ir(_.parameters) ? e.replaceNodeRangeWithNodes( + u, + ya(_.parameters), + _a(_.parameters), + lCe(m, c, _, o), + { + joiner: ", ", + indentation: 0, + leadingTriviaOption: sn.LeadingTriviaOption.IncludeAll, + trailingTriviaOption: sn.TrailingTriviaOption.Include + } + ) : lr(lCe(m, c, _, o), (g, h) => { + Ir(_.parameters) === 0 && h === 0 ? e.insertNodeAt(u, _.parameters.end, g) : e.insertNodeAtEndOfList(u, _.parameters, g); + }), m.writeFixes(e); + }); + } + function cCe(e) { + switch (e.kind) { + case 262: + case 218: + case 174: + case 219: + return !0; + default: + return !1; + } + } + function lCe(e, t, n, i) { + const s = gr(n.parameters, (o) => N.createParameterDeclaration( + o.modifiers, + o.dotDotDotToken, + o.name, + o.questionToken, + o.type, + o.initializer + )); + for (const { pos: o, declaration: c } of i) { + const _ = o > 0 ? s[o - 1] : void 0; + s.splice( + o, + 0, + N.updateParameterDeclaration( + c, + c.modifiers, + c.dotDotDotToken, + c.name, + _ && _.questionToken ? N.createToken( + 58 + /* QuestionToken */ + ) : c.questionToken, + kHe(e, c.type, t), + c.initializer + ) + ); + } + return s; + } + function SHe(e, t) { + const n = []; + for (const i of t) + if (THe(i)) { + if (Ir(i.parameters) === Ir(e.parameters)) { + n.push(i); + continue; + } + if (Ir(i.parameters) > Ir(e.parameters)) + return []; + } + return n; + } + function THe(e) { + return cCe(e) && e.body === void 0; + } + function uCe(e, t, n) { + return N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + e, + n, + t, + /*initializer*/ + void 0 + ); + } + function xHe(e, t) { + return Ir(e) && at(e, (n) => t < Ir(n.parameters) && !!n.parameters[t] && n.parameters[t].questionToken === void 0); + } + function kHe(e, t, n) { + const i = v2(t, n); + return i ? (ZS(e, i.symbols), i.typeNode) : t; + } + var CHe = "fixCannotFindModule", ile = "installTypesPackage", _Ce = p.Cannot_find_module_0_or_its_corresponding_type_declarations.code, fCe = p.This_JSX_tag_requires_the_module_path_0_to_exist_but_none_could_be_found_Make_sure_you_have_types_for_the_appropriate_package_installed.code, pCe = [ + _Ce, + p.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type.code, + fCe + ]; + Qs({ + errorCodes: pCe, + getCodeActions: function(t) { + const { host: n, sourceFile: i, span: { start: s }, errorCode: o } = t, c = o === fCe ? Q3(t.program.getCompilerOptions(), i) : mCe(i, s); + if (c === void 0) return; + const _ = gCe(c, n, o); + return _ === void 0 ? [] : [Os( + CHe, + /*changes*/ + [], + [p.Install_0, _], + ile, + p.Install_all_missing_types_packages, + dCe(i.fileName, _) + )]; + }, + fixIds: [ile], + getAllCodeActions: (e) => Ga(e, pCe, (t, n, i) => { + const s = mCe(n.file, n.start); + if (s !== void 0) + switch (e.fixId) { + case ile: { + const o = gCe(s, e.host, n.code); + o && i.push(dCe(n.file.fileName, o)); + break; + } + default: + E.fail(`Bad fixId: ${e.fixId}`); + } + }) + }); + function dCe(e, t) { + return { type: "install package", file: e, packageName: t }; + } + function mCe(e, t) { + const n = jn(Si(e, t), ea); + if (!n) return; + const i = n.text, { packageName: s } = nO(i); + return vl(s) ? void 0 : s; + } + function gCe(e, t, n) { + var i; + return n === _Ce ? QC.has(e) ? "@types/node" : void 0 : (i = t.isKnownTypesPackageName) != null && i.call(t, e) ? sO(e) : void 0; + } + var hCe = [ + p.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2.code, + p.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2.code, + p.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more.code, + p.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1.code, + p.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1.code, + p.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more.code + ], sle = "fixClassDoesntImplementInheritedAbstractMember"; + Qs({ + errorCodes: hCe, + getCodeActions: function(t) { + const { sourceFile: n, span: i } = t, s = sn.ChangeTracker.with(t, (o) => vCe(yCe(n, i.start), n, t, o, t.preferences)); + return s.length === 0 ? void 0 : [Os(sle, s, p.Implement_inherited_abstract_class, sle, p.Implement_all_inherited_abstract_classes)]; + }, + fixIds: [sle], + getAllCodeActions: function(t) { + const n = /* @__PURE__ */ new Set(); + return Ga(t, hCe, (i, s) => { + const o = yCe(s.file, s.start); + Lp(n, Aa(o)) && vCe(o, t.sourceFile, t, i, t.preferences); + }); + } + }); + function yCe(e, t) { + const n = Si(e, t); + return Ws(n.parent, Zn); + } + function vCe(e, t, n, i, s) { + const o = sm(e), c = n.program.getTypeChecker(), _ = c.getTypeAtLocation(o), u = c.getPropertiesOfType(_).filter(EHe), m = y2(t, n.program, s, n.host); + Ale(e, u, t, n, s, m, (g) => i.insertMemberAtStart(t, e, g)), m.writeFixes(i); + } + function EHe(e) { + const t = w0(ya(e.getDeclarations())); + return !(t & 2) && !!(t & 64); + } + var ale = "classSuperMustPrecedeThisAccess", bCe = [p.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class.code]; + Qs({ + errorCodes: bCe, + getCodeActions(e) { + const { sourceFile: t, span: n } = e, i = TCe(t, n.start); + if (!i) return; + const { constructor: s, superCall: o } = i, c = sn.ChangeTracker.with(e, (_) => SCe(_, t, s, o)); + return [Os(ale, c, p.Make_super_call_the_first_statement_in_the_constructor, ale, p.Make_all_super_calls_the_first_statement_in_their_constructor)]; + }, + fixIds: [ale], + getAllCodeActions(e) { + const { sourceFile: t } = e, n = /* @__PURE__ */ new Set(); + return Ga(e, bCe, (i, s) => { + const o = TCe(s.file, s.start); + if (!o) return; + const { constructor: c, superCall: _ } = o; + Lp(n, Aa(c.parent)) && SCe(i, t, c, _); + }); + } + }); + function SCe(e, t, n, i) { + e.insertNodeAtConstructorStart(t, n, i), e.delete(t, i); + } + function TCe(e, t) { + const n = Si(e, t); + if (n.kind !== 110) return; + const i = ff(n), s = xCe(i.body); + return s && !s.expression.arguments.some((o) => Tn(o) && o.expression === n) ? { constructor: i, superCall: s } : void 0; + } + function xCe(e) { + return El(e) && mS(e.expression) ? e : vs(e) ? void 0 : ms(e, xCe); + } + var ole = "constructorForDerivedNeedSuperCall", kCe = [p.Constructors_for_derived_classes_must_contain_a_super_call.code]; + Qs({ + errorCodes: kCe, + getCodeActions(e) { + const { sourceFile: t, span: n } = e, i = CCe(t, n.start), s = sn.ChangeTracker.with(e, (o) => ECe(o, t, i)); + return [Os(ole, s, p.Add_missing_super_call, ole, p.Add_all_missing_super_calls)]; + }, + fixIds: [ole], + getAllCodeActions: (e) => Ga(e, kCe, (t, n) => ECe(t, e.sourceFile, CCe(n.file, n.start))) + }); + function CCe(e, t) { + const n = Si(e, t); + return E.assert(Go(n.parent), "token should be at the constructor declaration"), n.parent; + } + function ECe(e, t, n) { + const i = N.createExpressionStatement(N.createCallExpression( + N.createSuper(), + /*typeArguments*/ + void 0, + /*argumentsArray*/ + He + )); + e.insertNodeAtConstructorStart(t, n, i); + } + var DCe = "fixEnableJsxFlag", wCe = [p.Cannot_use_JSX_unless_the_jsx_flag_is_provided.code]; + Qs({ + errorCodes: wCe, + getCodeActions: function(t) { + const { configFile: n } = t.program.getCompilerOptions(); + if (n === void 0) + return; + const i = sn.ChangeTracker.with(t, (s) => PCe(s, n)); + return [ + Od(DCe, i, p.Enable_the_jsx_flag_in_your_configuration_file) + ]; + }, + fixIds: [DCe], + getAllCodeActions: (e) => Ga(e, wCe, (t) => { + const { configFile: n } = e.program.getCompilerOptions(); + n !== void 0 && PCe(t, n); + }) + }); + function PCe(e, t) { + Rle(e, t, "jsx", N.createStringLiteral("react")); + } + var cle = "fixNaNEquality", NCe = [ + p.This_condition_will_always_return_0.code + ]; + Qs({ + errorCodes: NCe, + getCodeActions(e) { + const { sourceFile: t, span: n, program: i } = e, s = ACe(i, t, n); + if (s === void 0) return; + const { suggestion: o, expression: c, arg: _ } = s, u = sn.ChangeTracker.with(e, (m) => ICe(m, t, _, c)); + return [Os(cle, u, [p.Use_0, o], cle, p.Use_Number_isNaN_in_all_conditions)]; + }, + fixIds: [cle], + getAllCodeActions: (e) => Ga(e, NCe, (t, n) => { + const i = ACe(e.program, n.file, ql(n.start, n.length)); + i && ICe(t, n.file, i.arg, i.expression); + }) + }); + function ACe(e, t, n) { + const i = Pn(e.getSemanticDiagnostics(t), (c) => c.start === n.start && c.length === n.length); + if (i === void 0 || i.relatedInformation === void 0) return; + const s = Pn(i.relatedInformation, (c) => c.code === p.Did_you_mean_0.code); + if (s === void 0 || s.file === void 0 || s.start === void 0 || s.length === void 0) return; + const o = Ble(s.file, ql(s.start, s.length)); + if (o !== void 0 && ct(o) && fn(o.parent)) + return { suggestion: DHe(s.messageText), expression: o.parent, arg: o }; + } + function ICe(e, t, n, i) { + const s = N.createCallExpression( + N.createPropertyAccessExpression(N.createIdentifier("Number"), N.createIdentifier("isNaN")), + /*typeArguments*/ + void 0, + [n] + ), o = i.operatorToken.kind; + e.replaceNode( + t, + i, + o === 38 || o === 36 ? N.createPrefixUnaryExpression(54, s) : s + ); + } + function DHe(e) { + const [, t] = vm(e, ` +`, 0).match(/'(.*)'/) || []; + return t; + } + Qs({ + errorCodes: [ + p.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code, + p.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code, + p.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code + ], + getCodeActions: function(t) { + const n = t.program.getCompilerOptions(), { configFile: i } = n; + if (i === void 0) + return; + const s = [], o = Ru(n); + if (o >= 5 && o < 99) { + const m = sn.ChangeTracker.with(t, (g) => { + Rle(g, i, "module", N.createStringLiteral("esnext")); + }); + s.push(Od("fixModuleOption", m, [p.Set_the_module_option_in_your_configuration_file_to_0, "esnext"])); + } + const _ = pa(n); + if (_ < 4 || _ > 99) { + const m = sn.ChangeTracker.with(t, (g) => { + if (!P4(i)) return; + const S = [["target", N.createStringLiteral("es2017")]]; + o === 1 && S.push(["module", N.createStringLiteral("commonjs")]), Mle(g, i, S); + }); + s.push(Od("fixTargetOption", m, [p.Set_the_target_option_in_your_configuration_file_to_0, "es2017"])); + } + return s.length ? s : void 0; + } + }); + var lle = "fixPropertyAssignment", FCe = [ + p.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code + ]; + Qs({ + errorCodes: FCe, + fixIds: [lle], + getCodeActions(e) { + const { sourceFile: t, span: n } = e, i = LCe(t, n.start), s = sn.ChangeTracker.with(e, (o) => OCe(o, e.sourceFile, i)); + return [Os(lle, s, [p.Change_0_to_1, "=", ":"], lle, [p.Switch_each_misused_0_to_1, "=", ":"])]; + }, + getAllCodeActions: (e) => Ga(e, FCe, (t, n) => OCe(t, n.file, LCe(n.file, n.start))) + }); + function OCe(e, t, n) { + e.replaceNode(t, n, N.createPropertyAssignment(n.name, n.objectAssignmentInitializer)); + } + function LCe(e, t) { + return Ws(Si(e, t).parent, _u); + } + var ule = "extendsInterfaceBecomesImplements", MCe = [p.Cannot_extend_an_interface_0_Did_you_mean_implements.code]; + Qs({ + errorCodes: MCe, + getCodeActions(e) { + const { sourceFile: t } = e, n = RCe(t, e.span.start); + if (!n) return; + const { extendsToken: i, heritageClauses: s } = n, o = sn.ChangeTracker.with(e, (c) => jCe(c, t, i, s)); + return [Os(ule, o, p.Change_extends_to_implements, ule, p.Change_all_extended_interfaces_to_implements)]; + }, + fixIds: [ule], + getAllCodeActions: (e) => Ga(e, MCe, (t, n) => { + const i = RCe(n.file, n.start); + i && jCe(t, n.file, i.extendsToken, i.heritageClauses); + }) + }); + function RCe(e, t) { + const n = Si(e, t), i = Al(n).heritageClauses, s = i[0].getFirstToken(); + return s.kind === 96 ? { extendsToken: s, heritageClauses: i } : void 0; + } + function jCe(e, t, n, i) { + if (e.replaceNode(t, n, N.createToken( + 119 + /* ImplementsKeyword */ + )), i.length === 2 && i[0].token === 96 && i[1].token === 119) { + const s = i[1].getFirstToken(), o = s.getFullStart(); + e.replaceRange(t, { pos: o, end: o }, N.createToken( + 28 + /* CommaToken */ + )); + const c = t.text; + let _ = s.end; + for (; _ < c.length && em(c.charCodeAt(_)); ) + _++; + e.deleteRange(t, { pos: s.getStart(), end: _ }); + } + } + var _le = "forgottenThisPropertyAccess", BCe = p.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code, JCe = [ + p.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code, + p.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression.code, + BCe + ]; + Qs({ + errorCodes: JCe, + getCodeActions(e) { + const { sourceFile: t } = e, n = zCe(t, e.span.start, e.errorCode); + if (!n) + return; + const i = sn.ChangeTracker.with(e, (s) => WCe(s, t, n)); + return [Os(_le, i, [p.Add_0_to_unresolved_variable, n.className || "this"], _le, p.Add_qualifier_to_all_unresolved_variables_matching_a_member_name)]; + }, + fixIds: [_le], + getAllCodeActions: (e) => Ga(e, JCe, (t, n) => { + const i = zCe(n.file, n.start, n.code); + i && WCe(t, e.sourceFile, i); + }) + }); + function zCe(e, t, n) { + const i = Si(e, t); + if (Me(i) || Ni(i)) + return { node: i, className: n === BCe ? Al(i).name.text : void 0 }; + } + function WCe(e, t, { node: n, className: i }) { + nf(n), e.replaceNode(t, n, N.createPropertyAccessExpression(i ? N.createIdentifier(i) : N.createThis(), n)); + } + var fle = "fixInvalidJsxCharacters_expression", _H = "fixInvalidJsxCharacters_htmlEntity", UCe = [ + p.Unexpected_token_Did_you_mean_or_gt.code, + p.Unexpected_token_Did_you_mean_or_rbrace.code + ]; + Qs({ + errorCodes: UCe, + fixIds: [fle, _H], + getCodeActions(e) { + const { sourceFile: t, preferences: n, span: i } = e, s = sn.ChangeTracker.with(e, (c) => ple( + c, + n, + t, + i.start, + /*useHtmlEntity*/ + !1 + )), o = sn.ChangeTracker.with(e, (c) => ple( + c, + n, + t, + i.start, + /*useHtmlEntity*/ + !0 + )); + return [ + Os(fle, s, p.Wrap_invalid_character_in_an_expression_container, fle, p.Wrap_all_invalid_characters_in_an_expression_container), + Os(_H, o, p.Convert_invalid_character_to_its_html_entity_code, _H, p.Convert_all_invalid_characters_to_HTML_entity_code) + ]; + }, + getAllCodeActions(e) { + return Ga(e, UCe, (t, n) => ple(t, e.preferences, n.file, n.start, e.fixId === _H)); + } + }); + var VCe = { + ">": ">", + "}": "}" + }; + function wHe(e) { + return ro(VCe, e); + } + function ple(e, t, n, i, s) { + const o = n.getText()[i]; + if (!wHe(o)) + return; + const c = s ? VCe[o] : `{${pw(n, t, o)}}`; + e.replaceRangeWithText(n, { pos: i, end: i + 1 }, c); + } + var fH = "deleteUnmatchedParameter", qCe = "renameUnmatchedParameter", HCe = [ + p.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name.code + ]; + Qs({ + fixIds: [fH, qCe], + errorCodes: HCe, + getCodeActions: function(t) { + const { sourceFile: n, span: i } = t, s = [], o = GCe(n, i.start); + if (o) + return Pr(s, PHe(t, o)), Pr(s, NHe(t, o)), s; + }, + getAllCodeActions: function(t) { + const n = /* @__PURE__ */ new Map(); + return gk(sn.ChangeTracker.with(t, (i) => { + hk(t, HCe, ({ file: s, start: o }) => { + const c = GCe(s, o); + c && n.set(c.signature, Pr(n.get(c.signature), c.jsDocParameterTag)); + }), n.forEach((s, o) => { + if (t.fixId === fH) { + const c = new Set(s); + i.filterJSDocTags(o.getSourceFile(), o, (_) => !c.has(_)); + } + }); + })); + } + }); + function PHe(e, { name: t, jsDocHost: n, jsDocParameterTag: i }) { + const s = sn.ChangeTracker.with(e, (o) => o.filterJSDocTags(e.sourceFile, n, (c) => c !== i)); + return Os( + fH, + s, + [p.Delete_unused_param_tag_0, t.getText(e.sourceFile)], + fH, + p.Delete_all_unused_param_tags + ); + } + function NHe(e, { name: t, jsDocHost: n, signature: i, jsDocParameterTag: s }) { + if (!Ir(i.parameters)) return; + const o = e.sourceFile, c = Z1(i), _ = /* @__PURE__ */ new Set(); + for (const h of c) + Af(h) && Me(h.name) && _.add(h.name.escapedText); + const u = Dc(i.parameters, (h) => Me(h.name) && !_.has(h.name.escapedText) ? h.name.getText(o) : void 0); + if (u === void 0) return; + const m = N.updateJSDocParameterTag( + s, + s.tagName, + N.createIdentifier(u), + s.isBracketed, + s.typeExpression, + s.isNameFirst, + s.comment + ), g = sn.ChangeTracker.with(e, (h) => h.replaceJSDocComment(o, n, gr(c, (S) => S === s ? m : S))); + return Od(qCe, g, [p.Rename_param_tag_name_0_to_1, t.getText(o), u]); + } + function GCe(e, t) { + const n = Si(e, t); + if (n.parent && Af(n.parent) && Me(n.parent.name)) { + const i = n.parent, s = Ob(i), o = nv(i); + if (s && o) + return { jsDocHost: s, signature: o, name: n.parent.name, jsDocParameterTag: i }; + } + } + var dle = "fixUnreferenceableDecoratorMetadata", AHe = [p.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled.code]; + Qs({ + errorCodes: AHe, + getCodeActions: (e) => { + const t = IHe(e.sourceFile, e.program, e.span.start); + if (!t) return; + const n = sn.ChangeTracker.with(e, (o) => t.kind === 276 && OHe(o, e.sourceFile, t, e.program)), i = sn.ChangeTracker.with(e, (o) => FHe(o, e.sourceFile, t, e.program)); + let s; + return n.length && (s = Pr(s, Od(dle, n, p.Convert_named_imports_to_namespace_import))), i.length && (s = Pr(s, Od(dle, i, p.Use_import_type))), s; + }, + fixIds: [dle] + }); + function IHe(e, t, n) { + const i = jn(Si(e, n), Me); + if (!i || i.parent.kind !== 183) return; + const o = t.getTypeChecker().getSymbolAtLocation(i); + return Pn(o?.declarations || He, U_(id, ju, _l)); + } + function FHe(e, t, n, i) { + if (n.kind === 271) { + e.insertModifierBefore(t, 156, n.name); + return; + } + const s = n.kind === 273 ? n : n.parent.parent; + if (s.name && s.namedBindings) + return; + const o = i.getTypeChecker(); + gK(s, (_) => { + if (Gl(_.symbol, o).flags & 111551) return !0; + }) || e.insertModifierBefore(t, 156, s); + } + function OHe(e, t, n, i) { + dk.doChangeNamedToNamespaceOrDefault(t, i, e, n.parent); + } + var fL = "unusedIdentifier", mle = "unusedIdentifier_prefix", gle = "unusedIdentifier_delete", pH = "unusedIdentifier_deleteImports", hle = "unusedIdentifier_infer", $Ce = [ + p._0_is_declared_but_its_value_is_never_read.code, + p._0_is_declared_but_never_used.code, + p.Property_0_is_declared_but_its_value_is_never_read.code, + p.All_imports_in_import_declaration_are_unused.code, + p.All_destructured_elements_are_unused.code, + p.All_variables_are_unused.code, + p.All_type_parameters_are_unused.code + ]; + Qs({ + errorCodes: $Ce, + getCodeActions(e) { + const { errorCode: t, sourceFile: n, program: i, cancellationToken: s } = e, o = i.getTypeChecker(), c = i.getSourceFiles(), _ = Si(n, e.span.start); + if (Bp(_)) + return [xw(sn.ChangeTracker.with(e, (h) => h.delete(n, _)), p.Remove_template_tag)]; + if (_.kind === 30) { + const h = sn.ChangeTracker.with(e, (S) => QCe(S, n, _)); + return [xw(h, p.Remove_type_parameters)]; + } + const u = YCe(_); + if (u) { + const h = sn.ChangeTracker.with(e, (S) => S.delete(n, u)); + return [Os(fL, h, [p.Remove_import_from_0, tee(u)], pH, p.Delete_all_unused_imports)]; + } else if (yle(_)) { + const h = sn.ChangeTracker.with(e, (S) => dH( + n, + _, + S, + o, + c, + i, + s, + /*isFixAll*/ + !1 + )); + if (h.length) + return [Os(fL, h, [p.Remove_unused_declaration_for_Colon_0, _.getText(n)], pH, p.Delete_all_unused_imports)]; + } + if (Nf(_.parent) || R0(_.parent)) { + if (Ii(_.parent.parent)) { + const h = _.parent.elements, S = [ + h.length > 1 ? p.Remove_unused_declarations_for_Colon_0 : p.Remove_unused_declaration_for_Colon_0, + gr(h, (T) => T.getText(n)).join(", ") + ]; + return [ + xw(sn.ChangeTracker.with(e, (T) => LHe(T, n, _.parent)), S) + ]; + } + return [ + xw(sn.ChangeTracker.with(e, (h) => MHe(e, h, n, _.parent)), p.Remove_unused_destructuring_declaration) + ]; + } + if (ZCe(n, _)) + return [ + xw(sn.ChangeTracker.with(e, (h) => KCe(h, n, _.parent)), p.Remove_variable_statement) + ]; + if (Me(_) && Tc(_.parent)) + return [xw(sn.ChangeTracker.with(e, (h) => UHe(h, n, _.parent)), [p.Remove_unused_declaration_for_Colon_0, _.getText(n)])]; + const m = []; + if (_.kind === 140) { + const h = sn.ChangeTracker.with(e, (T) => XCe(T, n, _)), S = Ws(_.parent, AS).typeParameter.name.text; + m.push(Os(fL, h, [p.Replace_infer_0_with_unknown, S], hle, p.Replace_all_unused_infer_with_unknown)); + } else { + const h = sn.ChangeTracker.with(e, (S) => dH( + n, + _, + S, + o, + c, + i, + s, + /*isFixAll*/ + !1 + )); + if (h.length) { + const S = fa(_.parent) ? _.parent : _; + m.push(xw(h, [p.Remove_unused_declaration_for_Colon_0, S.getText(n)])); + } + } + const g = sn.ChangeTracker.with(e, (h) => e6e(h, t, n, _)); + return g.length && m.push(Os(fL, g, [p.Prefix_0_with_an_underscore, _.getText(n)], mle, p.Prefix_all_unused_declarations_with_where_possible)), m; + }, + fixIds: [mle, gle, pH, hle], + getAllCodeActions: (e) => { + const { sourceFile: t, program: n, cancellationToken: i } = e, s = n.getTypeChecker(), o = n.getSourceFiles(); + return Ga(e, $Ce, (c, _) => { + const u = Si(t, _.start); + switch (e.fixId) { + case mle: + e6e(c, _.code, t, u); + break; + case pH: { + const m = YCe(u); + m ? c.delete(t, m) : yle(u) && dH( + t, + u, + c, + s, + o, + n, + i, + /*isFixAll*/ + !0 + ); + break; + } + case gle: { + if (u.kind === 140 || yle(u)) + break; + if (Bp(u)) + c.delete(t, u); + else if (u.kind === 30) + QCe(c, t, u); + else if (Nf(u.parent)) { + if (u.parent.parent.initializer) + break; + (!Ii(u.parent.parent) || t6e(u.parent.parent, s, o)) && c.delete(t, u.parent.parent); + } else { + if (R0(u.parent.parent) && u.parent.parent.parent.initializer) + break; + ZCe(t, u) ? KCe(c, t, u.parent) : dH( + t, + u, + c, + s, + o, + n, + i, + /*isFixAll*/ + !0 + ); + } + break; + } + case hle: + u.kind === 140 && XCe(c, t, u); + break; + default: + E.fail(JSON.stringify(e.fixId)); + } + }); + } + }); + function XCe(e, t, n) { + e.replaceNode(t, n.parent, N.createKeywordTypeNode( + 159 + /* UnknownKeyword */ + )); + } + function xw(e, t) { + return Os(fL, e, t, gle, p.Delete_all_unused_declarations); + } + function QCe(e, t, n) { + e.delete(t, E.checkDefined(Ws(n.parent, aB).typeParameters, "The type parameter to delete should exist")); + } + function yle(e) { + return e.kind === 102 || e.kind === 80 && (e.parent.kind === 276 || e.parent.kind === 273); + } + function YCe(e) { + return e.kind === 102 ? jn(e.parent, zo) : void 0; + } + function ZCe(e, t) { + return Il(t.parent) && ya(t.parent.getChildren(e)) === t; + } + function KCe(e, t, n) { + e.delete(t, n.parent.kind === 243 ? n.parent : n); + } + function LHe(e, t, n) { + lr(n.elements, (i) => e.delete(t, i)); + } + function MHe(e, t, n, { parent: i }) { + if (Kn(i) && i.initializer && Cb(i.initializer)) + if (Il(i.parent) && Ir(i.parent.declarations) > 1) { + const s = i.parent.parent, o = s.getStart(n), c = s.end; + t.delete(n, i), t.insertNodeAt(n, c, i.initializer, { + prefix: Jh(e.host, e.formatContext.options) + n.text.slice(E9(n.text, o - 1), o), + suffix: NA(n) ? ";" : "" + }); + } else + t.replaceNode(n, i.parent, i.initializer); + else + t.delete(n, i); + } + function e6e(e, t, n, i) { + t !== p.Property_0_is_declared_but_its_value_is_never_read.code && (i.kind === 140 && (i = Ws(i.parent, AS).typeParameter.name), Me(i) && RHe(i) && (e.replaceNode(n, i, N.createIdentifier(`_${i.text}`)), Ii(i.parent) && gC(i.parent).forEach((s) => { + Me(s.name) && e.replaceNode(n, s.name, N.createIdentifier(`_${s.name.text}`)); + }))); + } + function RHe(e) { + switch (e.parent.kind) { + case 169: + case 168: + return !0; + case 260: + switch (e.parent.parent.parent.kind) { + case 250: + case 249: + return !0; + } + } + return !1; + } + function dH(e, t, n, i, s, o, c, _) { + jHe(t, n, e, i, s, o, c, _), Me(t) && So.Core.eachSymbolReferenceInFile(t, i, e, (u) => { + Tn(u.parent) && u.parent.name === u && (u = u.parent), !_ && WHe(u) && n.delete(e, u.parent.parent); + }); + } + function jHe(e, t, n, i, s, o, c, _) { + const { parent: u } = e; + if (Ii(u)) + BHe(t, n, u, i, s, o, c, _); + else if (!(_ && Me(e) && So.Core.isSymbolReferencedInFile(e, i, n))) { + const m = id(u) ? e : fa(u) ? u.parent : u; + E.assert(m !== n, "should not delete whole source file"), t.delete(n, m); + } + } + function BHe(e, t, n, i, s, o, c, _ = !1) { + if (JHe(i, t, n, s, o, c, _)) + if (n.modifiers && n.modifiers.length > 0 && (!Me(n.name) || So.Core.isSymbolReferencedInFile(n.name, i, t))) + for (const u of n.modifiers) + ia(u) && e.deleteModifier(t, u); + else !n.initializer && t6e(n, i, s) && e.delete(t, n); + } + function t6e(e, t, n) { + const i = e.parent.parameters.indexOf(e); + return !So.Core.someSignatureUsage(e.parent, n, t, (s, o) => !o || o.arguments.length > i); + } + function JHe(e, t, n, i, s, o, c) { + const { parent: _ } = n; + switch (_.kind) { + case 174: + case 176: + const u = _.parameters.indexOf(n), m = fc(_) ? _.name : _, g = So.Core.getReferencedSymbolsForNode(_.pos, m, s, i, o); + if (g) { + for (const h of g) + for (const S of h.references) + if (S.kind === So.EntryKind.Node) { + const T = yD(S.node) && Fs(S.node.parent) && S.node.parent.arguments.length > u, C = Tn(S.node.parent) && yD(S.node.parent.expression) && Fs(S.node.parent.parent) && S.node.parent.parent.arguments.length > u, D = (fc(S.node.parent) || pm(S.node.parent)) && S.node.parent !== n.parent && S.node.parent.parameters.length > u; + if (T || C || D) return !1; + } + } + return !0; + case 262: + return _.name && zHe(e, t, _.name) ? r6e(_, n, c) : !0; + case 218: + case 219: + return r6e(_, n, c); + case 178: + return !1; + case 177: + return !0; + default: + return E.failBadSyntaxKind(_); + } + } + function zHe(e, t, n) { + return !!So.Core.eachSymbolReferenceInFile(n, e, t, (i) => Me(i) && Fs(i.parent) && i.parent.arguments.includes(i)); + } + function r6e(e, t, n) { + const i = e.parameters, s = i.indexOf(t); + return E.assert(s !== -1, "The parameter should already be in the list"), n ? i.slice(s + 1).every((o) => Me(o.name) && !o.symbol.isReferenced) : s === i.length - 1; + } + function WHe(e) { + return (fn(e.parent) && e.parent.left === e || (YJ(e.parent) || pv(e.parent)) && e.parent.operand === e) && El(e.parent.parent); + } + function UHe(e, t, n) { + const i = n.symbol.declarations; + if (i) + for (const s of i) + e.delete(t, s); + } + var vle = "fixUnreachableCode", n6e = [p.Unreachable_code_detected.code]; + Qs({ + errorCodes: n6e, + getCodeActions(e) { + if (e.program.getSyntacticDiagnostics(e.sourceFile, e.cancellationToken).length) return; + const n = sn.ChangeTracker.with(e, (i) => i6e(i, e.sourceFile, e.span.start, e.span.length, e.errorCode)); + return [Os(vle, n, p.Remove_unreachable_code, vle, p.Remove_all_unreachable_code)]; + }, + fixIds: [vle], + getAllCodeActions: (e) => Ga(e, n6e, (t, n) => i6e(t, n.file, n.start, n.length, n.code)) + }); + function i6e(e, t, n, i, s) { + const o = Si(t, n), c = ur(o, xi); + if (c.getStart(t) !== o.getStart(t)) { + const u = JSON.stringify({ + statementKind: E.formatSyntaxKind(c.kind), + tokenKind: E.formatSyntaxKind(o.kind), + errorCode: s, + start: n, + length: i + }); + E.fail("Token and statement should start at the same point. " + u); + } + const _ = (ks(c.parent) ? c.parent : c).parent; + if (!ks(c.parent) || c === ya(c.parent.statements)) + switch (_.kind) { + case 245: + if (_.elseStatement) { + if (ks(c.parent)) + break; + e.replaceNode(t, c, N.createBlock(He)); + return; + } + // falls through + case 247: + case 248: + e.delete(t, _); + return; + } + if (ks(c.parent)) { + const u = n + i, m = E.checkDefined(VHe(CJ(c.parent.statements, c), (g) => g.pos < u), "Some statement should be last"); + e.deleteNodeRange(t, c, m); + } else + e.delete(t, c); + } + function VHe(e, t) { + let n; + for (const i of e) { + if (!t(i)) break; + n = i; + } + return n; + } + var ble = "fixUnusedLabel", s6e = [p.Unused_label.code]; + Qs({ + errorCodes: s6e, + getCodeActions(e) { + const t = sn.ChangeTracker.with(e, (n) => a6e(n, e.sourceFile, e.span.start)); + return [Os(ble, t, p.Remove_unused_label, ble, p.Remove_all_unused_labels)]; + }, + fixIds: [ble], + getAllCodeActions: (e) => Ga(e, s6e, (t, n) => a6e(t, n.file, n.start)) + }); + function a6e(e, t, n) { + const i = Si(t, n), s = Ws(i.parent, i1), o = i.getStart(t), c = s.statement.getStart(t), _ = ip(o, c, t) ? c : aa( + t.text, + Xa(s, 59, t).end, + /*stopAfterLineBreak*/ + !0 + ); + e.deleteRange(t, { pos: o, end: _ }); + } + var o6e = "fixJSDocTypes_plain", Sle = "fixJSDocTypes_nullable", c6e = [ + p.JSDoc_types_can_only_be_used_inside_documentation_comments.code, + p._0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1.code, + p._0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1.code + ]; + Qs({ + errorCodes: c6e, + getCodeActions(e) { + const { sourceFile: t } = e, n = e.program.getTypeChecker(), i = u6e(t, e.span.start, n); + if (!i) return; + const { typeNode: s, type: o } = i, c = s.getText(t), _ = [u(o, o6e, p.Change_all_jsdoc_style_types_to_TypeScript)]; + return s.kind === 314 && _.push(u(o, Sle, p.Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types)), _; + function u(m, g, h) { + const S = sn.ChangeTracker.with(e, (T) => l6e(T, t, s, m, n)); + return Os("jdocTypes", S, [p.Change_0_to_1, c, n.typeToString(m)], g, h); + } + }, + fixIds: [o6e, Sle], + getAllCodeActions(e) { + const { fixId: t, program: n, sourceFile: i } = e, s = n.getTypeChecker(); + return Ga(e, c6e, (o, c) => { + const _ = u6e(c.file, c.start, s); + if (!_) return; + const { typeNode: u, type: m } = _, g = u.kind === 314 && t === Sle ? s.getNullableType( + m, + 32768 + /* Undefined */ + ) : m; + l6e(o, i, u, g, s); + }); + } + }); + function l6e(e, t, n, i, s) { + e.replaceNode(t, n, s.typeToTypeNode( + i, + /*enclosingDeclaration*/ + n, + /*flags*/ + void 0 + )); + } + function u6e(e, t, n) { + const i = ur(Si(e, t), qHe), s = i && i.type; + return s && { typeNode: s, type: HHe(n, s) }; + } + function qHe(e) { + switch (e.kind) { + case 234: + case 179: + case 180: + case 262: + case 177: + case 181: + case 200: + case 174: + case 173: + case 169: + case 172: + case 171: + case 178: + case 265: + case 216: + case 260: + return !0; + default: + return !1; + } + } + function HHe(e, t) { + if (s6(t)) { + const n = e.getTypeFromTypeNode(t.type); + return n === e.getNeverType() || n === e.getVoidType() ? n : e.getUnionType( + Pr([n, e.getUndefinedType()], t.postfix ? void 0 : e.getNullType()) + ); + } + return e.getTypeFromTypeNode(t); + } + var Tle = "fixMissingCallParentheses", _6e = [ + p.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead.code + ]; + Qs({ + errorCodes: _6e, + fixIds: [Tle], + getCodeActions(e) { + const { sourceFile: t, span: n } = e, i = p6e(t, n.start); + if (!i) return; + const s = sn.ChangeTracker.with(e, (o) => f6e(o, e.sourceFile, i)); + return [Os(Tle, s, p.Add_missing_call_parentheses, Tle, p.Add_all_missing_call_parentheses)]; + }, + getAllCodeActions: (e) => Ga(e, _6e, (t, n) => { + const i = p6e(n.file, n.start); + i && f6e(t, n.file, i); + }) + }); + function f6e(e, t, n) { + e.replaceNodeWithText(t, n, `${n.text}()`); + } + function p6e(e, t) { + const n = Si(e, t); + if (Tn(n.parent)) { + let i = n.parent; + for (; Tn(i.parent); ) + i = i.parent; + return i.name; + } + if (Me(n)) + return n; + } + var d6e = "fixMissingTypeAnnotationOnExports", xle = "add-annotation", kle = "add-type-assertion", GHe = "extract-expression", m6e = [ + p.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations.code, + p.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations.code, + p.At_least_one_accessor_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code, + p.Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code, + p.Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code, + p.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code, + p.Expression_type_can_t_be_inferred_with_isolatedDeclarations.code, + p.Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations.code, + p.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations.code, + p.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations.code, + p.Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations.code, + p.Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations.code, + p.Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations.code, + p.Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations.code, + p.Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations.code, + p.Default_exports_can_t_be_inferred_with_isolatedDeclarations.code, + p.Only_const_arrays_can_be_inferred_with_isolatedDeclarations.code, + p.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function.code, + p.Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_its_type_This_is_not_supported_with_isolatedDeclarations.code, + p.Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations.code, + p.Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit.code + ], $He = /* @__PURE__ */ new Set([ + 177, + 174, + 172, + 262, + 218, + 219, + 260, + 169, + 277, + 263, + 206, + 207 + /* ArrayBindingPattern */ + ]), g6e = 531469, h6e = 1; + Qs({ + errorCodes: m6e, + fixIds: [d6e], + getCodeActions(e) { + const t = []; + return kw(xle, t, e, 0, (n) => n.addTypeAnnotation(e.span)), kw(xle, t, e, 1, (n) => n.addTypeAnnotation(e.span)), kw(xle, t, e, 2, (n) => n.addTypeAnnotation(e.span)), kw(kle, t, e, 0, (n) => n.addInlineAssertion(e.span)), kw(kle, t, e, 1, (n) => n.addInlineAssertion(e.span)), kw(kle, t, e, 2, (n) => n.addInlineAssertion(e.span)), kw(GHe, t, e, 0, (n) => n.extractAsVariable(e.span)), t; + }, + getAllCodeActions: (e) => { + const t = y6e(e, 0, (n) => { + hk(e, m6e, (i) => { + n.addTypeAnnotation(i); + }); + }); + return gk(t.textChanges); + } + }); + function kw(e, t, n, i, s) { + const o = y6e(n, i, s); + o.result && o.textChanges.length && t.push(Os( + e, + o.textChanges, + o.result, + d6e, + p.Add_all_missing_type_annotations + )); + } + function y6e(e, t, n) { + const i = { typeNode: void 0, mutatedTarget: !1 }, s = sn.ChangeTracker.fromContext(e), o = e.sourceFile, c = e.program, _ = c.getTypeChecker(), u = pa(c.getCompilerOptions()), m = y2(e.sourceFile, e.program, e.preferences, e.host), g = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Set(), S = u1({ + preserveSourceNewlines: !1 + }), T = n({ addTypeAnnotation: C, addInlineAssertion: F, extractAsVariable: R }); + return m.writeFixes(s), { + result: T, + textChanges: s.getChanges() + }; + function C(he) { + e.cancellationToken.throwIfCancellationRequested(); + const ne = Si(o, he.start), Ae = W(ne); + if (Ae) + return Tc(Ae) ? D(Ae) : V(Ae); + const De = Oe(ne); + if (De) + return V(De); + } + function D(he) { + var ne; + if (h?.has(he)) return; + h?.add(he); + const Ae = _.getTypeAtLocation(he), De = _.getPropertiesOfType(Ae); + if (!he.name || De.length === 0) return; + const we = []; + for (const Lt of De) + E_(Lt.name, pa(c.getCompilerOptions())) && (Lt.valueDeclaration && Kn(Lt.valueDeclaration) || we.push(N.createVariableStatement( + [N.createModifier( + 95 + /* ExportKeyword */ + )], + N.createVariableDeclarationList( + [N.createVariableDeclaration( + Lt.name, + /*exclamationToken*/ + void 0, + oe(_.getTypeOfSymbol(Lt), he), + /*initializer*/ + void 0 + )] + ) + ))); + if (we.length === 0) return; + const Ue = []; + (ne = he.modifiers) != null && ne.some( + (Lt) => Lt.kind === 95 + /* ExportKeyword */ + ) && Ue.push(N.createModifier( + 95 + /* ExportKeyword */ + )), Ue.push(N.createModifier( + 138 + /* DeclareKeyword */ + )); + const bt = N.createModuleDeclaration( + Ue, + he.name, + N.createModuleBlock(we), + /*flags*/ + 101441696 + /* ContextFlags */ + ); + return s.insertNodeAfter(o, he, bt), [p.Annotate_types_of_properties_expando_function_in_a_namespace]; + } + function w(he) { + return !_o(he) && !Fs(he) && !oa(he) && !Ql(he); + } + function A(he, ne) { + return w(he) && (he = N.createParenthesizedExpression(he)), N.createAsExpression(he, ne); + } + function O(he, ne) { + return w(he) && (he = N.createParenthesizedExpression(he)), N.createAsExpression(N.createSatisfiesExpression(he, Wa(ne)), ne); + } + function F(he) { + e.cancellationToken.throwIfCancellationRequested(); + const ne = Si(o, he.start); + if (W(ne)) return; + const De = xe(ne, he); + if (!De || SS(De) || SS(De.parent)) return; + const we = ct(De), Ue = _u(De); + if (!Ue && bl(De) || ur(De, Ds) || ur(De, j0) || we && (ur(De, Z_) || ur(De, fi)) || lp(De)) + return; + const bt = ur(De, Kn), Lt = bt && _.getTypeAtLocation(bt); + if (Lt && Lt.flags & 8192 || !(we || Ue)) return; + const { typeNode: er, mutatedTarget: Nr } = ie(De, Lt); + if (!(!er || Nr)) + return Ue ? s.insertNodeAt( + o, + De.end, + A( + Wa(De.name), + er + ), + { + prefix: ": " + } + ) : we ? s.replaceNode( + o, + De, + O( + Wa(De), + er + ) + ) : E.assertNever(De), [p.Add_satisfies_and_an_inline_type_assertion_with_0, it(er)]; + } + function R(he) { + e.cancellationToken.throwIfCancellationRequested(); + const ne = Si(o, he.start), Ae = xe(ne, he); + if (!Ae || SS(Ae) || SS(Ae.parent) || !ct(Ae)) return; + if (Ql(Ae)) + return s.replaceNode( + o, + Ae, + A(Ae, N.createTypeReferenceNode("const")) + ), [p.Mark_array_literal_as_const]; + const we = ur(Ae, Xc); + if (we) { + if (we === Ae.parent && _o(Ae)) return; + const Ue = N.createUniqueName( + Coe(Ae, o, _, o), + 16 + /* Optimistic */ + ); + let bt = Ae, Lt = Ae; + if (lp(bt) && (bt = rd(bt.parent), Ce(bt.parent) ? Lt = bt = bt.parent : Lt = A( + bt, + N.createTypeReferenceNode("const") + )), _o(bt)) return; + const er = N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [ + N.createVariableDeclaration( + Ue, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Lt + ) + ], + 2 + /* Const */ + ) + ), Nr = ur(Ae, xi); + return s.insertNodeBefore(o, Nr, er), s.replaceNode( + o, + bt, + N.createAsExpression( + N.cloneNode(Ue), + N.createTypeQueryNode( + N.cloneNode(Ue) + ) + ) + ), [p.Extract_to_variable_and_replace_with_0_as_typeof_0, it(Ue)]; + } + } + function W(he) { + const ne = ur(he, (Ae) => xi(Ae) ? "quit" : Fx(Ae)); + if (ne && Fx(ne)) { + let Ae = ne; + if (fn(Ae) && (Ae = Ae.left, !Fx(Ae))) + return; + const De = _.getTypeAtLocation(Ae.expression); + if (!De) return; + const we = _.getPropertiesOfType(De); + if (at(we, (Ue) => Ue.valueDeclaration === ne || Ue.valueDeclaration === ne.parent)) { + const Ue = De.symbol.valueDeclaration; + if (Ue) { + if (Ky(Ue) && Kn(Ue.parent)) + return Ue.parent; + if (Tc(Ue)) + return Ue; + } + } + } + } + function V(he) { + if (!g?.has(he)) + switch (g?.add(he), he.kind) { + case 169: + case 172: + case 260: + return ue(he); + case 219: + case 218: + case 262: + case 174: + case 177: + return $(he, o); + case 277: + return U(he); + case 263: + return _e(he); + case 206: + case 207: + return Z(he); + default: + throw new Error(`Cannot find a fix for the given node ${he.kind}`); + } + } + function $(he, ne) { + if (he.type) + return; + const { typeNode: Ae } = ie(he); + if (Ae) + return s.tryInsertTypeAnnotation( + ne, + he, + Ae + ), [p.Add_return_type_0, it(Ae)]; + } + function U(he) { + if (he.isExportEquals) + return; + const { typeNode: ne } = ie(he.expression); + if (!ne) return; + const Ae = N.createUniqueName("_default"); + return s.replaceNodeWithNodes(o, he, [ + N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [N.createVariableDeclaration( + Ae, + /*exclamationToken*/ + void 0, + ne, + he.expression + )], + 2 + /* Const */ + ) + ), + N.updateExportAssignment(he, he?.modifiers, Ae) + ]), [ + p.Extract_default_export_to_variable + ]; + } + function _e(he) { + var ne, Ae; + const De = (ne = he.heritageClauses) == null ? void 0 : ne.find( + (Dt) => Dt.token === 96 + /* ExtendsKeyword */ + ), we = De?.types[0]; + if (!we) + return; + const { typeNode: Ue } = ie(we.expression); + if (!Ue) + return; + const bt = N.createUniqueName( + he.name ? he.name.text + "Base" : "Anonymous", + 16 + /* Optimistic */ + ), Lt = N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [N.createVariableDeclaration( + bt, + /*exclamationToken*/ + void 0, + Ue, + we.expression + )], + 2 + /* Const */ + ) + ); + s.insertNodeBefore(o, he, Lt); + const er = Fy(o.text, we.end), Nr = ((Ae = er?.[er.length - 1]) == null ? void 0 : Ae.end) ?? we.end; + return s.replaceRange( + o, + { + pos: we.getFullStart(), + end: Nr + }, + bt, + { + prefix: " " + } + ), [p.Extract_base_class_to_variable]; + } + function Z(he) { + var ne; + const Ae = he.parent, De = he.parent.parent.parent; + if (!Ae.initializer) return; + let we; + const Ue = []; + if (Me(Ae.initializer)) + we = { expression: { kind: 3, identifier: Ae.initializer } }; + else { + const er = N.createUniqueName( + "dest", + 16 + /* Optimistic */ + ); + we = { expression: { kind: 3, identifier: er } }, Ue.push(N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [N.createVariableDeclaration( + er, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Ae.initializer + )], + 2 + /* Const */ + ) + )); + } + const bt = []; + R0(he) ? J(he, bt, we) : re(he, bt, we); + const Lt = /* @__PURE__ */ new Map(); + for (const er of bt) { + if (er.element.propertyName && fa(er.element.propertyName)) { + const Dt = er.element.propertyName.expression, Qt = N.getGeneratedNameForNode(Dt), Wr = N.createVariableDeclaration( + Qt, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Dt + ), yr = N.createVariableDeclarationList( + [Wr], + 2 + /* Const */ + ), qn = N.createVariableStatement( + /*modifiers*/ + void 0, + yr + ); + Ue.push(qn), Lt.set(Dt, Qt); + } + const Nr = er.element.name; + if (R0(Nr)) + J(Nr, bt, er); + else if (Nf(Nr)) + re(Nr, bt, er); + else { + const { typeNode: Dt } = ie(Nr); + let Qt = te(er, Lt); + if (er.element.initializer) { + const yr = (ne = er.element) == null ? void 0 : ne.propertyName, qn = N.createUniqueName( + yr && Me(yr) ? yr.text : "temp", + 16 + /* Optimistic */ + ); + Ue.push(N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [N.createVariableDeclaration( + qn, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Qt + )], + 2 + /* Const */ + ) + )), Qt = N.createConditionalExpression( + N.createBinaryExpression( + qn, + N.createToken( + 37 + /* EqualsEqualsEqualsToken */ + ), + N.createIdentifier("undefined") + ), + N.createToken( + 58 + /* QuestionToken */ + ), + er.element.initializer, + N.createToken( + 59 + /* ColonToken */ + ), + Qt + ); + } + const Wr = $n( + De, + 32 + /* Export */ + ) ? [N.createToken( + 95 + /* ExportKeyword */ + )] : void 0; + Ue.push(N.createVariableStatement( + Wr, + N.createVariableDeclarationList( + [N.createVariableDeclaration( + Nr, + /*exclamationToken*/ + void 0, + Dt, + Qt + )], + 2 + /* Const */ + ) + )); + } + } + return De.declarationList.declarations.length > 1 && Ue.push(N.updateVariableStatement( + De, + De.modifiers, + N.updateVariableDeclarationList( + De.declarationList, + De.declarationList.declarations.filter((er) => er !== he.parent) + ) + )), s.replaceNodeWithNodes(o, De, Ue), [ + p.Extract_binding_expressions_to_variable + ]; + } + function J(he, ne, Ae) { + for (let De = 0; De < he.elements.length; ++De) { + const we = he.elements[De]; + ul(we) || ne.push({ + element: we, + parent: Ae, + expression: { kind: 2, arrayIndex: De } + }); + } + } + function re(he, ne, Ae) { + for (const De of he.elements) { + let we; + if (De.propertyName) + if (fa(De.propertyName)) { + ne.push({ + element: De, + parent: Ae, + expression: { kind: 1, computed: De.propertyName.expression } + }); + continue; + } else + we = De.propertyName.text; + else + we = De.name.text; + ne.push({ + element: De, + parent: Ae, + expression: { kind: 0, text: we } + }); + } + } + function te(he, ne) { + const Ae = [he]; + for (; he.parent; ) + he = he.parent, Ae.push(he); + let De = Ae[Ae.length - 1].expression.identifier; + for (let we = Ae.length - 2; we >= 0; --we) { + const Ue = Ae[we].expression; + Ue.kind === 0 ? De = N.createPropertyAccessChain( + De, + /*questionDotToken*/ + void 0, + N.createIdentifier(Ue.text) + ) : Ue.kind === 1 ? De = N.createElementAccessExpression( + De, + ne.get(Ue.computed) + ) : Ue.kind === 2 && (De = N.createElementAccessExpression( + De, + Ue.arrayIndex + )); + } + return De; + } + function ie(he, ne) { + if (t === 1) + return Ee(he); + let Ae; + if (SS(he)) { + const Ue = _.getSignatureFromDeclaration(he); + if (Ue) { + const bt = _.getTypePredicateOfSignature(Ue); + if (bt) + return bt.type ? { + typeNode: ke(bt, ur(he, bl) ?? o, we(bt.type)), + mutatedTarget: !1 + } : i; + Ae = _.getReturnTypeOfSignature(Ue); + } + } else + Ae = _.getTypeAtLocation(he); + if (!Ae) + return i; + if (t === 2) { + ne && (Ae = ne); + const Ue = _.getWidenedLiteralType(Ae); + if (_.isTypeAssignableTo(Ue, Ae)) + return i; + Ae = Ue; + } + const De = ur(he, bl) ?? o; + return Ii(he) && _.requiresAddingImplicitUndefined(he, De) && (Ae = _.getUnionType( + [_.getUndefinedType(), Ae], + 0 + /* None */ + )), { + typeNode: oe(Ae, De, we(Ae)), + mutatedTarget: !1 + }; + function we(Ue) { + return (Kn(he) || ss(he) && $n( + he, + 264 + /* Readonly */ + )) && Ue.flags & 8192 ? 1048576 : 0; + } + } + function le(he) { + return N.createTypeQueryNode(Wa(he)); + } + function Te(he, ne = "temp") { + const Ae = !!ur(he, Ce); + return Ae ? me( + he, + ne, + Ae, + (De) => De.elements, + lp, + N.createSpreadElement, + (De) => N.createArrayLiteralExpression( + De, + /*multiLine*/ + !0 + ), + (De) => N.createTupleTypeNode(De.map(N.createRestTypeNode)) + ) : i; + } + function q(he, ne = "temp") { + const Ae = !!ur(he, Ce); + return me( + he, + ne, + Ae, + (De) => De.properties, + Zg, + N.createSpreadAssignment, + (De) => N.createObjectLiteralExpression( + De, + /*multiLine*/ + !0 + ), + N.createIntersectionTypeNode + ); + } + function me(he, ne, Ae, De, we, Ue, bt, Lt) { + const er = [], Nr = []; + let Dt; + const Qt = ur(he, xi); + for (const qn of De(he)) + we(qn) ? (yr(), _o(qn.expression) ? (er.push(le(qn.expression)), Nr.push(qn)) : Wr(qn.expression)) : (Dt ?? (Dt = [])).push(qn); + if (Nr.length === 0) + return i; + return yr(), s.replaceNode(o, he, bt(Nr)), { + typeNode: Lt(er), + mutatedTarget: !0 + }; + function Wr(qn) { + const Bt = N.createUniqueName( + ne + "_Part" + (Nr.length + 1), + 16 + /* Optimistic */ + ), bi = Ae ? N.createAsExpression( + qn, + N.createTypeReferenceNode("const") + ) : qn, pi = N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [ + N.createVariableDeclaration( + Bt, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + bi + ) + ], + 2 + /* Const */ + ) + ); + s.insertNodeBefore(o, Qt, pi), er.push(le(Bt)), Nr.push(Ue(Bt)); + } + function yr() { + Dt && (Wr(bt( + Dt + )), Dt = void 0); + } + } + function Ce(he) { + return Eb(he) && Kp(he.type); + } + function Ee(he) { + if (Ii(he)) + return i; + if (_u(he)) + return { + typeNode: le(he.name), + mutatedTarget: !1 + }; + if (_o(he)) + return { + typeNode: le(he), + mutatedTarget: !1 + }; + if (Ce(he)) + return Ee(he.expression); + if (Ql(he)) { + const ne = ur(he, Kn), Ae = ne && Me(ne.name) ? ne.name.text : void 0; + return Te(he, Ae); + } + if (oa(he)) { + const ne = ur(he, Kn), Ae = ne && Me(ne.name) ? ne.name.text : void 0; + return q(he, Ae); + } + if (Kn(he) && he.initializer) + return Ee(he.initializer); + if (qx(he)) { + const { typeNode: ne, mutatedTarget: Ae } = Ee(he.whenTrue); + if (!ne) return i; + const { typeNode: De, mutatedTarget: we } = Ee(he.whenFalse); + return De ? { + typeNode: N.createUnionTypeNode([ne, De]), + mutatedTarget: Ae || we + } : i; + } + return i; + } + function oe(he, ne, Ae = 0) { + let De = !1; + const we = J6e(_, he, ne, g6e | Ae, h6e, { + moduleResolverHost: c, + trackSymbol() { + return !0; + }, + reportTruncationError() { + De = !0; + } + }); + if (!we) + return; + const Ue = Fle(we, m, u); + return De ? N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ) : Ue; + } + function ke(he, ne, Ae = 0) { + let De = !1; + const we = z6e(_, m, he, ne, u, g6e | Ae, h6e, { + moduleResolverHost: c, + trackSymbol() { + return !0; + }, + reportTruncationError() { + De = !0; + } + }); + return De ? N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ) : we; + } + function ue(he) { + const { typeNode: ne } = ie(he); + if (ne) + return he.type ? s.replaceNode(Cr(he), he.type, ne) : s.tryInsertTypeAnnotation(Cr(he), he, ne), [p.Add_annotation_of_type_0, it(ne)]; + } + function it(he) { + on( + he, + 1 + /* SingleLine */ + ); + const ne = S.printNode(4, he, o); + return ne.length > x4 ? ne.substring(0, x4 - 3) + "..." : (on( + he, + 0 + /* None */ + ), ne); + } + function Oe(he) { + return ur(he, (ne) => $He.has(ne.kind) && (!Nf(ne) && !R0(ne) || Kn(ne.parent))); + } + function xe(he, ne) { + for (; he && he.end < ne.start + ne.length; ) + he = he.parent; + for (; he.parent.pos === he.pos && he.parent.end === he.end; ) + he = he.parent; + return Me(he) && C0(he.parent) && he.parent.initializer ? he.parent.initializer : he; + } + } + var Cle = "fixAwaitInSyncFunction", v6e = [ + p.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, + p.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, + p.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, + p.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code + ]; + Qs({ + errorCodes: v6e, + getCodeActions(e) { + const { sourceFile: t, span: n } = e, i = b6e(t, n.start); + if (!i) return; + const s = sn.ChangeTracker.with(e, (o) => S6e(o, t, i)); + return [Os(Cle, s, p.Add_async_modifier_to_containing_function, Cle, p.Add_all_missing_async_modifiers)]; + }, + fixIds: [Cle], + getAllCodeActions: function(t) { + const n = /* @__PURE__ */ new Set(); + return Ga(t, v6e, (i, s) => { + const o = b6e(s.file, s.start); + !o || !Lp(n, Aa(o.insertBefore)) || S6e(i, t.sourceFile, o); + }); + } + }); + function XHe(e) { + if (e.type) + return e.type; + if (Kn(e.parent) && e.parent.type && ng(e.parent.type)) + return e.parent.type.type; + } + function b6e(e, t) { + const n = Si(e, t), i = ff(n); + if (!i) + return; + let s; + switch (i.kind) { + case 174: + s = i.name; + break; + case 262: + case 218: + s = Xa(i, 100, e); + break; + case 219: + const o = i.typeParameters ? 30 : 21; + s = Xa(i, o, e) || ya(i.parameters); + break; + default: + return; + } + return s && { + insertBefore: s, + returnType: XHe(i) + }; + } + function S6e(e, t, { insertBefore: n, returnType: i }) { + if (i) { + const s = c3(i); + (!s || s.kind !== 80 || s.text !== "Promise") && e.replaceNode(t, i, N.createTypeReferenceNode("Promise", N.createNodeArray([i]))); + } + e.insertModifierBefore(t, 134, n); + } + var T6e = [ + p._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property.code, + p._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor.code + ], Ele = "fixPropertyOverrideAccessor"; + Qs({ + errorCodes: T6e, + getCodeActions(e) { + const t = x6e(e.sourceFile, e.span.start, e.span.length, e.errorCode, e); + if (t) + return [Os(Ele, t, p.Generate_get_and_set_accessors, Ele, p.Generate_get_and_set_accessors_for_all_overriding_properties)]; + }, + fixIds: [Ele], + getAllCodeActions: (e) => Ga(e, T6e, (t, n) => { + const i = x6e(n.file, n.start, n.length, n.code, e); + if (i) + for (const s of i) + t.pushRaw(e.sourceFile, s); + }) + }); + function x6e(e, t, n, i, s) { + let o, c; + if (i === p._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property.code) + o = t, c = t + n; + else if (i === p._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor.code) { + const _ = s.program.getTypeChecker(), u = Si(e, t).parent; + E.assert(Jy(u), "error span of fixPropertyOverrideAccessor should only be on an accessor"); + const m = u.parent; + E.assert(Zn(m), "erroneous accessors should only be inside classes"); + const g = Hm(Jle(m, _)); + if (!g) return []; + const h = Pi(_x(u.name)), S = _.getPropertyOfType(_.getTypeAtLocation(g), h); + if (!S || !S.valueDeclaration) return []; + o = S.valueDeclaration.pos, c = S.valueDeclaration.end, e = Cr(S.valueDeclaration); + } else + E.fail("fixPropertyOverrideAccessor codefix got unexpected error code " + i); + return H6e(e, s.program, o, c, s, p.Generate_get_and_set_accessors.message); + } + var Dle = "inferFromUsage", k6e = [ + // Variable declarations + p.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code, + // Variable uses + p.Variable_0_implicitly_has_an_1_type.code, + // Parameter declarations + p.Parameter_0_implicitly_has_an_1_type.code, + p.Rest_parameter_0_implicitly_has_an_any_type.code, + // Get Accessor declarations + p.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code, + p._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code, + // Set Accessor declarations + p.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code, + // Property declarations + p.Member_0_implicitly_has_an_1_type.code, + //// Suggestions + // Variable declarations + p.Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage.code, + // Variable uses + p.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code, + // Parameter declarations + p.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code, + p.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code, + // Get Accessor declarations + p.Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage.code, + p._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage.code, + // Set Accessor declarations + p.Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage.code, + // Property declarations + p.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code, + // Function expressions and declarations + p.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code + ]; + Qs({ + errorCodes: k6e, + getCodeActions(e) { + const { sourceFile: t, program: n, span: { start: i }, errorCode: s, cancellationToken: o, host: c, preferences: _ } = e, u = Si(t, i); + let m; + const g = sn.ChangeTracker.with(e, (S) => { + m = C6e( + S, + t, + u, + s, + n, + o, + /*markSeen*/ + yb, + c, + _ + ); + }), h = m && is(m); + return !h || g.length === 0 ? void 0 : [Os(Dle, g, [QHe(s, u), qo(h)], Dle, p.Infer_all_types_from_usage)]; + }, + fixIds: [Dle], + getAllCodeActions(e) { + const { sourceFile: t, program: n, cancellationToken: i, host: s, preferences: o } = e, c = O6(); + return Ga(e, k6e, (_, u) => { + C6e(_, t, Si(u.file, u.start), u.code, n, i, c, s, o); + }); + } + }); + function QHe(e, t) { + switch (e) { + case p.Parameter_0_implicitly_has_an_1_type.code: + case p.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code: + return A_(ff(t)) ? p.Infer_type_of_0_from_usage : p.Infer_parameter_types_from_usage; + // TODO: GH#18217 + case p.Rest_parameter_0_implicitly_has_an_any_type.code: + case p.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code: + return p.Infer_parameter_types_from_usage; + case p.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code: + return p.Infer_this_type_of_0_from_usage; + default: + return p.Infer_type_of_0_from_usage; + } + } + function YHe(e) { + switch (e) { + case p.Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage.code: + return p.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code; + case p.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code: + return p.Variable_0_implicitly_has_an_1_type.code; + case p.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code: + return p.Parameter_0_implicitly_has_an_1_type.code; + case p.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code: + return p.Rest_parameter_0_implicitly_has_an_any_type.code; + case p.Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage.code: + return p.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code; + case p._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage.code: + return p._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code; + case p.Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage.code: + return p.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code; + case p.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code: + return p.Member_0_implicitly_has_an_1_type.code; + } + return e; + } + function C6e(e, t, n, i, s, o, c, _, u) { + if (!v4(n.kind) && n.kind !== 80 && n.kind !== 26 && n.kind !== 110) + return; + const { parent: m } = n, g = y2(t, s, u, _); + switch (i = YHe(i), i) { + // Variable and Property declarations + case p.Member_0_implicitly_has_an_1_type.code: + case p.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code: + if (Kn(m) && c(m) || ss(m) || m_(m)) + return E6e(e, g, t, m, s, _, o), g.writeFixes(e), m; + if (Tn(m)) { + const T = QA(m.name, s, o), C = dw(T, m, s, _); + if (C) { + const D = N.createJSDocTypeTag( + /*tagName*/ + void 0, + N.createJSDocTypeExpression(C), + /*comment*/ + void 0 + ); + e.addJSDocTags(t, Ws(m.parent.parent, El), [D]); + } + return g.writeFixes(e), m; + } + return; + case p.Variable_0_implicitly_has_an_1_type.code: { + const T = s.getTypeChecker().getSymbolAtLocation(n); + return T && T.valueDeclaration && Kn(T.valueDeclaration) && c(T.valueDeclaration) ? (E6e(e, g, Cr(T.valueDeclaration), T.valueDeclaration, s, _, o), g.writeFixes(e), T.valueDeclaration) : void 0; + } + } + const h = ff(n); + if (h === void 0) + return; + let S; + switch (i) { + // Parameter declarations + case p.Parameter_0_implicitly_has_an_1_type.code: + if (A_(h)) { + D6e(e, g, t, h, s, _, o), S = h; + break; + } + // falls through + case p.Rest_parameter_0_implicitly_has_an_any_type.code: + if (c(h)) { + const T = Ws(m, Ii); + ZHe(e, g, t, T, h, s, _, o), S = T; + } + break; + // Get Accessor declarations + case p.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code: + case p._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code: + cp(h) && Me(h.name) && (mH(e, g, t, h, QA(h.name, s, o), s, _), S = h); + break; + // Set Accessor declarations + case p.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code: + A_(h) && (D6e(e, g, t, h, s, _, o), S = h); + break; + // Function 'this' + case p.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code: + sn.isThisTypeAnnotatable(h) && c(h) && (KHe(e, t, h, s, _, o), S = h); + break; + default: + return E.fail(String(i)); + } + return g.writeFixes(e), S; + } + function E6e(e, t, n, i, s, o, c) { + Me(i.name) && mH(e, t, n, i, QA(i.name, s, c), s, o); + } + function ZHe(e, t, n, i, s, o, c, _) { + if (!Me(i.name)) + return; + const u = rGe(s, n, o, _); + if (E.assert(s.parameters.length === u.length, "Parameter count and inference count should match"), an(s)) + w6e(e, n, u, o, c); + else { + const m = bo(s) && !Xa(s, 21, n); + m && e.insertNodeBefore(n, ya(s.parameters), N.createToken( + 21 + /* OpenParenToken */ + )); + for (const { declaration: g, type: h } of u) + g && !g.type && !g.initializer && mH(e, t, n, g, h, o, c); + m && e.insertNodeAfter(n, _a(s.parameters), N.createToken( + 22 + /* CloseParenToken */ + )); + } + } + function KHe(e, t, n, i, s, o) { + const c = P6e(n, t, i, o); + if (!c || !c.length) + return; + const _ = Ple(i, c, o).thisParameter(), u = dw(_, n, i, s); + u && (an(n) ? eGe(e, t, n, u) : e.tryInsertThisTypeAnnotation(t, n, u)); + } + function eGe(e, t, n, i) { + e.addJSDocTags(t, n, [ + N.createJSDocThisTag( + /*tagName*/ + void 0, + N.createJSDocTypeExpression(i) + ) + ]); + } + function D6e(e, t, n, i, s, o, c) { + const _ = Uc(i.parameters); + if (_ && Me(i.name) && Me(_.name)) { + let u = QA(i.name, s, c); + u === s.getTypeChecker().getAnyType() && (u = QA(_.name, s, c)), an(i) ? w6e(e, n, [{ declaration: _, type: u }], s, o) : mH(e, t, n, _, u, s, o); + } + } + function mH(e, t, n, i, s, o, c) { + const _ = dw(s, i, o, c); + if (_) + if (an(n) && i.kind !== 171) { + const u = Kn(i) ? jn(i.parent.parent, pc) : i; + if (!u) + return; + const m = N.createJSDocTypeExpression(_), g = cp(i) ? N.createJSDocReturnTag( + /*tagName*/ + void 0, + m, + /*comment*/ + void 0 + ) : N.createJSDocTypeTag( + /*tagName*/ + void 0, + m, + /*comment*/ + void 0 + ); + e.addJSDocTags(n, u, [g]); + } else tGe(_, i, n, e, t, pa(o.getCompilerOptions())) || e.tryInsertTypeAnnotation(n, i, _); + } + function tGe(e, t, n, i, s, o) { + const c = v2(e, o); + return c && i.tryInsertTypeAnnotation(n, t, c.typeNode) ? (lr(c.symbols, (_) => s.addImportFromExportedSymbol( + _, + /*isValidTypeOnlyUseSite*/ + !0 + )), !0) : !1; + } + function w6e(e, t, n, i, s) { + const o = n.length && n[0].declaration.parent; + if (!o) + return; + const c = Li(n, (_) => { + const u = _.declaration; + if (u.initializer || Ly(u) || !Me(u.name)) + return; + const m = _.type && dw(_.type, u, i, s); + if (m) { + const g = N.cloneNode(u.name); + return on( + g, + 7168 + /* NoNestedComments */ + ), { name: N.cloneNode(u.name), param: u, isOptional: !!_.isOptional, typeNode: m }; + } + }); + if (c.length) + if (bo(o) || po(o)) { + const _ = bo(o) && !Xa(o, 21, t); + _ && e.insertNodeBefore(t, ya(o.parameters), N.createToken( + 21 + /* OpenParenToken */ + )), lr(c, ({ typeNode: u, param: m }) => { + const g = N.createJSDocTypeTag( + /*tagName*/ + void 0, + N.createJSDocTypeExpression(u) + ), h = N.createJSDocComment( + /*comment*/ + void 0, + [g] + ); + e.insertNodeAt(t, m.getStart(t), h, { suffix: " " }); + }), _ && e.insertNodeAfter(t, _a(o.parameters), N.createToken( + 22 + /* CloseParenToken */ + )); + } else { + const _ = gr(c, ({ name: u, typeNode: m, isOptional: g }) => N.createJSDocParameterTag( + /*tagName*/ + void 0, + u, + /*isBracketed*/ + !!g, + N.createJSDocTypeExpression(m), + /*isNameFirst*/ + !1, + /*comment*/ + void 0 + )); + e.addJSDocTags(t, o, _); + } + } + function wle(e, t, n) { + return Li(So.getReferenceEntriesForNode(-1, e, t, t.getSourceFiles(), n), (i) => i.kind !== So.EntryKind.Span ? jn(i.node, Me) : void 0); + } + function QA(e, t, n) { + const i = wle(e, t, n); + return Ple(t, i, n).single(); + } + function rGe(e, t, n, i) { + const s = P6e(e, t, n, i); + return s && Ple(n, s, i).parameters(e) || e.parameters.map((o) => ({ + declaration: o, + type: Me(o.name) ? QA(o.name, n, i) : n.getTypeChecker().getAnyType() + })); + } + function P6e(e, t, n, i) { + let s; + switch (e.kind) { + case 176: + s = Xa(e, 137, t); + break; + case 219: + case 218: + const o = e.parent; + s = (Kn(o) || ss(o)) && Me(o.name) ? o.name : e.name; + break; + case 262: + case 174: + case 173: + s = e.name; + break; + } + if (s) + return wle(s, n, i); + } + function Ple(e, t, n) { + const i = e.getTypeChecker(), s = { + string: () => i.getStringType(), + number: () => i.getNumberType(), + Array: (ke) => i.createArrayType(ke), + Promise: (ke) => i.createPromiseType(ke) + }, o = [ + i.getStringType(), + i.getNumberType(), + i.createArrayType(i.getAnyType()), + i.createPromiseType(i.getAnyType()) + ]; + return { + single: u, + parameters: m, + thisParameter: g + }; + function c() { + return { + isNumber: void 0, + isString: void 0, + isNumberOrString: void 0, + candidateTypes: void 0, + properties: void 0, + calls: void 0, + constructs: void 0, + numberIndex: void 0, + stringIndex: void 0, + candidateThisTypes: void 0, + inferredTypes: void 0 + }; + } + function _(ke) { + const ue = /* @__PURE__ */ new Map(); + for (const Oe of ke) + Oe.properties && Oe.properties.forEach((xe, he) => { + ue.has(he) || ue.set(he, []), ue.get(he).push(xe); + }); + const it = /* @__PURE__ */ new Map(); + return ue.forEach((Oe, xe) => { + it.set(xe, _(Oe)); + }), { + isNumber: ke.some((Oe) => Oe.isNumber), + isString: ke.some((Oe) => Oe.isString), + isNumberOrString: ke.some((Oe) => Oe.isNumberOrString), + candidateTypes: na(ke, (Oe) => Oe.candidateTypes), + properties: it, + calls: na(ke, (Oe) => Oe.calls), + constructs: na(ke, (Oe) => Oe.constructs), + numberIndex: lr(ke, (Oe) => Oe.numberIndex), + stringIndex: lr(ke, (Oe) => Oe.stringIndex), + candidateThisTypes: na(ke, (Oe) => Oe.candidateThisTypes), + inferredTypes: void 0 + // clear type cache + }; + } + function u() { + return _e(h(t)); + } + function m(ke) { + if (t.length === 0 || !ke.parameters) + return; + const ue = c(); + for (const Oe of t) + n.throwIfCancellationRequested(), S(Oe, ue); + const it = [...ue.constructs || [], ...ue.calls || []]; + return ke.parameters.map((Oe, xe) => { + const he = [], ne = Zm(Oe); + let Ae = !1; + for (const we of it) + if (we.argumentTypes.length <= xe) + Ae = an(ke), he.push(i.getUndefinedType()); + else if (ne) + for (let Ue = xe; Ue < we.argumentTypes.length; Ue++) + he.push(i.getBaseTypeOfLiteralType(we.argumentTypes[Ue])); + else + he.push(i.getBaseTypeOfLiteralType(we.argumentTypes[xe])); + if (Me(Oe.name)) { + const we = h(wle(Oe.name, e, n)); + he.push(...ne ? Li(we, i.getElementTypeOfArrayType) : we); + } + const De = _e(he); + return { + type: ne ? i.createArrayType(De) : De, + isOptional: Ae && !ne, + declaration: Oe + }; + }); + } + function g() { + const ke = c(); + for (const ue of t) + n.throwIfCancellationRequested(), S(ue, ke); + return _e(ke.candidateThisTypes || He); + } + function h(ke) { + const ue = c(); + for (const it of ke) + n.throwIfCancellationRequested(), S(it, ue); + return J(ue); + } + function S(ke, ue) { + for (; H4(ke); ) + ke = ke.parent; + switch (ke.parent.kind) { + case 244: + C(ke, ue); + break; + case 225: + ue.isNumber = !0; + break; + case 224: + D(ke.parent, ue); + break; + case 226: + w(ke, ke.parent, ue); + break; + case 296: + case 297: + A(ke.parent, ue); + break; + case 213: + case 214: + ke.parent.expression === ke ? O(ke.parent, ue) : T(ke, ue); + break; + case 211: + F(ke.parent, ue); + break; + case 212: + R(ke.parent, ke, ue); + break; + case 303: + case 304: + W(ke.parent, ue); + break; + case 172: + V(ke.parent, ue); + break; + case 260: { + const { name: it, initializer: Oe } = ke.parent; + if (ke === it) { + Oe && Ee(ue, i.getTypeAtLocation(Oe)); + break; + } + } + // falls through + default: + return T(ke, ue); + } + } + function T(ke, ue) { + Td(ke) && Ee(ue, i.getContextualType(ke)); + } + function C(ke, ue) { + Ee(ue, Fs(ke) ? i.getVoidType() : i.getAnyType()); + } + function D(ke, ue) { + switch (ke.operator) { + case 46: + case 47: + case 41: + case 55: + ue.isNumber = !0; + break; + case 40: + ue.isNumberOrString = !0; + break; + } + } + function w(ke, ue, it) { + switch (ue.operatorToken.kind) { + // ExponentiationOperator + case 43: + // MultiplicativeOperator + // falls through + case 42: + case 44: + case 45: + // ShiftOperator + // falls through + case 48: + case 49: + case 50: + // BitwiseOperator + // falls through + case 51: + case 52: + case 53: + // CompoundAssignmentOperator + // falls through + case 66: + case 68: + case 67: + case 69: + case 70: + case 74: + case 75: + case 79: + case 71: + case 73: + case 72: + // AdditiveOperator + // falls through + case 41: + // RelationalOperator + // falls through + case 30: + case 33: + case 32: + case 34: + const Oe = i.getTypeAtLocation(ue.left === ke ? ue.right : ue.left); + Oe.flags & 1056 ? Ee(it, Oe) : it.isNumber = !0; + break; + case 65: + case 40: + const xe = i.getTypeAtLocation(ue.left === ke ? ue.right : ue.left); + xe.flags & 1056 ? Ee(it, xe) : xe.flags & 296 ? it.isNumber = !0 : xe.flags & 402653316 ? it.isString = !0 : xe.flags & 1 || (it.isNumberOrString = !0); + break; + // AssignmentOperators + case 64: + case 35: + case 37: + case 38: + case 36: + case 77: + case 78: + case 76: + Ee(it, i.getTypeAtLocation(ue.left === ke ? ue.right : ue.left)); + break; + case 103: + ke === ue.left && (it.isString = !0); + break; + // LogicalOperator Or NullishCoalescing + case 57: + case 61: + ke === ue.left && (ke.parent.parent.kind === 260 || Cl( + ke.parent.parent, + /*excludeCompoundAssignment*/ + !0 + )) && Ee(it, i.getTypeAtLocation(ue.right)); + break; + } + } + function A(ke, ue) { + Ee(ue, i.getTypeAtLocation(ke.parent.parent.expression)); + } + function O(ke, ue) { + const it = { + argumentTypes: [], + return_: c() + }; + if (ke.arguments) + for (const Oe of ke.arguments) + it.argumentTypes.push(i.getTypeAtLocation(Oe)); + S(ke, it.return_), ke.kind === 213 ? (ue.calls || (ue.calls = [])).push(it) : (ue.constructs || (ue.constructs = [])).push(it); + } + function F(ke, ue) { + const it = Zo(ke.name.text); + ue.properties || (ue.properties = /* @__PURE__ */ new Map()); + const Oe = ue.properties.get(it) || c(); + S(ke, Oe), ue.properties.set(it, Oe); + } + function R(ke, ue, it) { + if (ue === ke.argumentExpression) { + it.isNumberOrString = !0; + return; + } else { + const Oe = i.getTypeAtLocation(ke.argumentExpression), xe = c(); + S(ke, xe), Oe.flags & 296 ? it.numberIndex = xe : it.stringIndex = xe; + } + } + function W(ke, ue) { + const it = Kn(ke.parent.parent) ? ke.parent.parent : ke.parent; + oe(ue, i.getTypeAtLocation(it)); + } + function V(ke, ue) { + oe(ue, i.getTypeAtLocation(ke.parent)); + } + function $(ke, ue) { + const it = []; + for (const Oe of ke) + for (const { high: xe, low: he } of ue) + xe(Oe) && (E.assert(!he(Oe), "Priority can't have both low and high"), it.push(he)); + return ke.filter((Oe) => it.every((xe) => !xe(Oe))); + } + function U(ke) { + return _e(J(ke)); + } + function _e(ke) { + if (!ke.length) return i.getAnyType(); + const ue = i.getUnionType([i.getStringType(), i.getNumberType()]); + let Oe = $(ke, [ + { + high: (he) => he === i.getStringType() || he === i.getNumberType(), + low: (he) => he === ue + }, + { + high: (he) => !(he.flags & 16385), + low: (he) => !!(he.flags & 16385) + }, + { + high: (he) => !(he.flags & 114689) && !(Cn(he) & 16), + low: (he) => !!(Cn(he) & 16) + } + ]); + const xe = Oe.filter( + (he) => Cn(he) & 16 + /* Anonymous */ + ); + return xe.length && (Oe = Oe.filter((he) => !(Cn(he) & 16)), Oe.push(Z(xe))), i.getWidenedType(i.getUnionType( + Oe.map(i.getBaseTypeOfLiteralType), + 2 + /* Subtype */ + )); + } + function Z(ke) { + if (ke.length === 1) + return ke[0]; + const ue = [], it = [], Oe = [], xe = []; + let he = !1, ne = !1; + const Ae = wp(); + for (const Ue of ke) { + for (const er of i.getPropertiesOfType(Ue)) + Ae.add(er.escapedName, er.valueDeclaration ? i.getTypeOfSymbolAtLocation(er, er.valueDeclaration) : i.getAnyType()); + ue.push(...i.getSignaturesOfType( + Ue, + 0 + /* Call */ + )), it.push(...i.getSignaturesOfType( + Ue, + 1 + /* Construct */ + )); + const bt = i.getIndexInfoOfType( + Ue, + 0 + /* String */ + ); + bt && (Oe.push(bt.type), he = he || bt.isReadonly); + const Lt = i.getIndexInfoOfType( + Ue, + 1 + /* Number */ + ); + Lt && (xe.push(Lt.type), ne = ne || Lt.isReadonly); + } + const De = JX(Ae, (Ue, bt) => { + const Lt = bt.length < ke.length ? 16777216 : 0, er = i.createSymbol(4 | Lt, Ue); + return er.links.type = i.getUnionType(bt), [Ue, er]; + }), we = []; + return Oe.length && we.push(i.createIndexInfo(i.getStringType(), i.getUnionType(Oe), he)), xe.length && we.push(i.createIndexInfo(i.getNumberType(), i.getUnionType(xe), ne)), i.createAnonymousType( + ke[0].symbol, + De, + ue, + it, + we + ); + } + function J(ke) { + var ue, it, Oe; + const xe = []; + ke.isNumber && xe.push(i.getNumberType()), ke.isString && xe.push(i.getStringType()), ke.isNumberOrString && xe.push(i.getUnionType([i.getStringType(), i.getNumberType()])), ke.numberIndex && xe.push(i.createArrayType(U(ke.numberIndex))), ((ue = ke.properties) != null && ue.size || (it = ke.constructs) != null && it.length || ke.stringIndex) && xe.push(re(ke)); + const he = (ke.candidateTypes || []).map((Ae) => i.getBaseTypeOfLiteralType(Ae)), ne = (Oe = ke.calls) != null && Oe.length ? re(ke) : void 0; + return ne && he ? xe.push(i.getUnionType( + [ne, ...he], + 2 + /* Subtype */ + )) : (ne && xe.push(ne), Ir(he) && xe.push(...he)), xe.push(...te(ke)), xe; + } + function re(ke) { + const ue = /* @__PURE__ */ new Map(); + ke.properties && ke.properties.forEach((he, ne) => { + const Ae = i.createSymbol(4, ne); + Ae.links.type = U(he), ue.set(ne, Ae); + }); + const it = ke.calls ? [Ce(ke.calls)] : [], Oe = ke.constructs ? [Ce(ke.constructs)] : [], xe = ke.stringIndex ? [i.createIndexInfo( + i.getStringType(), + U(ke.stringIndex), + /*isReadonly*/ + !1 + )] : []; + return i.createAnonymousType( + /*symbol*/ + void 0, + ue, + it, + Oe, + xe + ); + } + function te(ke) { + if (!ke.properties || !ke.properties.size) return []; + const ue = o.filter((it) => ie(it, ke)); + return 0 < ue.length && ue.length < 3 ? ue.map((it) => le(it, ke)) : []; + } + function ie(ke, ue) { + return ue.properties ? !al(ue.properties, (it, Oe) => { + const xe = i.getTypeOfPropertyOfType(ke, Oe); + return xe ? it.calls ? !i.getSignaturesOfType( + xe, + 0 + /* Call */ + ).length || !i.isTypeAssignableTo(xe, me(it.calls)) : !i.isTypeAssignableTo(xe, U(it)) : !0; + }) : !1; + } + function le(ke, ue) { + if (!(Cn(ke) & 4) || !ue.properties) + return ke; + const it = ke.target, Oe = Hm(it.typeParameters); + if (!Oe) return ke; + const xe = []; + return ue.properties.forEach((he, ne) => { + const Ae = i.getTypeOfPropertyOfType(it, ne); + E.assert(!!Ae, "generic should have all the properties of its reference."), xe.push(...Te(Ae, U(he), Oe)); + }), s[ke.symbol.escapedName](_e(xe)); + } + function Te(ke, ue, it) { + if (ke === it) + return [ue]; + if (ke.flags & 3145728) + return na(ke.types, (he) => Te(he, ue, it)); + if (Cn(ke) & 4 && Cn(ue) & 4) { + const he = i.getTypeArguments(ke), ne = i.getTypeArguments(ue), Ae = []; + if (he && ne) + for (let De = 0; De < he.length; De++) + ne[De] && Ae.push(...Te(he[De], ne[De], it)); + return Ae; + } + const Oe = i.getSignaturesOfType( + ke, + 0 + /* Call */ + ), xe = i.getSignaturesOfType( + ue, + 0 + /* Call */ + ); + return Oe.length === 1 && xe.length === 1 ? q(Oe[0], xe[0], it) : []; + } + function q(ke, ue, it) { + var Oe; + const xe = []; + for (let Ae = 0; Ae < ke.parameters.length; Ae++) { + const De = ke.parameters[Ae], we = ue.parameters[Ae], Ue = ke.declaration && Zm(ke.declaration.parameters[Ae]); + if (!we) + break; + let bt = De.valueDeclaration ? i.getTypeOfSymbolAtLocation(De, De.valueDeclaration) : i.getAnyType(); + const Lt = Ue && i.getElementTypeOfArrayType(bt); + Lt && (bt = Lt); + const er = ((Oe = jn(we, Rg)) == null ? void 0 : Oe.links.type) || (we.valueDeclaration ? i.getTypeOfSymbolAtLocation(we, we.valueDeclaration) : i.getAnyType()); + xe.push(...Te(bt, er, it)); + } + const he = i.getReturnTypeOfSignature(ke), ne = i.getReturnTypeOfSignature(ue); + return xe.push(...Te(he, ne, it)), xe; + } + function me(ke) { + return i.createAnonymousType( + /*symbol*/ + void 0, + Us(), + [Ce(ke)], + He, + He + ); + } + function Ce(ke) { + const ue = [], it = Math.max(...ke.map((xe) => xe.argumentTypes.length)); + for (let xe = 0; xe < it; xe++) { + const he = i.createSymbol(1, Zo(`arg${xe}`)); + he.links.type = _e(ke.map((ne) => ne.argumentTypes[xe] || i.getUndefinedType())), ke.some((ne) => ne.argumentTypes[xe] === void 0) && (he.flags |= 16777216), ue.push(he); + } + const Oe = U(_(ke.map((xe) => xe.return_))); + return i.createSignature( + /*declaration*/ + void 0, + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + ue, + Oe, + /*typePredicate*/ + void 0, + it, + 0 + /* None */ + ); + } + function Ee(ke, ue) { + ue && !(ue.flags & 1) && !(ue.flags & 131072) && (ke.candidateTypes || (ke.candidateTypes = [])).push(ue); + } + function oe(ke, ue) { + ue && !(ue.flags & 1) && !(ue.flags & 131072) && (ke.candidateThisTypes || (ke.candidateThisTypes = [])).push(ue); + } + } + var Nle = "fixReturnTypeInAsyncFunction", N6e = [ + p.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0.code + ]; + Qs({ + errorCodes: N6e, + fixIds: [Nle], + getCodeActions: function(t) { + const { sourceFile: n, program: i, span: s } = t, o = i.getTypeChecker(), c = A6e(n, i.getTypeChecker(), s.start); + if (!c) + return; + const { returnTypeNode: _, returnType: u, promisedTypeNode: m, promisedType: g } = c, h = sn.ChangeTracker.with(t, (S) => I6e(S, n, _, m)); + return [Os( + Nle, + h, + [p.Replace_0_with_Promise_1, o.typeToString(u), o.typeToString(g)], + Nle, + p.Fix_all_incorrect_return_type_of_an_async_functions + )]; + }, + getAllCodeActions: (e) => Ga(e, N6e, (t, n) => { + const i = A6e(n.file, e.program.getTypeChecker(), n.start); + i && I6e(t, n.file, i.returnTypeNode, i.promisedTypeNode); + }) + }); + function A6e(e, t, n) { + if (an(e)) + return; + const i = Si(e, n), s = ur(i, Ka), o = s?.type; + if (!o) + return; + const c = t.getTypeFromTypeNode(o), _ = t.getAwaitedType(c) || t.getVoidType(), u = t.typeToTypeNode( + _, + /*enclosingDeclaration*/ + o, + /*flags*/ + void 0 + ); + if (u) + return { returnTypeNode: o, returnType: c, promisedTypeNode: u, promisedType: _ }; + } + function I6e(e, t, n, i) { + e.replaceNode(t, n, N.createTypeReferenceNode("Promise", [i])); + } + var F6e = "disableJsDiagnostics", O6e = "disableJsDiagnostics", L6e = Li(Object.keys(p), (e) => { + const t = p[e]; + return t.category === 1 ? t.code : void 0; + }); + Qs({ + errorCodes: L6e, + getCodeActions: function(t) { + const { sourceFile: n, program: i, span: s, host: o, formatContext: c } = t; + if (!an(n) || !iD(n, i.getCompilerOptions())) + return; + const _ = n.checkJsDirective ? "" : Jh(o, c.options), u = [ + // fixId unnecessary because adding `// @ts-nocheck` even once will ignore every error in the file. + Od( + F6e, + [CTe(n.fileName, [ + SA( + n.checkJsDirective ? bc(n.checkJsDirective.pos, n.checkJsDirective.end) : ql(0, 0), + `// @ts-nocheck${_}` + ) + ])], + p.Disable_checking_for_this_file + ) + ]; + return sn.isValidLocationToAddComment(n, s.start) && u.unshift(Os(F6e, sn.ChangeTracker.with(t, (m) => M6e(m, n, s.start)), p.Ignore_this_error_message, O6e, p.Add_ts_ignore_to_all_error_messages)), u; + }, + fixIds: [O6e], + getAllCodeActions: (e) => { + const t = /* @__PURE__ */ new Set(); + return Ga(e, L6e, (n, i) => { + sn.isValidLocationToAddComment(i.file, i.start) && M6e(n, i.file, i.start, t); + }); + } + }); + function M6e(e, t, n, i) { + const { line: s } = js(t, n); + (!i || S0(i, s)) && e.insertCommentBeforeLine(t, s, n, " @ts-ignore"); + } + function Ale(e, t, n, i, s, o, c) { + const _ = e.symbol.members; + for (const u of t) + _.has(u.escapedName) || j6e( + u, + e, + n, + i, + s, + o, + c, + /*body*/ + void 0 + ); + } + function q6(e) { + return { + trackSymbol: () => !1, + moduleResolverHost: EV(e.program, e.host) + }; + } + var R6e = /* @__PURE__ */ ((e) => (e[e.Method = 1] = "Method", e[e.Property = 2] = "Property", e[e.All = 3] = "All", e))(R6e || {}); + function j6e(e, t, n, i, s, o, c, _, u = 3, m = !1) { + const g = e.getDeclarations(), h = Uc(g), S = i.program.getTypeChecker(), T = pa(i.program.getCompilerOptions()), C = h?.kind ?? 171, D = ie(e, h), w = h ? Mu(h) : 0; + let A = w & 256; + A |= w & 1 ? 1 : w & 4 ? 4 : 0, h && l_(h) && (A |= 512); + const O = _e(), F = S.getWidenedType(S.getTypeOfSymbolAtLocation(e, t)), R = !!(e.flags & 16777216), W = !!(t.flags & 33554432) || m, V = tf(n, s), $ = 1 | (V === 0 ? 268435456 : 0); + switch (C) { + case 171: + case 172: + let le = S.typeToTypeNode(F, t, $, 8, q6(i)); + if (o) { + const q = v2(le, T); + q && (le = q.typeNode, ZS(o, q.symbols)); + } + c(N.createPropertyDeclaration( + O, + h ? J(D) : e.getName(), + R && u & 2 ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0, + le, + /*initializer*/ + void 0 + )); + break; + case 177: + case 178: { + E.assertIsDefined(g); + let q = S.typeToTypeNode( + F, + t, + $, + /*internalFlags*/ + void 0, + q6(i) + ); + const me = zb(g, h), Ce = me.secondAccessor ? [me.firstAccessor, me.secondAccessor] : [me.firstAccessor]; + if (o) { + const Ee = v2(q, T); + Ee && (q = Ee.typeNode, ZS(o, Ee.symbols)); + } + for (const Ee of Ce) + if (cp(Ee)) + c(N.createGetAccessorDeclaration( + O, + J(D), + He, + te(q), + re(_, V, W) + )); + else { + E.assertNode(Ee, A_, "The counterpart to a getter should be a setter"); + const oe = V4(Ee), ke = oe && Me(oe.name) ? An(oe.name) : void 0; + c(N.createSetAccessorDeclaration( + O, + J(D), + Ole( + 1, + [ke], + [te(q)], + 1, + /*inJs*/ + !1 + ), + re(_, V, W) + )); + } + break; + } + case 173: + case 174: + E.assertIsDefined(g); + const Te = F.isUnion() ? na(F.types, (q) => q.getCallSignatures()) : F.getCallSignatures(); + if (!at(Te)) + break; + if (g.length === 1) { + E.assert(Te.length === 1, "One declaration implies one signature"); + const q = Te[0]; + U(V, q, O, J(D), re(_, V, W)); + break; + } + for (const q of Te) + q.declaration && q.declaration.flags & 33554432 || U(V, q, O, J(D)); + if (!W) + if (g.length > Te.length) { + const q = S.getSignatureFromDeclaration(g[g.length - 1]); + U(V, q, O, J(D), re(_, V)); + } else + E.assert(g.length === Te.length, "Declarations and signatures should match count"), c(oGe(S, i, t, Te, J(D), R && !!(u & 1), O, V, _)); + break; + } + function U(le, Te, q, me, Ce) { + const Ee = gH(174, i, le, Te, Ce, me, q, R && !!(u & 1), t, o); + Ee && c(Ee); + } + function _e() { + let le; + return A && (le = qT(le, N.createModifiersFromModifierFlags(A))), Z() && (le = Pr(le, N.createToken( + 164 + /* OverrideKeyword */ + ))), le && N.createNodeArray(le); + } + function Z() { + return !!(i.program.getCompilerOptions().noImplicitOverride && h && Wb(h)); + } + function J(le) { + return Me(le) && le.escapedText === "constructor" ? N.createComputedPropertyName(N.createStringLiteral( + An(le), + V === 0 + /* Single */ + )) : Wa( + le, + /*includeTrivia*/ + !1 + ); + } + function re(le, Te, q) { + return q ? void 0 : Wa( + le, + /*includeTrivia*/ + !1 + ) || Lle(Te); + } + function te(le) { + return Wa( + le, + /*includeTrivia*/ + !1 + ); + } + function ie(le, Te) { + if (rc(le) & 262144) { + const q = le.links.nameType; + if (q && ap(q)) + return N.createIdentifier(Pi(op(q))); + } + return Wa( + is(Te), + /*includeTrivia*/ + !1 + ); + } + } + function gH(e, t, n, i, s, o, c, _, u, m) { + const g = t.program, h = g.getTypeChecker(), S = pa(g.getCompilerOptions()), T = an(u), C = 524545 | (n === 0 ? 268435456 : 0), D = h.signatureToSignatureDeclaration(i, e, u, C, 8, q6(t)); + if (!D) + return; + let w = T ? void 0 : D.typeParameters, A = D.parameters, O = T ? void 0 : Wa(D.type); + if (m) { + if (w) { + const V = Wc(w, ($) => { + let U = $.constraint, _e = $.default; + if (U) { + const Z = v2(U, S); + Z && (U = Z.typeNode, ZS(m, Z.symbols)); + } + if (_e) { + const Z = v2(_e, S); + Z && (_e = Z.typeNode, ZS(m, Z.symbols)); + } + return N.updateTypeParameterDeclaration( + $, + $.modifiers, + $.name, + U, + _e + ); + }); + w !== V && (w = ot(N.createNodeArray(V, w.hasTrailingComma), w)); + } + const W = Wc(A, (V) => { + let $ = T ? void 0 : V.type; + if ($) { + const U = v2($, S); + U && ($ = U.typeNode, ZS(m, U.symbols)); + } + return N.updateParameterDeclaration( + V, + V.modifiers, + V.dotDotDotToken, + V.name, + T ? void 0 : V.questionToken, + $, + V.initializer + ); + }); + if (A !== W && (A = ot(N.createNodeArray(W, A.hasTrailingComma), A)), O) { + const V = v2(O, S); + V && (O = V.typeNode, ZS(m, V.symbols)); + } + } + const F = _ ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0, R = D.asteriskToken; + if (po(D)) + return N.updateFunctionExpression(D, c, D.asteriskToken, jn(o, Me), w, A, O, s ?? D.body); + if (bo(D)) + return N.updateArrowFunction(D, c, w, A, O, D.equalsGreaterThanToken, s ?? D.body); + if (fc(D)) + return N.updateMethodDeclaration(D, c, R, o ?? N.createIdentifier(""), F, w, A, O, s); + if (Tc(D)) + return N.updateFunctionDeclaration(D, c, D.asteriskToken, jn(o, Me), w, A, O, s ?? D.body); + } + function Ile(e, t, n, i, s, o, c) { + const _ = tf(t.sourceFile, t.preferences), u = pa(t.program.getCompilerOptions()), m = q6(t), g = t.program.getTypeChecker(), h = an(c), { typeArguments: S, arguments: T, parent: C } = i, D = h ? void 0 : g.getContextualType(i), w = gr(T, (_e) => Me(_e) ? _e.text : Tn(_e) && Me(_e.name) ? _e.name.text : void 0), A = h ? [] : gr(T, (_e) => g.getTypeAtLocation(_e)), { argumentTypeNodes: O, argumentTypeParameters: F } = sGe( + g, + n, + A, + c, + u, + 1, + 8, + m + ), R = o ? N.createNodeArray(N.createModifiersFromModifierFlags(o)) : void 0, W = gF(C) ? N.createToken( + 42 + /* AsteriskToken */ + ) : void 0, V = h ? void 0 : nGe(g, F, S), $ = Ole( + T.length, + w, + O, + /*minArgumentCount*/ + void 0, + h + ), U = h || D === void 0 ? void 0 : g.typeToTypeNode( + D, + c, + /*flags*/ + void 0, + /*internalFlags*/ + void 0, + m + ); + switch (e) { + case 174: + return N.createMethodDeclaration( + R, + W, + s, + /*questionToken*/ + void 0, + V, + $, + U, + Lle(_) + ); + case 173: + return N.createMethodSignature( + R, + s, + /*questionToken*/ + void 0, + V, + $, + U === void 0 ? N.createKeywordTypeNode( + 159 + /* UnknownKeyword */ + ) : U + ); + case 262: + return E.assert(typeof s == "string" || Me(s), "Unexpected name"), N.createFunctionDeclaration( + R, + W, + s, + V, + $, + U, + pL(p.Function_not_implemented.message, _) + ); + default: + E.fail("Unexpected kind"); + } + } + function nGe(e, t, n) { + const i = new Set(t.map((o) => o[0])), s = new Map(t); + if (n) { + const o = n.filter((_) => !t.some((u) => { + var m; + return e.getTypeAtLocation(_) === ((m = u[1]) == null ? void 0 : m.argumentType); + })), c = i.size + o.length; + for (let _ = 0; i.size < c; _ += 1) + i.add(B6e(_)); + } + return Ki( + i.values(), + (o) => { + var c; + return N.createTypeParameterDeclaration( + /*modifiers*/ + void 0, + o, + (c = s.get(o)) == null ? void 0 : c.constraint + ); + } + ); + } + function B6e(e) { + return 84 + e <= 90 ? String.fromCharCode(84 + e) : `T${e}`; + } + function hH(e, t, n, i, s, o, c, _) { + const u = e.typeToTypeNode(n, i, o, c, _); + if (u) + return Fle(u, t, s); + } + function Fle(e, t, n) { + if (e && Ed(e)) { + const i = v2(e, n); + i && (ZS(t, i.symbols), e = i.typeNode); + } + return Wa(e); + } + function iGe(e, t) { + E.assert(t.typeArguments); + const n = t.typeArguments, i = t.target; + for (let s = 0; s < n.length; s++) { + const o = n.slice(0, s); + if (e.fillMissingTypeArguments( + o, + i.typeParameters, + s, + /*isJavaScriptImplicitAny*/ + !1 + ).every((_, u) => _ === n[u])) + return s; + } + return n.length; + } + function J6e(e, t, n, i, s, o) { + let c = e.typeToTypeNode(t, n, i, s, o); + if (c) { + if (Y_(c)) { + const _ = t; + if (_.typeArguments && c.typeArguments) { + const u = iGe(e, _); + if (u < c.typeArguments.length) { + const m = N.createNodeArray(c.typeArguments.slice(0, u)); + c = N.updateTypeReferenceNode(c, c.typeName, m); + } + } + } + return c; + } + } + function z6e(e, t, n, i, s, o, c, _) { + let u = e.typePredicateToTypePredicateNode(n, i, o, c, _); + if (u?.type && Ed(u.type)) { + const m = v2(u.type, s); + m && (ZS(t, m.symbols), u = N.updateTypePredicateNode(u, u.assertsModifier, u.parameterName, m.typeNode)); + } + return Wa(u); + } + function W6e(e) { + return e.isUnionOrIntersection() ? e.types.some(W6e) : e.flags & 262144; + } + function sGe(e, t, n, i, s, o, c, _) { + const u = [], m = /* @__PURE__ */ new Map(); + for (let g = 0; g < n.length; g += 1) { + const h = n[g]; + if (h.isUnionOrIntersection() && h.types.some(W6e)) { + const w = B6e(g); + u.push(N.createTypeReferenceNode(w)), m.set(w, void 0); + continue; + } + const S = e.getBaseTypeOfLiteralType(h), T = hH(e, t, S, i, s, o, c, _); + if (!T) + continue; + u.push(T); + const C = U6e(h), D = h.isTypeParameter() && h.constraint && !aGe(h.constraint) ? hH(e, t, h.constraint, i, s, o, c, _) : void 0; + C && m.set(C, { argumentType: h, constraint: D }); + } + return { argumentTypeNodes: u, argumentTypeParameters: Ki(m.entries()) }; + } + function aGe(e) { + return e.flags & 524288 && e.objectFlags === 16; + } + function U6e(e) { + var t; + if (e.flags & 3145728) + for (const n of e.types) { + const i = U6e(n); + if (i) + return i; + } + return e.flags & 262144 ? (t = e.getSymbol()) == null ? void 0 : t.getName() : void 0; + } + function Ole(e, t, n, i, s) { + const o = [], c = /* @__PURE__ */ new Map(); + for (let _ = 0; _ < e; _++) { + const u = t?.[_] || `arg${_}`, m = c.get(u); + c.set(u, (m || 0) + 1); + const g = N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + /*name*/ + u + (m || ""), + /*questionToken*/ + i !== void 0 && _ >= i ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0, + /*type*/ + s ? void 0 : n?.[_] || N.createKeywordTypeNode( + 159 + /* UnknownKeyword */ + ), + /*initializer*/ + void 0 + ); + o.push(g); + } + return o; + } + function oGe(e, t, n, i, s, o, c, _, u) { + let m = i[0], g = i[0].minArgumentCount, h = !1; + for (const D of i) + g = Math.min(D.minArgumentCount, g), ku(D) && (h = !0), D.parameters.length >= m.parameters.length && (!ku(D) || ku(m)) && (m = D); + const S = m.parameters.length - (ku(m) ? 1 : 0), T = m.parameters.map((D) => D.name), C = Ole( + S, + T, + /*types*/ + void 0, + g, + /*inJs*/ + !1 + ); + if (h) { + const D = N.createParameterDeclaration( + /*modifiers*/ + void 0, + N.createToken( + 26 + /* DotDotDotToken */ + ), + T[S] || "rest", + /*questionToken*/ + S >= g ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0, + N.createArrayTypeNode(N.createKeywordTypeNode( + 159 + /* UnknownKeyword */ + )), + /*initializer*/ + void 0 + ); + C.push(D); + } + return lGe( + c, + s, + o, + /*typeParameters*/ + void 0, + C, + cGe(i, e, t, n), + _, + u + ); + } + function cGe(e, t, n, i) { + if (Ir(e)) { + const s = t.getUnionType(gr(e, t.getReturnTypeOfSignature)); + return t.typeToTypeNode(s, i, 1, 8, q6(n)); + } + } + function lGe(e, t, n, i, s, o, c, _) { + return N.createMethodDeclaration( + e, + /*asteriskToken*/ + void 0, + t, + n ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0, + i, + s, + o, + _ || Lle(c) + ); + } + function Lle(e) { + return pL(p.Method_not_implemented.message, e); + } + function pL(e, t) { + return N.createBlock( + [N.createThrowStatement( + N.createNewExpression( + N.createIdentifier("Error"), + /*typeArguments*/ + void 0, + // TODO Handle auto quote preference. + [N.createStringLiteral( + e, + /*isSingleQuote*/ + t === 0 + /* Single */ + )] + ) + )], + /*multiLine*/ + !0 + ); + } + function Mle(e, t, n) { + const i = P4(t); + if (!i) return; + const s = V6e(i, "compilerOptions"); + if (s === void 0) { + e.insertNodeAtObjectStart( + t, + i, + jle( + "compilerOptions", + N.createObjectLiteralExpression( + n.map(([c, _]) => jle(c, _)), + /*multiLine*/ + !0 + ) + ) + ); + return; + } + const o = s.initializer; + if (oa(o)) + for (const [c, _] of n) { + const u = V6e(o, c); + u === void 0 ? e.insertNodeAtObjectStart(t, o, jle(c, _)) : e.replaceNode(t, u.initializer, _); + } + } + function Rle(e, t, n, i) { + Mle(e, t, [[n, i]]); + } + function jle(e, t) { + return N.createPropertyAssignment(N.createStringLiteral(e), t); + } + function V6e(e, t) { + return Pn(e.properties, (n) => Xc(n) && !!n.name && ea(n.name) && n.name.text === t); + } + function v2(e, t) { + let n; + const i = Xe(e, s, fi); + if (n && i) + return { typeNode: i, symbols: n }; + function s(o) { + if (Dh(o) && o.qualifier) { + const c = w_(o.qualifier); + if (!c.symbol) + return kr( + o, + s, + /*context*/ + void 0 + ); + const _ = L9(c.symbol, t), u = _ !== c.text ? q6e(o.qualifier, N.createIdentifier(_)) : o.qualifier; + n = Pr(n, c.symbol); + const m = Or(o.typeArguments, s, fi); + return N.createTypeReferenceNode(u, m); + } + return kr( + o, + s, + /*context*/ + void 0 + ); + } + } + function q6e(e, t) { + return e.kind === 80 ? t : N.createQualifiedName(q6e(e.left, t), e.right); + } + function ZS(e, t) { + t.forEach((n) => e.addImportFromExportedSymbol( + n, + /*isValidTypeOnlyUseSite*/ + !0 + )); + } + function Ble(e, t) { + const n = Yo(t); + let i = Si(e, t.start); + for (; i.end < n; ) + i = i.parent; + return i; + } + function H6e(e, t, n, i, s, o) { + const c = X6e(e, t, n, i); + if (!c || dk.isRefactorErrorInfo(c)) return; + const _ = sn.ChangeTracker.fromContext(s), { isStatic: u, isReadonly: m, fieldName: g, accessorName: h, originalName: S, type: T, container: C, declaration: D } = c; + nf(g), nf(h), nf(D), nf(C); + let w, A; + if (Zn(C)) { + const F = Mu(D); + if (Gu(e)) { + const R = N.createModifiersFromModifierFlags(F); + w = R, A = R; + } else + w = N.createModifiersFromModifierFlags(fGe(F)), A = N.createModifiersFromModifierFlags(pGe(F)); + n2(D) && (A = Wi(Oy(D), A)); + } + yGe(_, e, D, T, g, A); + const O = dGe(g, h, T, w, u, C); + if (nf(O), Q6e(_, e, O, D, C), m) { + const F = Ug(C); + F && vGe(_, e, F, g.text, S); + } else { + const F = mGe(g, h, T, w, u, C); + nf(F), Q6e(_, e, F, D, C); + } + return _.getChanges(); + } + function uGe(e) { + return Me(e) || ea(e); + } + function _Ge(e) { + return H_(e, e.parent) || ss(e) || Xc(e); + } + function G6e(e, t) { + return Me(t) ? N.createIdentifier(e) : N.createStringLiteral(e); + } + function $6e(e, t, n) { + const i = t ? n.name : N.createThis(); + return Me(e) ? N.createPropertyAccessExpression(i, e) : N.createElementAccessExpression(i, N.createStringLiteralFromNode(e)); + } + function fGe(e) { + return e &= -9, e &= -3, e & 4 || (e |= 1), e; + } + function pGe(e) { + return e &= -2, e &= -5, e |= 2, e; + } + function X6e(e, t, n, i, s = !0) { + const o = Si(e, n), c = n === i && s, _ = ur(o.parent, _Ge), u = 271; + if (!_ || !(l9(_.name, e, n, i) || c)) + return { + error: us(p.Could_not_find_property_for_which_to_generate_accessor) + }; + if (!uGe(_.name)) + return { + error: us(p.Name_is_not_valid) + }; + if ((Mu(_) & 98303 | u) !== u) + return { + error: us(p.Can_only_convert_property_with_modifier) + }; + const m = _.name.text, g = KV(m), h = G6e(g ? m : YS(`_${m}`, e), _.name), S = G6e(g ? YS(m.substring(1), e) : m, _.name); + return { + isStatic: Kc(_), + isReadonly: kS(_), + type: bGe(_, t), + container: _.kind === 169 ? _.parent.parent : _.parent, + originalName: _.name.text, + declaration: _, + fieldName: h, + accessorName: S, + renameAccessor: g + }; + } + function dGe(e, t, n, i, s, o) { + return N.createGetAccessorDeclaration( + i, + t, + [], + n, + N.createBlock( + [ + N.createReturnStatement( + $6e(e, s, o) + ) + ], + /*multiLine*/ + !0 + ) + ); + } + function mGe(e, t, n, i, s, o) { + return N.createSetAccessorDeclaration( + i, + t, + [N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + N.createIdentifier("value"), + /*questionToken*/ + void 0, + n + )], + N.createBlock( + [ + N.createExpressionStatement( + N.createAssignment( + $6e(e, s, o), + N.createIdentifier("value") + ) + ) + ], + /*multiLine*/ + !0 + ) + ); + } + function gGe(e, t, n, i, s, o) { + const c = N.updatePropertyDeclaration( + n, + o, + s, + n.questionToken || n.exclamationToken, + i, + n.initializer + ); + e.replaceNode(t, n, c); + } + function hGe(e, t, n, i) { + let s = N.updatePropertyAssignment(n, i, n.initializer); + (s.modifiers || s.questionToken || s.exclamationToken) && (s === n && (s = N.cloneNode(s)), s.modifiers = void 0, s.questionToken = void 0, s.exclamationToken = void 0), e.replacePropertyAssignment(t, n, s); + } + function yGe(e, t, n, i, s, o) { + ss(n) ? gGe(e, t, n, i, s, o) : Xc(n) ? hGe(e, t, n, s) : e.replaceNode(t, n, N.updateParameterDeclaration(n, o, n.dotDotDotToken, Ws(s, Me), n.questionToken, n.type, n.initializer)); + } + function Q6e(e, t, n, i, s) { + H_(i, i.parent) ? e.insertMemberAtStart(t, s, n) : Xc(i) ? e.insertNodeAfterComma(t, i, n) : e.insertNodeAfter(t, i, n); + } + function vGe(e, t, n, i, s) { + n.body && n.body.forEachChild(function o(c) { + fo(c) && c.expression.kind === 110 && ea(c.argumentExpression) && c.argumentExpression.text === s && xx(c) && e.replaceNode(t, c.argumentExpression, N.createStringLiteral(i)), Tn(c) && c.expression.kind === 110 && c.name.text === s && xx(c) && e.replaceNode(t, c.name, N.createIdentifier(i)), !vs(c) && !Zn(c) && c.forEachChild(o); + }); + } + function bGe(e, t) { + const n = OK(e); + if (ss(e) && n && e.questionToken) { + const i = t.getTypeChecker(), s = i.getTypeFromTypeNode(n); + if (!i.isTypeAssignableTo(i.getUndefinedType(), s)) { + const o = L0(n) ? n.types : [n]; + return N.createUnionTypeNode([...o, N.createKeywordTypeNode( + 157 + /* UndefinedKeyword */ + )]); + } + } + return n; + } + function Jle(e, t) { + const n = []; + for (; e; ) { + const i = Mb(e), s = i && t.getSymbolAtLocation(i.expression); + if (!s) break; + const o = s.flags & 2097152 ? t.getAliasedSymbol(s) : s, c = o.declarations && Pn(o.declarations, Zn); + if (!c) break; + n.push(c), e = c; + } + return n; + } + var Y6e = "invalidImportSyntax"; + function SGe(e, t) { + const n = Cr(t), i = OC(t), s = e.program.getCompilerOptions(), o = []; + return o.push(Z6e(e, n, t, p1( + i.name, + /*namedImports*/ + void 0, + t.moduleSpecifier, + tf(n, e.preferences) + ))), Ru(s) === 1 && o.push(Z6e( + e, + n, + t, + N.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + i.name, + N.createExternalModuleReference(t.moduleSpecifier) + ) + )), o; + } + function Z6e(e, t, n, i) { + const s = sn.ChangeTracker.with(e, (o) => o.replaceNode(t, n, i)); + return Od(Y6e, s, [p.Replace_import_with_0, s[0].textChanges[0].newText]); + } + Qs({ + errorCodes: [ + p.This_expression_is_not_callable.code, + p.This_expression_is_not_constructable.code + ], + getCodeActions: TGe + }); + function TGe(e) { + const t = e.sourceFile, n = p.This_expression_is_not_callable.code === e.errorCode ? 213 : 214, i = ur(Si(t, e.span.start), (o) => o.kind === n); + if (!i) + return []; + const s = i.expression; + return K6e(e, s); + } + Qs({ + errorCodes: [ + // The following error codes cover pretty much all assignability errors that could involve an expression + p.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code, + p.Type_0_does_not_satisfy_the_constraint_1.code, + p.Type_0_is_not_assignable_to_type_1.code, + p.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated.code, + p.Type_predicate_0_is_not_assignable_to_1.code, + p.Property_0_of_type_1_is_not_assignable_to_2_index_type_3.code, + p._0_index_type_1_is_not_assignable_to_2_index_type_3.code, + p.Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2.code, + p.Property_0_in_type_1_is_not_assignable_to_type_2.code, + p.Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property.code, + p.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1.code + ], + getCodeActions: xGe + }); + function xGe(e) { + const t = e.sourceFile, n = ur(Si(t, e.span.start), (i) => i.getStart() === e.span.start && i.getEnd() === e.span.start + e.span.length); + return n ? K6e(e, n) : []; + } + function K6e(e, t) { + const n = e.program.getTypeChecker().getTypeAtLocation(t); + if (!(n.symbol && Rg(n.symbol) && n.symbol.links.originatingImport)) + return []; + const i = [], s = n.symbol.links.originatingImport; + if (_f(s) || Nn(i, SGe(e, s)), ct(t) && !(Hl(t.parent) && t.parent.name === t)) { + const o = e.sourceFile, c = sn.ChangeTracker.with(e, (_) => _.replaceNode(o, t, N.createPropertyAccessExpression(t, "default"), {})); + i.push(Od(Y6e, c, p.Use_synthetic_default_member)); + } + return i; + } + var zle = "strictClassInitialization", Wle = "addMissingPropertyDefiniteAssignmentAssertions", Ule = "addMissingPropertyUndefinedType", Vle = "addMissingPropertyInitializer", eEe = [p.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor.code]; + Qs({ + errorCodes: eEe, + getCodeActions: function(t) { + const n = tEe(t.sourceFile, t.span.start); + if (!n) return; + const i = []; + return Pr(i, CGe(t, n)), Pr(i, kGe(t, n)), Pr(i, EGe(t, n)), i; + }, + fixIds: [Wle, Ule, Vle], + getAllCodeActions: (e) => Ga(e, eEe, (t, n) => { + const i = tEe(n.file, n.start); + if (i) + switch (e.fixId) { + case Wle: + rEe(t, n.file, i.prop); + break; + case Ule: + nEe(t, n.file, i); + break; + case Vle: + const s = e.program.getTypeChecker(), o = sEe(s, i.prop); + if (!o) return; + iEe(t, n.file, i.prop, o); + break; + default: + E.fail(JSON.stringify(e.fixId)); + } + }) + }); + function tEe(e, t) { + const n = Si(e, t); + if (Me(n) && ss(n.parent)) { + const i = qc(n.parent); + if (i) + return { type: i, prop: n.parent, isJs: an(n.parent) }; + } + } + function kGe(e, t) { + if (t.isJs) return; + const n = sn.ChangeTracker.with(e, (i) => rEe(i, e.sourceFile, t.prop)); + return Os(zle, n, [p.Add_definite_assignment_assertion_to_property_0, t.prop.getText()], Wle, p.Add_definite_assignment_assertions_to_all_uninitialized_properties); + } + function rEe(e, t, n) { + nf(n); + const i = N.updatePropertyDeclaration( + n, + n.modifiers, + n.name, + N.createToken( + 54 + /* ExclamationToken */ + ), + n.type, + n.initializer + ); + e.replaceNode(t, n, i); + } + function CGe(e, t) { + const n = sn.ChangeTracker.with(e, (i) => nEe(i, e.sourceFile, t)); + return Os(zle, n, [p.Add_undefined_type_to_property_0, t.prop.name.getText()], Ule, p.Add_undefined_type_to_all_uninitialized_properties); + } + function nEe(e, t, n) { + const i = N.createKeywordTypeNode( + 157 + /* UndefinedKeyword */ + ), s = L0(n.type) ? n.type.types.concat(i) : [n.type, i], o = N.createUnionTypeNode(s); + n.isJs ? e.addJSDocTags(t, n.prop, [N.createJSDocTypeTag( + /*tagName*/ + void 0, + N.createJSDocTypeExpression(o) + )]) : e.replaceNode(t, n.type, o); + } + function EGe(e, t) { + if (t.isJs) return; + const n = e.program.getTypeChecker(), i = sEe(n, t.prop); + if (!i) return; + const s = sn.ChangeTracker.with(e, (o) => iEe(o, e.sourceFile, t.prop, i)); + return Os(zle, s, [p.Add_initializer_to_property_0, t.prop.name.getText()], Vle, p.Add_initializers_to_all_uninitialized_properties); + } + function iEe(e, t, n, i) { + nf(n); + const s = N.updatePropertyDeclaration( + n, + n.modifiers, + n.name, + n.questionToken, + n.type, + i + ); + e.replaceNode(t, n, s); + } + function sEe(e, t) { + return aEe(e, e.getTypeFromTypeNode(t.type)); + } + function aEe(e, t) { + if (t.flags & 512) + return t === e.getFalseType() || t === e.getFalseType( + /*fresh*/ + !0 + ) ? N.createFalse() : N.createTrue(); + if (t.isStringLiteral()) + return N.createStringLiteral(t.value); + if (t.isNumberLiteral()) + return N.createNumericLiteral(t.value); + if (t.flags & 2048) + return N.createBigIntLiteral(t.value); + if (t.isUnion()) + return Dc(t.types, (n) => aEe(e, n)); + if (t.isClass()) { + const n = Fh(t.symbol); + if (!n || $n( + n, + 64 + /* Abstract */ + )) return; + const i = Ug(n); + return i && i.parameters.length ? void 0 : N.createNewExpression( + N.createIdentifier(t.symbol.name), + /*typeArguments*/ + void 0, + /*argumentsArray*/ + void 0 + ); + } else if (e.isArrayLikeType(t)) + return N.createArrayLiteralExpression(); + } + var qle = "requireInTs", oEe = [p.require_call_may_be_converted_to_an_import.code]; + Qs({ + errorCodes: oEe, + getCodeActions(e) { + const t = lEe(e.sourceFile, e.program, e.span.start, e.preferences); + if (!t) + return; + const n = sn.ChangeTracker.with(e, (i) => cEe(i, e.sourceFile, t)); + return [Os(qle, n, p.Convert_require_to_import, qle, p.Convert_all_require_to_import)]; + }, + fixIds: [qle], + getAllCodeActions: (e) => Ga(e, oEe, (t, n) => { + const i = lEe(n.file, e.program, n.start, e.preferences); + i && cEe(t, e.sourceFile, i); + }) + }); + function cEe(e, t, n) { + const { allowSyntheticDefaults: i, defaultImportName: s, namedImports: o, statement: c, moduleSpecifier: _ } = n; + e.replaceNode( + t, + c, + s && !i ? N.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + s, + N.createExternalModuleReference(_) + ) : N.createImportDeclaration( + /*modifiers*/ + void 0, + N.createImportClause( + /*isTypeOnly*/ + !1, + s, + o + ), + _, + /*attributes*/ + void 0 + ) + ); + } + function lEe(e, t, n, i) { + const { parent: s } = Si(e, n); + __( + s, + /*requireStringLiteralLikeArgument*/ + !0 + ) || E.failBadSyntaxKind(s); + const o = Ws(s.parent, Kn), c = tf(e, i), _ = jn(o.name, Me), u = Nf(o.name) ? DGe(o.name) : void 0; + if (_ || u) { + const m = ya(s.arguments); + return { + allowSyntheticDefaults: wx(t.getCompilerOptions()), + defaultImportName: _, + namedImports: u, + statement: Ws(o.parent.parent, pc), + moduleSpecifier: NS(m) ? N.createStringLiteral( + m.text, + c === 0 + /* Single */ + ) : m + }; + } + } + function DGe(e) { + const t = []; + for (const n of e.elements) { + if (!Me(n.name) || n.initializer) + return; + t.push(N.createImportSpecifier( + /*isTypeOnly*/ + !1, + jn(n.propertyName, Me), + n.name + )); + } + if (t.length) + return N.createNamedImports(t); + } + var Hle = "useDefaultImport", uEe = [p.Import_may_be_converted_to_a_default_import.code]; + Qs({ + errorCodes: uEe, + getCodeActions(e) { + const { sourceFile: t, span: { start: n } } = e, i = _Ee(t, n); + if (!i) return; + const s = sn.ChangeTracker.with(e, (o) => fEe(o, t, i, e.preferences)); + return [Os(Hle, s, p.Convert_to_default_import, Hle, p.Convert_all_to_default_imports)]; + }, + fixIds: [Hle], + getAllCodeActions: (e) => Ga(e, uEe, (t, n) => { + const i = _Ee(n.file, n.start); + i && fEe(t, n.file, i, e.preferences); + }) + }); + function _Ee(e, t) { + const n = Si(e, t); + if (!Me(n)) return; + const { parent: i } = n; + if (_l(i) && Mh(i.moduleReference)) + return { importNode: i, name: n, moduleSpecifier: i.moduleReference.expression }; + if (Yg(i) && zo(i.parent.parent)) { + const s = i.parent.parent; + return { importNode: s, name: n, moduleSpecifier: s.moduleSpecifier }; + } + } + function fEe(e, t, n, i) { + e.replaceNode(t, n.importNode, p1( + n.name, + /*namedImports*/ + void 0, + n.moduleSpecifier, + tf(t, i) + )); + } + var Gle = "useBigintLiteral", pEe = [ + p.Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers.code + ]; + Qs({ + errorCodes: pEe, + getCodeActions: function(t) { + const n = sn.ChangeTracker.with(t, (i) => dEe(i, t.sourceFile, t.span)); + if (n.length > 0) + return [Os(Gle, n, p.Convert_to_a_bigint_numeric_literal, Gle, p.Convert_all_to_bigint_numeric_literals)]; + }, + fixIds: [Gle], + getAllCodeActions: (e) => Ga(e, pEe, (t, n) => dEe(t, n.file, n)) + }); + function dEe(e, t, n) { + const i = jn(Si(t, n.start), d_); + if (!i) + return; + const s = i.getText(t) + "n"; + e.replaceNode(t, i, N.createBigIntLiteral(s)); + } + var wGe = "fixAddModuleReferTypeMissingTypeof", $le = wGe, mEe = [p.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0.code]; + Qs({ + errorCodes: mEe, + getCodeActions: function(t) { + const { sourceFile: n, span: i } = t, s = gEe(n, i.start), o = sn.ChangeTracker.with(t, (c) => hEe(c, n, s)); + return [Os($le, o, p.Add_missing_typeof, $le, p.Add_missing_typeof)]; + }, + fixIds: [$le], + getAllCodeActions: (e) => Ga(e, mEe, (t, n) => hEe(t, e.sourceFile, gEe(n.file, n.start))) + }); + function gEe(e, t) { + const n = Si(e, t); + return E.assert(n.kind === 102, "This token should be an ImportKeyword"), E.assert(n.parent.kind === 205, "Token parent should be an ImportType"), n.parent; + } + function hEe(e, t, n) { + const i = N.updateImportTypeNode( + n, + n.argument, + n.attributes, + n.qualifier, + n.typeArguments, + /*isTypeOf*/ + !0 + ); + e.replaceNode(t, n, i); + } + var Xle = "wrapJsxInFragment", yEe = [p.JSX_expressions_must_have_one_parent_element.code]; + Qs({ + errorCodes: yEe, + getCodeActions: function(t) { + const { sourceFile: n, span: i } = t, s = vEe(n, i.start); + if (!s) return; + const o = sn.ChangeTracker.with(t, (c) => bEe(c, n, s)); + return [Os(Xle, o, p.Wrap_in_JSX_fragment, Xle, p.Wrap_all_unparented_JSX_in_JSX_fragment)]; + }, + fixIds: [Xle], + getAllCodeActions: (e) => Ga(e, yEe, (t, n) => { + const i = vEe(e.sourceFile, n.start); + i && bEe(t, e.sourceFile, i); + }) + }); + function vEe(e, t) { + let s = Si(e, t).parent.parent; + if (!(!fn(s) && (s = s.parent, !fn(s))) && tc(s.operatorToken)) + return s; + } + function bEe(e, t, n) { + const i = PGe(n); + i && e.replaceNode(t, n, N.createJsxFragment(N.createJsxOpeningFragment(), i, N.createJsxJsxClosingFragment())); + } + function PGe(e) { + const t = []; + let n = e; + for (; ; ) + if (fn(n) && tc(n.operatorToken) && n.operatorToken.kind === 28) { + if (t.push(n.left), HP(n.right)) + return t.push(n.right), t; + if (fn(n.right)) { + n = n.right; + continue; + } else return; + } else return; + } + var Qle = "wrapDecoratorInParentheses", SEe = [p.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator.code]; + Qs({ + errorCodes: SEe, + getCodeActions: function(t) { + const n = sn.ChangeTracker.with(t, (i) => TEe(i, t.sourceFile, t.span.start)); + return [Os(Qle, n, p.Wrap_in_parentheses, Qle, p.Wrap_all_invalid_decorator_expressions_in_parentheses)]; + }, + fixIds: [Qle], + getAllCodeActions: (e) => Ga(e, SEe, (t, n) => TEe(t, n.file, n.start)) + }); + function TEe(e, t, n) { + const i = Si(t, n), s = ur(i, ll); + E.assert(!!s, "Expected position to be owned by a decorator."); + const o = N.createParenthesizedExpression(s.expression); + e.replaceNode(t, s.expression, o); + } + var Yle = "fixConvertToMappedObjectType", xEe = [p.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead.code]; + Qs({ + errorCodes: xEe, + getCodeActions: function(t) { + const { sourceFile: n, span: i } = t, s = kEe(n, i.start); + if (!s) return; + const o = sn.ChangeTracker.with(t, (_) => CEe(_, n, s)), c = An(s.container.name); + return [Os(Yle, o, [p.Convert_0_to_mapped_object_type, c], Yle, [p.Convert_0_to_mapped_object_type, c])]; + }, + fixIds: [Yle], + getAllCodeActions: (e) => Ga(e, xEe, (t, n) => { + const i = kEe(n.file, n.start); + i && CEe(t, n.file, i); + }) + }); + function kEe(e, t) { + const n = Si(e, t), i = jn(n.parent.parent, r1); + if (!i) return; + const s = Yl(i.parent) ? i.parent : jn(i.parent.parent, jp); + if (s) + return { indexSignature: i, container: s }; + } + function NGe(e, t) { + return N.createTypeAliasDeclaration(e.modifiers, e.name, e.typeParameters, t); + } + function CEe(e, t, { indexSignature: n, container: i }) { + const o = (Yl(i) ? i.members : i.type.members).filter((g) => !r1(g)), c = ya(n.parameters), _ = N.createTypeParameterDeclaration( + /*modifiers*/ + void 0, + Ws(c.name, Me), + c.type + ), u = N.createMappedTypeNode( + kS(n) ? N.createModifier( + 148 + /* ReadonlyKeyword */ + ) : void 0, + _, + /*nameType*/ + void 0, + n.questionToken, + n.type, + /*members*/ + void 0 + ), m = N.createIntersectionTypeNode([ + ...j4(i), + u, + ...o.length ? [N.createTypeLiteralNode(o)] : He + ]); + e.replaceNode(t, i, NGe(i, m)); + } + var EEe = "removeAccidentalCallParentheses", AGe = [ + p.This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without.code + ]; + Qs({ + errorCodes: AGe, + getCodeActions(e) { + const t = ur(Si(e.sourceFile, e.span.start), Fs); + if (!t) + return; + const n = sn.ChangeTracker.with(e, (i) => { + i.deleteRange(e.sourceFile, { pos: t.expression.end, end: t.end }); + }); + return [Od(EEe, n, p.Remove_parentheses)]; + }, + fixIds: [EEe] + }); + var Zle = "removeUnnecessaryAwait", DEe = [ + p.await_has_no_effect_on_the_type_of_this_expression.code + ]; + Qs({ + errorCodes: DEe, + getCodeActions: function(t) { + const n = sn.ChangeTracker.with(t, (i) => wEe(i, t.sourceFile, t.span)); + if (n.length > 0) + return [Os(Zle, n, p.Remove_unnecessary_await, Zle, p.Remove_all_unnecessary_uses_of_await)]; + }, + fixIds: [Zle], + getAllCodeActions: (e) => Ga(e, DEe, (t, n) => wEe(t, n.file, n)) + }); + function wEe(e, t, n) { + const i = jn( + Si(t, n.start), + (_) => _.kind === 135 + /* AwaitKeyword */ + ), s = i && jn(i.parent, n1); + if (!s) + return; + let o = s; + if (Yu(s.parent)) { + const _ = qC( + s.expression, + /*stopAtCallExpressions*/ + !1 + ); + if (Me(_)) { + const u = tl(s.parent.pos, t); + u && u.kind !== 105 && (o = s.parent); + } + } + e.replaceNode(t, o, s.expression); + } + var PEe = [p.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both.code], Kle = "splitTypeOnlyImport"; + Qs({ + errorCodes: PEe, + fixIds: [Kle], + getCodeActions: function(t) { + const n = sn.ChangeTracker.with(t, (i) => AEe(i, NEe(t.sourceFile, t.span), t)); + if (n.length) + return [Os(Kle, n, p.Split_into_two_separate_import_declarations, Kle, p.Split_all_invalid_type_only_imports)]; + }, + getAllCodeActions: (e) => Ga(e, PEe, (t, n) => { + AEe(t, NEe(e.sourceFile, n), e); + }) + }); + function NEe(e, t) { + return ur(Si(e, t.start), zo); + } + function AEe(e, t, n) { + if (!t) + return; + const i = E.checkDefined(t.importClause); + e.replaceNode( + n.sourceFile, + t, + N.updateImportDeclaration( + t, + t.modifiers, + N.updateImportClause( + i, + i.isTypeOnly, + i.name, + /*namedBindings*/ + void 0 + ), + t.moduleSpecifier, + t.attributes + ) + ), e.insertNodeAfter( + n.sourceFile, + t, + N.createImportDeclaration( + /*modifiers*/ + void 0, + N.updateImportClause( + i, + i.isTypeOnly, + /*name*/ + void 0, + i.namedBindings + ), + t.moduleSpecifier, + t.attributes + ) + ); + } + var eue = "fixConvertConstToLet", IEe = [p.Cannot_assign_to_0_because_it_is_a_constant.code]; + Qs({ + errorCodes: IEe, + getCodeActions: function(t) { + const { sourceFile: n, span: i, program: s } = t, o = FEe(n, i.start, s); + if (o === void 0) return; + const c = sn.ChangeTracker.with(t, (_) => OEe(_, n, o.token)); + return [uce(eue, c, p.Convert_const_to_let, eue, p.Convert_all_const_to_let)]; + }, + getAllCodeActions: (e) => { + const { program: t } = e, n = /* @__PURE__ */ new Set(); + return gk(sn.ChangeTracker.with(e, (i) => { + hk(e, IEe, (s) => { + const o = FEe(s.file, s.start, t); + if (o && Lp(n, Zs(o.symbol))) + return OEe(i, s.file, o.token); + }); + })); + }, + fixIds: [eue] + }); + function FEe(e, t, n) { + var i; + const o = n.getTypeChecker().getSymbolAtLocation(Si(e, t)); + if (o === void 0) return; + const c = jn((i = o?.valueDeclaration) == null ? void 0 : i.parent, Il); + if (c === void 0) return; + const _ = Xa(c, 87, e); + if (_ !== void 0) + return { symbol: o, token: _ }; + } + function OEe(e, t, n) { + e.replaceNode(t, n, N.createToken( + 121 + /* LetKeyword */ + )); + } + var tue = "fixExpectedComma", IGe = p._0_expected.code, LEe = [IGe]; + Qs({ + errorCodes: LEe, + getCodeActions(e) { + const { sourceFile: t } = e, n = MEe(t, e.span.start, e.errorCode); + if (!n) return; + const i = sn.ChangeTracker.with(e, (s) => REe(s, t, n)); + return [Os( + tue, + i, + [p.Change_0_to_1, ";", ","], + tue, + [p.Change_0_to_1, ";", ","] + )]; + }, + fixIds: [tue], + getAllCodeActions: (e) => Ga(e, LEe, (t, n) => { + const i = MEe(n.file, n.start, n.code); + i && REe(t, e.sourceFile, i); + }) + }); + function MEe(e, t, n) { + const i = Si(e, t); + return i.kind === 27 && i.parent && (oa(i.parent) || Ql(i.parent)) ? { node: i } : void 0; + } + function REe(e, t, { node: n }) { + const i = N.createToken( + 28 + /* CommaToken */ + ); + e.replaceNode(t, n, i); + } + var FGe = "addVoidToPromise", jEe = "addVoidToPromise", BEe = [ + p.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments.code, + p.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise.code + ]; + Qs({ + errorCodes: BEe, + fixIds: [jEe], + getCodeActions(e) { + const t = sn.ChangeTracker.with(e, (n) => JEe(n, e.sourceFile, e.span, e.program)); + if (t.length > 0) + return [Os(FGe, t, p.Add_void_to_Promise_resolved_without_a_value, jEe, p.Add_void_to_all_Promises_resolved_without_a_value)]; + }, + getAllCodeActions(e) { + return Ga(e, BEe, (t, n) => JEe(t, n.file, n, e.program, /* @__PURE__ */ new Set())); + } + }); + function JEe(e, t, n, i, s) { + const o = Si(t, n.start); + if (!Me(o) || !Fs(o.parent) || o.parent.expression !== o || o.parent.arguments.length !== 0) return; + const c = i.getTypeChecker(), _ = c.getSymbolAtLocation(o), u = _?.valueDeclaration; + if (!u || !Ii(u) || !Yb(u.parent.parent) || s?.has(u)) return; + s?.add(u); + const m = OGe(u.parent.parent); + if (at(m)) { + const g = m[0], h = !L0(g) && !IS(g) && IS(N.createUnionTypeNode([g, N.createKeywordTypeNode( + 116 + /* VoidKeyword */ + )]).types[0]); + h && e.insertText(t, g.pos, "("), e.insertText(t, g.end, h ? ") | void" : " | void"); + } else { + const g = c.getResolvedSignature(o.parent), h = g?.parameters[0], S = h && c.getTypeOfSymbolAtLocation(h, u.parent.parent); + an(u) ? (!S || S.flags & 3) && (e.insertText(t, u.parent.parent.end, ")"), e.insertText(t, aa(t.text, u.parent.parent.pos), "/** @type {Promise} */(")) : (!S || S.flags & 2) && e.insertText(t, u.parent.parent.expression.end, ""); + } + } + function OGe(e) { + var t; + if (an(e)) { + if (Yu(e.parent)) { + const n = (t = Y1(e.parent)) == null ? void 0 : t.typeExpression.type; + if (n && Y_(n) && Me(n.typeName) && An(n.typeName) === "Promise") + return n.typeArguments; + } + } else + return e.typeArguments; + } + var bk = {}; + Ec(bk, { + CompletionKind: () => n4e, + CompletionSource: () => WEe, + SortText: () => Du, + StringCompletions: () => PH, + SymbolOriginInfoKind: () => UEe, + createCompletionDetails: () => gL, + createCompletionDetailsForSymbol: () => uue, + getCompletionEntriesFromSymbols: () => cue, + getCompletionEntryDetails: () => _$e, + getCompletionEntrySymbol: () => p$e, + getCompletionsAtPosition: () => WGe, + getDefaultCommitCharacters: () => KS, + getPropertiesForObjectExpression: () => EH, + moduleSpecifierResolutionCacheAttemptLimit: () => zEe, + moduleSpecifierResolutionLimit: () => rue + }); + var rue = 100, zEe = 1e3, Du = { + // Presets + LocalDeclarationPriority: "10", + LocationPriority: "11", + OptionalMember: "12", + MemberDeclaredBySpreadAssignment: "13", + SuggestedClassMembers: "14", + GlobalsOrKeywords: "15", + AutoImportSuggestions: "16", + ClassMemberSnippets: "17", + JavascriptIdentifiers: "18", + // Transformations + Deprecated(e) { + return "z" + e; + }, + ObjectLiteralProperty(e, t) { + return `${e}\0${t}\0`; + }, + SortBelow(e) { + return e + "1"; + } + }, bm = [".", ",", ";"], yH = [".", ";"], WEe = /* @__PURE__ */ ((e) => (e.ThisProperty = "ThisProperty/", e.ClassMemberSnippet = "ClassMemberSnippet/", e.TypeOnlyAlias = "TypeOnlyAlias/", e.ObjectLiteralMethodSnippet = "ObjectLiteralMethodSnippet/", e.SwitchCases = "SwitchCases/", e.ObjectLiteralMemberWithComma = "ObjectLiteralMemberWithComma/", e))(WEe || {}), UEe = /* @__PURE__ */ ((e) => (e[e.ThisType = 1] = "ThisType", e[e.SymbolMember = 2] = "SymbolMember", e[e.Export = 4] = "Export", e[e.Promise = 8] = "Promise", e[e.Nullable = 16] = "Nullable", e[e.ResolvedExport = 32] = "ResolvedExport", e[e.TypeOnlyAlias = 64] = "TypeOnlyAlias", e[e.ObjectLiteralMethod = 128] = "ObjectLiteralMethod", e[e.Ignore = 256] = "Ignore", e[e.ComputedPropertyName = 512] = "ComputedPropertyName", e[ + e.SymbolMemberNoExport = 2 + /* SymbolMember */ + ] = "SymbolMemberNoExport", e[e.SymbolMemberExport = 6] = "SymbolMemberExport", e))(UEe || {}); + function LGe(e) { + return !!(e.kind & 1); + } + function MGe(e) { + return !!(e.kind & 2); + } + function dL(e) { + return !!(e && e.kind & 4); + } + function Cw(e) { + return !!(e && e.kind === 32); + } + function RGe(e) { + return dL(e) || Cw(e) || nue(e); + } + function jGe(e) { + return (dL(e) || Cw(e)) && !!e.isFromPackageJson; + } + function BGe(e) { + return !!(e.kind & 8); + } + function JGe(e) { + return !!(e.kind & 16); + } + function VEe(e) { + return !!(e && e.kind & 64); + } + function qEe(e) { + return !!(e && e.kind & 128); + } + function zGe(e) { + return !!(e && e.kind & 256); + } + function nue(e) { + return !!(e && e.kind & 512); + } + function HEe(e, t, n, i, s, o, c, _, u) { + var m, g, h, S; + const T = ao(), C = c || H3(i.getCompilerOptions()) || ((m = o.autoImportSpecifierExcludeRegexes) == null ? void 0 : m.length); + let D = !1, w = 0, A = 0, O = 0, F = 0; + const R = u({ + tryResolve: V, + skippedAny: () => D, + resolvedAny: () => A > 0, + resolvedBeyondLimit: () => A > rue + }), W = F ? ` (${(O / F * 100).toFixed(1)}% hit rate)` : ""; + return (g = t.log) == null || g.call(t, `${e}: resolved ${A} module specifiers, plus ${w} ambient and ${O} from cache${W}`), (h = t.log) == null || h.call(t, `${e}: response is ${D ? "incomplete" : "complete"}`), (S = t.log) == null || S.call(t, `${e}: ${ao() - T}`), R; + function V($, U) { + if (U) { + const re = n.getModuleSpecifierForBestExportInfo($, s, _); + return re && w++, re || "failed"; + } + const _e = C || o.allowIncompleteCompletions && A < rue, Z = !_e && o.allowIncompleteCompletions && F < zEe, J = _e || Z ? n.getModuleSpecifierForBestExportInfo($, s, _, Z) : void 0; + return (!_e && !Z || Z && !J) && (D = !0), A += J?.computedWithoutCacheCount || 0, O += $.length - (J?.computedWithoutCacheCount || 0), Z && F++, J || (C ? "failed" : "skipped"); + } + } + function KS(e) { + return e ? [] : bm; + } + function WGe(e, t, n, i, s, o, c, _, u, m, g = !1) { + var h; + const { previousToken: S } = TH(s, i); + if (c && !lk(i, s, S) && !k$e(i, c, S, s)) + return; + if (c === " ") + return o.includeCompletionsForImportStatements && o.includeCompletionsWithInsertText ? { + isGlobalCompletion: !0, + isMemberCompletion: !1, + isNewIdentifierLocation: !0, + isIncomplete: !0, + entries: [], + defaultCommitCharacters: KS( + /*isNewIdentifierLocation*/ + !0 + ) + } : void 0; + const T = t.getCompilerOptions(), C = t.getTypeChecker(), D = o.allowIncompleteCompletions ? (h = e.getIncompleteCompletionsCache) == null ? void 0 : h.call(e) : void 0; + if (D && _ === 3 && S && Me(S)) { + const O = UGe(D, i, S, t, e, o, u, s); + if (O) + return O; + } else + D?.clear(); + const w = PH.getStringLiteralCompletions(i, s, S, T, e, t, n, o, g); + if (w) + return w; + if (S && g4(S.parent) && (S.kind === 83 || S.kind === 88 || S.kind === 80)) + return l$e(S.parent); + const A = i4e( + t, + n, + i, + T, + s, + o, + /*detailsEntryId*/ + void 0, + e, + m, + u + ); + if (A) + switch (A.kind) { + case 0: + const O = $Ge(i, e, t, T, n, A, o, m, s, g); + return O?.isIncomplete && D?.set(O), O; + case 1: + return iue([ + ...Lv.getJSDocTagNameCompletions(), + ...$Ee( + i, + s, + C, + T, + o, + /*tagNameOnly*/ + !0 + ) + ]); + case 2: + return iue([ + ...Lv.getJSDocTagCompletions(), + ...$Ee( + i, + s, + C, + T, + o, + /*tagNameOnly*/ + !1 + ) + ]); + case 3: + return iue(Lv.getJSDocParameterNameCompletions(A.tag)); + case 4: + return HGe(A.keywordCompletions, A.isNewIdentifierLocation); + default: + return E.assertNever(A); + } + } + function mL(e, t) { + var n, i; + let s = hP(e.sortText, t.sortText); + return s === 0 && (s = hP(e.name, t.name)), s === 0 && ((n = e.data) != null && n.moduleSpecifier) && ((i = t.data) != null && i.moduleSpecifier) && (s = K3( + e.data.moduleSpecifier, + t.data.moduleSpecifier + )), s === 0 ? -1 : s; + } + function GEe(e) { + return !!e?.moduleSpecifier; + } + function UGe(e, t, n, i, s, o, c, _) { + const u = e.get(); + if (!u) return; + const m = h_(t, _), g = n.text.toLowerCase(), h = LA(t, s, i, o, c), S = HEe( + "continuePreviousIncompleteResponse", + s, + Eu.createImportSpecifierResolver(t, i, s, o), + i, + n.getStart(), + o, + /*isForImportStatementCompletion*/ + !1, + cv(n), + (T) => { + const C = Li(u.entries, (D) => { + var w; + if (!D.hasAction || !D.source || !D.data || GEe(D.data)) + return D; + if (!v4e(D.name, g)) + return; + const { origin: A } = E.checkDefined(s4e(D.name, D.data, i, s)), O = h.get(t.path, D.data.exportMapKey), F = O && T.tryResolve(O, !vl(Op(A.moduleSymbol.name))); + if (F === "skipped") return D; + if (!F || F === "failed") { + (w = s.log) == null || w.call(s, `Unexpected failure resolving auto import for '${D.name}' from '${D.source}'`); + return; + } + const R = { + ...A, + kind: 32, + moduleSpecifier: F.moduleSpecifier + }; + return D.data = t4e(R), D.source = oue(R), D.sourceDisplay = [Lf(R.moduleSpecifier)], D; + }); + return T.skippedAny() || (u.isIncomplete = void 0), C; + } + ); + return u.entries = S, u.flags = (u.flags || 0) | 4, u.optionalReplacementSpan = YEe(m), u; + } + function iue(e) { + return { + isGlobalCompletion: !1, + isMemberCompletion: !1, + isNewIdentifierLocation: !1, + entries: e, + defaultCommitCharacters: KS( + /*isNewIdentifierLocation*/ + !1 + ) + }; + } + function $Ee(e, t, n, i, s, o) { + const c = Si(e, t); + if (!TC(c) && !Pd(c)) + return []; + const _ = Pd(c) ? c : c.parent; + if (!Pd(_)) + return []; + const u = _.parent; + if (!vs(u)) + return []; + const m = Gu(e), g = s.includeCompletionsWithSnippetText || void 0, h = b0(_.tags, (S) => Af(S) && S.getEnd() <= t); + return Li(u.parameters, (S) => { + if (!gC(S).length) { + if (Me(S.name)) { + const T = { tabstop: 1 }, C = S.name.text; + let D = YA( + C, + S.initializer, + S.dotDotDotToken, + m, + /*isObject*/ + !1, + /*isSnippet*/ + !1, + n, + i, + s + ), w = g ? YA( + C, + S.initializer, + S.dotDotDotToken, + m, + /*isObject*/ + !1, + /*isSnippet*/ + !0, + n, + i, + s, + T + ) : void 0; + return o && (D = D.slice(1), w && (w = w.slice(1))), { + name: D, + kind: "parameter", + sortText: Du.LocationPriority, + insertText: g ? w : void 0, + isSnippet: g + }; + } else if (S.parent.parameters.indexOf(S) === h) { + const T = `param${h}`, C = XEe( + T, + S.name, + S.initializer, + S.dotDotDotToken, + m, + /*isSnippet*/ + !1, + n, + i, + s + ), D = g ? XEe( + T, + S.name, + S.initializer, + S.dotDotDotToken, + m, + /*isSnippet*/ + !0, + n, + i, + s + ) : void 0; + let w = C.join(N0(i) + "* "), A = D?.join(N0(i) + "* "); + return o && (w = w.slice(1), A && (A = A.slice(1))), { + name: w, + kind: "parameter", + sortText: Du.LocationPriority, + insertText: g ? A : void 0, + isSnippet: g + }; + } + } + }); + } + function XEe(e, t, n, i, s, o, c, _, u) { + if (!s) + return [ + YA( + e, + n, + i, + s, + /*isObject*/ + !1, + o, + c, + _, + u, + { tabstop: 1 } + ) + ]; + return m(e, t, n, i, { tabstop: 1 }); + function m(h, S, T, C, D) { + if (Nf(S) && !C) { + const A = { tabstop: D.tabstop }, O = YA( + h, + T, + C, + s, + /*isObject*/ + !0, + o, + c, + _, + u, + A + ); + let F = []; + for (const R of S.elements) { + const W = g(h, R, A); + if (W) + F.push(...W); + else { + F = void 0; + break; + } + } + if (F) + return D.tabstop = A.tabstop, [O, ...F]; + } + return [ + YA( + h, + T, + C, + s, + /*isObject*/ + !1, + o, + c, + _, + u, + D + ) + ]; + } + function g(h, S, T) { + if (!S.propertyName && Me(S.name) || Me(S.name)) { + const C = S.propertyName ? E4(S.propertyName) : S.name.text; + if (!C) + return; + const D = `${h}.${C}`; + return [ + YA( + D, + S.initializer, + S.dotDotDotToken, + s, + /*isObject*/ + !1, + o, + c, + _, + u, + T + ) + ]; + } else if (S.propertyName) { + const C = E4(S.propertyName); + return C && m(`${h}.${C}`, S.name, S.initializer, S.dotDotDotToken, T); + } + } + } + function YA(e, t, n, i, s, o, c, _, u, m) { + if (o && E.assertIsDefined(m), t && (e = VGe(e, t)), o && (e = Hb(e)), i) { + let g = "*"; + if (s) + E.assert(!n, "Cannot annotate a rest parameter with type 'Object'."), g = "Object"; + else { + if (t) { + const T = c.getTypeAtLocation(t.parent); + if (!(T.flags & 16385)) { + const C = t.getSourceFile(), w = tf(C, u) === 0 ? 268435456 : 0, A = c.typeToTypeNode(T, ur(t, vs), w); + if (A) { + const O = o ? SH({ + removeComments: !0, + module: _.module, + moduleResolution: _.moduleResolution, + target: _.target + }) : u1({ + removeComments: !0, + module: _.module, + moduleResolution: _.moduleResolution, + target: _.target + }); + on( + A, + 1 + /* SingleLine */ + ), g = O.printNode(4, A, C); + } + } + } + o && g === "*" && (g = `\${${m.tabstop++}:${g}}`); + } + const h = !s && n ? "..." : "", S = o ? `\${${m.tabstop++}}` : ""; + return `@param {${h}${g}} ${e} ${S}`; + } else { + const g = o ? `\${${m.tabstop++}}` : ""; + return `@param ${e} ${g}`; + } + } + function VGe(e, t) { + const n = t.getText().trim(); + return n.includes(` +`) || n.length > 80 ? `[${e}]` : `[${e}=${n}]`; + } + function qGe(e) { + return { + name: Xs(e), + kind: "keyword", + kindModifiers: "", + sortText: Du.GlobalsOrKeywords + }; + } + function HGe(e, t) { + return { + isGlobalCompletion: !1, + isMemberCompletion: !1, + isNewIdentifierLocation: t, + entries: e.slice(), + defaultCommitCharacters: KS(t) + }; + } + function QEe(e, t, n) { + return { + kind: 4, + keywordCompletions: o4e(e, t), + isNewIdentifierLocation: n + }; + } + function GGe(e) { + switch (e) { + case 156: + return 8; + default: + E.fail("Unknown mapping from SyntaxKind to KeywordCompletionFilters"); + } + } + function YEe(e) { + return e?.kind === 80 ? e_(e) : void 0; + } + function $Ge(e, t, n, i, s, o, c, _, u, m) { + const { + symbols: g, + contextToken: h, + completionKind: S, + isInSnippetScope: T, + isNewIdentifierLocation: C, + location: D, + propertyAccessToConvert: w, + keywordFilters: A, + symbolToOriginInfoMap: O, + recommendedCompletion: F, + isJsxInitializer: R, + isTypeOnlyLocation: W, + isJsxIdentifierExpected: V, + isRightOfOpenTag: $, + isRightOfDotOrQuestionDot: U, + importStatementCompletion: _e, + insideJsDocTagTypeExpression: Z, + symbolToSortTextMap: J, + hasUnresolvedAutoImports: re, + defaultCommitCharacters: te + } = o; + let ie = o.literals; + const le = n.getTypeChecker(); + if (V3(e.scriptKind) === 1) { + const oe = QGe(D, e); + if (oe) + return oe; + } + const Te = ur(h, i6); + if (Te && (hte(h) || Lb(h, Te.expression))) { + const oe = B9(le, Te.parent.clauses); + ie = ie.filter((ke) => !oe.hasValue(ke)), g.forEach((ke, ue) => { + if (ke.valueDeclaration && j0(ke.valueDeclaration)) { + const it = le.getConstantValue(ke.valueDeclaration); + it !== void 0 && oe.hasValue(it) && (O[ue] = { + kind: 256 + /* Ignore */ + }); + } + }); + } + const q = vR(), me = ZEe(e, i); + if (me && !C && (!g || g.length === 0) && A === 0) + return; + const Ce = cue( + g, + q, + /*replacementToken*/ + void 0, + h, + D, + u, + e, + t, + n, + pa(i), + s, + S, + c, + i, + _, + W, + w, + V, + R, + _e, + F, + O, + J, + V, + $, + m + ); + if (A !== 0) + for (const oe of o4e(A, !Z && Gu(e))) + (W && ow(sS(oe.name)) || !W && F$e(oe.name) || !Ce.has(oe.name)) && (Ce.add(oe.name), xy( + q, + oe, + mL, + /*equalityComparer*/ + void 0, + /*allowDuplicates*/ + !0 + )); + for (const oe of v$e(h, u)) + Ce.has(oe.name) || (Ce.add(oe.name), xy( + q, + oe, + mL, + /*equalityComparer*/ + void 0, + /*allowDuplicates*/ + !0 + )); + for (const oe of ie) { + const ke = ZGe(e, c, oe); + Ce.add(ke.name), xy( + q, + ke, + mL, + /*equalityComparer*/ + void 0, + /*allowDuplicates*/ + !0 + ); + } + me || YGe(e, D.pos, Ce, pa(i), q); + let Ee; + if (c.includeCompletionsWithInsertText && h && !$ && !U && (Ee = ur(h, kD))) { + const oe = KEe(Ee, e, c, i, t, n, _); + oe && q.push(oe.entry); + } + return { + flags: o.flags, + isGlobalCompletion: T, + isIncomplete: c.allowIncompleteCompletions && re ? !0 : void 0, + isMemberCompletion: XGe(S), + isNewIdentifierLocation: C, + optionalReplacementSpan: YEe(D), + entries: q, + defaultCommitCharacters: te ?? KS(C) + }; + } + function ZEe(e, t) { + return !Gu(e) || !!iD(e, t); + } + function KEe(e, t, n, i, s, o, c) { + const _ = e.clauses, u = o.getTypeChecker(), m = u.getTypeAtLocation(e.parent.expression); + if (m && m.isUnion() && Ri(m.types, (g) => g.isLiteral())) { + const g = B9(u, _), h = pa(i), S = tf(t, n), T = Eu.createImportAdder(t, o, n, s), C = []; + for (const W of m.types) + if (W.flags & 1024) { + E.assert(W.symbol, "An enum member type should have a symbol"), E.assert(W.symbol.parent, "An enum member type should have a parent symbol (the enum symbol)"); + const V = W.symbol.valueDeclaration && u.getConstantValue(W.symbol.valueDeclaration); + if (V !== void 0) { + if (g.hasValue(V)) + continue; + g.addValue(V); + } + const $ = Eu.typeToAutoImportableTypeNode(u, T, W, e, h); + if (!$) + return; + const U = vH($, h, S); + if (!U) + return; + C.push(U); + } else if (!g.hasValue(W.value)) + switch (typeof W.value) { + case "object": + C.push(W.value.negative ? N.createPrefixUnaryExpression(41, N.createBigIntLiteral({ negative: !1, base10Value: W.value.base10Value })) : N.createBigIntLiteral(W.value)); + break; + case "number": + C.push(W.value < 0 ? N.createPrefixUnaryExpression(41, N.createNumericLiteral(-W.value)) : N.createNumericLiteral(W.value)); + break; + case "string": + C.push(N.createStringLiteral( + W.value, + S === 0 + /* Single */ + )); + break; + } + if (C.length === 0) + return; + const D = gr(C, (W) => N.createCaseClause(W, [])), w = Jh(s, c?.options), A = SH({ + removeComments: !0, + module: i.module, + moduleResolution: i.moduleResolution, + target: i.target, + newLine: OA(w) + }), O = c ? (W) => A.printAndFormatNode(4, W, t, c) : (W) => A.printNode(4, W, t), F = gr(D, (W, V) => n.includeCompletionsWithSnippetText ? `${O(W)}$${V + 1}` : `${O(W)}`).join(w); + return { + entry: { + name: `${A.printNode(4, D[0], t)} ...`, + kind: "", + sortText: Du.GlobalsOrKeywords, + insertText: F, + hasAction: T.hasFixes() || void 0, + source: "SwitchCases/", + isSnippet: n.includeCompletionsWithSnippetText ? !0 : void 0 + }, + importAdder: T + }; + } + } + function vH(e, t, n) { + switch (e.kind) { + case 183: + const i = e.typeName; + return bH(i, t, n); + case 199: + const s = vH(e.objectType, t, n), o = vH(e.indexType, t, n); + return s && o && N.createElementAccessExpression(s, o); + case 201: + const c = e.literal; + switch (c.kind) { + case 11: + return N.createStringLiteral( + c.text, + n === 0 + /* Single */ + ); + case 9: + return N.createNumericLiteral(c.text, c.numericLiteralFlags); + } + return; + case 196: + const _ = vH(e.type, t, n); + return _ && (Me(_) ? _ : N.createParenthesizedExpression(_)); + case 186: + return bH(e.exprName, t, n); + case 205: + E.fail("We should not get an import type after calling 'codefix.typeToAutoImportableTypeNode'."); + } + } + function bH(e, t, n) { + if (Me(e)) + return e; + const i = Pi(e.right.escapedText); + return AJ(i, t) ? N.createPropertyAccessExpression( + bH(e.left, t, n), + i + ) : N.createElementAccessExpression( + bH(e.left, t, n), + N.createStringLiteral( + i, + n === 0 + /* Single */ + ) + ); + } + function XGe(e) { + switch (e) { + case 0: + case 3: + case 2: + return !0; + default: + return !1; + } + } + function QGe(e, t) { + const n = ur(e, (i) => { + switch (i.kind) { + case 287: + return !0; + case 44: + case 32: + case 80: + case 211: + return !1; + default: + return "quit"; + } + }); + if (n) { + const i = !!Xa(n, 32, t), c = n.parent.openingElement.tagName.getText(t) + (i ? "" : ">"), _ = e_(n.tagName), u = { + name: c, + kind: "class", + kindModifiers: void 0, + sortText: Du.LocationPriority + }; + return { + isGlobalCompletion: !1, + isMemberCompletion: !0, + isNewIdentifierLocation: !1, + optionalReplacementSpan: _, + entries: [u], + defaultCommitCharacters: KS( + /*isNewIdentifierLocation*/ + !1 + ) + }; + } + } + function YGe(e, t, n, i, s) { + Wq(e).forEach((o, c) => { + if (o === t) + return; + const _ = Pi(c); + !n.has(_) && E_(_, i) && (n.add(_), xy(s, { + name: _, + kind: "warning", + kindModifiers: "", + sortText: Du.JavascriptIdentifiers, + isFromUncheckedFile: !0, + commitCharacters: [] + }, mL)); + }); + } + function sue(e, t, n) { + return typeof n == "object" ? qb(n) + "n" : rs(n) ? pw(e, t, n) : JSON.stringify(n); + } + function ZGe(e, t, n) { + return { + name: sue(e, t, n), + kind: "string", + kindModifiers: "", + sortText: Du.LocationPriority, + commitCharacters: [] + }; + } + function KGe(e, t, n, i, s, o, c, _, u, m, g, h, S, T, C, D, w, A, O, F, R, W, V, $) { + var U, _e; + let Z, J, re = bV(n, o), te, ie, le = oue(h), Te, q, me; + const Ce = u.getTypeChecker(), Ee = h && JGe(h), oe = h && MGe(h) || g; + if (h && LGe(h)) + Z = g ? `this${Ee ? "?." : ""}[${aue(c, O, m)}]` : `this${Ee ? "?." : "."}${m}`; + else if ((oe || Ee) && T) { + Z = oe ? g ? `[${aue(c, O, m)}]` : `[${m}]` : m, (Ee || T.questionDotToken) && (Z = `?.${Z}`); + const Oe = Xa(T, 25, c) || Xa(T, 29, c); + if (!Oe) + return; + const xe = Vi(m, T.name.text) ? T.name.end : Oe.end; + re = bc(Oe.getStart(c), xe); + } + if (C && (Z === void 0 && (Z = m), Z = `{${Z}}`, typeof C != "boolean" && (re = e_(C, c))), h && BGe(h) && T) { + Z === void 0 && (Z = m); + const Oe = tl(T.pos, c); + let xe = ""; + Oe && N9(Oe.end, Oe.parent, c) && (xe = ";"), xe += `(await ${T.expression.getText()})`, Z = g ? `${xe}${Z}` : `${xe}${Ee ? "?." : "."}${Z}`; + const ne = jn(T.parent, n1) ? T.parent : T.expression; + re = bc(ne.getStart(c), T.end); + } + if (Cw(h) && (Te = [Lf(h.moduleSpecifier)], D && ({ insertText: Z, replacementSpan: re } = o$e(m, D, h, w, c, u, O), ie = O.includeCompletionsWithSnippetText ? !0 : void 0)), h?.kind === 64 && (q = !0), F === 0 && i && ((U = tl(i.pos, c, i)) == null ? void 0 : U.kind) !== 28 && (fc(i.parent.parent) || cp(i.parent.parent) || A_(i.parent.parent) || Zg(i.parent) || ((_e = ur(i.parent, Xc)) == null ? void 0 : _e.getLastToken(c)) === i || _u(i.parent) && js(c, i.getEnd()).line !== js(c, o).line) && (le = "ObjectLiteralMemberWithComma/", q = !0), O.includeCompletionsWithClassMemberSnippets && O.includeCompletionsWithInsertText && F === 3 && t$e(e, s, c)) { + let Oe; + const xe = e4e( + _, + u, + A, + O, + m, + e, + s, + o, + i, + R + ); + if (xe) + ({ insertText: Z, filterText: J, isSnippet: ie, importAdder: Oe } = xe), (Oe?.hasFixes() || xe.eraseRange) && (q = !0, le = "ClassMemberSnippet/"); + else + return; + } + if (h && qEe(h) && ({ insertText: Z, isSnippet: ie, labelDetails: me } = h, O.useLabelDetailsInCompletionEntries || (m = m + me.detail, me = void 0), le = "ObjectLiteralMethodSnippet/", t = Du.SortBelow(t)), W && !V && O.includeCompletionsWithSnippetText && O.jsxAttributeCompletionStyle && O.jsxAttributeCompletionStyle !== "none" && !(hm(s.parent) && s.parent.initializer)) { + let Oe = O.jsxAttributeCompletionStyle === "braces"; + const xe = Ce.getTypeOfSymbolAtLocation(e, s); + O.jsxAttributeCompletionStyle === "auto" && !(xe.flags & 528) && !(xe.flags & 1048576 && Pn(xe.types, (he) => !!(he.flags & 528))) && (xe.flags & 402653316 || xe.flags & 1048576 && Ri(xe.types, (he) => !!(he.flags & 402686084 || $se(he))) ? (Z = `${Hb(m)}=${pw(c, O, "$1")}`, ie = !0) : Oe = !0), Oe && (Z = `${Hb(m)}={$1}`, ie = !0); + } + if (Z !== void 0 && !O.includeCompletionsWithInsertText) + return; + (dL(h) || Cw(h)) && (te = t4e(h), q = !D); + const ke = ur(s, C5); + if (ke) { + const Oe = pa(_.getCompilationSettings()); + if (!E_(m, Oe)) + Z = aue(c, O, m), ke.kind === 275 && (Fl.setText(c.text), Fl.resetTokenState(o), Fl.scan() === 130 && Fl.scan() === 80 || (Z += " as " + e$e(m, Oe))); + else if (ke.kind === 275) { + const xe = sS(m); + xe && (xe === 135 || DB(xe)) && (Z = `${m} as ${m}_`); + } + } + const ue = q0.getSymbolKind(Ce, e, s), it = ue === "warning" || ue === "string" ? [] : void 0; + return { + name: m, + kind: ue, + kindModifiers: q0.getSymbolModifiers(Ce, e), + sortText: t, + source: le, + hasAction: q ? !0 : void 0, + isRecommended: c$e(e, S, Ce) || void 0, + insertText: Z, + filterText: J, + replacementSpan: re, + sourceDisplay: Te, + labelDetails: me, + isSnippet: ie, + isPackageJsonImport: jGe(h) || void 0, + isImportStatementCompletion: !!D || void 0, + data: te, + commitCharacters: it, + ...$ ? { symbol: e } : void 0 + }; + } + function e$e(e, t) { + let n = !1, i = "", s; + for (let o = 0; o < e.length; o += s !== void 0 && s >= 65536 ? 2 : 1) + s = e.codePointAt(o), s !== void 0 && (o === 0 ? Qm(s, t) : kh(s, t)) ? (n && (i += "_"), i += String.fromCodePoint(s), n = !1) : n = !0; + return n && (i += "_"), i || "_"; + } + function t$e(e, t, n) { + return an(t) ? !1 : !!(e.flags & 106500) && (Zn(t) || t.parent && t.parent.parent && sl(t.parent) && t === t.parent.name && t.parent.getLastToken(n) === t.parent.name && Zn(t.parent.parent) || t.parent && c6(t) && Zn(t.parent)); + } + function e4e(e, t, n, i, s, o, c, _, u, m) { + const g = ur(c, Zn); + if (!g) + return; + let h, S = s; + const T = s, C = t.getTypeChecker(), D = c.getSourceFile(), w = SH({ + removeComments: !0, + module: n.module, + moduleResolution: n.moduleResolution, + target: n.target, + omitTrailingSemicolon: !1, + newLine: OA(Jh(e, m?.options)) + }), A = Eu.createImportAdder(D, t, i, e); + let O; + if (i.includeCompletionsWithSnippetText) { + h = !0; + const _e = N.createEmptyStatement(); + O = N.createBlock( + [_e], + /*multiLine*/ + !0 + ), UJ(_e, { kind: 0, order: 0 }); + } else + O = N.createBlock( + [], + /*multiLine*/ + !0 + ); + let F = 0; + const { modifiers: R, range: W, decorators: V } = r$e(u, D, _), $ = R & 64 && g.modifierFlagsCache & 64; + let U = []; + if (Eu.addNewNodeForMemberSymbol( + o, + g, + D, + { program: t, host: e }, + i, + A, + // `addNewNodeForMemberSymbol` calls this callback function for each new member node + // it adds for the given member symbol. + // We store these member nodes in the `completionNodes` array. + // Note: there might be: + // - No nodes if `addNewNodeForMemberSymbol` cannot figure out a node for the member; + // - One node; + // - More than one node if the member is overloaded (e.g. a method with overload signatures). + (_e) => { + let Z = 0; + $ && (Z |= 64), sl(_e) && C.getMemberOverrideModifierStatus(g, _e, o) === 1 && (Z |= 16), U.length || (F = _e.modifierFlagsCache | Z), _e = N.replaceModifiers(_e, F), U.push(_e); + }, + O, + Eu.PreserveOptionalFlags.Property, + !!$ + ), U.length) { + const _e = o.flags & 8192; + let Z = F | 16 | 1; + _e ? Z |= 1024 : Z |= 136; + const J = R & Z; + if (R & ~Z) + return; + if (F & 4 && J & 1 && (F &= -5), J !== 0 && !(J & 1) && (F &= -2), F |= J, U = U.map((te) => N.replaceModifiers(te, F)), V?.length) { + const te = U[U.length - 1]; + n2(te) && (U[U.length - 1] = N.replaceDecoratorsAndModifiers(te, V.concat(Tb(te) || []))); + } + const re = 131073; + m ? S = w.printAndFormatSnippetList( + re, + N.createNodeArray(U), + D, + m + ) : S = w.printSnippetList( + re, + N.createNodeArray(U), + D + ); + } + return { insertText: S, filterText: T, isSnippet: h, importAdder: A, eraseRange: W }; + } + function r$e(e, t, n) { + if (!e || js(t, n).line > js(t, e.getEnd()).line) + return { + modifiers: 0 + /* None */ + }; + let i = 0, s, o; + const c = { pos: n, end: n }; + if (ss(e.parent) && (o = n$e(e))) { + e.parent.modifiers && (i |= lm(e.parent.modifiers) & 98303, s = e.parent.modifiers.filter(ll) || [], c.pos = Math.min(...e.parent.modifiers.map((u) => u.getStart(t)))); + const _ = Sx(o); + i & _ || (i |= _, c.pos = Math.min(c.pos, e.getStart(t))), e.parent.name !== e && (c.end = e.parent.name.getStart(t)); + } + return { modifiers: i, decorators: s, range: c.pos < c.end ? c : void 0 }; + } + function n$e(e) { + if (ia(e)) + return e.kind; + if (Me(e)) { + const t = aS(e); + if (t && By(t)) + return t; + } + } + function i$e(e, t, n, i, s, o, c, _) { + const u = c.includeCompletionsWithSnippetText || void 0; + let m = t; + const g = n.getSourceFile(), h = s$e(e, n, g, i, s, c); + if (!h) + return; + const S = SH({ + removeComments: !0, + module: o.module, + moduleResolution: o.moduleResolution, + target: o.target, + omitTrailingSemicolon: !1, + newLine: OA(Jh(s, _?.options)) + }); + _ ? m = S.printAndFormatSnippetList(80, N.createNodeArray( + [h], + /*hasTrailingComma*/ + !0 + ), g, _) : m = S.printSnippetList(80, N.createNodeArray( + [h], + /*hasTrailingComma*/ + !0 + ), g); + const T = u1({ + removeComments: !0, + module: o.module, + moduleResolution: o.moduleResolution, + target: o.target, + omitTrailingSemicolon: !0 + }), C = N.createMethodSignature( + /*modifiers*/ + void 0, + /*name*/ + "", + h.questionToken, + h.typeParameters, + h.parameters, + h.type + ), D = { detail: T.printNode(4, C, g) }; + return { isSnippet: u, insertText: m, labelDetails: D }; + } + function s$e(e, t, n, i, s, o) { + const c = e.getDeclarations(); + if (!(c && c.length)) + return; + const _ = i.getTypeChecker(), u = c[0], m = Wa( + is(u), + /*includeTrivia*/ + !1 + ), g = _.getWidenedType(_.getTypeOfSymbolAtLocation(e, t)), S = 33554432 | (tf(n, o) === 0 ? 268435456 : 0); + switch (u.kind) { + case 171: + case 172: + case 173: + case 174: { + let T = g.flags & 1048576 && g.types.length < 10 ? _.getUnionType( + g.types, + 2 + /* Subtype */ + ) : g; + if (T.flags & 1048576) { + const O = kn(T.types, (F) => _.getSignaturesOfType( + F, + 0 + /* Call */ + ).length > 0); + if (O.length === 1) + T = O[0]; + else + return; + } + if (_.getSignaturesOfType( + T, + 0 + /* Call */ + ).length !== 1) + return; + const D = _.typeToTypeNode( + T, + t, + S, + /*internalFlags*/ + void 0, + Eu.getNoopSymbolTrackerWithResolver({ program: i, host: s }) + ); + if (!D || !ng(D)) + return; + let w; + if (o.includeCompletionsWithSnippetText) { + const O = N.createEmptyStatement(); + w = N.createBlock( + [O], + /*multiLine*/ + !0 + ), UJ(O, { kind: 0, order: 0 }); + } else + w = N.createBlock( + [], + /*multiLine*/ + !0 + ); + const A = D.parameters.map( + (O) => N.createParameterDeclaration( + /*modifiers*/ + void 0, + O.dotDotDotToken, + O.name, + /*questionToken*/ + void 0, + /*type*/ + void 0, + O.initializer + ) + ); + return N.createMethodDeclaration( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + m, + /*questionToken*/ + void 0, + /*typeParameters*/ + void 0, + A, + /*type*/ + void 0, + w + ); + } + default: + return; + } + } + function SH(e) { + let t; + const n = sn.createWriter(N0(e)), i = u1(e, n), s = { + ...n, + write: (S) => o(S, () => n.write(S)), + nonEscapingWrite: n.write, + writeLiteral: (S) => o(S, () => n.writeLiteral(S)), + writeStringLiteral: (S) => o(S, () => n.writeStringLiteral(S)), + writeSymbol: (S, T) => o(S, () => n.writeSymbol(S, T)), + writeParameter: (S) => o(S, () => n.writeParameter(S)), + writeComment: (S) => o(S, () => n.writeComment(S)), + writeProperty: (S) => o(S, () => n.writeProperty(S)) + }; + return { + printSnippetList: c, + printAndFormatSnippetList: u, + printNode: m, + printAndFormatNode: h + }; + function o(S, T) { + const C = Hb(S); + if (C !== S) { + const D = n.getTextPos(); + T(); + const w = n.getTextPos(); + t = Pr(t || (t = []), { newText: C, span: { start: D, length: w - D } }); + } else + T(); + } + function c(S, T, C) { + const D = _(S, T, C); + return t ? sn.applyChanges(D, t) : D; + } + function _(S, T, C) { + return t = void 0, s.clear(), i.writeList(S, T, C, s), s.getText(); + } + function u(S, T, C, D) { + const w = { + text: _( + S, + T, + C + ), + getLineAndCharacterOfPosition(R) { + return js(this, R); + } + }, A = j9(D, C), O = na(T, (R) => { + const W = sn.assignPositionsToNode(R); + return Qc.formatNodeGivenIndentation( + W, + w, + C.languageVariant, + /* indentation */ + 0, + /* delta */ + 0, + { ...D, options: A } + ); + }), F = t ? W_(Wi(O, t), (R, W) => LI(R.span, W.span)) : O; + return sn.applyChanges(w.text, F); + } + function m(S, T, C) { + const D = g(S, T, C); + return t ? sn.applyChanges(D, t) : D; + } + function g(S, T, C) { + return t = void 0, s.clear(), i.writeNode(S, T, C, s), s.getText(); + } + function h(S, T, C, D) { + const w = { + text: g( + S, + T, + C + ), + getLineAndCharacterOfPosition(W) { + return js(this, W); + } + }, A = j9(D, C), O = sn.assignPositionsToNode(T), F = Qc.formatNodeGivenIndentation( + O, + w, + C.languageVariant, + /* indentation */ + 0, + /* delta */ + 0, + { ...D, options: A } + ), R = t ? W_(Wi(F, t), (W, V) => LI(W.span, V.span)) : F; + return sn.applyChanges(w.text, R); + } + } + function t4e(e) { + const t = e.fileName ? void 0 : Op(e.moduleSymbol.name), n = e.isFromPackageJson ? !0 : void 0; + return Cw(e) ? { + exportName: e.exportName, + exportMapKey: e.exportMapKey, + moduleSpecifier: e.moduleSpecifier, + ambientModuleName: t, + fileName: e.fileName, + isPackageJsonImport: n + } : { + exportName: e.exportName, + exportMapKey: e.exportMapKey, + fileName: e.fileName, + ambientModuleName: e.fileName ? void 0 : Op(e.moduleSymbol.name), + isPackageJsonImport: e.isFromPackageJson ? !0 : void 0 + }; + } + function a$e(e, t, n) { + const i = e.exportName === "default", s = !!e.isPackageJsonImport; + return GEe(e) ? { + kind: 32, + exportName: e.exportName, + exportMapKey: e.exportMapKey, + moduleSpecifier: e.moduleSpecifier, + symbolName: t, + fileName: e.fileName, + moduleSymbol: n, + isDefaultExport: i, + isFromPackageJson: s + } : { + kind: 4, + exportName: e.exportName, + exportMapKey: e.exportMapKey, + symbolName: t, + fileName: e.fileName, + moduleSymbol: n, + isDefaultExport: i, + isFromPackageJson: s + }; + } + function o$e(e, t, n, i, s, o, c) { + const _ = t.replacementSpan, u = Hb(pw(s, c, n.moduleSpecifier)), m = n.isDefaultExport ? 1 : n.exportName === "export=" ? 2 : 0, g = c.includeCompletionsWithSnippetText ? "$1" : "", h = Eu.getImportKind( + s, + m, + o, + /*forceImportKeyword*/ + !0 + ), S = t.couldBeTypeOnlyImportSpecifier, T = t.isTopLevelTypeOnly ? ` ${Xs( + 156 + /* TypeKeyword */ + )} ` : " ", C = S ? `${Xs( + 156 + /* TypeKeyword */ + )} ` : "", D = i ? ";" : ""; + switch (h) { + case 3: + return { replacementSpan: _, insertText: `import${T}${Hb(e)}${g} = require(${u})${D}` }; + case 1: + return { replacementSpan: _, insertText: `import${T}${Hb(e)}${g} from ${u}${D}` }; + case 2: + return { replacementSpan: _, insertText: `import${T}* as ${Hb(e)} from ${u}${D}` }; + case 0: + return { replacementSpan: _, insertText: `import${T}{ ${C}${Hb(e)}${g} } from ${u}${D}` }; + } + } + function aue(e, t, n) { + return /^\d+$/.test(n) ? n : pw(e, t, n); + } + function c$e(e, t, n) { + return e === t || !!(e.flags & 1048576) && n.getExportSymbolOfSymbol(e) === t; + } + function oue(e) { + if (dL(e)) + return Op(e.moduleSymbol.name); + if (Cw(e)) + return e.moduleSpecifier; + if (e?.kind === 1) + return "ThisProperty/"; + if (e?.kind === 64) + return "TypeOnlyAlias/"; + } + function cue(e, t, n, i, s, o, c, _, u, m, g, h, S, T, C, D, w, A, O, F, R, W, V, $, U, _e = !1) { + const Z = ao(), J = P$e(i, s), re = NA(c), te = u.getTypeChecker(), ie = /* @__PURE__ */ new Map(); + for (let q = 0; q < e.length; q++) { + const me = e[q], Ce = W?.[q], Ee = xH(me, m, Ce, h, !!A); + if (!Ee || ie.get(Ee.name) && (!Ce || !qEe(Ce)) || h === 1 && V && !le(me, V) || !D && an(c) && Te(me)) + continue; + const { name: oe, needsConvertPropertyAccess: ke } = Ee, ue = V?.[Zs(me)] ?? Du.LocationPriority, it = A$e(me, te) ? Du.Deprecated(ue) : ue, Oe = KGe( + me, + it, + n, + i, + s, + o, + c, + _, + u, + oe, + ke, + Ce, + R, + w, + O, + F, + re, + T, + S, + h, + C, + $, + U, + _e + ); + if (!Oe) + continue; + const xe = (!Ce || VEe(Ce)) && !(me.parent === void 0 && !at(me.declarations, (he) => he.getSourceFile() === s.getSourceFile())); + ie.set(oe, xe), xy( + t, + Oe, + mL, + /*equalityComparer*/ + void 0, + /*allowDuplicates*/ + !0 + ); + } + return g("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (ao() - Z)), { + has: (q) => ie.has(q), + add: (q) => ie.set(q, !0) + }; + function le(q, me) { + var Ce; + let Ee = q.flags; + if (!Ei(s)) { + if (Io(s.parent)) + return !0; + if (jn(J, Kn) && q.valueDeclaration === J) + return !1; + const oe = q.valueDeclaration ?? ((Ce = q.declarations) == null ? void 0 : Ce[0]); + if (J && oe) { + if (Ii(J) && Ii(oe)) { + const ue = J.parent.parameters; + if (oe.pos >= J.pos && oe.pos < ue.end) + return !1; + } else if (Ao(J) && Ao(oe)) { + if (J === oe && i?.kind === 96) + return !1; + if (N$e(i) && !AS(J.parent)) { + const ue = J.parent.typeParameters; + if (ue && oe.pos >= J.pos && oe.pos < ue.end) + return !1; + } + } + } + const ke = Gl(q, te); + if (c.externalModuleIndicator && !T.allowUmdGlobalAccess && me[Zs(q)] === Du.GlobalsOrKeywords && (me[Zs(ke)] === Du.AutoImportSuggestions || me[Zs(ke)] === Du.LocationPriority)) + return !1; + if (Ee |= UC(ke), s9(s)) + return !!(Ee & 1920); + if (D) + return pue(q, te); + } + return !!(Ee & 111551); + } + function Te(q) { + var me; + const Ce = UC(Gl(q, te)); + return !(Ce & 111551) && (!an((me = q.declarations) == null ? void 0 : me[0]) || !!(Ce & 788968)); + } + } + function l$e(e) { + const t = u$e(e); + if (t.length) + return { + isGlobalCompletion: !1, + isMemberCompletion: !1, + isNewIdentifierLocation: !1, + entries: t, + defaultCommitCharacters: KS( + /*isNewIdentifierLocation*/ + !1 + ) + }; + } + function u$e(e) { + const t = [], n = /* @__PURE__ */ new Map(); + let i = e; + for (; i && !vs(i); ) { + if (i1(i)) { + const s = i.label.text; + n.has(s) || (n.set(s, !0), t.push({ + name: s, + kindModifiers: "", + kind: "label", + sortText: Du.LocationPriority + })); + } + i = i.parent; + } + return t; + } + function r4e(e, t, n, i, s, o, c) { + if (s.source === "SwitchCases/") + return { type: "cases" }; + if (s.data) { + const F = s4e(s.name, s.data, e, o); + if (F) { + const { contextToken: R, previousToken: W } = TH(i, n); + return { + type: "symbol", + symbol: F.symbol, + location: h_(n, i), + previousToken: W, + contextToken: R, + isJsxInitializer: !1, + isTypeOnlyLocation: !1, + origin: F.origin + }; + } + } + const _ = e.getCompilerOptions(), u = i4e( + e, + t, + n, + _, + i, + { includeCompletionsForModuleExports: !0, includeCompletionsWithInsertText: !0 }, + s, + o, + /*formatContext*/ + void 0 + ); + if (!u) + return { type: "none" }; + if (u.kind !== 0) + return { type: "request", request: u }; + const { symbols: m, literals: g, location: h, completionKind: S, symbolToOriginInfoMap: T, contextToken: C, previousToken: D, isJsxInitializer: w, isTypeOnlyLocation: A } = u, O = Pn(g, (F) => sue(n, c, F) === s.name); + return O !== void 0 ? { type: "literal", literal: O } : Dc(m, (F, R) => { + const W = T[R], V = xH(F, pa(_), W, S, u.isJsxIdentifierExpected); + return V && V.name === s.name && (s.source === "ClassMemberSnippet/" && F.flags & 106500 || s.source === "ObjectLiteralMethodSnippet/" && F.flags & 8196 || oue(W) === s.source || s.source === "ObjectLiteralMemberWithComma/") ? { type: "symbol", symbol: F, location: h, origin: W, contextToken: C, previousToken: D, isJsxInitializer: w, isTypeOnlyLocation: A } : void 0; + }) || { type: "none" }; + } + function _$e(e, t, n, i, s, o, c, _, u) { + const m = e.getTypeChecker(), g = e.getCompilerOptions(), { name: h, source: S, data: T } = s, { previousToken: C, contextToken: D } = TH(i, n); + if (lk(n, i, C)) + return PH.getStringLiteralCompletionDetails(h, n, i, C, e, o, u, _); + const w = r4e(e, t, n, i, s, o, _); + switch (w.type) { + case "request": { + const { request: A } = w; + switch (A.kind) { + case 1: + return Lv.getJSDocTagNameCompletionDetails(h); + case 2: + return Lv.getJSDocTagCompletionDetails(h); + case 3: + return Lv.getJSDocParameterNameCompletionDetails(h); + case 4: + return at(A.keywordCompletions, (O) => O.name === h) ? lue( + h, + "keyword", + 5 + /* keyword */ + ) : void 0; + default: + return E.assertNever(A); + } + } + case "symbol": { + const { symbol: A, location: O, contextToken: F, origin: R, previousToken: W } = w, { codeActions: V, sourceDisplay: $ } = f$e(h, O, F, R, A, e, o, g, n, i, W, c, _, T, S, u), U = nue(R) ? R.symbolName : A.name; + return uue(A, U, m, n, O, u, V, $); + } + case "literal": { + const { literal: A } = w; + return lue( + sue(n, _, A), + "string", + typeof A == "string" ? 8 : 7 + /* numericLiteral */ + ); + } + case "cases": { + const A = KEe( + D.parent, + n, + _, + e.getCompilerOptions(), + o, + e, + /*formatContext*/ + void 0 + ); + if (A?.importAdder.hasFixes()) { + const { entry: O, importAdder: F } = A, R = sn.ChangeTracker.with( + { host: o, formatContext: c, preferences: _ }, + F.writeFixes + ); + return { + name: O.name, + kind: "", + kindModifiers: "", + displayParts: [], + sourceDisplay: void 0, + codeActions: [{ + changes: R, + description: p2([p.Includes_imports_of_types_referenced_by_0, h]) + }] + }; + } + return { + name: h, + kind: "", + kindModifiers: "", + displayParts: [], + sourceDisplay: void 0 + }; + } + case "none": + return a4e().some((A) => A.name === h) ? lue( + h, + "keyword", + 5 + /* keyword */ + ) : void 0; + default: + E.assertNever(w); + } + } + function lue(e, t, n) { + return gL(e, "", t, [I_(e, n)]); + } + function uue(e, t, n, i, s, o, c, _) { + const { displayParts: u, documentation: m, symbolKind: g, tags: h } = n.runWithCancellationToken(o, (S) => q0.getSymbolDisplayPartsDocumentationAndSymbolKind( + S, + e, + i, + s, + s, + 7 + /* All */ + )); + return gL(t, q0.getSymbolModifiers(n, e), g, u, m, h, c, _); + } + function gL(e, t, n, i, s, o, c, _) { + return { name: e, kindModifiers: t, kind: n, displayParts: i, documentation: s, tags: o, codeActions: c, source: _, sourceDisplay: _ }; + } + function f$e(e, t, n, i, s, o, c, _, u, m, g, h, S, T, C, D) { + if (T?.moduleSpecifier && g && d4e(n || g, u).replacementSpan) + return { codeActions: void 0, sourceDisplay: [Lf(T.moduleSpecifier)] }; + if (C === "ClassMemberSnippet/") { + const { importAdder: V, eraseRange: $ } = e4e( + c, + o, + _, + S, + e, + s, + t, + m, + n, + h + ); + if (V?.hasFixes() || $) + return { + sourceDisplay: void 0, + codeActions: [{ + changes: sn.ChangeTracker.with( + { host: c, formatContext: h, preferences: S }, + (_e) => { + V && V.writeFixes(_e), $ && _e.deleteRange(u, $); + } + ), + description: V?.hasFixes() ? p2([p.Includes_imports_of_types_referenced_by_0, e]) : p2([p.Update_modifiers_of_0, e]) + }] + }; + } + if (VEe(i)) { + const V = Eu.getPromoteTypeOnlyCompletionAction( + u, + i.declaration.name, + o, + c, + h, + S + ); + return E.assertIsDefined(V, "Expected to have a code action for promoting type-only alias"), { codeActions: [V], sourceDisplay: void 0 }; + } + if (C === "ObjectLiteralMemberWithComma/" && n) { + const V = sn.ChangeTracker.with( + { host: c, formatContext: h, preferences: S }, + ($) => $.insertText(u, n.end, ",") + ); + if (V) + return { + sourceDisplay: void 0, + codeActions: [{ + changes: V, + description: p2([p.Add_missing_comma_for_object_member_completion_0, e]) + }] + }; + } + if (!i || !(dL(i) || Cw(i))) + return { codeActions: void 0, sourceDisplay: void 0 }; + const w = i.isFromPackageJson ? c.getPackageJsonAutoImportProvider().getTypeChecker() : o.getTypeChecker(), { moduleSymbol: A } = i, O = w.getMergedSymbol(Gl(s.exportSymbol || s, w)), F = n?.kind === 30 && bu(n.parent), { moduleSpecifier: R, codeAction: W } = Eu.getImportCompletionAction( + O, + A, + T?.exportMapKey, + u, + e, + F, + c, + o, + h, + g && Me(g) ? g.getStart(u) : m, + S, + D + ); + return E.assert(!T?.moduleSpecifier || R === T.moduleSpecifier), { sourceDisplay: [Lf(R)], codeActions: [W] }; + } + function p$e(e, t, n, i, s, o, c) { + const _ = r4e(e, t, n, i, s, o, c); + return _.type === "symbol" ? _.symbol : void 0; + } + var n4e = /* @__PURE__ */ ((e) => (e[e.ObjectPropertyDeclaration = 0] = "ObjectPropertyDeclaration", e[e.Global = 1] = "Global", e[e.PropertyAccess = 2] = "PropertyAccess", e[e.MemberLike = 3] = "MemberLike", e[e.String = 4] = "String", e[e.None = 5] = "None", e))(n4e || {}); + function d$e(e, t, n) { + return Dc(t && (t.isUnion() ? t.types : [t]), (i) => { + const s = i && i.symbol; + return s && s.flags & 424 && !eee(s) ? _ue(s, e, n) : void 0; + }); + } + function m$e(e, t, n, i) { + const { parent: s } = e; + switch (e.kind) { + case 80: + return w9(e, i); + case 64: + switch (s.kind) { + case 260: + return i.getContextualType(s.initializer); + // TODO: GH#18217 + case 226: + return i.getTypeAtLocation(s.left); + case 291: + return i.getContextualTypeForJsxAttribute(s); + default: + return; + } + case 105: + return i.getContextualType(s); + case 84: + const o = jn(s, i6); + return o ? VV(o, i) : void 0; + case 19: + return n6(s) && !gm(s.parent) && !gv(s.parent) ? i.getContextualTypeForJsxAttribute(s.parent) : void 0; + default: + const c = i8.getArgumentInfoForCompletions(e, t, n, i); + return c ? i.getContextualTypeForArgumentAtIndex(c.invocation, c.argumentIndex) : P9(e.kind) && fn(s) && P9(s.operatorToken.kind) ? ( + // completion at `x ===/**/` should be for the right side + i.getTypeAtLocation(s.left) + ) : i.getContextualType( + e, + 4 + /* Completions */ + ) || i.getContextualType(e); + } + } + function _ue(e, t, n) { + const i = n.getAccessibleSymbolChain( + e, + t, + /*meaning*/ + -1, + /*useOnlyExternalAliasing*/ + !1 + ); + return i ? ya(i) : e.parent && (g$e(e.parent) ? e : _ue(e.parent, t, n)); + } + function g$e(e) { + var t; + return !!((t = e.declarations) != null && t.some( + (n) => n.kind === 307 + /* SourceFile */ + )); + } + function i4e(e, t, n, i, s, o, c, _, u, m) { + const g = e.getTypeChecker(), h = ZEe(n, i); + let S = ao(), T = Si(n, s); + t("getCompletionData: Get current token: " + (ao() - S)), S = ao(); + const C = J0(n, s, T); + t("getCompletionData: Is inside comment: " + (ao() - S)); + let D = !1, w = !1, A = !1; + if (C) { + if (qse(n, s)) { + if (n.text.charCodeAt(s - 1) === 64) + return { + kind: 1 + /* JsDocTagName */ + }; + { + const st = Wp(s, n); + if (!/[^*|\s(/)]/.test(n.text.substring(st, s))) + return { + kind: 2 + /* JsDocTag */ + }; + } + } + const de = b$e(T, s); + if (de) { + if (de.tagName.pos <= s && s <= de.tagName.end) + return { + kind: 1 + /* JsDocTagName */ + }; + if (ym(de)) + w = !0; + else { + const st = er(de); + if (st && (T = Si(n, s), (!T || !tg(T) && (T.parent.kind !== 348 || T.parent.name !== T)) && (D = zt(st))), !D && Af(de) && (tc(de.name) || de.name.pos <= s && s <= de.name.end)) + return { kind: 3, tag: de }; + } + } + if (!D && !w) { + t("Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment."); + return; + } + } + S = ao(); + const O = !D && !w && Gu(n), F = TH(s, n), R = F.previousToken; + let W = F.contextToken; + t("getCompletionData: Get previous token: " + (ao() - S)); + let V = T, $, U = !1, _e = !1, Z = !1, J = !1, re = !1, te = !1, ie, le = h_(n, s), Te = 0, q = !1, me = 0, Ce; + if (W) { + const de = d4e(W, n); + if (de.keywordCompletion) { + if (de.isKeywordOnlyCompletion) + return { + kind: 4, + keywordCompletions: [qGe(de.keywordCompletion)], + isNewIdentifierLocation: de.isNewIdentifierLocation + }; + Te = GGe(de.keywordCompletion); + } + if (de.replacementSpan && o.includeCompletionsForImportStatements && o.includeCompletionsWithInsertText && (me |= 2, ie = de, q = de.isNewIdentifierLocation), !de.replacementSpan && Cs(W)) + return t("Returning an empty list because completion was requested in an invalid position."), Te ? QEe(Te, O, xr().isNewIdentifierLocation) : void 0; + let st = W.parent; + if (W.kind === 25 || W.kind === 29) + switch (U = W.kind === 25, _e = W.kind === 29, st.kind) { + case 211: + $ = st, V = $.expression; + const Gt = VC($); + if (tc(Gt) || (Fs(V) || vs(V)) && V.end === W.pos && V.getChildCount(n) && _a(V.getChildren(n)).kind !== 22) + return; + break; + case 166: + V = st.left; + break; + case 267: + V = st.name; + break; + case 205: + V = st; + break; + case 236: + V = st.getFirstToken(n), E.assert( + V.kind === 102 || V.kind === 105 + /* NewKeyword */ + ); + break; + default: + return; + } + else if (!ie) { + if (st && st.kind === 211 && (W = st, st = st.parent), T.parent === le) + switch (T.kind) { + case 32: + (T.parent.kind === 284 || T.parent.kind === 286) && (le = T); + break; + case 44: + T.parent.kind === 285 && (le = T); + break; + } + switch (st.kind) { + case 287: + W.kind === 44 && (J = !0, le = W); + break; + case 226: + if (!p4e(st)) + break; + // falls through + case 285: + case 284: + case 286: + te = !0, W.kind === 30 && (Z = !0, le = W); + break; + case 294: + case 293: + (R.kind === 20 || R.kind === 80 && R.parent.kind === 291) && (te = !0); + break; + case 291: + if (st.initializer === R && R.end < s) { + te = !0; + break; + } + switch (R.kind) { + case 64: + re = !0; + break; + case 80: + te = !0, st !== R.parent && !st.initializer && Xa(st, 64, n) && (re = R); + } + break; + } + } + } + const Ee = ao(); + let oe = 5, ke = !1, ue = [], it; + const Oe = [], xe = [], he = /* @__PURE__ */ new Set(), ne = di(), Ae = Kd((de) => wv(de ? _.getPackageJsonAutoImportProvider() : e, _)); + if (U || _e) + Nr(); + else if (Z) + ue = g.getJsxIntrinsicTagNamesAt(le), E.assertEachIsDefined(ue, "getJsxIntrinsicTagNames() should all be defined"), yr(), oe = 1, Te = 0; + else if (J) { + const de = W.parent.parent.openingElement.tagName, st = g.getSymbolAtLocation(de); + st && (ue = [st]), oe = 1, Te = 0; + } else if (!yr()) + return Te ? QEe(Te, O, q) : void 0; + t("getCompletionData: Semantic work: " + (ao() - Ee)); + const De = R && m$e(R, s, n, g), Ue = !jn(R, Na) && !te ? Li( + De && (De.isUnion() ? De.types : [De]), + (de) => de.isLiteral() && !(de.flags & 1024) ? de.value : void 0 + ) : [], bt = R && De && d$e(R, De, g); + return { + kind: 0, + symbols: ue, + completionKind: oe, + isInSnippetScope: A, + propertyAccessToConvert: $, + isNewIdentifierLocation: q, + location: le, + keywordFilters: Te, + literals: Ue, + symbolToOriginInfoMap: Oe, + recommendedCompletion: bt, + previousToken: R, + contextToken: W, + isJsxInitializer: re, + insideJsDocTagTypeExpression: D, + symbolToSortTextMap: xe, + isTypeOnlyLocation: ne, + isJsxIdentifierExpected: te, + isRightOfOpenTag: Z, + isRightOfDotOrQuestionDot: U || _e, + importStatementCompletion: ie, + hasUnresolvedAutoImports: ke, + flags: me, + defaultCommitCharacters: Ce + }; + function Lt(de) { + switch (de.kind) { + case 341: + case 348: + case 342: + case 344: + case 346: + case 349: + case 350: + return !0; + case 345: + return !!de.constraint; + default: + return !1; + } + } + function er(de) { + if (Lt(de)) { + const st = Bp(de) ? de.constraint : de.typeExpression; + return st && st.kind === 309 ? st : void 0; + } + if (Xx(de) || kF(de)) + return de.class; + } + function Nr() { + oe = 2; + const de = Dh(V), st = de && !V.isTypeOf || im(V.parent) || vA(W, n, g), Gt = s9(V); + if (Hu(V) || de || Tn(V)) { + const Xr = Lc(V.parent); + Xr && (q = !0, Ce = []); + let Rr = g.getSymbolAtLocation(V); + if (Rr && (Rr = Gl(Rr, g), Rr.flags & 1920)) { + const Jr = g.getExportsOfModule(Rr); + E.assertEachIsDefined(Jr, "getExportsOfModule() should all be defined"); + const tt = (Pt) => g.isValidPropertyAccess(de ? V : V.parent, Pt.name), ut = (Pt) => pue(Pt, g), Mt = Xr ? (Pt) => { + var Zt; + return !!(Pt.flags & 1920) && !((Zt = Pt.declarations) != null && Zt.every((fr) => fr.parent === V.parent)); + } : Gt ? ( + // Any kind is allowed when dotting off namespace in internal import equals declaration + (Pt) => ut(Pt) || tt(Pt) + ) : st || D ? ut : tt; + for (const Pt of Jr) + Mt(Pt) && ue.push(Pt); + if (!st && !D && Rr.declarations && Rr.declarations.some( + (Pt) => Pt.kind !== 307 && Pt.kind !== 267 && Pt.kind !== 266 + /* EnumDeclaration */ + )) { + let Pt = g.getTypeOfSymbolAtLocation(Rr, V).getNonOptionalType(), Zt = !1; + if (Pt.isNullableType()) { + const fr = U && !_e && o.includeAutomaticOptionalChainCompletions !== !1; + (fr || _e) && (Pt = Pt.getNonNullableType(), fr && (Zt = !0)); + } + Dt(Pt, !!(V.flags & 65536), Zt); + } + return; + } + } + if (!st || vx(V)) { + g.tryGetThisTypeAt( + V, + /*includeGlobalThis*/ + !1 + ); + let Xr = g.getTypeAtLocation(V).getNonOptionalType(); + if (st) + Dt( + Xr.getNonNullableType(), + /*insertAwait*/ + !1, + /*insertQuestionDot*/ + !1 + ); + else { + let Rr = !1; + if (Xr.isNullableType()) { + const Jr = U && !_e && o.includeAutomaticOptionalChainCompletions !== !1; + (Jr || _e) && (Xr = Xr.getNonNullableType(), Jr && (Rr = !0)); + } + Dt(Xr, !!(V.flags & 65536), Rr); + } + } + } + function Dt(de, st, Gt) { + de.getStringIndexType() && (q = !0, Ce = []), _e && at(de.getCallSignatures()) && (q = !0, Ce ?? (Ce = bm)); + const Xr = V.kind === 205 ? V : V.parent; + if (h) + for (const Rr of de.getApparentProperties()) + g.isValidPropertyAccessForCompletions(Xr, de, Rr) && Qt( + Rr, + /*insertAwait*/ + !1, + Gt + ); + else + ue.push(...kn(DH(de, g), (Rr) => g.isValidPropertyAccessForCompletions(Xr, de, Rr))); + if (st && o.includeCompletionsWithInsertText) { + const Rr = g.getPromisedTypeOfPromise(de); + if (Rr) + for (const Jr of Rr.getApparentProperties()) + g.isValidPropertyAccessForCompletions(Xr, Rr, Jr) && Qt( + Jr, + /*insertAwait*/ + !0, + Gt + ); + } + } + function Qt(de, st, Gt) { + var Xr; + const Rr = Dc(de.declarations, (Mt) => jn(is(Mt), fa)); + if (Rr) { + const Mt = Wr(Rr.expression), Pt = Mt && g.getSymbolAtLocation(Mt), Zt = Pt && _ue(Pt, W, g), fr = Zt && Zs(Zt); + if (fr && Lp(he, fr)) { + const Vt = ue.length; + ue.push(Zt); + const ir = Zt.parent; + if (!ir || !ox(ir) || g.tryGetMemberInModuleExportsAndProperties(Zt.name, ir) !== Zt) + Oe[Vt] = { kind: ut( + 2 + /* SymbolMemberNoExport */ + ) }; + else { + const Tr = vl(Op(ir.name)) ? (Xr = $P(ir)) == null ? void 0 : Xr.fileName : void 0, { moduleSpecifier: _r } = (it || (it = Eu.createImportSpecifierResolver(n, e, _, o))).getModuleSpecifierForBestExportInfo( + [{ + exportKind: 0, + moduleFileName: Tr, + isFromPackageJson: !1, + moduleSymbol: ir, + symbol: Zt, + targetFlags: Gl(Zt, g).flags + }], + s, + cv(le) + ) || {}; + if (_r) { + const Ot = { + kind: ut( + 6 + /* SymbolMemberExport */ + ), + moduleSymbol: ir, + isDefaultExport: !1, + symbolName: Zt.name, + exportName: Zt.name, + fileName: Tr, + moduleSpecifier: _r + }; + Oe[Vt] = Ot; + } + } + } else if (o.includeCompletionsWithInsertText) { + if (fr && he.has(fr)) + return; + tt(de), Jr(de), ue.push(de); + } + } else + tt(de), Jr(de), ue.push(de); + function Jr(Mt) { + E$e(Mt) && (xe[Zs(Mt)] = Du.LocalDeclarationPriority); + } + function tt(Mt) { + o.includeCompletionsWithInsertText && (st && Lp(he, Zs(Mt)) ? Oe[ue.length] = { kind: ut( + 8 + /* Promise */ + ) } : Gt && (Oe[ue.length] = { + kind: 16 + /* Nullable */ + })); + } + function ut(Mt) { + return Gt ? Mt | 16 : Mt; + } + } + function Wr(de) { + return Me(de) ? de : Tn(de) ? Wr(de.expression) : void 0; + } + function yr() { + return (Qe() || Ct() || bi() || ee() || Ve() || K() || qn() || Ie() || Bt() || (pi(), 1)) === 1; + } + function qn() { + return Ke(W) ? (oe = 5, q = !0, Te = 4, 1) : 0; + } + function Bt() { + const de = Ye(W), st = de && g.getContextualType(de.attributes); + if (!st) return 0; + const Gt = de && g.getContextualType( + de.attributes, + 4 + /* Completions */ + ); + return ue = Wi(ue, lt(EH(st, Gt, de.attributes, g), de.attributes.properties)), fe(), oe = 3, q = !1, 1; + } + function bi() { + return ie ? (q = !0, tr(), 1) : 0; + } + function pi() { + Te = Je(W) ? 5 : 1, oe = 1, { isNewIdentifierLocation: q, defaultCommitCharacters: Ce } = xr(), R !== W && E.assert(!!R, "Expected 'contextToken' to be defined when different from 'previousToken'."); + const de = R !== W ? R.getStart() : s, st = ki(W, de, n) || n; + A = jr(st); + const Gt = (ne ? 0 : 111551) | 788968 | 1920 | 2097152, Xr = R && !cv(R); + ue = Wi(ue, g.getSymbolsInScope(st, Gt)), E.assertEachIsDefined(ue, "getSymbolsInScope() should all be defined"); + for (let Rr = 0; Rr < ue.length; Rr++) { + const Jr = ue[Rr]; + if (!g.isArgumentsSymbol(Jr) && !at(Jr.declarations, (tt) => tt.getSourceFile() === n) && (xe[Zs(Jr)] = Du.GlobalsOrKeywords), Xr && !(Jr.flags & 111551)) { + const tt = Jr.declarations && Pn(Jr.declarations, yC); + if (tt) { + const ut = { kind: 64, declaration: tt }; + Oe[Rr] = ut; + } + } + } + if (o.includeCompletionsWithInsertText && st.kind !== 307) { + const Rr = g.tryGetThisTypeAt( + st, + /*includeGlobalThis*/ + !1, + Zn(st.parent) ? st : void 0 + ); + if (Rr && !C$e(Rr, n, g)) + for (const Jr of DH(Rr, g)) + Oe[ue.length] = { + kind: 1 + /* ThisType */ + }, ue.push(Jr), xe[Zs(Jr)] = Du.SuggestedClassMembers; + } + tr(), ne && (Te = W && Eb(W.parent) ? 6 : 7); + } + function Xn() { + var de; + return ie ? !0 : o.includeCompletionsForModuleExports ? n.externalModuleIndicator || n.commonJsModuleIndicator || CV(e.getCompilerOptions()) ? !0 : ((de = e.getSymlinkCache) == null ? void 0 : de.call(e).hasAnySymlinks()) || !!e.getCompilerOptions().paths || Yse(e) : !1; + } + function jr(de) { + switch (de.kind) { + case 307: + case 228: + case 294: + case 241: + return !0; + default: + return xi(de); + } + } + function di() { + return D || w || !!ie && x0(le.parent) || !Re(W) && (vA(W, n, g) || im(le) || gt(W)); + } + function Re(de) { + return de && (de.kind === 114 && (de.parent.kind === 186 || e6(de.parent)) || de.kind === 131 && de.parent.kind === 182); + } + function gt(de) { + if (de) { + const st = de.parent.kind; + switch (de.kind) { + case 59: + return st === 172 || st === 171 || st === 169 || st === 260 || nx(st); + case 64: + return st === 265 || st === 168; + case 130: + return st === 234; + case 30: + return st === 183 || st === 216; + case 96: + return st === 168; + case 152: + return st === 238; + } + } + return !1; + } + function tr() { + var de, st; + if (!Xn() || (E.assert(!c?.data, "Should not run 'collectAutoImports' when faster path is available via `data`"), c && !c.source)) + return; + me |= 1; + const Xr = R === W && ie ? "" : R && Me(R) ? R.text.toLowerCase() : "", Rr = (de = _.getModuleSpecifierCache) == null ? void 0 : de.call(_), Jr = LA(n, _, e, o, m), tt = (st = _.getPackageJsonAutoImportProvider) == null ? void 0 : st.call(_), ut = c ? void 0 : B6(n, o, _); + HEe( + "collectAutoImports", + _, + it || (it = Eu.createImportSpecifierResolver(n, e, _, o)), + e, + s, + o, + !!ie, + cv(le), + (Pt) => { + Jr.search( + n.path, + /*preferCapitalized*/ + Z, + (Zt, fr) => { + if (!E_(Zt, pa(_.getCompilationSettings())) || !c && yx(Zt) || !ne && !ie && !(fr & 111551) || ne && !(fr & 790504)) return !1; + const Vt = Zt.charCodeAt(0); + return Z && (Vt < 65 || Vt > 90) ? !1 : c ? !0 : v4e(Zt, Xr); + }, + (Zt, fr, Vt, ir) => { + if (c && !at(Zt, (Ms) => c.source === Op(Ms.moduleSymbol.name)) || (Zt = kn(Zt, Mt), !Zt.length)) + return; + const Tr = Pt.tryResolve(Zt, Vt) || {}; + if (Tr === "failed") return; + let _r = Zt[0], Ot; + Tr !== "skipped" && ({ exportInfo: _r = Zt[0], moduleSpecifier: Ot } = Tr); + const mi = _r.exportKind === 1, Js = mi && G4(E.checkDefined(_r.symbol)) || E.checkDefined(_r.symbol); + qr(Js, { + kind: Ot ? 32 : 4, + moduleSpecifier: Ot, + symbolName: fr, + exportMapKey: ir, + exportName: _r.exportKind === 2 ? "export=" : E.checkDefined(_r.symbol).name, + fileName: _r.moduleFileName, + isDefaultExport: mi, + moduleSymbol: _r.moduleSymbol, + isFromPackageJson: _r.isFromPackageJson + }); + } + ), ke = Pt.skippedAny(), me |= Pt.resolvedAny() ? 8 : 0, me |= Pt.resolvedBeyondLimit() ? 16 : 0; + } + ); + function Mt(Pt) { + return nq( + Pt.isFromPackageJson ? tt : e, + n, + jn(Pt.moduleSymbol.valueDeclaration, Ei), + Pt.moduleSymbol, + o, + ut, + Ae(Pt.isFromPackageJson), + Rr + ); + } + } + function qr(de, st) { + const Gt = Zs(de); + xe[Gt] !== Du.GlobalsOrKeywords && (Oe[ue.length] = st, xe[Gt] = ie ? Du.LocationPriority : Du.AutoImportSuggestions, ue.push(de)); + } + function Bn(de, st) { + an(le) || de.forEach((Gt) => { + if (!wn(Gt)) + return; + const Xr = xH( + Gt, + pa(i), + /*origin*/ + void 0, + 0, + /*jsxIdentifierExpected*/ + !1 + ); + if (!Xr) + return; + const { name: Rr } = Xr, Jr = i$e( + Gt, + Rr, + st, + e, + _, + i, + o, + u + ); + if (!Jr) + return; + const tt = { kind: 128, ...Jr }; + me |= 32, Oe[ue.length] = tt, ue.push(Gt); + }); + } + function wn(de) { + return !!(de.flags & 8196); + } + function ki(de, st, Gt) { + let Xr = de; + for (; Xr && !uV(Xr, st, Gt); ) + Xr = Xr.parent; + return Xr; + } + function Cs(de) { + const st = ao(), Gt = gs(de) || yt(de) || Xt(de) || Ks(de) || gD(de); + return t("getCompletionsAtPosition: isCompletionListBlocker: " + (ao() - st)), Gt; + } + function Ks(de) { + if (de.kind === 12) + return !0; + if (de.kind === 32 && de.parent) { + if (le === de.parent && (le.kind === 286 || le.kind === 285)) + return !1; + if (de.parent.kind === 286) + return le.parent.kind !== 286; + if (de.parent.kind === 287 || de.parent.kind === 285) + return !!de.parent.parent && de.parent.parent.kind === 284; + } + return !1; + } + function xr() { + if (W) { + const de = W.parent.kind, st = CH(W); + switch (st) { + case 28: + switch (de) { + case 213: + // func( a, | + case 214: { + const Gt = W.parent.expression; + return js(n, Gt.end).line !== js(n, s).line ? { defaultCommitCharacters: yH, isNewIdentifierLocation: !0 } : { defaultCommitCharacters: bm, isNewIdentifierLocation: !0 }; + } + case 226: + return { defaultCommitCharacters: yH, isNewIdentifierLocation: !0 }; + case 176: + // constructor( a, | /* public, protected, private keywords are allowed here, so show completion */ + case 184: + // var x: (s: string, list| + case 210: + return { defaultCommitCharacters: [], isNewIdentifierLocation: !0 }; + case 209: + return { defaultCommitCharacters: bm, isNewIdentifierLocation: !0 }; + default: + return { defaultCommitCharacters: bm, isNewIdentifierLocation: !1 }; + } + case 21: + switch (de) { + case 213: + // func( | + case 214: { + const Gt = W.parent.expression; + return js(n, Gt.end).line !== js(n, s).line ? { defaultCommitCharacters: yH, isNewIdentifierLocation: !0 } : { defaultCommitCharacters: bm, isNewIdentifierLocation: !0 }; + } + case 217: + return { defaultCommitCharacters: yH, isNewIdentifierLocation: !0 }; + case 176: + // constructor( | + case 196: + return { defaultCommitCharacters: [], isNewIdentifierLocation: !0 }; + default: + return { defaultCommitCharacters: bm, isNewIdentifierLocation: !1 }; + } + case 23: + switch (de) { + case 209: + // [ | + case 181: + // [ | : string ] + case 189: + // [ | : string ] + case 167: + return { defaultCommitCharacters: bm, isNewIdentifierLocation: !0 }; + default: + return { defaultCommitCharacters: bm, isNewIdentifierLocation: !1 }; + } + case 144: + // module | + case 145: + // namespace | + case 102: + return { defaultCommitCharacters: [], isNewIdentifierLocation: !0 }; + case 25: + switch (de) { + case 267: + return { defaultCommitCharacters: [], isNewIdentifierLocation: !0 }; + default: + return { defaultCommitCharacters: bm, isNewIdentifierLocation: !1 }; + } + case 19: + switch (de) { + case 263: + // class A { | + case 210: + return { defaultCommitCharacters: [], isNewIdentifierLocation: !0 }; + default: + return { defaultCommitCharacters: bm, isNewIdentifierLocation: !1 }; + } + case 64: + switch (de) { + case 260: + // const x = a| + case 226: + return { defaultCommitCharacters: bm, isNewIdentifierLocation: !0 }; + default: + return { defaultCommitCharacters: bm, isNewIdentifierLocation: !1 }; + } + case 16: + return { + defaultCommitCharacters: bm, + isNewIdentifierLocation: de === 228 + /* TemplateExpression */ + // `aa ${| + }; + case 17: + return { + defaultCommitCharacters: bm, + isNewIdentifierLocation: de === 239 + /* TemplateSpan */ + // `aa ${10} dd ${| + }; + case 134: + return de === 174 || de === 304 ? { defaultCommitCharacters: [], isNewIdentifierLocation: !0 } : { defaultCommitCharacters: bm, isNewIdentifierLocation: !1 }; + case 42: + return de === 174 ? { defaultCommitCharacters: [], isNewIdentifierLocation: !0 } : { defaultCommitCharacters: bm, isNewIdentifierLocation: !1 }; + } + if (hL(st)) + return { defaultCommitCharacters: [], isNewIdentifierLocation: !0 }; + } + return { defaultCommitCharacters: bm, isNewIdentifierLocation: !1 }; + } + function gs(de) { + return (qJ(de) || Aj(de)) && (hA(de, s) || s === de.end && (!!de.isUnterminated || qJ(de))); + } + function Qe() { + const de = x$e(W); + if (!de) return 0; + const Gt = (Ux(de.parent) ? de.parent : void 0) || de, Xr = f4e(Gt, g); + if (!Xr) return 0; + const Rr = g.getTypeFromTypeNode(Gt), Jr = DH(Xr, g), tt = DH(Rr, g), ut = /* @__PURE__ */ new Set(); + return tt.forEach((Mt) => ut.add(Mt.escapedName)), ue = Wi(ue, kn(Jr, (Mt) => !ut.has(Mt.escapedName))), oe = 0, q = !0, 1; + } + function Ct() { + if (W?.kind === 26) return 0; + const de = ue.length, st = h$e(W, s, n); + if (!st) return 0; + oe = 0; + let Gt, Xr; + if (st.kind === 210) { + const Rr = D$e(st, g); + if (Rr === void 0) + return st.flags & 67108864 ? 2 : 0; + const Jr = g.getContextualType( + st, + 4 + /* Completions */ + ), tt = (Jr || Rr).getStringIndexType(), ut = (Jr || Rr).getNumberIndexType(); + if (q = !!tt || !!ut, Gt = EH(Rr, Jr, st, g), Xr = st.properties, Gt.length === 0 && !ut) + return 0; + } else { + E.assert( + st.kind === 206 + /* ObjectBindingPattern */ + ), q = !1; + const Rr = om(st.parent); + if (!D4(Rr)) return E.fail("Root declaration is not variable-like."); + let Jr = C0(Rr) || !!qc(Rr) || Rr.parent.parent.kind === 250; + if (!Jr && Rr.kind === 169 && (ct(Rr.parent) ? Jr = !!g.getContextualType(Rr.parent) : (Rr.parent.kind === 174 || Rr.parent.kind === 178) && (Jr = ct(Rr.parent.parent) && !!g.getContextualType(Rr.parent.parent))), Jr) { + const tt = g.getTypeAtLocation(st); + if (!tt) return 2; + Gt = g.getPropertiesOfType(tt).filter((ut) => g.isPropertyAccessible( + st, + /*isSuper*/ + !1, + /*isWrite*/ + !1, + tt, + ut + )), Xr = st.elements; + } + } + if (Gt && Gt.length > 0) { + const Rr = ye(Gt, E.checkDefined(Xr)); + ue = Wi(ue, Rr), fe(), st.kind === 210 && o.includeCompletionsWithObjectLiteralMethodSnippets && o.includeCompletionsWithInsertText && (ve(de), Bn(Rr, st)); + } + return 1; + } + function ee() { + if (!W) return 0; + const de = W.kind === 19 || W.kind === 28 ? jn(W.parent, C5) : b9(W) ? jn(W.parent.parent, C5) : void 0; + if (!de) return 0; + b9(W) || (Te = 8); + const { moduleSpecifier: st } = de.kind === 275 ? de.parent.parent : de.parent; + if (!st) + return q = !0, de.kind === 275 ? 2 : 0; + const Gt = g.getSymbolAtLocation(st); + if (!Gt) + return q = !0, 2; + oe = 3, q = !1; + const Xr = g.getExportsAndPropertiesOfModule(Gt), Rr = new Set(de.elements.filter((tt) => !zt(tt)).map((tt) => wb(tt.propertyName || tt.name))), Jr = Xr.filter((tt) => tt.escapedName !== "default" && !Rr.has(tt.escapedName)); + return ue = Wi(ue, Jr), Jr.length || (Te = 0), 1; + } + function Ve() { + if (W === void 0) return 0; + const de = W.kind === 19 || W.kind === 28 ? jn(W.parent, LS) : W.kind === 59 ? jn(W.parent.parent, LS) : void 0; + if (de === void 0) return 0; + const st = new Set(de.elements.map(Y5)); + return ue = kn(g.getTypeAtLocation(de).getApparentProperties(), (Gt) => !st.has(Gt.escapedName)), 1; + } + function K() { + var de; + const st = W && (W.kind === 19 || W.kind === 28) ? jn(W.parent, up) : void 0; + if (!st) + return 0; + const Gt = ur(st, U_(Ei, Lc)); + return oe = 5, q = !1, (de = Gt.locals) == null || de.forEach((Xr, Rr) => { + var Jr, tt; + ue.push(Xr), (tt = (Jr = Gt.symbol) == null ? void 0 : Jr.exports) != null && tt.has(Rr) && (xe[Zs(Xr)] = Du.OptionalMember); + }), 1; + } + function Ie() { + const de = T$e(n, W, le, s); + if (!de) return 0; + if (oe = 3, q = !0, Te = W.kind === 42 ? 0 : Zn(de) ? 2 : 3, !Zn(de)) return 1; + const st = W.kind === 27 ? W.parent.parent : W.parent; + let Gt = sl(st) ? Mu(st) : 0; + if (W.kind === 80 && !zt(W)) + switch (W.getText()) { + case "private": + Gt = Gt | 2; + break; + case "static": + Gt = Gt | 256; + break; + case "override": + Gt = Gt | 16; + break; + } + if (nc(st) && (Gt |= 256), !(Gt & 2)) { + const Xr = Zn(de) && Gt & 16 ? QT(sm(de)) : j4(de), Rr = na(Xr, (Jr) => { + const tt = g.getTypeAtLocation(Jr); + return Gt & 256 ? tt?.symbol && g.getPropertiesOfType(g.getTypeOfSymbolAtLocation(tt.symbol, de)) : tt && g.getPropertiesOfType(tt); + }); + ue = Wi(ue, X(Rr, de.members, Gt)), lr(ue, (Jr, tt) => { + const ut = Jr?.valueDeclaration; + if (ut && sl(ut) && ut.name && fa(ut.name)) { + const Mt = { + kind: 512, + symbolName: g.symbolToString(Jr) + }; + Oe[tt] = Mt; + } + }); + } + return 1; + } + function $e(de) { + return !!de.parent && Ii(de.parent) && Go(de.parent.parent) && (v4(de.kind) || tg(de)); + } + function Ke(de) { + if (de) { + const st = de.parent; + switch (de.kind) { + case 21: + case 28: + return Go(de.parent) ? de.parent : void 0; + default: + if ($e(de)) + return st.parent; + } + } + } + function Je(de) { + if (de) { + let st; + const Gt = ur(de.parent, (Xr) => Zn(Xr) ? "quit" : Ka(Xr) && st === Xr.body ? !0 : (st = Xr, !1)); + return Gt && Gt; + } + } + function Ye(de) { + if (de) { + const st = de.parent; + switch (de.kind) { + case 32: + // End of a type argument list + case 31: + case 44: + case 80: + case 211: + case 292: + case 291: + case 293: + if (st && (st.kind === 285 || st.kind === 286)) { + if (de.kind === 32) { + const Gt = tl( + de.pos, + n, + /*startNode*/ + void 0 + ); + if (!st.typeArguments || Gt && Gt.kind === 44) break; + } + return st; + } else if (st.kind === 291) + return st.parent.parent; + break; + // The context token is the closing } or " of an attribute, which means + // its parent is a JsxExpression, whose parent is a JsxAttribute, + // whose parent is a JsxOpeningLikeElement + case 11: + if (st && (st.kind === 291 || st.kind === 293)) + return st.parent.parent; + break; + case 20: + if (st && st.kind === 294 && st.parent && st.parent.kind === 291) + return st.parent.parent.parent; + if (st && st.kind === 293) + return st.parent.parent; + break; + } + } + } + function _t(de, st) { + return n.getLineEndOfPosition(de.getEnd()) < st; + } + function yt(de) { + const st = de.parent, Gt = st.kind; + switch (de.kind) { + case 28: + return Gt === 260 || rn(de) || Gt === 243 || Gt === 266 || // enum a { foo, | + Et(Gt) || Gt === 264 || // interface A= de.pos; + case 25: + return Gt === 207; + // var [.| + case 59: + return Gt === 208; + // var {x :html| + case 23: + return Gt === 207; + // var [x| + case 21: + return Gt === 299 || Et(Gt); + case 19: + return Gt === 266; + // enum a { | + case 30: + return Gt === 263 || // class A< | + Gt === 231 || // var C = class D< | + Gt === 264 || // interface A< | + Gt === 265 || // type List< | + nx(Gt); + case 126: + return Gt === 172 && !Zn(st.parent); + case 26: + return Gt === 169 || !!st.parent && st.parent.kind === 207; + // var [...z| + case 125: + case 123: + case 124: + return Gt === 169 && !Go(st.parent); + case 130: + return Gt === 276 || Gt === 281 || Gt === 274; + case 139: + case 153: + return !wH(de); + case 80: { + if ((Gt === 276 || Gt === 281) && de === st.name && de.text === "type" || ur( + de.parent, + Kn + ) && _t(de, s)) + return !1; + break; + } + case 86: + case 94: + case 120: + case 100: + case 115: + case 102: + case 121: + case 87: + case 140: + return !0; + case 156: + return Gt !== 276; + case 42: + return vs(de.parent) && !fc(de.parent); + } + if (hL(CH(de)) && wH(de) || $e(de) && (!Me(de) || v4(CH(de)) || zt(de))) + return !1; + switch (CH(de)) { + case 128: + case 86: + case 87: + case 138: + case 94: + case 100: + case 120: + case 121: + case 123: + case 124: + case 125: + case 126: + case 115: + return !0; + case 134: + return ss(de.parent); + } + if (ur(de.parent, Zn) && de === R && We(de, s)) + return !1; + const Rr = sv( + de.parent, + 172 + /* PropertyDeclaration */ + ); + if (Rr && de !== R && Zn(R.parent.parent) && s <= R.end) { + if (We(de, R.end)) + return !1; + if (de.kind !== 64 && (VN(Rr) || y7(Rr))) + return !0; + } + return tg(de) && !_u(de.parent) && !hm(de.parent) && !((Zn(de.parent) || Yl(de.parent) || Ao(de.parent)) && (de !== R || s > R.end)); + } + function We(de, st) { + return de.kind !== 64 && (de.kind === 27 || !ip(de.end, st, n)); + } + function Et(de) { + return nx(de) && de !== 176; + } + function Xt(de) { + if (de.kind === 9) { + const st = de.getFullText(); + return st.charAt(st.length - 1) === "."; + } + return !1; + } + function rn(de) { + return de.parent.kind === 261 && !vA(de, n, g); + } + function ye(de, st) { + if (st.length === 0) + return de; + const Gt = /* @__PURE__ */ new Set(), Xr = /* @__PURE__ */ new Set(); + for (const Jr of st) { + if (Jr.kind !== 303 && Jr.kind !== 304 && Jr.kind !== 208 && Jr.kind !== 174 && Jr.kind !== 177 && Jr.kind !== 178 && Jr.kind !== 305 || zt(Jr)) + continue; + let tt; + if (Zg(Jr)) + ft(Jr, Gt); + else if (ma(Jr) && Jr.propertyName) + Jr.propertyName.kind === 80 && (tt = Jr.propertyName.escapedText); + else { + const ut = is(Jr); + tt = ut && am(ut) ? z4(ut) : void 0; + } + tt !== void 0 && Xr.add(tt); + } + const Rr = de.filter((Jr) => !Xr.has(Jr.escapedName)); + return L(Gt, Rr), Rr; + } + function ft(de, st) { + const Gt = de.expression, Xr = g.getSymbolAtLocation(Gt), Rr = Xr && g.getTypeOfSymbolAtLocation(Xr, Gt), Jr = Rr && Rr.properties; + Jr && Jr.forEach((tt) => { + st.add(tt.name); + }); + } + function fe() { + ue.forEach((de) => { + if (de.flags & 16777216) { + const st = Zs(de); + xe[st] = xe[st] ?? Du.OptionalMember; + } + }); + } + function L(de, st) { + if (de.size !== 0) + for (const Gt of st) + de.has(Gt.name) && (xe[Zs(Gt)] = Du.MemberDeclaredBySpreadAssignment); + } + function ve(de) { + for (let st = de; st < ue.length; st++) { + const Gt = ue[st], Xr = Zs(Gt), Rr = Oe?.[st], Jr = pa(i), tt = xH( + Gt, + Jr, + Rr, + 0, + /*jsxIdentifierExpected*/ + !1 + ); + if (tt) { + const ut = xe[Xr] ?? Du.LocationPriority, { name: Mt } = tt; + xe[Xr] = Du.ObjectLiteralProperty(ut, Mt); + } + } + } + function X(de, st, Gt) { + const Xr = /* @__PURE__ */ new Set(); + for (const Rr of st) { + if (Rr.kind !== 172 && Rr.kind !== 174 && Rr.kind !== 177 && Rr.kind !== 178 || zt(Rr) || Q_( + Rr, + 2 + /* Private */ + ) || Vs(Rr) !== !!(Gt & 256)) + continue; + const Jr = TS(Rr.name); + Jr && Xr.add(Jr); + } + return de.filter( + (Rr) => !Xr.has(Rr.escapedName) && !!Rr.declarations && !(sp(Rr) & 2) && !(Rr.valueDeclaration && Fu(Rr.valueDeclaration)) + ); + } + function lt(de, st) { + const Gt = /* @__PURE__ */ new Set(), Xr = /* @__PURE__ */ new Set(); + for (const Jr of st) + zt(Jr) || (Jr.kind === 291 ? Gt.add(_D(Jr.name)) : $x(Jr) && ft(Jr, Xr)); + const Rr = de.filter((Jr) => !Gt.has(Jr.escapedName)); + return L(Xr, Rr), Rr; + } + function zt(de) { + return de.getStart(n) <= s && s <= de.getEnd(); + } + } + function h$e(e, t, n) { + var i; + if (e) { + const { parent: s } = e; + switch (e.kind) { + case 19: + // const x = { | + case 28: + if (oa(s) || Nf(s)) + return s; + break; + case 42: + return fc(s) ? jn(s.parent, oa) : void 0; + case 134: + return jn(s.parent, oa); + case 80: + if (e.text === "async" && _u(e.parent)) + return e.parent.parent; + { + if (oa(e.parent.parent) && (Zg(e.parent) || _u(e.parent) && js(n, e.getEnd()).line !== js(n, t).line)) + return e.parent.parent; + const c = ur(s, Xc); + if (c?.getLastToken(n) === e && oa(c.parent)) + return c.parent; + } + break; + default: + if ((i = s.parent) != null && i.parent && (fc(s.parent) || cp(s.parent) || A_(s.parent)) && oa(s.parent.parent)) + return s.parent.parent; + if (Zg(s) && oa(s.parent)) + return s.parent; + const o = ur(s, Xc); + if (e.kind !== 59 && o?.getLastToken(n) === e && oa(o.parent)) + return o.parent; + } + } + } + function TH(e, t) { + const n = tl(e, t); + return n && e <= n.end && (Lg(n) || f_(n.kind)) ? { contextToken: tl( + n.getFullStart(), + t, + /*startNode*/ + void 0 + ), previousToken: n } : { contextToken: n, previousToken: n }; + } + function s4e(e, t, n, i) { + const s = t.isPackageJsonImport ? i.getPackageJsonAutoImportProvider() : n, o = s.getTypeChecker(), c = t.ambientModuleName ? o.tryFindAmbientModule(t.ambientModuleName) : t.fileName ? o.getMergedSymbol(E.checkDefined(s.getSourceFile(t.fileName)).symbol) : void 0; + if (!c) return; + let _ = t.exportName === "export=" ? o.resolveExternalModuleSymbol(c) : o.tryGetMemberInModuleExportsAndProperties(t.exportName, c); + return _ ? (_ = t.exportName === "default" && G4(_) || _, { symbol: _, origin: a$e(t, e, c) }) : void 0; + } + function xH(e, t, n, i, s) { + if (zGe(n)) + return; + const o = RGe(n) ? n.symbolName : e.name; + if (o === void 0 || e.flags & 1536 && p3(o.charCodeAt(0)) || N3(e)) + return; + const c = { name: o, needsConvertPropertyAccess: !1 }; + if (E_( + o, + t, + s ? 1 : 0 + /* Standard */ + ) || e.valueDeclaration && Fu(e.valueDeclaration)) + return c; + if (e.flags & 2097152) + return { name: o, needsConvertPropertyAccess: !0 }; + switch (i) { + case 3: + return nue(n) ? { name: n.symbolName, needsConvertPropertyAccess: !1 } : void 0; + case 0: + return { name: JSON.stringify(o), needsConvertPropertyAccess: !1 }; + case 2: + case 1: + return o.charCodeAt(0) === 32 ? void 0 : { name: o, needsConvertPropertyAccess: !0 }; + case 5: + case 4: + return c; + default: + E.assertNever(i); + } + } + var kH = [], a4e = Iu(() => { + const e = []; + for (let t = 83; t <= 165; t++) + e.push({ + name: Xs(t), + kind: "keyword", + kindModifiers: "", + sortText: Du.GlobalsOrKeywords + }); + return e; + }); + function o4e(e, t) { + if (!t) return c4e(e); + const n = e + 8 + 1; + return kH[n] || (kH[n] = c4e(e).filter((i) => !y$e(sS(i.name)))); + } + function c4e(e) { + return kH[e] || (kH[e] = a4e().filter((t) => { + const n = sS(t.name); + switch (e) { + case 0: + return !1; + case 1: + return u4e(n) || n === 138 || n === 144 || n === 156 || n === 145 || n === 128 || ow(n) && n !== 157; + case 5: + return u4e(n); + case 2: + return hL(n); + case 3: + return l4e(n); + case 4: + return v4(n); + case 6: + return ow(n) || n === 87; + case 7: + return ow(n); + case 8: + return n === 156; + default: + return E.assertNever(e); + } + })); + } + function y$e(e) { + switch (e) { + case 128: + case 133: + case 163: + case 136: + case 138: + case 94: + case 162: + case 119: + case 140: + case 120: + case 142: + case 143: + case 144: + case 145: + case 146: + case 150: + case 151: + case 164: + case 123: + case 124: + case 125: + case 148: + case 154: + case 155: + case 156: + case 158: + case 159: + return !0; + default: + return !1; + } + } + function l4e(e) { + return e === 148; + } + function hL(e) { + switch (e) { + case 128: + case 129: + case 137: + case 139: + case 153: + case 134: + case 138: + case 164: + return !0; + default: + return Ij(e); + } + } + function u4e(e) { + return e === 134 || e === 135 || e === 160 || e === 130 || e === 152 || e === 156 || !r5(e) && !hL(e); + } + function CH(e) { + return Me(e) ? aS(e) ?? 0 : e.kind; + } + function v$e(e, t) { + const n = []; + if (e) { + const i = e.getSourceFile(), s = e.parent, o = i.getLineAndCharacterOfPosition(e.end).line, c = i.getLineAndCharacterOfPosition(t).line; + (zo(s) || wc(s) && s.moduleSpecifier) && e === s.moduleSpecifier && o === c && n.push({ + name: Xs( + 132 + /* AssertKeyword */ + ), + kind: "keyword", + kindModifiers: "", + sortText: Du.GlobalsOrKeywords + }); + } + return n; + } + function b$e(e, t) { + return ur(e, (n) => TC(n) && I6(n, t) ? !0 : Pd(n) ? "quit" : !1); + } + function EH(e, t, n, i) { + const s = t && t !== e, o = i.getUnionType( + kn( + e.flags & 1048576 ? e.types : [e], + (m) => !i.getPromisedTypeOfPromise(m) + ) + ), c = s && !(t.flags & 3) ? i.getUnionType([o, t]) : o, _ = S$e(c, n, i); + return c.isClass() && _4e(_) ? [] : s ? kn(_, u) : _; + function u(m) { + return Ir(m.declarations) ? at(m.declarations, (g) => g.parent !== n) : !0; + } + } + function S$e(e, t, n) { + return e.isUnion() ? n.getAllPossiblePropertiesOfTypes(kn(e.types, (i) => !(i.flags & 402784252 || n.isArrayLikeType(i) || n.isTypeInvalidDueToUnionDiscriminant(i, t) || n.typeHasCallOrConstructSignatures(i) || i.isClass() && _4e(i.getApparentProperties())))) : e.getApparentProperties(); + } + function _4e(e) { + return at(e, (t) => !!(sp(t) & 6)); + } + function DH(e, t) { + return e.isUnion() ? E.checkEachDefined(t.getAllPossiblePropertiesOfTypes(e.types), "getAllPossiblePropertiesOfTypes() should all be defined") : E.checkEachDefined(e.getApparentProperties(), "getApparentProperties() should all be defined"); + } + function T$e(e, t, n, i) { + switch (n.kind) { + case 352: + return jn(n.parent, kx); + case 1: + const s = jn(Co(Ws(n.parent, Ei).statements), kx); + if (s && !Xa(s, 20, e)) + return s; + break; + case 81: + if (jn(n.parent, ss)) + return ur(n, Zn); + break; + case 80: { + if (aS(n) || ss(n.parent) && n.parent.initializer === n) + return; + if (wH(n)) + return ur(n, kx); + } + } + if (t) { + if (n.kind === 137 || Me(t) && ss(t.parent) && Zn(n)) + return ur(t, Zn); + switch (t.kind) { + case 64: + return; + case 27: + // class c {getValue(): number; | } + case 20: + return wH(n) && n.parent.name === n ? n.parent.parent : jn(n, kx); + case 19: + // class c { | + case 28: + return jn(t.parent, kx); + default: + if (kx(n)) { + if (js(e, t.getEnd()).line !== js(e, i).line) + return n; + const s = Zn(t.parent.parent) ? hL : l4e; + return s(t.kind) || t.kind === 42 || Me(t) && s( + aS(t) ?? 0 + /* Unknown */ + ) ? t.parent.parent : void 0; + } + return; + } + } + } + function x$e(e) { + if (!e) return; + const t = e.parent; + switch (e.kind) { + case 19: + if (Qu(t)) + return t; + break; + case 27: + case 28: + case 80: + if (t.kind === 171 && Qu(t.parent)) + return t.parent; + break; + } + } + function f4e(e, t) { + if (!e) return; + if (fi(e) && v7(e.parent)) + return t.getTypeArgumentConstraint(e); + const n = f4e(e.parent, t); + if (n) + switch (e.kind) { + case 171: + return t.getTypeOfPropertyOfContextualType(n, e.symbol.escapedName); + case 193: + case 187: + case 192: + return n; + } + } + function wH(e) { + return e.parent && _7(e.parent) && kx(e.parent.parent); + } + function k$e(e, t, n, i) { + switch (t) { + case ".": + case "@": + return !0; + case '"': + case "'": + case "`": + return !!n && dae(n) && i === n.getStart(e) + 1; + case "#": + return !!n && Ni(n) && !!Al(n); + case "<": + return !!n && n.kind === 30 && (!fn(n.parent) || p4e(n.parent)); + case "/": + return !!n && (Na(n) ? !!b3(n) : n.kind === 44 && Kb(n.parent)); + case " ": + return !!n && vD(n) && n.parent.kind === 307; + default: + return E.assertNever(t); + } + } + function p4e({ left: e }) { + return tc(e); + } + function C$e(e, t, n) { + const i = n.resolveName( + "self", + /*location*/ + void 0, + 111551, + /*excludeGlobals*/ + !1 + ); + if (i && n.getTypeOfSymbolAtLocation(i, t) === e) + return !0; + const s = n.resolveName( + "global", + /*location*/ + void 0, + 111551, + /*excludeGlobals*/ + !1 + ); + if (s && n.getTypeOfSymbolAtLocation(s, t) === e) + return !0; + const o = n.resolveName( + "globalThis", + /*location*/ + void 0, + 111551, + /*excludeGlobals*/ + !1 + ); + return !!(o && n.getTypeOfSymbolAtLocation(o, t) === e); + } + function E$e(e) { + return !!(e.valueDeclaration && Mu(e.valueDeclaration) & 256 && Zn(e.valueDeclaration.parent)); + } + function D$e(e, t) { + const n = t.getContextualType(e); + if (n) + return n; + const i = rd(e.parent); + if (fn(i) && i.operatorToken.kind === 64 && e === i.left) + return t.getTypeAtLocation(i); + if (ct(i)) + return t.getContextualType(i); + } + function d4e(e, t) { + var n, i, s; + let o, c = !1; + const _ = u(); + return { + isKeywordOnlyCompletion: c, + keywordCompletion: o, + isNewIdentifierLocation: !!(_ || o === 156), + isTopLevelTypeOnly: !!((i = (n = jn(_, zo)) == null ? void 0 : n.importClause) != null && i.isTypeOnly) || !!((s = jn(_, _l)) != null && s.isTypeOnly), + couldBeTypeOnlyImportSpecifier: !!_ && g4e(_, e), + replacementSpan: w$e(_) + }; + function u() { + const m = e.parent; + if (_l(m)) { + const g = m.getLastToken(t); + if (Me(e) && g !== e) { + o = 161, c = !0; + return; + } + return o = e.kind === 156 ? void 0 : 156, fue(m.moduleReference) ? m : void 0; + } + if (g4e(m, e) && h4e(m.parent)) + return m; + if (mm(m) || Yg(m)) { + if (!m.parent.isTypeOnly && (e.kind === 19 || e.kind === 102 || e.kind === 28) && (o = 156), h4e(m)) + if (e.kind === 20 || e.kind === 80) + c = !0, o = 161; + else + return m.parent.parent; + return; + } + if (wc(m) && e.kind === 42 || up(m) && e.kind === 20) { + c = !0, o = 161; + return; + } + if (vD(e) && Ei(m)) + return o = 156, e; + if (vD(e) && zo(m)) + return o = 156, fue(m.moduleSpecifier) ? m : void 0; + } + } + function w$e(e) { + var t; + if (!e) return; + const n = ur(e, U_(zo, _l, ym)) ?? e, i = n.getSourceFile(); + if (CS(n, i)) + return e_(n, i); + E.assert( + n.kind !== 102 && n.kind !== 276 + /* ImportSpecifier */ + ); + const s = n.kind === 272 || n.kind === 351 ? m4e((t = n.importClause) == null ? void 0 : t.namedBindings) ?? n.moduleSpecifier : n.moduleReference, o = { + pos: n.getFirstToken().getStart(), + end: s.pos + }; + if (CS(o, i)) + return W0(o); + } + function m4e(e) { + var t; + return Pn( + (t = jn(e, mm)) == null ? void 0 : t.elements, + (n) => { + var i; + return !n.propertyName && yx(n.name.text) && ((i = tl(n.name.pos, e.getSourceFile(), e)) == null ? void 0 : i.kind) !== 28; + } + ); + } + function g4e(e, t) { + return ju(e) && (e.isTypeOnly || t === e.name && b9(t)); + } + function h4e(e) { + if (!fue(e.parent.parent.moduleSpecifier) || e.parent.name) + return !1; + if (mm(e)) { + const t = m4e(e); + return (t ? e.elements.indexOf(t) : e.elements.length) < 2; + } + return !0; + } + function fue(e) { + var t; + return tc(e) ? !0 : !((t = jn(Mh(e) ? e.expression : e, Na)) != null && t.text); + } + function P$e(e, t) { + if (!e) return; + let n = ur(e, (i) => Nb(i) || y4e(i) || Ds(i) ? "quit" : (Ii(i) || Ao(i)) && !r1(i.parent)); + return n || (n = ur(t, (i) => Nb(i) || y4e(i) || Ds(i) ? "quit" : Kn(i))), n; + } + function N$e(e) { + if (!e) + return !1; + let t = e, n = e.parent; + for (; n; ) { + if (Ao(n)) + return n.default === t || t.kind === 64; + t = n, n = n.parent; + } + return !1; + } + function y4e(e) { + return e.parent && bo(e.parent) && (e.parent.body === e || // const a = () => /**/; + e.kind === 39); + } + function pue(e, t, n = /* @__PURE__ */ new Set()) { + return i(e) || i(Gl(e.exportSymbol || e, t)); + function i(s) { + return !!(s.flags & 788968) || t.isUnknownSymbol(s) || !!(s.flags & 1536) && Lp(n, s) && t.getExportsOfModule(s).some((o) => pue(o, t, n)); + } + } + function A$e(e, t) { + const n = Gl(e, t).declarations; + return !!Ir(n) && Ri(n, M9); + } + function v4e(e, t) { + if (t.length === 0) + return !0; + let n = !1, i, s = 0; + const o = e.length; + for (let c = 0; c < o; c++) { + const _ = e.charCodeAt(c), u = t.charCodeAt(s); + if ((_ === u || _ === I$e(u)) && (n || (n = i === void 0 || // Beginning of word + 97 <= i && i <= 122 && 65 <= _ && _ <= 90 || // camelCase transition + i === 95 && _ !== 95), n && s++, s === t.length)) + return !0; + i = _; + } + return !1; + } + function I$e(e) { + return 97 <= e && e <= 122 ? e - 32 : e; + } + function F$e(e) { + return e === "abstract" || e === "async" || e === "await" || e === "declare" || e === "module" || e === "namespace" || e === "type" || e === "satisfies" || e === "as"; + } + var PH = {}; + Ec(PH, { + getStringLiteralCompletionDetails: () => M$e, + getStringLiteralCompletions: () => O$e + }); + var b4e = { + directory: 0, + script: 1, + "external module name": 2 + }; + function due() { + const e = /* @__PURE__ */ new Map(); + function t(n) { + const i = e.get(n.name); + (!i || b4e[i.kind] < b4e[n.kind]) && e.set(n.name, n); + } + return { + add: t, + has: e.has.bind(e), + values: e.values.bind(e) + }; + } + function O$e(e, t, n, i, s, o, c, _, u) { + if (Xse(e, t)) { + const m = Q$e(e, t, o, s, wv(o, s)); + return m && S4e(m); + } + if (lk(e, t, n)) { + if (!n || !Na(n)) return; + const m = x4e(e, n, t, o, s, _); + return L$e(m, n, e, s, o, c, i, _, t, u); + } + } + function L$e(e, t, n, i, s, o, c, _, u, m) { + if (e === void 0) + return; + const g = SV(t, u); + switch (e.kind) { + case 0: + return S4e(e.paths); + case 1: { + const h = vR(); + return cue( + e.symbols, + h, + t, + t, + n, + u, + n, + i, + s, + 99, + o, + 4, + _, + c, + /*formatContext*/ + void 0, + /*isTypeOnlyLocation*/ + void 0, + /*propertyAccessToConvert*/ + void 0, + /*jsxIdentifierExpected*/ + void 0, + /*isJsxInitializer*/ + void 0, + /*importStatementCompletion*/ + void 0, + /*recommendedCompletion*/ + void 0, + /*symbolToOriginInfoMap*/ + void 0, + /*symbolToSortTextMap*/ + void 0, + /*isJsxIdentifierExpected*/ + void 0, + /*isRightOfOpenTag*/ + void 0, + m + ), { + isGlobalCompletion: !1, + isMemberCompletion: !0, + isNewIdentifierLocation: e.hasIndexSignature, + optionalReplacementSpan: g, + entries: h, + defaultCommitCharacters: KS(e.hasIndexSignature) + }; + } + case 2: { + const h = t.kind === 15 ? 96 : Vi(qo(t), "'") ? 39 : 34, S = e.types.map((T) => ({ + name: rg(T.value, h), + kindModifiers: "", + kind: "string", + sortText: Du.LocationPriority, + replacementSpan: bV(t, u), + commitCharacters: [] + })); + return { + isGlobalCompletion: !1, + isMemberCompletion: !1, + isNewIdentifierLocation: e.isNewIdentifier, + optionalReplacementSpan: g, + entries: S, + defaultCommitCharacters: KS(e.isNewIdentifier) + }; + } + default: + return E.assertNever(e); + } + } + function M$e(e, t, n, i, s, o, c, _) { + if (!i || !Na(i)) return; + const u = x4e(t, i, n, s, o, _); + return u && R$e(e, i, u, t, s.getTypeChecker(), c); + } + function R$e(e, t, n, i, s, o) { + switch (n.kind) { + case 0: { + const c = Pn(n.paths, (_) => _.name === e); + return c && gL(e, T4e(c.extension), c.kind, [Lf(e)]); + } + case 1: { + const c = Pn(n.symbols, (_) => _.name === e); + return c && uue(c, c.name, s, i, t, o); + } + case 2: + return Pn(n.types, (c) => c.value === e) ? gL(e, "", "string", [Lf(e)]) : void 0; + default: + return E.assertNever(n); + } + } + function S4e(e) { + return { + isGlobalCompletion: !1, + isMemberCompletion: !1, + isNewIdentifierLocation: !0, + entries: e.map(({ name: s, kind: o, span: c, extension: _ }) => ({ name: s, kind: o, kindModifiers: T4e(_), sortText: Du.LocationPriority, replacementSpan: c })), + defaultCommitCharacters: KS(!0) + }; + } + function T4e(e) { + switch (e) { + case ".d.ts": + return ".d.ts"; + case ".js": + return ".js"; + case ".json": + return ".json"; + case ".jsx": + return ".jsx"; + case ".ts": + return ".ts"; + case ".tsx": + return ".tsx"; + case ".d.mts": + return ".d.mts"; + case ".mjs": + return ".mjs"; + case ".mts": + return ".mts"; + case ".d.cts": + return ".d.cts"; + case ".cjs": + return ".cjs"; + case ".cts": + return ".cts"; + case ".tsbuildinfo": + return E.fail("Extension .tsbuildinfo is unsupported."); + case void 0: + return ""; + default: + return E.assertNever(e); + } + } + function x4e(e, t, n, i, s, o) { + const c = i.getTypeChecker(), _ = mue(t.parent); + switch (_.kind) { + case 201: { + const R = mue(_.parent); + return R.kind === 205 ? { kind: 0, paths: E4e(e, t, i, s, o) } : u(R); + } + case 303: + return oa(_.parent) && _.name === t ? J$e(c, _.parent) : m() || m( + 0 + /* None */ + ); + case 212: { + const { expression: R, argumentExpression: W } = _; + return t === za(W) ? k4e(c.getTypeAtLocation(R)) : void 0; + } + case 213: + case 214: + case 291: + if (!rXe(t) && !_f(_)) { + const R = i8.getArgumentInfoForCompletions(_.kind === 291 ? _.parent : t, n, e, c); + return R && B$e(R.invocation, t, R, c) || m( + 0 + /* None */ + ); + } + // falls through (is `require("")` or `require(""` or `import("")`) + case 272: + case 278: + case 283: + case 351: + return { kind: 0, paths: E4e(e, t, i, s, o) }; + case 296: + const g = B9(c, _.parent.clauses), h = m(); + return h ? { kind: 2, types: h.types.filter((R) => !g.hasValue(R.value)), isNewIdentifier: !1 } : void 0; + case 276: + case 281: + const T = _; + if (T.propertyName && t !== T.propertyName) + return; + const C = T.parent, { moduleSpecifier: D } = C.kind === 275 ? C.parent.parent : C.parent; + if (!D) return; + const w = c.getSymbolAtLocation(D); + if (!w) return; + const A = c.getExportsAndPropertiesOfModule(w), O = new Set(C.elements.map((R) => wb(R.propertyName || R.name))); + return { kind: 1, symbols: A.filter((R) => R.escapedName !== "default" && !O.has(R.escapedName)), hasIndexSignature: !1 }; + default: + return m() || m( + 0 + /* None */ + ); + } + function u(g) { + switch (g.kind) { + case 233: + case 183: { + const T = ur(_, (C) => C.parent === g); + return T ? { kind: 2, types: NH(c.getTypeArgumentConstraint(T)), isNewIdentifier: !1 } : void 0; + } + case 199: + const { indexType: h, objectType: S } = g; + return I6(h, n) ? k4e(c.getTypeFromTypeNode(S)) : void 0; + case 192: { + const T = u(mue(g.parent)); + if (!T) + return; + const C = j$e(g, _); + return T.kind === 1 ? { kind: 1, symbols: T.symbols.filter((D) => !as(C, D.name)), hasIndexSignature: T.hasIndexSignature } : { kind: 2, types: T.types.filter((D) => !as(C, D.value)), isNewIdentifier: !1 }; + } + default: + return; + } + } + function m(g = 4) { + const h = NH(w9(t, c, g)); + if (h.length) + return { kind: 2, types: h, isNewIdentifier: !1 }; + } + } + function mue(e) { + switch (e.kind) { + case 196: + return C3(e); + case 217: + return rd(e); + default: + return e; + } + } + function j$e(e, t) { + return Li(e.types, (n) => n !== t && M0(n) && ea(n.literal) ? n.literal.text : void 0); + } + function B$e(e, t, n, i) { + let s = !1; + const o = /* @__PURE__ */ new Set(), c = bu(e) ? E.checkDefined(ur(t.parent, hm)) : t, _ = i.getCandidateSignaturesForStringLiteralCompletions(e, c), u = na(_, (m) => { + if (!ku(m) && n.argumentCount > m.parameters.length) return; + let g = m.getTypeParameterAtPosition(n.argumentIndex); + if (bu(e)) { + const h = i.getTypeOfPropertyOfType(g, iN(c.name)); + h && (g = h); + } + return s = s || !!(g.flags & 4), NH(g, o); + }); + return Ir(u) ? { kind: 2, types: u, isNewIdentifier: s } : void 0; + } + function k4e(e) { + return e && { + kind: 1, + symbols: kn(e.getApparentProperties(), (t) => !(t.valueDeclaration && Fu(t.valueDeclaration))), + hasIndexSignature: UV(e) + }; + } + function J$e(e, t) { + const n = e.getContextualType(t); + if (!n) return; + const i = e.getContextualType( + t, + 4 + /* Completions */ + ); + return { + kind: 1, + symbols: EH( + n, + i, + t, + e + ), + hasIndexSignature: UV(n) + }; + } + function NH(e, t = /* @__PURE__ */ new Set()) { + return e ? (e = kV(e), e.isUnion() ? na(e.types, (n) => NH(n, t)) : e.isStringLiteral() && !(e.flags & 1024) && Lp(t, e.value) ? [e] : He) : He; + } + function Ew(e, t, n) { + return { name: e, kind: t, extension: n }; + } + function gue(e) { + return Ew( + e, + "directory", + /*extension*/ + void 0 + ); + } + function C4e(e, t, n) { + const i = Z$e(e, t), s = e.length === 0 ? void 0 : ql(t, e.length); + return n.map(({ name: o, kind: c, extension: _ }) => o.includes(jo) || o.includes(HI) ? { name: o, kind: c, extension: _, span: s } : { name: o, kind: c, extension: _, span: i }); + } + function E4e(e, t, n, i, s) { + return C4e(t.text, t.getStart(e) + 1, z$e(e, t, n, i, s)); + } + function z$e(e, t, n, i, s) { + const o = Vl(t.text), c = Na(t) ? n.getModeForUsageLocation(e, t) : void 0, _ = e.path, u = Hn(_), m = n.getCompilerOptions(), g = n.getTypeChecker(), h = wv(n, i), S = hue(m, 1, e, g, s, c); + return K$e(o) || !m.baseUrl && !m.paths && (q_(o) || vY(o)) ? W$e(o, u, n, i, h, _, S) : H$e(o, u, c, n, i, h, S); + } + function hue(e, t, n, i, s, o) { + return { + extensionsToSearch: Dp(U$e(e, i)), + referenceKind: t, + importingSourceFile: n, + endingPreference: s?.importModuleSpecifierEnding, + resolutionMode: o + }; + } + function W$e(e, t, n, i, s, o, c) { + const _ = n.getCompilerOptions(); + return _.rootDirs ? q$e( + _.rootDirs, + e, + t, + c, + n, + i, + s, + o + ) : Ki(ZA( + e, + t, + c, + n, + i, + s, + /*moduleSpecifierIsRelative*/ + !0, + o + ).values()); + } + function U$e(e, t) { + const n = t ? Li(t.getAmbientModules(), (o) => { + const c = o.name.slice(1, -1); + if (!(!c.startsWith("*.") || c.includes("/"))) + return c.slice(1); + }) : [], i = [...tD(e), n], s = Su(e); + return S9(s) ? Z3(e, i) : i; + } + function V$e(e, t, n, i) { + e = e.map((o) => il(Hs(q_(o) ? o : Ln(t, o)))); + const s = Dc(e, (o) => Zf(o, n, t, i) ? n.substr(o.length) : void 0); + return hb( + [...e.map((o) => Ln(o, s)), n].map((o) => X1(o)), + bb, + cu + ); + } + function q$e(e, t, n, i, s, o, c, _) { + const m = s.getCompilerOptions().project || o.getCurrentDirectory(), g = !(o.useCaseSensitiveFileNames && o.useCaseSensitiveFileNames()), h = V$e(e, m, n, g); + return hb( + na(h, (S) => Ki(ZA( + t, + S, + i, + s, + o, + c, + /*moduleSpecifierIsRelative*/ + !0, + _ + ).values())), + (S, T) => S.name === T.name && S.kind === T.kind && S.extension === T.extension + ); + } + function ZA(e, t, n, i, s, o, c, _, u = due()) { + var m; + e === void 0 && (e = ""), e = Vl(e), Ay(e) || (e = Hn(e)), e === "" && (e = "." + jo), e = il(e); + const g = Iy(t, e), h = Ay(g) ? g : Hn(g); + if (!c) { + const D = yae(h, s); + if (D) { + const A = WC(D, s).typesVersions; + if (typeof A == "object") { + const O = (m = YF(A)) == null ? void 0 : m.paths; + if (O) { + const F = Hn(D), R = g.slice(il(F).length); + if (w4e(u, R, F, n, i, s, o, O)) + return u; + } + } + } + } + const S = !(s.useCaseSensitiveFileNames && s.useCaseSensitiveFileNames()); + if (!I9(s, h)) return u; + const T = HV( + s, + h, + n.extensionsToSearch, + /*exclude*/ + void 0, + /*include*/ + ["./*"] + ); + if (T) + for (let D of T) { + if (D = Hs(D), _ && xh(D, _, t, S) === 0) + continue; + const { name: w, extension: A } = D4e( + Vc(D), + i, + n, + /*isExportsOrImportsWildcard*/ + !1 + ); + u.add(Ew(w, "script", A)); + } + const C = A9(s, h); + if (C) + for (const D of C) { + const w = Vc(Hs(D)); + w !== "@types" && u.add(gue(w)); + } + return u; + } + function D4e(e, t, n, i) { + const s = Bh.tryGetRealFileNameForNonJsDeclarationFileName(e); + if (s) + return { name: s, extension: $g(s) }; + if (n.referenceKind === 0) + return { name: e, extension: $g(e) }; + let o = Bh.getModuleSpecifierPreferences( + { importModuleSpecifierEnding: n.endingPreference }, + t, + t.getCompilerOptions(), + n.importingSourceFile + ).getAllowedEndingsInPreferredOrder(n.resolutionMode); + if (i && (o = o.filter( + (_) => _ !== 0 && _ !== 1 + /* Index */ + )), o[0] === 3) { + if (vc(e, Y3)) + return { name: e, extension: $g(e) }; + const _ = Bh.tryGetJSExtensionForFile(e, t.getCompilerOptions()); + return _ ? { name: Oh(e, _), extension: _ } : { name: e, extension: $g(e) }; + } + if (!i && (o[0] === 0 || o[0] === 1) && vc(e, [ + ".js", + ".jsx", + ".ts", + ".tsx", + ".d.ts" + /* Dts */ + ])) + return { name: $u(e), extension: $g(e) }; + const c = Bh.tryGetJSExtensionForFile(e, t.getCompilerOptions()); + return c ? { name: Oh(e, c), extension: c } : { name: e, extension: $g(e) }; + } + function w4e(e, t, n, i, s, o, c, _) { + const u = (g) => _[g], m = (g, h) => { + const S = Px(g), T = Px(h), C = typeof S == "object" ? S.prefix.length : g.length, D = typeof T == "object" ? T.prefix.length : h.length; + return uo(D, C); + }; + return P4e( + e, + /*isExports*/ + !1, + /*isImports*/ + !1, + t, + n, + i, + s, + o, + c, + Zd(_), + u, + m + ); + } + function P4e(e, t, n, i, s, o, c, _, u, m, g, h) { + let S = [], T; + for (const C of m) { + if (C === ".") continue; + const D = C.replace(/^\.\//, "") + ((t || n) && Eo(C, "/") ? "*" : ""), w = g(C); + if (w) { + const A = Px(D); + if (!A) continue; + const O = typeof A == "object" && MI(A, i); + O && (T === void 0 || h(D, T) === -1) && (T = D, S = S.filter((R) => !R.matchedPattern)), (typeof A == "string" || T === void 0 || h(D, T) !== 1) && S.push({ + matchedPattern: O, + results: G$e(D, w, i, s, o, t, n, c, _, u).map(({ name: R, kind: W, extension: V }) => Ew(R, W, V)) + }); + } + } + return S.forEach((C) => C.results.forEach((D) => e.add(D))), T !== void 0; + } + function H$e(e, t, n, i, s, o, c) { + const _ = i.getTypeChecker(), u = i.getCompilerOptions(), { baseUrl: m, paths: g } = u, h = due(), S = Su(u); + if (m) { + const D = Hs(Ln(s.getCurrentDirectory(), m)); + ZA( + e, + D, + c, + i, + s, + o, + /*moduleSpecifierIsRelative*/ + !1, + /*exclude*/ + void 0, + h + ); + } + if (g) { + const D = u5(u, s); + w4e(h, e, D, c, i, s, o, g); + } + const T = A4e(e); + for (const D of X$e(e, T, _)) + h.add(Ew( + D, + "external module name", + /*extension*/ + void 0 + )); + if (O4e(i, s, o, t, T, c, h), S9(S)) { + let D = !1; + if (T === void 0) + for (const w of Y$e(s, t)) { + const A = Ew( + w, + "external module name", + /*extension*/ + void 0 + ); + h.has(A.name) || (D = !0, h.add(A)); + } + if (!D) { + const w = H3(u), A = G3(u); + let O = !1; + const F = (W) => { + if (A && !O) { + const V = Ln(W, "package.json"); + if (O = mw(s, V)) { + const $ = WC(V, s); + C( + $.imports, + e, + W, + /*isExports*/ + !1, + /*isImports*/ + !0 + ); + } + } + }; + let R = (W) => { + const V = Ln(W, "node_modules"); + I9(s, V) && ZA( + e, + V, + c, + i, + s, + o, + /*moduleSpecifierIsRelative*/ + !1, + /*exclude*/ + void 0, + h + ), F(W); + }; + if (T && w) { + const W = R; + R = (V) => { + const $ = Ul(e); + $.shift(); + let U = $.shift(); + if (!U) + return W(V); + if (Vi(U, "@")) { + const J = $.shift(); + if (!J) + return W(V); + U = Ln(U, J); + } + if (A && Vi(U, "#")) + return F(V); + const _e = Ln(V, "node_modules", U), Z = Ln(_e, "package.json"); + if (mw(s, Z)) { + const J = WC(Z, s), re = $.join("/") + ($.length && Ay(e) ? "/" : ""); + C( + J.exports, + re, + _e, + /*isExports*/ + !0, + /*isImports*/ + !1 + ); + return; + } + return W(V); + }; + } + sg(s, t, R); + } + } + return Ki(h.values()); + function C(D, w, A, O, F) { + if (typeof D != "object" || D === null) + return; + const R = Zd(D), W = o1(u, n); + P4e( + h, + O, + F, + w, + A, + c, + i, + s, + o, + R, + (V) => { + const $ = N4e(D[V], W); + if ($ !== void 0) + return QT(Eo(V, "/") && Eo($, "/") ? $ + "*" : $); + }, + nW + ); + } + } + function N4e(e, t) { + if (typeof e == "string") + return e; + if (e && typeof e == "object" && !os(e)) { + for (const n in e) + if (n === "default" || t.includes(n) || JN(t, n)) { + const i = e[n]; + return N4e(i, t); + } + } + } + function A4e(e) { + return yue(e) ? Ay(e) ? e : Hn(e) : void 0; + } + function G$e(e, t, n, i, s, o, c, _, u, m) { + const g = Px(e); + if (!g) + return He; + if (typeof g == "string") + return S( + e, + "script" + /* scriptElement */ + ); + const h = OR(n, g.prefix); + if (h === void 0) + return Eo(e, "/*") ? S( + g.prefix, + "directory" + /* directory */ + ) : na(t, (C) => { + var D; + return (D = I4e("", i, C, s, o, c, _, u, m)) == null ? void 0 : D.map(({ name: w, ...A }) => ({ name: g.prefix + w + g.suffix, ...A })); + }); + return na(t, (T) => I4e(h, i, T, s, o, c, _, u, m)); + function S(T, C) { + return Vi(T, n) ? [{ name: X1(T), kind: C, extension: void 0 }] : He; + } + } + function I4e(e, t, n, i, s, o, c, _, u) { + if (!_.readDirectory) + return; + const m = Px(n); + if (m === void 0 || rs(m)) + return; + const g = Iy(m.prefix), h = Ay(m.prefix) ? g : Hn(g), S = Ay(m.prefix) ? "" : Vc(g), T = yue(e), C = T ? Ay(e) ? e : Hn(e) : void 0, D = () => u.getCommonSourceDirectory(), w = !xS(u), A = c.getCompilerOptions().outDir, O = c.getCompilerOptions().declarationDir, F = T ? Ln(h, S + C) : h, R = Hs(Ln(t, F)), W = o && A && zB(R, w, A, D), V = o && O && zB(R, w, O, D), $ = Hs(m.suffix), U = $ && l5("_" + $), _e = $ ? JB("_" + $) : void 0, Z = [ + U && Oh($, U), + ..._e ? _e.map((q) => Oh($, q)) : [], + $ + ].filter(rs), J = $ ? Z.map((q) => "**/*" + q) : ["./*"], re = (s || o) && Eo(n, "/*"); + let te = ie(R); + return W && (te = Wi(te, ie(W))), V && (te = Wi(te, ie(V))), $ || (te = Wi(te, le(R)), W && (te = Wi(te, le(W))), V && (te = Wi(te, le(V)))), te; + function ie(q) { + const me = T ? q : il(q) + S; + return Li(HV( + _, + q, + i.extensionsToSearch, + /*exclude*/ + void 0, + J + ), (Ce) => { + const Ee = Te(Ce, me); + if (Ee) { + if (yue(Ee)) + return gue(Ul(F4e(Ee))[1]); + const { name: oe, extension: ke } = D4e(Ee, c, i, re); + return Ew(oe, "script", ke); + } + }); + } + function le(q) { + return Li(A9(_, q), (me) => me === "node_modules" ? void 0 : gue(me)); + } + function Te(q, me) { + return Dc(Z, (Ce) => { + const Ee = $$e(Hs(q), me, Ce); + return Ee === void 0 ? void 0 : F4e(Ee); + }); + } + } + function $$e(e, t, n) { + return Vi(e, t) && Eo(e, n) ? e.slice(t.length, e.length - n.length) : void 0; + } + function F4e(e) { + return e[0] === jo ? e.slice(1) : e; + } + function X$e(e, t, n) { + const s = n.getAmbientModules().map((o) => Op(o.name)).filter((o) => Vi(o, e) && !o.includes("*")); + if (t !== void 0) { + const o = il(t); + return s.map((c) => XE(c, o)); + } + return s; + } + function Q$e(e, t, n, i, s) { + const o = n.getCompilerOptions(), c = Si(e, t), _ = Fg(e.text, c.pos), u = _ && Pn(_, (w) => t >= w.pos && t <= w.end); + if (!u) + return; + const m = e.text.slice(u.pos, t), g = eXe.exec(m); + if (!g) + return; + const [, h, S, T] = g, C = Hn(e.path), D = S === "path" ? ZA( + T, + C, + hue(o, 0, e), + n, + i, + s, + /*moduleSpecifierIsRelative*/ + !0, + e.path + ) : S === "types" ? O4e(n, i, s, C, A4e(T), hue(o, 1, e)) : E.fail(); + return C4e(T, u.pos + h.length, Ki(D.values())); + } + function O4e(e, t, n, i, s, o, c = due()) { + const _ = e.getCompilerOptions(), u = /* @__PURE__ */ new Map(), m = F9(() => LD(_, t)) || He; + for (const h of m) + g(h); + for (const h of GV(i, t)) { + const S = Ln(Hn(h), "node_modules/@types"); + g(S); + } + return c; + function g(h) { + if (I9(t, h)) + for (const S of A9(t, h)) { + const T = zN(S); + if (!(_.types && !as(_.types, T))) + if (s === void 0) + u.has(T) || (c.add(Ew( + T, + "external module name", + /*extension*/ + void 0 + )), u.set(T, !0)); + else { + const C = Ln(h, S), D = gJ(s, T, Nh(t)); + D !== void 0 && ZA( + D, + C, + o, + e, + t, + n, + /*moduleSpecifierIsRelative*/ + !1, + /*exclude*/ + void 0, + c + ); + } + } + } + } + function Y$e(e, t) { + if (!e.readFile || !e.fileExists) return He; + const n = []; + for (const i of GV(t, e)) { + const s = WC(i, e); + for (const o of tXe) { + const c = s[o]; + if (c) + for (const _ in c) + ro(c, _) && !Vi(_, "@types/") && n.push(_); + } + } + return n; + } + function Z$e(e, t) { + const n = Math.max(e.lastIndexOf(jo), e.lastIndexOf(HI)), i = n !== -1 ? n + 1 : 0, s = e.length - i; + return s === 0 || E_( + e.substr(i, s), + 99 + /* ESNext */ + ) ? void 0 : ql(t + i, s); + } + function K$e(e) { + if (e && e.length >= 2 && e.charCodeAt(0) === 46) { + const t = e.length >= 3 && e.charCodeAt(1) === 46 ? 2 : 1, n = e.charCodeAt(t); + return n === 47 || n === 92; + } + return !1; + } + var eXe = /^(\/\/\/\s* Sk, + DefinitionKind: () => z4e, + EntryKind: () => W4e, + ExportKind: () => L4e, + FindReferencesUse: () => U4e, + ImportExport: () => M4e, + createImportTracker: () => vue, + findModuleReferences: () => R4e, + findReferenceOrRenameEntries: () => gXe, + findReferencedSymbols: () => pXe, + getContextNode: () => eT, + getExportInfo: () => bue, + getImplementationsAtPosition: () => mXe, + getImportOrExportSymbol: () => J4e, + getReferenceEntriesForNode: () => q4e, + isContextWithStartAndEndNode: () => Tue, + isDeclarationOfSymbol: () => Q4e, + isWriteAccessForReference: () => kue, + toContextSpan: () => xue, + toHighlightSpan: () => xXe, + toReferenceEntry: () => $4e, + toRenameLocation: () => yXe + }); + function vue(e, t, n, i) { + const s = aXe(e, n, i); + return (o, c, _) => { + const { directImports: u, indirectUsers: m } = nXe(e, t, s, c, n, i); + return { indirectUsers: m, ...iXe(u, o, c.exportKind, n, _) }; + }; + } + var L4e = /* @__PURE__ */ ((e) => (e[e.Named = 0] = "Named", e[e.Default = 1] = "Default", e[e.ExportEquals = 2] = "ExportEquals", e))(L4e || {}), M4e = /* @__PURE__ */ ((e) => (e[e.Import = 0] = "Import", e[e.Export = 1] = "Export", e))(M4e || {}); + function nXe(e, t, n, { exportingModuleSymbol: i, exportKind: s }, o, c) { + const _ = O6(), u = O6(), m = [], g = !!i.globalExports, h = g ? void 0 : []; + return T(i), { directImports: m, indirectUsers: S() }; + function S() { + if (g) + return e; + if (i.declarations) + for (const F of i.declarations) + Pb(F) && t.has(F.getSourceFile().fileName) && A(F); + return h.map(Cr); + } + function T(F) { + const R = O(F); + if (R) { + for (const W of R) + if (_(W)) + switch (c && c.throwIfCancellationRequested(), W.kind) { + case 213: + if (_f(W)) { + C(W); + break; + } + if (!g) { + const $ = W.parent; + if (s === 2 && $.kind === 260) { + const { name: U } = $; + if (U.kind === 80) { + m.push(U); + break; + } + } + } + break; + case 80: + break; + // TODO: GH#23879 + case 271: + w( + W, + W.name, + $n( + W, + 32 + /* Export */ + ), + /*alreadyAddedDirect*/ + !1 + ); + break; + case 272: + case 351: + m.push(W); + const V = W.importClause && W.importClause.namedBindings; + V && V.kind === 274 ? w( + W, + V.name, + /*isReExport*/ + !1, + /*alreadyAddedDirect*/ + !0 + ) : !g && bS(W) && A(yL(W)); + break; + case 278: + W.exportClause ? W.exportClause.kind === 280 ? A( + yL(W), + /*addTransitiveDependencies*/ + !0 + ) : m.push(W) : T(_Xe(W, o)); + break; + case 205: + !g && W.isTypeOf && !W.qualifier && D(W) && A( + W.getSourceFile(), + /*addTransitiveDependencies*/ + !0 + ), m.push(W); + break; + default: + E.failBadSyntaxKind(W, "Unexpected import kind."); + } + } + } + function C(F) { + const R = ur(F, AH) || F.getSourceFile(); + A( + R, + /** addTransitiveDependencies */ + !!D( + F, + /*stopAtAmbientModule*/ + !0 + ) + ); + } + function D(F, R = !1) { + return ur(F, (W) => R && AH(W) ? "quit" : Jp(W) && at(W.modifiers, jx)); + } + function w(F, R, W, V) { + if (s === 2) + V || m.push(F); + else if (!g) { + const $ = yL(F); + E.assert( + $.kind === 307 || $.kind === 267 + /* ModuleDeclaration */ + ), W || sXe($, R, o) ? A( + $, + /*addTransitiveDependencies*/ + !0 + ) : A($); + } + } + function A(F, R = !1) { + if (E.assert(!g), !u(F) || (h.push(F), !R)) return; + const V = o.getMergedSymbol(F.symbol); + if (!V) return; + E.assert(!!(V.flags & 1536)); + const $ = O(V); + if ($) + for (const U of $) + Ed(U) || A( + yL(U), + /*addTransitiveDependencies*/ + !0 + ); + } + function O(F) { + return n.get(Zs(F).toString()); + } + } + function iXe(e, t, n, i, s) { + const o = [], c = []; + function _(S, T) { + o.push([S, T]); + } + if (e) + for (const S of e) + u(S); + return { importSearches: o, singleReferences: c }; + function u(S) { + if (S.kind === 271) { + Sue(S) && m(S.name); + return; + } + if (S.kind === 80) { + m(S); + return; + } + if (S.kind === 205) { + if (S.qualifier) { + const D = w_(S.qualifier); + D.escapedText === _c(t) && c.push(D); + } else n === 2 && c.push(S.argument.literal); + return; + } + if (S.moduleSpecifier.kind !== 11) + return; + if (S.kind === 278) { + S.exportClause && up(S.exportClause) && g(S.exportClause); + return; + } + const { name: T, namedBindings: C } = S.importClause || { name: void 0, namedBindings: void 0 }; + if (C) + switch (C.kind) { + case 274: + m(C.name); + break; + case 275: + (n === 0 || n === 1) && g(C); + break; + default: + E.assertNever(C); + } + if (T && (n === 1 || n === 2) && (!s || T.escapedText === T9(t))) { + const D = i.getSymbolAtLocation(T); + _(T, D); + } + } + function m(S) { + n === 2 && (!s || h(S.escapedText)) && _(S, i.getSymbolAtLocation(S)); + } + function g(S) { + if (S) + for (const T of S.elements) { + const { name: C, propertyName: D } = T; + if (h(wb(D || C))) + if (D) + c.push(D), (!s || wb(C) === t.escapedName) && _(C, i.getSymbolAtLocation(C)); + else { + const w = T.kind === 281 && T.propertyName ? i.getExportSpecifierLocalTargetSymbol(T) : i.getSymbolAtLocation(C); + _(C, w); + } + } + } + function h(S) { + return S === t.escapedName || n !== 0 && S === "default"; + } + } + function sXe(e, t, n) { + const i = n.getSymbolAtLocation(t); + return !!j4e(e, (s) => { + if (!wc(s)) return; + const { exportClause: o, moduleSpecifier: c } = s; + return !c && o && up(o) && o.elements.some((_) => n.getExportSpecifierLocalTargetSymbol(_) === i); + }); + } + function R4e(e, t, n) { + var i; + const s = [], o = e.getTypeChecker(); + for (const c of t) { + const _ = n.valueDeclaration; + if (_?.kind === 307) { + for (const u of c.referencedFiles) + e.getSourceFileFromReference(c, u) === _ && s.push({ kind: "reference", referencingFile: c, ref: u }); + for (const u of c.typeReferenceDirectives) { + const m = (i = e.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(u, c)) == null ? void 0 : i.resolvedTypeReferenceDirective; + m !== void 0 && m.resolvedFileName === _.fileName && s.push({ kind: "reference", referencingFile: c, ref: u }); + } + } + B4e(c, (u, m) => { + o.getSymbolAtLocation(m) === n && s.push(no(u) ? { kind: "implicit", literal: m, referencingFile: c } : { kind: "import", literal: m }); + }); + } + return s; + } + function aXe(e, t, n) { + const i = /* @__PURE__ */ new Map(); + for (const s of e) + n && n.throwIfCancellationRequested(), B4e(s, (o, c) => { + const _ = t.getSymbolAtLocation(c); + if (_) { + const u = Zs(_).toString(); + let m = i.get(u); + m || i.set(u, m = []), m.push(o); + } + }); + return i; + } + function j4e(e, t) { + return lr(e.kind === 307 ? e.statements : e.body.statements, (n) => ( + // TODO: GH#18217 + t(n) || AH(n) && lr(n.body && n.body.statements, t) + )); + } + function B4e(e, t) { + if (e.externalModuleIndicator || e.imports !== void 0) + for (const n of e.imports) + t(O4(n), n); + else + j4e(e, (n) => { + switch (n.kind) { + case 278: + case 272: { + const i = n; + i.moduleSpecifier && ea(i.moduleSpecifier) && t(i, i.moduleSpecifier); + break; + } + case 271: { + const i = n; + Sue(i) && t(i, i.moduleReference.expression); + break; + } + } + }); + } + function J4e(e, t, n, i) { + return i ? s() : s() || o(); + function s() { + var u; + const { parent: m } = e, g = m.parent; + if (t.exportSymbol) + return m.kind === 211 ? (u = t.declarations) != null && u.some((T) => T === m) && fn(g) ? S( + g, + /*useLhsSymbol*/ + !1 + ) : void 0 : c(t.exportSymbol, _(m)); + { + const T = cXe(m, e); + if (T && $n( + T, + 32 + /* Export */ + )) + return _l(T) && T.moduleReference === e ? i ? void 0 : { kind: 0, symbol: n.getSymbolAtLocation(T.name) } : c(t, _(T)); + if (ig(m)) + return c( + t, + 0 + /* Named */ + ); + if (Io(m)) + return h(m); + if (Io(g)) + return h(g); + if (fn(m)) + return S( + m, + /*useLhsSymbol*/ + !0 + ); + if (fn(g)) + return S( + g, + /*useLhsSymbol*/ + !0 + ); + if (jS(m) || rz(m)) + return c( + t, + 0 + /* Named */ + ); + } + function h(T) { + if (!T.symbol.parent) return; + const C = T.isExportEquals ? 2 : 1; + return { kind: 1, symbol: t, exportInfo: { exportingModuleSymbol: T.symbol.parent, exportKind: C } }; + } + function S(T, C) { + let D; + switch (Sc(T)) { + case 1: + D = 0; + break; + case 2: + D = 2; + break; + default: + return; + } + const w = C ? n.getSymbolAtLocation(cJ(Ws(T.left, vo))) : t; + return w && c(w, D); + } + } + function o() { + if (!lXe(e)) return; + let m = n.getImmediateAliasedSymbol(t); + if (!m || (m = uXe(m, n), m.escapedName === "export=" && (m = oXe(m, n), m === void 0))) + return; + const g = T9(m); + if (g === void 0 || g === "default" || g === t.escapedName) + return { kind: 0, symbol: m }; + } + function c(u, m) { + const g = bue(u, m, n); + return g && { kind: 1, symbol: u, exportInfo: g }; + } + function _(u) { + return $n( + u, + 2048 + /* Default */ + ) ? 1 : 0; + } + } + function oXe(e, t) { + var n, i; + if (e.flags & 2097152) + return t.getImmediateAliasedSymbol(e); + const s = E.checkDefined(e.valueDeclaration); + if (Io(s)) + return (n = jn(s.expression, bd)) == null ? void 0 : n.symbol; + if (fn(s)) + return (i = jn(s.right, bd)) == null ? void 0 : i.symbol; + if (Ei(s)) + return s.symbol; + } + function cXe(e, t) { + const n = Kn(e) ? e : ma(e) ? tx(e) : void 0; + return n ? e.name !== t || t2(n.parent) ? void 0 : pc(n.parent.parent) ? n.parent.parent : void 0 : e; + } + function lXe(e) { + const { parent: t } = e; + switch (t.kind) { + case 271: + return t.name === e && Sue(t); + case 276: + return !t.propertyName; + case 273: + case 274: + return E.assert(t.name === e), !0; + case 208: + return an(e) && Ib(t.parent.parent); + default: + return !1; + } + } + function bue(e, t, n) { + const i = e.parent; + if (!i) return; + const s = n.getMergedSymbol(i); + return ox(s) ? { exportingModuleSymbol: s, exportKind: t } : void 0; + } + function uXe(e, t) { + if (e.declarations) + for (const n of e.declarations) { + if (Tu(n) && !n.propertyName && !n.parent.parent.moduleSpecifier) + return t.getExportSpecifierLocalTargetSymbol(n) || e; + if (Tn(n) && Wg(n.expression) && !Ni(n.name)) + return t.getSymbolAtLocation(n); + if (_u(n) && fn(n.parent.parent) && Sc(n.parent.parent) === 2) + return t.getExportSpecifierLocalTargetSymbol(n.name); + } + return e; + } + function _Xe(e, t) { + return t.getMergedSymbol(yL(e).symbol); + } + function yL(e) { + if (e.kind === 213 || e.kind === 351) + return e.getSourceFile(); + const { parent: t } = e; + return t.kind === 307 ? t : (E.assert( + t.kind === 268 + /* ModuleBlock */ + ), Ws(t.parent, AH)); + } + function AH(e) { + return e.kind === 267 && e.name.kind === 11; + } + function Sue(e) { + return e.moduleReference.kind === 283 && e.moduleReference.expression.kind === 11; + } + var z4e = /* @__PURE__ */ ((e) => (e[e.Symbol = 0] = "Symbol", e[e.Label = 1] = "Label", e[e.Keyword = 2] = "Keyword", e[e.This = 3] = "This", e[e.String = 4] = "String", e[e.TripleSlashReference = 5] = "TripleSlashReference", e))(z4e || {}), W4e = /* @__PURE__ */ ((e) => (e[e.Span = 0] = "Span", e[e.Node = 1] = "Node", e[e.StringLiteral = 2] = "StringLiteral", e[e.SearchedLocalFoundProperty = 3] = "SearchedLocalFoundProperty", e[e.SearchedPropertyFoundLocal = 4] = "SearchedPropertyFoundLocal", e))(W4e || {}); + function Wh(e, t = 1) { + return { + kind: t, + node: e.name || e, + context: fXe(e) + }; + } + function Tue(e) { + return e && e.kind === void 0; + } + function fXe(e) { + if (bl(e)) + return eT(e); + if (e.parent) { + if (!bl(e.parent) && !Io(e.parent)) { + if (an(e)) { + const n = fn(e.parent) ? e.parent : vo(e.parent) && fn(e.parent.parent) && e.parent.parent.left === e.parent ? e.parent.parent : void 0; + if (n && Sc(n) !== 0) + return eT(n); + } + if (Dd(e.parent) || Kb(e.parent)) + return e.parent.parent; + if (MS(e.parent) || i1(e.parent) || g4(e.parent)) + return e.parent; + if (Na(e)) { + const n = b3(e); + if (n) { + const i = ur(n, (s) => bl(s) || xi(s) || TC(s)); + return bl(i) ? eT(i) : i; + } + } + const t = ur(e, fa); + return t ? eT(t.parent) : void 0; + } + if (e.parent.name === e || // node is name of declaration, use parent + Go(e.parent) || Io(e.parent) || // Property name of the import export specifier or binding pattern, use parent + (jy(e.parent) || ma(e.parent)) && e.parent.propertyName === e || // Is default export + e.kind === 90 && $n( + e.parent, + 2080 + /* ExportDefault */ + )) + return eT(e.parent); + } + } + function eT(e) { + if (e) + switch (e.kind) { + case 260: + return !Il(e.parent) || e.parent.declarations.length !== 1 ? e : pc(e.parent.parent) ? e.parent.parent : _S(e.parent.parent) ? eT(e.parent.parent) : e.parent; + case 208: + return eT(e.parent.parent); + case 276: + return e.parent.parent.parent; + case 281: + case 274: + return e.parent.parent; + case 273: + case 280: + return e.parent; + case 226: + return El(e.parent) ? e.parent : e; + case 250: + case 249: + return { + start: e.initializer, + end: e.expression + }; + case 303: + case 304: + return z0(e.parent) ? eT( + ur(e.parent, (t) => fn(t) || _S(t)) + ) : e; + case 255: + return { + start: Pn( + e.getChildren(e.getSourceFile()), + (t) => t.kind === 109 + /* SwitchKeyword */ + ), + end: e.caseBlock + }; + default: + return e; + } + } + function xue(e, t, n) { + if (!n) return; + const i = Tue(n) ? bL(n.start, t, n.end) : bL(n, t); + return i.start !== e.start || i.length !== e.length ? { contextSpan: i } : void 0; + } + var U4e = /* @__PURE__ */ ((e) => (e[e.Other = 0] = "Other", e[e.References = 1] = "References", e[e.Rename = 2] = "Rename", e))(U4e || {}); + function pXe(e, t, n, i, s) { + const o = h_(i, s), c = { + use: 1 + /* References */ + }, _ = Sk.getReferencedSymbolsForNode(s, o, e, n, t, c), u = e.getTypeChecker(), m = Sk.getAdjustedNode(o, c), g = dXe(m) ? u.getSymbolAtLocation(m) : void 0; + return !_ || !_.length ? void 0 : Li(_, ({ definition: h, references: S }) => ( + // Only include referenced symbols that have a valid definition. + h && { + definition: u.runWithCancellationToken(t, (T) => hXe(h, T, o)), + references: S.map((T) => vXe(T, g)) + } + )); + } + function dXe(e) { + return e.kind === 90 || !!R4(e) || E3(e) || e.kind === 137 && Go(e.parent); + } + function mXe(e, t, n, i, s) { + const o = h_(i, s); + let c; + const _ = V4e(e, t, n, o, s); + if (o.parent.kind === 211 || o.parent.kind === 208 || o.parent.kind === 212 || o.kind === 108) + c = _ && [..._]; + else if (_) { + const m = mP(_), g = /* @__PURE__ */ new Set(); + for (; !m.isEmpty(); ) { + const h = m.dequeue(); + if (!Lp(g, Aa(h.node))) + continue; + c = Pr(c, h); + const S = V4e(e, t, n, h.node, h.node.pos); + S && m.enqueue(...S); + } + } + const u = e.getTypeChecker(); + return gr(c, (m) => SXe(m, u)); + } + function V4e(e, t, n, i, s) { + if (i.kind === 307) + return; + const o = e.getTypeChecker(); + if (i.parent.kind === 304) { + const c = []; + return Sk.getReferenceEntriesForShorthandPropertyAssignment(i, o, (_) => c.push(Wh(_))), c; + } else if (i.kind === 108 || D_(i.parent)) { + const c = o.getSymbolAtLocation(i); + return c.valueDeclaration && [Wh(c.valueDeclaration)]; + } else + return q4e(s, i, e, n, t, { + implementations: !0, + use: 1 + /* References */ + }); + } + function gXe(e, t, n, i, s, o, c) { + return gr(H4e(Sk.getReferencedSymbolsForNode(s, i, e, n, t, o)), (_) => c(_, i, e.getTypeChecker())); + } + function q4e(e, t, n, i, s, o = {}, c = new Set(i.map((_) => _.fileName))) { + return H4e(Sk.getReferencedSymbolsForNode(e, t, n, i, s, o, c)); + } + function H4e(e) { + return e && na(e, (t) => t.references); + } + function hXe(e, t, n) { + const i = (() => { + switch (e.type) { + case 0: { + const { symbol: g } = e, { displayParts: h, kind: S } = G4e(g, t, n), T = h.map((w) => w.text).join(""), C = g.declarations && Uc(g.declarations), D = C ? is(C) || C : n; + return { + ...vL(D), + name: T, + kind: S, + displayParts: h, + context: eT(C) + }; + } + case 1: { + const { node: g } = e; + return { ...vL(g), name: g.text, kind: "label", displayParts: [I_( + g.text, + 17 + /* text */ + )] }; + } + case 2: { + const { node: g } = e, h = Xs(g.kind); + return { ...vL(g), name: h, kind: "keyword", displayParts: [{ + text: h, + kind: "keyword" + /* keyword */ + }] }; + } + case 3: { + const { node: g } = e, h = t.getSymbolAtLocation(g), S = h && q0.getSymbolDisplayPartsDocumentationAndSymbolKind( + t, + h, + g.getSourceFile(), + XS(g), + g + ).displayParts || [Lf("this")]; + return { ...vL(g), name: "this", kind: "var", displayParts: S }; + } + case 4: { + const { node: g } = e; + return { + ...vL(g), + name: g.text, + kind: "var", + displayParts: [I_( + qo(g), + 8 + /* stringLiteral */ + )] + }; + } + case 5: + return { + textSpan: W0(e.reference), + sourceFile: e.file, + name: e.reference.fileName, + kind: "string", + displayParts: [I_( + `"${e.reference.fileName}"`, + 8 + /* stringLiteral */ + )] + }; + default: + return E.assertNever(e); + } + })(), { sourceFile: s, textSpan: o, name: c, kind: _, displayParts: u, context: m } = i; + return { + containerKind: "", + containerName: "", + fileName: s.fileName, + kind: _, + name: c, + textSpan: o, + displayParts: u, + ...xue(o, s, m) + }; + } + function vL(e) { + const t = e.getSourceFile(); + return { + sourceFile: t, + textSpan: bL(fa(e) ? e.expression : e, t) + }; + } + function G4e(e, t, n) { + const i = Sk.getIntersectingMeaningFromDeclarations(n, e), s = e.declarations && Uc(e.declarations) || n, { displayParts: o, symbolKind: c } = q0.getSymbolDisplayPartsDocumentationAndSymbolKind(t, e, s.getSourceFile(), s, s, i); + return { displayParts: o, kind: c }; + } + function yXe(e, t, n, i, s) { + return { ...IH(e), ...i && bXe(e, t, n, s) }; + } + function vXe(e, t) { + const n = $4e(e); + return t ? { + ...n, + isDefinition: e.kind !== 0 && Q4e(e.node, t) + } : n; + } + function $4e(e) { + const t = IH(e); + if (e.kind === 0) + return { ...t, isWriteAccess: !1 }; + const { kind: n, node: i } = e; + return { + ...t, + isWriteAccess: kue(i), + isInString: n === 2 ? !0 : void 0 + }; + } + function IH(e) { + if (e.kind === 0) + return { textSpan: e.textSpan, fileName: e.fileName }; + { + const t = e.node.getSourceFile(), n = bL(e.node, t); + return { + textSpan: n, + fileName: t.fileName, + ...xue(n, t, e.context) + }; + } + } + function bXe(e, t, n, i) { + if (e.kind !== 0 && (Me(t) || Na(t))) { + const { node: s, kind: o } = e, c = s.parent, _ = t.text, u = _u(c); + if (u || kA(c) && c.name === s && c.dotDotDotToken === void 0) { + const m = { prefixText: _ + ": " }, g = { suffixText: ": " + _ }; + if (o === 3) + return m; + if (o === 4) + return g; + if (u) { + const h = c.parent; + return oa(h) && fn(h.parent) && Wg(h.parent.left) ? m : g; + } else + return m; + } else if (ju(c) && !c.propertyName) { + const m = Tu(t.parent) ? n.getExportSpecifierLocalTargetSymbol(t.parent) : n.getSymbolAtLocation(t); + return as(m.declarations, c) ? { prefixText: _ + " as " } : zp; + } else if (Tu(c) && !c.propertyName) + return t === e.node || n.getSymbolAtLocation(t) === n.getSymbolAtLocation(e.node) ? { prefixText: _ + " as " } : { suffixText: " as " + _ }; + } + if (e.kind !== 0 && d_(e.node) && vo(e.node.parent)) { + const s = wV(i); + return { prefixText: s, suffixText: s }; + } + return zp; + } + function SXe(e, t) { + const n = IH(e); + if (e.kind !== 0) { + const { node: i } = e; + return { + ...n, + ...TXe(i, t) + }; + } else + return { ...n, kind: "", displayParts: [] }; + } + function TXe(e, t) { + const n = t.getSymbolAtLocation(bl(e) && e.name ? e.name : e); + return n ? G4e(n, t, e) : e.kind === 210 ? { + kind: "interface", + displayParts: [Cu( + 21 + /* OpenParenToken */ + ), Lf("object literal"), Cu( + 22 + /* CloseParenToken */ + )] + } : e.kind === 231 ? { + kind: "local class", + displayParts: [Cu( + 21 + /* OpenParenToken */ + ), Lf("anonymous local class"), Cu( + 22 + /* CloseParenToken */ + )] + } : { kind: u2(e), displayParts: [] }; + } + function xXe(e) { + const t = IH(e); + if (e.kind === 0) + return { + fileName: t.fileName, + span: { + textSpan: t.textSpan, + kind: "reference" + /* reference */ + } + }; + const n = kue(e.node), i = { + textSpan: t.textSpan, + kind: n ? "writtenReference" : "reference", + isInString: e.kind === 2 ? !0 : void 0, + ...t.contextSpan && { contextSpan: t.contextSpan } + }; + return { fileName: t.fileName, span: i }; + } + function bL(e, t, n) { + let i = e.getStart(t), s = (n || e).getEnd(); + return Na(e) && s - i > 2 && (E.assert(n === void 0), i += 1, s -= 1), n?.kind === 269 && (s = n.getFullStart()), bc(i, s); + } + function X4e(e) { + return e.kind === 0 ? e.textSpan : bL(e.node, e.node.getSourceFile()); + } + function kue(e) { + const t = R4(e); + return !!t && kXe(t) || e.kind === 90 || xx(e); + } + function Q4e(e, t) { + var n; + if (!t) return !1; + const i = R4(e) || (e.kind === 90 ? e.parent : E3(e) || e.kind === 137 && Go(e.parent) ? e.parent.parent : void 0), s = i && fn(i) ? i.left : void 0; + return !!(i && ((n = t.declarations) != null && n.some((o) => o === i || o === s))); + } + function kXe(e) { + if (e.flags & 33554432) return !0; + switch (e.kind) { + case 226: + case 208: + case 263: + case 231: + case 90: + case 266: + case 306: + case 281: + case 273: + // default import + case 271: + case 276: + case 264: + case 338: + case 346: + case 291: + case 267: + case 270: + case 274: + case 280: + case 169: + case 304: + case 265: + case 168: + return !0; + case 303: + return !z0(e.parent); + case 262: + case 218: + case 176: + case 174: + case 177: + case 178: + return !!e.body; + case 260: + case 172: + return !!e.initializer || t2(e.parent); + case 173: + case 171: + case 348: + case 341: + return !1; + default: + return E.failBadSyntaxKind(e); + } + } + var Sk; + ((e) => { + function t(Qe, Ct, ee, Ve, K, Ie = {}, $e = new Set(Ve.map((Ke) => Ke.fileName))) { + var Ke, Je; + if (Ct = n(Ct, Ie), Ei(Ct)) { + const rn = H6.getReferenceAtPosition(Ct, Qe, ee); + if (!rn?.file) + return; + const ye = ee.getTypeChecker().getMergedSymbol(rn.file.symbol); + if (ye) + return m( + ee, + ye, + /*excludeImportTypeOfExportEquals*/ + !1, + Ve, + $e + ); + const ft = ee.getFileIncludeReasons(); + return ft ? [{ + definition: { type: 5, reference: rn.reference, file: Ct }, + references: s(rn.file, ft, ee) || He + }] : void 0; + } + if (!Ie.implementations) { + const rn = h(Ct, Ve, K); + if (rn) + return rn; + } + const Ye = ee.getTypeChecker(), _t = Ye.getSymbolAtLocation(Go(Ct) && Ct.parent.name || Ct); + if (!_t) { + if (!Ie.implementations && Na(Ct)) { + if (x9(Ct)) { + const rn = ee.getFileIncludeReasons(), ye = (Je = (Ke = ee.getResolvedModuleFromModuleSpecifier(Ct)) == null ? void 0 : Ke.resolvedModule) == null ? void 0 : Je.resolvedFileName, ft = ye ? ee.getSourceFile(ye) : void 0; + if (ft) + return [{ definition: { type: 4, node: Ct }, references: s(ft, rn, ee) || He }]; + } + return Xn(Ct, Ve, Ye, K); + } + return; + } + if (_t.escapedName === "export=") + return m( + ee, + _t.parent, + /*excludeImportTypeOfExportEquals*/ + !1, + Ve, + $e + ); + const yt = c(_t, ee, Ve, K, Ie, $e); + if (yt && !(_t.flags & 33554432)) + return yt; + const We = o(Ct, _t, Ye), Et = We && c(We, ee, Ve, K, Ie, $e), Xt = S(_t, Ct, Ve, $e, Ye, K, Ie); + return _(ee, yt, Xt, Et); + } + e.getReferencedSymbolsForNode = t; + function n(Qe, Ct) { + return Ct.use === 1 ? Qe = pV(Qe) : Ct.use === 2 && (Qe = p9(Qe)), Qe; + } + e.getAdjustedNode = n; + function i(Qe, Ct, ee, Ve = new Set(ee.map((K) => K.fileName))) { + var K, Ie; + const $e = (K = Ct.getSourceFile(Qe)) == null ? void 0 : K.symbol; + if ($e) + return ((Ie = m( + Ct, + $e, + /*excludeImportTypeOfExportEquals*/ + !1, + ee, + Ve + )[0]) == null ? void 0 : Ie.references) || He; + const Ke = Ct.getFileIncludeReasons(), Je = Ct.getSourceFile(Qe); + return Je && Ke && s(Je, Ke, Ct) || He; + } + e.getReferencesForFileName = i; + function s(Qe, Ct, ee) { + let Ve; + const K = Ct.get(Qe.path) || He; + for (const Ie of K) + if (Ev(Ie)) { + const $e = ee.getSourceFileByPath(Ie.file), Ke = ZD(ee, Ie); + C6(Ke) && (Ve = Pr(Ve, { + kind: 0, + fileName: $e.fileName, + textSpan: W0(Ke) + })); + } + return Ve; + } + function o(Qe, Ct, ee) { + if (Qe.parent && hN(Qe.parent)) { + const Ve = ee.getAliasedSymbol(Ct), K = ee.getMergedSymbol(Ve); + if (Ve !== K) + return K; + } + } + function c(Qe, Ct, ee, Ve, K, Ie) { + const $e = Qe.flags & 1536 && Qe.declarations && Pn(Qe.declarations, Ei); + if (!$e) return; + const Ke = Qe.exports.get( + "export=" + /* ExportEquals */ + ), Je = m(Ct, Qe, !!Ke, ee, Ie); + if (!Ke || !Ie.has($e.fileName)) return Je; + const Ye = Ct.getTypeChecker(); + return Qe = Gl(Ke, Ye), _(Ct, Je, S( + Qe, + /*node*/ + void 0, + ee, + Ie, + Ye, + Ve, + K + )); + } + function _(Qe, ...Ct) { + let ee; + for (const Ve of Ct) + if (!(!Ve || !Ve.length)) { + if (!ee) { + ee = Ve; + continue; + } + for (const K of Ve) { + if (!K.definition || K.definition.type !== 0) { + ee.push(K); + continue; + } + const Ie = K.definition.symbol, $e = ec(ee, (Je) => !!Je.definition && Je.definition.type === 0 && Je.definition.symbol === Ie); + if ($e === -1) { + ee.push(K); + continue; + } + const Ke = ee[$e]; + ee[$e] = { + definition: Ke.definition, + references: Ke.references.concat(K.references).sort((Je, Ye) => { + const _t = u(Qe, Je), yt = u(Qe, Ye); + if (_t !== yt) + return uo(_t, yt); + const We = X4e(Je), Et = X4e(Ye); + return We.start !== Et.start ? uo(We.start, Et.start) : uo(We.length, Et.length); + }) + }; + } + } + return ee; + } + function u(Qe, Ct) { + const ee = Ct.kind === 0 ? Qe.getSourceFile(Ct.fileName) : Ct.node.getSourceFile(); + return Qe.getSourceFiles().indexOf(ee); + } + function m(Qe, Ct, ee, Ve, K) { + E.assert(!!Ct.valueDeclaration); + const Ie = Li(R4e(Qe, Ve, Ct), (Ke) => { + if (Ke.kind === "import") { + const Je = Ke.literal.parent; + if (M0(Je)) { + const Ye = Ws(Je.parent, Ed); + if (ee && !Ye.qualifier) + return; + } + return Wh(Ke.literal); + } else if (Ke.kind === "implicit") { + const Je = Ke.literal.text !== Wy && Yx( + Ke.referencingFile, + (Ye) => Ye.transformFlags & 2 ? gm(Ye) || MS(Ye) || gv(Ye) ? Ye : void 0 : "skip" + ) || Ke.referencingFile.statements[0] || Ke.referencingFile; + return Wh(Je); + } else + return { + kind: 0, + fileName: Ke.referencingFile.fileName, + textSpan: W0(Ke.ref) + }; + }); + if (Ct.declarations) + for (const Ke of Ct.declarations) + switch (Ke.kind) { + case 307: + break; + case 267: + K.has(Ke.getSourceFile().fileName) && Ie.push(Wh(Ke.name)); + break; + default: + E.assert(!!(Ct.flags & 33554432), "Expected a module symbol to be declared by a SourceFile or ModuleDeclaration."); + } + const $e = Ct.exports.get( + "export=" + /* ExportEquals */ + ); + if ($e?.declarations) + for (const Ke of $e.declarations) { + const Je = Ke.getSourceFile(); + if (K.has(Je.fileName)) { + const Ye = fn(Ke) && Tn(Ke.left) ? Ke.left.expression : Io(Ke) ? E.checkDefined(Xa(Ke, 95, Je)) : is(Ke) || Ke; + Ie.push(Wh(Ye)); + } + } + return Ie.length ? [{ definition: { type: 0, symbol: Ct }, references: Ie }] : He; + } + function g(Qe) { + return Qe.kind === 148 && _v(Qe.parent) && Qe.parent.operator === 148; + } + function h(Qe, Ct, ee) { + if (ow(Qe.kind)) + return Qe.kind === 116 && Vx(Qe.parent) || Qe.kind === 148 && !g(Qe) ? void 0 : Ce( + Ct, + Qe.kind, + ee, + Qe.kind === 148 ? g : void 0 + ); + if (PC(Qe.parent) && Qe.parent.name === Qe) + return me(Ct, ee); + if (Bx(Qe) && nc(Qe.parent)) + return [{ definition: { type: 2, node: Qe }, references: [Wh(Qe)] }]; + if (gA(Qe)) { + const Ve = o9(Qe.parent, Qe.text); + return Ve && Te(Ve.parent, Ve); + } else if (iV(Qe)) + return Te(Qe.parent, Qe); + if (A6(Qe)) + return pi(Qe, Ct, ee); + if (Qe.kind === 108) + return Bt(Qe); + } + function S(Qe, Ct, ee, Ve, K, Ie, $e) { + const Ke = Ct && D( + Qe, + Ct, + K, + /*useLocalSymbolForExportSpecifier*/ + !gs($e) + ) || Qe, Je = Ct ? Bn(Ct, Ke) : 7, Ye = [], _t = new O(ee, Ve, Ct ? C(Ct) : 0, K, Ie, Je, $e, Ye), yt = !gs($e) || !Ke.declarations ? void 0 : Pn(Ke.declarations, Tu); + if (yt) + Oe( + yt.name, + Ke, + yt, + _t.createSearch( + Ct, + Qe, + /*comingFrom*/ + void 0 + ), + _t, + /*addReferencesHere*/ + !0, + /*alwaysGetReferences*/ + !0 + ); + else if (Ct && Ct.kind === 90 && Ke.escapedName === "default" && Ke.parent) + De(Ct, Ke, _t), F(Ct, Ke, { + exportingModuleSymbol: Ke.parent, + exportKind: 1 + /* Default */ + }, _t); + else { + const We = _t.createSearch( + Ct, + Ke, + /*comingFrom*/ + void 0, + { allSearchSymbols: Ct ? di(Ke, Ct, K, $e.use === 2, !!$e.providePrefixAndSuffixTextForRename, !!$e.implementations) : [Ke] } + ); + T(Ke, _t, We); + } + return Ye; + } + function T(Qe, Ct, ee) { + const Ve = _e(Qe); + if (Ve) + oe( + Ve, + Ve.getSourceFile(), + ee, + Ct, + /*addReferencesHere*/ + !(Ei(Ve) && !as(Ct.sourceFiles, Ve)) + ); + else + for (const K of Ct.sourceFiles) + Ct.cancellationToken.throwIfCancellationRequested(), $(K, ee, Ct); + } + function C(Qe) { + switch (Qe.kind) { + case 176: + case 137: + return 1; + case 80: + if (Zn(Qe.parent)) + return E.assert(Qe.parent.name === Qe), 2; + // falls through + default: + return 0; + } + } + function D(Qe, Ct, ee, Ve) { + const { parent: K } = Ct; + return Tu(K) && Ve ? xe(Ct, Qe, K, ee) : Dc(Qe.declarations, (Ie) => { + if (!Ie.parent) { + if (Qe.flags & 33554432) return; + E.fail(`Unexpected symbol at ${E.formatSyntaxKind(Ct.kind)}: ${E.formatSymbol(Qe)}`); + } + return Qu(Ie.parent) && L0(Ie.parent.parent) ? ee.getPropertyOfType(ee.getTypeFromTypeNode(Ie.parent.parent), Qe.name) : void 0; + }); + } + let w; + ((Qe) => { + Qe[Qe.None = 0] = "None", Qe[Qe.Constructor = 1] = "Constructor", Qe[Qe.Class = 2] = "Class"; + })(w || (w = {})); + function A(Qe) { + if (!(Qe.flags & 33555968)) return; + const Ct = Qe.declarations && Pn(Qe.declarations, (ee) => !Ei(ee) && !Lc(ee)); + return Ct && Ct.symbol; + } + class O { + constructor(Ct, ee, Ve, K, Ie, $e, Ke, Je) { + this.sourceFiles = Ct, this.sourceFilesSet = ee, this.specialSearchKind = Ve, this.checker = K, this.cancellationToken = Ie, this.searchMeaning = $e, this.options = Ke, this.result = Je, this.inheritsFromCache = /* @__PURE__ */ new Map(), this.markSeenContainingTypeReference = O6(), this.markSeenReExportRHS = O6(), this.symbolIdToReferences = [], this.sourceFileToSeenSymbols = []; + } + includesSourceFile(Ct) { + return this.sourceFilesSet.has(Ct.fileName); + } + /** Gets every place to look for references of an exported symbols. See `ImportsResult` in `importTracker.ts` for more documentation. */ + getImportSearches(Ct, ee) { + return this.importTracker || (this.importTracker = vue(this.sourceFiles, this.sourceFilesSet, this.checker, this.cancellationToken)), this.importTracker( + Ct, + ee, + this.options.use === 2 + /* Rename */ + ); + } + /** @param allSearchSymbols set of additional symbols for use by `includes`. */ + createSearch(Ct, ee, Ve, K = {}) { + const { + text: Ie = Op(_c(G4(ee) || A(ee) || ee)), + allSearchSymbols: $e = [ee] + } = K, Ke = Zo(Ie), Je = this.options.implementations && Ct ? xr(Ct, ee, this.checker) : void 0; + return { symbol: ee, comingFrom: Ve, text: Ie, escapedText: Ke, parents: Je, allSearchSymbols: $e, includes: (Ye) => as($e, Ye) }; + } + /** + * Callback to add references for a particular searched symbol. + * This initializes a reference group, so only call this if you will add at least one reference. + */ + referenceAdder(Ct) { + const ee = Zs(Ct); + let Ve = this.symbolIdToReferences[ee]; + return Ve || (Ve = this.symbolIdToReferences[ee] = [], this.result.push({ definition: { type: 0, symbol: Ct }, references: Ve })), (K, Ie) => Ve.push(Wh(K, Ie)); + } + /** Add a reference with no associated definition. */ + addStringOrCommentReference(Ct, ee) { + this.result.push({ + definition: void 0, + references: [{ kind: 0, fileName: Ct, textSpan: ee }] + }); + } + /** Returns `true` the first time we search for a symbol in a file and `false` afterwards. */ + markSearchedSymbols(Ct, ee) { + const Ve = Aa(Ct), K = this.sourceFileToSeenSymbols[Ve] || (this.sourceFileToSeenSymbols[Ve] = /* @__PURE__ */ new Set()); + let Ie = !1; + for (const $e of ee) + Ie = S0(K, Zs($e)) || Ie; + return Ie; + } + } + function F(Qe, Ct, ee, Ve) { + const { importSearches: K, singleReferences: Ie, indirectUsers: $e } = Ve.getImportSearches(Ct, ee); + if (Ie.length) { + const Ke = Ve.referenceAdder(Ct); + for (const Je of Ie) + W(Je, Ve) && Ke(Je); + } + for (const [Ke, Je] of K) + Ee(Ke.getSourceFile(), Ve.createSearch( + Ke, + Je, + 1 + /* Export */ + ), Ve); + if ($e.length) { + let Ke; + switch (ee.exportKind) { + case 0: + Ke = Ve.createSearch( + Qe, + Ct, + 1 + /* Export */ + ); + break; + case 1: + Ke = Ve.options.use === 2 ? void 0 : Ve.createSearch(Qe, Ct, 1, { text: "default" }); + break; + } + if (Ke) + for (const Je of $e) + $(Je, Ke, Ve); + } + } + function R(Qe, Ct, ee, Ve, K, Ie, $e, Ke) { + const Je = vue(Qe, new Set(Qe.map((We) => We.fileName)), Ct, ee), { importSearches: Ye, indirectUsers: _t, singleReferences: yt } = Je( + Ve, + { exportKind: $e ? 1 : 0, exportingModuleSymbol: K }, + /*isForRename*/ + !1 + ); + for (const [We] of Ye) + Ke(We); + for (const We of yt) + Me(We) && Ed(We.parent) && Ke(We); + for (const We of _t) + for (const Et of ie(We, $e ? "default" : Ie)) { + const Xt = Ct.getSymbolAtLocation(Et), rn = at(Xt?.declarations, (ye) => !!jn(ye, Io)); + Me(Et) && !jy(Et.parent) && (Xt === Ve || rn) && Ke(Et); + } + } + e.eachExportReference = R; + function W(Qe, Ct) { + return ke(Qe, Ct) ? Ct.options.use !== 2 ? !0 : !Me(Qe) && !jy(Qe.parent) ? !1 : !(jy(Qe.parent) && Km(Qe)) : !1; + } + function V(Qe, Ct) { + if (Qe.declarations) + for (const ee of Qe.declarations) { + const Ve = ee.getSourceFile(); + Ee(Ve, Ct.createSearch( + ee, + Qe, + 0 + /* Import */ + ), Ct, Ct.includesSourceFile(Ve)); + } + } + function $(Qe, Ct, ee) { + Wq(Qe).get(Ct.escapedText) !== void 0 && Ee(Qe, Ct, ee); + } + function U(Qe, Ct) { + return z0(Qe.parent.parent) ? Ct.getPropertySymbolOfDestructuringAssignment(Qe) : void 0; + } + function _e(Qe) { + const { declarations: Ct, flags: ee, parent: Ve, valueDeclaration: K } = Qe; + if (K && (K.kind === 218 || K.kind === 231)) + return K; + if (!Ct) + return; + if (ee & 8196) { + const Ke = Pn(Ct, (Je) => Q_( + Je, + 2 + /* Private */ + ) || Fu(Je)); + return Ke ? sv( + Ke, + 263 + /* ClassDeclaration */ + ) : void 0; + } + if (Ct.some(kA)) + return; + const Ie = Ve && !(Qe.flags & 262144); + if (Ie && !(ox(Ve) && !Ve.globalExports)) + return; + let $e; + for (const Ke of Ct) { + const Je = XS(Ke); + if ($e && $e !== Je || !Je || Je.kind === 307 && !$_(Je)) + return; + if ($e = Je, po($e)) { + let Ye; + for (; Ye = bB($e); ) + $e = Ye; + } + } + return Ie ? $e.getSourceFile() : $e; + } + function Z(Qe, Ct, ee, Ve = ee) { + return J(Qe, Ct, ee, () => !0, Ve) || !1; + } + e.isSymbolReferencedInFile = Z; + function J(Qe, Ct, ee, Ve, K = ee) { + const Ie = H_(Qe.parent, Qe.parent.parent) ? ya(Ct.getSymbolsOfParameterPropertyDeclaration(Qe.parent, Qe.text)) : Ct.getSymbolAtLocation(Qe); + if (Ie) + for (const $e of ie(ee, Ie.name, K)) { + if (!Me($e) || $e === Qe || $e.escapedText !== Qe.escapedText) continue; + const Ke = Ct.getSymbolAtLocation($e); + if (Ke === Ie || Ct.getShorthandAssignmentValueSymbol($e.parent) === Ie || Tu($e.parent) && xe($e, Ke, $e.parent, Ct) === Ie) { + const Je = Ve($e); + if (Je) return Je; + } + } + } + e.eachSymbolReferenceInFile = J; + function re(Qe, Ct) { + return kn(ie(Ct, Qe), (K) => !!R4(K)).reduce((K, Ie) => { + const $e = Ve(Ie); + return !at(K.declarationNames) || $e === K.depth ? (K.declarationNames.push(Ie), K.depth = $e) : $e < K.depth && (K.declarationNames = [Ie], K.depth = $e), K; + }, { depth: 1 / 0, declarationNames: [] }).declarationNames; + function Ve(K) { + let Ie = 0; + for (; K; ) + K = XS(K), Ie++; + return Ie; + } + } + e.getTopMostDeclarationNamesInFile = re; + function te(Qe, Ct, ee, Ve) { + if (!Qe.name || !Me(Qe.name)) return !1; + const K = E.checkDefined(ee.getSymbolAtLocation(Qe.name)); + for (const Ie of Ct) + for (const $e of ie(Ie, K.name)) { + if (!Me($e) || $e === Qe.name || $e.escapedText !== Qe.name.escapedText) continue; + const Ke = a9($e), Je = Fs(Ke.parent) && Ke.parent.expression === Ke ? Ke.parent : void 0, Ye = ee.getSymbolAtLocation($e); + if (Ye && ee.getRootSymbols(Ye).some((_t) => _t === K) && Ve($e, Je)) + return !0; + } + return !1; + } + e.someSignatureUsage = te; + function ie(Qe, Ct, ee = Qe) { + return Li(le(Qe, Ct, ee), (Ve) => { + const K = h_(Qe, Ve); + return K === Qe ? void 0 : K; + }); + } + function le(Qe, Ct, ee = Qe) { + const Ve = []; + if (!Ct || !Ct.length) + return Ve; + const K = Qe.text, Ie = K.length, $e = Ct.length; + let Ke = K.indexOf(Ct, ee.pos); + for (; Ke >= 0 && !(Ke > ee.end); ) { + const Je = Ke + $e; + (Ke === 0 || !kh( + K.charCodeAt(Ke - 1), + 99 + /* Latest */ + )) && (Je === Ie || !kh( + K.charCodeAt(Je), + 99 + /* Latest */ + )) && Ve.push(Ke), Ke = K.indexOf(Ct, Ke + $e + 1); + } + return Ve; + } + function Te(Qe, Ct) { + const ee = Qe.getSourceFile(), Ve = Ct.text, K = Li(ie(ee, Ve, Qe), (Ie) => ( + // Only pick labels that are either the target label, or have a target that is the target label + Ie === Ct || gA(Ie) && o9(Ie, Ve) === Ct ? Wh(Ie) : void 0 + )); + return [{ definition: { type: 1, node: Ct }, references: K }]; + } + function q(Qe, Ct) { + switch (Qe.kind) { + case 81: + if (yv(Qe.parent)) + return !0; + // falls through I guess + case 80: + return Qe.text.length === Ct.length; + case 15: + case 11: { + const ee = Qe; + return ee.text.length === Ct.length && (c9(ee) || cV(Qe) || Rse(Qe) || Fs(Qe.parent) && yS(Qe.parent) && Qe.parent.arguments[1] === Qe || jy(Qe.parent)); + } + case 9: + return c9(Qe) && Qe.text.length === Ct.length; + case 90: + return Ct.length === 7; + default: + return !1; + } + } + function me(Qe, Ct) { + const ee = na(Qe, (Ve) => (Ct.throwIfCancellationRequested(), Li(ie(Ve, "meta", Ve), (K) => { + const Ie = K.parent; + if (PC(Ie)) + return Wh(Ie); + }))); + return ee.length ? [{ definition: { type: 2, node: ee[0].node }, references: ee }] : void 0; + } + function Ce(Qe, Ct, ee, Ve) { + const K = na(Qe, (Ie) => (ee.throwIfCancellationRequested(), Li(ie(Ie, Xs(Ct), Ie), ($e) => { + if ($e.kind === Ct && (!Ve || Ve($e))) + return Wh($e); + }))); + return K.length ? [{ definition: { type: 2, node: K[0].node }, references: K }] : void 0; + } + function Ee(Qe, Ct, ee, Ve = !0) { + return ee.cancellationToken.throwIfCancellationRequested(), oe(Qe, Qe, Ct, ee, Ve); + } + function oe(Qe, Ct, ee, Ve, K) { + if (Ve.markSearchedSymbols(Ct, ee.allSearchSymbols)) + for (const Ie of le(Ct, ee.text, Qe)) + ue(Ct, Ie, ee, Ve, K); + } + function ke(Qe, Ct) { + return !!($S(Qe) & Ct.searchMeaning); + } + function ue(Qe, Ct, ee, Ve, K) { + const Ie = h_(Qe, Ct); + if (!q(Ie, ee.text)) { + !Ve.options.implementations && (Ve.options.findInStrings && lk(Qe, Ct) || Ve.options.findInComments && Qse(Qe, Ct)) && Ve.addStringOrCommentReference(Qe.fileName, ql(Ct, ee.text.length)); + return; + } + if (!ke(Ie, Ve)) return; + let $e = Ve.checker.getSymbolAtLocation(Ie); + if (!$e) + return; + const Ke = Ie.parent; + if (ju(Ke) && Ke.propertyName === Ie) + return; + if (Tu(Ke)) { + E.assert( + Ie.kind === 80 || Ie.kind === 11 + /* StringLiteral */ + ), Oe(Ie, $e, Ke, ee, Ve, K); + return; + } + if (h4(Ke) && Ke.isNameFirst && Ke.typeExpression && RS(Ke.typeExpression.type) && Ke.typeExpression.type.jsDocPropertyTags && Ir(Ke.typeExpression.type.jsDocPropertyTags)) { + it(Ke.typeExpression.type.jsDocPropertyTags, Ie, ee, Ve); + return; + } + const Je = qr(ee, $e, Ie, Ve); + if (!Je) { + Ae($e, ee, Ve); + return; + } + switch (Ve.specialSearchKind) { + case 0: + K && De(Ie, Je, Ve); + break; + case 1: + we(Ie, Qe, ee, Ve); + break; + case 2: + Ue(Ie, ee, Ve); + break; + default: + E.assertNever(Ve.specialSearchKind); + } + an(Ie) && ma(Ie.parent) && Ib(Ie.parent.parent.parent) && ($e = Ie.parent.symbol, !$e) || ne(Ie, $e, ee, Ve); + } + function it(Qe, Ct, ee, Ve) { + const K = Ve.referenceAdder(ee.symbol); + De(Ct, ee.symbol, Ve), lr(Qe, (Ie) => { + Xu(Ie.name) && K(Ie.name.left); + }); + } + function Oe(Qe, Ct, ee, Ve, K, Ie, $e) { + E.assert(!$e || !!K.options.providePrefixAndSuffixTextForRename, "If alwaysGetReferences is true, then prefix/suffix text must be enabled"); + const { parent: Ke, propertyName: Je, name: Ye } = ee, _t = Ke.parent, yt = xe(Qe, Ct, ee, K.checker); + if (!$e && !Ve.includes(yt)) + return; + if (Je ? Qe === Je ? (_t.moduleSpecifier || We(), Ie && K.options.use !== 2 && K.markSeenReExportRHS(Ye) && De(Ye, E.checkDefined(ee.symbol), K)) : K.markSeenReExportRHS(Qe) && We() : K.options.use === 2 && Km(Ye) || We(), !gs(K.options) || $e) { + const Xt = Km(Qe) || Km(ee.name) ? 1 : 0, rn = E.checkDefined(ee.symbol), ye = bue(rn, Xt, K.checker); + ye && F(Qe, rn, ye, K); + } + if (Ve.comingFrom !== 1 && _t.moduleSpecifier && !Je && !gs(K.options)) { + const Et = K.checker.getExportSpecifierLocalTargetSymbol(ee); + Et && V(Et, K); + } + function We() { + Ie && De(Qe, yt, K); + } + } + function xe(Qe, Ct, ee, Ve) { + return he(Qe, ee) && Ve.getExportSpecifierLocalTargetSymbol(ee) || Ct; + } + function he(Qe, Ct) { + const { parent: ee, propertyName: Ve, name: K } = Ct; + return E.assert(Ve === Qe || K === Qe), Ve ? Ve === Qe : !ee.parent.moduleSpecifier; + } + function ne(Qe, Ct, ee, Ve) { + const K = J4e( + Qe, + Ct, + Ve.checker, + ee.comingFrom === 1 + /* Export */ + ); + if (!K) return; + const { symbol: Ie } = K; + K.kind === 0 ? gs(Ve.options) || V(Ie, Ve) : F(Qe, Ie, K.exportInfo, Ve); + } + function Ae({ flags: Qe, valueDeclaration: Ct }, ee, Ve) { + const K = Ve.checker.getShorthandAssignmentValueSymbol(Ct), Ie = Ct && is(Ct); + !(Qe & 33554432) && Ie && ee.includes(K) && De(Ie, K, Ve); + } + function De(Qe, Ct, ee) { + const { kind: Ve, symbol: K } = "kind" in Ct ? Ct : { kind: void 0, symbol: Ct }; + if (ee.options.use === 2 && Qe.kind === 90) + return; + const Ie = ee.referenceAdder(K); + ee.options.implementations ? Qt(Qe, Ie, ee) : Ie(Qe, Ve); + } + function we(Qe, Ct, ee, Ve) { + nw(Qe) && De(Qe, ee.symbol, Ve); + const K = () => Ve.referenceAdder(ee.symbol); + if (Zn(Qe.parent)) + E.assert(Qe.kind === 90 || Qe.parent.name === Qe), bt(ee.symbol, Ct, K()); + else { + const Ie = Ks(Qe); + Ie && (er(Ie, K()), Dt(Ie, Ve)); + } + } + function Ue(Qe, Ct, ee) { + De(Qe, Ct.symbol, ee); + const Ve = Qe.parent; + if (ee.options.use === 2 || !Zn(Ve)) return; + E.assert(Ve.name === Qe); + const K = ee.referenceAdder(Ct.symbol); + for (const Ie of Ve.members) + ix(Ie) && Vs(Ie) && Ie.body && Ie.body.forEachChild(function $e(Ke) { + Ke.kind === 110 ? K(Ke) : !vs(Ke) && !Zn(Ke) && Ke.forEachChild($e); + }); + } + function bt(Qe, Ct, ee) { + const Ve = Lt(Qe); + if (Ve && Ve.declarations) + for (const K of Ve.declarations) { + const Ie = Xa(K, 137, Ct); + E.assert(K.kind === 176 && !!Ie), ee(Ie); + } + Qe.exports && Qe.exports.forEach((K) => { + const Ie = K.valueDeclaration; + if (Ie && Ie.kind === 174) { + const $e = Ie.body; + $e && Cs($e, 110, (Ke) => { + nw(Ke) && ee(Ke); + }); + } + }); + } + function Lt(Qe) { + return Qe.members && Qe.members.get( + "__constructor" + /* Constructor */ + ); + } + function er(Qe, Ct) { + const ee = Lt(Qe.symbol); + if (ee && ee.declarations) + for (const Ve of ee.declarations) { + E.assert( + Ve.kind === 176 + /* Constructor */ + ); + const K = Ve.body; + K && Cs(K, 108, (Ie) => { + tV(Ie) && Ct(Ie); + }); + } + } + function Nr(Qe) { + return !!Lt(Qe.symbol); + } + function Dt(Qe, Ct) { + if (Nr(Qe)) return; + const ee = Qe.symbol, Ve = Ct.createSearch( + /*location*/ + void 0, + ee, + /*comingFrom*/ + void 0 + ); + T(ee, Ct, Ve); + } + function Qt(Qe, Ct, ee) { + if (tg(Qe) && wn(Qe.parent)) { + Ct(Qe); + return; + } + if (Qe.kind !== 80) + return; + Qe.parent.kind === 304 && ki(Qe, ee.checker, Ct); + const Ve = Wr(Qe); + if (Ve) { + Ct(Ve); + return; + } + const K = ur(Qe, (Ke) => !Xu(Ke.parent) && !fi(Ke.parent) && !kb(Ke.parent)), Ie = K.parent; + if (y7(Ie) && Ie.type === K && ee.markSeenContainingTypeReference(Ie)) + if (C0(Ie)) + $e(Ie.initializer); + else if (vs(Ie) && Ie.body) { + const Ke = Ie.body; + Ke.kind === 241 ? Hy(Ke, (Je) => { + Je.expression && $e(Je.expression); + }) : $e(Ke); + } else Eb(Ie) && $e(Ie.expression); + function $e(Ke) { + yr(Ke) && Ct(Ke); + } + } + function Wr(Qe) { + return Me(Qe) || Tn(Qe) ? Wr(Qe.parent) : Lh(Qe) ? jn(Qe.parent.parent, U_(Zn, Yl)) : void 0; + } + function yr(Qe) { + switch (Qe.kind) { + case 217: + return yr(Qe.expression); + case 219: + case 218: + case 210: + case 231: + case 209: + return !0; + default: + return !1; + } + } + function qn(Qe, Ct, ee, Ve) { + if (Qe === Ct) + return !0; + const K = Zs(Qe) + "," + Zs(Ct), Ie = ee.get(K); + if (Ie !== void 0) + return Ie; + ee.set(K, !1); + const $e = !!Qe.declarations && Qe.declarations.some( + (Ke) => j4(Ke).some((Je) => { + const Ye = Ve.getTypeAtLocation(Je); + return !!Ye && !!Ye.symbol && qn(Ye.symbol, Ct, ee, Ve); + }) + ); + return ee.set(K, $e), $e; + } + function Bt(Qe) { + let Ct = a3( + Qe, + /*stopOnFunctions*/ + !1 + ); + if (!Ct) + return; + let ee = 256; + switch (Ct.kind) { + case 172: + case 171: + case 174: + case 173: + case 176: + case 177: + case 178: + ee &= w0(Ct), Ct = Ct.parent; + break; + default: + return; + } + const Ve = Ct.getSourceFile(), K = Li(ie(Ve, "super", Ct), (Ie) => { + if (Ie.kind !== 108) + return; + const $e = a3( + Ie, + /*stopOnFunctions*/ + !1 + ); + return $e && Vs($e) === !!ee && $e.parent.symbol === Ct.symbol ? Wh(Ie) : void 0; + }); + return [{ definition: { type: 0, symbol: Ct.symbol }, references: K }]; + } + function bi(Qe) { + return Qe.kind === 80 && Qe.parent.kind === 169 && Qe.parent.name === Qe; + } + function pi(Qe, Ct, ee) { + let Ve = Lu( + Qe, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ), K = 256; + switch (Ve.kind) { + case 174: + case 173: + if (Ip(Ve)) { + K &= w0(Ve), Ve = Ve.parent; + break; + } + // falls through + case 172: + case 171: + case 176: + case 177: + case 178: + K &= w0(Ve), Ve = Ve.parent; + break; + case 307: + if (el(Ve) || bi(Qe)) + return; + // falls through + case 262: + case 218: + break; + // Computed properties in classes are not handled here because references to this are illegal, + // so there is no point finding references to them. + default: + return; + } + const Ie = na(Ve.kind === 307 ? Ct : [Ve.getSourceFile()], (Ke) => (ee.throwIfCancellationRequested(), ie(Ke, "this", Ei(Ve) ? Ke : Ve).filter((Je) => { + if (!A6(Je)) + return !1; + const Ye = Lu( + Je, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + if (!bd(Ye)) return !1; + switch (Ve.kind) { + case 218: + case 262: + return Ve.symbol === Ye.symbol; + case 174: + case 173: + return Ip(Ve) && Ve.symbol === Ye.symbol; + case 231: + case 263: + case 210: + return Ye.parent && bd(Ye.parent) && Ve.symbol === Ye.parent.symbol && Vs(Ye) === !!K; + case 307: + return Ye.kind === 307 && !el(Ye) && !bi(Je); + } + }))).map((Ke) => Wh(Ke)); + return [{ + definition: { type: 3, node: Dc(Ie, (Ke) => Ii(Ke.node.parent) ? Ke.node : void 0) || Qe }, + references: Ie + }]; + } + function Xn(Qe, Ct, ee, Ve) { + const K = f9(Qe, ee), Ie = na(Ct, ($e) => (Ve.throwIfCancellationRequested(), Li(ie($e, Qe.text), (Ke) => { + if (Na(Ke) && Ke.text === Qe.text) + if (K) { + const Je = f9(Ke, ee); + if (K !== ee.getStringType() && (K === Je || jr(Ke, ee))) + return Wh( + Ke, + 2 + /* StringLiteral */ + ); + } else + return NS(Ke) && !CS(Ke, $e) ? void 0 : Wh( + Ke, + 2 + /* StringLiteral */ + ); + }))); + return [{ + definition: { type: 4, node: Qe }, + references: Ie + }]; + } + function jr(Qe, Ct) { + if (m_(Qe.parent)) + return Ct.getPropertyOfType(Ct.getTypeAtLocation(Qe.parent.parent), Qe.text); + } + function di(Qe, Ct, ee, Ve, K, Ie) { + const $e = []; + return Re( + Qe, + Ct, + ee, + Ve, + !(Ve && K), + (Ke, Je, Ye) => { + Ye && tr(Qe) !== tr(Ye) && (Ye = void 0), $e.push(Ye || Je || Ke); + }, + // when try to find implementation, implementations is true, and not allowed to find base class + /*allowBaseTypes*/ + () => !Ie + ), $e; + } + function Re(Qe, Ct, ee, Ve, K, Ie, $e) { + const Ke = UA(Ct); + if (Ke) { + const Xt = ee.getShorthandAssignmentValueSymbol(Ct.parent); + if (Xt && Ve) + return Ie( + Xt, + /*rootSymbol*/ + void 0, + /*baseSymbol*/ + void 0, + 3 + /* SearchedLocalFoundProperty */ + ); + const rn = ee.getContextualType(Ke.parent), ye = rn && Dc( + aL( + Ke, + ee, + rn, + /*unionSymbolOk*/ + !0 + ), + (ve) => We( + ve, + 4 + /* SearchedPropertyFoundLocal */ + ) + ); + if (ye) return ye; + const ft = U(Ct, ee), fe = ft && Ie( + ft, + /*rootSymbol*/ + void 0, + /*baseSymbol*/ + void 0, + 4 + /* SearchedPropertyFoundLocal */ + ); + if (fe) return fe; + const L = Xt && Ie( + Xt, + /*rootSymbol*/ + void 0, + /*baseSymbol*/ + void 0, + 3 + /* SearchedLocalFoundProperty */ + ); + if (L) return L; + } + const Je = o(Ct, Qe, ee); + if (Je) { + const Xt = Ie( + Je, + /*rootSymbol*/ + void 0, + /*baseSymbol*/ + void 0, + 1 + /* Node */ + ); + if (Xt) return Xt; + } + const Ye = We(Qe); + if (Ye) return Ye; + if (Qe.valueDeclaration && H_(Qe.valueDeclaration, Qe.valueDeclaration.parent)) { + const Xt = ee.getSymbolsOfParameterPropertyDeclaration(Ws(Qe.valueDeclaration, Ii), Qe.name); + return E.assert(Xt.length === 2 && !!(Xt[0].flags & 1) && !!(Xt[1].flags & 4)), We(Qe.flags & 1 ? Xt[1] : Xt[0]); + } + const _t = Lo( + Qe, + 281 + /* ExportSpecifier */ + ); + if (!Ve || _t && !_t.propertyName) { + const Xt = _t && ee.getExportSpecifierLocalTargetSymbol(_t); + if (Xt) { + const rn = Ie( + Xt, + /*rootSymbol*/ + void 0, + /*baseSymbol*/ + void 0, + 1 + /* Node */ + ); + if (rn) return rn; + } + } + if (!Ve) { + let Xt; + return K ? Xt = kA(Ct.parent) ? k9(ee, Ct.parent) : void 0 : Xt = Et(Qe, ee), Xt && We( + Xt, + 4 + /* SearchedPropertyFoundLocal */ + ); + } + if (E.assert(Ve), K) { + const Xt = Et(Qe, ee); + return Xt && We( + Xt, + 4 + /* SearchedPropertyFoundLocal */ + ); + } + function We(Xt, rn) { + return Dc(ee.getRootSymbols(Xt), (ye) => Ie( + Xt, + ye, + /*baseSymbol*/ + void 0, + rn + ) || (ye.parent && ye.parent.flags & 96 && $e(ye) ? gt(ye.parent, ye.name, ee, (ft) => Ie(Xt, ye, ft, rn)) : void 0)); + } + function Et(Xt, rn) { + const ye = Lo( + Xt, + 208 + /* BindingElement */ + ); + if (ye && kA(ye)) + return k9(rn, ye); + } + } + function gt(Qe, Ct, ee, Ve) { + const K = /* @__PURE__ */ new Set(); + return Ie(Qe); + function Ie($e) { + if (!(!($e.flags & 96) || !Lp(K, $e))) + return Dc($e.declarations, (Ke) => Dc(j4(Ke), (Je) => { + const Ye = ee.getTypeAtLocation(Je), _t = Ye && Ye.symbol && ee.getPropertyOfType(Ye, Ct); + return Ye && _t && (Dc(ee.getRootSymbols(_t), Ve) || Ie(Ye.symbol)); + })); + } + } + function tr(Qe) { + return Qe.valueDeclaration ? !!(Mu(Qe.valueDeclaration) & 256) : !1; + } + function qr(Qe, Ct, ee, Ve) { + const { checker: K } = Ve; + return Re( + Ct, + ee, + K, + /*isForRenamePopulateSearchSymbolSet*/ + !1, + /*onlyIncludeBindingElementAtReferenceLocation*/ + Ve.options.use !== 2 || !!Ve.options.providePrefixAndSuffixTextForRename, + (Ie, $e, Ke, Je) => (Ke && tr(Ct) !== tr(Ke) && (Ke = void 0), Qe.includes(Ke || $e || Ie) ? { symbol: $e && !(rc(Ie) & 6) ? $e : Ie, kind: Je } : void 0), + /*allowBaseTypes*/ + (Ie) => !(Qe.parents && !Qe.parents.some(($e) => qn(Ie.parent, $e, Ve.inheritsFromCache, K))) + ); + } + function Bn(Qe, Ct) { + let ee = $S(Qe); + const { declarations: Ve } = Ct; + if (Ve) { + let K; + do { + K = ee; + for (const Ie of Ve) { + const $e = i9(Ie); + $e & ee && (ee |= $e); + } + } while (ee !== K); + } + return ee; + } + e.getIntersectingMeaningFromDeclarations = Bn; + function wn(Qe) { + return Qe.flags & 33554432 ? !(Yl(Qe) || jp(Qe)) : D4(Qe) ? C0(Qe) : Ka(Qe) ? !!Qe.body : Zn(Qe) || VP(Qe); + } + function ki(Qe, Ct, ee) { + const Ve = Ct.getSymbolAtLocation(Qe), K = Ct.getShorthandAssignmentValueSymbol(Ve.valueDeclaration); + if (K) + for (const Ie of K.getDeclarations()) + i9(Ie) & 1 && ee(Ie); + } + e.getReferenceEntriesForShorthandPropertyAssignment = ki; + function Cs(Qe, Ct, ee) { + ms(Qe, (Ve) => { + Ve.kind === Ct && ee(Ve), Cs(Ve, Ct, ee); + }); + } + function Ks(Qe) { + return XB(a9(Qe).parent); + } + function xr(Qe, Ct, ee) { + const Ve = N6(Qe) ? Qe.parent : void 0, K = Ve && ee.getTypeAtLocation(Ve.expression), Ie = Li(K && (K.isUnionOrIntersection() ? K.types : K.symbol === Ct.parent ? void 0 : [K]), ($e) => $e.symbol && $e.symbol.flags & 96 ? $e.symbol : void 0); + return Ie.length === 0 ? void 0 : Ie; + } + function gs(Qe) { + return Qe.use === 2 && Qe.providePrefixAndSuffixTextForRename; + } + })(Sk || (Sk = {})); + var H6 = {}; + Ec(H6, { + createDefinitionInfo: () => e8, + getDefinitionAndBoundSpan: () => AXe, + getDefinitionAtPosition: () => Y4e, + getReferenceAtPosition: () => K4e, + getTypeDefinitionAtPosition: () => PXe + }); + function Y4e(e, t, n, i, s) { + var o; + const c = K4e(t, n, e), _ = c && [MXe(c.reference.fileName, c.fileName, c.unverified)] || He; + if (c?.file) + return _; + const u = h_(t, n); + if (u === t) + return; + const { parent: m } = u, g = e.getTypeChecker(); + if (u.kind === 164 || Me(u) && TF(m) && m.tagName === u) + return EXe(g, u) || He; + if (gA(u)) { + const w = o9(u.parent, u.text); + return w ? [Cue( + g, + w, + "label", + u.text, + /*containerName*/ + void 0 + )] : void 0; + } + switch (u.kind) { + case 107: + const w = ur(u.parent, (O) => nc(O) ? "quit" : Ka(O)); + return w ? [SL(g, w)] : void 0; + case 90: + if (!CD(u.parent)) + break; + // falls through + case 84: + const A = ur(u.parent, xD); + if (A) + return [LXe(A, t)]; + break; + } + if (u.kind === 135) { + const w = ur(u, (O) => Ka(O)); + return w && at( + w.modifiers, + (O) => O.kind === 134 + /* AsyncKeyword */ + ) ? [SL(g, w)] : void 0; + } + if (u.kind === 127) { + const w = ur(u, (O) => Ka(O)); + return w && w.asteriskToken ? [SL(g, w)] : void 0; + } + if (Bx(u) && nc(u.parent)) { + const w = u.parent.parent, { symbol: A, failedAliasResolution: O } = FH(w, g, s), F = kn(w.members, nc), R = A ? g.symbolToString(A, w) : "", W = u.getSourceFile(); + return gr(F, (V) => { + let { pos: $ } = um(V); + return $ = aa(W.text, $), Cue( + g, + V, + "constructor", + "static {}", + R, + /*unverified*/ + !1, + O, + { start: $, length: 6 } + ); + }); + } + let { symbol: h, failedAliasResolution: S } = FH(u, g, s), T = u; + if (i && S) { + const w = lr([u, ...h?.declarations || He], (O) => ur(O, BZ)), A = w && px(w); + A && ({ symbol: h, failedAliasResolution: S } = FH(A, g, s), T = A); + } + if (!h && x9(T)) { + const w = (o = e.getResolvedModuleFromModuleSpecifier(T, t)) == null ? void 0 : o.resolvedModule; + if (w) + return [{ + name: T.text, + fileName: w.resolvedFileName, + containerName: void 0, + containerKind: void 0, + kind: "script", + textSpan: ql(0, 0), + failedAliasResolution: S, + isAmbient: fl(w.resolvedFileName), + unverified: T !== u + }]; + } + if (!h) + return Wi(_, IXe(u, g)); + if (i && Ri(h.declarations, (w) => w.getSourceFile().fileName === t.fileName)) return; + const C = jXe(g, u); + if (C && !(bu(u.parent) && BXe(C))) { + const w = SL(g, C, S); + let A = (F) => F !== C; + if (g.getRootSymbols(h).some((F) => CXe(F, C))) { + if (!Go(C)) return [w]; + A = (F) => F !== C && ($c(F) || Gc(F)); + } + const O = Dw(g, h, u, S, A) || He; + return u.kind === 108 ? [w, ...O] : [...O, w]; + } + if (u.parent.kind === 304) { + const w = g.getShorthandAssignmentValueSymbol(h.valueDeclaration), A = w?.declarations ? w.declarations.map((O) => e8( + O, + g, + w, + u, + /*unverified*/ + !1, + S + )) : He; + return Wi(A, Z4e(g, u)); + } + if (Fc(u) && ma(m) && Nf(m.parent) && u === (m.propertyName || m.name)) { + const w = xA(u), A = g.getTypeAtLocation(m.parent); + return w === void 0 ? He : na(A.isUnion() ? A.types : [A], (O) => { + const F = O.getProperty(w); + return F && Dw(g, F, u); + }); + } + const D = Z4e(g, u); + return Wi(_, D.length ? D : Dw(g, h, u, S)); + } + function CXe(e, t) { + var n; + return e === t.symbol || e === t.symbol.parent || Cl(t.parent) || !Cb(t.parent) && e === ((n = jn(t.parent, bd)) == null ? void 0 : n.symbol); + } + function Z4e(e, t) { + const n = UA(t); + if (n) { + const i = n && e.getContextualType(n.parent); + if (i) + return na(aL( + n, + e, + i, + /*unionSymbolOk*/ + !1 + ), (s) => Dw(e, s, t)); + } + return He; + } + function EXe(e, t) { + const n = ur(t, sl); + if (!(n && n.name)) return; + const i = ur(n, Zn); + if (!i) return; + const s = sm(i); + if (!s) return; + const o = za(s.expression), c = Gc(o) ? o.symbol : e.getSymbolAtLocation(o); + if (!c) return; + const _ = Pi(_x(n.name)), u = Kc(n) ? e.getPropertyOfType(e.getTypeOfSymbol(c), _) : e.getPropertyOfType(e.getDeclaredTypeOfSymbol(c), _); + if (u) + return Dw(e, u, t); + } + function K4e(e, t, n) { + var i, s; + const o = t8(e.referencedFiles, t); + if (o) { + const u = n.getSourceFileFromReference(e, o); + return u && { reference: o, fileName: u.fileName, file: u, unverified: !1 }; + } + const c = t8(e.typeReferenceDirectives, t); + if (c) { + const u = (i = n.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(c, e)) == null ? void 0 : i.resolvedTypeReferenceDirective, m = u && n.getSourceFile(u.resolvedFileName); + return m && { reference: c, fileName: m.fileName, file: m, unverified: !1 }; + } + const _ = t8(e.libReferenceDirectives, t); + if (_) { + const u = n.getLibFileFromReference(_); + return u && { reference: _, fileName: u.fileName, file: u, unverified: !1 }; + } + if (e.imports.length || e.moduleAugmentations.length) { + const u = F6(e, t); + let m; + if (x9(u) && vl(u.text) && (m = n.getResolvedModuleFromModuleSpecifier(u, e))) { + const g = (s = m.resolvedModule) == null ? void 0 : s.resolvedFileName, h = g || Iy(Hn(e.fileName), u.text); + return { + file: n.getSourceFile(h), + fileName: h, + reference: { + pos: u.getStart(), + end: u.getEnd(), + fileName: u.text + }, + unverified: !g + }; + } + } + } + var eDe = /* @__PURE__ */ new Set([ + "Array", + "ArrayLike", + "ReadonlyArray", + "Promise", + "PromiseLike", + "Iterable", + "IterableIterator", + "AsyncIterable", + "Set", + "WeakSet", + "ReadonlySet", + "Map", + "WeakMap", + "ReadonlyMap", + "Partial", + "Required", + "Readonly", + "Pick", + "Omit" + ]); + function DXe(e, t) { + const n = t.symbol.name; + if (!eDe.has(n)) + return !1; + const i = e.resolveName( + n, + /*location*/ + void 0, + 788968, + /*excludeGlobals*/ + !1 + ); + return !!i && i === t.target.symbol; + } + function tDe(e, t) { + if (!t.aliasSymbol) + return !1; + const n = t.aliasSymbol.name; + if (!eDe.has(n)) + return !1; + const i = e.resolveName( + n, + /*location*/ + void 0, + 788968, + /*excludeGlobals*/ + !1 + ); + return !!i && i === t.aliasSymbol; + } + function wXe(e, t, n, i) { + var s, o; + if (Cn(t) & 4 && DXe(e, t)) + return KA(e.getTypeArguments(t)[0], e, n, i); + if (tDe(e, t) && t.aliasTypeArguments) + return KA(t.aliasTypeArguments[0], e, n, i); + if (Cn(t) & 32 && t.target && tDe(e, t.target)) { + const c = (o = (s = t.aliasSymbol) == null ? void 0 : s.declarations) == null ? void 0 : o[0]; + if (c && jp(c) && Y_(c.type) && c.type.typeArguments) + return KA(e.getTypeAtLocation(c.type.typeArguments[0]), e, n, i); + } + return []; + } + function PXe(e, t, n) { + const i = h_(t, n); + if (i === t) + return; + if (PC(i.parent) && i.parent.name === i) + return KA( + e.getTypeAtLocation(i.parent), + e, + i.parent, + /*failedAliasResolution*/ + !1 + ); + const { symbol: s, failedAliasResolution: o } = FH( + i, + e, + /*stopAtAlias*/ + !1 + ); + if (!s) return; + const c = e.getTypeOfSymbolAtLocation(s, i), _ = NXe(s, c, e), u = _ && KA(_, e, i, o), [m, g] = u && u.length !== 0 ? [_, u] : [c, KA(c, e, i, o)]; + return g.length ? [...wXe(e, m, i, o), ...g] : !(s.flags & 111551) && s.flags & 788968 ? Dw(e, Gl(s, e), i, o) : void 0; + } + function KA(e, t, n, i) { + return na(e.isUnion() && !(e.flags & 32) ? e.types : [e], (s) => s.symbol && Dw(t, s.symbol, n, i)); + } + function NXe(e, t, n) { + if (t.symbol === e || // At `const f = () => {}`, the symbol is `f` and the type symbol is at `() => {}` + e.valueDeclaration && t.symbol && Kn(e.valueDeclaration) && e.valueDeclaration.initializer === t.symbol.valueDeclaration) { + const i = t.getCallSignatures(); + if (i.length === 1) return n.getReturnTypeOfSignature(ya(i)); + } + } + function AXe(e, t, n) { + const i = Y4e(e, t, n); + if (!i || i.length === 0) + return; + const s = t8(t.referencedFiles, n) || t8(t.typeReferenceDirectives, n) || t8(t.libReferenceDirectives, n); + if (s) + return { definitions: i, textSpan: W0(s) }; + const o = h_(t, n), c = ql(o.getStart(), o.getWidth()); + return { definitions: i, textSpan: c }; + } + function IXe(e, t) { + return Li(t.getIndexInfosAtLocation(e), (n) => n.declaration && SL(t, n.declaration)); + } + function FH(e, t, n) { + const i = t.getSymbolAtLocation(e); + let s = !1; + if (i?.declarations && i.flags & 2097152 && !n && FXe(e, i.declarations[0])) { + const o = t.getAliasedSymbol(i); + if (o.declarations) + return { symbol: o }; + s = !0; + } + return { symbol: i, failedAliasResolution: s }; + } + function FXe(e, t) { + return e.kind !== 80 && (e.kind !== 11 || !jy(e.parent)) ? !1 : e.parent === t ? !0 : t.kind !== 274; + } + function OXe(e) { + if (!I4(e)) return !1; + const t = ur(e, (n) => Cl(n) ? !0 : I4(n) ? !1 : "quit"); + return !!t && Sc(t) === 5; + } + function Dw(e, t, n, i, s) { + const o = s !== void 0 ? kn(t.declarations, s) : t.declarations, c = !s && (m() || g()); + if (c) + return c; + const _ = kn(o, (S) => !OXe(S)), u = at(_) ? _ : o; + return gr(u, (S) => e8( + S, + e, + t, + n, + /*unverified*/ + !1, + i + )); + function m() { + if (t.flags & 32 && !(t.flags & 19) && (nw(n) || n.kind === 137)) { + const S = Pn(o, Zn); + return S && h( + S.members, + /*selectConstructors*/ + !0 + ); + } + } + function g() { + return rV(n) || lV(n) ? h( + o, + /*selectConstructors*/ + !1 + ) : void 0; + } + function h(S, T) { + if (!S) + return; + const C = S.filter(T ? Go : vs), D = C.filter((w) => !!w.body); + return C.length ? D.length !== 0 ? D.map((w) => e8(w, e, t, n)) : [e8( + _a(C), + e, + t, + n, + /*unverified*/ + !1, + i + )] : void 0; + } + } + function e8(e, t, n, i, s, o) { + const c = t.symbolToString(n), _ = q0.getSymbolKind(t, n, i), u = n.parent ? t.symbolToString(n.parent, i) : ""; + return Cue(t, e, _, c, u, s, o); + } + function Cue(e, t, n, i, s, o, c, _) { + const u = t.getSourceFile(); + if (!_) { + const m = is(t) || t; + _ = e_(m, u); + } + return { + fileName: u.fileName, + textSpan: _, + kind: n, + name: i, + containerKind: void 0, + // TODO: GH#18217 + containerName: s, + ...So.toContextSpan( + _, + u, + So.getContextNode(t) + ), + isLocal: !Eue(e, t), + isAmbient: !!(t.flags & 33554432), + unverified: o, + failedAliasResolution: c + }; + } + function LXe(e, t) { + const n = So.getContextNode(e), i = e_(Tue(n) ? n.start : n, t); + return { + fileName: t.fileName, + textSpan: i, + kind: "keyword", + name: "switch", + containerKind: void 0, + containerName: "", + ...So.toContextSpan(i, t, n), + isLocal: !0, + isAmbient: !1, + unverified: !1, + failedAliasResolution: void 0 + }; + } + function Eue(e, t) { + if (e.isDeclarationVisible(t)) return !0; + if (!t.parent) return !1; + if (C0(t.parent) && t.parent.initializer === t) return Eue(e, t.parent); + switch (t.kind) { + case 172: + case 177: + case 178: + case 174: + if (Q_( + t, + 2 + /* Private */ + )) return !1; + // Public properties/methods are visible if its parents are visible, so: + // falls through + case 176: + case 303: + case 304: + case 210: + case 231: + case 219: + case 218: + return Eue(e, t.parent); + default: + return !1; + } + } + function SL(e, t, n) { + return e8( + t, + e, + t.symbol, + t, + /*unverified*/ + !1, + n + ); + } + function t8(e, t) { + return Pn(e, (n) => PP(n, t)); + } + function MXe(e, t, n) { + return { + fileName: t, + textSpan: bc(0, 0), + kind: "script", + name: e, + containerName: void 0, + containerKind: void 0, + // TODO: GH#18217 + unverified: n + }; + } + function RXe(e) { + const t = ur(e, (i) => !N6(i)), n = t?.parent; + return n && Cb(n) && U7(n) === t ? n : void 0; + } + function jXe(e, t) { + const n = RXe(t), i = n && e.getResolvedSignature(n); + return jn(i && i.declaration, (s) => vs(s) && !ng(s)); + } + function BXe(e) { + switch (e.kind) { + case 176: + case 185: + case 179: + case 180: + return !0; + default: + return !1; + } + } + var OH = {}; + Ec(OH, { + provideInlayHints: () => UXe + }); + var JXe = (e) => new RegExp(`^\\s?/\\*\\*?\\s?${e}\\s?\\*\\/\\s?$`); + function zXe(e) { + return e.includeInlayParameterNameHints === "literals" || e.includeInlayParameterNameHints === "all"; + } + function WXe(e) { + return e.includeInlayParameterNameHints === "literals"; + } + function Due(e) { + return e.interactiveInlayHints === !0; + } + function UXe(e) { + const { file: t, program: n, span: i, cancellationToken: s, preferences: o } = e, c = t.text, _ = n.getCompilerOptions(), u = tf(t, o), m = n.getTypeChecker(), g = []; + return h(t), g; + function h(Ce) { + if (!(!Ce || Ce.getFullWidth() === 0)) { + switch (Ce.kind) { + case 267: + case 263: + case 264: + case 262: + case 231: + case 218: + case 174: + case 219: + s.throwIfCancellationRequested(); + } + if (NP(i, Ce.pos, Ce.getFullWidth()) && !(fi(Ce) && !Lh(Ce))) + return o.includeInlayVariableTypeHints && Kn(Ce) || o.includeInlayPropertyDeclarationTypeHints && ss(Ce) ? O(Ce) : o.includeInlayEnumMemberValueHints && j0(Ce) ? w(Ce) : zXe(o) && (Fs(Ce) || Yb(Ce)) ? F(Ce) : (o.includeInlayFunctionParameterTypeHints && Ka(Ce) && H5(Ce) && _e(Ce), o.includeInlayFunctionLikeReturnTypeHints && S(Ce) && $(Ce)), ms(Ce, h); + } + } + function S(Ce) { + return bo(Ce) || po(Ce) || Tc(Ce) || fc(Ce) || cp(Ce); + } + function T(Ce, Ee, oe, ke) { + let ue = `${ke ? "..." : ""}${Ce}`, it; + Due(o) ? (it = [me(ue, Ee), { text: ":" }], ue = "") : ue += ":", g.push({ + text: ue, + position: oe, + kind: "Parameter", + whitespaceAfter: !0, + displayParts: it + }); + } + function C(Ce, Ee) { + g.push({ + text: typeof Ce == "string" ? `: ${Ce}` : "", + displayParts: typeof Ce == "string" ? void 0 : [{ text: ": " }, ...Ce], + position: Ee, + kind: "Type", + whitespaceBefore: !0 + }); + } + function D(Ce, Ee) { + g.push({ + text: `= ${Ce}`, + position: Ee, + kind: "Enum", + whitespaceBefore: !0 + }); + } + function w(Ce) { + if (Ce.initializer) + return; + const Ee = m.getConstantValue(Ce); + Ee !== void 0 && D(Ee.toString(), Ce.end); + } + function A(Ce) { + return Ce.symbol && Ce.symbol.flags & 1536; + } + function O(Ce) { + if (Ce.initializer === void 0 && !(ss(Ce) && !(m.getTypeAtLocation(Ce).flags & 1)) || Ds(Ce.name) || Kn(Ce) && !q(Ce) || qc(Ce)) + return; + const oe = m.getTypeAtLocation(Ce); + if (A(oe)) + return; + const ke = te(oe); + if (ke) { + const ue = typeof ke == "string" ? ke : ke.map((Oe) => Oe.text).join(""); + if (o.includeInlayVariableTypeHintsWhenTypeMatchesName === !1 && Py(Ce.name.getText(), ue)) + return; + C(ke, Ce.name.end); + } + } + function F(Ce) { + const Ee = Ce.arguments; + if (!Ee || !Ee.length) + return; + const oe = m.getResolvedSignature(Ce); + if (oe === void 0) return; + let ke = 0; + for (const ue of Ee) { + const it = za(ue); + if (WXe(o) && !V(it)) { + ke++; + continue; + } + let Oe = 0; + if (lp(it)) { + const he = m.getTypeAtLocation(it.expression); + if (m.isTupleType(he)) { + const { elementFlags: ne, fixedLength: Ae } = he.target; + if (Ae === 0) + continue; + const De = ec(ne, (Ue) => !(Ue & 1)); + (De < 0 ? Ae : De) > 0 && (Oe = De < 0 ? Ae : De); + } + } + const xe = m.getParameterIdentifierInfoAtPosition(oe, ke); + if (ke = ke + (Oe || 1), xe) { + const { parameter: he, parameterName: ne, isRestParameter: Ae } = xe; + if (!(o.includeInlayParameterNameHintsWhenArgumentMatchesName || !R(it, ne)) && !Ae) + continue; + const we = Pi(ne); + if (W(it, we)) + continue; + T(we, he, ue.getStart(), Ae); + } + } + } + function R(Ce, Ee) { + return Me(Ce) ? Ce.text === Ee : Tn(Ce) ? Ce.name.text === Ee : !1; + } + function W(Ce, Ee) { + if (!E_(Ee, pa(_), V3(t.scriptKind))) + return !1; + const oe = Fg(c, Ce.pos); + if (!oe?.length) + return !1; + const ke = JXe(Ee); + return at(oe, (ue) => ke.test(c.substring(ue.pos, ue.end))); + } + function V(Ce) { + switch (Ce.kind) { + case 224: { + const Ee = Ce.operand; + return cS(Ee) || Me(Ee) && lD(Ee.escapedText); + } + case 112: + case 97: + case 106: + case 15: + case 228: + return !0; + case 80: { + const Ee = Ce.escapedText; + return Te(Ee) || lD(Ee); + } + } + return cS(Ce); + } + function $(Ce) { + if (bo(Ce) && !Xa(Ce, 21, t) || pf(Ce) || !Ce.body) + return; + const oe = m.getSignatureFromDeclaration(Ce); + if (!oe) + return; + const ke = m.getTypePredicateOfSignature(oe); + if (ke?.type) { + const Oe = ie(ke); + if (Oe) { + C(Oe, U(Ce)); + return; + } + } + const ue = m.getReturnTypeOfSignature(oe); + if (A(ue)) + return; + const it = te(ue); + it && C(it, U(Ce)); + } + function U(Ce) { + const Ee = Xa(Ce, 22, t); + return Ee ? Ee.end : Ce.parameters.end; + } + function _e(Ce) { + const Ee = m.getSignatureFromDeclaration(Ce); + if (Ee) + for (let oe = 0; oe < Ce.parameters.length && oe < Ee.parameters.length; ++oe) { + const ke = Ce.parameters[oe]; + if (!q(ke) || qc(ke)) + continue; + const it = Z(Ee.parameters[oe]); + it && C(it, ke.questionToken ? ke.questionToken.end : ke.name.end); + } + } + function Z(Ce) { + const Ee = Ce.valueDeclaration; + if (!Ee || !Ii(Ee)) + return; + const oe = m.getTypeOfSymbolAtLocation(Ce, Ee); + if (!A(oe)) + return te(oe); + } + function J(Ce) { + const oe = o2(); + return kC((ke) => { + const ue = m.typeToTypeNode( + Ce, + /*enclosingDeclaration*/ + void 0, + 71286784 + ); + E.assertIsDefined(ue, "should always get typenode"), oe.writeNode( + 4, + ue, + /*sourceFile*/ + t, + ke + ); + }); + } + function re(Ce) { + const oe = o2(); + return kC((ke) => { + const ue = m.typePredicateToTypePredicateNode( + Ce, + /*enclosingDeclaration*/ + void 0, + 71286784 + ); + E.assertIsDefined(ue, "should always get typePredicateNode"), oe.writeNode( + 4, + ue, + /*sourceFile*/ + t, + ke + ); + }); + } + function te(Ce) { + if (!Due(o)) + return J(Ce); + const oe = m.typeToTypeNode( + Ce, + /*enclosingDeclaration*/ + void 0, + 71286784 + ); + return E.assertIsDefined(oe, "should always get typeNode"), le(oe); + } + function ie(Ce) { + if (!Due(o)) + return re(Ce); + const oe = m.typePredicateToTypePredicateNode( + Ce, + /*enclosingDeclaration*/ + void 0, + 71286784 + ); + return E.assertIsDefined(oe, "should always get typenode"), le(oe); + } + function le(Ce) { + const Ee = []; + return oe(Ce), Ee; + function oe(Oe) { + var xe, he; + if (!Oe) + return; + const ne = Xs(Oe.kind); + if (ne) { + Ee.push({ text: ne }); + return; + } + if (cS(Oe)) { + Ee.push({ text: it(Oe) }); + return; + } + switch (Oe.kind) { + case 80: + E.assertNode(Oe, Me); + const Ae = An(Oe), De = Oe.symbol && Oe.symbol.declarations && Oe.symbol.declarations.length && is(Oe.symbol.declarations[0]); + De ? Ee.push(me(Ae, De)) : Ee.push({ text: Ae }); + break; + case 166: + E.assertNode(Oe, Xu), oe(Oe.left), Ee.push({ text: "." }), oe(Oe.right); + break; + case 182: + E.assertNode(Oe, zx), Oe.assertsModifier && Ee.push({ text: "asserts " }), oe(Oe.parameterName), Oe.type && (Ee.push({ text: " is " }), oe(Oe.type)); + break; + case 183: + E.assertNode(Oe, Y_), oe(Oe.typeName), Oe.typeArguments && (Ee.push({ text: "<" }), ue(Oe.typeArguments, ", "), Ee.push({ text: ">" })); + break; + case 168: + E.assertNode(Oe, Ao), Oe.modifiers && ue(Oe.modifiers, " "), oe(Oe.name), Oe.constraint && (Ee.push({ text: " extends " }), oe(Oe.constraint)), Oe.default && (Ee.push({ text: " = " }), oe(Oe.default)); + break; + case 169: + E.assertNode(Oe, Ii), Oe.modifiers && ue(Oe.modifiers, " "), Oe.dotDotDotToken && Ee.push({ text: "..." }), oe(Oe.name), Oe.questionToken && Ee.push({ text: "?" }), Oe.type && (Ee.push({ text: ": " }), oe(Oe.type)); + break; + case 185: + E.assertNode(Oe, ZC), Ee.push({ text: "new " }), ke(Oe), Ee.push({ text: " => " }), oe(Oe.type); + break; + case 186: + E.assertNode(Oe, $b), Ee.push({ text: "typeof " }), oe(Oe.exprName), Oe.typeArguments && (Ee.push({ text: "<" }), ue(Oe.typeArguments, ", "), Ee.push({ text: ">" })); + break; + case 187: + E.assertNode(Oe, Qu), Ee.push({ text: "{" }), Oe.members.length && (Ee.push({ text: " " }), ue(Oe.members, "; "), Ee.push({ text: " " })), Ee.push({ text: "}" }); + break; + case 188: + E.assertNode(Oe, mN), oe(Oe.elementType), Ee.push({ text: "[]" }); + break; + case 189: + E.assertNode(Oe, Wx), Ee.push({ text: "[" }), ue(Oe.elements, ", "), Ee.push({ text: "]" }); + break; + case 202: + E.assertNode(Oe, KC), Oe.dotDotDotToken && Ee.push({ text: "..." }), oe(Oe.name), Oe.questionToken && Ee.push({ text: "?" }), Ee.push({ text: ": " }), oe(Oe.type); + break; + case 190: + E.assertNode(Oe, fF), oe(Oe.type), Ee.push({ text: "?" }); + break; + case 191: + E.assertNode(Oe, pF), Ee.push({ text: "..." }), oe(Oe.type); + break; + case 192: + E.assertNode(Oe, L0), ue(Oe.types, " | "); + break; + case 193: + E.assertNode(Oe, Ux), ue(Oe.types, " & "); + break; + case 194: + E.assertNode(Oe, Xb), oe(Oe.checkType), Ee.push({ text: " extends " }), oe(Oe.extendsType), Ee.push({ text: " ? " }), oe(Oe.trueType), Ee.push({ text: " : " }), oe(Oe.falseType); + break; + case 195: + E.assertNode(Oe, AS), Ee.push({ text: "infer " }), oe(Oe.typeParameter); + break; + case 196: + E.assertNode(Oe, IS), Ee.push({ text: "(" }), oe(Oe.type), Ee.push({ text: ")" }); + break; + case 198: + E.assertNode(Oe, _v), Ee.push({ text: `${Xs(Oe.operator)} ` }), oe(Oe.type); + break; + case 199: + E.assertNode(Oe, Qb), oe(Oe.objectType), Ee.push({ text: "[" }), oe(Oe.indexType), Ee.push({ text: "]" }); + break; + case 200: + E.assertNode(Oe, FS), Ee.push({ text: "{ " }), Oe.readonlyToken && (Oe.readonlyToken.kind === 40 ? Ee.push({ text: "+" }) : Oe.readonlyToken.kind === 41 && Ee.push({ text: "-" }), Ee.push({ text: "readonly " })), Ee.push({ text: "[" }), oe(Oe.typeParameter), Oe.nameType && (Ee.push({ text: " as " }), oe(Oe.nameType)), Ee.push({ text: "]" }), Oe.questionToken && (Oe.questionToken.kind === 40 ? Ee.push({ text: "+" }) : Oe.questionToken.kind === 41 && Ee.push({ text: "-" }), Ee.push({ text: "?" })), Ee.push({ text: ": " }), Oe.type && oe(Oe.type), Ee.push({ text: "; }" }); + break; + case 201: + E.assertNode(Oe, M0), oe(Oe.literal); + break; + case 184: + E.assertNode(Oe, ng), ke(Oe), Ee.push({ text: " => " }), oe(Oe.type); + break; + case 205: + E.assertNode(Oe, Ed), Oe.isTypeOf && Ee.push({ text: "typeof " }), Ee.push({ text: "import(" }), oe(Oe.argument), Oe.assertions && (Ee.push({ text: ", { assert: " }), ue(Oe.assertions.assertClause.elements, ", "), Ee.push({ text: " }" })), Ee.push({ text: ")" }), Oe.qualifier && (Ee.push({ text: "." }), oe(Oe.qualifier)), Oe.typeArguments && (Ee.push({ text: "<" }), ue(Oe.typeArguments, ", "), Ee.push({ text: ">" })); + break; + case 171: + E.assertNode(Oe, m_), (xe = Oe.modifiers) != null && xe.length && (ue(Oe.modifiers, " "), Ee.push({ text: " " })), oe(Oe.name), Oe.questionToken && Ee.push({ text: "?" }), Oe.type && (Ee.push({ text: ": " }), oe(Oe.type)); + break; + case 181: + E.assertNode(Oe, r1), Ee.push({ text: "[" }), ue(Oe.parameters, ", "), Ee.push({ text: "]" }), Oe.type && (Ee.push({ text: ": " }), oe(Oe.type)); + break; + case 173: + E.assertNode(Oe, pm), (he = Oe.modifiers) != null && he.length && (ue(Oe.modifiers, " "), Ee.push({ text: " " })), oe(Oe.name), Oe.questionToken && Ee.push({ text: "?" }), ke(Oe), Oe.type && (Ee.push({ text: ": " }), oe(Oe.type)); + break; + case 179: + E.assertNode(Oe, Jx), ke(Oe), Oe.type && (Ee.push({ text: ": " }), oe(Oe.type)); + break; + case 207: + E.assertNode(Oe, R0), Ee.push({ text: "[" }), ue(Oe.elements, ", "), Ee.push({ text: "]" }); + break; + case 206: + E.assertNode(Oe, Nf), Ee.push({ text: "{" }), Oe.elements.length && (Ee.push({ text: " " }), ue(Oe.elements, ", "), Ee.push({ text: " " })), Ee.push({ text: "}" }); + break; + case 208: + E.assertNode(Oe, ma), oe(Oe.name); + break; + case 224: + E.assertNode(Oe, pv), Ee.push({ text: Xs(Oe.operator) }), oe(Oe.operand); + break; + case 203: + E.assertNode(Oe, yte), oe(Oe.head), Oe.templateSpans.forEach(oe); + break; + case 16: + E.assertNode(Oe, Rx), Ee.push({ text: it(Oe) }); + break; + case 204: + E.assertNode(Oe, QJ), oe(Oe.type), oe(Oe.literal); + break; + case 17: + E.assertNode(Oe, HJ), Ee.push({ text: it(Oe) }); + break; + case 18: + E.assertNode(Oe, cF), Ee.push({ text: it(Oe) }); + break; + case 197: + E.assertNode(Oe, bD), Ee.push({ text: "this" }); + break; + default: + E.failBadSyntaxKind(Oe); + } + } + function ke(Oe) { + Oe.typeParameters && (Ee.push({ text: "<" }), ue(Oe.typeParameters, ", "), Ee.push({ text: ">" })), Ee.push({ text: "(" }), ue(Oe.parameters, ", "), Ee.push({ text: ")" }); + } + function ue(Oe, xe) { + Oe.forEach((he, ne) => { + ne > 0 && Ee.push({ text: xe }), oe(he); + }); + } + function it(Oe) { + switch (Oe.kind) { + case 11: + return u === 0 ? `'${rg( + Oe.text, + 39 + /* singleQuote */ + )}'` : `"${rg( + Oe.text, + 34 + /* doubleQuote */ + )}"`; + case 16: + case 17: + case 18: { + const xe = Oe.rawText ?? OB(rg( + Oe.text, + 96 + /* backtick */ + )); + switch (Oe.kind) { + case 16: + return "`" + xe + "${"; + case 17: + return "}" + xe + "${"; + case 18: + return "}" + xe + "`"; + } + } + } + return Oe.text; + } + } + function Te(Ce) { + return Ce === "undefined"; + } + function q(Ce) { + if ((av(Ce) || Kn(Ce) && wC(Ce)) && Ce.initializer) { + const Ee = za(Ce.initializer); + return !(V(Ee) || Yb(Ee) || oa(Ee) || Eb(Ee)); + } + return !0; + } + function me(Ce, Ee) { + const oe = Ee.getSourceFile(); + return { + text: Ce, + span: e_(Ee, oe), + file: oe.fileName + }; + } + } + var Lv = {}; + Ec(Lv, { + getDocCommentTemplateAtPosition: () => eQe, + getJSDocParameterNameCompletionDetails: () => KXe, + getJSDocParameterNameCompletions: () => ZXe, + getJSDocTagCompletionDetails: () => cDe, + getJSDocTagCompletions: () => YXe, + getJSDocTagNameCompletionDetails: () => QXe, + getJSDocTagNameCompletions: () => XXe, + getJsDocCommentsFromDeclarations: () => VXe, + getJsDocTagsFromDeclarations: () => GXe + }); + var rDe = [ + "abstract", + "access", + "alias", + "argument", + "async", + "augments", + "author", + "borrows", + "callback", + "class", + "classdesc", + "constant", + "constructor", + "constructs", + "copyright", + "default", + "deprecated", + "description", + "emits", + "enum", + "event", + "example", + "exports", + "extends", + "external", + "field", + "file", + "fileoverview", + "fires", + "function", + "generator", + "global", + "hideconstructor", + "host", + "ignore", + "implements", + "import", + "inheritdoc", + "inner", + "instance", + "interface", + "kind", + "lends", + "license", + "link", + "linkcode", + "linkplain", + "listens", + "member", + "memberof", + "method", + "mixes", + "module", + "name", + "namespace", + "overload", + "override", + "package", + "param", + "private", + "prop", + "property", + "protected", + "public", + "readonly", + "requires", + "returns", + "satisfies", + "see", + "since", + "static", + "summary", + "template", + "this", + "throws", + "todo", + "tutorial", + "type", + "typedef", + "var", + "variation", + "version", + "virtual", + "yields" + ], nDe, iDe; + function VXe(e, t) { + const n = []; + return OV(e, (i) => { + for (const s of HXe(i)) { + const o = Pd(s) && s.tags && Pn(s.tags, (_) => _.kind === 327 && (_.tagName.escapedText === "inheritDoc" || _.tagName.escapedText === "inheritdoc")); + if (s.comment === void 0 && !o || Pd(s) && i.kind !== 346 && i.kind !== 338 && s.tags && s.tags.some( + (_) => _.kind === 346 || _.kind === 338 + /* JSDocCallbackTag */ + ) && !s.tags.some( + (_) => _.kind === 341 || _.kind === 342 + /* JSDocReturnTag */ + )) + continue; + let c = s.comment ? G6(s.comment, t) : []; + o && o.comment && (c = c.concat(G6(o.comment, t))), as(n, c, qXe) || n.push(c); + } + }), Dp(pR(n, [R6()])); + } + function qXe(e, t) { + return Ef(e, t, (n, i) => n.kind === i.kind && n.text === i.text); + } + function HXe(e) { + switch (e.kind) { + case 341: + case 348: + return [e]; + case 338: + case 346: + return [e, e.parent]; + case 323: + if (o6(e.parent)) + return [e.parent.parent]; + // falls through + default: + return vB(e); + } + } + function GXe(e, t) { + const n = []; + return OV(e, (i) => { + const s = Z1(i); + if (!(s.some( + (o) => o.kind === 346 || o.kind === 338 + /* JSDocCallbackTag */ + ) && !s.some( + (o) => o.kind === 341 || o.kind === 342 + /* JSDocReturnTag */ + ))) + for (const o of s) + n.push({ name: o.tagName.text, text: oDe(o, t) }), n.push(...sDe(aDe(o), t)); + }), n; + } + function sDe(e, t) { + return na(e, (n) => Wi([{ name: n.tagName.text, text: oDe(n, t) }], sDe(aDe(n), t))); + } + function aDe(e) { + return h4(e) && e.isNameFirst && e.typeExpression && RS(e.typeExpression.type) ? e.typeExpression.type.jsDocPropertyTags : void 0; + } + function G6(e, t) { + return typeof e == "string" ? [Lf(e)] : na( + e, + (n) => n.kind === 321 ? [Lf(n.text)] : oae(n, t) + ); + } + function oDe(e, t) { + const { comment: n, kind: i } = e, s = $Xe(i); + switch (i) { + case 349: + const _ = e.typeExpression; + return _ ? o(_) : n === void 0 ? void 0 : G6(n, t); + case 329: + return o(e.class); + case 328: + return o(e.class); + case 345: + const u = e, m = []; + if (u.constraint && m.push(Lf(u.constraint.getText())), Ir(u.typeParameters)) { + Ir(m) && m.push(cc()); + const h = u.typeParameters[u.typeParameters.length - 1]; + lr(u.typeParameters, (S) => { + m.push(s(S.getText())), h !== S && m.push(Cu( + 28 + /* CommaToken */ + ), cc()); + }); + } + return n && m.push(cc(), ...G6(n, t)), m; + case 344: + case 350: + return o(e.typeExpression); + case 346: + case 338: + case 348: + case 341: + case 347: + const { name: g } = e; + return g ? o(g) : n === void 0 ? void 0 : G6(n, t); + default: + return n === void 0 ? void 0 : G6(n, t); + } + function o(_) { + return c(_.getText()); + } + function c(_) { + return n ? _.match(/^https?$/) ? [Lf(_), ...G6(n, t)] : [s(_), cc(), ...G6(n, t)] : [Lf(_)]; + } + } + function $Xe(e) { + switch (e) { + case 341: + return rae; + case 348: + return nae; + case 345: + return sae; + case 346: + case 338: + return iae; + default: + return Lf; + } + } + function XXe() { + return nDe || (nDe = gr(rDe, (e) => ({ + name: e, + kind: "keyword", + kindModifiers: "", + sortText: bk.SortText.LocationPriority + }))); + } + var QXe = cDe; + function YXe() { + return iDe || (iDe = gr(rDe, (e) => ({ + name: `@${e}`, + kind: "keyword", + kindModifiers: "", + sortText: bk.SortText.LocationPriority + }))); + } + function cDe(e) { + return { + name: e, + kind: "", + // TODO: should have its own kind? + kindModifiers: "", + displayParts: [Lf(e)], + documentation: He, + tags: void 0, + codeActions: void 0 + }; + } + function ZXe(e) { + if (!Me(e.name)) + return He; + const t = e.name.text, n = e.parent, i = n.parent; + return vs(i) ? Li(i.parameters, (s) => { + if (!Me(s.name)) return; + const o = s.name.text; + if (!(n.tags.some((c) => c !== e && Af(c) && Me(c.name) && c.name.escapedText === o) || t !== void 0 && !Vi(o, t))) + return { name: o, kind: "parameter", kindModifiers: "", sortText: bk.SortText.LocationPriority }; + }) : []; + } + function KXe(e) { + return { + name: e, + kind: "parameter", + kindModifiers: "", + displayParts: [Lf(e)], + documentation: He, + tags: void 0, + codeActions: void 0 + }; + } + function eQe(e, t, n, i) { + const s = Si(t, n), o = ur(s, Pd); + if (o && (o.comment !== void 0 || Ir(o.tags))) + return; + const c = s.getStart(t); + if (!o && c < n) + return; + const _ = iQe(s, i); + if (!_) + return; + const { commentOwner: u, parameters: m, hasReturn: g } = _, h = uf(u) && u.jsDoc ? u.jsDoc : void 0, S = Co(h); + if (u.getStart(t) < n || S && o && S !== o) + return; + const T = tQe(t, n), C = Gg(t.fileName), D = (m ? rQe(m || [], C, T, e) : "") + (g ? nQe(T, e) : ""), w = "/**", A = " */", O = Ir(Z1(u)) > 0; + if (D && !O) { + const F = w + e + T + " * ", R = c === n ? e + T : ""; + return { newText: F + e + D + T + A + R, caretOffset: F.length }; + } + return { newText: w + A, caretOffset: 3 }; + } + function tQe(e, t) { + const { text: n } = e, i = Wp(t, e); + let s = i; + for (; s <= t && em(n.charCodeAt(s)); s++) ; + return n.slice(i, s); + } + function rQe(e, t, n, i) { + return e.map(({ name: s, dotDotDotToken: o }, c) => { + const _ = s.kind === 80 ? s.text : "param" + c; + return `${n} * @param ${t ? o ? "{...any} " : "{any} " : ""}${_}${i}`; + }).join(""); + } + function nQe(e, t) { + return `${e} * @returns${t}`; + } + function iQe(e, t) { + return DZ(e, (n) => wue(n, t)); + } + function wue(e, t) { + switch (e.kind) { + case 262: + case 218: + case 174: + case 176: + case 173: + case 219: + const n = e; + return { commentOwner: e, parameters: n.parameters, hasReturn: TL(n, t) }; + case 303: + return wue(e.initializer, t); + case 263: + case 264: + case 266: + case 306: + case 265: + return { commentOwner: e }; + case 171: { + const s = e; + return s.type && ng(s.type) ? { commentOwner: e, parameters: s.type.parameters, hasReturn: TL(s.type, t) } : { commentOwner: e }; + } + case 243: { + const o = e.declarationList.declarations, c = o.length === 1 && o[0].initializer ? sQe(o[0].initializer) : void 0; + return c ? { commentOwner: e, parameters: c.parameters, hasReturn: TL(c, t) } : { commentOwner: e }; + } + case 307: + return "quit"; + case 267: + return e.parent.kind === 267 ? void 0 : { commentOwner: e }; + case 244: + return wue(e.expression, t); + case 226: { + const s = e; + return Sc(s) === 0 ? "quit" : vs(s.right) ? { commentOwner: e, parameters: s.right.parameters, hasReturn: TL(s.right, t) } : { commentOwner: e }; + } + case 172: + const i = e.initializer; + if (i && (po(i) || bo(i))) + return { commentOwner: e, parameters: i.parameters, hasReturn: TL(i, t) }; + } + } + function TL(e, t) { + return !!t?.generateReturnInDocTemplate && (ng(e) || bo(e) && ct(e.body) || Ka(e) && e.body && ks(e.body) && !!Hy(e.body, (n) => n)); + } + function sQe(e) { + for (; e.kind === 217; ) + e = e.expression; + switch (e.kind) { + case 218: + case 219: + return e; + case 231: + return Pn(e.members, Go); + } + } + var LH = {}; + Ec(LH, { + mapCode: () => aQe + }); + function aQe(e, t, n, i, s, o) { + return sn.ChangeTracker.with( + { host: i, formatContext: s, preferences: o }, + (c) => { + const _ = t.map((m) => oQe(e, m)), u = n && Dp(n); + for (const m of _) + cQe( + e, + c, + m, + u + ); + } + ); + } + function oQe(e, t) { + const n = [ + { + parse: () => Zx( + "__mapcode_content_nodes.ts", + t, + e.languageVersion, + /*setParentNodes*/ + !0, + e.scriptKind + ), + body: (o) => o.statements + }, + { + parse: () => Zx( + "__mapcode_class_content_nodes.ts", + `class __class { +${t} +}`, + e.languageVersion, + /*setParentNodes*/ + !0, + e.scriptKind + ), + body: (o) => o.statements[0].members + } + ], i = []; + for (const { parse: o, body: c } of n) { + const _ = o(), u = c(_); + if (u.length && _.parseDiagnostics.length === 0) + return u; + u.length && i.push({ sourceFile: _, body: u }); + } + i.sort( + (o, c) => o.sourceFile.parseDiagnostics.length - c.sourceFile.parseDiagnostics.length + ); + const { body: s } = i[0]; + return s; + } + function cQe(e, t, n, i) { + sl(n[0]) || kb(n[0]) ? lQe( + e, + t, + n, + i + ) : uQe( + e, + t, + n, + i + ); + } + function lQe(e, t, n, i) { + let s; + if (!i || !i.length ? s = Pn(e.statements, U_(Zn, Yl)) : s = lr(i, (c) => ur( + Si(e, c.start), + U_(Zn, Yl) + )), !s) + return; + const o = s.members.find((c) => n.some((_) => xL(_, c))); + if (o) { + const c = gb( + s.members, + (_) => n.some((u) => xL(u, _)) + ); + lr(n, MH), t.replaceNodeRangeWithNodes( + e, + o, + c, + n + ); + return; + } + lr(n, MH), t.insertNodesAfter( + e, + s.members[s.members.length - 1], + n + ); + } + function uQe(e, t, n, i) { + if (!i?.length) { + t.insertNodesAtEndOfFile( + e, + n, + /*blankLineBetween*/ + !1 + ); + return; + } + for (const o of i) { + const c = ur( + Si(e, o.start), + (_) => U_(ks, Ei)(_) && at(_.statements, (u) => n.some((m) => xL(m, u))) + ); + if (c) { + const _ = c.statements.find((u) => n.some((m) => xL(m, u))); + if (_) { + const u = gb(c.statements, (m) => n.some((g) => xL(g, m))); + lr(n, MH), t.replaceNodeRangeWithNodes( + e, + _, + u, + n + ); + return; + } + } + } + let s = e.statements; + for (const o of i) { + const c = ur( + Si(e, o.start), + ks + ); + if (c) { + s = c.statements; + break; + } + } + lr(n, MH), t.insertNodesAfter( + e, + s[s.length - 1], + n + ); + } + function xL(e, t) { + var n, i, s, o, c, _; + return e.kind !== t.kind ? !1 : e.kind === 176 ? e.kind === t.kind : Hl(e) && Hl(t) ? e.name.getText() === t.name.getText() : dv(e) && dv(t) || KJ(e) && KJ(t) ? e.expression.getText() === t.expression.getText() : mv(e) && mv(t) ? ((n = e.initializer) == null ? void 0 : n.getText()) === ((i = t.initializer) == null ? void 0 : i.getText()) && ((s = e.incrementor) == null ? void 0 : s.getText()) === ((o = t.incrementor) == null ? void 0 : o.getText()) && ((c = e.condition) == null ? void 0 : c.getText()) === ((_ = t.condition) == null ? void 0 : _.getText()) : _S(e) && _S(t) ? e.expression.getText() === t.expression.getText() && e.initializer.getText() === t.initializer.getText() : i1(e) && i1(t) ? e.label.getText() === t.label.getText() : e.getText() === t.getText(); + } + function MH(e) { + lDe(e), e.parent = void 0; + } + function lDe(e) { + e.pos = -1, e.end = -1, e.forEachChild(lDe); + } + var Mv = {}; + Ec(Mv, { + compareImportsOrRequireStatements: () => Mue, + compareModuleSpecifiers: () => PQe, + getImportDeclarationInsertionIndex: () => CQe, + getImportSpecifierInsertionIndex: () => EQe, + getNamedImportSpecifierComparerWithDetection: () => kQe, + getOrganizeImportsStringComparerWithDetection: () => xQe, + organizeImports: () => _Qe, + testCoalesceExports: () => wQe, + testCoalesceImports: () => DQe + }); + function _Qe(e, t, n, i, s, o) { + const c = sn.ChangeTracker.fromContext({ host: n, formatContext: t, preferences: s }), _ = o === "SortAndCombine" || o === "All", u = _, m = o === "RemoveUnused" || o === "All", g = e.statements.filter(zo), h = Nue(e, g), { comparersToTest: S, typeOrdersToTest: T } = Pue(s), C = S[0], D = { + moduleSpecifierComparer: typeof s.organizeImportsIgnoreCase == "boolean" ? C : void 0, + namedImportComparer: typeof s.organizeImportsIgnoreCase == "boolean" ? C : void 0, + typeOrder: s.organizeImportsTypeOrder + }; + if (typeof s.organizeImportsIgnoreCase != "boolean" && ({ comparer: D.moduleSpecifierComparer } = fDe(h, S)), !D.typeOrder || typeof s.organizeImportsIgnoreCase != "boolean") { + const F = Oue(g, S, T); + if (F) { + const { namedImportComparer: R, typeOrder: W } = F; + D.namedImportComparer = D.namedImportComparer ?? R, D.typeOrder = D.typeOrder ?? W; + } + } + h.forEach((F) => A(F, D)), o !== "RemoveUnused" && pQe(e).forEach((F) => O(F, D.namedImportComparer)); + for (const F of e.statements.filter(Ou)) { + if (!F.body) continue; + if (Nue(e, F.body.statements.filter(zo)).forEach((W) => A(W, D)), o !== "RemoveUnused") { + const W = F.body.statements.filter(wc); + O(W, D.namedImportComparer); + } + } + return c.getChanges(); + function w(F, R) { + if (Ir(F) === 0) + return; + on( + F[0], + 1024 + /* NoLeadingComments */ + ); + const W = u ? oC(F, (U) => kL(U.moduleSpecifier)) : [F], V = _ ? W_(W, (U, _e) => Iue(U[0].moduleSpecifier, _e[0].moduleSpecifier, D.moduleSpecifierComparer ?? C)) : W, $ = na(V, (U) => kL(U[0].moduleSpecifier) || U[0].moduleSpecifier === void 0 ? R(U) : U); + if ($.length === 0) + c.deleteNodes( + e, + F, + { + leadingTriviaOption: sn.LeadingTriviaOption.Exclude, + trailingTriviaOption: sn.TrailingTriviaOption.Include + }, + /*hasTrailingComment*/ + !0 + ); + else { + const U = { + leadingTriviaOption: sn.LeadingTriviaOption.Exclude, + // Leave header comment in place + trailingTriviaOption: sn.TrailingTriviaOption.Include, + suffix: Jh(n, t.options) + }; + c.replaceNodeWithNodes(e, F[0], $, U); + const _e = c.nodeHasTrailingComment(e, F[0], U); + c.deleteNodes(e, F.slice(1), { + trailingTriviaOption: sn.TrailingTriviaOption.Include + }, _e); + } + } + function A(F, R) { + const W = R.moduleSpecifierComparer ?? C, V = R.namedImportComparer ?? C, $ = R.typeOrder ?? "last", U = n8({ organizeImportsTypeOrder: $ }, V); + w(F, (Z) => (m && (Z = dQe(Z, e, i)), u && (Z = uDe(Z, W, U, e)), _ && (Z = W_(Z, (J, re) => Mue(J, re, W))), Z)); + } + function O(F, R) { + const W = n8(s, R); + w(F, (V) => _De(V, W)); + } + } + function Pue(e) { + return { + comparersToTest: typeof e.organizeImportsIgnoreCase == "boolean" ? [Lue(e, e.organizeImportsIgnoreCase)] : [Lue( + e, + /*ignoreCase*/ + !0 + ), Lue( + e, + /*ignoreCase*/ + !1 + )], + typeOrdersToTest: e.organizeImportsTypeOrder ? [e.organizeImportsTypeOrder] : ["last", "inline", "first"] + }; + } + function Nue(e, t) { + const n = Og( + e.languageVersion, + /*skipTrivia*/ + !1, + e.languageVariant + ), i = []; + let s = 0; + for (const o of t) + i[s] && fQe(e, o, n) && s++, i[s] || (i[s] = []), i[s].push(o); + return i; + } + function fQe(e, t, n) { + const i = t.getFullStart(), s = t.getStart(); + n.setText(e.text, i, s - i); + let o = 0; + for (; n.getTokenStart() < s; ) + if (n.scan() === 4 && (o++, o >= 2)) + return !0; + return !1; + } + function pQe(e) { + const t = [], n = e.statements, i = Ir(n); + let s = 0, o = 0; + for (; s < i; ) + if (wc(n[s])) { + t[o] === void 0 && (t[o] = []); + const c = n[s]; + if (c.moduleSpecifier) + t[o].push(c), s++; + else { + for (; s < i && wc(n[s]); ) + t[o].push(n[s++]); + o++; + } + } else + s++; + return na(t, (c) => Nue(e, c)); + } + function dQe(e, t, n) { + const i = n.getTypeChecker(), s = n.getCompilerOptions(), o = i.getJsxNamespace(t), c = i.getJsxFragmentFactory(t), _ = !!(t.transformFlags & 2), u = []; + for (const g of e) { + const { importClause: h, moduleSpecifier: S } = g; + if (!h) { + u.push(g); + continue; + } + let { name: T, namedBindings: C } = h; + if (T && !m(T) && (T = void 0), C) + if (Yg(C)) + m(C.name) || (C = void 0); + else { + const D = C.elements.filter((w) => m(w.name)); + D.length < C.elements.length && (C = D.length ? N.updateNamedImports(C, D) : void 0); + } + T || C ? u.push(r8(g, T, C)) : hQe(t, S) && (t.isDeclarationFile ? u.push(N.createImportDeclaration( + g.modifiers, + /*importClause*/ + void 0, + S, + /*attributes*/ + void 0 + )) : u.push(g)); + } + return u; + function m(g) { + return _ && (g.text === o || c && g.text === c) && eq(s.jsx) || So.Core.isSymbolReferencedInFile(g, i, t); + } + } + function kL(e) { + return e !== void 0 && Na(e) ? e.text : void 0; + } + function mQe(e) { + let t; + const n = { defaultImports: [], namespaceImports: [], namedImports: [] }, i = { defaultImports: [], namespaceImports: [], namedImports: [] }; + for (const s of e) { + if (s.importClause === void 0) { + t = t || s; + continue; + } + const o = s.importClause.isTypeOnly ? n : i, { name: c, namedBindings: _ } = s.importClause; + c && o.defaultImports.push(s), _ && (Yg(_) ? o.namespaceImports.push(s) : o.namedImports.push(s)); + } + return { + importWithoutClause: t, + typeOnlyImports: n, + regularImports: i + }; + } + function uDe(e, t, n, i) { + if (e.length === 0) + return e; + const s = CR(e, (c) => { + if (c.attributes) { + let _ = c.attributes.token + " "; + for (const u of W_(c.attributes.elements, (m, g) => cu(m.name.text, g.name.text))) + _ += u.name.text + ":", _ += Na(u.value) ? `"${u.value.text}"` : u.value.getText() + " "; + return _; + } + return ""; + }), o = []; + for (const c in s) { + const _ = s[c], { importWithoutClause: u, typeOnlyImports: m, regularImports: g } = mQe(_); + u && o.push(u); + for (const h of [g, m]) { + const S = h === m, { defaultImports: T, namespaceImports: C, namedImports: D } = h; + if (!S && T.length === 1 && C.length === 1 && D.length === 0) { + const U = T[0]; + o.push( + r8(U, U.importClause.name, C[0].importClause.namedBindings) + ); + continue; + } + const w = W_(C, (U, _e) => t(U.importClause.namedBindings.name.text, _e.importClause.namedBindings.name.text)); + for (const U of w) + o.push( + r8( + U, + /*name*/ + void 0, + U.importClause.namedBindings + ) + ); + const A = Uc(T), O = Uc(D), F = A ?? O; + if (!F) + continue; + let R; + const W = []; + if (T.length === 1) + R = T[0].importClause.name; + else + for (const U of T) + W.push( + N.createImportSpecifier( + /*isTypeOnly*/ + !1, + N.createIdentifier("default"), + U.importClause.name + ) + ); + W.push(...yQe(D)); + const V = N.createNodeArray( + W_(W, n), + O?.importClause.namedBindings.elements.hasTrailingComma + ), $ = V.length === 0 ? R ? void 0 : N.createNamedImports(He) : O ? N.updateNamedImports(O.importClause.namedBindings, V) : N.createNamedImports(V); + i && $ && O?.importClause.namedBindings && !CS(O.importClause.namedBindings, i) && on( + $, + 2 + /* MultiLine */ + ), S && R && $ ? (o.push( + r8( + F, + R, + /*namedBindings*/ + void 0 + ) + ), o.push( + r8( + O ?? F, + /*name*/ + void 0, + $ + ) + )) : o.push( + r8(F, R, $) + ); + } + } + return o; + } + function _De(e, t) { + if (e.length === 0) + return e; + const { exportWithoutClause: n, namedExports: i, typeOnlyExports: s } = c(e), o = []; + n && o.push(n); + for (const _ of [i, s]) { + if (_.length === 0) + continue; + const u = []; + u.push(...na(_, (h) => h.exportClause && up(h.exportClause) ? h.exportClause.elements : He)); + const m = W_(u, t), g = _[0]; + o.push( + N.updateExportDeclaration( + g, + g.modifiers, + g.isTypeOnly, + g.exportClause && (up(g.exportClause) ? N.updateNamedExports(g.exportClause, m) : N.updateNamespaceExport(g.exportClause, g.exportClause.name)), + g.moduleSpecifier, + g.attributes + ) + ); + } + return o; + function c(_) { + let u; + const m = [], g = []; + for (const h of _) + h.exportClause === void 0 ? u = u || h : h.isTypeOnly ? g.push(h) : m.push(h); + return { + exportWithoutClause: u, + namedExports: m, + typeOnlyExports: g + }; + } + } + function r8(e, t, n) { + return N.updateImportDeclaration( + e, + e.modifiers, + N.updateImportClause(e.importClause, e.importClause.isTypeOnly, t, n), + // TODO: GH#18217 + e.moduleSpecifier, + e.attributes + ); + } + function Aue(e, t, n, i) { + switch (i?.organizeImportsTypeOrder) { + case "first": + return $1(t.isTypeOnly, e.isTypeOnly) || n(e.name.text, t.name.text); + case "inline": + return n(e.name.text, t.name.text); + default: + return $1(e.isTypeOnly, t.isTypeOnly) || n(e.name.text, t.name.text); + } + } + function Iue(e, t, n) { + const i = e === void 0 ? void 0 : kL(e), s = t === void 0 ? void 0 : kL(t); + return $1(i === void 0, s === void 0) || $1(vl(i), vl(s)) || n(i, s); + } + function gQe(e) { + return e.map((t) => kL(Fue(t)) || ""); + } + function Fue(e) { + var t; + switch (e.kind) { + case 271: + return (t = jn(e.moduleReference, Mh)) == null ? void 0 : t.expression; + case 272: + return e.moduleSpecifier; + case 243: + return e.declarationList.declarations[0].initializer.arguments[0]; + } + } + function hQe(e, t) { + const n = ea(t) && t.text; + return rs(n) && at(e.moduleAugmentations, (i) => ea(i) && i.text === n); + } + function yQe(e) { + return na(e, (t) => gr(vQe(t), (n) => n.name && n.propertyName && wb(n.name) === wb(n.propertyName) ? N.updateImportSpecifier( + n, + n.isTypeOnly, + /*propertyName*/ + void 0, + n.name + ) : n)); + } + function vQe(e) { + var t; + return (t = e.importClause) != null && t.namedBindings && mm(e.importClause.namedBindings) ? e.importClause.namedBindings.elements : void 0; + } + function fDe(e, t) { + const n = []; + return e.forEach((i) => { + n.push(gQe(i)); + }), dDe(n, t); + } + function Oue(e, t, n) { + let i = !1; + const s = e.filter((u) => { + var m, g; + const h = (g = jn((m = u.importClause) == null ? void 0 : m.namedBindings, mm)) == null ? void 0 : g.elements; + return h?.length ? (!i && h.some((S) => S.isTypeOnly) && h.some((S) => !S.isTypeOnly) && (i = !0), !0) : !1; + }); + if (s.length === 0) return; + const o = s.map((u) => { + var m, g; + return (g = jn((m = u.importClause) == null ? void 0 : m.namedBindings, mm)) == null ? void 0 : g.elements; + }).filter((u) => u !== void 0); + if (!i || n.length === 0) { + const u = dDe(o.map((m) => m.map((g) => g.name.text)), t); + return { + namedImportComparer: u.comparer, + typeOrder: n.length === 1 ? n[0] : void 0, + isSorted: u.isSorted + }; + } + const c = { first: 1 / 0, last: 1 / 0, inline: 1 / 0 }, _ = { first: t[0], last: t[0], inline: t[0] }; + for (const u of t) { + const m = { first: 0, last: 0, inline: 0 }; + for (const g of o) + for (const h of n) + m[h] = (m[h] ?? 0) + pDe(g, (S, T) => Aue(S, T, u, { organizeImportsTypeOrder: h })); + for (const g of n) { + const h = g; + m[h] < c[h] && (c[h] = m[h], _[h] = u); + } + } + e: for (const u of n) { + const m = u; + for (const g of n) + if (c[g] < c[m]) continue e; + return { namedImportComparer: _[m], typeOrder: m, isSorted: c[m] === 0 }; + } + return { namedImportComparer: _.last, typeOrder: "last", isSorted: c.last === 0 }; + } + function pDe(e, t) { + let n = 0; + for (let i = 0; i < e.length - 1; i++) + t(e[i], e[i + 1]) > 0 && n++; + return n; + } + function dDe(e, t) { + let n, i = 1 / 0; + for (const s of t) { + let o = 0; + for (const c of e) { + if (c.length <= 1) continue; + const _ = pDe(c, s); + o += _; + } + o < i && (i = o, n = s); + } + return { + comparer: n ?? t[0], + isSorted: i === 0 + }; + } + function bQe(e, t) { + return uo(mDe(e), mDe(t)); + } + function mDe(e) { + var t; + switch (e.kind) { + case 272: + return e.importClause ? e.importClause.isTypeOnly ? 1 : ((t = e.importClause.namedBindings) == null ? void 0 : t.kind) === 274 ? 2 : e.importClause.name ? 3 : 4 : 0; + case 271: + return 5; + case 243: + return 6; + } + } + function CL(e) { + return e ? $X : cu; + } + function SQe(e, t) { + const n = TQe(t), i = t.organizeImportsCaseFirst ?? !1, s = t.organizeImportsNumericCollation ?? !1, o = t.organizeImportsAccentCollation ?? !0, c = e ? o ? "accent" : "base" : o ? "variant" : "case"; + return new Intl.Collator(n, { + usage: "sort", + caseFirst: i || "false", + sensitivity: c, + numeric: s + }).compare; + } + function TQe(e) { + let t = e.organizeImportsLocale; + t === "auto" && (t = XX()), t === void 0 && (t = "en"); + const n = Intl.Collator.supportedLocalesOf(t); + return n.length ? n[0] : "en"; + } + function Lue(e, t) { + return (e.organizeImportsCollation ?? "ordinal") === "unicode" ? SQe(t, e) : CL(t); + } + function xQe(e, t) { + return fDe([e], Pue(t).comparersToTest); + } + function n8(e, t) { + const n = t ?? CL(!!e.organizeImportsIgnoreCase); + return (i, s) => Aue(i, s, n, e); + } + function kQe(e, t, n) { + const { comparersToTest: i, typeOrdersToTest: s } = Pue(t), o = Oue([e], i, s); + let c = n8(t, i[0]), _; + if (typeof t.organizeImportsIgnoreCase != "boolean" || !t.organizeImportsTypeOrder) { + if (o) { + const { namedImportComparer: u, typeOrder: m, isSorted: g } = o; + _ = g, c = n8({ organizeImportsTypeOrder: m }, u); + } else if (n) { + const u = Oue(n.statements.filter(zo), i, s); + if (u) { + const { namedImportComparer: m, typeOrder: g, isSorted: h } = u; + _ = h, c = n8({ organizeImportsTypeOrder: g }, m); + } + } + } + return { specifierComparer: c, isSorted: _ }; + } + function CQe(e, t, n) { + const i = Cy(e, t, lo, (s, o) => Mue(s, o, n)); + return i < 0 ? ~i : i; + } + function EQe(e, t, n) { + const i = Cy(e, t, lo, n); + return i < 0 ? ~i : i; + } + function Mue(e, t, n) { + return Iue(Fue(e), Fue(t), n) || bQe(e, t); + } + function DQe(e, t, n, i) { + const s = CL(t), o = n8({ organizeImportsTypeOrder: i?.organizeImportsTypeOrder }, s); + return uDe(e, s, o, n); + } + function wQe(e, t, n) { + return _De(e, (s, o) => Aue(s, o, CL(t), { organizeImportsTypeOrder: n?.organizeImportsTypeOrder ?? "last" })); + } + function PQe(e, t, n) { + const i = CL(!!n); + return Iue(e, t, i); + } + var RH = {}; + Ec(RH, { + collectElements: () => NQe + }); + function NQe(e, t) { + const n = []; + return AQe(e, t, n), IQe(e, n), n.sort((i, s) => i.textSpan.start - s.textSpan.start), n; + } + function AQe(e, t, n) { + let i = 40, s = 0; + const o = [...e.statements, e.endOfFileToken], c = o.length; + for (; s < c; ) { + for (; s < c && !ux(o[s]); ) + _(o[s]), s++; + if (s === c) break; + const u = s; + for (; s < c && ux(o[s]); ) + _(o[s]), s++; + const m = s - 1; + m !== u && n.push(EL( + Xa(o[u], 102, e).getStart(e), + o[m].getEnd(), + "imports" + /* Imports */ + )); + } + function _(u) { + var m; + if (i === 0) return; + t.throwIfCancellationRequested(), (bl(u) || pc(u) || Rp(u) || tm(u) || u.kind === 1) && hDe(u, e, t, n), vs(u) && fn(u.parent) && Tn(u.parent.left) && hDe(u.parent.left, e, t, n), (ks(u) || dm(u)) && Rue(u.statements.end, e, t, n), (Zn(u) || Yl(u)) && Rue(u.members.end, e, t, n); + const g = OQe(u, e); + g && n.push(g), i--, Fs(u) ? (i++, _(u.expression), i--, u.arguments.forEach(_), (m = u.typeArguments) == null || m.forEach(_)) : dv(u) && u.elseStatement && dv(u.elseStatement) ? (_(u.expression), _(u.thenStatement), i++, _(u.elseStatement), i--) : u.forEachChild(_), i++; + } + } + function IQe(e, t) { + const n = [], i = e.getLineStarts(); + for (const s of i) { + const o = e.getLineEndOfPosition(s), c = e.text.substring(s, o), _ = gDe(c); + if (!(!_ || J0(e, s))) + if (_.isStart) { + const u = bc(e.text.indexOf("//", s), o); + n.push(Tk( + u, + "region", + u, + /*autoCollapse*/ + !1, + _.name || "#region" + )); + } else { + const u = n.pop(); + u && (u.textSpan.length = o - u.textSpan.start, u.hintSpan.length = o - u.textSpan.start, t.push(u)); + } + } + } + var FQe = /^#(end)?region(.*)\r?$/; + function gDe(e) { + if (e = e.trimStart(), !Vi(e, "//")) + return null; + e = e.slice(2).trim(); + const t = FQe.exec(e); + if (t) + return { isStart: !t[1], name: t[2].trim() }; + } + function Rue(e, t, n, i) { + const s = Fg(t.text, e); + if (!s) return; + let o = -1, c = -1, _ = 0; + const u = t.getFullText(); + for (const { kind: g, pos: h, end: S } of s) + switch (n.throwIfCancellationRequested(), g) { + case 2: + const T = u.slice(h, S); + if (gDe(T)) { + m(), _ = 0; + break; + } + _ === 0 && (o = h), c = S, _++; + break; + case 3: + m(), i.push(EL( + h, + S, + "comment" + /* Comment */ + )), _ = 0; + break; + default: + E.assertNever(g); + } + m(); + function m() { + _ > 1 && i.push(EL( + o, + c, + "comment" + /* Comment */ + )); + } + } + function hDe(e, t, n, i) { + Mx(e) || Rue(e.pos, t, n, i); + } + function EL(e, t, n) { + return Tk(bc(e, t), n); + } + function OQe(e, t) { + switch (e.kind) { + case 241: + if (vs(e.parent)) + return LQe(e.parent, e, t); + switch (e.parent.kind) { + case 246: + case 249: + case 250: + case 248: + case 245: + case 247: + case 254: + case 299: + return g(e.parent); + case 258: + const T = e.parent; + if (T.tryBlock === e) + return g(e.parent); + if (T.finallyBlock === e) { + const C = Xa(T, 98, t); + if (C) return g(C); + } + // falls through + default: + return Tk( + e_(e, t), + "code" + /* Code */ + ); + } + case 268: + return g(e.parent); + case 263: + case 231: + case 264: + case 266: + case 269: + case 187: + case 206: + return g(e); + case 189: + return g( + e, + /*autoCollapse*/ + !1, + /*useFullStart*/ + !Wx(e.parent), + 23 + /* OpenBracketToken */ + ); + case 296: + case 297: + return h(e.statements); + case 210: + return m(e); + case 209: + return m( + e, + 23 + /* OpenBracketToken */ + ); + case 284: + return o(e); + case 288: + return c(e); + case 285: + case 286: + return _(e.attributes); + case 228: + case 15: + return u(e); + case 207: + return g( + e, + /*autoCollapse*/ + !1, + /*useFullStart*/ + !ma(e.parent), + 23 + /* OpenBracketToken */ + ); + case 219: + return s(e); + case 213: + return i(e); + case 217: + return S(e); + case 275: + case 279: + case 300: + return n(e); + } + function n(T) { + if (!T.elements.length) + return; + const C = Xa(T, 19, t), D = Xa(T, 20, t); + if (!(!C || !D || ip(C.pos, D.pos, t))) + return jH( + C, + D, + T, + t, + /*autoCollapse*/ + !1, + /*useFullStart*/ + !1 + ); + } + function i(T) { + if (!T.arguments.length) + return; + const C = Xa(T, 21, t), D = Xa(T, 22, t); + if (!(!C || !D || ip(C.pos, D.pos, t))) + return jH( + C, + D, + T, + t, + /*autoCollapse*/ + !1, + /*useFullStart*/ + !0 + ); + } + function s(T) { + if (ks(T.body) || Yu(T.body) || ip(T.body.getFullStart(), T.body.getEnd(), t)) + return; + const C = bc(T.body.getFullStart(), T.body.getEnd()); + return Tk(C, "code", e_(T)); + } + function o(T) { + const C = bc(T.openingElement.getStart(t), T.closingElement.getEnd()), D = T.openingElement.tagName.getText(t), w = "<" + D + ">..."; + return Tk( + C, + "code", + C, + /*autoCollapse*/ + !1, + w + ); + } + function c(T) { + const C = bc(T.openingFragment.getStart(t), T.closingFragment.getEnd()); + return Tk( + C, + "code", + C, + /*autoCollapse*/ + !1, + "<>..." + ); + } + function _(T) { + if (T.properties.length !== 0) + return EL( + T.getStart(t), + T.getEnd(), + "code" + /* Code */ + ); + } + function u(T) { + if (!(T.kind === 15 && T.text.length === 0)) + return EL( + T.getStart(t), + T.getEnd(), + "code" + /* Code */ + ); + } + function m(T, C = 19) { + return g( + T, + /*autoCollapse*/ + !1, + /*useFullStart*/ + !Ql(T.parent) && !Fs(T.parent), + C + ); + } + function g(T, C = !1, D = !0, w = 19, A = w === 19 ? 20 : 24) { + const O = Xa(e, w, t), F = Xa(e, A, t); + return O && F && jH(O, F, T, t, C, D); + } + function h(T) { + return T.length ? Tk( + W0(T), + "code" + /* Code */ + ) : void 0; + } + function S(T) { + if (ip(T.getStart(), T.getEnd(), t)) return; + const C = bc(T.getStart(), T.getEnd()); + return Tk(C, "code", e_(T)); + } + } + function LQe(e, t, n) { + const i = MQe(e, t, n), s = Xa(t, 20, n); + return i && s && jH( + i, + s, + e, + n, + /*autoCollapse*/ + e.kind !== 219 + /* ArrowFunction */ + ); + } + function jH(e, t, n, i, s = !1, o = !0) { + const c = bc(o ? e.getFullStart() : e.getStart(i), t.getEnd()); + return Tk(c, "code", e_(n, i), s); + } + function Tk(e, t, n = e, i = !1, s = "...") { + return { textSpan: e, kind: t, hintSpan: n, bannerText: s, autoCollapse: i }; + } + function MQe(e, t, n) { + if (YK(e.parameters, n)) { + const i = Xa(e, 21, n); + if (i) + return i; + } + return Xa(t, 19, n); + } + var DL = {}; + Ec(DL, { + getRenameInfo: () => RQe, + nodeIsEligibleForRename: () => vDe + }); + function RQe(e, t, n, i) { + const s = p9(h_(t, n)); + if (vDe(s)) { + const o = jQe(s, e.getTypeChecker(), t, e, i); + if (o) + return o; + } + return BH(p.You_cannot_rename_this_element); + } + function jQe(e, t, n, i, s) { + const o = t.getSymbolAtLocation(e); + if (!o) { + if (Na(e)) { + const S = f9(e, t); + if (S && (S.flags & 128 || S.flags & 1048576 && Ri(S.types, (T) => !!(T.flags & 128)))) + return jue(e.text, e.text, "string", "", e, n); + } else if (sV(e)) { + const S = qo(e); + return jue(S, S, "label", "", e, n); + } + return; + } + const { declarations: c } = o; + if (!c || c.length === 0) return; + if (c.some((S) => BQe(i, S))) + return BH(p.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library); + if (Me(e) && e.escapedText === "default" && o.parent && o.parent.flags & 1536) + return; + if (Na(e) && b3(e)) + return s.allowRenameOfImportPath ? zQe(e, n, o) : void 0; + const _ = JQe(n, o, t, s); + if (_) + return BH(_); + const u = q0.getSymbolKind(t, o, e), m = cae(e) || wf(e) && e.parent.kind === 167 ? Op(rp(e)) : void 0, g = m || t.symbolToString(o), h = m || t.getFullyQualifiedName(o); + return jue(g, h, u, q0.getSymbolModifiers(t, o), e, n); + } + function BQe(e, t) { + const n = t.getSourceFile(); + return e.isSourceFileDefaultLibrary(n) && Bo( + n.fileName, + ".d.ts" + /* Dts */ + ); + } + function JQe(e, t, n, i) { + if (!i.providePrefixAndSuffixTextForRename && t.flags & 2097152) { + const c = t.declarations && Pn(t.declarations, (_) => ju(_)); + c && !c.propertyName && (t = n.getAliasedSymbol(t)); + } + const { declarations: s } = t; + if (!s) + return; + const o = yDe(e.path); + if (o === void 0) + return at(s, (c) => AA(c.getSourceFile().path)) ? p.You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder : void 0; + for (const c of s) { + const _ = yDe(c.getSourceFile().path); + if (_) { + const u = Math.min(o.length, _.length); + for (let m = 0; m <= u; m++) + if (cu(o[m], _[m]) !== 0) + return p.You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder; + } + } + } + function yDe(e) { + const t = Ul(e), n = t.lastIndexOf("node_modules"); + if (n !== -1) + return t.slice(0, n + 2); + } + function zQe(e, t, n) { + if (!vl(e.text)) + return BH(p.You_cannot_rename_a_module_via_a_global_import); + const i = n.declarations && Pn(n.declarations, Ei); + if (!i) return; + const s = Eo(e.text, "/index") || Eo(e.text, "/index.js") ? void 0 : ZX($u(i.fileName), "/index"), o = s === void 0 ? i.fileName : s, c = s === void 0 ? "module" : "directory", _ = e.text.lastIndexOf("/") + 1, u = ql(e.getStart(t) + 1 + _, e.text.length - _); + return { + canRename: !0, + fileToRename: o, + kind: c, + displayName: o, + fullDisplayName: e.text, + kindModifiers: "", + triggerSpan: u + }; + } + function jue(e, t, n, i, s, o) { + return { + canRename: !0, + fileToRename: void 0, + kind: n, + displayName: e, + fullDisplayName: t, + kindModifiers: i, + triggerSpan: WQe(s, o) + }; + } + function BH(e) { + return { canRename: !1, localizedErrorMessage: us(e) }; + } + function WQe(e, t) { + let n = e.getStart(t), i = e.getWidth(t); + return Na(e) && (n += 1, i -= 2), ql(n, i); + } + function vDe(e) { + switch (e.kind) { + case 80: + case 81: + case 11: + case 15: + case 110: + return !0; + case 9: + return c9(e); + default: + return !1; + } + } + var i8 = {}; + Ec(i8, { + getArgumentInfoForCompletions: () => GQe, + getSignatureHelpItems: () => UQe + }); + function UQe(e, t, n, i, s) { + const o = e.getTypeChecker(), c = sw(t, n); + if (!c) + return; + const _ = !!i && i.kind === "characterTyped"; + if (_ && (lk(t, n, c) || J0(t, n))) + return; + const u = !!i && i.kind === "invoked", m = aYe(c, n, t, o, u); + if (!m) return; + s.throwIfCancellationRequested(); + const g = VQe(m, o, t, c, _); + return s.throwIfCancellationRequested(), g ? o.runWithCancellationToken(s, (h) => g.kind === 0 ? DDe(g.candidates, g.resolvedSignature, m, t, h) : cYe(g.symbol, m, t, h)) : Gu(t) ? HQe(m, e, s) : void 0; + } + function VQe({ invocation: e, argumentCount: t }, n, i, s, o) { + switch (e.kind) { + case 0: { + if (o && !qQe(s, e.node, i)) + return; + const c = [], _ = n.getResolvedSignatureForSignatureHelp(e.node, c, t); + return c.length === 0 ? void 0 : { kind: 0, candidates: c, resolvedSignature: _ }; + } + case 1: { + const { called: c } = e; + if (o && !bDe(s, i, Me(c) ? c.parent : c)) + return; + const _ = mV(c, t, n); + if (_.length !== 0) return { kind: 0, candidates: _, resolvedSignature: ya(_) }; + const u = n.getSymbolAtLocation(c); + return u && { kind: 1, symbol: u }; + } + case 2: + return { kind: 0, candidates: [e.signature], resolvedSignature: e.signature }; + default: + return E.assertNever(e); + } + } + function qQe(e, t, n) { + if (!tm(t)) return !1; + const i = t.getChildren(n); + switch (e.kind) { + case 21: + return as(i, e); + case 28: { + const s = _9(e); + return !!s && as(i, s); + } + case 30: + return bDe(e, n, t.expression); + default: + return !1; + } + } + function HQe(e, t, n) { + if (e.invocation.kind === 2) return; + const i = CDe(e.invocation), s = Tn(i) ? i.name.text : void 0, o = t.getTypeChecker(); + return s === void 0 ? void 0 : Dc(t.getSourceFiles(), (c) => Dc(c.getNamedDeclarations().get(s), (_) => { + const u = _.symbol && o.getTypeOfSymbolAtLocation(_.symbol, _), m = u && u.getCallSignatures(); + if (m && m.length) + return o.runWithCancellationToken( + n, + (g) => DDe( + m, + m[0], + e, + c, + g, + /*useFullPrefix*/ + !0 + ) + ); + })); + } + function bDe(e, t, n) { + const i = e.getFullStart(); + let s = e.parent; + for (; s; ) { + const o = tl( + i, + t, + s, + /*excludeJsdoc*/ + !0 + ); + if (o) + return p_(n, o); + s = s.parent; + } + return E.fail("Could not find preceding token"); + } + function GQe(e, t, n, i) { + const s = TDe(e, t, n, i); + return !s || s.isTypeParameterList || s.invocation.kind !== 0 ? void 0 : { invocation: s.invocation.node, argumentCount: s.argumentCount, argumentIndex: s.argumentIndex }; + } + function SDe(e, t, n, i) { + const s = $Qe(e, n, i); + if (!s) return; + const { list: o, argumentIndex: c } = s, _ = rYe(i, o), u = iYe(o, n); + return { list: o, argumentIndex: c, argumentCount: _, argumentsSpan: u }; + } + function $Qe(e, t, n) { + if (e.kind === 30 || e.kind === 21) + return { list: oYe(e.parent, e, t), argumentIndex: 0 }; + { + const i = _9(e); + return i && { list: i, argumentIndex: tYe(n, i, e) }; + } + } + function TDe(e, t, n, i) { + const { parent: s } = e; + if (tm(s)) { + const o = s, c = SDe(e, t, n, i); + if (!c) return; + const { list: _, argumentIndex: u, argumentCount: m, argumentsSpan: g } = c; + return { isTypeParameterList: !!s.typeArguments && s.typeArguments.pos === _.pos, invocation: { kind: 0, node: o }, argumentsSpan: g, argumentIndex: u, argumentCount: m }; + } else { + if (NS(e) && fv(s)) + return bA(e, t, n) ? Jue( + s, + /*argumentIndex*/ + 0, + n + ) : void 0; + if (Rx(e) && s.parent.kind === 215) { + const o = s, c = o.parent; + E.assert( + o.kind === 228 + /* TemplateExpression */ + ); + const _ = bA(e, t, n) ? 0 : 1; + return Jue(c, _, n); + } else if (r6(s) && fv(s.parent.parent)) { + const o = s, c = s.parent.parent; + if (cF(e) && !bA(e, t, n)) + return; + const _ = o.parent.templateSpans.indexOf(o), u = nYe(_, e, t, n); + return Jue(c, u, n); + } else if (bu(s)) { + const o = s.attributes.pos, c = aa( + n.text, + s.attributes.end, + /*stopAfterLineBreak*/ + !1 + ); + return { + isTypeParameterList: !1, + invocation: { kind: 0, node: s }, + argumentsSpan: ql(o, c - o), + argumentIndex: 0, + argumentCount: 1 + }; + } else { + const o = gV(e, n); + if (o) { + const { called: c, nTypeArguments: _ } = o, u = { kind: 1, called: c }, m = bc(c.getStart(n), e.end); + return { isTypeParameterList: !0, invocation: u, argumentsSpan: m, argumentIndex: _, argumentCount: _ + 1 }; + } + return; + } + } + } + function XQe(e, t, n, i) { + return QQe(e, t, n, i) || TDe(e, t, n, i); + } + function xDe(e) { + return fn(e.parent) ? xDe(e.parent) : e; + } + function Bue(e) { + return fn(e.left) ? Bue(e.left) + 1 : 2; + } + function QQe(e, t, n, i) { + const s = YQe(e); + if (s === void 0) return; + const o = ZQe(s, n, t, i); + if (o === void 0) return; + const { contextualType: c, argumentIndex: _, argumentCount: u, argumentsSpan: m } = o, g = c.getNonNullableType(), h = g.symbol; + if (h === void 0) return; + const S = Co(g.getCallSignatures()); + return S === void 0 ? void 0 : { isTypeParameterList: !1, invocation: { kind: 2, signature: S, node: e, symbol: KQe(h) }, argumentsSpan: m, argumentIndex: _, argumentCount: u }; + } + function YQe(e) { + switch (e.kind) { + case 21: + case 28: + return e; + default: + return ur(e.parent, (t) => Ii(t) ? !0 : ma(t) || Nf(t) || R0(t) ? !1 : "quit"); + } + } + function ZQe(e, t, n, i) { + const { parent: s } = e; + switch (s.kind) { + case 217: + case 174: + case 218: + case 219: + const o = SDe(e, n, t, i); + if (!o) return; + const { argumentIndex: c, argumentCount: _, argumentsSpan: u } = o, m = fc(s) ? i.getContextualTypeForObjectLiteralElement(s) : i.getContextualType(s); + return m && { contextualType: m, argumentIndex: c, argumentCount: _, argumentsSpan: u }; + case 226: { + const g = xDe(s), h = i.getContextualType(g), S = e.kind === 21 ? 0 : Bue(s) - 1, T = Bue(g); + return h && { contextualType: h, argumentIndex: S, argumentCount: T, argumentsSpan: e_(s) }; + } + default: + return; + } + } + function KQe(e) { + return e.name === "__type" && Dc(e.declarations, (t) => { + var n; + return ng(t) ? (n = jn(t.parent, bd)) == null ? void 0 : n.symbol : void 0; + }) || e; + } + function eYe(e, t) { + const n = t.getTypeAtLocation(e.expression); + if (t.isTupleType(n)) { + const { elementFlags: i, fixedLength: s } = n.target; + if (s === 0) + return 0; + const o = ec(i, (c) => !(c & 1)); + return o < 0 ? s : o; + } + return 0; + } + function tYe(e, t, n) { + return kDe(e, t, n); + } + function rYe(e, t) { + return kDe( + e, + t, + /*node*/ + void 0 + ); + } + function kDe(e, t, n) { + const i = t.getChildren(); + let s = 0, o = !1; + for (const c of i) { + if (n && c === n) + return !o && c.kind === 28 && s++, s; + if (lp(c)) { + s += eYe(c, e), o = !0; + continue; + } + if (c.kind !== 28) { + s++, o = !0; + continue; + } + if (o) { + o = !1; + continue; + } + s++; + } + return n ? s : i.length && _a(i).kind === 28 ? s + 1 : s; + } + function nYe(e, t, n, i) { + return E.assert(n >= t.getStart(), "Assumed 'position' could not occur before node."), iZ(t) ? bA(t, n, i) ? 0 : e + 2 : e + 1; + } + function Jue(e, t, n) { + const i = NS(e.template) ? 1 : e.template.templateSpans.length + 1; + return t !== 0 && E.assertLessThan(t, i), { + isTypeParameterList: !1, + invocation: { kind: 0, node: e }, + argumentsSpan: sYe(e, n), + argumentIndex: t, + argumentCount: i + }; + } + function iYe(e, t) { + const n = e.getFullStart(), i = aa( + t.text, + e.getEnd(), + /*stopAfterLineBreak*/ + !1 + ); + return ql(n, i - n); + } + function sYe(e, t) { + const n = e.template, i = n.getStart(); + let s = n.getEnd(); + return n.kind === 228 && _a(n.templateSpans).literal.getFullWidth() === 0 && (s = aa( + t.text, + s, + /*stopAfterLineBreak*/ + !1 + )), ql(i, s - i); + } + function aYe(e, t, n, i, s) { + for (let o = e; !Ei(o) && (s || !ks(o)); o = o.parent) { + E.assert(p_(o.parent, o), "Not a subspan", () => `Child: ${E.formatSyntaxKind(o.kind)}, parent: ${E.formatSyntaxKind(o.parent.kind)}`); + const c = XQe(o, t, n, i); + if (c) + return c; + } + } + function oYe(e, t, n) { + const i = e.getChildren(n), s = i.indexOf(t); + return E.assert(s >= 0 && i.length > s + 1), i[s + 1]; + } + function CDe(e) { + return e.kind === 0 ? U7(e.node) : e.called; + } + function EDe(e) { + return e.kind === 0 ? e.node : e.kind === 1 ? e.called : e.node; + } + var wL = 70246400; + function DDe(e, t, { isTypeParameterList: n, argumentCount: i, argumentsSpan: s, invocation: o, argumentIndex: c }, _, u, m) { + var g; + const h = EDe(o), S = o.kind === 2 ? o.symbol : u.getSymbolAtLocation(CDe(o)) || m && ((g = t.declaration) == null ? void 0 : g.symbol), T = S ? _w( + u, + S, + m ? _ : void 0, + /*meaning*/ + void 0 + ) : He, C = gr(e, (F) => uYe(F, T, n, u, h, _)); + let D = 0, w = 0; + for (let F = 0; F < C.length; F++) { + const R = C[F]; + if (e[F] === t && (D = w, R.length > 1)) { + let W = 0; + for (const V of R) { + if (V.isVariadic || V.parameters.length >= i) { + D = w + W; + break; + } + W++; + } + } + w += R.length; + } + E.assert(D !== -1); + const A = { items: qE(C, lo), applicableSpan: s, selectedItemIndex: D, argumentIndex: c, argumentCount: i }, O = A.items[D]; + if (O.isVariadic) { + const F = ec(O.parameters, (R) => !!R.isRest); + -1 < F && F < O.parameters.length - 1 ? A.argumentIndex = O.parameters.length : A.argumentIndex = Math.min(A.argumentIndex, O.parameters.length - 1); + } + return A; + } + function cYe(e, { argumentCount: t, argumentsSpan: n, invocation: i, argumentIndex: s }, o, c) { + const _ = c.getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(e); + return _ ? { items: [lYe(e, _, c, EDe(i), o)], applicableSpan: n, selectedItemIndex: 0, argumentIndex: s, argumentCount: t } : void 0; + } + function lYe(e, t, n, i, s) { + const o = _w(n, e), c = o2(), _ = t.map((h) => PDe(h, n, i, s, c)), u = e.getDocumentationComment(n), m = e.getJsDocTags(n); + return { isVariadic: !1, prefixDisplayParts: [...o, Cu( + 30 + /* LessThanToken */ + )], suffixDisplayParts: [Cu( + 32 + /* GreaterThanToken */ + )], separatorDisplayParts: wDe, parameters: _, documentation: u, tags: m }; + } + var wDe = [Cu( + 28 + /* CommaToken */ + ), cc()]; + function uYe(e, t, n, i, s, o) { + const c = (n ? fYe : pYe)(e, i, s, o); + return gr(c, ({ isVariadic: _, parameters: u, prefix: m, suffix: g }) => { + const h = [...t, ...m], S = [...g, ..._Ye(e, s, i)], T = e.getDocumentationComment(i), C = e.getJsDocTags(); + return { isVariadic: _, prefixDisplayParts: h, suffixDisplayParts: S, separatorDisplayParts: wDe, parameters: u, documentation: T, tags: C }; + }); + } + function _Ye(e, t, n) { + return Pv((i) => { + i.writePunctuation(":"), i.writeSpace(" "); + const s = n.getTypePredicateOfSignature(e); + s ? n.writeTypePredicate( + s, + t, + /*flags*/ + void 0, + i + ) : n.writeType( + n.getReturnTypeOfSignature(e), + t, + /*flags*/ + void 0, + i + ); + }); + } + function fYe(e, t, n, i) { + const s = (e.target || e).typeParameters, o = o2(), c = (s || He).map((u) => PDe(u, t, n, i, o)), _ = e.thisParameter ? [t.symbolToParameterDeclaration(e.thisParameter, n, wL)] : []; + return t.getExpandedParameters(e).map((u) => { + const m = N.createNodeArray([..._, ...gr(u, (h) => t.symbolToParameterDeclaration(h, n, wL))]), g = Pv((h) => { + o.writeList(2576, m, i, h); + }); + return { isVariadic: !1, parameters: c, prefix: [Cu( + 30 + /* LessThanToken */ + )], suffix: [Cu( + 32 + /* GreaterThanToken */ + ), ...g] }; + }); + } + function pYe(e, t, n, i) { + const s = o2(), o = Pv((u) => { + if (e.typeParameters && e.typeParameters.length) { + const m = N.createNodeArray(e.typeParameters.map((g) => t.typeParameterToDeclaration(g, n, wL))); + s.writeList(53776, m, i, u); + } + }), c = t.getExpandedParameters(e), _ = t.hasEffectiveRestParameter(e) ? c.length === 1 ? (u) => !0 : (u) => { + var m; + return !!(u.length && ((m = jn(u[u.length - 1], Rg)) == null ? void 0 : m.links.checkFlags) & 32768); + } : (u) => !1; + return c.map((u) => ({ + isVariadic: _(u), + parameters: u.map((m) => dYe(m, t, n, i, s)), + prefix: [...o, Cu( + 21 + /* OpenParenToken */ + )], + suffix: [Cu( + 22 + /* CloseParenToken */ + )] + })); + } + function dYe(e, t, n, i, s) { + const o = Pv((u) => { + const m = t.symbolToParameterDeclaration(e, n, wL); + s.writeNode(4, m, i, u); + }), c = t.isOptionalParameter(e.valueDeclaration), _ = Rg(e) && !!(e.links.checkFlags & 32768); + return { name: e.name, documentation: e.getDocumentationComment(t), displayParts: o, isOptional: c, isRest: _ }; + } + function PDe(e, t, n, i, s) { + const o = Pv((c) => { + const _ = t.typeParameterToDeclaration(e, n, wL); + s.writeNode(4, _, i, c); + }); + return { name: e.symbol.name, documentation: e.symbol.getDocumentationComment(t), displayParts: o, isOptional: !1, isRest: !1 }; + } + var JH = {}; + Ec(JH, { + getSmartSelectionRange: () => mYe + }); + function mYe(e, t) { + var n, i; + let s = { + textSpan: bc(t.getFullStart(), t.getEnd()) + }, o = t; + e: + for (; ; ) { + const u = yYe(o); + if (!u.length) break; + for (let m = 0; m < u.length; m++) { + const g = u[m - 1], h = u[m], S = u[m + 1]; + if (Vy( + h, + t, + /*includeJsDoc*/ + !0 + ) > e) + break e; + const T = Hm(Fy(t.text, h.end)); + if (T && T.kind === 2 && _(T.pos, T.end), gYe(t, e, h)) { + if (jj(h) && Ka(o) && !ip(h.getStart(t), h.getEnd(), t) && c(h.getStart(t), h.getEnd()), ks(h) || r6(h) || Rx(h) || cF(h) || g && Rx(g) || Il(h) && pc(o) || c6(h) && Il(o) || Kn(h) && c6(o) && u.length === 1 || hv(h) || B0(h) || RS(h)) { + o = h; + break; + } + if (r6(o) && S && u7(S)) { + const A = h.getFullStart() - 2, O = S.getStart() + 1; + c(A, O); + } + const C = c6(h) && vYe(g) && bYe(S) && !ip(g.getStart(), S.getStart(), t); + let D = C ? g.getEnd() : h.getStart(); + const w = C ? S.getStart() : SYe(t, h); + if (uf(h) && ((n = h.jsDoc) != null && n.length) && c(ya(h.jsDoc).getStart(), w), c6(h)) { + const A = h.getChildren()[0]; + A && uf(A) && ((i = A.jsDoc) != null && i.length) && A.getStart() !== h.pos && (D = Math.min(D, ya(A.jsDoc).getStart())); + } + c(D, w), (ea(h) || sx(h)) && c(D + 1, w - 1), o = h; + break; + } + if (m === u.length - 1) + break e; + } + } + return s; + function c(u, m) { + if (u !== m) { + const g = bc(u, m); + (!s || // Skip ranges that are identical to the parent + !M6(g, s.textSpan) && // Skip ranges that don't contain the original position + LY(g, e)) && (s = { textSpan: g, ...s && { parent: s } }); + } + } + function _(u, m) { + c(u, m); + let g = u; + for (; t.text.charCodeAt(g) === 47; ) + g++; + c(g, m); + } + } + function gYe(e, t, n) { + return E.assert(n.pos <= t), t < n.end ? !0 : n.getEnd() === t ? h_(e, t).pos < n.end : !1; + } + var hYe = U_(zo, _l); + function yYe(e) { + var t; + if (Ei(e)) + return s8(e.getChildAt(0).getChildren(), hYe); + if (FS(e)) { + const [n, ...i] = e.getChildren(), s = E.checkDefined(i.pop()); + E.assertEqual( + n.kind, + 19 + /* OpenBraceToken */ + ), E.assertEqual( + s.kind, + 20 + /* CloseBraceToken */ + ); + const o = s8( + i, + (_) => _ === e.readonlyToken || _.kind === 148 || _ === e.questionToken || _.kind === 58 + /* QuestionToken */ + ), c = s8( + o, + ({ kind: _ }) => _ === 23 || _ === 168 || _ === 24 + /* CloseBracketToken */ + ); + return [ + n, + // Pivot on `:` + a8(zH( + c, + ({ kind: _ }) => _ === 59 + /* ColonToken */ + )), + s + ]; + } + if (m_(e)) { + const n = s8(e.getChildren(), (c) => c === e.name || as(e.modifiers, c)), i = ((t = n[0]) == null ? void 0 : t.kind) === 320 ? n[0] : void 0, s = i ? n.slice(1) : n, o = zH( + s, + ({ kind: c }) => c === 59 + /* ColonToken */ + ); + return i ? [i, a8(o)] : o; + } + if (Ii(e)) { + const n = s8(e.getChildren(), (s) => s === e.dotDotDotToken || s === e.name), i = s8(n, (s) => s === n[0] || s === e.questionToken); + return zH( + i, + ({ kind: s }) => s === 64 + /* EqualsToken */ + ); + } + return ma(e) ? zH( + e.getChildren(), + ({ kind: n }) => n === 64 + /* EqualsToken */ + ) : e.getChildren(); + } + function s8(e, t) { + const n = []; + let i; + for (const s of e) + t(s) ? (i = i || [], i.push(s)) : (i && (n.push(a8(i)), i = void 0), n.push(s)); + return i && n.push(a8(i)), n; + } + function zH(e, t, n = !0) { + if (e.length < 2) + return e; + const i = ec(e, t); + if (i === -1) + return e; + const s = e.slice(0, i), o = e[i], c = _a(e), _ = n && c.kind === 27, u = e.slice(i + 1, _ ? e.length - 1 : void 0), m = fP([ + s.length ? a8(s) : void 0, + o, + u.length ? a8(u) : void 0 + ]); + return _ ? m.concat(c) : m; + } + function a8(e) { + return E.assertGreaterThanOrEqual(e.length, 1), Cd(bv.createSyntaxList(e), e[0].pos, _a(e).end); + } + function vYe(e) { + const t = e && e.kind; + return t === 19 || t === 23 || t === 21 || t === 286; + } + function bYe(e) { + const t = e && e.kind; + return t === 20 || t === 24 || t === 22 || t === 287; + } + function SYe(e, t) { + switch (t.kind) { + case 341: + case 338: + case 348: + case 346: + case 343: + return e.getLineEndOfPosition(t.getStart()); + default: + return t.getEnd(); + } + } + var q0 = {}; + Ec(q0, { + getSymbolDisplayPartsDocumentationAndSymbolKind: () => xYe, + getSymbolKind: () => ADe, + getSymbolModifiers: () => TYe + }); + var NDe = 70246400; + function ADe(e, t, n) { + const i = IDe(e, t, n); + if (i !== "") + return i; + const s = UC(t); + return s & 32 ? Lo( + t, + 231 + /* ClassExpression */ + ) ? "local class" : "class" : s & 384 ? "enum" : s & 524288 ? "type" : s & 64 ? "interface" : s & 262144 ? "type parameter" : s & 8 ? "enum member" : s & 2097152 ? "alias" : s & 1536 ? "module" : i; + } + function IDe(e, t, n) { + const i = e.getRootSymbols(t); + if (i.length === 1 && ya(i).flags & 8192 && e.getTypeOfSymbolAtLocation(t, n).getNonNullableType().getCallSignatures().length !== 0) + return "method"; + if (e.isUndefinedSymbol(t)) + return "var"; + if (e.isArgumentsSymbol(t)) + return "local var"; + if (n.kind === 110 && ct(n) || Jb(n)) + return "parameter"; + const s = UC(t); + if (s & 3) + return MV(t) ? "parameter" : t.valueDeclaration && wC(t.valueDeclaration) ? "const" : t.valueDeclaration && n3(t.valueDeclaration) ? "using" : t.valueDeclaration && r3(t.valueDeclaration) ? "await using" : lr(t.declarations, F7) ? "let" : LDe(t) ? "local var" : "var"; + if (s & 16) return LDe(t) ? "local function" : "function"; + if (s & 32768) return "getter"; + if (s & 65536) return "setter"; + if (s & 8192) return "method"; + if (s & 16384) return "constructor"; + if (s & 131072) return "index"; + if (s & 4) { + if (s & 33554432 && t.links.checkFlags & 6) { + const o = lr(e.getRootSymbols(t), (c) => { + if (c.getFlags() & 98311) + return "property"; + }); + return o || (e.getTypeOfSymbolAtLocation(t, n).getCallSignatures().length ? "method" : "property"); + } + return "property"; + } + return ""; + } + function FDe(e) { + if (e.declarations && e.declarations.length) { + const [t, ...n] = e.declarations, i = Ir(n) && M9(t) && at(n, (o) => !M9(o)) ? 65536 : 0, s = aw(t, i); + if (s) + return s.split(","); + } + return []; + } + function TYe(e, t) { + if (!t) + return ""; + const n = new Set(FDe(t)); + if (t.flags & 2097152) { + const i = e.getAliasedSymbol(t); + i !== t && lr(FDe(i), (s) => { + n.add(s); + }); + } + return t.flags & 16777216 && n.add( + "optional" + /* optionalModifier */ + ), n.size > 0 ? Ki(n.values()).join(",") : ""; + } + function ODe(e, t, n, i, s, o, c, _) { + var u; + const m = []; + let g = [], h = []; + const S = UC(t); + let T = c & 1 ? IDe(e, t, s) : "", C = !1; + const D = s.kind === 110 && V7(s) || Jb(s); + let w, A, O = !1; + if (s.kind === 110 && !D) + return { displayParts: [rf( + 110 + /* ThisKeyword */ + )], documentation: [], symbolKind: "primitive type", tags: void 0 }; + if (T !== "" || S & 32 || S & 2097152) { + if (T === "getter" || T === "setter") { + const ie = Pn(t.declarations, (le) => le.name === s); + if (ie) + switch (ie.kind) { + case 177: + T = "getter"; + break; + case 178: + T = "setter"; + break; + case 172: + T = "accessor"; + break; + default: + E.assertNever(ie); + } + else + T = "property"; + } + let re; + if (o ?? (o = D ? e.getTypeAtLocation(s) : e.getTypeOfSymbolAtLocation(t, s)), s.parent && s.parent.kind === 211) { + const ie = s.parent.name; + (ie === s || ie && ie.getFullWidth() === 0) && (s = s.parent); + } + let te; + if (tm(s) ? te = s : (tV(s) || nw(s) || s.parent && (bu(s.parent) || fv(s.parent)) && vs(t.valueDeclaration)) && (te = s.parent), te) { + re = e.getResolvedSignature(te); + const ie = te.kind === 214 || Fs(te) && te.expression.kind === 108, le = ie ? o.getConstructSignatures() : o.getCallSignatures(); + if (re && !as(le, re.target) && !as(le, re) && (re = le.length ? le[0] : void 0), re) { + switch (ie && S & 32 ? (T = "constructor", U(o.symbol, T)) : S & 2097152 ? (T = "alias", _e(T), m.push(cc()), ie && (re.flags & 4 && (m.push(rf( + 128 + /* AbstractKeyword */ + )), m.push(cc())), m.push(rf( + 105 + /* NewKeyword */ + )), m.push(cc())), $(t)) : U(t, T), T) { + case "JSX attribute": + case "property": + case "var": + case "const": + case "let": + case "parameter": + case "local var": + m.push(Cu( + 59 + /* ColonToken */ + )), m.push(cc()), !(Cn(o) & 16) && o.symbol && (Nn(m, _w( + e, + o.symbol, + i, + /*meaning*/ + void 0, + 5 + /* WriteTypeParametersOrArguments */ + )), m.push(R6())), ie && (re.flags & 4 && (m.push(rf( + 128 + /* AbstractKeyword */ + )), m.push(cc())), m.push(rf( + 105 + /* NewKeyword */ + )), m.push(cc())), Z( + re, + le, + 262144 + /* WriteArrowStyleSignature */ + ); + break; + default: + Z(re, le); + } + C = !0, O = le.length > 1; + } + } else if (lV(s) && !(S & 98304) || // name of function declaration + s.kind === 137 && s.parent.kind === 176) { + const ie = s.parent; + if (t.declarations && Pn(t.declarations, (Te) => Te === (s.kind === 137 ? ie.parent : ie))) { + const Te = ie.kind === 176 ? o.getNonNullableType().getConstructSignatures() : o.getNonNullableType().getCallSignatures(); + e.isImplementationOfOverload(ie) ? re = Te[0] : re = e.getSignatureFromDeclaration(ie), ie.kind === 176 ? (T = "constructor", U(o.symbol, T)) : U( + ie.kind === 179 && !(o.symbol.flags & 2048 || o.symbol.flags & 4096) ? o.symbol : t, + T + ), re && Z(re, Te), C = !0, O = Te.length > 1; + } + } + } + if (S & 32 && !C && !D && (W(), Lo( + t, + 231 + /* ClassExpression */ + ) ? _e( + "local class" + /* localClassElement */ + ) : m.push(rf( + 86 + /* ClassKeyword */ + )), m.push(cc()), $(t), J(t, n)), S & 64 && c & 2 && (R(), m.push(rf( + 120 + /* InterfaceKeyword */ + )), m.push(cc()), $(t), J(t, n)), S & 524288 && c & 2 && (R(), m.push(rf( + 156 + /* TypeKeyword */ + )), m.push(cc()), $(t), J(t, n), m.push(cc()), m.push(uw( + 64 + /* EqualsToken */ + )), m.push(cc()), Nn(m, EA( + e, + s.parent && Kp(s.parent) ? e.getTypeAtLocation(s.parent) : e.getDeclaredTypeOfSymbol(t), + i, + 8388608 + /* InTypeAlias */ + ))), S & 384 && (R(), at(t.declarations, (re) => Zb(re) && ev(re)) && (m.push(rf( + 87 + /* ConstKeyword */ + )), m.push(cc())), m.push(rf( + 94 + /* EnumKeyword */ + )), m.push(cc()), $(t)), S & 1536 && !D) { + R(); + const re = Lo( + t, + 267 + /* ModuleDeclaration */ + ), te = re && re.name && re.name.kind === 80; + m.push(rf( + te ? 145 : 144 + /* ModuleKeyword */ + )), m.push(cc()), $(t); + } + if (S & 262144 && c & 2) + if (R(), m.push(Cu( + 21 + /* OpenParenToken */ + )), m.push(Lf("type parameter")), m.push(Cu( + 22 + /* CloseParenToken */ + )), m.push(cc()), $(t), t.parent) + V(), $(t.parent, i), J(t.parent, i); + else { + const re = Lo( + t, + 168 + /* TypeParameter */ + ); + if (re === void 0) return E.fail(); + const te = re.parent; + if (te) + if (vs(te)) { + V(); + const ie = e.getSignatureFromDeclaration(te); + te.kind === 180 ? (m.push(rf( + 105 + /* NewKeyword */ + )), m.push(cc())) : te.kind !== 179 && te.name && $(te.symbol), Nn(m, jV( + e, + ie, + n, + 32 + /* WriteTypeArgumentsOfSignature */ + )); + } else jp(te) && (V(), m.push(rf( + 156 + /* TypeKeyword */ + )), m.push(cc()), $(te.symbol), J(te.symbol, n)); + } + if (S & 8) { + T = "enum member", U(t, "enum member"); + const re = (u = t.declarations) == null ? void 0 : u[0]; + if (re?.kind === 306) { + const te = e.getConstantValue(re); + te !== void 0 && (m.push(cc()), m.push(uw( + 64 + /* EqualsToken */ + )), m.push(cc()), m.push(I_( + MZ(te), + typeof te == "number" ? 7 : 8 + /* stringLiteral */ + ))); + } + } + if (t.flags & 2097152) { + if (R(), !C || g.length === 0 && h.length === 0) { + const re = e.getAliasedSymbol(t); + if (re !== t && re.declarations && re.declarations.length > 0) { + const te = re.declarations[0], ie = is(te); + if (ie && !C) { + const le = P7(te) && $n( + te, + 128 + /* Ambient */ + ), Te = t.name !== "default" && !le, q = ODe( + e, + re, + Cr(te), + i, + ie, + o, + c, + Te ? t : re + ); + m.push(...q.displayParts), m.push(R6()), w = q.documentation, A = q.tags; + } else + w = re.getContextualDocumentationComment(te, e), A = re.getJsDocTags(e); + } + } + if (t.declarations) + switch (t.declarations[0].kind) { + case 270: + m.push(rf( + 95 + /* ExportKeyword */ + )), m.push(cc()), m.push(rf( + 145 + /* NamespaceKeyword */ + )); + break; + case 277: + m.push(rf( + 95 + /* ExportKeyword */ + )), m.push(cc()), m.push(rf( + t.declarations[0].isExportEquals ? 64 : 90 + /* DefaultKeyword */ + )); + break; + case 281: + m.push(rf( + 95 + /* ExportKeyword */ + )); + break; + default: + m.push(rf( + 102 + /* ImportKeyword */ + )); + } + m.push(cc()), $(t), lr(t.declarations, (re) => { + if (re.kind === 271) { + const te = re; + if (tv(te)) + m.push(cc()), m.push(uw( + 64 + /* EqualsToken */ + )), m.push(cc()), m.push(rf( + 149 + /* RequireKeyword */ + )), m.push(Cu( + 21 + /* OpenParenToken */ + )), m.push(I_( + qo(A4(te)), + 8 + /* stringLiteral */ + )), m.push(Cu( + 22 + /* CloseParenToken */ + )); + else { + const ie = e.getSymbolAtLocation(te.moduleReference); + ie && (m.push(cc()), m.push(uw( + 64 + /* EqualsToken */ + )), m.push(cc()), $(ie, i)); + } + return !0; + } + }); + } + if (!C) + if (T !== "") { + if (o) { + if (D ? (R(), m.push(rf( + 110 + /* ThisKeyword */ + ))) : U(t, T), T === "property" || T === "accessor" || T === "getter" || T === "setter" || T === "JSX attribute" || S & 3 || T === "local var" || T === "index" || T === "using" || T === "await using" || D) { + if (m.push(Cu( + 59 + /* ColonToken */ + )), m.push(cc()), o.symbol && o.symbol.flags & 262144 && T !== "index") { + const re = Pv((te) => { + const ie = e.typeParameterToDeclaration(o, i, NDe); + F().writeNode(4, ie, Cr(ls(i)), te); + }); + Nn(m, re); + } else + Nn(m, EA(e, o, i)); + if (Rg(t) && t.links.target && Rg(t.links.target) && t.links.target.links.tupleLabelDeclaration) { + const re = t.links.target.links.tupleLabelDeclaration; + E.assertNode(re.name, Me), m.push(cc()), m.push(Cu( + 21 + /* OpenParenToken */ + )), m.push(Lf(An(re.name))), m.push(Cu( + 22 + /* CloseParenToken */ + )); + } + } else if (S & 16 || S & 8192 || S & 16384 || S & 131072 || S & 98304 || T === "method") { + const re = o.getNonNullableType().getCallSignatures(); + re.length && (Z(re[0], re), O = re.length > 1); + } + } + } else + T = ADe(e, t, s); + if (g.length === 0 && !O && (g = t.getContextualDocumentationComment(i, e)), g.length === 0 && S & 4 && t.parent && t.declarations && lr( + t.parent.declarations, + (re) => re.kind === 307 + /* SourceFile */ + )) + for (const re of t.declarations) { + if (!re.parent || re.parent.kind !== 226) + continue; + const te = e.getSymbolAtLocation(re.parent.right); + if (te && (g = te.getDocumentationComment(e), h = te.getJsDocTags(e), g.length > 0)) + break; + } + if (g.length === 0 && Me(s) && t.valueDeclaration && ma(t.valueDeclaration)) { + const re = t.valueDeclaration, te = re.parent, ie = re.propertyName || re.name; + if (Me(ie) && Nf(te)) { + const le = rp(ie), Te = e.getTypeAtLocation(te); + g = Dc(Te.isUnion() ? Te.types : [Te], (q) => { + const me = q.getProperty(le); + return me ? me.getDocumentationComment(e) : void 0; + }) || He; + } + } + return h.length === 0 && !O && (h = t.getContextualJsDocTags(i, e)), g.length === 0 && w && (g = w), h.length === 0 && A && (h = A), { displayParts: m, documentation: g, symbolKind: T, tags: h.length === 0 ? void 0 : h }; + function F() { + return o2(); + } + function R() { + m.length && m.push(R6()), W(); + } + function W() { + _ && (_e( + "alias" + /* alias */ + ), m.push(cc())); + } + function V() { + m.push(cc()), m.push(rf( + 103 + /* InKeyword */ + )), m.push(cc()); + } + function $(re, te) { + let ie; + _ && re === t && (re = _), T === "index" && (ie = e.getIndexInfosOfIndexSymbol(re)); + let le = []; + re.flags & 131072 && ie ? (re.parent && (le = _w(e, re.parent)), le.push(Cu( + 23 + /* OpenBracketToken */ + )), ie.forEach((Te, q) => { + le.push(...EA(e, Te.keyType)), q !== ie.length - 1 && (le.push(cc()), le.push(Cu( + 52 + /* BarToken */ + )), le.push(cc())); + }), le.push(Cu( + 24 + /* CloseBracketToken */ + ))) : le = _w( + e, + re, + te || n, + /*meaning*/ + void 0, + 7 + /* AllowAnyNodeKind */ + ), Nn(m, le), t.flags & 16777216 && m.push(Cu( + 58 + /* QuestionToken */ + )); + } + function U(re, te) { + R(), te && (_e(te), re && !at(re.declarations, (ie) => bo(ie) || (po(ie) || Gc(ie)) && !ie.name) && (m.push(cc()), $(re))); + } + function _e(re) { + switch (re) { + case "var": + case "function": + case "let": + case "const": + case "constructor": + case "using": + case "await using": + m.push(RV(re)); + return; + default: + m.push(Cu( + 21 + /* OpenParenToken */ + )), m.push(RV(re)), m.push(Cu( + 22 + /* CloseParenToken */ + )); + return; + } + } + function Z(re, te, ie = 0) { + Nn(m, jV( + e, + re, + i, + ie | 32 + /* WriteTypeArgumentsOfSignature */ + )), te.length > 1 && (m.push(cc()), m.push(Cu( + 21 + /* OpenParenToken */ + )), m.push(uw( + 40 + /* PlusToken */ + )), m.push(I_( + (te.length - 1).toString(), + 7 + /* numericLiteral */ + )), m.push(cc()), m.push(Lf(te.length === 2 ? "overload" : "overloads")), m.push(Cu( + 22 + /* CloseParenToken */ + ))), g = re.getDocumentationComment(e), h = re.getJsDocTags(), te.length > 1 && g.length === 0 && h.length === 0 && (g = te[0].getDocumentationComment(e), h = te[0].getJsDocTags().filter((le) => le.name !== "deprecated")); + } + function J(re, te) { + const ie = Pv((le) => { + const Te = e.symbolToTypeParameterDeclarations(re, te, NDe); + F().writeList(53776, Te, Cr(ls(te)), le); + }); + Nn(m, ie); + } + } + function xYe(e, t, n, i, s, o = $S(s), c) { + return ODe( + e, + t, + n, + i, + s, + /*type*/ + void 0, + o, + c + ); + } + function LDe(e) { + return e.parent ? !1 : lr(e.declarations, (t) => { + if (t.kind === 218) + return !0; + if (t.kind !== 260 && t.kind !== 262) + return !1; + for (let n = t.parent; !Nb(n); n = n.parent) + if (n.kind === 307 || n.kind === 268) + return !1; + return !0; + }); + } + var sn = {}; + Ec(sn, { + ChangeTracker: () => EYe, + LeadingTriviaOption: () => jDe, + TrailingTriviaOption: () => BDe, + applyChanges: () => que, + assignPositionsToNode: () => qH, + createWriter: () => zDe, + deleteNode: () => Uh, + getAdjustedEndPosition: () => xk, + isThisTypeAnnotatable: () => CYe, + isValidLocationToAddComment: () => WDe + }); + function MDe(e) { + const t = e.__pos; + return E.assert(typeof t == "number"), t; + } + function zue(e, t) { + E.assert(typeof t == "number"), e.__pos = t; + } + function RDe(e) { + const t = e.__end; + return E.assert(typeof t == "number"), t; + } + function Wue(e, t) { + E.assert(typeof t == "number"), e.__end = t; + } + var jDe = /* @__PURE__ */ ((e) => (e[e.Exclude = 0] = "Exclude", e[e.IncludeAll = 1] = "IncludeAll", e[e.JSDoc = 2] = "JSDoc", e[e.StartLine = 3] = "StartLine", e))(jDe || {}), BDe = /* @__PURE__ */ ((e) => (e[e.Exclude = 0] = "Exclude", e[e.ExcludeWhitespace = 1] = "ExcludeWhitespace", e[e.Include = 2] = "Include", e))(BDe || {}); + function JDe(e, t) { + return aa( + e, + t, + /*stopAfterLineBreak*/ + !1, + /*stopAtComments*/ + !0 + ); + } + function kYe(e, t) { + let n = t; + for (; n < e.length; ) { + const i = e.charCodeAt(n); + if (em(i)) { + n++; + continue; + } + return i === 47; + } + return !1; + } + var o8 = { + leadingTriviaOption: 0, + trailingTriviaOption: 0 + /* Exclude */ + }; + function c8(e, t, n, i) { + return { pos: tT(e, t, i), end: xk(e, n, i) }; + } + function tT(e, t, n, i = !1) { + var s, o; + const { leadingTriviaOption: c } = n; + if (c === 0) + return t.getStart(e); + if (c === 3) { + const T = t.getStart(e), C = Wp(T, e); + return I6(t, C) ? C : T; + } + if (c === 2) { + const T = lB(t, e.text); + if (T?.length) + return Wp(T[0].pos, e); + } + const _ = t.getFullStart(), u = t.getStart(e); + if (_ === u) + return u; + const m = Wp(_, e); + if (Wp(u, e) === m) + return c === 1 ? _ : u; + if (i) { + const T = ((s = Fg(e.text, _)) == null ? void 0 : s[0]) || ((o = Fy(e.text, _)) == null ? void 0 : o[0]); + if (T) + return aa( + e.text, + T.end, + /*stopAfterLineBreak*/ + !0, + /*stopAtComments*/ + !0 + ); + } + const h = _ > 0 ? 1 : 0; + let S = Uy(U4(e, m) + h, e); + return S = JDe(e.text, S), Uy(U4(e, S), e); + } + function Uue(e, t, n) { + const { end: i } = t, { trailingTriviaOption: s } = n; + if (s === 2) { + const o = Fy(e.text, i); + if (o) { + const c = U4(e, t.end); + for (const _ of o) { + if (_.kind === 2 || U4(e, _.pos) > c) + break; + if (U4(e, _.end) > c) + return aa( + e.text, + _.end, + /*stopAfterLineBreak*/ + !0, + /*stopAtComments*/ + !0 + ); + } + } + } + } + function xk(e, t, n) { + var i; + const { end: s } = t, { trailingTriviaOption: o } = n; + if (o === 0) + return s; + if (o === 1) { + const u = Wi(Fy(e.text, s), Fg(e.text, s)), m = (i = u?.[u.length - 1]) == null ? void 0 : i.end; + return m || s; + } + const c = Uue(e, t, n); + if (c) + return c; + const _ = aa( + e.text, + s, + /*stopAfterLineBreak*/ + !0 + ); + return _ !== s && (o === 2 || yu(e.text.charCodeAt(_ - 1))) ? _ : s; + } + function WH(e, t) { + return !!t && !!e.parent && (t.kind === 28 || t.kind === 27 && e.parent.kind === 210); + } + function CYe(e) { + return po(e) || Tc(e); + } + var EYe = class Ume { + /** Public for tests only. Other callers should use `ChangeTracker.with`. */ + constructor(t, n) { + this.newLineCharacter = t, this.formatContext = n, this.changes = [], this.classesWithNodesInsertedAtStart = /* @__PURE__ */ new Map(), this.deletedNodes = []; + } + static fromContext(t) { + return new Ume(Jh(t.host, t.formatContext.options), t.formatContext); + } + static with(t, n) { + const i = Ume.fromContext(t); + return n(i), i.getChanges(); + } + pushRaw(t, n) { + E.assertEqual(t.fileName, n.fileName); + for (const i of n.textChanges) + this.changes.push({ + kind: 3, + sourceFile: t, + text: i.newText, + range: y9(i.span) + }); + } + deleteRange(t, n) { + this.changes.push({ kind: 0, sourceFile: t, range: n }); + } + delete(t, n) { + this.deletedNodes.push({ sourceFile: t, node: n }); + } + /** Stop! Consider using `delete` instead, which has logic for deleting nodes from delimited lists. */ + deleteNode(t, n, i = { + leadingTriviaOption: 1 + /* IncludeAll */ + }) { + this.deleteRange(t, c8(t, n, n, i)); + } + deleteNodes(t, n, i = { + leadingTriviaOption: 1 + /* IncludeAll */ + }, s) { + for (const o of n) { + const c = tT(t, o, i, s), _ = xk(t, o, i); + this.deleteRange(t, { pos: c, end: _ }), s = !!Uue(t, o, i); + } + } + deleteModifier(t, n) { + this.deleteRange(t, { pos: n.getStart(t), end: aa( + t.text, + n.end, + /*stopAfterLineBreak*/ + !0 + ) }); + } + deleteNodeRange(t, n, i, s = { + leadingTriviaOption: 1 + /* IncludeAll */ + }) { + const o = tT(t, n, s), c = xk(t, i, s); + this.deleteRange(t, { pos: o, end: c }); + } + deleteNodeRangeExcludingEnd(t, n, i, s = { + leadingTriviaOption: 1 + /* IncludeAll */ + }) { + const o = tT(t, n, s), c = i === void 0 ? t.text.length : tT(t, i, s); + this.deleteRange(t, { pos: o, end: c }); + } + replaceRange(t, n, i, s = {}) { + this.changes.push({ kind: 1, sourceFile: t, range: n, options: s, node: i }); + } + replaceNode(t, n, i, s = o8) { + this.replaceRange(t, c8(t, n, n, s), i, s); + } + replaceNodeRange(t, n, i, s, o = o8) { + this.replaceRange(t, c8(t, n, i, o), s, o); + } + replaceRangeWithNodes(t, n, i, s = {}) { + this.changes.push({ kind: 2, sourceFile: t, range: n, options: s, nodes: i }); + } + replaceNodeWithNodes(t, n, i, s = o8) { + this.replaceRangeWithNodes(t, c8(t, n, n, s), i, s); + } + replaceNodeWithText(t, n, i) { + this.replaceRangeWithText(t, c8(t, n, n, o8), i); + } + replaceNodeRangeWithNodes(t, n, i, s, o = o8) { + this.replaceRangeWithNodes(t, c8(t, n, i, o), s, o); + } + nodeHasTrailingComment(t, n, i = o8) { + return !!Uue(t, n, i); + } + nextCommaToken(t, n) { + const i = _2(n, n.parent, t); + return i && i.kind === 28 ? i : void 0; + } + replacePropertyAssignment(t, n, i) { + const s = this.nextCommaToken(t, n) ? "" : "," + this.newLineCharacter; + this.replaceNode(t, n, i, { suffix: s }); + } + insertNodeAt(t, n, i, s = {}) { + this.replaceRange(t, np(n), i, s); + } + insertNodesAt(t, n, i, s = {}) { + this.replaceRangeWithNodes(t, np(n), i, s); + } + insertNodeAtTopOfFile(t, n, i) { + this.insertAtTopOfFile(t, n, i); + } + insertNodesAtTopOfFile(t, n, i) { + this.insertAtTopOfFile(t, n, i); + } + insertAtTopOfFile(t, n, i) { + const s = OYe(t), o = { + prefix: s === 0 ? void 0 : this.newLineCharacter, + suffix: (yu(t.text.charCodeAt(s)) ? "" : this.newLineCharacter) + (i ? this.newLineCharacter : "") + }; + os(n) ? this.insertNodesAt(t, s, n, o) : this.insertNodeAt(t, s, n, o); + } + insertNodesAtEndOfFile(t, n, i) { + this.insertAtEndOfFile(t, n, i); + } + insertAtEndOfFile(t, n, i) { + const s = t.end + 1, o = { + prefix: this.newLineCharacter, + suffix: this.newLineCharacter + (i ? this.newLineCharacter : "") + }; + this.insertNodesAt(t, s, n, o); + } + insertStatementsInNewFile(t, n, i) { + this.newFileChanges || (this.newFileChanges = wp()), this.newFileChanges.add(t, { oldFile: i, statements: n }); + } + insertFirstParameter(t, n, i) { + const s = Uc(n); + s ? this.insertNodeBefore(t, s, i) : this.insertNodeAt(t, n.pos, i); + } + insertNodeBefore(t, n, i, s = !1, o = {}) { + this.insertNodeAt(t, tT(t, n, o), i, this.getOptionsForInsertNodeBefore(n, i, s)); + } + insertNodesBefore(t, n, i, s = !1, o = {}) { + this.insertNodesAt(t, tT(t, n, o), i, this.getOptionsForInsertNodeBefore(n, ya(i), s)); + } + insertModifierAt(t, n, i, s = {}) { + this.insertNodeAt(t, n, N.createToken(i), s); + } + insertModifierBefore(t, n, i) { + return this.insertModifierAt(t, i.getStart(t), n, { suffix: " " }); + } + insertCommentBeforeLine(t, n, i, s) { + const o = Uy(n, t), c = uae(t.text, o), _ = WDe(t, c), u = F6(t, _ ? c : i), m = t.text.slice(o, c), g = `${_ ? "" : this.newLineCharacter}//${s}${this.newLineCharacter}${m}`; + this.insertText(t, u.getStart(t), g); + } + insertJsdocCommentBefore(t, n, i) { + const s = n.getStart(t); + if (n.jsDoc) + for (const _ of n.jsDoc) + this.deleteRange(t, { + pos: Wp(_.getStart(t), t), + end: xk( + t, + _, + /*options*/ + {} + ) + }); + const o = E9(t.text, s - 1), c = t.text.slice(o, s); + this.insertNodeAt(t, s, i, { suffix: this.newLineCharacter + c }); + } + createJSDocText(t, n) { + const i = na(n.jsDoc, (o) => rs(o.comment) ? N.createJSDocText(o.comment) : o.comment), s = Hm(n.jsDoc); + return s && ip(s.pos, s.end, t) && Ir(i) === 0 ? void 0 : N.createNodeArray(pR(i, N.createJSDocText(` +`))); + } + replaceJSDocComment(t, n, i) { + this.insertJsdocCommentBefore(t, DYe(n), N.createJSDocComment(this.createJSDocText(t, n), N.createNodeArray(i))); + } + addJSDocTags(t, n, i) { + const s = qE(n.jsDoc, (c) => c.tags), o = i.filter( + (c) => !s.some((_, u) => { + const m = wYe(_, c); + return m && (s[u] = m), !!m; + }) + ); + this.replaceJSDocComment(t, n, [...s, ...o]); + } + filterJSDocTags(t, n, i) { + this.replaceJSDocComment(t, n, kn(qE(n.jsDoc, (s) => s.tags), i)); + } + replaceRangeWithText(t, n, i) { + this.changes.push({ kind: 3, sourceFile: t, range: n, text: i }); + } + insertText(t, n, i) { + this.replaceRangeWithText(t, np(n), i); + } + /** Prefer this over replacing a node with another that has a type annotation, as it avoids reformatting the other parts of the node. */ + tryInsertTypeAnnotation(t, n, i) { + let s; + if (vs(n)) { + if (s = Xa(n, 22, t), !s) { + if (!bo(n)) return !1; + s = ya(n.parameters); + } + } else + s = (n.kind === 260 ? n.exclamationToken : n.questionToken) ?? n.name; + return this.insertNodeAt(t, s.end, i, { prefix: ": " }), !0; + } + tryInsertThisTypeAnnotation(t, n, i) { + const s = Xa(n, 21, t).getStart(t) + 1, o = n.parameters.length ? ", " : ""; + this.insertNodeAt(t, s, i, { prefix: "this: ", suffix: o }); + } + insertTypeParameters(t, n, i) { + const s = (Xa(n, 21, t) || ya(n.parameters)).getStart(t); + this.insertNodesAt(t, s, i, { prefix: "<", suffix: ">", joiner: ", " }); + } + getOptionsForInsertNodeBefore(t, n, i) { + return xi(t) || sl(t) ? { suffix: i ? this.newLineCharacter + this.newLineCharacter : this.newLineCharacter } : Kn(t) ? { suffix: ", " } : Ii(t) ? Ii(n) ? { suffix: ", " } : {} : ea(t) && zo(t.parent) || mm(t) ? { suffix: ", " } : ju(t) ? { suffix: "," + (i ? this.newLineCharacter : " ") } : E.failBadSyntaxKind(t); + } + insertNodeAtConstructorStart(t, n, i) { + const s = Uc(n.body.statements); + !s || !n.body.multiLine ? this.replaceConstructorBody(t, n, [i, ...n.body.statements]) : this.insertNodeBefore(t, s, i); + } + insertNodeAtConstructorStartAfterSuperCall(t, n, i) { + const s = Pn(n.body.statements, (o) => El(o) && mS(o.expression)); + !s || !n.body.multiLine ? this.replaceConstructorBody(t, n, [...n.body.statements, i]) : this.insertNodeAfter(t, s, i); + } + insertNodeAtConstructorEnd(t, n, i) { + const s = Co(n.body.statements); + !s || !n.body.multiLine ? this.replaceConstructorBody(t, n, [...n.body.statements, i]) : this.insertNodeAfter(t, s, i); + } + replaceConstructorBody(t, n, i) { + this.replaceNode(t, n.body, N.createBlock( + i, + /*multiLine*/ + !0 + )); + } + insertNodeAtEndOfScope(t, n, i) { + const s = tT(t, n.getLastToken(), {}); + this.insertNodeAt(t, s, i, { + prefix: yu(t.text.charCodeAt(n.getLastToken().pos)) ? this.newLineCharacter : this.newLineCharacter + this.newLineCharacter, + suffix: this.newLineCharacter + }); + } + insertMemberAtStart(t, n, i) { + this.insertNodeAtStartWorker(t, n, i); + } + insertNodeAtObjectStart(t, n, i) { + this.insertNodeAtStartWorker(t, n, i); + } + insertNodeAtStartWorker(t, n, i) { + const s = this.guessIndentationFromExistingMembers(t, n) ?? this.computeIndentationForNewMember(t, n); + this.insertNodeAt(t, UH(n).pos, i, this.getInsertNodeAtStartInsertOptions(t, n, s)); + } + /** + * Tries to guess the indentation from the existing members of a class/interface/object. All members must be on + * new lines and must share the same indentation. + */ + guessIndentationFromExistingMembers(t, n) { + let i, s = n; + for (const o of UH(n)) { + if (T5(s, o, t)) + return; + const c = o.getStart(t), _ = Qc.SmartIndenter.findFirstNonWhitespaceColumn(Wp(c, t), c, t, this.formatContext.options); + if (i === void 0) + i = _; + else if (_ !== i) + return; + s = o; + } + return i; + } + computeIndentationForNewMember(t, n) { + const i = n.getStart(t); + return Qc.SmartIndenter.findFirstNonWhitespaceColumn(Wp(i, t), i, t, this.formatContext.options) + (this.formatContext.options.indentSize ?? 4); + } + getInsertNodeAtStartInsertOptions(t, n, i) { + const o = UH(n).length === 0, c = !this.classesWithNodesInsertedAtStart.has(Aa(n)); + c && this.classesWithNodesInsertedAtStart.set(Aa(n), { node: n, sourceFile: t }); + const _ = oa(n) && (!tp(t) || !o), u = oa(n) && tp(t) && o && !c; + return { + indentation: i, + prefix: (u ? "," : "") + this.newLineCharacter, + suffix: _ ? "," : Yl(n) && o ? ";" : "" + }; + } + insertNodeAfterComma(t, n, i) { + const s = this.insertNodeAfterWorker(t, this.nextCommaToken(t, n) || n, i); + this.insertNodeAt(t, s, i, this.getInsertNodeAfterOptions(t, n)); + } + insertNodeAfter(t, n, i) { + const s = this.insertNodeAfterWorker(t, n, i); + this.insertNodeAt(t, s, i, this.getInsertNodeAfterOptions(t, n)); + } + insertNodeAtEndOfList(t, n, i) { + this.insertNodeAt(t, n.end, i, { prefix: ", " }); + } + insertNodesAfter(t, n, i) { + const s = this.insertNodeAfterWorker(t, n, ya(i)); + this.insertNodesAt(t, s, i, this.getInsertNodeAfterOptions(t, n)); + } + insertNodeAfterWorker(t, n, i) { + return LYe(n, i) && t.text.charCodeAt(n.end - 1) !== 59 && this.replaceRange(t, np(n.end), N.createToken( + 27 + /* SemicolonToken */ + )), xk(t, n, {}); + } + getInsertNodeAfterOptions(t, n) { + const i = this.getInsertNodeAfterOptionsWorker(n); + return { + ...i, + prefix: n.end === t.end && xi(n) ? i.prefix ? ` +${i.prefix}` : ` +` : i.prefix + }; + } + getInsertNodeAfterOptionsWorker(t) { + switch (t.kind) { + case 263: + case 267: + return { prefix: this.newLineCharacter, suffix: this.newLineCharacter }; + case 260: + case 11: + case 80: + return { prefix: ", " }; + case 303: + return { suffix: "," + this.newLineCharacter }; + case 95: + return { prefix: " " }; + case 169: + return {}; + default: + return E.assert(xi(t) || _7(t)), { suffix: this.newLineCharacter }; + } + } + insertName(t, n, i) { + if (E.assert(!n.name), n.kind === 219) { + const s = Xa(n, 39, t), o = Xa(n, 21, t); + o ? (this.insertNodesAt(t, o.getStart(t), [N.createToken( + 100 + /* FunctionKeyword */ + ), N.createIdentifier(i)], { joiner: " " }), Uh(this, t, s)) : (this.insertText(t, ya(n.parameters).getStart(t), `function ${i}(`), this.replaceRange(t, s, N.createToken( + 22 + /* CloseParenToken */ + ))), n.body.kind !== 241 && (this.insertNodesAt(t, n.body.getStart(t), [N.createToken( + 19 + /* OpenBraceToken */ + ), N.createToken( + 107 + /* ReturnKeyword */ + )], { joiner: " ", suffix: " " }), this.insertNodesAt(t, n.body.end, [N.createToken( + 27 + /* SemicolonToken */ + ), N.createToken( + 20 + /* CloseBraceToken */ + )], { joiner: " " })); + } else { + const s = Xa(n, n.kind === 218 ? 100 : 86, t).end; + this.insertNodeAt(t, s, N.createIdentifier(i), { prefix: " " }); + } + } + insertExportModifier(t, n) { + this.insertText(t, n.getStart(t), "export "); + } + insertImportSpecifierAtIndex(t, n, i, s) { + const o = i.elements[s - 1]; + o ? this.insertNodeInListAfter(t, o, n) : this.insertNodeBefore( + t, + i.elements[0], + n, + !ip(i.elements[0].getStart(), i.parent.parent.getStart(), t) + ); + } + /** + * This function should be used to insert nodes in lists when nodes don't carry separators as the part of the node range, + * i.e. arguments in arguments lists, parameters in parameter lists etc. + * Note that separators are part of the node in statements and class elements. + */ + insertNodeInListAfter(t, n, i, s = Qc.SmartIndenter.getContainingList(n, t)) { + if (!s) { + E.fail("node is not a list element"); + return; + } + const o = CC(s, n); + if (o < 0) + return; + const c = n.getEnd(); + if (o !== s.length - 1) { + const _ = Si(t, n.end); + if (_ && WH(n, _)) { + const u = s[o + 1], m = JDe(t.text, u.getFullStart()), g = `${Xs(_.kind)}${t.text.substring(_.end, m)}`; + this.insertNodesAt(t, m, [i], { suffix: g }); + } + } else { + const _ = n.getStart(t), u = Wp(_, t); + let m, g = !1; + if (s.length === 1) + m = 28; + else { + const h = tl(n.pos, t); + m = WH(n, h) ? h.kind : 28, g = Wp(s[o - 1].getStart(t), t) !== u; + } + if ((kYe(t.text, n.end) || !ip(s.pos, s.end, t)) && (g = !0), g) { + this.replaceRange(t, np(c), N.createToken(m)); + const h = Qc.SmartIndenter.findFirstNonWhitespaceColumn(u, _, t, this.formatContext.options); + let S = aa( + t.text, + c, + /*stopAfterLineBreak*/ + !0, + /*stopAtComments*/ + !1 + ); + for (; S !== c && yu(t.text.charCodeAt(S - 1)); ) + S--; + this.replaceRange(t, np(S), i, { indentation: h, prefix: this.newLineCharacter }); + } else + this.replaceRange(t, np(c), i, { prefix: `${Xs(m)} ` }); + } + } + parenthesizeExpression(t, n) { + this.replaceRange(t, EJ(n), N.createParenthesizedExpression(n)); + } + finishClassesWithNodesInsertedAtStart() { + this.classesWithNodesInsertedAtStart.forEach(({ node: t, sourceFile: n }) => { + const [i, s] = NYe(t, n); + if (i !== void 0 && s !== void 0) { + const o = UH(t).length === 0, c = ip(i, s, n); + o && c && i !== s - 1 && this.deleteRange(n, np(i, s - 1)), c && this.insertText(n, s - 1, this.newLineCharacter); + } + }); + } + finishDeleteDeclarations() { + const t = /* @__PURE__ */ new Set(); + for (const { sourceFile: n, node: i } of this.deletedNodes) + this.deletedNodes.some((s) => s.sourceFile === n && jse(s.node, i)) || (os(i) ? this.deleteRange(n, DJ(n, i)) : Hue.deleteDeclaration(this, t, n, i)); + t.forEach((n) => { + const i = n.getSourceFile(), s = Qc.SmartIndenter.getContainingList(n, i); + if (n !== _a(s)) return; + const o = AI(s, (c) => !t.has(c), s.length - 2); + o !== -1 && this.deleteRange(i, { pos: s[o].end, end: Vue(i, s[o + 1]) }); + }); + } + /** + * Note: after calling this, the TextChanges object must be discarded! + * @param validate only for tests + * The reason we must validate as part of this method is that `getNonFormattedText` changes the node's positions, + * so we can only call this once and can't get the non-formatted text separately. + */ + getChanges(t) { + this.finishDeleteDeclarations(), this.finishClassesWithNodesInsertedAtStart(); + const n = VH.getTextChangesFromChanges(this.changes, this.newLineCharacter, this.formatContext, t); + return this.newFileChanges && this.newFileChanges.forEach((i, s) => { + n.push(VH.newFileChanges(s, i, this.newLineCharacter, this.formatContext)); + }), n; + } + createNewFile(t, n, i) { + this.insertStatementsInNewFile(n, i, t); + } + }; + function DYe(e) { + if (e.kind !== 219) + return e; + const t = e.parent.kind === 172 ? e.parent : e.parent.parent; + return t.jsDoc = e.jsDoc, t; + } + function wYe(e, t) { + if (e.kind === t.kind) + switch (e.kind) { + case 341: { + const n = e, i = t; + return Me(n.name) && Me(i.name) && n.name.escapedText === i.name.escapedText ? N.createJSDocParameterTag( + /*tagName*/ + void 0, + i.name, + /*isBracketed*/ + !1, + i.typeExpression, + i.isNameFirst, + n.comment + ) : void 0; + } + case 342: + return N.createJSDocReturnTag( + /*tagName*/ + void 0, + t.typeExpression, + e.comment + ); + case 344: + return N.createJSDocTypeTag( + /*tagName*/ + void 0, + t.typeExpression, + e.comment + ); + } + } + function Vue(e, t) { + return aa( + e.text, + tT(e, t, { + leadingTriviaOption: 1 + /* IncludeAll */ + }), + /*stopAfterLineBreak*/ + !1, + /*stopAtComments*/ + !0 + ); + } + function PYe(e, t, n, i) { + const s = Vue(e, i); + if (n === void 0 || ip(xk(e, t, {}), s, e)) + return s; + const o = tl(i.getStart(e), e); + if (WH(t, o)) { + const c = tl(t.getStart(e), e); + if (WH(n, c)) { + const _ = aa( + e.text, + o.getEnd(), + /*stopAfterLineBreak*/ + !0, + /*stopAtComments*/ + !0 + ); + if (ip(c.getStart(e), o.getStart(e), e)) + return yu(e.text.charCodeAt(_ - 1)) ? _ - 1 : _; + if (yu(e.text.charCodeAt(_))) + return _; + } + } + return s; + } + function NYe(e, t) { + const n = Xa(e, 19, t), i = Xa(e, 20, t); + return [n?.end, i?.end]; + } + function UH(e) { + return oa(e) ? e.properties : e.members; + } + var VH; + ((e) => { + function t(_, u, m, g) { + return Li(oC(_, (h) => h.sourceFile.path), (h) => { + const S = h[0].sourceFile, T = W_(h, (D, w) => D.range.pos - w.range.pos || D.range.end - w.range.end); + for (let D = 0; D < T.length - 1; D++) + E.assert(T[D].range.end <= T[D + 1].range.pos, "Changes overlap", () => `${JSON.stringify(T[D].range)} and ${JSON.stringify(T[D + 1].range)}`); + const C = Li(T, (D) => { + const w = W0(D.range), A = D.kind === 1 ? Cr(Jo(D.node)) ?? D.sourceFile : D.kind === 2 ? Cr(Jo(D.nodes[0])) ?? D.sourceFile : D.sourceFile, O = s(D, A, S, u, m, g); + if (!(w.length === O.length && Sae(A.text, O, w.start))) + return SA(w, O); + }); + return C.length > 0 ? { fileName: S.fileName, textChanges: C } : void 0; + }); + } + e.getTextChangesFromChanges = t; + function n(_, u, m, g) { + const h = i(B5(_), u, m, g); + return { fileName: _, textChanges: [SA(ql(0, 0), h)], isNewFile: !0 }; + } + e.newFileChanges = n; + function i(_, u, m, g) { + const h = na(u, (C) => C.statements.map((D) => D === 4 ? "" : c(D, C.oldFile, m).text)).join(m), S = Zx( + "any file name", + h, + { + languageVersion: 99, + jsDocParsingMode: 1 + /* ParseNone */ + }, + /*setParentNodes*/ + !0, + _ + ), T = Qc.formatDocument(S, g); + return que(h, T) + m; + } + e.newFileChangesWorker = i; + function s(_, u, m, g, h, S) { + var T; + if (_.kind === 0) + return ""; + if (_.kind === 3) + return _.text; + const { options: C = {}, range: { pos: D } } = _, w = (F) => o(F, u, m, D, C, g, h, S), A = _.kind === 2 ? _.nodes.map((F) => lC(w(F), g)).join(((T = _.options) == null ? void 0 : T.joiner) || g) : w(_.node), O = C.indentation !== void 0 || Wp(D, u) === D ? A : A.replace(/^\s+/, ""); + return (C.prefix || "") + O + (!C.suffix || Eo(O, C.suffix) ? "" : C.suffix); + } + function o(_, u, m, g, { indentation: h, prefix: S, delta: T }, C, D, w) { + const { node: A, text: O } = c(_, u, C); + w && w(A, O); + const F = j9(D, u), R = h !== void 0 ? h : Qc.SmartIndenter.getIndentation(g, m, F, S === C || Wp(g, u) === g); + T === void 0 && (T = Qc.SmartIndenter.shouldIndentChildNode(F, _) && F.indentSize || 0); + const W = { + text: O, + getLineAndCharacterOfPosition($) { + return js(this, $); + } + }, V = Qc.formatNodeGivenIndentation(A, W, u.languageVariant, R, T, { ...D, options: F }); + return que(O, V); + } + function c(_, u, m) { + const g = zDe(m), h = OA(m); + return u1({ + newLine: h, + neverAsciiEscape: !0, + preserveSourceNewlines: !0, + terminateUnterminatedLiterals: !0 + }, g).writeNode(4, _, u, g), { text: g.getText(), node: qH(_) }; + } + e.getNonformattedText = c; + })(VH || (VH = {})); + function que(e, t) { + for (let n = t.length - 1; n >= 0; n--) { + const { span: i, newText: s } = t[n]; + e = `${e.substring(0, i.start)}${s}${e.substring(Yo(i))}`; + } + return e; + } + function AYe(e) { + return aa(e, 0) === e.length; + } + var IYe = { + ...YN, + factory: aN( + YN.factory.flags | 1, + YN.factory.baseFactory + ) + }; + function qH(e) { + const t = kr(e, qH, IYe, FYe, qH), n = no(t) ? t : Object.create(t); + return Cd(n, MDe(e), RDe(e)), n; + } + function FYe(e, t, n, i, s) { + const o = Or(e, t, n, i, s); + if (!o) + return o; + E.assert(e); + const c = o === e ? N.createNodeArray(o.slice(0)) : o; + return Cd(c, MDe(e), RDe(e)), c; + } + function zDe(e) { + let t = 0; + const n = M3(e), i = (q) => { + q && zue(q, t); + }, s = (q) => { + q && Wue(q, t); + }, o = (q) => { + q && zue(q, t); + }, c = (q) => { + q && Wue(q, t); + }, _ = (q) => { + q && zue(q, t); + }, u = (q) => { + q && Wue(q, t); + }; + function m(q, me) { + if (me || !AYe(q)) { + t = n.getTextPos(); + let Ce = 0; + for (; Ig(q.charCodeAt(q.length - Ce - 1)); ) + Ce++; + t -= Ce; + } + } + function g(q) { + n.write(q), m( + q, + /*force*/ + !1 + ); + } + function h(q) { + n.writeComment(q); + } + function S(q) { + n.writeKeyword(q), m( + q, + /*force*/ + !1 + ); + } + function T(q) { + n.writeOperator(q), m( + q, + /*force*/ + !1 + ); + } + function C(q) { + n.writePunctuation(q), m( + q, + /*force*/ + !1 + ); + } + function D(q) { + n.writeTrailingSemicolon(q), m( + q, + /*force*/ + !1 + ); + } + function w(q) { + n.writeParameter(q), m( + q, + /*force*/ + !1 + ); + } + function A(q) { + n.writeProperty(q), m( + q, + /*force*/ + !1 + ); + } + function O(q) { + n.writeSpace(q), m( + q, + /*force*/ + !1 + ); + } + function F(q) { + n.writeStringLiteral(q), m( + q, + /*force*/ + !1 + ); + } + function R(q, me) { + n.writeSymbol(q, me), m( + q, + /*force*/ + !1 + ); + } + function W(q) { + n.writeLine(q); + } + function V() { + n.increaseIndent(); + } + function $() { + n.decreaseIndent(); + } + function U() { + return n.getText(); + } + function _e(q) { + n.rawWrite(q), m( + q, + /*force*/ + !1 + ); + } + function Z(q) { + n.writeLiteral(q), m( + q, + /*force*/ + !0 + ); + } + function J() { + return n.getTextPos(); + } + function re() { + return n.getLine(); + } + function te() { + return n.getColumn(); + } + function ie() { + return n.getIndent(); + } + function le() { + return n.isAtStartOfLine(); + } + function Te() { + n.clear(), t = 0; + } + return { + onBeforeEmitNode: i, + onAfterEmitNode: s, + onBeforeEmitNodeArray: o, + onAfterEmitNodeArray: c, + onBeforeEmitToken: _, + onAfterEmitToken: u, + write: g, + writeComment: h, + writeKeyword: S, + writeOperator: T, + writePunctuation: C, + writeTrailingSemicolon: D, + writeParameter: w, + writeProperty: A, + writeSpace: O, + writeStringLiteral: F, + writeSymbol: R, + writeLine: W, + increaseIndent: V, + decreaseIndent: $, + getText: U, + rawWrite: _e, + writeLiteral: Z, + getTextPos: J, + getLine: re, + getColumn: te, + getIndent: ie, + isAtStartOfLine: le, + hasTrailingComment: () => n.hasTrailingComment(), + hasTrailingWhitespace: () => n.hasTrailingWhitespace(), + clear: Te + }; + } + function OYe(e) { + let t; + for (const m of e.statements) + if (nm(m)) + t = m; + else + break; + let n = 0; + const i = e.text; + if (t) + return n = t.end, u(), n; + const s = KI(i); + s !== void 0 && (n = s.length, u()); + const o = Fg(i, n); + if (!o) return n; + let c, _; + for (const m of o) { + if (m.kind === 3) { + if (D7(i, m.pos)) { + c = { range: m, pinnedOrTripleSlash: !0 }; + continue; + } + } else if ($j(i, m.pos, m.end)) { + c = { range: m, pinnedOrTripleSlash: !0 }; + continue; + } + if (c) { + if (c.pinnedOrTripleSlash) break; + const g = e.getLineAndCharacterOfPosition(m.pos).line, h = e.getLineAndCharacterOfPosition(c.range.end).line; + if (g >= h + 2) break; + } + if (e.statements.length) { + _ === void 0 && (_ = e.getLineAndCharacterOfPosition(e.statements[0].getStart()).line); + const g = e.getLineAndCharacterOfPosition(m.end).line; + if (_ < g + 2) break; + } + c = { range: m, pinnedOrTripleSlash: !1 }; + } + return c && (n = c.range.end, u()), n; + function u() { + if (n < i.length) { + const m = i.charCodeAt(n); + yu(m) && (n++, n < i.length && m === 13 && i.charCodeAt(n) === 10 && n++); + } + } + } + function WDe(e, t) { + return !J0(e, t) && !lk(e, t) && !dV(e, t) && !Vse(e, t); + } + function LYe(e, t) { + return (m_(e) || ss(e)) && _7(t) && t.name.kind === 167 || qP(e) && qP(t); + } + var Hue; + ((e) => { + function t(o, c, _, u) { + switch (u.kind) { + case 169: { + const T = u.parent; + bo(T) && T.parameters.length === 1 && !Xa(T, 21, _) ? o.replaceNodeWithText(_, u, "()") : l8(o, c, _, u); + break; + } + case 272: + case 271: + const m = _.imports.length && u === ya(_.imports).parent || u === Pn(_.statements, ux); + Uh(o, _, u, { + leadingTriviaOption: m ? 0 : uf(u) ? 2 : 3 + /* StartLine */ + }); + break; + case 208: + const g = u.parent; + g.kind === 207 && u !== _a(g.elements) ? Uh(o, _, u) : l8(o, c, _, u); + break; + case 260: + s(o, c, _, u); + break; + case 168: + l8(o, c, _, u); + break; + case 276: + const S = u.parent; + S.elements.length === 1 ? i(o, _, S) : l8(o, c, _, u); + break; + case 274: + i(o, _, u); + break; + case 27: + Uh(o, _, u, { + trailingTriviaOption: 0 + /* Exclude */ + }); + break; + case 100: + Uh(o, _, u, { + leadingTriviaOption: 0 + /* Exclude */ + }); + break; + case 263: + case 262: + Uh(o, _, u, { + leadingTriviaOption: uf(u) ? 2 : 3 + /* StartLine */ + }); + break; + default: + u.parent ? id(u.parent) && u.parent.name === u ? n(o, _, u.parent) : Fs(u.parent) && as(u.parent.arguments, u) ? l8(o, c, _, u) : Uh(o, _, u) : Uh(o, _, u); + } + } + e.deleteDeclaration = t; + function n(o, c, _) { + if (!_.namedBindings) + Uh(o, c, _.parent); + else { + const u = _.name.getStart(c), m = Si(c, _.name.end); + if (m && m.kind === 28) { + const g = aa( + c.text, + m.end, + /*stopAfterLineBreak*/ + !1, + /*stopAtComments*/ + !0 + ); + o.deleteRange(c, { pos: u, end: g }); + } else + Uh(o, c, _.name); + } + } + function i(o, c, _) { + if (_.parent.name) { + const u = E.checkDefined(Si(c, _.pos - 1)); + o.deleteRange(c, { pos: u.getStart(c), end: _.end }); + } else { + const u = sv( + _, + 272 + /* ImportDeclaration */ + ); + Uh(o, c, u); + } + } + function s(o, c, _, u) { + const { parent: m } = u; + if (m.kind === 299) { + o.deleteNodeRange(_, Xa(m, 21, _), Xa(m, 22, _)); + return; + } + if (m.declarations.length !== 1) { + l8(o, c, _, u); + return; + } + const g = m.parent; + switch (g.kind) { + case 250: + case 249: + o.replaceNode(_, u, N.createObjectLiteralExpression()); + break; + case 248: + Uh(o, _, m); + break; + case 243: + Uh(o, _, g, { + leadingTriviaOption: uf(g) ? 2 : 3 + /* StartLine */ + }); + break; + default: + E.assertNever(g); + } + } + })(Hue || (Hue = {})); + function Uh(e, t, n, i = { + leadingTriviaOption: 1 + /* IncludeAll */ + }) { + const s = tT(t, n, i), o = xk(t, n, i); + e.deleteRange(t, { pos: s, end: o }); + } + function l8(e, t, n, i) { + const s = E.checkDefined(Qc.SmartIndenter.getContainingList(i, n)), o = CC(s, i); + if (E.assert(o !== -1), s.length === 1) { + Uh(e, n, i); + return; + } + E.assert(!t.has(i), "Deleting a node twice"), t.add(i), e.deleteRange(n, { + pos: Vue(n, i), + end: o === s.length - 1 ? xk(n, i, {}) : PYe(n, i, s[o - 1], s[o + 1]) + }); + } + var Qc = {}; + Ec(Qc, { + FormattingContext: () => VDe, + FormattingRequestKind: () => UDe, + RuleAction: () => qDe, + RuleFlags: () => HDe, + SmartIndenter: () => Tm, + anyContext: () => HH, + createTextRangeWithKind: () => QH, + formatDocument: () => EZe, + formatNodeGivenIndentation: () => FZe, + formatOnClosingCurly: () => CZe, + formatOnEnter: () => TZe, + formatOnOpeningCurly: () => kZe, + formatOnSemicolon: () => xZe, + formatSelection: () => DZe, + getAllRules: () => GDe, + getFormatContext: () => dZe, + getFormattingScanner: () => Gue, + getIndentationString: () => o_e, + getRangeOfEnclosingComment: () => ywe + }); + var UDe = /* @__PURE__ */ ((e) => (e[e.FormatDocument = 0] = "FormatDocument", e[e.FormatSelection = 1] = "FormatSelection", e[e.FormatOnEnter = 2] = "FormatOnEnter", e[e.FormatOnSemicolon = 3] = "FormatOnSemicolon", e[e.FormatOnOpeningCurlyBrace = 4] = "FormatOnOpeningCurlyBrace", e[e.FormatOnClosingCurlyBrace = 5] = "FormatOnClosingCurlyBrace", e))(UDe || {}), VDe = class { + constructor(e, t, n) { + this.sourceFile = e, this.formattingRequestKind = t, this.options = n; + } + updateContext(e, t, n, i, s) { + this.currentTokenSpan = E.checkDefined(e), this.currentTokenParent = E.checkDefined(t), this.nextTokenSpan = E.checkDefined(n), this.nextTokenParent = E.checkDefined(i), this.contextNode = E.checkDefined(s), this.contextNodeAllOnSameLine = void 0, this.nextNodeAllOnSameLine = void 0, this.tokensAreOnSameLine = void 0, this.contextNodeBlockIsOnOneLine = void 0, this.nextNodeBlockIsOnOneLine = void 0; + } + ContextNodeAllOnSameLine() { + return this.contextNodeAllOnSameLine === void 0 && (this.contextNodeAllOnSameLine = this.NodeIsOnOneLine(this.contextNode)), this.contextNodeAllOnSameLine; + } + NextNodeAllOnSameLine() { + return this.nextNodeAllOnSameLine === void 0 && (this.nextNodeAllOnSameLine = this.NodeIsOnOneLine(this.nextTokenParent)), this.nextNodeAllOnSameLine; + } + TokensAreOnSameLine() { + if (this.tokensAreOnSameLine === void 0) { + const e = this.sourceFile.getLineAndCharacterOfPosition(this.currentTokenSpan.pos).line, t = this.sourceFile.getLineAndCharacterOfPosition(this.nextTokenSpan.pos).line; + this.tokensAreOnSameLine = e === t; + } + return this.tokensAreOnSameLine; + } + ContextNodeBlockIsOnOneLine() { + return this.contextNodeBlockIsOnOneLine === void 0 && (this.contextNodeBlockIsOnOneLine = this.BlockIsOnOneLine(this.contextNode)), this.contextNodeBlockIsOnOneLine; + } + NextNodeBlockIsOnOneLine() { + return this.nextNodeBlockIsOnOneLine === void 0 && (this.nextNodeBlockIsOnOneLine = this.BlockIsOnOneLine(this.nextTokenParent)), this.nextNodeBlockIsOnOneLine; + } + NodeIsOnOneLine(e) { + const t = this.sourceFile.getLineAndCharacterOfPosition(e.getStart(this.sourceFile)).line, n = this.sourceFile.getLineAndCharacterOfPosition(e.getEnd()).line; + return t === n; + } + BlockIsOnOneLine(e) { + const t = Xa(e, 19, this.sourceFile), n = Xa(e, 20, this.sourceFile); + if (t && n) { + const i = this.sourceFile.getLineAndCharacterOfPosition(t.getEnd()).line, s = this.sourceFile.getLineAndCharacterOfPosition(n.getStart(this.sourceFile)).line; + return i === s; + } + return !1; + } + }, MYe = Og( + 99, + /*skipTrivia*/ + !1, + 0 + /* Standard */ + ), RYe = Og( + 99, + /*skipTrivia*/ + !1, + 1 + /* JSX */ + ); + function Gue(e, t, n, i, s) { + const o = t === 1 ? RYe : MYe; + o.setText(e), o.resetTokenState(n); + let c = !0, _, u, m, g, h; + const S = s({ + advance: T, + readTokenInfo: W, + readEOFTokenRange: $, + isOnToken: U, + isOnEOF: _e, + getCurrentLeadingTrivia: () => _, + lastTrailingTriviaWasNewLine: () => c, + skipToEndOf: J, + skipToStartOf: re, + getTokenFullStart: () => h?.token.pos ?? o.getTokenStart(), + getStartPos: () => h?.token.pos ?? o.getTokenStart() + }); + return h = void 0, o.setText(void 0), S; + function T() { + h = void 0, o.getTokenFullStart() !== n ? c = !!u && _a(u).kind === 4 : o.scan(), _ = void 0, u = void 0; + let ie = o.getTokenFullStart(); + for (; ie < i; ) { + const le = o.getToken(); + if (!RC(le)) + break; + o.scan(); + const Te = { + pos: ie, + end: o.getTokenFullStart(), + kind: le + }; + ie = o.getTokenFullStart(), _ = Pr(_, Te); + } + m = o.getTokenFullStart(); + } + function C(te) { + switch (te.kind) { + case 34: + case 72: + case 73: + case 50: + case 49: + return !0; + } + return !1; + } + function D(te) { + if (te.parent) + switch (te.parent.kind) { + case 291: + case 286: + case 287: + case 285: + return f_(te.kind) || te.kind === 80; + } + return !1; + } + function w(te) { + return Mx(te) || gm(te) && h?.token.kind === 12; + } + function A(te) { + return te.kind === 14; + } + function O(te) { + return te.kind === 17 || te.kind === 18; + } + function F(te) { + return te.parent && hm(te.parent) && te.parent.initializer === te; + } + function R(te) { + return te === 44 || te === 69; + } + function W(te) { + E.assert(U()); + const ie = C(te) ? 1 : A(te) ? 2 : O(te) ? 3 : D(te) ? 4 : w(te) ? 5 : F(te) ? 6 : 0; + if (h && ie === g) + return Z(h, te); + o.getTokenFullStart() !== m && (E.assert(h !== void 0), o.resetTokenState(m), o.scan()); + let le = V(te, ie); + const Te = QH( + o.getTokenFullStart(), + o.getTokenEnd(), + le + ); + for (u && (u = void 0); o.getTokenFullStart() < i && (le = o.scan(), !!RC(le)); ) { + const q = QH( + o.getTokenFullStart(), + o.getTokenEnd(), + le + ); + if (u || (u = []), u.push(q), le === 4) { + o.scan(); + break; + } + } + return h = { leadingTrivia: _, trailingTrivia: u, token: Te }, Z(h, te); + } + function V(te, ie) { + const le = o.getToken(); + switch (g = 0, ie) { + case 1: + if (le === 32) { + g = 1; + const Te = o.reScanGreaterToken(); + return E.assert(te.kind === Te), Te; + } + break; + case 2: + if (R(le)) { + g = 2; + const Te = o.reScanSlashToken(); + return E.assert(te.kind === Te), Te; + } + break; + case 3: + if (le === 20) + return g = 3, o.reScanTemplateToken( + /*isTaggedTemplate*/ + !1 + ); + break; + case 4: + return g = 4, o.scanJsxIdentifier(); + case 5: + return g = 5, o.reScanJsxToken( + /*allowMultilineJsxText*/ + !1 + ); + case 6: + return g = 6, o.reScanJsxAttributeValue(); + case 0: + break; + default: + E.assertNever(ie); + } + return le; + } + function $() { + return E.assert(_e()), QH( + o.getTokenFullStart(), + o.getTokenEnd(), + 1 + /* EndOfFileToken */ + ); + } + function U() { + const te = h ? h.token.kind : o.getToken(); + return te !== 1 && !RC(te); + } + function _e() { + return (h ? h.token.kind : o.getToken()) === 1; + } + function Z(te, ie) { + return rx(ie) && te.token.kind !== ie.kind && (te.token.kind = ie.kind), te; + } + function J(te) { + o.resetTokenState(te.end), m = o.getTokenFullStart(), g = void 0, h = void 0, c = !1, _ = void 0, u = void 0; + } + function re(te) { + o.resetTokenState(te.pos), m = o.getTokenFullStart(), g = void 0, h = void 0, c = !1, _ = void 0, u = void 0; + } + } + var HH = He, qDe = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.StopProcessingSpaceActions = 1] = "StopProcessingSpaceActions", e[e.StopProcessingTokenActions = 2] = "StopProcessingTokenActions", e[e.InsertSpace = 4] = "InsertSpace", e[e.InsertNewLine = 8] = "InsertNewLine", e[e.DeleteSpace = 16] = "DeleteSpace", e[e.DeleteToken = 32] = "DeleteToken", e[e.InsertTrailingSemicolon = 64] = "InsertTrailingSemicolon", e[e.StopAction = 3] = "StopAction", e[e.ModifySpaceAction = 28] = "ModifySpaceAction", e[e.ModifyTokenAction = 96] = "ModifyTokenAction", e))(qDe || {}), HDe = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.CanDeleteNewLines = 1] = "CanDeleteNewLines", e))(HDe || {}); + function GDe() { + const e = []; + for (let V = 0; V <= 165; V++) + V !== 1 && e.push(V); + function t(...V) { + return { tokens: e.filter(($) => !V.some((U) => U === $)), isSpecific: !1 }; + } + const n = { tokens: e, isSpecific: !1 }, i = ww([ + ...e, + 3 + /* MultiLineCommentTrivia */ + ]), s = ww([ + ...e, + 1 + /* EndOfFileToken */ + ]), o = XDe( + 83, + 165 + /* LastKeyword */ + ), c = XDe( + 30, + 79 + /* LastBinaryOperator */ + ), _ = [ + 103, + 104, + 165, + 130, + 142, + 152 + /* SatisfiesKeyword */ + ], u = [ + 46, + 47, + 55, + 54 + /* ExclamationToken */ + ], m = [ + 9, + 10, + 80, + 21, + 23, + 19, + 110, + 105 + /* NewKeyword */ + ], g = [ + 80, + 21, + 110, + 105 + /* NewKeyword */ + ], h = [ + 80, + 22, + 24, + 105 + /* NewKeyword */ + ], S = [ + 80, + 21, + 110, + 105 + /* NewKeyword */ + ], T = [ + 80, + 22, + 24, + 105 + /* NewKeyword */ + ], C = [ + 2, + 3 + /* MultiLineCommentTrivia */ + ], D = [80, ...xV], w = i, A = ww([ + 80, + 32, + 3, + 86, + 95, + 102 + /* ImportKeyword */ + ]), O = ww([ + 22, + 3, + 92, + 113, + 98, + 93, + 85 + /* CatchKeyword */ + ]), F = [ + // Leave comments alone + Wn( + "IgnoreBeforeComment", + n, + C, + HH, + 1 + /* StopProcessingSpaceActions */ + ), + Wn( + "IgnoreAfterLineComment", + 2, + n, + HH, + 1 + /* StopProcessingSpaceActions */ + ), + Wn( + "NotSpaceBeforeColon", + n, + 59, + [Fi, PL, ZDe], + 16 + /* DeleteSpace */ + ), + Wn( + "SpaceAfterColon", + 59, + n, + [Fi, PL, eZe], + 4 + /* InsertSpace */ + ), + Wn( + "NoSpaceBeforeQuestionMark", + n, + 58, + [Fi, PL, ZDe], + 16 + /* DeleteSpace */ + ), + // insert space after '?' only when it is used in conditional operator + Wn( + "SpaceAfterQuestionMarkInConditionalOperator", + 58, + n, + [Fi, zYe], + 4 + /* InsertSpace */ + ), + // in other cases there should be no space between '?' and next token + Wn( + "NoSpaceAfterQuestionMark", + 58, + n, + [Fi, JYe], + 16 + /* DeleteSpace */ + ), + Wn( + "NoSpaceBeforeDot", + n, + [ + 25, + 29 + /* QuestionDotToken */ + ], + [Fi, pZe], + 16 + /* DeleteSpace */ + ), + Wn( + "NoSpaceAfterDot", + [ + 25, + 29 + /* QuestionDotToken */ + ], + n, + [Fi], + 16 + /* DeleteSpace */ + ), + Wn( + "NoSpaceBetweenImportParenInImportType", + 102, + 21, + [Fi, ZYe], + 16 + /* DeleteSpace */ + ), + // Special handling of unary operators. + // Prefix operators generally shouldn't have a space between + // them and their target unary expression. + Wn( + "NoSpaceAfterUnaryPrefixOperator", + u, + m, + [Fi, PL], + 16 + /* DeleteSpace */ + ), + Wn( + "NoSpaceAfterUnaryPreincrementOperator", + 46, + g, + [Fi], + 16 + /* DeleteSpace */ + ), + Wn( + "NoSpaceAfterUnaryPredecrementOperator", + 47, + S, + [Fi], + 16 + /* DeleteSpace */ + ), + Wn( + "NoSpaceBeforeUnaryPostincrementOperator", + h, + 46, + [Fi, dwe], + 16 + /* DeleteSpace */ + ), + Wn( + "NoSpaceBeforeUnaryPostdecrementOperator", + T, + 47, + [Fi, dwe], + 16 + /* DeleteSpace */ + ), + // More unary operator special-casing. + // DevDiv 181814: Be careful when removing leading whitespace + // around unary operators. Examples: + // 1 - -2 --X--> 1--2 + // a + ++b --X--> a+++b + Wn( + "SpaceAfterPostincrementWhenFollowedByAdd", + 46, + 40, + [Fi, d1], + 4 + /* InsertSpace */ + ), + Wn( + "SpaceAfterAddWhenFollowedByUnaryPlus", + 40, + 40, + [Fi, d1], + 4 + /* InsertSpace */ + ), + Wn( + "SpaceAfterAddWhenFollowedByPreincrement", + 40, + 46, + [Fi, d1], + 4 + /* InsertSpace */ + ), + Wn( + "SpaceAfterPostdecrementWhenFollowedBySubtract", + 47, + 41, + [Fi, d1], + 4 + /* InsertSpace */ + ), + Wn( + "SpaceAfterSubtractWhenFollowedByUnaryMinus", + 41, + 41, + [Fi, d1], + 4 + /* InsertSpace */ + ), + Wn( + "SpaceAfterSubtractWhenFollowedByPredecrement", + 41, + 47, + [Fi, d1], + 4 + /* InsertSpace */ + ), + Wn( + "NoSpaceAfterCloseBrace", + 20, + [ + 28, + 27 + /* SemicolonToken */ + ], + [Fi], + 16 + /* DeleteSpace */ + ), + // For functions and control block place } on a new line [multi-line rule] + Wn( + "NewLineBeforeCloseBraceInBlockContext", + i, + 20, + [ewe], + 8 + /* InsertNewLine */ + ), + // Space/new line after }. + Wn( + "SpaceAfterCloseBrace", + 20, + t( + 22 + /* CloseParenToken */ + ), + [Fi, VYe], + 4 + /* InsertSpace */ + ), + // Special case for (}, else) and (}, while) since else & while tokens are not part of the tree which makes SpaceAfterCloseBrace rule not applied + // Also should not apply to }) + Wn( + "SpaceBetweenCloseBraceAndElse", + 20, + 93, + [Fi], + 4 + /* InsertSpace */ + ), + Wn( + "SpaceBetweenCloseBraceAndWhile", + 20, + 117, + [Fi], + 4 + /* InsertSpace */ + ), + Wn( + "NoSpaceBetweenEmptyBraceBrackets", + 19, + 20, + [Fi, awe], + 16 + /* DeleteSpace */ + ), + // Add a space after control dec context if the next character is an open bracket ex: 'if (false)[a, b] = [1, 2];' -> 'if (false) [a, b] = [1, 2];' + Wn( + "SpaceAfterConditionalClosingParen", + 22, + 23, + [NL], + 4 + /* InsertSpace */ + ), + Wn( + "NoSpaceBetweenFunctionKeywordAndStar", + 100, + 42, + [nwe], + 16 + /* DeleteSpace */ + ), + Wn( + "SpaceAfterStarInGeneratorDeclaration", + 42, + 80, + [nwe], + 4 + /* InsertSpace */ + ), + Wn( + "SpaceAfterFunctionInFuncDecl", + 100, + n, + [rT], + 4 + /* InsertSpace */ + ), + // Insert new line after { and before } in multi-line contexts. + Wn( + "NewLineAfterOpenBraceInBlockContext", + 19, + n, + [ewe], + 8 + /* InsertNewLine */ + ), + // For get/set members, we check for (identifier,identifier) since get/set don't have tokens and they are represented as just an identifier token. + // Though, we do extra check on the context to make sure we are dealing with get/set node. Example: + // get x() {} + // set x(val) {} + Wn( + "SpaceAfterGetSetInMember", + [ + 139, + 153 + /* SetKeyword */ + ], + 80, + [rT], + 4 + /* InsertSpace */ + ), + Wn( + "NoSpaceBetweenYieldKeywordAndStar", + 127, + 42, + [Fi, pwe], + 16 + /* DeleteSpace */ + ), + Wn( + "SpaceBetweenYieldOrYieldStarAndOperand", + [ + 127, + 42 + /* AsteriskToken */ + ], + n, + [Fi, pwe], + 4 + /* InsertSpace */ + ), + Wn( + "NoSpaceBetweenReturnAndSemicolon", + 107, + 27, + [Fi], + 16 + /* DeleteSpace */ + ), + Wn( + "SpaceAfterCertainKeywords", + [ + 115, + 111, + 105, + 91, + 107, + 114, + 135 + /* AwaitKeyword */ + ], + n, + [Fi], + 4 + /* InsertSpace */ + ), + Wn( + "SpaceAfterLetConstInVariableDeclaration", + [ + 121, + 87 + /* ConstKeyword */ + ], + n, + [Fi, nZe], + 4 + /* InsertSpace */ + ), + Wn( + "NoSpaceBeforeOpenParenInFuncCall", + n, + 21, + [Fi, GYe, $Ye], + 16 + /* DeleteSpace */ + ), + // Special case for binary operators (that are keywords). For these we have to add a space and shouldn't follow any user options. + Wn( + "SpaceBeforeBinaryKeywordOperator", + n, + _, + [Fi, d1], + 4 + /* InsertSpace */ + ), + Wn( + "SpaceAfterBinaryKeywordOperator", + _, + n, + [Fi, d1], + 4 + /* InsertSpace */ + ), + Wn( + "SpaceAfterVoidOperator", + 116, + n, + [Fi, cZe], + 4 + /* InsertSpace */ + ), + // Async-await + Wn( + "SpaceBetweenAsyncAndOpenParen", + 134, + 21, + [YYe, Fi], + 4 + /* InsertSpace */ + ), + Wn( + "SpaceBetweenAsyncAndFunctionKeyword", + 134, + [ + 100, + 80 + /* Identifier */ + ], + [Fi], + 4 + /* InsertSpace */ + ), + // Template string + Wn( + "NoSpaceBetweenTagAndTemplateString", + [ + 80, + 22 + /* CloseParenToken */ + ], + [ + 15, + 16 + /* TemplateHead */ + ], + [Fi], + 16 + /* DeleteSpace */ + ), + // JSX opening elements + Wn( + "SpaceBeforeJsxAttribute", + n, + 80, + [KYe, Fi], + 4 + /* InsertSpace */ + ), + Wn( + "SpaceBeforeSlashInJsxOpeningElement", + n, + 44, + [uwe, Fi], + 4 + /* InsertSpace */ + ), + Wn( + "NoSpaceBeforeGreaterThanTokenInJsxOpeningElement", + 44, + 32, + [uwe, Fi], + 16 + /* DeleteSpace */ + ), + Wn( + "NoSpaceBeforeEqualInJsxAttribute", + n, + 64, + [cwe, Fi], + 16 + /* DeleteSpace */ + ), + Wn( + "NoSpaceAfterEqualInJsxAttribute", + 64, + n, + [cwe, Fi], + 16 + /* DeleteSpace */ + ), + Wn( + "NoSpaceBeforeJsxNamespaceColon", + 80, + 59, + [lwe], + 16 + /* DeleteSpace */ + ), + Wn( + "NoSpaceAfterJsxNamespaceColon", + 59, + 80, + [lwe], + 16 + /* DeleteSpace */ + ), + // TypeScript-specific rules + // Use of module as a function call. e.g.: import m2 = module("m2"); + Wn( + "NoSpaceAfterModuleImport", + [ + 144, + 149 + /* RequireKeyword */ + ], + 21, + [Fi], + 16 + /* DeleteSpace */ + ), + // Add a space around certain TypeScript keywords + Wn( + "SpaceAfterCertainTypeScriptKeywords", + [ + 128, + 129, + 86, + 138, + 90, + 94, + 95, + 96, + 139, + 119, + 102, + 120, + 144, + 145, + 123, + 125, + 124, + 148, + 153, + 126, + 156, + 161, + 143, + 140 + /* InferKeyword */ + ], + n, + [Fi], + 4 + /* InsertSpace */ + ), + Wn( + "SpaceBeforeCertainTypeScriptKeywords", + n, + [ + 96, + 119, + 161 + /* FromKeyword */ + ], + [Fi], + 4 + /* InsertSpace */ + ), + // Treat string literals in module names as identifiers, and add a space between the literal and the opening Brace braces, e.g.: module "m2" { + Wn( + "SpaceAfterModuleName", + 11, + 19, + [iZe], + 4 + /* InsertSpace */ + ), + // Lambda expressions + Wn( + "SpaceBeforeArrow", + n, + 39, + [Fi], + 4 + /* InsertSpace */ + ), + Wn( + "SpaceAfterArrow", + 39, + n, + [Fi], + 4 + /* InsertSpace */ + ), + // Optional parameters and let args + Wn( + "NoSpaceAfterEllipsis", + 26, + 80, + [Fi], + 16 + /* DeleteSpace */ + ), + Wn( + "NoSpaceAfterOptionalParameters", + 58, + [ + 22, + 28 + /* CommaToken */ + ], + [Fi, PL], + 16 + /* DeleteSpace */ + ), + // Remove spaces in empty interface literals. e.g.: x: {} + Wn( + "NoSpaceBetweenEmptyInterfaceBraceBrackets", + 19, + 20, + [Fi, sZe], + 16 + /* DeleteSpace */ + ), + // generics and type assertions + Wn( + "NoSpaceBeforeOpenAngularBracket", + D, + 30, + [Fi, AL], + 16 + /* DeleteSpace */ + ), + Wn( + "NoSpaceBetweenCloseParenAndAngularBracket", + 22, + 30, + [Fi, AL], + 16 + /* DeleteSpace */ + ), + Wn( + "NoSpaceAfterOpenAngularBracket", + 30, + n, + [Fi, AL], + 16 + /* DeleteSpace */ + ), + Wn( + "NoSpaceBeforeCloseAngularBracket", + n, + 32, + [Fi, AL], + 16 + /* DeleteSpace */ + ), + Wn( + "NoSpaceAfterCloseAngularBracket", + 32, + [ + 21, + 23, + 32, + 28 + /* CommaToken */ + ], + [ + Fi, + AL, + UYe, + /*To prevent an interference with the SpaceBeforeOpenParenInFuncDecl rule*/ + oZe + ], + 16 + /* DeleteSpace */ + ), + // decorators + Wn( + "SpaceBeforeAt", + [ + 22, + 80 + /* Identifier */ + ], + 60, + [Fi], + 4 + /* InsertSpace */ + ), + Wn( + "NoSpaceAfterAt", + 60, + n, + [Fi], + 16 + /* DeleteSpace */ + ), + // Insert space after @ in decorator + Wn( + "SpaceAfterDecorator", + n, + [ + 128, + 80, + 95, + 90, + 86, + 126, + 125, + 123, + 124, + 139, + 153, + 23, + 42 + /* AsteriskToken */ + ], + [rZe], + 4 + /* InsertSpace */ + ), + Wn( + "NoSpaceBeforeNonNullAssertionOperator", + n, + 54, + [Fi, lZe], + 16 + /* DeleteSpace */ + ), + Wn( + "NoSpaceAfterNewKeywordOnConstructorSignature", + 105, + 21, + [Fi, aZe], + 16 + /* DeleteSpace */ + ), + Wn( + "SpaceLessThanAndNonJSXTypeAnnotation", + 30, + 30, + [Fi], + 4 + /* InsertSpace */ + ) + ], R = [ + // Treat constructor as an identifier in a function declaration, and remove spaces between constructor and following left parentheses + Wn( + "SpaceAfterConstructor", + 137, + 21, + [Mf("insertSpaceAfterConstructor"), Fi], + 4 + /* InsertSpace */ + ), + Wn( + "NoSpaceAfterConstructor", + 137, + 21, + [Sm("insertSpaceAfterConstructor"), Fi], + 16 + /* DeleteSpace */ + ), + Wn( + "SpaceAfterComma", + 28, + n, + [Mf("insertSpaceAfterCommaDelimiter"), Fi, e_e, XYe, QYe], + 4 + /* InsertSpace */ + ), + Wn( + "NoSpaceAfterComma", + 28, + n, + [Sm("insertSpaceAfterCommaDelimiter"), Fi, e_e], + 16 + /* DeleteSpace */ + ), + // Insert space after function keyword for anonymous functions + Wn( + "SpaceAfterAnonymousFunctionKeyword", + [ + 100, + 42 + /* AsteriskToken */ + ], + 21, + [Mf("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), rT], + 4 + /* InsertSpace */ + ), + Wn( + "NoSpaceAfterAnonymousFunctionKeyword", + [ + 100, + 42 + /* AsteriskToken */ + ], + 21, + [Sm("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), rT], + 16 + /* DeleteSpace */ + ), + // Insert space after keywords in control flow statements + Wn( + "SpaceAfterKeywordInControl", + o, + 21, + [Mf("insertSpaceAfterKeywordsInControlFlowStatements"), NL], + 4 + /* InsertSpace */ + ), + Wn( + "NoSpaceAfterKeywordInControl", + o, + 21, + [Sm("insertSpaceAfterKeywordsInControlFlowStatements"), NL], + 16 + /* DeleteSpace */ + ), + // Insert space after opening and before closing nonempty parenthesis + Wn( + "SpaceAfterOpenParen", + 21, + n, + [Mf("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), Fi], + 4 + /* InsertSpace */ + ), + Wn( + "SpaceBeforeCloseParen", + n, + 22, + [Mf("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), Fi], + 4 + /* InsertSpace */ + ), + Wn( + "SpaceBetweenOpenParens", + 21, + 21, + [Mf("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), Fi], + 4 + /* InsertSpace */ + ), + Wn( + "NoSpaceBetweenParens", + 21, + 22, + [Fi], + 16 + /* DeleteSpace */ + ), + Wn( + "NoSpaceAfterOpenParen", + 21, + n, + [Sm("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), Fi], + 16 + /* DeleteSpace */ + ), + Wn( + "NoSpaceBeforeCloseParen", + n, + 22, + [Sm("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), Fi], + 16 + /* DeleteSpace */ + ), + // Insert space after opening and before closing nonempty brackets + Wn( + "SpaceAfterOpenBracket", + 23, + n, + [Mf("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), Fi], + 4 + /* InsertSpace */ + ), + Wn( + "SpaceBeforeCloseBracket", + n, + 24, + [Mf("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), Fi], + 4 + /* InsertSpace */ + ), + Wn( + "NoSpaceBetweenBrackets", + 23, + 24, + [Fi], + 16 + /* DeleteSpace */ + ), + Wn( + "NoSpaceAfterOpenBracket", + 23, + n, + [Sm("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), Fi], + 16 + /* DeleteSpace */ + ), + Wn( + "NoSpaceBeforeCloseBracket", + n, + 24, + [Sm("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), Fi], + 16 + /* DeleteSpace */ + ), + // Insert a space after { and before } in single-line contexts, but remove space from empty object literals {}. + Wn( + "SpaceAfterOpenBrace", + 19, + n, + [YDe("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), KDe], + 4 + /* InsertSpace */ + ), + Wn( + "SpaceBeforeCloseBrace", + n, + 20, + [YDe("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), KDe], + 4 + /* InsertSpace */ + ), + Wn( + "NoSpaceBetweenEmptyBraceBrackets", + 19, + 20, + [Fi, awe], + 16 + /* DeleteSpace */ + ), + Wn( + "NoSpaceAfterOpenBrace", + 19, + n, + [$ue("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), Fi], + 16 + /* DeleteSpace */ + ), + Wn( + "NoSpaceBeforeCloseBrace", + n, + 20, + [$ue("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), Fi], + 16 + /* DeleteSpace */ + ), + // Insert a space after opening and before closing empty brace brackets + Wn( + "SpaceBetweenEmptyBraceBrackets", + 19, + 20, + [Mf("insertSpaceAfterOpeningAndBeforeClosingEmptyBraces")], + 4 + /* InsertSpace */ + ), + Wn( + "NoSpaceBetweenEmptyBraceBrackets", + 19, + 20, + [$ue("insertSpaceAfterOpeningAndBeforeClosingEmptyBraces"), Fi], + 16 + /* DeleteSpace */ + ), + // Insert space after opening and before closing template string braces + Wn( + "SpaceAfterTemplateHeadAndMiddle", + [ + 16, + 17 + /* TemplateMiddle */ + ], + n, + [Mf("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), owe], + 4, + 1 + /* CanDeleteNewLines */ + ), + Wn( + "SpaceBeforeTemplateMiddleAndTail", + n, + [ + 17, + 18 + /* TemplateTail */ + ], + [Mf("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), Fi], + 4 + /* InsertSpace */ + ), + Wn( + "NoSpaceAfterTemplateHeadAndMiddle", + [ + 16, + 17 + /* TemplateMiddle */ + ], + n, + [Sm("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), owe], + 16, + 1 + /* CanDeleteNewLines */ + ), + Wn( + "NoSpaceBeforeTemplateMiddleAndTail", + n, + [ + 17, + 18 + /* TemplateTail */ + ], + [Sm("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), Fi], + 16 + /* DeleteSpace */ + ), + // No space after { and before } in JSX expression + Wn( + "SpaceAfterOpenBraceInJsxExpression", + 19, + n, + [Mf("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), Fi, $H], + 4 + /* InsertSpace */ + ), + Wn( + "SpaceBeforeCloseBraceInJsxExpression", + n, + 20, + [Mf("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), Fi, $H], + 4 + /* InsertSpace */ + ), + Wn( + "NoSpaceAfterOpenBraceInJsxExpression", + 19, + n, + [Sm("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), Fi, $H], + 16 + /* DeleteSpace */ + ), + Wn( + "NoSpaceBeforeCloseBraceInJsxExpression", + n, + 20, + [Sm("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), Fi, $H], + 16 + /* DeleteSpace */ + ), + // Insert space after semicolon in for statement + Wn( + "SpaceAfterSemicolonInFor", + 27, + n, + [Mf("insertSpaceAfterSemicolonInForStatements"), Fi, Que], + 4 + /* InsertSpace */ + ), + Wn( + "NoSpaceAfterSemicolonInFor", + 27, + n, + [Sm("insertSpaceAfterSemicolonInForStatements"), Fi, Que], + 16 + /* DeleteSpace */ + ), + // Insert space before and after binary operators + Wn( + "SpaceBeforeBinaryOperator", + n, + c, + [Mf("insertSpaceBeforeAndAfterBinaryOperators"), Fi, d1], + 4 + /* InsertSpace */ + ), + Wn( + "SpaceAfterBinaryOperator", + c, + n, + [Mf("insertSpaceBeforeAndAfterBinaryOperators"), Fi, d1], + 4 + /* InsertSpace */ + ), + Wn( + "NoSpaceBeforeBinaryOperator", + n, + c, + [Sm("insertSpaceBeforeAndAfterBinaryOperators"), Fi, d1], + 16 + /* DeleteSpace */ + ), + Wn( + "NoSpaceAfterBinaryOperator", + c, + n, + [Sm("insertSpaceBeforeAndAfterBinaryOperators"), Fi, d1], + 16 + /* DeleteSpace */ + ), + Wn( + "SpaceBeforeOpenParenInFuncDecl", + n, + 21, + [Mf("insertSpaceBeforeFunctionParenthesis"), Fi, rT], + 4 + /* InsertSpace */ + ), + Wn( + "NoSpaceBeforeOpenParenInFuncDecl", + n, + 21, + [Sm("insertSpaceBeforeFunctionParenthesis"), Fi, rT], + 16 + /* DeleteSpace */ + ), + // Open Brace braces after control block + Wn( + "NewLineBeforeOpenBraceInControl", + O, + 19, + [Mf("placeOpenBraceOnNewLineForControlBlocks"), NL, Kue], + 8, + 1 + /* CanDeleteNewLines */ + ), + // Open Brace braces after function + // TypeScript: Function can have return types, which can be made of tons of different token kinds + Wn( + "NewLineBeforeOpenBraceInFunction", + w, + 19, + [Mf("placeOpenBraceOnNewLineForFunctions"), rT, Kue], + 8, + 1 + /* CanDeleteNewLines */ + ), + // Open Brace braces after TypeScript module/class/interface + Wn( + "NewLineBeforeOpenBraceInTypeScriptDeclWithBlock", + A, + 19, + [Mf("placeOpenBraceOnNewLineForFunctions"), iwe, Kue], + 8, + 1 + /* CanDeleteNewLines */ + ), + Wn( + "SpaceAfterTypeAssertion", + 32, + n, + [Mf("insertSpaceAfterTypeAssertion"), Fi, r_e], + 4 + /* InsertSpace */ + ), + Wn( + "NoSpaceAfterTypeAssertion", + 32, + n, + [Sm("insertSpaceAfterTypeAssertion"), Fi, r_e], + 16 + /* DeleteSpace */ + ), + Wn( + "SpaceBeforeTypeAnnotation", + n, + [ + 58, + 59 + /* ColonToken */ + ], + [Mf("insertSpaceBeforeTypeAnnotation"), Fi, Yue], + 4 + /* InsertSpace */ + ), + Wn( + "NoSpaceBeforeTypeAnnotation", + n, + [ + 58, + 59 + /* ColonToken */ + ], + [Sm("insertSpaceBeforeTypeAnnotation"), Fi, Yue], + 16 + /* DeleteSpace */ + ), + Wn( + "NoOptionalSemicolon", + 27, + s, + [QDe( + "semicolons", + "remove" + /* Remove */ + ), _Ze], + 32 + /* DeleteToken */ + ), + Wn( + "OptionalSemicolon", + n, + s, + [QDe( + "semicolons", + "insert" + /* Insert */ + ), fZe], + 64 + /* InsertTrailingSemicolon */ + ) + ], W = [ + // Space after keyword but not before ; or : or ? + Wn( + "NoSpaceBeforeSemicolon", + n, + 27, + [Fi], + 16 + /* DeleteSpace */ + ), + Wn( + "SpaceBeforeOpenBraceInControl", + O, + 19, + [Xue("placeOpenBraceOnNewLineForControlBlocks"), NL, t_e, Zue], + 4, + 1 + /* CanDeleteNewLines */ + ), + Wn( + "SpaceBeforeOpenBraceInFunction", + w, + 19, + [Xue("placeOpenBraceOnNewLineForFunctions"), rT, GH, t_e, Zue], + 4, + 1 + /* CanDeleteNewLines */ + ), + Wn( + "SpaceBeforeOpenBraceInTypeScriptDeclWithBlock", + A, + 19, + [Xue("placeOpenBraceOnNewLineForFunctions"), iwe, t_e, Zue], + 4, + 1 + /* CanDeleteNewLines */ + ), + Wn( + "NoSpaceBeforeComma", + n, + 28, + [Fi], + 16 + /* DeleteSpace */ + ), + // No space before and after indexer `x[]` + Wn( + "NoSpaceBeforeOpenBracket", + t( + 134, + 84 + /* CaseKeyword */ + ), + 23, + [Fi], + 16 + /* DeleteSpace */ + ), + Wn( + "NoSpaceAfterCloseBracket", + 24, + n, + [Fi, tZe], + 16 + /* DeleteSpace */ + ), + Wn( + "SpaceAfterSemicolon", + 27, + n, + [Fi], + 4 + /* InsertSpace */ + ), + // Remove extra space between for and await + Wn( + "SpaceBetweenForAndAwaitKeyword", + 99, + 135, + [Fi], + 4 + /* InsertSpace */ + ), + // Remove extra spaces between ... and type name in tuple spread + Wn( + "SpaceBetweenDotDotDotAndTypeName", + 26, + D, + [Fi], + 16 + /* DeleteSpace */ + ), + // Add a space between statements. All keywords except (do,else,case) has open/close parens after them. + // So, we have a rule to add a space for [),Any], [do,Any], [else,Any], and [case,Any] + Wn( + "SpaceBetweenStatements", + [ + 22, + 92, + 93, + 84 + /* CaseKeyword */ + ], + n, + [Fi, e_e, jYe], + 4 + /* InsertSpace */ + ), + // This low-pri rule takes care of "try {", "catch {" and "finally {" in case the rule SpaceBeforeOpenBraceInControl didn't execute on FormatOnEnter. + Wn( + "SpaceAfterTryCatchFinally", + [ + 113, + 85, + 98 + /* FinallyKeyword */ + ], + 19, + [Fi], + 4 + /* InsertSpace */ + ) + ]; + return [ + ...F, + ...R, + ...W + ]; + } + function Wn(e, t, n, i, s, o = 0) { + return { leftTokenRange: $De(t), rightTokenRange: $De(n), rule: { debugName: e, context: i, action: s, flags: o } }; + } + function ww(e) { + return { tokens: e, isSpecific: !0 }; + } + function $De(e) { + return typeof e == "number" ? ww([e]) : os(e) ? ww(e) : e; + } + function XDe(e, t, n = []) { + const i = []; + for (let s = e; s <= t; s++) + as(n, s) || i.push(s); + return ww(i); + } + function QDe(e, t) { + return (n) => n.options && n.options[e] === t; + } + function Mf(e) { + return (t) => t.options && ro(t.options, e) && !!t.options[e]; + } + function $ue(e) { + return (t) => t.options && ro(t.options, e) && !t.options[e]; + } + function Sm(e) { + return (t) => !t.options || !ro(t.options, e) || !t.options[e]; + } + function Xue(e) { + return (t) => !t.options || !ro(t.options, e) || !t.options[e] || t.TokensAreOnSameLine(); + } + function YDe(e) { + return (t) => !t.options || !ro(t.options, e) || !!t.options[e]; + } + function Que(e) { + return e.contextNode.kind === 248; + } + function jYe(e) { + return !Que(e); + } + function d1(e) { + switch (e.contextNode.kind) { + case 226: + return e.contextNode.operatorToken.kind !== 28; + case 227: + case 194: + case 234: + case 281: + case 276: + case 182: + case 192: + case 193: + case 238: + return !0; + // equals in binding elements: function foo([[x, y] = [1, 2]]) + case 208: + // equals in type X = ... + // falls through + case 265: + // equal in import a = module('a'); + // falls through + case 271: + // equal in export = 1 + // falls through + case 277: + // equal in let a = 0 + // falls through + case 260: + // equal in p = 0 + // falls through + case 169: + case 306: + case 172: + case 171: + return e.currentTokenSpan.kind === 64 || e.nextTokenSpan.kind === 64; + // "in" keyword in for (let x in []) { } + case 249: + // "in" keyword in [P in keyof T]: T[P] + // falls through + case 168: + return e.currentTokenSpan.kind === 103 || e.nextTokenSpan.kind === 103 || e.currentTokenSpan.kind === 64 || e.nextTokenSpan.kind === 64; + // Technically, "of" is not a binary operator, but format it the same way as "in" + case 250: + return e.currentTokenSpan.kind === 165 || e.nextTokenSpan.kind === 165; + } + return !1; + } + function PL(e) { + return !d1(e); + } + function ZDe(e) { + return !Yue(e); + } + function Yue(e) { + const t = e.contextNode.kind; + return t === 172 || t === 171 || t === 169 || t === 260 || nx(t); + } + function BYe(e) { + return ss(e.contextNode) && e.contextNode.questionToken; + } + function JYe(e) { + return !BYe(e); + } + function zYe(e) { + return e.contextNode.kind === 227 || e.contextNode.kind === 194; + } + function Zue(e) { + return e.TokensAreOnSameLine() || GH(e); + } + function KDe(e) { + return e.contextNode.kind === 206 || e.contextNode.kind === 200 || WYe(e); + } + function Kue(e) { + return GH(e) && !(e.NextNodeAllOnSameLine() || e.NextNodeBlockIsOnOneLine()); + } + function ewe(e) { + return twe(e) && !(e.ContextNodeAllOnSameLine() || e.ContextNodeBlockIsOnOneLine()); + } + function WYe(e) { + return twe(e) && (e.ContextNodeAllOnSameLine() || e.ContextNodeBlockIsOnOneLine()); + } + function twe(e) { + return rwe(e.contextNode); + } + function GH(e) { + return rwe(e.nextTokenParent); + } + function rwe(e) { + if (swe(e)) + return !0; + switch (e.kind) { + case 241: + case 269: + case 210: + case 268: + return !0; + } + return !1; + } + function rT(e) { + switch (e.contextNode.kind) { + case 262: + case 174: + case 173: + // case SyntaxKind.MemberFunctionDeclaration: + // falls through + case 177: + case 178: + // case SyntaxKind.MethodSignature: + // falls through + case 179: + case 218: + case 176: + case 219: + // case SyntaxKind.ConstructorDeclaration: + // case SyntaxKind.SimpleArrowFunctionExpression: + // case SyntaxKind.ParenthesizedArrowFunctionExpression: + // falls through + case 264: + return !0; + } + return !1; + } + function UYe(e) { + return !rT(e); + } + function nwe(e) { + return e.contextNode.kind === 262 || e.contextNode.kind === 218; + } + function iwe(e) { + return swe(e.contextNode); + } + function swe(e) { + switch (e.kind) { + case 263: + case 231: + case 264: + case 266: + case 187: + case 267: + case 278: + case 279: + case 272: + case 275: + return !0; + } + return !1; + } + function VYe(e) { + switch (e.currentTokenParent.kind) { + case 263: + case 267: + case 266: + case 299: + case 268: + case 255: + return !0; + case 241: { + const t = e.currentTokenParent.parent; + if (!t || t.kind !== 219 && t.kind !== 218) + return !0; + } + } + return !1; + } + function NL(e) { + switch (e.contextNode.kind) { + case 245: + case 255: + case 248: + case 249: + case 250: + case 247: + case 258: + case 246: + case 254: + // TODO + // case SyntaxKind.ElseClause: + // falls through + case 299: + return !0; + default: + return !1; + } + } + function awe(e) { + return e.contextNode.kind === 210; + } + function qYe(e) { + return e.contextNode.kind === 213; + } + function HYe(e) { + return e.contextNode.kind === 214; + } + function GYe(e) { + return qYe(e) || HYe(e); + } + function $Ye(e) { + return e.currentTokenSpan.kind !== 28; + } + function XYe(e) { + return e.nextTokenSpan.kind !== 24; + } + function QYe(e) { + return e.nextTokenSpan.kind !== 22; + } + function YYe(e) { + return e.contextNode.kind === 219; + } + function ZYe(e) { + return e.contextNode.kind === 205; + } + function Fi(e) { + return e.TokensAreOnSameLine() && e.contextNode.kind !== 12; + } + function owe(e) { + return e.contextNode.kind !== 12; + } + function e_e(e) { + return e.contextNode.kind !== 284 && e.contextNode.kind !== 288; + } + function $H(e) { + return e.contextNode.kind === 294 || e.contextNode.kind === 293; + } + function KYe(e) { + return e.nextTokenParent.kind === 291 || e.nextTokenParent.kind === 295 && e.nextTokenParent.parent.kind === 291; + } + function cwe(e) { + return e.contextNode.kind === 291; + } + function eZe(e) { + return e.nextTokenParent.kind !== 295; + } + function lwe(e) { + return e.nextTokenParent.kind === 295; + } + function uwe(e) { + return e.contextNode.kind === 285; + } + function tZe(e) { + return !rT(e) && !GH(e); + } + function rZe(e) { + return e.TokensAreOnSameLine() && Pf(e.contextNode) && _we(e.currentTokenParent) && !_we(e.nextTokenParent); + } + function _we(e) { + for (; e && ct(e); ) + e = e.parent; + return e && e.kind === 170; + } + function nZe(e) { + return e.currentTokenParent.kind === 261 && e.currentTokenParent.getStart(e.sourceFile) === e.currentTokenSpan.pos; + } + function t_e(e) { + return e.formattingRequestKind !== 2; + } + function iZe(e) { + return e.contextNode.kind === 267; + } + function sZe(e) { + return e.contextNode.kind === 187; + } + function aZe(e) { + return e.contextNode.kind === 180; + } + function fwe(e, t) { + if (e.kind !== 30 && e.kind !== 32) + return !1; + switch (t.kind) { + case 183: + case 216: + case 265: + case 263: + case 231: + case 264: + case 262: + case 218: + case 219: + case 174: + case 173: + case 179: + case 180: + case 213: + case 214: + case 233: + return !0; + default: + return !1; + } + } + function AL(e) { + return fwe(e.currentTokenSpan, e.currentTokenParent) || fwe(e.nextTokenSpan, e.nextTokenParent); + } + function r_e(e) { + return e.contextNode.kind === 216; + } + function oZe(e) { + return !r_e(e); + } + function cZe(e) { + return e.currentTokenSpan.kind === 116 && e.currentTokenParent.kind === 222; + } + function pwe(e) { + return e.contextNode.kind === 229 && e.contextNode.expression !== void 0; + } + function lZe(e) { + return e.contextNode.kind === 235; + } + function dwe(e) { + return !uZe(e); + } + function uZe(e) { + switch (e.contextNode.kind) { + case 245: + case 248: + case 249: + case 250: + case 246: + case 247: + return !0; + default: + return !1; + } + } + function _Ze(e) { + let t = e.nextTokenSpan.kind, n = e.nextTokenSpan.pos; + if (RC(t)) { + const o = e.nextTokenParent === e.currentTokenParent ? _2( + e.currentTokenParent, + ur(e.currentTokenParent, (c) => !c.parent), + e.sourceFile + ) : e.nextTokenParent.getFirstToken(e.sourceFile); + if (!o) + return !0; + t = o.kind, n = o.getStart(e.sourceFile); + } + const i = e.sourceFile.getLineAndCharacterOfPosition(e.currentTokenSpan.pos).line, s = e.sourceFile.getLineAndCharacterOfPosition(n).line; + return i === s ? t === 20 || t === 1 : t === 27 && e.currentTokenSpan.kind === 27 ? !0 : t === 240 || t === 27 ? !1 : e.contextNode.kind === 264 || e.contextNode.kind === 265 ? !m_(e.currentTokenParent) || !!e.currentTokenParent.type || t !== 21 : ss(e.currentTokenParent) ? !e.currentTokenParent.initializer : e.currentTokenParent.kind !== 248 && e.currentTokenParent.kind !== 242 && e.currentTokenParent.kind !== 240 && t !== 23 && t !== 21 && t !== 40 && t !== 41 && t !== 44 && t !== 14 && t !== 28 && t !== 228 && t !== 16 && t !== 15 && t !== 25; + } + function fZe(e) { + return N9(e.currentTokenSpan.end, e.currentTokenParent, e.sourceFile); + } + function pZe(e) { + return !Tn(e.contextNode) || !d_(e.contextNode.expression) || e.contextNode.expression.getText().includes("."); + } + function dZe(e, t) { + return { options: e, getRules: mZe(), host: t }; + } + var n_e; + function mZe() { + return n_e === void 0 && (n_e = hZe(GDe())), n_e; + } + function gZe(e) { + let t = 0; + return e & 1 && (t |= 28), e & 2 && (t |= 96), e & 28 && (t |= 28), e & 96 && (t |= 96), t; + } + function hZe(e) { + const t = yZe(e); + return (n) => { + const i = t[mwe(n.currentTokenSpan.kind, n.nextTokenSpan.kind)]; + if (i) { + const s = []; + let o = 0; + for (const c of i) { + const _ = ~gZe(o); + c.action & _ && Ri(c.context, (u) => u(n)) && (s.push(c), o |= c.action); + } + if (s.length) + return s; + } + }; + } + function yZe(e) { + const t = new Array(i_e * i_e), n = new Array(t.length); + for (const i of e) { + const s = i.leftTokenRange.isSpecific && i.rightTokenRange.isSpecific; + for (const o of i.leftTokenRange.tokens) + for (const c of i.rightTokenRange.tokens) { + const _ = mwe(o, c); + let u = t[_]; + u === void 0 && (u = t[_] = []), vZe(u, i.rule, s, n, _); + } + } + return t; + } + function mwe(e, t) { + return E.assert(e <= 165 && t <= 165, "Must compute formatting context from tokens"), e * i_e + t; + } + var Pw = 5, XH = 31, i_e = 166, u8 = ((e) => (e[e.StopRulesSpecific = 0] = "StopRulesSpecific", e[e.StopRulesAny = Pw * 1] = "StopRulesAny", e[e.ContextRulesSpecific = Pw * 2] = "ContextRulesSpecific", e[e.ContextRulesAny = Pw * 3] = "ContextRulesAny", e[e.NoContextRulesSpecific = Pw * 4] = "NoContextRulesSpecific", e[e.NoContextRulesAny = Pw * 5] = "NoContextRulesAny", e))(u8 || {}); + function vZe(e, t, n, i, s) { + const o = t.action & 3 ? n ? 0 : u8.StopRulesAny : t.context !== HH ? n ? u8.ContextRulesSpecific : u8.ContextRulesAny : n ? u8.NoContextRulesSpecific : u8.NoContextRulesAny, c = i[s] || 0; + e.splice(bZe(c, o), 0, t), i[s] = SZe(c, o); + } + function bZe(e, t) { + let n = 0; + for (let i = 0; i <= t; i += Pw) + n += e & XH, e >>= Pw; + return n; + } + function SZe(e, t) { + const n = (e >> t & XH) + 1; + return E.assert((n & XH) === n, "Adding more rules into the sub-bucket than allowed. Maximum allowed is 32 rules."), e & ~(XH << t) | n << t; + } + function QH(e, t, n) { + const i = { pos: e, end: t, kind: n }; + return E.isDebugging && Object.defineProperty(i, "__debugKind", { + get: () => E.formatSyntaxKind(n) + }), i; + } + function TZe(e, t, n) { + const i = t.getLineAndCharacterOfPosition(e).line; + if (i === 0) + return []; + let s = XP(i, t); + for (; em(t.text.charCodeAt(s)); ) + s--; + yu(t.text.charCodeAt(s)) && s--; + const o = { + // get start position for the previous line + pos: Uy(i - 1, t), + // end value is exclusive so add 1 to the result + end: s + 1 + }; + return IL( + o, + t, + n, + 2 + /* FormatOnEnter */ + ); + } + function xZe(e, t, n) { + const i = s_e(e, 27, t); + return gwe( + a_e(i), + t, + n, + 3 + /* FormatOnSemicolon */ + ); + } + function kZe(e, t, n) { + const i = s_e(e, 19, t); + if (!i) + return []; + const s = i.parent, o = a_e(s), c = { + pos: Wp(o.getStart(t), t), + // TODO: GH#18217 + end: e + }; + return IL( + c, + t, + n, + 4 + /* FormatOnOpeningCurlyBrace */ + ); + } + function CZe(e, t, n) { + const i = s_e(e, 20, t); + return gwe( + a_e(i), + t, + n, + 5 + /* FormatOnClosingCurlyBrace */ + ); + } + function EZe(e, t) { + const n = { + pos: 0, + end: e.text.length + }; + return IL( + n, + e, + t, + 0 + /* FormatDocument */ + ); + } + function DZe(e, t, n, i) { + const s = { + pos: Wp(e, n), + end: t + }; + return IL( + s, + n, + i, + 1 + /* FormatSelection */ + ); + } + function s_e(e, t, n) { + const i = tl(e, n); + return i && i.kind === t && e === i.getEnd() ? i : void 0; + } + function a_e(e) { + let t = e; + for (; t && t.parent && t.parent.end === e.end && !wZe(t.parent, t); ) + t = t.parent; + return t; + } + function wZe(e, t) { + switch (e.kind) { + case 263: + case 264: + return p_(e.members, t); + case 267: + const n = e.body; + return !!n && n.kind === 268 && p_(n.statements, t); + case 307: + case 241: + case 268: + return p_(e.statements, t); + case 299: + return p_(e.block.statements, t); + } + return !1; + } + function PZe(e, t) { + return n(t); + function n(i) { + const s = ms(i, (o) => rJ(o.getStart(t), o.end, e) && o); + if (s) { + const o = n(s); + if (o) + return o; + } + return i; + } + } + function NZe(e, t) { + if (!e.length) + return s; + const n = e.filter((o) => iw(t, o.start, o.start + o.length)).sort((o, c) => o.start - c.start); + if (!n.length) + return s; + let i = 0; + return (o) => { + for (; ; ) { + if (i >= n.length) + return !1; + const c = n[i]; + if (o.end <= c.start) + return !1; + if (u9(o.pos, o.end, c.start, c.start + c.length)) + return !0; + i++; + } + }; + function s() { + return !1; + } + } + function AZe(e, t, n) { + const i = e.getStart(n); + if (i === t.pos && e.end === t.end) + return i; + const s = tl(t.pos, n); + return !s || s.end >= t.pos ? e.pos : s.end; + } + function IZe(e, t, n) { + let i = -1, s; + for (; e; ) { + const o = n.getLineAndCharacterOfPosition(e.getStart(n)).line; + if (i !== -1 && o !== i) + break; + if (Tm.shouldIndentChildNode(t, e, s, n)) + return t.indentSize; + i = o, s = e, e = e.parent; + } + return 0; + } + function FZe(e, t, n, i, s, o) { + const c = { pos: e.pos, end: e.end }; + return Gue(t.text, n, c.pos, c.end, (_) => hwe( + c, + e, + i, + s, + _, + o, + 1, + (u) => !1, + // assume that node does not have any errors + t + )); + } + function gwe(e, t, n, i) { + if (!e) + return []; + const s = { + pos: Wp(e.getStart(t), t), + end: e.end + }; + return IL(s, t, n, i); + } + function IL(e, t, n, i) { + const s = PZe(e, t); + return Gue( + t.text, + t.languageVariant, + AZe(s, e, t), + e.end, + (o) => hwe( + e, + s, + Tm.getIndentationForNode(s, e, t, n.options), + IZe(s, n.options, t), + o, + n, + i, + NZe(t.parseDiagnostics, e), + t + ) + ); + } + function hwe(e, t, n, i, s, { options: o, getRules: c, host: _ }, u, m, g) { + var h; + const S = new VDe(g, u, o); + let T, C, D, w, A, O = -1; + const F = []; + if (s.advance(), s.isOnToken()) { + const xe = g.getLineAndCharacterOfPosition(t.getStart(g)).line; + let he = xe; + Pf(t) && (he = g.getLineAndCharacterOfPosition(Xj(t, g)).line), _e(t, t, xe, he, n, i); + } + const R = s.getCurrentLeadingTrivia(); + if (R) { + const xe = Tm.nodeWillIndentChild( + o, + t, + /*child*/ + void 0, + g, + /*indentByDefault*/ + !1 + ) ? n + o.indentSize : n; + Z( + R, + xe, + /*indentNextTokenOrTrivia*/ + !0, + (he) => { + re( + he, + g.getLineAndCharacterOfPosition(he.pos), + t, + t, + /*dynamicIndentation*/ + void 0 + ), ie( + he.pos, + xe, + /*lineAdded*/ + !1 + ); + } + ), o.trimTrailingWhitespace !== !1 && Ee(R); + } + if (C && s.getTokenFullStart() >= e.end) { + const xe = s.isOnEOF() ? s.readEOFTokenRange() : s.isOnToken() ? s.readTokenInfo(t).token : void 0; + if (xe && xe.pos === T) { + const he = ((h = tl(xe.end, g, t)) == null ? void 0 : h.parent) || D; + te( + xe, + g.getLineAndCharacterOfPosition(xe.pos).line, + he, + C, + w, + D, + he, + /*dynamicIndentation*/ + void 0 + ); + } + } + return F; + function W(xe, he, ne, Ae, De) { + if (iw(Ae, xe, he) || yA(Ae, xe, he)) { + if (De !== -1) + return De; + } else { + const we = g.getLineAndCharacterOfPosition(xe).line, Ue = Wp(xe, g), bt = Tm.findFirstNonWhitespaceColumn(Ue, xe, g, o); + if (we !== ne || xe === bt) { + const Lt = Tm.getBaseIndentation(o); + return Lt > bt ? Lt : bt; + } + } + return -1; + } + function V(xe, he, ne, Ae, De, we) { + const Ue = Tm.shouldIndentChildNode(o, xe) ? o.indentSize : 0; + return we === he ? { + indentation: he === A ? O : De.getIndentation(), + delta: Math.min(o.indentSize, De.getDelta(xe) + Ue) + } : ne === -1 ? xe.kind === 21 && he === A ? { indentation: O, delta: De.getDelta(xe) } : Tm.childStartsOnTheSameLineWithElseInIfStatement(Ae, xe, he, g) || Tm.childIsUnindentedBranchOfConditionalExpression(Ae, xe, he, g) || Tm.argumentStartsOnSameLineAsPreviousArgument(Ae, xe, he, g) ? { indentation: De.getIndentation(), delta: Ue } : { indentation: De.getIndentation() + De.getDelta(xe), delta: Ue } : { indentation: ne, delta: Ue }; + } + function $(xe) { + if (Jp(xe)) { + const he = Pn(xe.modifiers, ia, ec(xe.modifiers, ll)); + if (he) return he.kind; + } + switch (xe.kind) { + case 263: + return 86; + case 264: + return 120; + case 262: + return 100; + case 266: + return 266; + case 177: + return 139; + case 178: + return 153; + case 174: + if (xe.asteriskToken) + return 42; + // falls through + case 172: + case 169: + const he = is(xe); + if (he) + return he.kind; + } + } + function U(xe, he, ne, Ae) { + return { + getIndentationForComment: (Ue, bt, Lt) => { + switch (Ue) { + // preceding comment to the token that closes the indentation scope inherits the indentation from the scope + // .. { + // // comment + // } + case 20: + case 24: + case 22: + return ne + we(Lt); + } + return bt !== -1 ? bt : ne; + }, + // if list end token is LessThanToken '>' then its delta should be explicitly suppressed + // so that LessThanToken as a binary operator can still be indented. + // foo.then + // < + // number, + // string, + // >(); + // vs + // var a = xValue + // > yValue; + getIndentationForToken: (Ue, bt, Lt, er) => !er && De(Ue, bt, Lt) ? ne + we(Lt) : ne, + getIndentation: () => ne, + getDelta: we, + recomputeIndentation: (Ue, bt) => { + Tm.shouldIndentChildNode(o, bt, xe, g) && (ne += Ue ? o.indentSize : -o.indentSize, Ae = Tm.shouldIndentChildNode(o, xe) ? o.indentSize : 0); + } + }; + function De(Ue, bt, Lt) { + switch (bt) { + // open and close brace, 'else' and 'while' (in do statement) tokens has indentation of the parent + case 19: + case 20: + case 22: + case 93: + case 117: + case 60: + return !1; + case 44: + case 32: + switch (Lt.kind) { + case 286: + case 287: + case 285: + return !1; + } + break; + case 23: + case 24: + if (Lt.kind !== 200) + return !1; + break; + } + return he !== Ue && !(Pf(xe) && bt === $(xe)); + } + function we(Ue) { + return Tm.nodeWillIndentChild( + o, + xe, + Ue, + g, + /*indentByDefault*/ + !0 + ) ? Ae : 0; + } + } + function _e(xe, he, ne, Ae, De, we) { + if (!iw(e, xe.getStart(g), xe.getEnd())) + return; + const Ue = U(xe, ne, De, we); + let bt = he; + for (ms( + xe, + (Dt) => { + Lt( + Dt, + /*inheritedIndentation*/ + -1, + xe, + Ue, + ne, + Ae, + /*isListItem*/ + !1 + ); + }, + (Dt) => { + er(Dt, xe, ne, Ue); + } + ); s.isOnToken() && s.getTokenFullStart() < e.end; ) { + const Dt = s.readTokenInfo(xe); + if (Dt.token.end > Math.min(xe.end, e.end)) + break; + Nr(Dt, xe, Ue, xe); + } + function Lt(Dt, Qt, Wr, yr, qn, Bt, bi, pi) { + if (E.assert(!no(Dt)), tc(Dt) || AZ(Wr, Dt)) + return Qt; + const Xn = Dt.getStart(g), jr = g.getLineAndCharacterOfPosition(Xn).line; + let di = jr; + Pf(Dt) && (di = g.getLineAndCharacterOfPosition(Xj(Dt, g)).line); + let Re = -1; + if (bi && p_(e, Wr) && (Re = W(Xn, Dt.end, qn, e, Qt), Re !== -1 && (Qt = Re)), !iw(e, Dt.pos, Dt.end)) + return Dt.end < e.pos && s.skipToEndOf(Dt), Qt; + if (Dt.getFullWidth() === 0) + return Qt; + for (; s.isOnToken() && s.getTokenFullStart() < e.end; ) { + const qr = s.readTokenInfo(xe); + if (qr.token.end > e.end) + return Qt; + if (qr.token.end > Xn) { + qr.token.pos > Xn && s.skipToStartOf(Dt); + break; + } + Nr(qr, xe, yr, xe); + } + if (!s.isOnToken() || s.getTokenFullStart() >= e.end) + return Qt; + if (rx(Dt)) { + const qr = s.readTokenInfo(Dt); + if (Dt.kind !== 12) + return E.assert(qr.token.end === Dt.end, "Token end is child end"), Nr(qr, xe, yr, Dt), Qt; + } + const gt = Dt.kind === 170 ? jr : Bt, tr = V(Dt, jr, Re, xe, yr, gt); + return _e(Dt, bt, jr, di, tr.indentation, tr.delta), bt = xe, pi && Wr.kind === 209 && Qt === -1 && (Qt = tr.indentation), Qt; + } + function er(Dt, Qt, Wr, yr) { + E.assert(xb(Dt)), E.assert(!no(Dt)); + const qn = OZe(Qt, Dt); + let Bt = yr, bi = Wr; + if (!iw(e, Dt.pos, Dt.end)) { + Dt.end < e.pos && s.skipToEndOf(Dt); + return; + } + if (qn !== 0) + for (; s.isOnToken() && s.getTokenFullStart() < e.end; ) { + const jr = s.readTokenInfo(Qt); + if (jr.token.end > Dt.pos) + break; + if (jr.token.kind === qn) { + bi = g.getLineAndCharacterOfPosition(jr.token.pos).line, Nr(jr, Qt, yr, Qt); + let di; + if (O !== -1) + di = O; + else { + const Re = Wp(jr.token.pos, g); + di = Tm.findFirstNonWhitespaceColumn(Re, jr.token.pos, g, o); + } + Bt = U(Qt, Wr, di, o.indentSize); + } else + Nr(jr, Qt, yr, Qt); + } + let pi = -1; + for (let jr = 0; jr < Dt.length; jr++) { + const di = Dt[jr]; + pi = Lt( + di, + pi, + xe, + Bt, + bi, + bi, + /*isListItem*/ + !0, + /*isFirstListItem*/ + jr === 0 + ); + } + const Xn = LZe(qn); + if (Xn !== 0 && s.isOnToken() && s.getTokenFullStart() < e.end) { + let jr = s.readTokenInfo(Qt); + jr.token.kind === 28 && (Nr(jr, Qt, Bt, Qt), jr = s.isOnToken() ? s.readTokenInfo(Qt) : void 0), jr && jr.token.kind === Xn && p_(Qt, jr.token) && Nr( + jr, + Qt, + Bt, + Qt, + /*isListEndToken*/ + !0 + ); + } + } + function Nr(Dt, Qt, Wr, yr, qn) { + E.assert(p_(Qt, Dt.token)); + const Bt = s.lastTrailingTriviaWasNewLine(); + let bi = !1; + Dt.leadingTrivia && J(Dt.leadingTrivia, Qt, bt, Wr); + let pi = 0; + const Xn = p_(e, Dt.token), jr = g.getLineAndCharacterOfPosition(Dt.token.pos); + if (Xn) { + const di = m(Dt.token), Re = C; + if (pi = re(Dt.token, jr, Qt, bt, Wr), !di) + if (pi === 0) { + const gt = Re && g.getLineAndCharacterOfPosition(Re.end).line; + bi = Bt && jr.line !== gt; + } else + bi = pi === 1; + } + if (Dt.trailingTrivia && (T = _a(Dt.trailingTrivia).end, J(Dt.trailingTrivia, Qt, bt, Wr)), bi) { + const di = Xn && !m(Dt.token) ? Wr.getIndentationForToken(jr.line, Dt.token.kind, yr, !!qn) : -1; + let Re = !0; + if (Dt.leadingTrivia) { + const gt = Wr.getIndentationForComment(Dt.token.kind, di, yr); + Re = Z(Dt.leadingTrivia, gt, Re, (tr) => ie( + tr.pos, + gt, + /*lineAdded*/ + !1 + )); + } + di !== -1 && Re && (ie( + Dt.token.pos, + di, + pi === 1 + /* LineAdded */ + ), A = jr.line, O = di); + } + s.advance(), bt = Qt; + } + } + function Z(xe, he, ne, Ae) { + for (const De of xe) { + const we = p_(e, De); + switch (De.kind) { + case 3: + we && q( + De, + he, + /*firstLineIsIndented*/ + !ne + ), ne = !1; + break; + case 2: + ne && we && Ae(De), ne = !1; + break; + case 4: + ne = !0; + break; + } + } + return ne; + } + function J(xe, he, ne, Ae) { + for (const De of xe) + if (h9(De.kind) && p_(e, De)) { + const we = g.getLineAndCharacterOfPosition(De.pos); + re(De, we, he, ne, Ae); + } + } + function re(xe, he, ne, Ae, De) { + const we = m(xe); + let Ue = 0; + if (!we) + if (C) + Ue = te(xe, he.line, ne, C, w, D, Ae, De); + else { + const bt = g.getLineAndCharacterOfPosition(e.pos); + me(bt.line, he.line); + } + return C = xe, T = xe.end, D = ne, w = he.line, Ue; + } + function te(xe, he, ne, Ae, De, we, Ue, bt) { + S.updateContext(Ae, we, xe, ne, Ue); + const Lt = c(S); + let er = S.options.trimTrailingWhitespace !== !1, Nr = 0; + return Lt ? LX(Lt, (Dt) => { + if (Nr = Oe(Dt, Ae, De, xe, he), bt) + switch (Nr) { + case 2: + ne.getStart(g) === xe.pos && bt.recomputeIndentation( + /*lineAddedByFormatting*/ + !1, + Ue + ); + break; + case 1: + ne.getStart(g) === xe.pos && bt.recomputeIndentation( + /*lineAddedByFormatting*/ + !0, + Ue + ); + break; + default: + E.assert( + Nr === 0 + /* None */ + ); + } + er = er && !(Dt.action & 16) && Dt.flags !== 1; + }) : er = er && xe.kind !== 1, he !== De && er && me(De, he, Ae), Nr; + } + function ie(xe, he, ne) { + const Ae = o_e(he, o); + if (ne) + ue(xe, 0, Ae); + else { + const De = g.getLineAndCharacterOfPosition(xe), we = Uy(De.line, g); + (he !== le(we, De.character) || Te(Ae, we)) && ue(we, De.character, Ae); + } + } + function le(xe, he) { + let ne = 0; + for (let Ae = 0; Ae < he; Ae++) + g.text.charCodeAt(xe + Ae) === 9 ? ne += o.tabSize - ne % o.tabSize : ne++; + return ne; + } + function Te(xe, he) { + return xe !== g.text.substr(he, xe.length); + } + function q(xe, he, ne, Ae = !0) { + let De = g.getLineAndCharacterOfPosition(xe.pos).line; + const we = g.getLineAndCharacterOfPosition(xe.end).line; + if (De === we) { + ne || ie( + xe.pos, + he, + /*lineAdded*/ + !1 + ); + return; + } + const Ue = []; + let bt = xe.pos; + for (let Qt = De; Qt < we; Qt++) { + const Wr = XP(Qt, g); + Ue.push({ pos: bt, end: Wr }), bt = Uy(Qt + 1, g); + } + if (Ae && Ue.push({ pos: bt, end: xe.end }), Ue.length === 0) return; + const Lt = Uy(De, g), er = Tm.findFirstNonWhitespaceCharacterAndColumn(Lt, Ue[0].pos, g, o); + let Nr = 0; + ne && (Nr = 1, De++); + const Dt = he - er.column; + for (let Qt = Nr; Qt < Ue.length; Qt++, De++) { + const Wr = Uy(De, g), yr = Qt === 0 ? er : Tm.findFirstNonWhitespaceCharacterAndColumn(Ue[Qt].pos, Ue[Qt].end, g, o), qn = yr.column + Dt; + if (qn > 0) { + const Bt = o_e(qn, o); + ue(Wr, yr.character, Bt); + } else + ke(Wr, yr.character); + } + } + function me(xe, he, ne) { + for (let Ae = xe; Ae < he; Ae++) { + const De = Uy(Ae, g), we = XP(Ae, g); + if (ne && (h9(ne.kind) || hV(ne.kind)) && ne.pos <= we && ne.end > we) + continue; + const Ue = Ce(De, we); + Ue !== -1 && (E.assert(Ue === De || !em(g.text.charCodeAt(Ue - 1))), ke(Ue, we + 1 - Ue)); + } + } + function Ce(xe, he) { + let ne = he; + for (; ne >= xe && em(g.text.charCodeAt(ne)); ) + ne--; + return ne !== he ? ne + 1 : -1; + } + function Ee(xe) { + let he = C ? C.end : e.pos; + for (const ne of xe) + h9(ne.kind) && (he < ne.pos && oe(he, ne.pos - 1, C), he = ne.end + 1); + he < e.end && oe(he, e.end, C); + } + function oe(xe, he, ne) { + const Ae = g.getLineAndCharacterOfPosition(xe).line, De = g.getLineAndCharacterOfPosition(he).line; + me(Ae, De + 1, ne); + } + function ke(xe, he) { + he && F.push(v9(xe, he, "")); + } + function ue(xe, he, ne) { + (he || ne) && F.push(v9(xe, he, ne)); + } + function it(xe, he) { + F.push(v9(xe, 0, he)); + } + function Oe(xe, he, ne, Ae, De) { + const we = De !== ne; + switch (xe.action) { + case 1: + return 0; + case 16: + if (he.end !== Ae.pos) + return ke(he.end, Ae.pos - he.end), we ? 2 : 0; + break; + case 32: + ke(he.pos, he.end - he.pos); + break; + case 8: + if (xe.flags !== 1 && ne !== De) + return 0; + if (De - ne !== 1) + return ue(he.end, Ae.pos - he.end, Jh(_, o)), we ? 0 : 1; + break; + case 4: + if (xe.flags !== 1 && ne !== De) + return 0; + if (Ae.pos - he.end !== 1 || g.text.charCodeAt(he.end) !== 32) + return ue(he.end, Ae.pos - he.end, " "), we ? 2 : 0; + break; + case 64: + it(he.end, ";"); + } + return 0; + } + } + function ywe(e, t, n, i = Si(e, t)) { + const s = ur(i, Pd); + if (s && (i = s.parent), i.getStart(e) <= t && t < i.getEnd()) + return; + n = n === null ? void 0 : n === void 0 ? tl(t, e) : n; + const c = n && Fy(e.text, n.end), _ = cB(i, e), u = Wi(c, _); + return u && Pn(u, (m) => hA(m, t) || // The end marker of a single-line comment does not include the newline character. + // With caret at `^`, in the following case, we are inside a comment (^ denotes the cursor position): + // + // // asdf ^\n + // + // But for closed multi-line comments, we don't want to be inside the comment in the following case: + // + // /* asdf */^ + // + // However, unterminated multi-line comments *do* contain their end. + // + // Internally, we represent the end of the comment at the newline and closing '/', respectively. + // + t === m.end && (m.kind === 2 || t === e.getFullWidth())); + } + function OZe(e, t) { + switch (e.kind) { + case 176: + case 262: + case 218: + case 174: + case 173: + case 219: + case 179: + case 180: + case 184: + case 185: + case 177: + case 178: + if (e.typeParameters === t) + return 30; + if (e.parameters === t) + return 21; + break; + case 213: + case 214: + if (e.typeArguments === t) + return 30; + if (e.arguments === t) + return 21; + break; + case 263: + case 231: + case 264: + case 265: + if (e.typeParameters === t) + return 30; + break; + case 183: + case 215: + case 186: + case 233: + case 205: + if (e.typeArguments === t) + return 30; + break; + case 187: + return 19; + } + return 0; + } + function LZe(e) { + switch (e) { + case 21: + return 22; + case 30: + return 32; + case 19: + return 20; + } + return 0; + } + var YH, _8, f8; + function o_e(e, t) { + if ((!YH || YH.tabSize !== t.tabSize || YH.indentSize !== t.indentSize) && (YH = { tabSize: t.tabSize, indentSize: t.indentSize }, _8 = f8 = void 0), t.convertTabsToSpaces) { + let i; + const s = Math.floor(e / t.indentSize), o = e % t.indentSize; + return f8 || (f8 = []), f8[s] === void 0 ? (i = TA(" ", t.indentSize * s), f8[s] = i) : i = f8[s], o ? i + TA(" ", o) : i; + } else { + const i = Math.floor(e / t.tabSize), s = e - i * t.tabSize; + let o; + return _8 || (_8 = []), _8[i] === void 0 ? _8[i] = o = TA(" ", i) : o = _8[i], s ? o + TA(" ", s) : o; + } + } + var Tm; + ((e) => { + let t; + ((q) => { + q[q.Unknown = -1] = "Unknown"; + })(t || (t = {})); + function n(q, me, Ce, Ee = !1) { + if (q > me.text.length) + return _(Ce); + if (Ce.indentStyle === 0) + return 0; + const oe = tl( + q, + me, + /*startNode*/ + void 0, + /*excludeJsdoc*/ + !0 + ), ke = ywe(me, q, oe || null); + if (ke && ke.kind === 3) + return i(me, q, Ce, ke); + if (!oe) + return _(Ce); + if (hV(oe.kind) && oe.getStart(me) <= q && q < oe.end) + return 0; + const it = me.getLineAndCharacterOfPosition(q).line, Oe = Si(me, q), xe = Oe.kind === 19 && Oe.parent.kind === 210; + if (Ce.indentStyle === 1 || xe) + return s(me, q, Ce); + if (oe.kind === 28 && oe.parent.kind !== 226) { + const ne = g(oe, me, Ce); + if (ne !== -1) + return ne; + } + const he = R(q, oe.parent, me); + if (he && !p_(he, oe)) { + const Ae = [ + 218, + 219 + /* ArrowFunction */ + ].includes(Oe.parent.kind) ? 0 : Ce.indentSize; + return $(he, me, Ce) + Ae; + } + return o(me, q, oe, it, Ee, Ce); + } + e.getIndentation = n; + function i(q, me, Ce, Ee) { + const oe = js(q, me).line - 1, ke = js(q, Ee.pos).line; + if (E.assert(ke >= 0), oe <= ke) + return re(Uy(ke, q), me, q, Ce); + const ue = Uy(oe, q), { column: it, character: Oe } = J(ue, me, q, Ce); + return it === 0 ? it : q.text.charCodeAt(ue + Oe) === 42 ? it - 1 : it; + } + function s(q, me, Ce) { + let Ee = me; + for (; Ee > 0; ) { + const ke = q.text.charCodeAt(Ee); + if (!Ig(ke)) + break; + Ee--; + } + const oe = Wp(Ee, q); + return re(oe, Ee, q, Ce); + } + function o(q, me, Ce, Ee, oe, ke) { + let ue, it = Ce; + for (; it; ) { + if (uV(it, me, q) && le( + ke, + it, + ue, + q, + /*isNextChild*/ + !0 + )) { + const xe = C(it, q), he = T(Ce, it, Ee, q), ne = he !== 0 ? oe && he === 2 ? ke.indentSize : 0 : Ee !== xe.line ? ke.indentSize : 0; + return u( + it, + xe, + /*ignoreActualIndentationRange*/ + void 0, + ne, + q, + /*isNextChild*/ + !0, + ke + ); + } + const Oe = U( + it, + q, + ke, + /*listIndentsChild*/ + !0 + ); + if (Oe !== -1) + return Oe; + ue = it, it = it.parent; + } + return _(ke); + } + function c(q, me, Ce, Ee) { + const oe = Ce.getLineAndCharacterOfPosition(q.getStart(Ce)); + return u( + q, + oe, + me, + /*indentationDelta*/ + 0, + Ce, + /*isNextChild*/ + !1, + Ee + ); + } + e.getIndentationForNode = c; + function _(q) { + return q.baseIndentSize || 0; + } + e.getBaseIndentation = _; + function u(q, me, Ce, Ee, oe, ke, ue) { + var it; + let Oe = q.parent; + for (; Oe; ) { + let xe = !0; + if (Ce) { + const De = q.getStart(oe); + xe = De < Ce.pos || De > Ce.end; + } + const he = m(Oe, q, oe), ne = he.line === me.line || w(Oe, q, me.line, oe); + if (xe) { + const De = (it = F(q, oe)) == null ? void 0 : it[0], we = !!De && C(De, oe).line > he.line; + let Ue = U(q, oe, ue, we); + if (Ue !== -1 || (Ue = h(q, Oe, me, ne, oe, ue), Ue !== -1)) + return Ue + Ee; + } + le(ue, Oe, q, oe, ke) && !ne && (Ee += ue.indentSize); + const Ae = D(Oe, q, me.line, oe); + q = Oe, Oe = q.parent, me = Ae ? oe.getLineAndCharacterOfPosition(q.getStart(oe)) : he; + } + return Ee + _(ue); + } + function m(q, me, Ce) { + const Ee = F(me, Ce), oe = Ee ? Ee.pos : q.getStart(Ce); + return Ce.getLineAndCharacterOfPosition(oe); + } + function g(q, me, Ce) { + const Ee = Bse(q); + return Ee && Ee.listItemIndex > 0 ? _e(Ee.list.getChildren(), Ee.listItemIndex - 1, me, Ce) : -1; + } + function h(q, me, Ce, Ee, oe, ke) { + return (bl(q) || qP(q)) && (me.kind === 307 || !Ee) ? Z(Ce, oe, ke) : -1; + } + let S; + ((q) => { + q[q.Unknown = 0] = "Unknown", q[q.OpenBrace = 1] = "OpenBrace", q[q.CloseBrace = 2] = "CloseBrace"; + })(S || (S = {})); + function T(q, me, Ce, Ee) { + const oe = _2(q, me, Ee); + if (!oe) + return 0; + if (oe.kind === 19) + return 1; + if (oe.kind === 20) { + const ke = C(oe, Ee).line; + return Ce === ke ? 2 : 0; + } + return 0; + } + function C(q, me) { + return me.getLineAndCharacterOfPosition(q.getStart(me)); + } + function D(q, me, Ce, Ee) { + if (!(Fs(q) && as(q.arguments, me))) + return !1; + const oe = q.expression.getEnd(); + return js(Ee, oe).line === Ce; + } + e.isArgumentAndStartLineOverlapsExpressionBeingCalled = D; + function w(q, me, Ce, Ee) { + if (q.kind === 245 && q.elseStatement === me) { + const oe = Xa(q, 93, Ee); + return E.assert(oe !== void 0), C(oe, Ee).line === Ce; + } + return !1; + } + e.childStartsOnTheSameLineWithElseInIfStatement = w; + function A(q, me, Ce, Ee) { + if (qx(q) && (me === q.whenTrue || me === q.whenFalse)) { + const oe = js(Ee, q.condition.end).line; + if (me === q.whenTrue) + return Ce === oe; + { + const ke = C(q.whenTrue, Ee).line, ue = js(Ee, q.whenTrue.end).line; + return oe === ke && ue === Ce; + } + } + return !1; + } + e.childIsUnindentedBranchOfConditionalExpression = A; + function O(q, me, Ce, Ee) { + if (tm(q)) { + if (!q.arguments) return !1; + const oe = Pn(q.arguments, (Oe) => Oe.pos === me.pos); + if (!oe) return !1; + const ke = q.arguments.indexOf(oe); + if (ke === 0) return !1; + const ue = q.arguments[ke - 1], it = js(Ee, ue.getEnd()).line; + if (Ce === it) + return !0; + } + return !1; + } + e.argumentStartsOnSameLineAsPreviousArgument = O; + function F(q, me) { + return q.parent && W(q.getStart(me), q.getEnd(), q.parent, me); + } + e.getContainingList = F; + function R(q, me, Ce) { + return me && W(q, q, me, Ce); + } + function W(q, me, Ce, Ee) { + switch (Ce.kind) { + case 183: + return oe(Ce.typeArguments); + case 210: + return oe(Ce.properties); + case 209: + return oe(Ce.elements); + case 187: + return oe(Ce.members); + case 262: + case 218: + case 219: + case 174: + case 173: + case 179: + case 176: + case 185: + case 180: + return oe(Ce.typeParameters) || oe(Ce.parameters); + case 177: + return oe(Ce.parameters); + case 263: + case 231: + case 264: + case 265: + case 345: + return oe(Ce.typeParameters); + case 214: + case 213: + return oe(Ce.typeArguments) || oe(Ce.arguments); + case 261: + return oe(Ce.declarations); + case 275: + case 279: + return oe(Ce.elements); + case 206: + case 207: + return oe(Ce.elements); + } + function oe(ke) { + return ke && yA(V(Ce, ke, Ee), q, me) ? ke : void 0; + } + } + function V(q, me, Ce) { + const Ee = q.getChildren(Ce); + for (let oe = 1; oe < Ee.length - 1; oe++) + if (Ee[oe].pos === me.pos && Ee[oe].end === me.end) + return { pos: Ee[oe - 1].end, end: Ee[oe + 1].getStart(Ce) }; + return me; + } + function $(q, me, Ce) { + return q ? Z(me.getLineAndCharacterOfPosition(q.pos), me, Ce) : -1; + } + function U(q, me, Ce, Ee) { + if (q.parent && q.parent.kind === 261) + return -1; + const oe = F(q, me); + if (oe) { + const ke = oe.indexOf(q); + if (ke !== -1) { + const ue = _e(oe, ke, me, Ce); + if (ue !== -1) + return ue; + } + return $(oe, me, Ce) + (Ee ? Ce.indentSize : 0); + } + return -1; + } + function _e(q, me, Ce, Ee) { + E.assert(me >= 0 && me < q.length); + const oe = q[me]; + let ke = C(oe, Ce); + for (let ue = me - 1; ue >= 0; ue--) { + if (q[ue].kind === 28) + continue; + if (Ce.getLineAndCharacterOfPosition(q[ue].end).line !== ke.line) + return Z(ke, Ce, Ee); + ke = C(q[ue], Ce); + } + return -1; + } + function Z(q, me, Ce) { + const Ee = me.getPositionOfLineAndCharacter(q.line, 0); + return re(Ee, Ee + q.character, me, Ce); + } + function J(q, me, Ce, Ee) { + let oe = 0, ke = 0; + for (let ue = q; ue < me; ue++) { + const it = Ce.text.charCodeAt(ue); + if (!em(it)) + break; + it === 9 ? ke += Ee.tabSize + ke % Ee.tabSize : ke++, oe++; + } + return { column: ke, character: oe }; + } + e.findFirstNonWhitespaceCharacterAndColumn = J; + function re(q, me, Ce, Ee) { + return J(q, me, Ce, Ee).column; + } + e.findFirstNonWhitespaceColumn = re; + function te(q, me, Ce, Ee, oe) { + const ke = Ce ? Ce.kind : 0; + switch (me.kind) { + case 244: + case 263: + case 231: + case 264: + case 266: + case 265: + case 209: + case 241: + case 268: + case 210: + case 187: + case 200: + case 189: + case 217: + case 211: + case 213: + case 214: + case 243: + case 277: + case 253: + case 227: + case 207: + case 206: + case 286: + case 289: + case 285: + case 294: + case 173: + case 179: + case 180: + case 169: + case 184: + case 185: + case 196: + case 215: + case 223: + case 279: + case 275: + case 281: + case 276: + case 172: + case 296: + case 297: + return !0; + case 269: + return q.indentSwitchCase ?? !0; + case 260: + case 303: + case 226: + if (!q.indentMultiLineObjectLiteralBeginningOnBlankLine && Ee && ke === 210) + return Te(Ee, Ce); + if (me.kind === 226 && Ee && Ce && ke === 284) { + const ue = Ee.getLineAndCharacterOfPosition(aa(Ee.text, me.pos)).line, it = Ee.getLineAndCharacterOfPosition(aa(Ee.text, Ce.pos)).line; + return ue !== it; + } + if (me.kind !== 226) + return !0; + break; + case 246: + case 247: + case 249: + case 250: + case 248: + case 245: + case 262: + case 218: + case 174: + case 176: + case 177: + case 178: + return ke !== 241; + case 219: + return Ee && ke === 217 ? Te(Ee, Ce) : ke !== 241; + case 278: + return ke !== 279; + case 272: + return ke !== 273 || !!Ce.namedBindings && Ce.namedBindings.kind !== 275; + case 284: + return ke !== 287; + case 288: + return ke !== 290; + case 193: + case 192: + case 238: + if (ke === 187 || ke === 189 || ke === 200) + return !1; + break; + } + return oe; + } + e.nodeWillIndentChild = te; + function ie(q, me) { + switch (q) { + case 253: + case 257: + case 251: + case 252: + return me.kind !== 241; + default: + return !1; + } + } + function le(q, me, Ce, Ee, oe = !1) { + return te( + q, + me, + Ce, + Ee, + /*indentByDefault*/ + !1 + ) && !(oe && Ce && ie(Ce.kind, me)); + } + e.shouldIndentChildNode = le; + function Te(q, me) { + const Ce = aa(q.text, me.pos), Ee = q.getLineAndCharacterOfPosition(Ce).line, oe = q.getLineAndCharacterOfPosition(me.end).line; + return Ee === oe; + } + })(Tm || (Tm = {})); + var ZH = {}; + Ec(ZH, { + preparePasteEdits: () => MZe + }); + function MZe(e, t, n) { + let i = !1; + return t.forEach((s) => { + const o = ur( + Si(e, s.pos), + (c) => p_(c, s) + ); + o && ms(o, function c(_) { + var u; + if (!i) { + if (Me(_) && I6(s, _.getStart(e))) { + const m = n.resolveName( + _.text, + _, + -1, + /*excludeGlobals*/ + !1 + ); + if (m && m.declarations) { + for (const g of m.declarations) + if (Pq(g) || _.text && e.symbol && ((u = e.symbol.exports) != null && u.has(_.escapedText))) { + i = !0; + return; + } + } + } + _.forEachChild(c); + } + }); + }), i; + } + var KH = {}; + Ec(KH, { + pasteEditsProvider: () => jZe + }); + var RZe = "providePostPasteEdits"; + function jZe(e, t, n, i, s, o, c, _) { + return { edits: sn.ChangeTracker.with({ host: s, formatContext: c, preferences: o }, (m) => BZe(e, t, n, i, s, o, c, _, m)), fixId: RZe }; + } + function BZe(e, t, n, i, s, o, c, _, u) { + let m; + t.length !== n.length && (m = t.length === 1 ? t[0] : t.join(Jh(c.host, c.options))); + const g = []; + let h = e.text; + for (let T = n.length - 1; T >= 0; T--) { + const { pos: C, end: D } = n[T]; + h = m ? h.slice(0, C) + m + h.slice(D) : h.slice(0, C) + t[T] + h.slice(D); + } + let S; + E.checkDefined(s.runWithTemporaryFileUpdate).call(s, e.fileName, h, (T, C, D) => { + if (S = Eu.createImportAdder(D, T, o, s), i?.range) { + E.assert(i.range.length === t.length), i.range.forEach((R) => { + const W = i.file.statements, V = ec(W, (U) => U.end > R.pos); + if (V === -1) return; + let $ = ec(W, (U) => U.end >= R.end, V); + $ !== -1 && R.end <= W[$].getStart() && $--, g.push(...W.slice(V, $ === -1 ? W.length : $ + 1)); + }), E.assertIsDefined(C, "no original program found"); + const w = C.getTypeChecker(), A = JZe(i), O = $9(i.file, g, w, koe(D, g, w), A), F = !tq(e.fileName, C, s, !!i.file.commonJsModuleIndicator); + goe(i.file, O.targetFileImportsFromOldFile, u, F), Eoe(i.file, O.oldImportsNeededByTargetFile, O.targetFileImportsFromOldFile, w, T, S); + } else { + const w = { + sourceFile: D, + program: C, + cancellationToken: _, + host: s, + preferences: o, + formatContext: c + }; + let A = 0; + n.forEach((O, F) => { + const R = O.end - O.pos, W = m ?? t[F], V = O.pos + A, $ = V + W.length, U = { pos: V, end: $ }; + A += W.length - R; + const _e = ur( + Si(w.sourceFile, U.pos), + (Z) => p_(Z, U) + ); + _e && ms(_e, function Z(J) { + if (Me(J) && I6(U, J.getStart(D)) && !T?.getTypeChecker().resolveName( + J.text, + J, + -1, + /*excludeGlobals*/ + !1 + )) + return S.addImportForUnresolvedIdentifier( + w, + J, + /*useAutoImportProvider*/ + !0 + ); + J.forEachChild(Z); + }); + }); + } + S.writeFixes(u, tf(i ? i.file : e, o)); + }), S.hasFixes() && n.forEach((T, C) => { + u.replaceRangeWithText( + e, + { pos: T.pos, end: T.end }, + m ?? t[C] + ); + }); + } + function JZe({ file: e, range: t }) { + const n = t[0].pos, i = t[t.length - 1].end, s = Si(e, n), o = sw(e, n) ?? Si(e, i); + return { + pos: Me(s) && n <= s.getStart(e) ? s.getFullStart() : n, + end: Me(o) && i === o.getEnd() ? sn.getAdjustedEndPosition(e, o, {}) : i + }; + } + var vwe = {}; + Ec(vwe, { + ANONYMOUS: () => qV, + AccessFlags: () => RQ, + AssertionLevel: () => GX, + AssignmentDeclarationKind: () => HQ, + AssignmentKind: () => yK, + Associativity: () => EK, + BreakpointResolver: () => Uq, + BuilderFileEmit: () => bie, + BuilderProgramKind: () => wie, + BuilderState: () => Id, + CallHierarchy: () => mk, + CharacterCodes: () => nY, + CheckFlags: () => FQ, + CheckMode: () => _W, + ClassificationType: () => eV, + ClassificationTypeNames: () => Ase, + CommentDirectiveType: () => yQ, + Comparison: () => OX, + CompletionInfoFlags: () => kse, + CompletionTriggerKind: () => ZU, + Completions: () => bk, + ContainerFlags: () => tne, + ContextFlags: () => CQ, + Debug: () => E, + DiagnosticCategory: () => WI, + Diagnostics: () => p, + DocumentHighlights: () => U9, + ElementFlags: () => MQ, + EmitFlags: () => tj, + EmitHint: () => oY, + EmitOnly: () => bQ, + EndOfLineState: () => Dse, + ExitStatus: () => SQ, + ExportKind: () => xae, + Extension: () => iY, + ExternalEmitHelpers: () => aY, + FileIncludeKind: () => qR, + FilePreprocessingDiagnosticsKind: () => vQ, + FileSystemEntryKind: () => gY, + FileWatcherEventKind: () => pY, + FindAllReferences: () => So, + FlattenLevel: () => xne, + FlowFlags: () => zI, + ForegroundColorEscapeSequences: () => _ie, + FunctionFlags: () => kK, + GeneratedIdentifierFlags: () => VR, + GetLiteralTextFlags: () => OZ, + GoToDefinition: () => H6, + HighlightSpanKind: () => Tse, + IdentifierNameMap: () => S6, + ImportKind: () => Tae, + ImportsNotUsedAsValues: () => ZQ, + IndentStyle: () => xse, + IndexFlags: () => jQ, + IndexKind: () => zQ, + InferenceFlags: () => VQ, + InferencePriority: () => UQ, + InlayHintKind: () => Sse, + InlayHints: () => OH, + InternalEmitFlags: () => sY, + InternalNodeBuilderFlags: () => DQ, + InternalSymbolName: () => OQ, + IntersectionFlags: () => kQ, + InvalidatedProjectKind: () => Yie, + JSDocParsingMode: () => fY, + JsDoc: () => Lv, + JsTyping: () => f1, + JsxEmit: () => YQ, + JsxFlags: () => dQ, + JsxReferenceKind: () => BQ, + LanguageFeatureMinimumTarget: () => yl, + LanguageServiceMode: () => vse, + LanguageVariant: () => tY, + LexicalEnvironmentFlags: () => lY, + ListFormat: () => uY, + LogLevel: () => nQ, + MapCode: () => LH, + MemberOverrideStatus: () => TQ, + ModifierFlags: () => WR, + ModuleDetectionKind: () => GQ, + ModuleInstanceState: () => Kre, + ModuleKind: () => uC, + ModuleResolutionKind: () => r4, + ModuleSpecifierEnding: () => See, + NavigateTo: () => Gae, + NavigationBar: () => Xae, + NewLineKind: () => KQ, + NodeBuilderFlags: () => EQ, + NodeCheckFlags: () => $R, + NodeFactoryFlags: () => Xee, + NodeFlags: () => zR, + NodeResolutionFeatures: () => Ure, + ObjectFlags: () => QR, + OperationCanceledException: () => t4, + OperatorPrecedence: () => DK, + OrganizeImports: () => Mv, + OrganizeImportsMode: () => YU, + OuterExpressionKinds: () => cY, + OutliningElementsCollector: () => RH, + OutliningSpanKind: () => Cse, + OutputFileType: () => Ese, + PackageJsonAutoImportPreference: () => yse, + PackageJsonDependencyGroup: () => hse, + PatternMatchKind: () => uq, + PollingInterval: () => rj, + PollingWatchKind: () => QQ, + PragmaKindFlags: () => _Y, + PredicateSemantics: () => mQ, + PreparePasteEdits: () => ZH, + PrivateIdentifierKind: () => ste, + ProcessLevel: () => Dne, + ProgramUpdateLevel: () => aie, + QuotePreference: () => Kse, + RegularExpressionFlags: () => gQ, + RelationComparisonResult: () => UR, + Rename: () => DL, + ScriptElementKind: () => Pse, + ScriptElementKindModifier: () => Nse, + ScriptKind: () => ZR, + ScriptSnapshot: () => t9, + ScriptTarget: () => eY, + SemanticClassificationFormat: () => bse, + SemanticMeaning: () => Ise, + SemicolonPreference: () => KU, + SignatureCheckMode: () => fW, + SignatureFlags: () => YR, + SignatureHelp: () => i8, + SignatureInfo: () => vie, + SignatureKind: () => JQ, + SmartSelectionRange: () => JH, + SnippetKind: () => ej, + StatisticType: () => ase, + StructureIsReused: () => HR, + SymbolAccessibility: () => NQ, + SymbolDisplay: () => q0, + SymbolDisplayPartKind: () => n9, + SymbolFlags: () => GR, + SymbolFormatFlags: () => PQ, + SyntaxKind: () => JR, + Ternary: () => qQ, + ThrottledCancellationToken: () => nce, + TokenClass: () => wse, + TokenFlags: () => hQ, + TransformFlags: () => KR, + TypeFacts: () => uW, + TypeFlags: () => XR, + TypeFormatFlags: () => wQ, + TypeMapKind: () => WQ, + TypePredicateKind: () => AQ, + TypeReferenceSerializationKind: () => IQ, + UnionReduction: () => xQ, + UpToDateStatusType: () => Vie, + VarianceFlags: () => LQ, + Version: () => yd, + VersionRange: () => JI, + WatchDirectoryFlags: () => rY, + WatchDirectoryKind: () => XQ, + WatchFileKind: () => $Q, + WatchLogLevel: () => cie, + WatchType: () => Dl, + accessPrivateIdentifier: () => Tne, + addEmitFlags: () => _m, + addEmitHelper: () => Lx, + addEmitHelpers: () => Qg, + addInternalEmitFlags: () => wS, + addNodeFactoryPatcher: () => jhe, + addObjectAllocatorPatcher: () => xhe, + addRange: () => Nn, + addRelatedInfo: () => Bs, + addSyntheticLeadingComment: () => Gb, + addSyntheticTrailingComment: () => dD, + addToSeen: () => Lp, + advancedAsyncSuperHelper: () => oF, + affectsDeclarationPathOptionDeclarations: () => fre, + affectsEmitOptionDeclarations: () => _re, + allKeysStartWithDot: () => iO, + altDirectorySeparator: () => HI, + and: () => RI, + append: () => Pr, + appendIfUnique: () => Sh, + arrayFrom: () => Ki, + arrayIsEqualTo: () => Ef, + arrayIsHomogeneous: () => Pee, + arrayOf: () => UX, + arrayReverseIterator: () => bR, + arrayToMap: () => aC, + arrayToMultiMap: () => dP, + arrayToNumericMap: () => qX, + assertType: () => ege, + assign: () => eS, + asyncSuperHelper: () => aF, + attachFileToDiagnostics: () => Ex, + base64decode: () => $K, + base64encode: () => GK, + binarySearch: () => Cy, + binarySearchKey: () => HT, + bindSourceFile: () => rne, + breakIntoCharacterSpans: () => Bae, + breakIntoWordSpans: () => Jae, + buildLinkParts: () => oae, + buildOpts: () => AN, + buildOverload: () => Twe, + bundlerModuleNameResolver: () => Vre, + canBeConvertedToAsync: () => gq, + canHaveDecorators: () => n2, + canHaveExportModifier: () => rN, + canHaveFlowNode: () => L4, + canHaveIllegalDecorators: () => vz, + canHaveIllegalModifiers: () => qte, + canHaveIllegalType: () => u0e, + canHaveIllegalTypeParameters: () => Vte, + canHaveJSDoc: () => x3, + canHaveLocals: () => Ym, + canHaveModifiers: () => Jp, + canHaveModuleSpecifier: () => mK, + canHaveSymbol: () => bd, + canIncludeBindAndCheckDiagnostics: () => sD, + canJsonReportNoInputFiles: () => RN, + canProduceDiagnostics: () => HN, + canUsePropertyAccess: () => AJ, + canWatchAffectingLocation: () => Mie, + canWatchAtTypes: () => Lie, + canWatchDirectoryOrFile: () => dU, + canWatchDirectoryOrFilePath: () => oA, + cartesianProduct: () => tQ, + cast: () => Ws, + chainBundle: () => Ad, + chainDiagnosticMessages: () => fs, + changeAnyExtension: () => TP, + changeCompilerHostLikeToUseCache: () => QD, + changeExtension: () => Oh, + changeFullExtension: () => $I, + changesAffectModuleResolution: () => S7, + changesAffectingProgramStructure: () => EZ, + characterCodeToRegularExpressionFlag: () => pj, + childIsDecorated: () => N4, + classElementOrClassElementParameterIsDecorated: () => fB, + classHasClassThisAssignment: () => DW, + classHasDeclaredOrExplicitlyAssignedName: () => wW, + classHasExplicitlyAssignedName: () => yO, + classOrConstructorParameterIsDecorated: () => D0, + classicNameResolver: () => Yre, + classifier: () => oce, + cleanExtendedConfigCache: () => kO, + clear: () => Ep, + clearMap: () => P_, + clearSharedExtendedConfigFileWatcher: () => WW, + climbPastPropertyAccess: () => a9, + clone: () => HX, + cloneCompilerOptions: () => vV, + closeFileWatcher: () => nd, + closeFileWatcherOf: () => _p, + codefix: () => Eu, + collapseTextChangeRangesAcrossMultipleVersions: () => BY, + collectExternalModuleInfo: () => xW, + combine: () => qT, + combinePaths: () => Ln, + commandLineOptionOfCustomType: () => mre, + commentPragmas: () => UI, + commonOptionsWithBuild: () => MF, + compact: () => fP, + compareBooleans: () => $1, + compareDataObjects: () => sJ, + compareDiagnostics: () => Z4, + compareEmitHelpers: () => ote, + compareNumberOfDirectorySeparators: () => K3, + comparePaths: () => xh, + comparePathsCaseInsensitive: () => xge, + comparePathsCaseSensitive: () => Tge, + comparePatternKeys: () => nW, + compareProperties: () => YX, + compareStringsCaseInsensitive: () => gP, + compareStringsCaseInsensitiveEslintCompatible: () => $X, + compareStringsCaseSensitive: () => cu, + compareStringsCaseSensitiveUI: () => hP, + compareTextSpans: () => LI, + compareValues: () => uo, + compilerOptionsAffectDeclarationPath: () => mee, + compilerOptionsAffectEmit: () => dee, + compilerOptionsAffectSemanticDiagnostics: () => pee, + compilerOptionsDidYouMeanDiagnostics: () => JF, + compilerOptionsIndicateEsModules: () => CV, + computeCommonSourceDirectoryOfFilenames: () => lie, + computeLineAndCharacterOfPosition: () => pC, + computeLineOfPosition: () => o4, + computeLineStarts: () => ex, + computePositionOfLineAndCharacter: () => ZI, + computeSignatureWithDiagnostics: () => cU, + computeSuggestionDiagnostics: () => pq, + computedOptions: () => K4, + concatenate: () => Wi, + concatenateDiagnosticMessageChains: () => oee, + consumesNodeCoreModules: () => O9, + contains: () => as, + containsIgnoredPath: () => cD, + containsObjectRestOrSpread: () => DN, + containsParseError: () => lx, + containsPath: () => Zf, + convertCompilerOptionsForTelemetry: () => Are, + convertCompilerOptionsFromJson: () => yye, + convertJsonOption: () => zS, + convertToBase64: () => HK, + convertToJson: () => ON, + convertToObject: () => kre, + convertToOptionsWithAbsolutePaths: () => VF, + convertToRelativePath: () => s4, + convertToTSConfig: () => Jz, + convertTypeAcquisitionFromJson: () => vye, + copyComments: () => QS, + copyEntries: () => T7, + copyLeadingComments: () => j6, + copyProperties: () => ER, + copyTrailingAsLeadingComments: () => PA, + copyTrailingComments: () => fw, + couldStartTrivia: () => CY, + countWhere: () => b0, + createAbstractBuilder: () => Cve, + createAccessorPropertyBackingField: () => Tz, + createAccessorPropertyGetRedirector: () => Kte, + createAccessorPropertySetRedirector: () => ere, + createBaseNodeFactory: () => Vee, + createBinaryExpressionTrampoline: () => AF, + createBuilderProgram: () => lU, + createBuilderProgramUsingIncrementalBuildInfo: () => Iie, + createBuilderStatusReporter: () => GO, + createCacheableExportInfoMap: () => rq, + createCachedDirectoryStructureHost: () => TO, + createClassifier: () => t2e, + createCommentDirectivesMap: () => IZ, + createCompilerDiagnostic: () => Ho, + createCompilerDiagnosticForInvalidCustomType: () => gre, + createCompilerDiagnosticFromMessageChain: () => D5, + createCompilerHost: () => uie, + createCompilerHostFromProgramHost: () => PU, + createCompilerHostWorker: () => CO, + createDetachedDiagnostic: () => Cx, + createDiagnosticCollection: () => F3, + createDiagnosticForFileFromMessageChain: () => oB, + createDiagnosticForNode: () => tn, + createDiagnosticForNodeArray: () => DC, + createDiagnosticForNodeArrayFromMessageChain: () => e3, + createDiagnosticForNodeFromMessageChain: () => Jg, + createDiagnosticForNodeInSourceFile: () => ep, + createDiagnosticForRange: () => HZ, + createDiagnosticMessageChainFromDiagnostic: () => qZ, + createDiagnosticReporter: () => ok, + createDocumentPositionMapper: () => hne, + createDocumentRegistry: () => wae, + createDocumentRegistryInternal: () => oq, + createEmitAndSemanticDiagnosticsBuilderProgram: () => pU, + createEmitHelperFactory: () => ate, + createEmptyExports: () => vN, + createEvaluator: () => Bee, + createExpressionForJsxElement: () => jte, + createExpressionForJsxFragment: () => Bte, + createExpressionForObjectLiteralElementLike: () => Jte, + createExpressionForPropertyName: () => pz, + createExpressionFromEntityName: () => bN, + createExternalHelpersImportDeclarationIfNeeded: () => gz, + createFileDiagnostic: () => ol, + createFileDiagnosticFromMessageChain: () => I7, + createFlowNode: () => ag, + createForOfBindingStatement: () => fz, + createFutureSourceFile: () => J9, + createGetCanonicalFileName: () => Wl, + createGetIsolatedDeclarationErrors: () => Qne, + createGetSourceFile: () => GW, + createGetSymbolAccessibilityDiagnosticForNode: () => kv, + createGetSymbolAccessibilityDiagnosticForNodeName: () => Xne, + createGetSymbolWalker: () => nne, + createIncrementalCompilerHost: () => HO, + createIncrementalProgram: () => Uie, + createJsxFactoryExpression: () => _z, + createLanguageService: () => ice, + createLanguageServiceSourceFile: () => sL, + createMemberAccessForPropertyName: () => BS, + createModeAwareCache: () => g6, + createModeAwareCacheKey: () => MD, + createModeMismatchDetails: () => qj, + createModuleNotFoundChain: () => k7, + createModuleResolutionCache: () => h6, + createModuleResolutionLoader: () => KW, + createModuleResolutionLoaderUsingGlobalCache: () => Jie, + createModuleSpecifierResolutionHost: () => wv, + createMultiMap: () => wp, + createNameResolver: () => MJ, + createNodeConverters: () => Gee, + createNodeFactory: () => aN, + createOptionNameMap: () => jF, + createOverload: () => eG, + createPackageJsonImportFilter: () => B6, + createPackageJsonInfo: () => $V, + createParenthesizerRules: () => qee, + createPatternMatcher: () => Fae, + createPrinter: () => u1, + createPrinterWithDefaults: () => iie, + createPrinterWithRemoveComments: () => o2, + createPrinterWithRemoveCommentsNeverAsciiEscape: () => sie, + createPrinterWithRemoveCommentsOmitTrailingSemicolon: () => zW, + createProgram: () => iA, + createProgramHost: () => NU, + createPropertyNameNodeForIdentifierOrLiteral: () => G5, + createQueue: () => mP, + createRange: () => np, + createRedirectedBuilderProgram: () => fU, + createResolutionCache: () => gU, + createRuntimeTypeSerializer: () => Ine, + createScanner: () => Og, + createSemanticDiagnosticsBuilderProgram: () => kve, + createSet: () => DR, + createSolutionBuilder: () => $ie, + createSolutionBuilderHost: () => Hie, + createSolutionBuilderWithWatch: () => Xie, + createSolutionBuilderWithWatchHost: () => Gie, + createSortedArray: () => vR, + createSourceFile: () => Zx, + createSourceMapGenerator: () => fne, + createSourceMapSource: () => Whe, + createSuperAccessVariableStatement: () => bO, + createSymbolTable: () => Us, + createSymlinkCache: () => mJ, + createSyntacticTypeNodeBuilder: () => dse, + createSystemWatchFunctions: () => hY, + createTextChange: () => SA, + createTextChangeFromStartLength: () => v9, + createTextChangeRange: () => IP, + createTextRangeFromNode: () => TV, + createTextRangeFromSpan: () => y9, + createTextSpan: () => ql, + createTextSpanFromBounds: () => bc, + createTextSpanFromNode: () => e_, + createTextSpanFromRange: () => W0, + createTextSpanFromStringLiteralLikeContent: () => SV, + createTextWriter: () => M3, + createTokenRange: () => eJ, + createTypeChecker: () => une, + createTypeReferenceDirectiveResolutionCache: () => eO, + createTypeReferenceResolutionLoader: () => wO, + createWatchCompilerHost: () => Lve, + createWatchCompilerHostOfConfigFile: () => AU, + createWatchCompilerHostOfFilesAndCompilerOptions: () => IU, + createWatchFactory: () => wU, + createWatchHost: () => DU, + createWatchProgram: () => FU, + createWatchStatusReporter: () => hU, + createWriteFileMeasuringIO: () => $W, + declarationNameToString: () => co, + decodeMappings: () => bW, + decodedTextSpanIntersectsWith: () => AP, + deduplicate: () => hb, + defaultInitCompilerOptions: () => Fz, + defaultMaximumTruncationLength: () => x4, + diagnosticCategoryName: () => rS, + diagnosticToString: () => p2, + diagnosticsEqualityComparer: () => w5, + directoryProbablyExists: () => xd, + directorySeparator: () => jo, + displayPart: () => I_, + displayPartsToString: () => WA, + disposeEmitNodes: () => JJ, + documentSpansEqual: () => IV, + dumpTracingLegend: () => pQ, + elementAt: () => ky, + elideNodes: () => Zte, + emitDetachedComments: () => MK, + emitFiles: () => BW, + emitFilesAndReportErrors: () => WO, + emitFilesAndReportErrorsAndGetExitStatus: () => EU, + emitModuleKindIsNonNodeESM: () => X3, + emitNewLineBeforeLeadingCommentOfPosition: () => LK, + emitResolverSkipsTypeChecking: () => jW, + emitSkippedWithNoDiagnostics: () => nU, + emptyArray: () => He, + emptyFileSystemEntries: () => xJ, + emptyMap: () => _R, + emptyOptions: () => zp, + endsWith: () => Eo, + ensurePathIsNonModuleName: () => iS, + ensureScriptKind: () => j5, + ensureTrailingDirectorySeparator: () => il, + entityNameToString: () => G_, + enumerateInsertsAndDeletes: () => BI, + equalOwnProperties: () => VX, + equateStringsCaseInsensitive: () => Py, + equateStringsCaseSensitive: () => bb, + equateValues: () => wy, + escapeJsxAttributeString: () => MB, + escapeLeadingUnderscores: () => Zo, + escapeNonAsciiString: () => a5, + escapeSnippetText: () => Hb, + escapeString: () => rg, + escapeTemplateSubstitution: () => OB, + evaluatorResult: () => cl, + every: () => Ri, + exclusivelyPrefixedNodeCoreModules: () => eF, + executeCommandLine: () => dbe, + expandPreOrPostfixIncrementOrDecrementExpression: () => EF, + explainFiles: () => SU, + explainIfFileIsRedirectAndImpliedFormat: () => TU, + exportAssignmentIsAlias: () => D3, + expressionResultIsUnused: () => Aee, + extend: () => OI, + extensionFromPath: () => nD, + extensionIsTS: () => U5, + extensionsNotSupportingExtensionlessResolution: () => W5, + externalHelpersModuleNameText: () => Wy, + factory: () => N, + fileExtensionIs: () => Bo, + fileExtensionIsOneOf: () => vc, + fileIncludeReasonToDiagnostics: () => CU, + fileShouldUseJavaScriptRequire: () => tq, + filter: () => kn, + filterMutate: () => dR, + filterSemanticDiagnostics: () => FO, + find: () => Pn, + findAncestor: () => ur, + findBestPatternMatch: () => FR, + findChildOfKind: () => Xa, + findComputedPropertyNameCacheAssignment: () => IF, + findConfigFile: () => qW, + findConstructorDeclaration: () => sN, + findContainingList: () => _9, + findDiagnosticForNode: () => vae, + findFirstNonJsxWhitespaceToken: () => Jse, + findIndex: () => ec, + findLast: () => gb, + findLastIndex: () => AI, + findListItemInfo: () => Bse, + findModifier: () => L6, + findNextToken: () => _2, + findPackageJson: () => yae, + findPackageJsons: () => GV, + findPrecedingMatchingToken: () => g9, + findPrecedingToken: () => tl, + findSuperStatementIndexPath: () => dO, + findTokenOnLeftOfPosition: () => sw, + findUseStrictPrologue: () => mz, + first: () => ya, + firstDefined: () => Dc, + firstDefinedIterator: () => _P, + firstIterator: () => TR, + firstOrOnly: () => YV, + firstOrUndefined: () => Uc, + firstOrUndefinedIterator: () => pP, + fixupCompilerOptions: () => hq, + flatMap: () => na, + flatMapIterator: () => mR, + flatMapToMutable: () => qE, + flatten: () => Dp, + flattenCommaList: () => tre, + flattenDestructuringAssignment: () => qS, + flattenDestructuringBinding: () => a2, + flattenDiagnosticMessageText: () => vm, + forEach: () => lr, + forEachAncestor: () => DZ, + forEachAncestorDirectory: () => a4, + forEachAncestorDirectoryStoppingAtGlobalCache: () => sg, + forEachChild: () => ms, + forEachChildRecursively: () => Yx, + forEachDynamicImportOrRequireCall: () => tF, + forEachEmittedFile: () => OW, + forEachEnclosingBlockScopeContainer: () => WZ, + forEachEntry: () => al, + forEachExternalModuleToImportFrom: () => iq, + forEachImportClauseDeclaration: () => gK, + forEachKey: () => jg, + forEachLeadingCommentRange: () => CP, + forEachNameInAccessChainWalkingLeft: () => ree, + forEachNameOfDefaultExport: () => W9, + forEachPropertyAssignment: () => NC, + forEachResolvedProjectReference: () => eU, + forEachReturnStatement: () => Hy, + forEachRight: () => LX, + forEachTrailingCommentRange: () => EP, + forEachTsConfigPropArray: () => s3, + forEachUnique: () => OV, + forEachYieldExpression: () => QZ, + formatColorAndReset: () => c2, + formatDiagnostic: () => XW, + formatDiagnostics: () => Q1e, + formatDiagnosticsWithColorAndContext: () => die, + formatGeneratedName: () => vv, + formatGeneratedNamePart: () => f6, + formatLocation: () => QW, + formatMessage: () => Dx, + formatStringFromArgs: () => qg, + formatting: () => Qc, + generateDjb2Hash: () => n4, + generateTSConfig: () => Ere, + getAdjustedReferenceLocation: () => pV, + getAdjustedRenameLocation: () => p9, + getAliasDeclarationFromName: () => kB, + getAllAccessorDeclarations: () => zb, + getAllDecoratorsOfClass: () => CW, + getAllDecoratorsOfClassElement: () => gO, + getAllJSDocTags: () => s7, + getAllJSDocTagsOfKind: () => Hge, + getAllKeys: () => Qme, + getAllProjectOutputs: () => SO, + getAllSuperTypeNodes: () => j4, + getAllowImportingTsExtensions: () => lee, + getAllowJSCompilerOption: () => Zy, + getAllowSyntheticDefaultImports: () => wx, + getAncestor: () => sv, + getAnyExtensionFromPath: () => ZT, + getAreDeclarationMapsEnabled: () => P5, + getAssignedExpandoInitializer: () => fx, + getAssignedName: () => r7, + getAssignmentDeclarationKind: () => Sc, + getAssignmentDeclarationPropertyAccessKind: () => h3, + getAssignmentTargetKind: () => Gy, + getAutomaticTypeDirectiveNames: () => ZF, + getBaseFileName: () => Vc, + getBinaryOperatorPrecedence: () => I3, + getBuildInfo: () => JW, + getBuildInfoFileVersionMap: () => _U, + getBuildInfoText: () => rie, + getBuildOrderFromAnyBuildOrder: () => lA, + getBuilderCreationParameters: () => RO, + getBuilderFileEmit: () => _1, + getCanonicalDiagnostic: () => GZ, + getCheckFlags: () => rc, + getClassExtendsHeritageElement: () => Mb, + getClassLikeDeclarationOfSymbol: () => Fh, + getCombinedLocalAndExportSymbolFlags: () => UC, + getCombinedModifierFlags: () => Q1, + getCombinedNodeFlags: () => Ch, + getCombinedNodeFlagsAlwaysIncludeJSDoc: () => vj, + getCommentRange: () => fm, + getCommonSourceDirectory: () => XD, + getCommonSourceDirectoryOfConfig: () => HS, + getCompilerOptionValue: () => I5, + getCompilerOptionsDiffValue: () => Cre, + getConditions: () => o1, + getConfigFileParsingDiagnostics: () => l2, + getConstantValue: () => Zee, + getContainerFlags: () => sW, + getContainerNode: () => XS, + getContainingClass: () => Al, + getContainingClassExcludingClassDecorators: () => J7, + getContainingClassStaticBlock: () => sK, + getContainingFunction: () => ff, + getContainingFunctionDeclaration: () => iK, + getContainingFunctionOrClassStaticBlock: () => B7, + getContainingNodeArray: () => Iee, + getContainingObjectLiteralElement: () => UA, + getContextualTypeFromParent: () => w9, + getContextualTypeFromParentOrAncestorTypeNode: () => f9, + getDeclarationDiagnostics: () => Yne, + getDeclarationEmitExtensionForPath: () => l5, + getDeclarationEmitOutputFilePath: () => AK, + getDeclarationEmitOutputFilePathWorker: () => c5, + getDeclarationFileExtension: () => OF, + getDeclarationFromName: () => R4, + getDeclarationModifierFlagsFromSymbol: () => sp, + getDeclarationOfKind: () => Lo, + getDeclarationsOfKind: () => CZ, + getDeclaredExpandoInitializer: () => F4, + getDecorators: () => Oy, + getDefaultCompilerOptions: () => iL, + getDefaultFormatCodeSettings: () => r9, + getDefaultLibFileName: () => wP, + getDefaultLibFilePath: () => sce, + getDefaultLikeExportInfo: () => z9, + getDefaultLikeExportNameFromDeclaration: () => ZV, + getDefaultResolutionModeForFileWorker: () => IO, + getDiagnosticText: () => g_, + getDiagnosticsWithinSpan: () => bae, + getDirectoryPath: () => Hn, + getDirectoryToWatchFailedLookupLocation: () => mU, + getDirectoryToWatchFailedLookupLocationFromTypeRoot: () => jie, + getDocumentPositionMapper: () => fq, + getDocumentSpansEqualityComparer: () => FV, + getESModuleInterop: () => Hg, + getEditsForFileRename: () => Nae, + getEffectiveBaseTypeNode: () => sm, + getEffectiveConstraintOfTypeParameter: () => hC, + getEffectiveContainerForJSDocTemplateTag: () => K7, + getEffectiveImplementsTypeNodes: () => MC, + getEffectiveInitializer: () => d3, + getEffectiveJSDocHost: () => iv, + getEffectiveModifierFlags: () => Mu, + getEffectiveModifierFlagsAlwaysIncludeJSDoc: () => JK, + getEffectiveModifierFlagsNoCache: () => zK, + getEffectiveReturnTypeNode: () => pf, + getEffectiveSetAccessorTypeAnnotationNode: () => VB, + getEffectiveTypeAnnotationNode: () => qc, + getEffectiveTypeParameterDeclarations: () => My, + getEffectiveTypeRoots: () => LD, + getElementOrPropertyAccessArgumentExpressionOrName: () => Z7, + getElementOrPropertyAccessName: () => wh, + getElementsOfBindingOrAssignmentPattern: () => _6, + getEmitDeclarations: () => N_, + getEmitFlags: () => va, + getEmitHelpers: () => zJ, + getEmitModuleDetectionKind: () => uee, + getEmitModuleFormatOfFileWorker: () => KD, + getEmitModuleKind: () => Ru, + getEmitModuleResolutionKind: () => Su, + getEmitScriptTarget: () => pa, + getEmitStandardClassFields: () => pJ, + getEnclosingBlockScopeContainer: () => Sd, + getEnclosingContainer: () => A7, + getEncodedSemanticClassifications: () => sq, + getEncodedSyntacticClassifications: () => aq, + getEndLinePosition: () => XP, + getEntityNameFromTypeNode: () => c3, + getEntrypointsFromPackageJsonInfo: () => eW, + getErrorCountForSummary: () => JO, + getErrorSpanForNode: () => dS, + getErrorSummaryText: () => vU, + getEscapedTextOfIdentifierOrLiteral: () => z4, + getEscapedTextOfJsxAttributeName: () => _D, + getEscapedTextOfJsxNamespacedName: () => Ix, + getExpandoInitializer: () => rv, + getExportAssignmentExpression: () => CB, + getExportInfoMap: () => LA, + getExportNeedsImportStarHelper: () => yne, + getExpressionAssociativity: () => IB, + getExpressionPrecedence: () => W4, + getExternalHelpersModuleName: () => TN, + getExternalModuleImportEqualsDeclarationExpression: () => A4, + getExternalModuleName: () => dx, + getExternalModuleNameFromDeclaration: () => PK, + getExternalModuleNameFromPath: () => BB, + getExternalModuleNameLiteral: () => Qx, + getExternalModuleRequireArgument: () => dB, + getFallbackOptions: () => tA, + getFileEmitOutput: () => yie, + getFileMatcherPatterns: () => R5, + getFileNamesFromConfigSpecs: () => FD, + getFileWatcherEventKind: () => sj, + getFilesInErrorForSummary: () => zO, + getFirstConstructorWithBody: () => Ug, + getFirstIdentifier: () => w_, + getFirstNonSpaceCharacterPosition: () => uae, + getFirstProjectOutput: () => RW, + getFixableErrorSpanExpression: () => XV, + getFormatCodeSettingsForWriting: () => j9, + getFullWidth: () => GP, + getFunctionFlags: () => Oc, + getHeritageClause: () => w3, + getHostSignatureFromJSDoc: () => nv, + getIdentifierAutoGenerate: () => qhe, + getIdentifierGeneratedImportReference: () => ite, + getIdentifierTypeArguments: () => PS, + getImmediatelyInvokedFunctionExpression: () => Ab, + getImpliedNodeFormatForEmitWorker: () => GS, + getImpliedNodeFormatForFile: () => nA, + getImpliedNodeFormatForFileWorker: () => AO, + getImportNeedsImportDefaultHelper: () => TW, + getImportNeedsImportStarHelper: () => fO, + getIndentString: () => o5, + getInferredLibraryNameResolveFrom: () => NO, + getInitializedVariables: () => X4, + getInitializerOfBinaryExpression: () => yB, + getInitializerOfBindingOrAssignmentElement: () => kN, + getInterfaceBaseTypeNodes: () => B4, + getInternalEmitFlags: () => td, + getInvokedExpression: () => U7, + getIsFileExcluded: () => Cae, + getIsolatedModules: () => Mp, + getJSDocAugmentsTag: () => XY, + getJSDocClassTag: () => Tj, + getJSDocCommentRanges: () => lB, + getJSDocCommentsAndTags: () => vB, + getJSDocDeprecatedTag: () => xj, + getJSDocDeprecatedTagNoCache: () => rZ, + getJSDocEnumTag: () => kj, + getJSDocHost: () => Ob, + getJSDocImplementsTags: () => QY, + getJSDocOverloadTags: () => SB, + getJSDocOverrideTagNoCache: () => tZ, + getJSDocParameterTags: () => gC, + getJSDocParameterTagsNoCache: () => qY, + getJSDocPrivateTag: () => Wge, + getJSDocPrivateTagNoCache: () => ZY, + getJSDocProtectedTag: () => Uge, + getJSDocProtectedTagNoCache: () => KY, + getJSDocPublicTag: () => zge, + getJSDocPublicTagNoCache: () => YY, + getJSDocReadonlyTag: () => Vge, + getJSDocReadonlyTagNoCache: () => eZ, + getJSDocReturnTag: () => nZ, + getJSDocReturnType: () => OP, + getJSDocRoot: () => LC, + getJSDocSatisfiesExpressionType: () => FJ, + getJSDocSatisfiesTag: () => Cj, + getJSDocTags: () => Z1, + getJSDocTemplateTag: () => qge, + getJSDocThisTag: () => n7, + getJSDocType: () => Ly, + getJSDocTypeAliasName: () => yz, + getJSDocTypeAssertionType: () => l6, + getJSDocTypeParameterDeclarations: () => d5, + getJSDocTypeParameterTags: () => HY, + getJSDocTypeParameterTagsNoCache: () => GY, + getJSDocTypeTag: () => Y1, + getJSXImplicitImportBase: () => Q3, + getJSXRuntimeImport: () => O5, + getJSXTransformEnabled: () => F5, + getKeyForCompilerOptions: () => Xz, + getLanguageVariant: () => V3, + getLastChild: () => aJ, + getLeadingCommentRanges: () => Fg, + getLeadingCommentRangesOfNode: () => cB, + getLeftmostAccessExpression: () => VC, + getLeftmostExpression: () => qC, + getLibraryNameFromLibFileName: () => tU, + getLineAndCharacterOfPosition: () => js, + getLineInfo: () => vW, + getLineOfLocalPosition: () => U4, + getLineStartPositionForPosition: () => Wp, + getLineStarts: () => Ag, + getLinesBetweenPositionAndNextNonWhitespaceCharacter: () => KK, + getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter: () => ZK, + getLinesBetweenPositions: () => c4, + getLinesBetweenRangeEndAndRangeStart: () => tJ, + getLinesBetweenRangeEndPositions: () => She, + getLiteralText: () => LZ, + getLocalNameForExternalImport: () => u6, + getLocalSymbolForExportDefault: () => G4, + getLocaleSpecificMessage: () => us, + getLocaleTimeString: () => cA, + getMappedContextSpan: () => LV, + getMappedDocumentSpan: () => C9, + getMappedLocation: () => lw, + getMatchedFileSpec: () => xU, + getMatchedIncludeSpec: () => kU, + getMeaningFromDeclaration: () => i9, + getMeaningFromLocation: () => $S, + getMembersOfDeclaration: () => YZ, + getModeForFileReference: () => mie, + getModeForResolutionAtIndex: () => rve, + getModeForUsageLocation: () => ZW, + getModifiedTime: () => YT, + getModifiers: () => Tb, + getModuleInstanceState: () => jh, + getModuleNameStringLiteralAt: () => sA, + getModuleSpecifierEndingPreference: () => Tee, + getModuleSpecifierResolverHost: () => EV, + getNameForExportedSymbol: () => L9, + getNameFromImportAttribute: () => Y5, + getNameFromIndexInfo: () => UZ, + getNameFromPropertyName: () => xA, + getNameOfAccessExpression: () => cJ, + getNameOfCompilerOptionValue: () => zz, + getNameOfDeclaration: () => is, + getNameOfExpando: () => mB, + getNameOfJSDocTypedef: () => VY, + getNameOfScriptTarget: () => A5, + getNameOrArgument: () => g3, + getNameTable: () => Wq, + getNamespaceDeclarationNode: () => OC, + getNewLineCharacter: () => N0, + getNewLineKind: () => OA, + getNewLineOrDefaultFromHost: () => Jh, + getNewTargetContainer: () => oK, + getNextJSDocCommentLocation: () => bB, + getNodeChildren: () => lz, + getNodeForGeneratedName: () => EN, + getNodeId: () => Aa, + getNodeKind: () => u2, + getNodeModifiers: () => aw, + getNodeModulePathParts: () => $5, + getNonAssignedNameOfDeclaration: () => t7, + getNonAssignmentOperatorForCompoundAssignment: () => UD, + getNonAugmentationDeclaration: () => tB, + getNonDecoratorTokenPosOfNode: () => Xj, + getNonIncrementalBuildInfoRoots: () => Fie, + getNonModifierTokenPosOfNode: () => FZ, + getNormalizedAbsolutePath: () => Xi, + getNormalizedAbsolutePathWithoutRoot: () => lj, + getNormalizedPathComponents: () => SP, + getObjectFlags: () => Cn, + getOperatorAssociativity: () => FB, + getOperatorPrecedence: () => A3, + getOptionFromName: () => Lz, + getOptionsForLibraryResolution: () => Qz, + getOptionsNameMap: () => d6, + getOrCreateEmitNode: () => uu, + getOrUpdate: () => HE, + getOriginalNode: () => Jo, + getOriginalNodeId: () => Ku, + getOutputDeclarationFileName: () => x6, + getOutputDeclarationFileNameWorker: () => LW, + getOutputExtension: () => ZN, + getOutputFileNames: () => $1e, + getOutputJSFileNameWorker: () => MW, + getOutputPathsFor: () => $D, + getOwnEmitOutputFilePath: () => NK, + getOwnKeys: () => Zd, + getOwnValues: () => GT, + getPackageJsonTypesVersionsPaths: () => YF, + getPackageNameFromTypesPackageName: () => BD, + getPackageScopeForPath: () => jD, + getParameterSymbolFromJSDoc: () => k3, + getParentNodeInSpan: () => CA, + getParseTreeNode: () => ls, + getParsedCommandLineOfConfigFile: () => IN, + getPathComponents: () => Ul, + getPathFromPathComponents: () => T0, + getPathUpdater: () => lq, + getPathsBasePath: () => u5, + getPatternFromSpec: () => yJ, + getPendingEmitKindWithSeen: () => MO, + getPositionOfLineAndCharacter: () => xP, + getPossibleGenericSignatures: () => mV, + getPossibleOriginalInputExtensionForExtension: () => JB, + getPossibleOriginalInputPathWithoutChangingExt: () => zB, + getPossibleTypeArgumentsInfo: () => gV, + getPreEmitDiagnostics: () => X1e, + getPrecedingNonSpaceCharacterPosition: () => E9, + getPrivateIdentifier: () => EW, + getProperties: () => kW, + getProperty: () => FI, + getPropertyArrayElementValue: () => nK, + getPropertyAssignmentAliasLikeExpression: () => xK, + getPropertyNameForPropertyNameNode: () => TS, + getPropertyNameFromType: () => op, + getPropertyNameOfBindingOrAssignmentElement: () => hz, + getPropertySymbolFromBindingElement: () => k9, + getPropertySymbolsFromContextualType: () => aL, + getQuoteFromPreference: () => wV, + getQuotePreference: () => tf, + getRangesWhere: () => yR, + getRefactorContextSpan: () => _k, + getReferencedFileLocation: () => ZD, + getRegexFromPattern: () => A0, + getRegularExpressionForWildcard: () => eD, + getRegularExpressionsForWildcards: () => L5, + getRelativePathFromDirectory: () => Df, + getRelativePathFromFile: () => fC, + getRelativePathToDirectoryOrUrl: () => KT, + getRenameLocation: () => wA, + getReplacementSpanForContextToken: () => bV, + getResolutionDiagnostic: () => sU, + getResolutionModeOverride: () => k6, + getResolveJsonModule: () => Ub, + getResolvePackageJsonExports: () => H3, + getResolvePackageJsonImports: () => G3, + getResolvedExternalModuleName: () => jB, + getResolvedModuleFromResolution: () => cx, + getResolvedTypeReferenceDirectiveFromResolution: () => x7, + getRestIndicatorOfBindingOrAssignmentElement: () => PF, + getRestParameterElementType: () => uB, + getRightMostAssignedExpression: () => m3, + getRootDeclaration: () => om, + getRootDirectoryOfResolutionCache: () => Bie, + getRootLength: () => Xm, + getScriptKind: () => BV, + getScriptKindFromFileName: () => B5, + getScriptTargetFeatures: () => Qj, + getSelectedEffectiveModifierFlags: () => bx, + getSelectedSyntacticModifierFlags: () => jK, + getSemanticClassifications: () => Eae, + getSemanticJsxChildren: () => jC, + getSetAccessorTypeAnnotationNode: () => FK, + getSetAccessorValueParameter: () => V4, + getSetExternalModuleIndicator: () => q3, + getShebang: () => KI, + getSingleVariableOfVariableStatement: () => hx, + getSnapshotText: () => uk, + getSnippetElement: () => WJ, + getSourceFileOfModule: () => $P, + getSourceFileOfNode: () => Cr, + getSourceFilePathInNewDir: () => f5, + getSourceFileVersionAsHashFromText: () => UO, + getSourceFilesToEmit: () => _5, + getSourceMapRange: () => F0, + getSourceMapper: () => Wae, + getSourceTextOfNodeFromSourceFile: () => Db, + getSpanOfTokenAtPosition: () => rm, + getSpellingSuggestion: () => Sb, + getStartPositionOfLine: () => Uy, + getStartPositionOfRange: () => $4, + getStartsOnNewLine: () => pD, + getStaticPropertiesAndClassStaticBlock: () => mO, + getStrictOptionValue: () => lu, + getStringComparer: () => cC, + getSubPatternFromSpec: () => M5, + getSuperCallFromStatement: () => pO, + getSuperContainer: () => a3, + getSupportedCodeFixes: () => Jq, + getSupportedExtensions: () => tD, + getSupportedExtensionsWithJsonIfResolveJsonModule: () => Z3, + getSwitchedType: () => VV, + getSymbolId: () => Zs, + getSymbolNameForPrivateIdentifier: () => P3, + getSymbolTarget: () => JV, + getSyntacticClassifications: () => Dae, + getSyntacticModifierFlags: () => w0, + getSyntacticModifierFlagsNoCache: () => GB, + getSynthesizedDeepClone: () => Wa, + getSynthesizedDeepCloneWithReplacements: () => DA, + getSynthesizedDeepClones: () => f2, + getSynthesizedDeepClonesWithReplacements: () => zV, + getSyntheticLeadingComments: () => YC, + getSyntheticTrailingComments: () => uN, + getTargetLabel: () => o9, + getTargetOfBindingOrAssignmentElement: () => s1, + getTemporaryModuleResolutionState: () => RD, + getTextOfConstantValue: () => MZ, + getTextOfIdentifierOrLiteral: () => rp, + getTextOfJSDocComment: () => LP, + getTextOfJsxAttributeName: () => iN, + getTextOfJsxNamespacedName: () => fD, + getTextOfNode: () => qo, + getTextOfNodeFromSourceText: () => C4, + getTextOfPropertyName: () => _x, + getThisContainer: () => Lu, + getThisParameter: () => jb, + getTokenAtPosition: () => Si, + getTokenPosOfNode: () => Vy, + getTokenSourceMapRange: () => Uhe, + getTouchingPropertyName: () => h_, + getTouchingToken: () => F6, + getTrailingCommentRanges: () => Fy, + getTrailingSemicolonDeferringWriter: () => RB, + getTransformers: () => Kne, + getTsBuildInfoEmitOutputFilePath: () => Cv, + getTsConfigObjectLiteralExpression: () => P4, + getTsConfigPropArrayElementValue: () => j7, + getTypeAnnotationNode: () => OK, + getTypeArgumentOrTypeParameterList: () => Gse, + getTypeKeywordOfTypeOnlyImport: () => AV, + getTypeNode: () => rte, + getTypeNodeIfAccessible: () => dw, + getTypeParameterFromJsDoc: () => hK, + getTypeParameterOwner: () => Rge, + getTypesPackageName: () => sO, + getUILocale: () => XX, + getUniqueName: () => YS, + getUniqueSymbolId: () => lae, + getUseDefineForClassFields: () => $3, + getWatchErrorSummaryDiagnosticMessage: () => yU, + getWatchFactory: () => VW, + group: () => oC, + groupBy: () => CR, + guessIndentation: () => xZ, + handleNoEmitOptions: () => iU, + handleWatchOptionsConfigDirTemplateSubstitution: () => qF, + hasAbstractModifier: () => Wb, + hasAccessorModifier: () => cm, + hasAmbientModifier: () => HB, + hasChangesInResolutions: () => Hj, + hasContextSensitiveParameters: () => H5, + hasDecorators: () => Pf, + hasDocComment: () => qse, + hasDynamicName: () => Ph, + hasEffectiveModifier: () => Q_, + hasEffectiveModifiers: () => qB, + hasEffectiveReadonlyModifier: () => kS, + hasExtension: () => _C, + hasImplementationTSFileExtension: () => bee, + hasIndexSignature: () => UV, + hasInferredType: () => K5, + hasInitializer: () => C0, + hasInvalidEscape: () => LB, + hasJSDocNodes: () => uf, + hasJSDocParameterTags: () => $Y, + hasJSFileExtension: () => Gg, + hasJsonModuleEmitEnabled: () => N5, + hasOnlyExpressionInitializer: () => fS, + hasOverrideModifier: () => m5, + hasPossibleExternalModuleReference: () => zZ, + hasProperty: () => ro, + hasPropertyAccessExpressionWithName: () => mA, + hasQuestionToken: () => mx, + hasRecordedExternalHelpers: () => Ute, + hasResolutionModeOverride: () => Ree, + hasRestParameter: () => zj, + hasScopeMarker: () => dZ, + hasStaticModifier: () => Kc, + hasSyntacticModifier: () => $n, + hasSyntacticModifiers: () => RK, + hasTSFileExtension: () => ES, + hasTabstop: () => Oee, + hasTrailingDirectorySeparator: () => Ay, + hasType: () => y7, + hasTypeArguments: () => _he, + hasZeroOrOneAsteriskCharacter: () => dJ, + hostGetCanonicalFileName: () => Nh, + hostUsesCaseSensitiveFileNames: () => xS, + idText: () => An, + identifierIsThisKeyword: () => UB, + identifierToKeywordKind: () => aS, + identity: () => lo, + identitySourceMapConsumer: () => SW, + ignoreSourceNewlines: () => VJ, + ignoredPaths: () => qI, + importFromModuleSpecifier: () => O4, + importSyntaxAffectsModuleResolution: () => fJ, + indexOfAnyCharCode: () => RX, + indexOfNode: () => CC, + indicesOf: () => II, + inferredTypesContainingFile: () => YD, + injectClassNamedEvaluationHelperBlockIfMissing: () => vO, + injectClassThisAssignmentIfMissing: () => Ene, + insertImports: () => NV, + insertSorted: () => xy, + insertStatementAfterCustomPrologue: () => pS, + insertStatementAfterStandardPrologue: () => ihe, + insertStatementsAfterCustomPrologue: () => Gj, + insertStatementsAfterStandardPrologue: () => Bg, + intersperse: () => pR, + intrinsicTagNameToString: () => OJ, + introducesArgumentsExoticObject: () => eK, + inverseJsxOptionMap: () => NN, + isAbstractConstructorSymbol: () => eee, + isAbstractModifier: () => dte, + isAccessExpression: () => vo, + isAccessibilityModifier: () => yV, + isAccessor: () => Jy, + isAccessorModifier: () => gte, + isAliasableExpression: () => e5, + isAmbientModule: () => Ou, + isAmbientPropertyDeclaration: () => nB, + isAnyDirectorySeparator: () => aj, + isAnyImportOrBareOrAccessedRequire: () => BZ, + isAnyImportOrReExport: () => ZP, + isAnyImportOrRequireStatement: () => JZ, + isAnyImportSyntax: () => ux, + isAnySupportedFileExtension: () => Lhe, + isApplicableVersionedTypesKey: () => JN, + isArgumentExpressionOfElementAccess: () => oV, + isArray: () => os, + isArrayBindingElement: () => f7, + isArrayBindingOrAssignmentElement: () => zP, + isArrayBindingOrAssignmentPattern: () => Lj, + isArrayBindingPattern: () => R0, + isArrayLiteralExpression: () => Ql, + isArrayLiteralOrObjectLiteralDestructuringPattern: () => z0, + isArrayTypeNode: () => mN, + isArrowFunction: () => bo, + isAsExpression: () => t6, + isAssertClause: () => xte, + isAssertEntry: () => e0e, + isAssertionExpression: () => Eb, + isAssertsKeyword: () => fte, + isAssignmentDeclaration: () => I4, + isAssignmentExpression: () => Cl, + isAssignmentOperator: () => Ah, + isAssignmentPattern: () => S4, + isAssignmentTarget: () => $y, + isAsteriskToken: () => fN, + isAsyncFunction: () => J4, + isAsyncModifier: () => hD, + isAutoAccessorPropertyDeclaration: () => l_, + isAwaitExpression: () => n1, + isAwaitKeyword: () => XJ, + isBigIntLiteral: () => gD, + isBinaryExpression: () => fn, + isBinaryLogicalOperator: () => R3, + isBinaryOperatorToken: () => Yte, + isBindableObjectDefinePropertyCall: () => yS, + isBindableStaticAccessExpression: () => Fb, + isBindableStaticElementAccessExpression: () => Y7, + isBindableStaticNameExpression: () => vS, + isBindingElement: () => ma, + isBindingElementOfBareOrAccessedRequire: () => uK, + isBindingName: () => uS, + isBindingOrAssignmentElement: () => uZ, + isBindingOrAssignmentPattern: () => BP, + isBindingPattern: () => Ds, + isBlock: () => ks, + isBlockLike: () => fk, + isBlockOrCatchScoped: () => Yj, + isBlockScope: () => iB, + isBlockScopedContainerTopLevel: () => jZ, + isBooleanLiteral: () => b4, + isBreakOrContinueStatement: () => g4, + isBreakStatement: () => Yhe, + isBuildCommand: () => ose, + isBuildInfoFile: () => eie, + isBuilderProgram: () => bU, + isBundle: () => Dte, + isCallChain: () => oS, + isCallExpression: () => Fs, + isCallExpressionTarget: () => tV, + isCallLikeExpression: () => Cb, + isCallLikeOrFunctionLikeExpression: () => Mj, + isCallOrNewExpression: () => tm, + isCallOrNewExpressionTarget: () => rV, + isCallSignatureDeclaration: () => Jx, + isCallToHelper: () => mD, + isCaseBlock: () => kD, + isCaseClause: () => i6, + isCaseKeyword: () => hte, + isCaseOrDefaultClause: () => g7, + isCatchClause: () => t2, + isCatchClauseVariableDeclaration: () => Fee, + isCatchClauseVariableDeclarationOrBindingElement: () => Zj, + isCheckJsEnabledForFile: () => iD, + isCircularBuildOrder: () => ck, + isClassDeclaration: () => $c, + isClassElement: () => sl, + isClassExpression: () => Gc, + isClassInstanceProperty: () => cZ, + isClassLike: () => Zn, + isClassMemberModifier: () => Ij, + isClassNamedEvaluationHelperBlock: () => sk, + isClassOrTypeElement: () => _7, + isClassStaticBlockDeclaration: () => nc, + isClassThisAssignmentBlock: () => qD, + isColonToken: () => ute, + isCommaExpression: () => SN, + isCommaListExpression: () => TD, + isCommaSequence: () => PD, + isCommaToken: () => lte, + isComment: () => h9, + isCommonJsExportPropertyAssignment: () => M7, + isCommonJsExportedExpression: () => ZZ, + isCompoundAssignment: () => WD, + isComputedNonLiteralName: () => KP, + isComputedPropertyName: () => fa, + isConciseBody: () => d7, + isConditionalExpression: () => qx, + isConditionalTypeNode: () => Xb, + isConstAssertion: () => LJ, + isConstTypeReference: () => Kp, + isConstructSignatureDeclaration: () => dN, + isConstructorDeclaration: () => Go, + isConstructorTypeNode: () => ZC, + isContextualKeyword: () => r5, + isContinueStatement: () => Qhe, + isCustomPrologue: () => i3, + isDebuggerStatement: () => Zhe, + isDeclaration: () => bl, + isDeclarationBindingElement: () => jP, + isDeclarationFileName: () => fl, + isDeclarationName: () => tg, + isDeclarationNameOfEnumOrNamespace: () => nJ, + isDeclarationReadonly: () => t3, + isDeclarationStatement: () => yZ, + isDeclarationWithTypeParameterChildren: () => aB, + isDeclarationWithTypeParameters: () => sB, + isDecorator: () => ll, + isDecoratorTarget: () => Ose, + isDefaultClause: () => CD, + isDefaultImport: () => bS, + isDefaultModifier: () => _F, + isDefaultedExpandoInitializer: () => _K, + isDeleteExpression: () => vte, + isDeleteTarget: () => xB, + isDeprecatedDeclaration: () => M9, + isDestructuringAssignment: () => P0, + isDiskPathRoot: () => oj, + isDoStatement: () => Xhe, + isDocumentRegistryEntry: () => MA, + isDotDotDotToken: () => lF, + isDottedName: () => B3, + isDynamicName: () => i5, + isEffectiveExternalModule: () => EC, + isEffectiveStrictModeSourceFile: () => rB, + isElementAccessChain: () => Ej, + isElementAccessExpression: () => fo, + isEmittedFileOfProgram: () => oie, + isEmptyArrayLiteral: () => qK, + isEmptyBindingElement: () => zY, + isEmptyBindingPattern: () => JY, + isEmptyObjectLiteral: () => ZB, + isEmptyStatement: () => ZJ, + isEmptyStringLiteral: () => pB, + isEntityName: () => Hu, + isEntityNameExpression: () => _o, + isEnumConst: () => ev, + isEnumDeclaration: () => Zb, + isEnumMember: () => j0, + isEqualityOperatorKind: () => P9, + isEqualsGreaterThanToken: () => _te, + isExclamationToken: () => pN, + isExcludedFile: () => wre, + isExclusivelyTypeOnlyImportOrExport: () => YW, + isExpandoPropertyDeclaration: () => Fx, + isExportAssignment: () => Io, + isExportDeclaration: () => wc, + isExportModifier: () => jx, + isExportName: () => DF, + isExportNamespaceAsDefaultDeclaration: () => w7, + isExportOrDefaultModifier: () => CN, + isExportSpecifier: () => Tu, + isExportsIdentifier: () => hS, + isExportsOrModuleExportsOrAlias: () => i2, + isExpression: () => ct, + isExpressionNode: () => Td, + isExpressionOfExternalModuleImportEqualsDeclaration: () => Rse, + isExpressionOfOptionalChainRoot: () => o7, + isExpressionStatement: () => El, + isExpressionWithTypeArguments: () => Lh, + isExpressionWithTypeArgumentsInClassExtendsClause: () => h5, + isExternalModule: () => el, + isExternalModuleAugmentation: () => Pb, + isExternalModuleImportEqualsDeclaration: () => tv, + isExternalModuleIndicator: () => UP, + isExternalModuleNameRelative: () => vl, + isExternalModuleReference: () => Mh, + isExternalModuleSymbol: () => ox, + isExternalOrCommonJsModule: () => $_, + isFileLevelReservedGeneratedIdentifier: () => RP, + isFileLevelUniqueName: () => E7, + isFileProbablyExternalModule: () => wN, + isFirstDeclarationOfSymbolParameter: () => MV, + isFixablePromiseHandler: () => mq, + isForInOrOfStatement: () => _S, + isForInStatement: () => yF, + isForInitializer: () => Kf, + isForOfStatement: () => gN, + isForStatement: () => mv, + isFullSourceFile: () => zg, + isFunctionBlock: () => Nb, + isFunctionBody: () => jj, + isFunctionDeclaration: () => Tc, + isFunctionExpression: () => po, + isFunctionExpressionOrArrowFunction: () => Ky, + isFunctionLike: () => vs, + isFunctionLikeDeclaration: () => Ka, + isFunctionLikeKind: () => nx, + isFunctionLikeOrClassStaticBlockDeclaration: () => bC, + isFunctionOrConstructorTypeNode: () => lZ, + isFunctionOrModuleBlock: () => Fj, + isFunctionSymbol: () => dK, + isFunctionTypeNode: () => ng, + isGeneratedIdentifier: () => Fo, + isGeneratedPrivateIdentifier: () => lS, + isGetAccessor: () => k0, + isGetAccessorDeclaration: () => cp, + isGetOrSetAccessorDeclaration: () => MP, + isGlobalScopeAugmentation: () => eg, + isGlobalSourceFile: () => E0, + isGrammarError: () => AZ, + isHeritageClause: () => Z_, + isHoistedFunction: () => O7, + isHoistedVariableStatement: () => L7, + isIdentifier: () => Me, + isIdentifierANonContextualKeyword: () => wB, + isIdentifierName: () => TK, + isIdentifierOrThisTypeNode: () => Gte, + isIdentifierPart: () => kh, + isIdentifierStart: () => Qm, + isIdentifierText: () => E_, + isIdentifierTypePredicate: () => tK, + isIdentifierTypeReference: () => wee, + isIfStatement: () => dv, + isIgnoredFileFromWildCardWatching: () => eA, + isImplicitGlob: () => hJ, + isImportAttribute: () => kte, + isImportAttributeName: () => oZ, + isImportAttributes: () => LS, + isImportCall: () => _f, + isImportClause: () => id, + isImportDeclaration: () => zo, + isImportEqualsDeclaration: () => _l, + isImportKeyword: () => vD, + isImportMeta: () => PC, + isImportOrExportSpecifier: () => jy, + isImportOrExportSpecifierName: () => cae, + isImportSpecifier: () => ju, + isImportTypeAssertionContainer: () => Khe, + isImportTypeNode: () => Ed, + isImportable: () => nq, + isInComment: () => J0, + isInCompoundLikeAssignment: () => TB, + isInExpressionContext: () => V7, + isInJSDoc: () => $7, + isInJSFile: () => an, + isInJSXText: () => Vse, + isInJsonFile: () => H7, + isInNonReferenceComment: () => Qse, + isInReferenceComment: () => Xse, + isInRightSideOfInternalImportEqualsDeclaration: () => s9, + isInString: () => lk, + isInTemplateString: () => dV, + isInTopLevelContext: () => z7, + isInTypeQuery: () => vx, + isIncrementalBuildInfo: () => aA, + isIncrementalBundleEmitBuildInfo: () => Die, + isIncrementalCompilation: () => Vb, + isIndexSignatureDeclaration: () => r1, + isIndexedAccessTypeNode: () => Qb, + isInferTypeNode: () => AS, + isInfinityOrNaNString: () => lD, + isInitializedProperty: () => VN, + isInitializedVariable: () => U3, + isInsideJsxElement: () => m9, + isInsideJsxElementOrAttribute: () => Use, + isInsideNodeModules: () => AA, + isInsideTemplateLiteral: () => bA, + isInstanceOfExpression: () => y5, + isInstantiatedModule: () => dW, + isInterfaceDeclaration: () => Yl, + isInternalDeclaration: () => kZ, + isInternalModuleImportEqualsDeclaration: () => gS, + isInternalName: () => dz, + isIntersectionTypeNode: () => Ux, + isIntrinsicJsxName: () => BC, + isIterationStatement: () => zy, + isJSDoc: () => Pd, + isJSDocAllType: () => Nte, + isJSDocAugmentsTag: () => Xx, + isJSDocAuthorTag: () => i0e, + isJSDocCallbackTag: () => rz, + isJSDocClassTag: () => Ite, + isJSDocCommentContainingNode: () => h7, + isJSDocConstructSignature: () => gx, + isJSDocDeprecatedTag: () => oz, + isJSDocEnumTag: () => yN, + isJSDocFunctionType: () => a6, + isJSDocImplementsTag: () => kF, + isJSDocImportTag: () => ym, + isJSDocIndexSignature: () => X7, + isJSDocLikeText: () => xz, + isJSDocLink: () => wte, + isJSDocLinkCode: () => Pte, + isJSDocLinkLike: () => ax, + isJSDocLinkPlain: () => r0e, + isJSDocMemberName: () => yv, + isJSDocNameReference: () => ED, + isJSDocNamepathType: () => n0e, + isJSDocNamespaceBody: () => Yge, + isJSDocNode: () => SC, + isJSDocNonNullableType: () => bF, + isJSDocNullableType: () => s6, + isJSDocOptionalParameter: () => X5, + isJSDocOptionalType: () => tz, + isJSDocOverloadTag: () => o6, + isJSDocOverrideTag: () => TF, + isJSDocParameterTag: () => Af, + isJSDocPrivateTag: () => iz, + isJSDocPropertyLikeTag: () => h4, + isJSDocPropertyTag: () => Fte, + isJSDocProtectedTag: () => sz, + isJSDocPublicTag: () => nz, + isJSDocReadonlyTag: () => az, + isJSDocReturnTag: () => xF, + isJSDocSatisfiesExpression: () => IJ, + isJSDocSatisfiesTag: () => CF, + isJSDocSeeTag: () => s0e, + isJSDocSignature: () => B0, + isJSDocTag: () => TC, + isJSDocTemplateTag: () => Bp, + isJSDocThisTag: () => cz, + isJSDocThrowsTag: () => o0e, + isJSDocTypeAlias: () => Fp, + isJSDocTypeAssertion: () => r2, + isJSDocTypeExpression: () => hv, + isJSDocTypeLiteral: () => RS, + isJSDocTypeTag: () => DD, + isJSDocTypedefTag: () => jS, + isJSDocUnknownTag: () => a0e, + isJSDocUnknownType: () => Ate, + isJSDocVariadicType: () => SF, + isJSXTagName: () => IC, + isJsonEqual: () => V5, + isJsonSourceFile: () => tp, + isJsxAttribute: () => hm, + isJsxAttributeLike: () => m7, + isJsxAttributeName: () => Mee, + isJsxAttributes: () => e2, + isJsxCallLike: () => TZ, + isJsxChild: () => HP, + isJsxClosingElement: () => Kb, + isJsxClosingFragment: () => Ete, + isJsxElement: () => gm, + isJsxExpression: () => n6, + isJsxFragment: () => gv, + isJsxNamespacedName: () => wd, + isJsxOpeningElement: () => Dd, + isJsxOpeningFragment: () => sd, + isJsxOpeningLikeElement: () => bu, + isJsxOpeningLikeElementTagName: () => Lse, + isJsxSelfClosingElement: () => MS, + isJsxSpreadAttribute: () => $x, + isJsxTagNameExpression: () => T4, + isJsxText: () => Mx, + isJumpStatementTarget: () => gA, + isKeyword: () => f_, + isKeywordOrPunctuation: () => t5, + isKnownSymbol: () => N3, + isLabelName: () => sV, + isLabelOfLabeledStatement: () => iV, + isLabeledStatement: () => i1, + isLateVisibilityPaintedStatement: () => N7, + isLeftHandSideExpression: () => u_, + isLet: () => F7, + isLineBreak: () => yu, + isLiteralComputedPropertyDeclarationName: () => E3, + isLiteralExpression: () => cS, + isLiteralExpressionOfObject: () => Nj, + isLiteralImportTypeNode: () => Dh, + isLiteralKind: () => y4, + isLiteralNameOfPropertyDeclarationOrIndexAccess: () => c9, + isLiteralTypeLiteral: () => pZ, + isLiteralTypeNode: () => M0, + isLocalName: () => Rh, + isLogicalOperator: () => WK, + isLogicalOrCoalescingAssignmentExpression: () => $B, + isLogicalOrCoalescingAssignmentOperator: () => q4, + isLogicalOrCoalescingBinaryExpression: () => j3, + isLogicalOrCoalescingBinaryOperator: () => g5, + isMappedTypeNode: () => FS, + isMemberName: () => Lg, + isMetaProperty: () => SD, + isMethodDeclaration: () => fc, + isMethodOrAccessor: () => ix, + isMethodSignature: () => pm, + isMinusToken: () => $J, + isMissingDeclaration: () => t0e, + isMissingPackageJsonInfo: () => Jre, + isModifier: () => ia, + isModifierKind: () => By, + isModifierLike: () => Oo, + isModuleAugmentationExternal: () => eB, + isModuleBlock: () => dm, + isModuleBody: () => mZ, + isModuleDeclaration: () => Lc, + isModuleExportName: () => vF, + isModuleExportsAccessExpression: () => Wg, + isModuleIdentifier: () => gB, + isModuleName: () => Qte, + isModuleOrEnumDeclaration: () => VP, + isModuleReference: () => bZ, + isModuleSpecifierLike: () => x9, + isModuleWithStringLiteralName: () => P7, + isNameOfFunctionDeclaration: () => lV, + isNameOfModuleDeclaration: () => cV, + isNamedDeclaration: () => Hl, + isNamedEvaluation: () => X_, + isNamedEvaluationSource: () => PB, + isNamedExportBindings: () => wj, + isNamedExports: () => up, + isNamedImportBindings: () => Bj, + isNamedImports: () => mm, + isNamedImportsOrExports: () => C5, + isNamedTupleMember: () => KC, + isNamespaceBody: () => Qge, + isNamespaceExport: () => ig, + isNamespaceExportDeclaration: () => hN, + isNamespaceImport: () => Yg, + isNamespaceReexportDeclaration: () => lK, + isNewExpression: () => Yb, + isNewExpressionTarget: () => nw, + isNewScopeNode: () => Uee, + isNoSubstitutionTemplateLiteral: () => NS, + isNodeArray: () => xb, + isNodeArrayMultiLine: () => YK, + isNodeDescendantOf: () => Lb, + isNodeKind: () => l7, + isNodeLikeSystem: () => MR, + isNodeModulesDirectory: () => XI, + isNodeWithPossibleHoistedDeclaration: () => bK, + isNonContextualKeyword: () => DB, + isNonGlobalAmbientModule: () => Kj, + isNonNullAccess: () => Lee, + isNonNullChain: () => c7, + isNonNullExpression: () => Hx, + isNonStaticMethodOrAccessorWithPrivateName: () => vne, + isNotEmittedStatement: () => Cte, + isNullishCoalesce: () => Dj, + isNumber: () => Ey, + isNumericLiteral: () => d_, + isNumericLiteralName: () => Xg, + isObjectBindingElementWithoutPropertyName: () => kA, + isObjectBindingOrAssignmentElement: () => JP, + isObjectBindingOrAssignmentPattern: () => Oj, + isObjectBindingPattern: () => Nf, + isObjectLiteralElement: () => Jj, + isObjectLiteralElementLike: () => Eh, + isObjectLiteralExpression: () => oa, + isObjectLiteralMethod: () => Ip, + isObjectLiteralOrClassExpressionMethodOrAccessor: () => R7, + isObjectTypeDeclaration: () => kx, + isOmittedExpression: () => ul, + isOptionalChain: () => vu, + isOptionalChainRoot: () => d4, + isOptionalDeclaration: () => Ax, + isOptionalJSDocPropertyLikeTag: () => nN, + isOptionalTypeNode: () => fF, + isOuterExpression: () => wF, + isOutermostOptionalChain: () => m4, + isOverrideModifier: () => mte, + isPackageJsonInfo: () => KF, + isPackedArrayLiteral: () => NJ, + isParameter: () => Ii, + isParameterPropertyDeclaration: () => H_, + isParameterPropertyModifier: () => v4, + isParenthesizedExpression: () => Yu, + isParenthesizedTypeNode: () => IS, + isParseTreeNode: () => p4, + isPartOfParameterDeclaration: () => av, + isPartOfTypeNode: () => im, + isPartOfTypeOnlyImportOrExportDeclaration: () => aZ, + isPartOfTypeQuery: () => q7, + isPartiallyEmittedExpression: () => bte, + isPatternMatch: () => MI, + isPinnedComment: () => D7, + isPlainJsFile: () => k4, + isPlusToken: () => GJ, + isPossiblyTypeArgumentPosition: () => vA, + isPostfixUnaryExpression: () => YJ, + isPrefixUnaryExpression: () => pv, + isPrimitiveLiteralValue: () => Z5, + isPrivateIdentifier: () => Ni, + isPrivateIdentifierClassElementDeclaration: () => Fu, + isPrivateIdentifierPropertyAccessExpression: () => vC, + isPrivateIdentifierSymbol: () => CK, + isProgramUptoDate: () => rU, + isPrologueDirective: () => nm, + isPropertyAccessChain: () => a7, + isPropertyAccessEntityNameExpression: () => J3, + isPropertyAccessExpression: () => Tn, + isPropertyAccessOrQualifiedName: () => WP, + isPropertyAccessOrQualifiedNameOrImportTypeNode: () => _Z, + isPropertyAssignment: () => Xc, + isPropertyDeclaration: () => ss, + isPropertyName: () => Fc, + isPropertyNameLiteral: () => am, + isPropertySignature: () => m_, + isPrototypeAccess: () => Qy, + isPrototypePropertyAssignment: () => y3, + isPunctuation: () => EB, + isPushOrUnshiftIdentifier: () => NB, + isQualifiedName: () => Xu, + isQuestionDotToken: () => uF, + isQuestionOrExclamationToken: () => Hte, + isQuestionOrPlusOrMinusToken: () => Xte, + isQuestionToken: () => t1, + isReadonlyKeyword: () => pte, + isReadonlyKeywordOrPlusOrMinusToken: () => $te, + isRecognizedTripleSlashComment: () => $j, + isReferenceFileLocation: () => C6, + isReferencedFile: () => Ev, + isRegularExpressionLiteral: () => qJ, + isRequireCall: () => __, + isRequireVariableStatement: () => f3, + isRestParameter: () => Zm, + isRestTypeNode: () => pF, + isReturnStatement: () => Rp, + isReturnStatementWithFixablePromiseHandler: () => V9, + isRightSideOfAccessExpression: () => YB, + isRightSideOfInstanceofExpression: () => VK, + isRightSideOfPropertyAccess: () => N6, + isRightSideOfQualifiedName: () => Mse, + isRightSideOfQualifiedNameOrPropertyAccess: () => H4, + isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName: () => UK, + isRootedDiskPath: () => q_, + isSameEntityName: () => FC, + isSatisfiesExpression: () => hF, + isSemicolonClassElement: () => Ste, + isSetAccessor: () => Mg, + isSetAccessorDeclaration: () => A_, + isShiftOperatorOrHigher: () => bz, + isShorthandAmbientModuleSymbol: () => YP, + isShorthandPropertyAssignment: () => _u, + isSideEffectImport: () => RJ, + isSignedNumericLiteral: () => n5, + isSimpleCopiableExpression: () => s2, + isSimpleInlineableExpression: () => og, + isSimpleParameterList: () => qN, + isSingleOrDoubleQuote: () => p3, + isSolutionConfig: () => Vz, + isSourceElement: () => jee, + isSourceFile: () => Ei, + isSourceFileFromLibrary: () => J6, + isSourceFileJS: () => Gu, + isSourceFileNotJson: () => G7, + isSourceMapping: () => gne, + isSpecialPropertyDeclaration: () => pK, + isSpreadAssignment: () => Zg, + isSpreadElement: () => lp, + isStatement: () => xi, + isStatementButNotDeclaration: () => qP, + isStatementOrBlock: () => vZ, + isStatementWithLocals: () => NZ, + isStatic: () => Vs, + isStaticModifier: () => Bx, + isString: () => rs, + isStringANonContextualKeyword: () => yx, + isStringAndEmptyAnonymousObjectIntersection: () => $se, + isStringDoubleQuoted: () => Q7, + isStringLiteral: () => ea, + isStringLiteralLike: () => Na, + isStringLiteralOrJsxExpression: () => SZ, + isStringLiteralOrTemplate: () => dae, + isStringOrNumericLiteralLike: () => wf, + isStringOrRegularExpressionOrTemplateLiteral: () => hV, + isStringTextContainingNode: () => Aj, + isSuperCall: () => mS, + isSuperKeyword: () => yD, + isSuperProperty: () => D_, + isSupportedSourceFileName: () => TJ, + isSwitchStatement: () => xD, + isSyntaxList: () => c6, + isSyntheticExpression: () => $he, + isSyntheticReference: () => Gx, + isTagName: () => aV, + isTaggedTemplateExpression: () => fv, + isTaggedTemplateTag: () => Fse, + isTemplateExpression: () => mF, + isTemplateHead: () => Rx, + isTemplateLiteral: () => sx, + isTemplateLiteralKind: () => Ry, + isTemplateLiteralToken: () => iZ, + isTemplateLiteralTypeNode: () => yte, + isTemplateLiteralTypeSpan: () => QJ, + isTemplateMiddle: () => HJ, + isTemplateMiddleOrTemplateTail: () => u7, + isTemplateSpan: () => r6, + isTemplateTail: () => cF, + isTextWhiteSpaceLike: () => eae, + isThis: () => A6, + isThisContainerOrFunctionBlock: () => aK, + isThisIdentifier: () => Xy, + isThisInTypeQuery: () => Jb, + isThisInitializedDeclaration: () => W7, + isThisInitializedObjectBindingExpression: () => cK, + isThisProperty: () => o3, + isThisTypeNode: () => bD, + isThisTypeParameter: () => uD, + isThisTypePredicate: () => rK, + isThrowStatement: () => ez, + isToken: () => rx, + isTokenKind: () => Pj, + isTraceEnabled: () => a1, + isTransientSymbol: () => Rg, + isTrivia: () => RC, + isTryStatement: () => OS, + isTupleTypeNode: () => Wx, + isTypeAlias: () => T3, + isTypeAliasDeclaration: () => jp, + isTypeAssertionExpression: () => dF, + isTypeDeclaration: () => Nx, + isTypeElement: () => kb, + isTypeKeyword: () => ow, + isTypeKeywordTokenOrIdentifier: () => b9, + isTypeLiteralNode: () => Qu, + isTypeNode: () => fi, + isTypeNodeKind: () => oJ, + isTypeOfExpression: () => e6, + isTypeOnlyExportDeclaration: () => sZ, + isTypeOnlyImportDeclaration: () => yC, + isTypeOnlyImportOrExportDeclaration: () => x0, + isTypeOperatorNode: () => _v, + isTypeParameterDeclaration: () => Ao, + isTypePredicateNode: () => zx, + isTypeQueryNode: () => $b, + isTypeReferenceNode: () => Y_, + isTypeReferenceType: () => v7, + isTypeUsableAsPropertyName: () => ap, + isUMDExportSymbol: () => k5, + isUnaryExpression: () => Rj, + isUnaryExpressionWithWrite: () => fZ, + isUnicodeIdentifierStart: () => YI, + isUnionTypeNode: () => L0, + isUrl: () => vY, + isValidBigIntString: () => q5, + isValidESSymbolDeclaration: () => KZ, + isValidTypeOnlyAliasUseSite: () => cv, + isValueSignatureDeclaration: () => SS, + isVarAwaitUsing: () => r3, + isVarConst: () => wC, + isVarConstLike: () => XZ, + isVarUsing: () => n3, + isVariableDeclaration: () => Kn, + isVariableDeclarationInVariableStatement: () => w4, + isVariableDeclarationInitializedToBareOrAccessedRequire: () => Ib, + isVariableDeclarationInitializedToRequire: () => _3, + isVariableDeclarationList: () => Il, + isVariableLike: () => D4, + isVariableStatement: () => pc, + isVoidExpression: () => Vx, + isWatchSet: () => iJ, + isWhileStatement: () => KJ, + isWhiteSpaceLike: () => Ig, + isWhiteSpaceSingleLine: () => em, + isWithStatement: () => Tte, + isWriteAccess: () => xx, + isWriteOnlyAccess: () => x5, + isYieldExpression: () => gF, + jsxModeNeedsExplicitImport: () => eq, + keywordPart: () => rf, + last: () => _a, + lastOrUndefined: () => Co, + length: () => Ir, + libMap: () => wz, + libs: () => LF, + lineBreakPart: () => R6, + loadModuleFromGlobalCache: () => Zre, + loadWithModeAwareCache: () => rA, + makeIdentifierFromModuleName: () => RZ, + makeImport: () => p1, + makeStringLiteral: () => cw, + mangleScopedPackageName: () => v6, + map: () => gr, + mapAllOrFail: () => gR, + mapDefined: () => Li, + mapDefinedIterator: () => Ty, + mapEntries: () => JX, + mapIterator: () => VE, + mapOneOrMany: () => QV, + mapToDisplayParts: () => Pv, + matchFiles: () => vJ, + matchPatternOrExact: () => kJ, + matchedText: () => eQ, + matchesExclude: () => $F, + matchesExcludeWorker: () => XF, + maxBy: () => wR, + maybeBind: () => Is, + maybeSetLocalizedDiagnosticMessages: () => aee, + memoize: () => Iu, + memoizeOne: () => Kd, + min: () => PR, + minAndMax: () => Cee, + missingFileModifiedTime: () => V_, + modifierToFlag: () => Sx, + modifiersToFlags: () => lm, + moduleExportNameIsDefault: () => Km, + moduleExportNameTextEscaped: () => wb, + moduleExportNameTextUnescaped: () => qy, + moduleOptionDeclaration: () => cre, + moduleResolutionIsEqualTo: () => wZ, + moduleResolutionNameAndModeGetter: () => DO, + moduleResolutionOptionDeclarations: () => Nz, + moduleResolutionSupportsPackageJsonExportsAndImports: () => HC, + moduleResolutionUsesNodeModules: () => S9, + moduleSpecifierToValidIdentifier: () => FA, + moduleSpecifiers: () => Bh, + moduleSymbolToValidIdentifier: () => IA, + moveEmitHelpers: () => ete, + moveRangeEnd: () => S5, + moveRangePastDecorators: () => Ih, + moveRangePastModifiers: () => um, + moveRangePos: () => ov, + moveSyntheticComments: () => Yee, + mutateMap: () => Y4, + mutateMapSkippingNewValues: () => Vg, + needsParentheses: () => D9, + needsScopeMarker: () => p7, + newCaseClauseTracker: () => B9, + newPrivateEnvironment: () => Sne, + noEmitNotification: () => XN, + noEmitSubstitution: () => GD, + noTransformers: () => Zne, + noTruncationMaximumTruncationLength: () => Uj, + nodeCanBeDecorated: () => l3, + nodeCoreModules: () => QC, + nodeHasName: () => FP, + nodeIsDecorated: () => AC, + nodeIsMissing: () => tc, + nodeIsPresent: () => Ap, + nodeIsSynthesized: () => no, + nodeModuleNameResolver: () => qre, + nodeModulesPathPart: () => Kg, + nodeNextJsonConfigResolver: () => Hre, + nodeOrChildIsDecorated: () => u3, + nodeOverlapsWithStartEnd: () => l9, + nodePosToString: () => ehe, + nodeSeenTracker: () => O6, + nodeStartsNewLexicalEnvironment: () => AB, + noop: () => Ja, + noopFileWatcher: () => w6, + normalizePath: () => Hs, + normalizeSlashes: () => Vl, + normalizeSpans: () => yj, + not: () => jI, + notImplemented: () => qs, + notImplementedResolver: () => nie, + nullNodeConverters: () => $ee, + nullParenthesizerRules: () => Hee, + nullTransformationContext: () => YN, + objectAllocator: () => $l, + operatorPart: () => uw, + optionDeclarations: () => Nd, + optionMapToObject: () => WF, + optionsAffectingProgramStructure: () => pre, + optionsForBuild: () => Iz, + optionsForWatch: () => ek, + optionsHaveChanges: () => xC, + or: () => U_, + orderedRemoveItem: () => $E, + orderedRemoveItemAt: () => Ny, + packageIdToPackageName: () => C7, + packageIdToString: () => K1, + parameterIsThisKeyword: () => Bb, + parameterNamePart: () => rae, + parseBaseNodeFactory: () => rre, + parseBigInt: () => Dee, + parseBuildCommand: () => Sre, + parseCommandLine: () => vre, + parseCommandLineWorker: () => Oz, + parseConfigFileTextToJson: () => Mz, + parseConfigFileWithSystem: () => zie, + parseConfigHostFromCompilerHostLike: () => OO, + parseCustomTypeOption: () => BF, + parseIsolatedEntityName: () => Kx, + parseIsolatedJSDocComment: () => ire, + parseJSDocTypeExpressionForTests: () => A0e, + parseJsonConfigFileContent: () => aye, + parseJsonSourceFileConfigFileContent: () => LN, + parseJsonText: () => PN, + parseListTypeOption: () => hre, + parseNodeFactory: () => bv, + parseNodeModuleFromPath: () => BN, + parsePackageName: () => nO, + parsePseudoBigInt: () => aD, + parseValidBigInt: () => wJ, + pasteEdits: () => KH, + patchWriteFileEnsuringDirectory: () => yY, + pathContainsNodeModules: () => c1, + pathIsAbsolute: () => i4, + pathIsBareSpecifier: () => cj, + pathIsRelative: () => lf, + patternText: () => KX, + performIncrementalCompilation: () => Wie, + performance: () => cQ, + positionBelongsToNode: () => uV, + positionIsASICandidate: () => N9, + positionIsSynthesized: () => kd, + positionsAreOnSameLine: () => ip, + preProcessFile: () => m2e, + probablyUsesSemicolons: () => NA, + processCommentPragmas: () => Ez, + processPragmasIntoFields: () => Dz, + processTaggedTemplateExpression: () => PW, + programContainsEsModules: () => Zse, + programContainsModules: () => Yse, + projectReferenceIsEqualTo: () => Vj, + propertyNamePart: () => nae, + pseudoBigIntToString: () => qb, + punctuationPart: () => Cu, + pushIfUnique: () => Qf, + quote: () => pw, + quotePreferenceFromString: () => DV, + rangeContainsPosition: () => I6, + rangeContainsPositionExclusive: () => hA, + rangeContainsRange: () => p_, + rangeContainsRangeExclusive: () => jse, + rangeContainsStartEnd: () => yA, + rangeEndIsOnSameLineAsRangeStart: () => W3, + rangeEndPositionsAreOnSameLine: () => XK, + rangeEquals: () => SR, + rangeIsOnSingleLine: () => CS, + rangeOfNode: () => EJ, + rangeOfTypeParameters: () => DJ, + rangeOverlapsWithStartEnd: () => iw, + rangeStartIsOnSameLineAsRangeEnd: () => QK, + rangeStartPositionsAreOnSameLine: () => T5, + readBuilderProgram: () => qO, + readConfigFile: () => FN, + readJson: () => WC, + readJsonConfigFile: () => Tre, + readJsonOrUndefined: () => KB, + reduceEachLeadingCommentRange: () => DY, + reduceEachTrailingCommentRange: () => wY, + reduceLeft: () => qu, + reduceLeftIterator: () => MX, + reducePathComponents: () => nS, + refactor: () => dk, + regExpEscape: () => Phe, + regularExpressionFlagToCharacterCode: () => wge, + relativeComplement: () => zX, + removeAllComments: () => cN, + removeEmitHelper: () => Vhe, + removeExtension: () => eN, + removeFileExtension: () => $u, + removeIgnoredPath: () => jO, + removeMinAndVersionNumbers: () => IR, + removePrefix: () => XE, + removeSuffix: () => lC, + removeTrailingDirectorySeparator: () => X1, + repeatString: () => TA, + replaceElement: () => kR, + replaceFirstStar: () => DS, + resolutionExtensionIsTSOrJson: () => rD, + resolveConfigFileProjectName: () => OU, + resolveJSModule: () => Wre, + resolveLibrary: () => tO, + resolveModuleName: () => WS, + resolveModuleNameFromCache: () => Lye, + resolvePackageNameToPackageJson: () => $z, + resolvePath: () => Iy, + resolveProjectReferencePath: () => ak, + resolveTripleslashReference: () => HW, + resolveTypeReferenceDirective: () => jre, + resolvingEmptyArray: () => Wj, + returnFalse: () => Th, + returnNoopFileWatcher: () => ew, + returnTrue: () => yb, + returnUndefined: () => vb, + returnsPromise: () => dq, + rewriteModuleSpecifier: () => nk, + sameFlatMap: () => jX, + sameMap: () => Wc, + sameMapping: () => k1e, + scanTokenAtPosition: () => $Z, + scanner: () => Fl, + semanticDiagnosticsOptionDeclarations: () => ure, + serializeCompilerOptions: () => UF, + server: () => xwe, + servicesVersion: () => iTe, + setCommentRange: () => Hc, + setConfigFileInOptions: () => Wz, + setConstantValue: () => Kee, + setEmitFlags: () => on, + setGetSourceFileAsHashVersioned: () => VO, + setIdentifierAutoGenerate: () => _N, + setIdentifierGeneratedImportReference: () => nte, + setIdentifierTypeArguments: () => O0, + setInternalEmitFlags: () => lN, + setLocalizedDiagnosticMessages: () => see, + setNodeChildren: () => Ote, + setNodeFlags: () => Nee, + setObjectAllocator: () => iee, + setOriginalNode: () => Sn, + setParent: () => Fa, + setParentRecursive: () => lv, + setPrivateIdentifier: () => VS, + setSnippetElement: () => UJ, + setSourceMapRange: () => da, + setStackTraceLimit: () => fge, + setStartsOnNewLine: () => iF, + setSyntheticLeadingComments: () => uv, + setSyntheticTrailingComments: () => Ox, + setSys: () => yge, + setSysLog: () => mY, + setTextRange: () => ot, + setTextRangeEnd: () => XC, + setTextRangePos: () => oD, + setTextRangePosEnd: () => Cd, + setTextRangePosWidth: () => PJ, + setTokenSourceMapRange: () => Qee, + setTypeNode: () => tte, + setUILocale: () => QX, + setValueDeclaration: () => v3, + shouldAllowImportingTsExtension: () => b6, + shouldPreserveConstEnums: () => Yy, + shouldRewriteModuleSpecifier: () => S3, + shouldUseUriStyleNodeCoreModules: () => R9, + showModuleSpecifier: () => tee, + signatureHasRestParameter: () => ku, + signatureToDisplayParts: () => jV, + single: () => xR, + singleElementArray: () => QT, + singleIterator: () => BX, + singleOrMany: () => Gm, + singleOrUndefined: () => Hm, + skipAlias: () => Gl, + skipConstraint: () => kV, + skipOuterExpressions: () => xc, + skipParentheses: () => za, + skipPartiallyEmittedExpressions: () => ed, + skipTrivia: () => aa, + skipTypeChecking: () => $C, + skipTypeCheckingIgnoringNoCheck: () => Eee, + skipTypeParentheses: () => M4, + skipWhile: () => rQ, + sliceAfter: () => CJ, + some: () => at, + sortAndDeduplicate: () => GE, + sortAndDeduplicateDiagnostics: () => mC, + sourceFileAffectingCompilerOptions: () => Az, + sourceFileMayBeEmitted: () => Rb, + sourceMapCommentRegExp: () => hW, + sourceMapCommentRegExpDontCareLineStart: () => pne, + spacePart: () => cc, + spanMap: () => hR, + startEndContainsRange: () => rJ, + startEndOverlapsWithStartEnd: () => u9, + startOnNewLine: () => xu, + startTracing: () => fQ, + startsWith: () => Vi, + startsWithDirectory: () => _j, + startsWithUnderscore: () => KV, + startsWithUseStrict: () => zte, + stringContainsAt: () => Sae, + stringToToken: () => sS, + stripQuotes: () => Op, + supportedDeclarationExtensions: () => z5, + supportedJSExtensionsFlat: () => GC, + supportedLocaleDirectories: () => UY, + supportedTSExtensionsFlat: () => bJ, + supportedTSImplementationExtensions: () => Y3, + suppressLeadingAndTrailingTrivia: () => nf, + suppressLeadingTrivia: () => WV, + suppressTrailingTrivia: () => _ae, + symbolEscapedNameNoDefault: () => T9, + symbolName: () => _c, + symbolNameNoDefault: () => PV, + symbolToDisplayParts: () => _w, + sys: () => nl, + sysLog: () => bP, + tagNamesAreEquivalent: () => Tv, + takeWhile: () => LR, + targetOptionDeclaration: () => Pz, + targetToLibMap: () => PY, + testFormatSettings: () => Mbe, + textChangeRangeIsUnchanged: () => jY, + textChangeRangeNewSpan: () => f4, + textChanges: () => sn, + textOrKeywordPart: () => RV, + textPart: () => Lf, + textRangeContainsPositionInclusive: () => PP, + textRangeContainsTextSpan: () => IY, + textRangeIntersectsWithTextSpan: () => MY, + textSpanContainsPosition: () => gj, + textSpanContainsTextRange: () => hj, + textSpanContainsTextSpan: () => AY, + textSpanEnd: () => Yo, + textSpanIntersection: () => RY, + textSpanIntersectsWith: () => NP, + textSpanIntersectsWithPosition: () => LY, + textSpanIntersectsWithTextSpan: () => OY, + textSpanIsEmpty: () => NY, + textSpanOverlap: () => FY, + textSpanOverlapsWith: () => Mge, + textSpansEqual: () => M6, + textToKeywordObj: () => QI, + timestamp: () => ao, + toArray: () => $T, + toBuilderFileEmit: () => Nie, + toBuilderStateFileInfoForMultiEmit: () => Pie, + toEditorSettings: () => zA, + toFileNameLowerCase: () => Dy, + toPath: () => oo, + toProgramEmitPending: () => Aie, + toSorted: () => W_, + tokenIsIdentifierOrKeyword: () => c_, + tokenIsIdentifierOrKeywordOrGreaterThan: () => SY, + tokenToString: () => Xs, + trace: () => Yi, + tracing: () => nn, + tracingEnabled: () => vP, + transferSourceFileChildren: () => Lte, + transform: () => dTe, + transformClassFields: () => Ane, + transformDeclarations: () => FW, + transformECMAScriptModule: () => IW, + transformES2015: () => qne, + transformES2016: () => Vne, + transformES2017: () => Lne, + transformES2018: () => Mne, + transformES2019: () => Rne, + transformES2020: () => jne, + transformES2021: () => Bne, + transformESDecorators: () => One, + transformESNext: () => Jne, + transformGenerators: () => Hne, + transformImpliedNodeFormatDependentModule: () => $ne, + transformJsx: () => Une, + transformLegacyDecorators: () => Fne, + transformModule: () => AW, + transformNamedEvaluation: () => K_, + transformNodes: () => QN, + transformSystemModule: () => Gne, + transformTypeScript: () => Nne, + transpile: () => k2e, + transpileDeclaration: () => T2e, + transpileModule: () => Vae, + transpileOptionValueCompilerOptions: () => dre, + tryAddToSet: () => S0, + tryAndIgnoreErrors: () => F9, + tryCast: () => jn, + tryDirectoryExists: () => I9, + tryExtractTSExtension: () => v5, + tryFileExists: () => mw, + tryGetClassExtendingExpressionWithTypeArguments: () => XB, + tryGetClassImplementingOrExtendingExpressionWithTypeArguments: () => QB, + tryGetDirectories: () => A9, + tryGetExtensionFromPath: () => $g, + tryGetImportFromModuleSpecifier: () => b3, + tryGetJSDocSatisfiesTypeNode: () => Q5, + tryGetModuleNameFromFile: () => xN, + tryGetModuleSpecifierFromDeclaration: () => px, + tryGetNativePerformanceHooks: () => oQ, + tryGetPropertyAccessOrIdentifierToString: () => z3, + tryGetPropertyNameOfBindingOrAssignmentElement: () => NF, + tryGetSourceMappingURL: () => dne, + tryGetTextOfPropertyName: () => E4, + tryParseJson: () => b5, + tryParsePattern: () => Px, + tryParsePatterns: () => tN, + tryParseRawSourceMap: () => mne, + tryReadDirectory: () => HV, + tryReadFile: () => ID, + tryRemoveDirectoryPrefix: () => gJ, + tryRemoveExtension: () => kee, + tryRemovePrefix: () => OR, + tryRemoveSuffix: () => ZX, + tscBuildOption: () => JS, + typeAcquisitionDeclarations: () => RF, + typeAliasNamePart: () => iae, + typeDirectiveIsEqualTo: () => PZ, + typeKeywords: () => xV, + typeParameterNamePart: () => sae, + typeToDisplayParts: () => EA, + unchangedPollThresholds: () => VI, + unchangedTextChangeRange: () => e7, + unescapeLeadingUnderscores: () => Pi, + unmangleScopedPackageName: () => zN, + unorderedRemoveItem: () => XT, + unprefixedNodeCoreModules: () => Wee, + unreachableCodeIsError: () => _ee, + unsetNodeChildren: () => uz, + unusedLabelIsError: () => fee, + unwrapInnermostStatementOfLabel: () => _B, + unwrapParenthesizedExpression: () => Jee, + updateErrorForNoInputFiles: () => GF, + updateLanguageServiceSourceFile: () => zq, + updateMissingFilePathsWatch: () => UW, + updateResolutionField: () => m6, + updateSharedExtendedConfigFileWatcher: () => xO, + updateSourceFile: () => kz, + updateWatchingWildcardDirectories: () => KN, + usingSingleLineStringWriter: () => kC, + utf16EncodeAsString: () => _4, + validateLocaleAndSetLanguage: () => bj, + version: () => Xf, + versionMajorMinor: () => UE, + visitArray: () => JD, + visitCommaListElements: () => _O, + visitEachChild: () => kr, + visitFunctionBody: () => Of, + visitIterationBody: () => Zu, + visitLexicalEnvironment: () => gW, + visitNode: () => Xe, + visitNodes: () => Or, + visitParameterList: () => ic, + walkUpBindingElementsAndPatterns: () => tx, + walkUpOuterExpressions: () => Wte, + walkUpParenthesizedExpressions: () => rd, + walkUpParenthesizedTypes: () => C3, + walkUpParenthesizedTypesAndGetParentAndChild: () => SK, + whitespaceOrMapCommentRegExp: () => yW, + writeCommentRange: () => zC, + writeFile: () => p5, + writeFileEnsuringDirectories: () => WB, + zipWith: () => fR + }); + var bwe; + function zZe() { + return bwe ?? (bwe = new yd(Xf)); + } + function Swe(e, t, n, i, s) { + let o = t ? "DeprecationError: " : "DeprecationWarning: "; + return o += `'${e}' `, o += i ? `has been deprecated since v${i}` : "is deprecated", o += t ? " and can no longer be used." : n ? ` and will no longer be usable after v${n}.` : ".", o += s ? ` ${qg(s, [e])}` : "", o; + } + function WZe(e, t, n, i) { + const s = Swe( + e, + /*error*/ + !0, + t, + n, + i + ); + return () => { + throw new TypeError(s); + }; + } + function UZe(e, t, n, i) { + let s = !1; + return () => { + s || (E.log.warn(Swe( + e, + /*error*/ + !1, + t, + n, + i + )), s = !0); + }; + } + function VZe(e, t = {}) { + const n = typeof t.typeScriptVersion == "string" ? new yd(t.typeScriptVersion) : t.typeScriptVersion ?? zZe(), i = typeof t.errorAfter == "string" ? new yd(t.errorAfter) : t.errorAfter, s = typeof t.warnAfter == "string" ? new yd(t.warnAfter) : t.warnAfter, o = typeof t.since == "string" ? new yd(t.since) : t.since ?? s, c = t.error || i && n.compareTo(i) >= 0, _ = !s || n.compareTo(s) >= 0; + return c ? WZe(e, i, o, t.message) : _ ? UZe(e, i, o, t.message) : Ja; + } + function qZe(e, t) { + return function() { + return e(), t.apply(this, arguments); + }; + } + function HZe(e, t) { + const n = VZe(t?.name ?? E.getFunctionName(e), t); + return qZe(n, e); + } + function eG(e, t, n, i) { + if (Object.defineProperty(o, "name", { ...Object.getOwnPropertyDescriptor(o, "name"), value: e }), i) + for (const c of Object.keys(i)) { + const _ = +c; + !isNaN(_) && ro(t, `${_}`) && (t[_] = HZe(t[_], { ...i[_], name: e })); + } + const s = GZe(t, n); + return o; + function o(...c) { + const _ = s(c), u = _ !== void 0 ? t[_] : void 0; + if (typeof u == "function") + return u(...c); + throw new TypeError("Invalid arguments"); + } + } + function GZe(e, t) { + return (n) => { + for (let i = 0; ro(e, `${i}`) && ro(t, `${i}`); i++) { + const s = t[i]; + if (s(n)) + return i; + } + }; + } + function Twe(e) { + return { + overload: (t) => ({ + bind: (n) => ({ + finish: () => eG(e, t, n), + deprecate: (i) => ({ + finish: () => eG(e, t, n, i) + }) + }) + }) + }; + } + var xwe = {}; + Ec(xwe, { + ActionInvalidate: () => KO, + ActionPackageInstalled: () => e9, + ActionSet: () => ZO, + ActionWatchTypingLocations: () => pA, + Arguments: () => QU, + AutoImportProviderProject: () => I_e, + AuxiliaryProject: () => N_e, + CharRangeSection: () => ife, + CloseFileWatcherEvent: () => pG, + CommandNames: () => tPe, + ConfigFileDiagEvent: () => cG, + ConfiguredProject: () => F_e, + ConfiguredProjectLoadKind: () => B_e, + CreateDirectoryWatcherEvent: () => fG, + CreateFileWatcherEvent: () => _G, + Errors: () => Vh, + EventBeginInstallTypes: () => $U, + EventEndInstallTypes: () => XU, + EventInitializationFailed: () => mse, + EventTypesRegistry: () => GU, + ExternalProject: () => rG, + GcTimer: () => y_e, + InferredProject: () => P_e, + LargeFileReferencedEvent: () => oG, + LineIndex: () => v8, + LineLeaf: () => ML, + LineNode: () => K6, + LogLevel: () => l_e, + Msg: () => u_e, + OpenFileInfoTelemetryEvent: () => O_e, + Project: () => kk, + ProjectInfoTelemetryEvent: () => uG, + ProjectKind: () => Aw, + ProjectLanguageServiceStateEvent: () => lG, + ProjectLoadingFinishEvent: () => aG, + ProjectLoadingStartEvent: () => sG, + ProjectService: () => $_e, + ProjectsUpdatedInBackgroundEvent: () => FL, + ScriptInfo: () => T_e, + ScriptVersionCache: () => CG, + Session: () => lPe, + TextStorage: () => S_e, + ThrottledOperations: () => h_e, + TypingsInstallerAdapter: () => mPe, + allFilesAreJsOrDts: () => E_e, + allRootFilesAreJsOrDts: () => C_e, + asNormalizedPath: () => Dwe, + convertCompilerOptions: () => OL, + convertFormatOptions: () => Q6, + convertScriptKindName: () => mG, + convertTypeAcquisition: () => M_e, + convertUserPreferences: () => R_e, + convertWatchOptions: () => h8, + countEachFileTypes: () => p8, + createInstallTypingsRequest: () => __e, + createModuleSpecifierCache: () => Y_e, + createNormalizedPathMap: () => wwe, + createPackageJsonCache: () => Z_e, + createSortedArray: () => g_e, + emptyArray: () => pl, + findArgument: () => wbe, + formatDiagnosticToProtocol: () => y8, + formatMessage: () => K_e, + getBaseConfigFileName: () => tG, + getDetailWatchInfo: () => vG, + getLocationInNewDocument: () => nfe, + hasArgument: () => Dbe, + hasNoTypeScriptSource: () => D_e, + indent: () => rw, + isBackgroundProject: () => m8, + isConfigFile: () => X_e, + isConfiguredProject: () => H0, + isDynamicFileName: () => Nw, + isExternalProject: () => d8, + isInferredProject: () => X6, + isInferredProjectName: () => f_e, + isProjectDeferredClose: () => g8, + makeAutoImportProviderProjectName: () => d_e, + makeAuxiliaryProjectName: () => m_e, + makeInferredProjectName: () => p_e, + maxFileSize: () => iG, + maxProgramSizeForNonTsFiles: () => nG, + normalizedPathToPath: () => $6, + nowString: () => Pbe, + nullCancellationToken: () => Zwe, + nullTypingsInstaller: () => LL, + protocol: () => v_e, + scriptInfoIsContainedByBackgroundProject: () => x_e, + scriptInfoIsContainedByDeferredClosedProject: () => k_e, + stringifyIndented: () => Dv, + toEvent: () => efe, + toNormalizedPath: () => eo, + tryConvertScriptKindName: () => dG, + typingsInstaller: () => c_e, + updateProjectIfDirty: () => Up + }); + var c_e = {}; + Ec(c_e, { + TypingsInstaller: () => QZe, + getNpmCommandForInstallation: () => Cwe, + installNpmPackages: () => XZe, + typingsName: () => Ewe + }); + var $Ze = { + isEnabled: () => !1, + writeLine: Ja + }; + function kwe(e, t, n, i) { + try { + const s = WS(t, Ln(e, "index.d.ts"), { + moduleResolution: 2 + /* Node10 */ + }, n); + return s.resolvedModule && s.resolvedModule.resolvedFileName; + } catch (s) { + i.isEnabled() && i.writeLine(`Failed to resolve ${t} in folder '${e}': ${s.message}`); + return; + } + } + function XZe(e, t, n, i) { + let s = !1; + for (let o = n.length; o > 0; ) { + const c = Cwe(e, t, n, o); + o = c.remaining, s = i(c.command) || s; + } + return s; + } + function Cwe(e, t, n, i) { + const s = n.length - i; + let o, c = i; + for (; o = `${e} install --ignore-scripts ${(c === n.length ? n : n.slice(s, s + c)).join(" ")} --save-dev --user-agent="typesInstaller/${t}"`, !(o.length < 8e3); ) + c = c - Math.floor(c / 2); + return { command: o, remaining: i - c }; + } + var QZe = class { + constructor(e, t, n, i, s, o = $Ze) { + this.installTypingHost = e, this.globalCachePath = t, this.safeListPath = n, this.typesMapLocation = i, this.throttleLimit = s, this.log = o, this.packageNameToTypingLocation = /* @__PURE__ */ new Map(), this.missingTypingsSet = /* @__PURE__ */ new Set(), this.knownCachesSet = /* @__PURE__ */ new Set(), this.projectWatchers = /* @__PURE__ */ new Map(), this.pendingRunRequests = [], this.installRunCount = 1, this.inFlightRequestCount = 0, this.latestDistTag = "latest", this.log.isEnabled() && this.log.writeLine(`Global cache location '${t}', safe file path '${n}', types map path ${i}`), this.processCacheLocation(this.globalCachePath); + } + /** @internal */ + handleRequest(e) { + switch (e.kind) { + case "discover": + this.install(e); + break; + case "closeProject": + this.closeProject(e); + break; + case "typesRegistry": { + const t = {}; + this.typesRegistry.forEach((i, s) => { + t[s] = i; + }); + const n = { kind: GU, typesRegistry: t }; + this.sendResponse(n); + break; + } + case "installPackage": { + this.installPackage(e); + break; + } + default: + E.assertNever(e); + } + } + closeProject(e) { + this.closeWatchers(e.projectName); + } + closeWatchers(e) { + if (this.log.isEnabled() && this.log.writeLine(`Closing file watchers for project '${e}'`), !this.projectWatchers.get(e)) { + this.log.isEnabled() && this.log.writeLine(`No watchers are registered for project '${e}'`); + return; + } + this.projectWatchers.delete(e), this.sendResponse({ kind: pA, projectName: e, files: [] }), this.log.isEnabled() && this.log.writeLine(`Closing file watchers for project '${e}' - done.`); + } + install(e) { + this.log.isEnabled() && this.log.writeLine(`Got install request${Dv(e)}`), e.cachePath && (this.log.isEnabled() && this.log.writeLine(`Request specifies cache path '${e.cachePath}', loading cached information...`), this.processCacheLocation(e.cachePath)), this.safeList === void 0 && this.initializeSafeList(); + const t = f1.discoverTypings( + this.installTypingHost, + this.log.isEnabled() ? (n) => this.log.writeLine(n) : void 0, + e.fileNames, + e.projectRootPath, + this.safeList, + this.packageNameToTypingLocation, + e.typeAcquisition, + e.unresolvedImports, + this.typesRegistry, + e.compilerOptions + ); + this.watchFiles(e.projectName, t.filesToWatch), t.newTypingNames.length ? this.installTypings(e, e.cachePath || this.globalCachePath, t.cachedTypingPaths, t.newTypingNames) : (this.sendResponse(this.createSetTypings(e, t.cachedTypingPaths)), this.log.isEnabled() && this.log.writeLine("No new typings were requested as a result of typings discovery")); + } + /** @internal */ + installPackage(e) { + const { fileName: t, packageName: n, projectName: i, projectRootPath: s, id: o } = e, c = a4(Hn(t), (_) => { + if (this.installTypingHost.fileExists(Ln(_, "package.json"))) + return _; + }) || s; + if (c) + this.installWorker(-1, [n], c, (_) => { + const u = _ ? `Package ${n} installed.` : `There was an error installing ${n}.`, m = { + kind: e9, + projectName: i, + id: o, + success: _, + message: u + }; + this.sendResponse(m); + }); + else { + const _ = { + kind: e9, + projectName: i, + id: o, + success: !1, + message: "Could not determine a project root path." + }; + this.sendResponse(_); + } + } + initializeSafeList() { + if (this.typesMapLocation) { + const e = f1.loadTypesMap(this.installTypingHost, this.typesMapLocation); + if (e) { + this.log.writeLine(`Loaded safelist from types map file '${this.typesMapLocation}'`), this.safeList = e; + return; + } + this.log.writeLine(`Failed to load safelist from types map file '${this.typesMapLocation}'`); + } + this.safeList = f1.loadSafeList(this.installTypingHost, this.safeListPath); + } + processCacheLocation(e) { + if (this.log.isEnabled() && this.log.writeLine(`Processing cache location '${e}'`), this.knownCachesSet.has(e)) { + this.log.isEnabled() && this.log.writeLine("Cache location was already processed..."); + return; + } + const t = Ln(e, "package.json"), n = Ln(e, "package-lock.json"); + if (this.log.isEnabled() && this.log.writeLine(`Trying to find '${t}'...`), this.installTypingHost.fileExists(t) && this.installTypingHost.fileExists(n)) { + const i = JSON.parse(this.installTypingHost.readFile(t)), s = JSON.parse(this.installTypingHost.readFile(n)); + if (this.log.isEnabled() && (this.log.writeLine(`Loaded content of '${t}':${Dv(i)}`), this.log.writeLine(`Loaded content of '${n}':${Dv(s)}`)), i.devDependencies && s.dependencies) + for (const o in i.devDependencies) { + if (!ro(s.dependencies, o)) + continue; + const c = Vc(o); + if (!c) + continue; + const _ = kwe(e, c, this.installTypingHost, this.log); + if (!_) { + this.missingTypingsSet.add(c); + continue; + } + const u = this.packageNameToTypingLocation.get(c); + if (u) { + if (u.typingLocation === _) + continue; + this.log.isEnabled() && this.log.writeLine(`New typing for package ${c} from '${_}' conflicts with existing typing file '${u}'`); + } + this.log.isEnabled() && this.log.writeLine(`Adding entry into typings cache: '${c}' => '${_}'`); + const m = FI(s.dependencies, o), g = m && m.version; + if (!g) + continue; + const h = { typingLocation: _, version: new yd(g) }; + this.packageNameToTypingLocation.set(c, h); + } + } + this.log.isEnabled() && this.log.writeLine(`Finished processing cache location '${e}'`), this.knownCachesSet.add(e); + } + filterTypings(e) { + return Li(e, (t) => { + const n = v6(t); + if (this.missingTypingsSet.has(n)) { + this.log.isEnabled() && this.log.writeLine(`'${t}':: '${n}' is in missingTypingsSet - skipping...`); + return; + } + const i = f1.validatePackageName(t); + if (i !== f1.NameValidationResult.Ok) { + this.missingTypingsSet.add(n), this.log.isEnabled() && this.log.writeLine(f1.renderPackageNameValidationFailure(i, t)); + return; + } + if (!this.typesRegistry.has(n)) { + this.log.isEnabled() && this.log.writeLine(`'${t}':: Entry for package '${n}' does not exist in local types registry - skipping...`); + return; + } + if (this.packageNameToTypingLocation.get(n) && f1.isTypingUpToDate(this.packageNameToTypingLocation.get(n), this.typesRegistry.get(n))) { + this.log.isEnabled() && this.log.writeLine(`'${t}':: '${n}' already has an up-to-date typing - skipping...`); + return; + } + return n; + }); + } + ensurePackageDirectoryExists(e) { + const t = Ln(e, "package.json"); + this.log.isEnabled() && this.log.writeLine(`Npm config file: ${t}`), this.installTypingHost.fileExists(t) || (this.log.isEnabled() && this.log.writeLine(`Npm config file: '${t}' is missing, creating new one...`), this.ensureDirectoryExists(e, this.installTypingHost), this.installTypingHost.writeFile(t, '{ "private": true }')); + } + installTypings(e, t, n, i) { + this.log.isEnabled() && this.log.writeLine(`Installing typings ${JSON.stringify(i)}`); + const s = this.filterTypings(i); + if (s.length === 0) { + this.log.isEnabled() && this.log.writeLine("All typings are known to be missing or invalid - no need to install more typings"), this.sendResponse(this.createSetTypings(e, n)); + return; + } + this.ensurePackageDirectoryExists(t); + const o = this.installRunCount; + this.installRunCount++, this.sendResponse({ + kind: $U, + eventId: o, + typingsInstallerVersion: Xf, + projectName: e.projectName + }); + const c = s.map(Ewe); + this.installTypingsAsync(o, c, t, (_) => { + try { + if (!_) { + this.log.isEnabled() && this.log.writeLine(`install request failed, marking packages as missing to prevent repeated requests: ${JSON.stringify(s)}`); + for (const m of s) + this.missingTypingsSet.add(m); + return; + } + this.log.isEnabled() && this.log.writeLine(`Installed typings ${JSON.stringify(c)}`); + const u = []; + for (const m of s) { + const g = kwe(t, m, this.installTypingHost, this.log); + if (!g) { + this.missingTypingsSet.add(m); + continue; + } + const h = this.typesRegistry.get(m), S = new yd(h[`ts${UE}`] || h[this.latestDistTag]), T = { typingLocation: g, version: S }; + this.packageNameToTypingLocation.set(m, T), u.push(g); + } + this.log.isEnabled() && this.log.writeLine(`Installed typing files ${JSON.stringify(u)}`), this.sendResponse(this.createSetTypings(e, n.concat(u))); + } finally { + const u = { + kind: XU, + eventId: o, + projectName: e.projectName, + packagesToInstall: c, + installSuccess: _, + typingsInstallerVersion: Xf + }; + this.sendResponse(u); + } + }); + } + ensureDirectoryExists(e, t) { + const n = Hn(e); + t.directoryExists(n) || this.ensureDirectoryExists(n, t), t.directoryExists(e) || t.createDirectory(e); + } + watchFiles(e, t) { + if (!t.length) { + this.closeWatchers(e); + return; + } + const n = this.projectWatchers.get(e), i = new Set(t); + !n || jg(i, (s) => !n.has(s)) || jg(n, (s) => !i.has(s)) ? (this.projectWatchers.set(e, i), this.sendResponse({ kind: pA, projectName: e, files: t })) : this.sendResponse({ kind: pA, projectName: e, files: void 0 }); + } + createSetTypings(e, t) { + return { + projectName: e.projectName, + typeAcquisition: e.typeAcquisition, + compilerOptions: e.compilerOptions, + typings: t, + unresolvedImports: e.unresolvedImports, + kind: ZO + }; + } + installTypingsAsync(e, t, n, i) { + this.pendingRunRequests.unshift({ requestId: e, packageNames: t, cwd: n, onRequestCompleted: i }), this.executeWithThrottling(); + } + executeWithThrottling() { + for (; this.inFlightRequestCount < this.throttleLimit && this.pendingRunRequests.length; ) { + this.inFlightRequestCount++; + const e = this.pendingRunRequests.pop(); + this.installWorker(e.requestId, e.packageNames, e.cwd, (t) => { + this.inFlightRequestCount--, e.onRequestCompleted(t), this.executeWithThrottling(); + }); + } + } + }; + function Ewe(e) { + return `@types/${e}@ts${UE}`; + } + var l_e = /* @__PURE__ */ ((e) => (e[e.terse = 0] = "terse", e[e.normal = 1] = "normal", e[e.requestTime = 2] = "requestTime", e[e.verbose = 3] = "verbose", e))(l_e || {}), pl = g_e(), u_e = /* @__PURE__ */ ((e) => (e.Err = "Err", e.Info = "Info", e.Perf = "Perf", e))(u_e || {}); + function __e(e, t, n, i) { + return { + projectName: e.getProjectName(), + fileNames: e.getFileNames( + /*excludeFilesFromExternalLibraries*/ + !0, + /*excludeConfigFiles*/ + !0 + ).concat(e.getExcludedFiles()), + compilerOptions: e.getCompilationSettings(), + typeAcquisition: t, + unresolvedImports: n, + projectRootPath: e.getCurrentDirectory(), + cachePath: i, + kind: "discover" + }; + } + var Vh; + ((e) => { + function t() { + throw new Error("No Project."); + } + e.ThrowNoProject = t; + function n() { + throw new Error("The project's language service is disabled."); + } + e.ThrowProjectLanguageServiceDisabled = n; + function i(s, o) { + throw new Error(`Project '${o.getProjectName()}' does not contain document '${s}'`); + } + e.ThrowProjectDoesNotContainDocument = i; + })(Vh || (Vh = {})); + function eo(e) { + return Hs(e); + } + function $6(e, t, n) { + const i = q_(e) ? e : Xi(e, t); + return n(i); + } + function Dwe(e) { + return e; + } + function wwe() { + const e = /* @__PURE__ */ new Map(); + return { + get(t) { + return e.get(t); + }, + set(t, n) { + e.set(t, n); + }, + contains(t) { + return e.has(t); + }, + remove(t) { + e.delete(t); + } + }; + } + function f_e(e) { + return /dev\/null\/inferredProject\d+\*/.test(e); + } + function p_e(e) { + return `/dev/null/inferredProject${e}*`; + } + function d_e(e) { + return `/dev/null/autoImportProviderProject${e}*`; + } + function m_e(e) { + return `/dev/null/auxiliaryProject${e}*`; + } + function g_e() { + return []; + } + var h_e = class u5e { + constructor(t, n) { + this.host = t, this.pendingTimeouts = /* @__PURE__ */ new Map(), this.logger = n.hasLevel( + 3 + /* verbose */ + ) ? n : void 0; + } + /** + * Wait `number` milliseconds and then invoke `cb`. If, while waiting, schedule + * is called again with the same `operationId`, cancel this operation in favor + * of the new one. (Note that the amount of time the canceled operation had been + * waiting does not affect the amount of time that the new operation waits.) + */ + schedule(t, n, i) { + const s = this.pendingTimeouts.get(t); + s && this.host.clearTimeout(s), this.pendingTimeouts.set(t, this.host.setTimeout(u5e.run, n, t, this, i)), this.logger && this.logger.info(`Scheduled: ${t}${s ? ", Cancelled earlier one" : ""}`); + } + cancel(t) { + const n = this.pendingTimeouts.get(t); + return n ? (this.host.clearTimeout(n), this.pendingTimeouts.delete(t)) : !1; + } + static run(t, n, i) { + n.pendingTimeouts.delete(t), n.logger && n.logger.info(`Running: ${t}`), i(); + } + }, y_e = class _5e { + constructor(t, n, i) { + this.host = t, this.delay = n, this.logger = i; + } + scheduleCollect() { + !this.host.gc || this.timerId !== void 0 || (this.timerId = this.host.setTimeout(_5e.run, this.delay, this)); + } + static run(t) { + t.timerId = void 0; + const n = t.logger.hasLevel( + 2 + /* requestTime */ + ), i = n && t.host.getMemoryUsage(); + if (t.host.gc(), n) { + const s = t.host.getMemoryUsage(); + t.logger.perftrc(`GC::before ${i}, after ${s}`); + } + } + }; + function tG(e) { + const t = Vc(e); + return t === "tsconfig.json" || t === "jsconfig.json" ? t : void 0; + } + var v_e = {}; + Ec(v_e, { + ClassificationType: () => eV, + CommandTypes: () => b_e, + CompletionTriggerKind: () => ZU, + IndentStyle: () => Iwe, + JsxEmit: () => Fwe, + ModuleKind: () => Owe, + ModuleResolutionKind: () => Lwe, + NewLineKind: () => Mwe, + OrganizeImportsMode: () => YU, + PollingWatchKind: () => Awe, + ScriptTarget: () => Rwe, + SemicolonPreference: () => KU, + WatchDirectoryKind: () => Nwe, + WatchFileKind: () => Pwe + }); + var b_e = /* @__PURE__ */ ((e) => (e.JsxClosingTag = "jsxClosingTag", e.LinkedEditingRange = "linkedEditingRange", e.Brace = "brace", e.BraceFull = "brace-full", e.BraceCompletion = "braceCompletion", e.GetSpanOfEnclosingComment = "getSpanOfEnclosingComment", e.Change = "change", e.Close = "close", e.Completions = "completions", e.CompletionInfo = "completionInfo", e.CompletionsFull = "completions-full", e.CompletionDetails = "completionEntryDetails", e.CompletionDetailsFull = "completionEntryDetails-full", e.CompileOnSaveAffectedFileList = "compileOnSaveAffectedFileList", e.CompileOnSaveEmitFile = "compileOnSaveEmitFile", e.Configure = "configure", e.Definition = "definition", e.DefinitionFull = "definition-full", e.DefinitionAndBoundSpan = "definitionAndBoundSpan", e.DefinitionAndBoundSpanFull = "definitionAndBoundSpan-full", e.Implementation = "implementation", e.ImplementationFull = "implementation-full", e.EmitOutput = "emit-output", e.Exit = "exit", e.FileReferences = "fileReferences", e.FileReferencesFull = "fileReferences-full", e.Format = "format", e.Formatonkey = "formatonkey", e.FormatFull = "format-full", e.FormatonkeyFull = "formatonkey-full", e.FormatRangeFull = "formatRange-full", e.Geterr = "geterr", e.GeterrForProject = "geterrForProject", e.SemanticDiagnosticsSync = "semanticDiagnosticsSync", e.SyntacticDiagnosticsSync = "syntacticDiagnosticsSync", e.SuggestionDiagnosticsSync = "suggestionDiagnosticsSync", e.NavBar = "navbar", e.NavBarFull = "navbar-full", e.Navto = "navto", e.NavtoFull = "navto-full", e.NavTree = "navtree", e.NavTreeFull = "navtree-full", e.DocumentHighlights = "documentHighlights", e.DocumentHighlightsFull = "documentHighlights-full", e.Open = "open", e.Quickinfo = "quickinfo", e.QuickinfoFull = "quickinfo-full", e.References = "references", e.ReferencesFull = "references-full", e.Reload = "reload", e.Rename = "rename", e.RenameInfoFull = "rename-full", e.RenameLocationsFull = "renameLocations-full", e.Saveto = "saveto", e.SignatureHelp = "signatureHelp", e.SignatureHelpFull = "signatureHelp-full", e.FindSourceDefinition = "findSourceDefinition", e.Status = "status", e.TypeDefinition = "typeDefinition", e.ProjectInfo = "projectInfo", e.ReloadProjects = "reloadProjects", e.Unknown = "unknown", e.OpenExternalProject = "openExternalProject", e.OpenExternalProjects = "openExternalProjects", e.CloseExternalProject = "closeExternalProject", e.SynchronizeProjectList = "synchronizeProjectList", e.ApplyChangedToOpenFiles = "applyChangedToOpenFiles", e.UpdateOpen = "updateOpen", e.EncodedSyntacticClassificationsFull = "encodedSyntacticClassifications-full", e.EncodedSemanticClassificationsFull = "encodedSemanticClassifications-full", e.Cleanup = "cleanup", e.GetOutliningSpans = "getOutliningSpans", e.GetOutliningSpansFull = "outliningSpans", e.TodoComments = "todoComments", e.Indentation = "indentation", e.DocCommentTemplate = "docCommentTemplate", e.CompilerOptionsDiagnosticsFull = "compilerOptionsDiagnostics-full", e.NameOrDottedNameSpan = "nameOrDottedNameSpan", e.BreakpointStatement = "breakpointStatement", e.CompilerOptionsForInferredProjects = "compilerOptionsForInferredProjects", e.GetCodeFixes = "getCodeFixes", e.GetCodeFixesFull = "getCodeFixes-full", e.GetCombinedCodeFix = "getCombinedCodeFix", e.GetCombinedCodeFixFull = "getCombinedCodeFix-full", e.ApplyCodeActionCommand = "applyCodeActionCommand", e.GetSupportedCodeFixes = "getSupportedCodeFixes", e.GetApplicableRefactors = "getApplicableRefactors", e.GetEditsForRefactor = "getEditsForRefactor", e.GetMoveToRefactoringFileSuggestions = "getMoveToRefactoringFileSuggestions", e.PreparePasteEdits = "preparePasteEdits", e.GetPasteEdits = "getPasteEdits", e.GetEditsForRefactorFull = "getEditsForRefactor-full", e.OrganizeImports = "organizeImports", e.OrganizeImportsFull = "organizeImports-full", e.GetEditsForFileRename = "getEditsForFileRename", e.GetEditsForFileRenameFull = "getEditsForFileRename-full", e.ConfigurePlugin = "configurePlugin", e.SelectionRange = "selectionRange", e.SelectionRangeFull = "selectionRange-full", e.ToggleLineComment = "toggleLineComment", e.ToggleLineCommentFull = "toggleLineComment-full", e.ToggleMultilineComment = "toggleMultilineComment", e.ToggleMultilineCommentFull = "toggleMultilineComment-full", e.CommentSelection = "commentSelection", e.CommentSelectionFull = "commentSelection-full", e.UncommentSelection = "uncommentSelection", e.UncommentSelectionFull = "uncommentSelection-full", e.PrepareCallHierarchy = "prepareCallHierarchy", e.ProvideCallHierarchyIncomingCalls = "provideCallHierarchyIncomingCalls", e.ProvideCallHierarchyOutgoingCalls = "provideCallHierarchyOutgoingCalls", e.ProvideInlayHints = "provideInlayHints", e.WatchChange = "watchChange", e.MapCode = "mapCode", e.CopilotRelated = "copilotRelated", e))(b_e || {}), Pwe = /* @__PURE__ */ ((e) => (e.FixedPollingInterval = "FixedPollingInterval", e.PriorityPollingInterval = "PriorityPollingInterval", e.DynamicPriorityPolling = "DynamicPriorityPolling", e.FixedChunkSizePolling = "FixedChunkSizePolling", e.UseFsEvents = "UseFsEvents", e.UseFsEventsOnParentDirectory = "UseFsEventsOnParentDirectory", e))(Pwe || {}), Nwe = /* @__PURE__ */ ((e) => (e.UseFsEvents = "UseFsEvents", e.FixedPollingInterval = "FixedPollingInterval", e.DynamicPriorityPolling = "DynamicPriorityPolling", e.FixedChunkSizePolling = "FixedChunkSizePolling", e))(Nwe || {}), Awe = /* @__PURE__ */ ((e) => (e.FixedInterval = "FixedInterval", e.PriorityInterval = "PriorityInterval", e.DynamicPriority = "DynamicPriority", e.FixedChunkSize = "FixedChunkSize", e))(Awe || {}), Iwe = /* @__PURE__ */ ((e) => (e.None = "None", e.Block = "Block", e.Smart = "Smart", e))(Iwe || {}), Fwe = /* @__PURE__ */ ((e) => (e.None = "none", e.Preserve = "preserve", e.ReactNative = "react-native", e.React = "react", e.ReactJSX = "react-jsx", e.ReactJSXDev = "react-jsxdev", e))(Fwe || {}), Owe = /* @__PURE__ */ ((e) => (e.None = "none", e.CommonJS = "commonjs", e.AMD = "amd", e.UMD = "umd", e.System = "system", e.ES6 = "es6", e.ES2015 = "es2015", e.ES2020 = "es2020", e.ES2022 = "es2022", e.ESNext = "esnext", e.Node16 = "node16", e.NodeNext = "nodenext", e.Preserve = "preserve", e))(Owe || {}), Lwe = /* @__PURE__ */ ((e) => (e.Classic = "classic", e.Node = "node", e.NodeJs = "node", e.Node10 = "node10", e.Node16 = "node16", e.NodeNext = "nodenext", e.Bundler = "bundler", e))(Lwe || {}), Mwe = /* @__PURE__ */ ((e) => (e.Crlf = "Crlf", e.Lf = "Lf", e))(Mwe || {}), Rwe = /* @__PURE__ */ ((e) => (e.ES3 = "es3", e.ES5 = "es5", e.ES6 = "es6", e.ES2015 = "es2015", e.ES2016 = "es2016", e.ES2017 = "es2017", e.ES2018 = "es2018", e.ES2019 = "es2019", e.ES2020 = "es2020", e.ES2021 = "es2021", e.ES2022 = "es2022", e.ES2023 = "es2023", e.ES2024 = "es2024", e.ESNext = "esnext", e.JSON = "json", e.Latest = "esnext", e))(Rwe || {}), S_e = class { + constructor(e, t, n) { + this.host = e, this.info = t, this.isOpen = !1, this.ownFileText = !1, this.pendingReloadFromDisk = !1, this.version = n || 0; + } + getVersion() { + return this.svc ? `SVC-${this.version}-${this.svc.getSnapshotVersion()}` : `Text-${this.version}`; + } + hasScriptVersionCache_TestOnly() { + return this.svc !== void 0; + } + resetSourceMapInfo() { + this.info.sourceFileLike = void 0, this.info.closeSourceMapFileWatcher(), this.info.sourceMapFilePath = void 0, this.info.declarationInfoPath = void 0, this.info.sourceInfos = void 0, this.info.documentPositionMapper = void 0; + } + /** Public for testing */ + useText(e) { + this.svc = void 0, this.text = e, this.textSnapshot = void 0, this.lineMap = void 0, this.fileSize = void 0, this.resetSourceMapInfo(), this.version++; + } + edit(e, t, n) { + this.switchToScriptVersionCache().edit(e, t - e, n), this.ownFileText = !1, this.text = void 0, this.textSnapshot = void 0, this.lineMap = void 0, this.fileSize = void 0, this.resetSourceMapInfo(); + } + /** + * Set the contents as newText + * returns true if text changed + */ + reload(e) { + return E.assert(e !== void 0), this.pendingReloadFromDisk = !1, !this.text && this.svc && (this.text = uk(this.svc.getSnapshot())), this.text !== e ? (this.useText(e), this.ownFileText = !1, !0) : !1; + } + /** + * Reads the contents from tempFile(if supplied) or own file and sets it as contents + * returns true if text changed + */ + reloadWithFileText(e) { + const { text: t, fileSize: n } = e || !this.info.isDynamicOrHasMixedContent() ? this.getFileTextAndSize(e) : { text: "", fileSize: void 0 }, i = this.reload(t); + return this.fileSize = n, this.ownFileText = !e || e === this.info.fileName, this.ownFileText && this.info.mTime === V_.getTime() && (this.info.mTime = (this.host.getModifiedTime(this.info.fileName) || V_).getTime()), i; + } + /** + * Schedule reload from the disk if its not already scheduled and its not own text + * returns true when scheduling reload + */ + scheduleReloadIfNeeded() { + return !this.pendingReloadFromDisk && !this.ownFileText ? this.pendingReloadFromDisk = !0 : !1; + } + delayReloadFromFileIntoText() { + this.pendingReloadFromDisk = !0; + } + /** + * For telemetry purposes, we would like to be able to report the size of the file. + * However, we do not want telemetry to require extra file I/O so we report a size + * that may be stale (e.g. may not reflect change made on disk since the last reload). + * NB: Will read from disk if the file contents have never been loaded because + * telemetry falsely indicating size 0 would be counter-productive. + */ + getTelemetryFileSize() { + return this.fileSize ? this.fileSize : this.text ? this.text.length : this.svc ? this.svc.getSnapshot().getLength() : this.getSnapshot().getLength(); + } + getSnapshot() { + var e; + return ((e = this.tryUseScriptVersionCache()) == null ? void 0 : e.getSnapshot()) || (this.textSnapshot ?? (this.textSnapshot = t9.fromString(E.checkDefined(this.text)))); + } + getAbsolutePositionAndLineText(e) { + const t = this.tryUseScriptVersionCache(); + if (t) return t.getAbsolutePositionAndLineText(e); + const n = this.getLineMap(); + return e <= n.length ? { + absolutePosition: n[e - 1], + lineText: this.text.substring(n[e - 1], n[e]) + } : { + absolutePosition: this.text.length, + lineText: void 0 + }; + } + /** + * @param line 0 based index + */ + lineToTextSpan(e) { + const t = this.tryUseScriptVersionCache(); + if (t) return t.lineToTextSpan(e); + const n = this.getLineMap(), i = n[e], s = e + 1 < n.length ? n[e + 1] : this.text.length; + return bc(i, s); + } + /** + * @param line 1 based index + * @param offset 1 based index + */ + lineOffsetToPosition(e, t, n) { + const i = this.tryUseScriptVersionCache(); + return i ? i.lineOffsetToPosition(e, t) : ZI(this.getLineMap(), e - 1, t - 1, this.text, n); + } + positionToLineOffset(e) { + const t = this.tryUseScriptVersionCache(); + if (t) return t.positionToLineOffset(e); + const { line: n, character: i } = pC(this.getLineMap(), e); + return { line: n + 1, offset: i + 1 }; + } + getFileTextAndSize(e) { + let t; + const n = e || this.info.fileName, i = () => t === void 0 ? t = this.host.readFile(n) || "" : t; + if (!ES(this.info.fileName)) { + const s = this.host.getFileSize ? this.host.getFileSize(n) : i().length; + if (s > iG) + return E.assert(!!this.info.containingProjects.length), this.info.containingProjects[0].projectService.logger.info(`Skipped loading contents of large file ${n} for info ${this.info.fileName}: fileSize: ${s}`), this.info.containingProjects[0].projectService.sendLargeFileReferencedEvent(n, s), { text: "", fileSize: s }; + } + return { text: i() }; + } + /** @internal */ + switchToScriptVersionCache() { + return (!this.svc || this.pendingReloadFromDisk) && (this.svc = CG.fromString(this.getOrLoadText()), this.textSnapshot = void 0, this.version++), this.svc; + } + tryUseScriptVersionCache() { + return (!this.svc || this.pendingReloadFromDisk) && this.getOrLoadText(), this.isOpen ? (!this.svc && !this.textSnapshot && (this.svc = CG.fromString(E.checkDefined(this.text)), this.textSnapshot = void 0), this.svc) : this.svc; + } + getOrLoadText() { + return (this.text === void 0 || this.pendingReloadFromDisk) && (E.assert(!this.svc || this.pendingReloadFromDisk, "ScriptVersionCache should not be set when reloading from disk"), this.reloadWithFileText()), this.text; + } + getLineMap() { + return E.assert(!this.svc, "ScriptVersionCache should not be set"), this.lineMap || (this.lineMap = ex(E.checkDefined(this.text))); + } + getLineInfo() { + const e = this.tryUseScriptVersionCache(); + if (e) + return { + getLineCount: () => e.getLineCount(), + getLineText: (n) => e.getAbsolutePositionAndLineText(n + 1).lineText + }; + const t = this.getLineMap(); + return vW(this.text, t); + } + }; + function Nw(e) { + return e[0] === "^" || (e.includes("walkThroughSnippet:/") || e.includes("untitled:/")) && Vc(e)[0] === "^" || e.includes(":^") && !e.includes(jo); + } + var T_e = class { + constructor(e, t, n, i, s, o) { + this.host = e, this.fileName = t, this.scriptKind = n, this.hasMixedContent = i, this.path = s, this.containingProjects = [], this.isDynamic = Nw(t), this.textStorage = new S_e(e, this, o), (i || this.isDynamic) && (this.realpath = this.path), this.scriptKind = n || B5(t); + } + /** @internal */ + isDynamicOrHasMixedContent() { + return this.hasMixedContent || this.isDynamic; + } + isScriptOpen() { + return this.textStorage.isOpen; + } + open(e) { + this.textStorage.isOpen = !0, e !== void 0 && this.textStorage.reload(e) && this.markContainingProjectsAsDirty(); + } + close(e = !0) { + this.textStorage.isOpen = !1, e && this.textStorage.scheduleReloadIfNeeded() && this.markContainingProjectsAsDirty(); + } + getSnapshot() { + return this.textStorage.getSnapshot(); + } + ensureRealPath() { + if (this.realpath === void 0 && (this.realpath = this.path, this.host.realpath)) { + E.assert(!!this.containingProjects.length); + const e = this.containingProjects[0], t = this.host.realpath(this.path); + t && (this.realpath = e.toPath(t), this.realpath !== this.path && e.projectService.realpathToScriptInfos.add(this.realpath, this)); + } + } + /** @internal */ + getRealpathIfDifferent() { + return this.realpath && this.realpath !== this.path ? this.realpath : void 0; + } + /** + * @internal + * Does not compute realpath; uses precomputed result. Use `ensureRealPath` + * first if a definite result is needed. + */ + isSymlink() { + return this.realpath && this.realpath !== this.path; + } + getFormatCodeSettings() { + return this.formatSettings; + } + getPreferences() { + return this.preferences; + } + attachToProject(e) { + const t = !this.isAttached(e); + return t && (this.containingProjects.push(e), e.getCompilerOptions().preserveSymlinks || this.ensureRealPath(), e.onFileAddedOrRemoved(this.isSymlink())), t; + } + isAttached(e) { + switch (this.containingProjects.length) { + case 0: + return !1; + case 1: + return this.containingProjects[0] === e; + case 2: + return this.containingProjects[0] === e || this.containingProjects[1] === e; + default: + return as(this.containingProjects, e); + } + } + detachFromProject(e) { + switch (this.containingProjects.length) { + case 0: + return; + case 1: + this.containingProjects[0] === e && (e.onFileAddedOrRemoved(this.isSymlink()), this.containingProjects.pop()); + break; + case 2: + this.containingProjects[0] === e ? (e.onFileAddedOrRemoved(this.isSymlink()), this.containingProjects[0] = this.containingProjects.pop()) : this.containingProjects[1] === e && (e.onFileAddedOrRemoved(this.isSymlink()), this.containingProjects.pop()); + break; + default: + $E(this.containingProjects, e) && e.onFileAddedOrRemoved(this.isSymlink()); + break; + } + } + detachAllProjects() { + for (const e of this.containingProjects) { + H0(e) && e.getCachedDirectoryStructureHost().addOrDeleteFile( + this.fileName, + this.path, + 2 + /* Deleted */ + ); + const t = e.getRootFilesMap().get(this.path); + e.removeFile( + this, + /*fileExists*/ + !1, + /*detachFromProject*/ + !1 + ), e.onFileAddedOrRemoved(this.isSymlink()), t && !X6(e) && e.addMissingFileRoot(t.fileName); + } + Ep(this.containingProjects); + } + getDefaultProject() { + switch (this.containingProjects.length) { + case 0: + return Vh.ThrowNoProject(); + case 1: + return g8(this.containingProjects[0]) || m8(this.containingProjects[0]) ? Vh.ThrowNoProject() : this.containingProjects[0]; + default: + let e, t, n, i; + for (let s = 0; s < this.containingProjects.length; s++) { + const o = this.containingProjects[s]; + if (H0(o)) { + if (o.deferredClose) continue; + if (!o.isSourceOfProjectReferenceRedirect(this.fileName)) { + if (i === void 0 && s !== this.containingProjects.length - 1 && (i = o.projectService.findDefaultConfiguredProject(this) || !1), i === o) return o; + n || (n = o); + } + e || (e = o); + } else { + if (d8(o)) + return o; + !t && X6(o) && (t = o); + } + } + return (i || n || e || t) ?? Vh.ThrowNoProject(); + } + } + registerFileUpdate() { + for (const e of this.containingProjects) + e.registerFileUpdate(this.path); + } + setOptions(e, t) { + e && (this.formatSettings ? this.formatSettings = { ...this.formatSettings, ...e } : (this.formatSettings = r9(this.host.newLine), eS(this.formatSettings, e))), t && (this.preferences || (this.preferences = zp), this.preferences = { ...this.preferences, ...t }); + } + getLatestVersion() { + return this.textStorage.getSnapshot(), this.textStorage.getVersion(); + } + saveTo(e) { + this.host.writeFile(e, uk(this.textStorage.getSnapshot())); + } + /** @internal */ + delayReloadNonMixedContentFile() { + E.assert(!this.isDynamicOrHasMixedContent()), this.textStorage.delayReloadFromFileIntoText(), this.markContainingProjectsAsDirty(); + } + reloadFromFile(e) { + return this.textStorage.reloadWithFileText(e) ? (this.markContainingProjectsAsDirty(), !0) : !1; + } + editContent(e, t, n) { + this.textStorage.edit(e, t, n), this.markContainingProjectsAsDirty(); + } + markContainingProjectsAsDirty() { + for (const e of this.containingProjects) + e.markFileAsDirty(this.path); + } + isOrphan() { + return this.deferredDelete || !lr(this.containingProjects, (e) => !e.isOrphan()); + } + /** + * @param line 1 based index + */ + lineToTextSpan(e) { + return this.textStorage.lineToTextSpan(e); + } + // eslint-disable-line @typescript-eslint/unified-signatures + lineOffsetToPosition(e, t, n) { + return this.textStorage.lineOffsetToPosition(e, t, n); + } + positionToLineOffset(e) { + YZe(e); + const t = this.textStorage.positionToLineOffset(e); + return ZZe(t), t; + } + isJavaScript() { + return this.scriptKind === 1 || this.scriptKind === 2; + } + /** @internal */ + closeSourceMapFileWatcher() { + this.sourceMapFilePath && !rs(this.sourceMapFilePath) && (_p(this.sourceMapFilePath), this.sourceMapFilePath = void 0); + } + }; + function YZe(e) { + E.assert(typeof e == "number", `Expected position ${e} to be a number.`), E.assert(e >= 0, "Expected position to be non-negative."); + } + function ZZe(e) { + E.assert(typeof e.line == "number", `Expected line ${e.line} to be a number.`), E.assert(typeof e.offset == "number", `Expected offset ${e.offset} to be a number.`), E.assert(e.line > 0, `Expected line to be non-${e.line === 0 ? "zero" : "negative"}`), E.assert(e.offset > 0, `Expected offset to be non-${e.offset === 0 ? "zero" : "negative"}`); + } + function x_e(e) { + return at( + e.containingProjects, + m8 + ); + } + function k_e(e) { + return at( + e.containingProjects, + g8 + ); + } + var Aw = /* @__PURE__ */ ((e) => (e[e.Inferred = 0] = "Inferred", e[e.Configured = 1] = "Configured", e[e.External = 2] = "External", e[e.AutoImportProvider = 3] = "AutoImportProvider", e[e.Auxiliary = 4] = "Auxiliary", e))(Aw || {}); + function p8(e, t = !1) { + const n = { + js: 0, + jsSize: 0, + jsx: 0, + jsxSize: 0, + ts: 0, + tsSize: 0, + tsx: 0, + tsxSize: 0, + dts: 0, + dtsSize: 0, + deferred: 0, + deferredSize: 0 + }; + for (const i of e) { + const s = t ? i.textStorage.getTelemetryFileSize() : 0; + switch (i.scriptKind) { + case 1: + n.js += 1, n.jsSize += s; + break; + case 2: + n.jsx += 1, n.jsxSize += s; + break; + case 3: + fl(i.fileName) ? (n.dts += 1, n.dtsSize += s) : (n.ts += 1, n.tsSize += s); + break; + case 4: + n.tsx += 1, n.tsxSize += s; + break; + case 7: + n.deferred += 1, n.deferredSize += s; + break; + } + } + return n; + } + function KZe(e) { + const t = p8(e.getScriptInfos()); + return t.js > 0 && t.ts === 0 && t.tsx === 0; + } + function C_e(e) { + const t = p8(e.getRootScriptInfos()); + return t.ts === 0 && t.tsx === 0; + } + function E_e(e) { + const t = p8(e.getScriptInfos()); + return t.ts === 0 && t.tsx === 0; + } + function D_e(e) { + return !e.some((t) => Bo( + t, + ".ts" + /* Ts */ + ) && !fl(t) || Bo( + t, + ".tsx" + /* Tsx */ + )); + } + function w_e(e) { + return e.generatedFilePath !== void 0; + } + function jwe(e, t) { + if (e === t || (e || pl).length === 0 && (t || pl).length === 0) + return !0; + const n = /* @__PURE__ */ new Map(); + let i = 0; + for (const s of e) + n.get(s) !== !0 && (n.set(s, !0), i++); + for (const s of t) { + const o = n.get(s); + if (o === void 0) + return !1; + o === !0 && (n.set(s, !1), i--); + } + return i === 0; + } + function eKe(e, t) { + return e.enable !== t.enable || !jwe(e.include, t.include) || !jwe(e.exclude, t.exclude); + } + function tKe(e, t) { + return Zy(e) !== Zy(t); + } + function rKe(e, t) { + return e === t ? !1 : !Ef(e, t); + } + var kk = class f5e { + /** @internal */ + constructor(t, n, i, s, o, c, _, u, m, g) { + switch (this.projectKind = n, this.projectService = i, this.compilerOptions = c, this.compileOnSaveEnabled = _, this.watchOptions = u, this.rootFilesMap = /* @__PURE__ */ new Map(), this.plugins = [], this.cachedUnresolvedImportsPerFile = /* @__PURE__ */ new Map(), this.hasAddedorRemovedFiles = !1, this.hasAddedOrRemovedSymlinks = !1, this.lastReportedVersion = 0, this.projectProgramVersion = 0, this.projectStateVersion = 0, this.initialLoadPending = !1, this.dirty = !1, this.typingFiles = pl, this.moduleSpecifierCache = Y_e(this), this.createHash = Is(this.projectService.host, this.projectService.host.createHash), this.globalCacheResolutionModuleName = f1.nonRelativeModuleNameForTypingCache, this.updateFromProjectInProgress = !1, i.logger.info(`Creating ${Aw[n]}Project: ${t}, currentDirectory: ${g}`), this.projectName = t, this.directoryStructureHost = m, this.currentDirectory = this.projectService.getNormalizedAbsolutePath(g), this.getCanonicalFileName = this.projectService.toCanonicalFileName, this.jsDocParsingMode = this.projectService.jsDocParsingMode, this.cancellationToken = new nce(this.projectService.cancellationToken, this.projectService.throttleWaitMilliseconds), this.compilerOptions ? (s || Zy(this.compilerOptions) || this.projectService.hasDeferredExtension()) && (this.compilerOptions.allowNonTsExtensions = !0) : (this.compilerOptions = iL(), this.compilerOptions.allowNonTsExtensions = !0, this.compilerOptions.allowJs = !0), i.serverMode) { + case 0: + this.languageServiceEnabled = !0; + break; + case 1: + this.languageServiceEnabled = !0, this.compilerOptions.noResolve = !0, this.compilerOptions.types = []; + break; + case 2: + this.languageServiceEnabled = !1, this.compilerOptions.noResolve = !0, this.compilerOptions.types = []; + break; + default: + E.assertNever(i.serverMode); + } + this.setInternalCompilerOptionsForEmittingJsFiles(); + const h = this.projectService.host; + this.projectService.logger.loggingEnabled() ? this.trace = (S) => this.writeLog(S) : h.trace && (this.trace = (S) => h.trace(S)), this.realpath = Is(h, h.realpath), this.preferNonRecursiveWatch = this.projectService.canUseWatchEvents || h.preferNonRecursiveWatch, this.resolutionCache = gU( + this, + this.currentDirectory, + /*logChangesWhenResolvingModule*/ + !0 + ), this.languageService = ice( + this, + this.projectService.documentRegistry, + this.projectService.serverMode + ), o && this.disableLanguageService(o), this.markAsDirty(), m8(this) || (this.projectService.pendingEnsureProjectForOpenFiles = !0), this.projectService.onProjectCreation(this); + } + /** @internal */ + getResolvedProjectReferenceToRedirect(t) { + } + isNonTsProject() { + return Up(this), E_e(this); + } + isJsOnlyProject() { + return Up(this), KZe(this); + } + static resolveModule(t, n, i, s) { + return f5e.importServicePluginSync({ name: t }, [n], i, s).resolvedModule; + } + /** @internal */ + static importServicePluginSync(t, n, i, s) { + E.assertIsDefined(i.require); + let o, c; + for (const _ of n) { + const u = Vl(i.resolvePath(Ln(_, "node_modules"))); + s(`Loading ${t.name} from ${_} (resolved to ${u})`); + const m = i.require(u, t.name); + if (!m.error) { + c = m.module; + break; + } + const g = m.error.stack || m.error.message || JSON.stringify(m.error); + (o ?? (o = [])).push(`Failed to load module '${t.name}' from ${u}: ${g}`); + } + return { pluginConfigEntry: t, resolvedModule: c, errorLogs: o }; + } + /** @internal */ + static async importServicePluginAsync(t, n, i, s) { + E.assertIsDefined(i.importPlugin); + let o, c; + for (const _ of n) { + const u = Ln(_, "node_modules"); + s(`Dynamically importing ${t.name} from ${_} (resolved to ${u})`); + let m; + try { + m = await i.importPlugin(u, t.name); + } catch (h) { + m = { module: void 0, error: h }; + } + if (!m.error) { + c = m.module; + break; + } + const g = m.error.stack || m.error.message || JSON.stringify(m.error); + (o ?? (o = [])).push(`Failed to dynamically import module '${t.name}' from ${u}: ${g}`); + } + return { pluginConfigEntry: t, resolvedModule: c, errorLogs: o }; + } + isKnownTypesPackageName(t) { + return this.projectService.typingsInstaller.isKnownTypesPackageName(t); + } + installPackage(t) { + return this.projectService.typingsInstaller.installPackage({ ...t, projectName: this.projectName, projectRootPath: this.toPath(this.currentDirectory) }); + } + /** @internal */ + getGlobalTypingsCacheLocation() { + return this.getTypeAcquisition().enable ? this.projectService.typingsInstaller.globalTypingsCacheLocation : void 0; + } + /** @internal */ + getSymlinkCache() { + return this.symlinks || (this.symlinks = mJ(this.getCurrentDirectory(), this.getCanonicalFileName)), this.program && !this.symlinks.hasProcessedResolutions() && this.symlinks.setSymlinksFromResolutions( + this.program.forEachResolvedModule, + this.program.forEachResolvedTypeReferenceDirective, + this.program.getAutomaticTypeDirectiveResolutions() + ), this.symlinks; + } + // Method of LanguageServiceHost + getCompilationSettings() { + return this.compilerOptions; + } + // Method to support public API + getCompilerOptions() { + return this.getCompilationSettings(); + } + getNewLine() { + return this.projectService.host.newLine; + } + getProjectVersion() { + return this.projectStateVersion.toString(); + } + getProjectReferences() { + } + getScriptFileNames() { + if (!this.rootFilesMap.size) + return He; + let t; + return this.rootFilesMap.forEach((n) => { + (this.languageServiceEnabled || n.info && n.info.isScriptOpen()) && (t || (t = [])).push(n.fileName); + }), Nn(t, this.typingFiles) || He; + } + getOrCreateScriptInfoAndAttachToProject(t) { + const n = this.projectService.getOrCreateScriptInfoNotOpenedByClient( + t, + this.currentDirectory, + this.directoryStructureHost, + /*deferredDeleteOk*/ + !1 + ); + if (n) { + const i = this.rootFilesMap.get(n.path); + i && i.info !== n && (i.info = n), n.attachToProject(this); + } + return n; + } + getScriptKind(t) { + const n = this.projectService.getScriptInfoForPath(this.toPath(t)); + return n && n.scriptKind; + } + getScriptVersion(t) { + const n = this.projectService.getOrCreateScriptInfoNotOpenedByClient( + t, + this.currentDirectory, + this.directoryStructureHost, + /*deferredDeleteOk*/ + !1 + ); + return n && n.getLatestVersion(); + } + getScriptSnapshot(t) { + const n = this.getOrCreateScriptInfoAndAttachToProject(t); + if (n) + return n.getSnapshot(); + } + getCancellationToken() { + return this.cancellationToken; + } + getCurrentDirectory() { + return this.currentDirectory; + } + getDefaultLibFileName() { + const t = Hn(Hs(this.projectService.getExecutingFilePath())); + return Ln(t, wP(this.compilerOptions)); + } + useCaseSensitiveFileNames() { + return this.projectService.host.useCaseSensitiveFileNames; + } + readDirectory(t, n, i, s, o) { + return this.directoryStructureHost.readDirectory(t, n, i, s, o); + } + readFile(t) { + return this.projectService.host.readFile(t); + } + writeFile(t, n) { + return this.projectService.host.writeFile(t, n); + } + fileExists(t) { + const n = this.toPath(t); + return !!this.projectService.getScriptInfoForPath(n) || !this.isWatchedMissingFile(n) && this.directoryStructureHost.fileExists(t); + } + /** @internal */ + resolveModuleNameLiterals(t, n, i, s, o, c) { + return this.resolutionCache.resolveModuleNameLiterals(t, n, i, s, o, c); + } + /** @internal */ + getModuleResolutionCache() { + return this.resolutionCache.getModuleResolutionCache(); + } + /** @internal */ + resolveTypeReferenceDirectiveReferences(t, n, i, s, o, c) { + return this.resolutionCache.resolveTypeReferenceDirectiveReferences( + t, + n, + i, + s, + o, + c + ); + } + /** @internal */ + resolveLibrary(t, n, i, s) { + return this.resolutionCache.resolveLibrary(t, n, i, s); + } + directoryExists(t) { + return this.directoryStructureHost.directoryExists(t); + } + getDirectories(t) { + return this.directoryStructureHost.getDirectories(t); + } + /** @internal */ + getCachedDirectoryStructureHost() { + } + /** @internal */ + toPath(t) { + return oo(t, this.currentDirectory, this.projectService.toCanonicalFileName); + } + /** @internal */ + watchDirectoryOfFailedLookupLocation(t, n, i) { + return this.projectService.watchFactory.watchDirectory( + t, + n, + i, + this.projectService.getWatchOptions(this), + Dl.FailedLookupLocations, + this + ); + } + /** @internal */ + watchAffectingFileLocation(t, n) { + return this.projectService.watchFactory.watchFile( + t, + n, + 2e3, + this.projectService.getWatchOptions(this), + Dl.AffectingFileLocation, + this + ); + } + /** @internal */ + clearInvalidateResolutionOfFailedLookupTimer() { + return this.projectService.throttledOperations.cancel(`${this.getProjectName()}FailedLookupInvalidation`); + } + /** @internal */ + scheduleInvalidateResolutionsOfFailedLookupLocations() { + this.projectService.throttledOperations.schedule( + `${this.getProjectName()}FailedLookupInvalidation`, + /*delay*/ + 1e3, + () => { + this.resolutionCache.invalidateResolutionsOfFailedLookupLocations() && this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this); + } + ); + } + /** @internal */ + invalidateResolutionsOfFailedLookupLocations() { + this.clearInvalidateResolutionOfFailedLookupTimer() && this.resolutionCache.invalidateResolutionsOfFailedLookupLocations() && (this.markAsDirty(), this.projectService.delayEnsureProjectForOpenFiles()); + } + /** @internal */ + onInvalidatedResolution() { + this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this); + } + /** @internal */ + watchTypeRootsDirectory(t, n, i) { + return this.projectService.watchFactory.watchDirectory( + t, + n, + i, + this.projectService.getWatchOptions(this), + Dl.TypeRoots, + this + ); + } + /** @internal */ + hasChangedAutomaticTypeDirectiveNames() { + return this.resolutionCache.hasChangedAutomaticTypeDirectiveNames(); + } + /** @internal */ + onChangedAutomaticTypeDirectiveNames() { + this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this); + } + /** @internal */ + fileIsOpen(t) { + return this.projectService.openFiles.has(t); + } + /** @internal */ + writeLog(t) { + this.projectService.logger.info(t); + } + log(t) { + this.writeLog(t); + } + error(t) { + this.projectService.logger.msg( + t, + "Err" + /* Err */ + ); + } + setInternalCompilerOptionsForEmittingJsFiles() { + (this.projectKind === 0 || this.projectKind === 2) && (this.compilerOptions.noEmitForJsFiles = !0); + } + /** + * Get the errors that dont have any file name associated + */ + getGlobalProjectErrors() { + return kn(this.projectErrors, (t) => !t.file) || pl; + } + /** + * Get all the project errors + */ + getAllProjectErrors() { + return this.projectErrors || pl; + } + setProjectErrors(t) { + this.projectErrors = t; + } + getLanguageService(t = !0) { + return t && Up(this), this.languageService; + } + /** @internal */ + getSourceMapper() { + return this.getLanguageService().getSourceMapper(); + } + /** @internal */ + clearSourceMapperCache() { + this.languageService.clearSourceMapperCache(); + } + /** @internal */ + getDocumentPositionMapper(t, n) { + return this.projectService.getDocumentPositionMapper(this, t, n); + } + /** @internal */ + getSourceFileLike(t) { + return this.projectService.getSourceFileLike(t, this); + } + /** @internal */ + shouldEmitFile(t) { + return t && !t.isDynamicOrHasMixedContent() && !this.program.isSourceOfProjectReferenceRedirect(t.path); + } + getCompileOnSaveAffectedFileList(t) { + return this.languageServiceEnabled ? (Up(this), this.builderState = Id.create( + this.program, + this.builderState, + /*disableUseFileVersionAsSignature*/ + !0 + ), Li( + Id.getFilesAffectedBy( + this.builderState, + this.program, + t.path, + this.cancellationToken, + this.projectService.host + ), + (n) => this.shouldEmitFile(this.projectService.getScriptInfoForPath(n.path)) ? n.fileName : void 0 + )) : []; + } + /** + * Returns true if emit was conducted + */ + emitFile(t, n) { + if (!this.languageServiceEnabled || !this.shouldEmitFile(t)) + return { emitSkipped: !0, diagnostics: pl }; + const { emitSkipped: i, diagnostics: s, outputFiles: o } = this.getLanguageService().getEmitOutput(t.fileName); + if (!i) { + for (const c of o) { + const _ = Xi(c.name, this.currentDirectory); + n(_, c.text, c.writeByteOrderMark); + } + if (this.builderState && N_(this.compilerOptions)) { + const c = o.filter((_) => fl(_.name)); + if (c.length === 1) { + const _ = this.program.getSourceFile(t.fileName), u = this.projectService.host.createHash ? this.projectService.host.createHash(c[0].text) : n4(c[0].text); + Id.updateSignatureOfFile(this.builderState, u, _.resolvedPath); + } + } + } + return { emitSkipped: i, diagnostics: s }; + } + enableLanguageService() { + this.languageServiceEnabled || this.projectService.serverMode === 2 || (this.languageServiceEnabled = !0, this.lastFileExceededProgramSize = void 0, this.projectService.onUpdateLanguageServiceStateForProject( + this, + /*languageServiceEnabled*/ + !0 + )); + } + /** @internal */ + cleanupProgram() { + if (this.program) { + for (const t of this.program.getSourceFiles()) + this.detachScriptInfoIfNotRoot(t.fileName); + this.program.forEachResolvedProjectReference((t) => this.detachScriptInfoFromProject(t.sourceFile.fileName)), this.program = void 0; + } + } + disableLanguageService(t) { + this.languageServiceEnabled && (E.assert( + this.projectService.serverMode !== 2 + /* Syntactic */ + ), this.languageService.cleanupSemanticCache(), this.languageServiceEnabled = !1, this.cleanupProgram(), this.lastFileExceededProgramSize = t, this.builderState = void 0, this.autoImportProviderHost && this.autoImportProviderHost.close(), this.autoImportProviderHost = void 0, this.resolutionCache.closeTypeRootsWatch(), this.clearGeneratedFileWatch(), this.projectService.verifyDocumentRegistry(), this.projectService.onUpdateLanguageServiceStateForProject( + this, + /*languageServiceEnabled*/ + !1 + )); + } + getProjectName() { + return this.projectName; + } + removeLocalTypingsFromTypeAcquisition(t) { + return !t.enable || !t.include ? t : { ...t, include: this.removeExistingTypings(t.include) }; + } + getExternalFiles(t) { + return W_(na(this.plugins, (n) => { + if (typeof n.module.getExternalFiles == "function") + try { + return n.module.getExternalFiles( + this, + t || 0 + /* Update */ + ); + } catch (i) { + this.projectService.logger.info(`A plugin threw an exception in getExternalFiles: ${i}`), i.stack && this.projectService.logger.info(i.stack); + } + })); + } + getSourceFile(t) { + if (this.program) + return this.program.getSourceFileByPath(t); + } + /** @internal */ + getSourceFileOrConfigFile(t) { + const n = this.program.getCompilerOptions(); + return t === n.configFilePath ? n.configFile : this.getSourceFile(t); + } + close() { + var t; + this.typingsCache && this.projectService.typingsInstaller.onProjectClosed(this), this.typingsCache = void 0, this.closeWatchingTypingLocations(), this.cleanupProgram(), lr(this.externalFiles, (n) => this.detachScriptInfoIfNotRoot(n)), this.rootFilesMap.forEach((n) => { + var i; + return (i = n.info) == null ? void 0 : i.detachFromProject(this); + }), this.projectService.pendingEnsureProjectForOpenFiles = !0, this.rootFilesMap = void 0, this.externalFiles = void 0, this.program = void 0, this.builderState = void 0, this.resolutionCache.clear(), this.resolutionCache = void 0, this.cachedUnresolvedImportsPerFile = void 0, (t = this.packageJsonWatches) == null || t.forEach((n) => { + n.projects.delete(this), n.close(); + }), this.packageJsonWatches = void 0, this.moduleSpecifierCache.clear(), this.moduleSpecifierCache = void 0, this.directoryStructureHost = void 0, this.exportMapCache = void 0, this.projectErrors = void 0, this.plugins.length = 0, this.missingFilesMap && (P_(this.missingFilesMap, nd), this.missingFilesMap = void 0), this.clearGeneratedFileWatch(), this.clearInvalidateResolutionOfFailedLookupTimer(), this.autoImportProviderHost && this.autoImportProviderHost.close(), this.autoImportProviderHost = void 0, this.noDtsResolutionProject && this.noDtsResolutionProject.close(), this.noDtsResolutionProject = void 0, this.languageService.dispose(), this.languageService = void 0; + } + detachScriptInfoIfNotRoot(t) { + const n = this.projectService.getScriptInfo(t); + n && !this.isRoot(n) && n.detachFromProject(this); + } + isClosed() { + return this.rootFilesMap === void 0; + } + hasRoots() { + var t; + return !!((t = this.rootFilesMap) != null && t.size); + } + /** @internal */ + isOrphan() { + return !1; + } + getRootFiles() { + return this.rootFilesMap && Ki(Ty(this.rootFilesMap.values(), (t) => { + var n; + return (n = t.info) == null ? void 0 : n.fileName; + })); + } + /** @internal */ + getRootFilesMap() { + return this.rootFilesMap; + } + getRootScriptInfos() { + return Ki(Ty(this.rootFilesMap.values(), (t) => t.info)); + } + getScriptInfos() { + return this.languageServiceEnabled ? gr(this.program.getSourceFiles(), (t) => { + const n = this.projectService.getScriptInfoForPath(t.resolvedPath); + return E.assert(!!n, "getScriptInfo", () => `scriptInfo for a file '${t.fileName}' Path: '${t.path}' / '${t.resolvedPath}' is missing.`), n; + }) : this.getRootScriptInfos(); + } + getExcludedFiles() { + return pl; + } + getFileNames(t, n) { + if (!this.program) + return []; + if (!this.languageServiceEnabled) { + let s = this.getRootFiles(); + if (this.compilerOptions) { + const o = sce(this.compilerOptions); + o && (s || (s = [])).push(o); + } + return s; + } + const i = []; + for (const s of this.program.getSourceFiles()) + t && this.program.isSourceFileFromExternalLibrary(s) || i.push(s.fileName); + if (!n) { + const s = this.program.getCompilerOptions().configFile; + if (s && (i.push(s.fileName), s.extendedSourceFiles)) + for (const o of s.extendedSourceFiles) + i.push(o); + } + return i; + } + /** @internal */ + getFileNamesWithRedirectInfo(t) { + return this.getFileNames().map((n) => ({ + fileName: n, + isSourceOfProjectReferenceRedirect: t && this.isSourceOfProjectReferenceRedirect(n) + })); + } + hasConfigFile(t) { + if (this.program && this.languageServiceEnabled) { + const n = this.program.getCompilerOptions().configFile; + if (n) { + if (t === n.fileName) + return !0; + if (n.extendedSourceFiles) { + for (const i of n.extendedSourceFiles) + if (t === i) + return !0; + } + } + } + return !1; + } + containsScriptInfo(t) { + if (this.isRoot(t)) return !0; + if (!this.program) return !1; + const n = this.program.getSourceFileByPath(t.path); + return !!n && n.resolvedPath === t.path; + } + containsFile(t, n) { + const i = this.projectService.getScriptInfoForNormalizedPath(t); + return i && (i.isScriptOpen() || !n) ? this.containsScriptInfo(i) : !1; + } + isRoot(t) { + var n, i; + return ((i = (n = this.rootFilesMap) == null ? void 0 : n.get(t.path)) == null ? void 0 : i.info) === t; + } + // add a root file to project + addRoot(t, n) { + E.assert(!this.isRoot(t)), this.rootFilesMap.set(t.path, { fileName: n || t.fileName, info: t }), t.attachToProject(this), this.markAsDirty(); + } + // add a root file that doesnt exist on host + addMissingFileRoot(t) { + const n = this.projectService.toPath(t); + this.rootFilesMap.set(n, { fileName: t }), this.markAsDirty(); + } + removeFile(t, n, i) { + this.isRoot(t) && this.removeRoot(t), n ? this.resolutionCache.removeResolutionsOfFile(t.path) : this.resolutionCache.invalidateResolutionOfFile(t.path), this.cachedUnresolvedImportsPerFile.delete(t.path), i && t.detachFromProject(this), this.markAsDirty(); + } + registerFileUpdate(t) { + (this.updatedFileNames || (this.updatedFileNames = /* @__PURE__ */ new Set())).add(t); + } + /** @internal */ + markFileAsDirty(t) { + this.markAsDirty(), this.exportMapCache && !this.exportMapCache.isEmpty() && (this.changedFilesForExportMapCache || (this.changedFilesForExportMapCache = /* @__PURE__ */ new Set())).add(t); + } + /** @internal */ + markAsDirty() { + this.dirty || (this.projectStateVersion++, this.dirty = !0); + } + /** @internal */ + markAutoImportProviderAsDirty() { + var t; + this.autoImportProviderHost || (this.autoImportProviderHost = void 0), (t = this.autoImportProviderHost) == null || t.markAsDirty(); + } + /** @internal */ + onAutoImportProviderSettingsChanged() { + this.markAutoImportProviderAsDirty(); + } + /** @internal */ + onPackageJsonChange() { + this.moduleSpecifierCache.clear(), this.markAutoImportProviderAsDirty(); + } + /** @internal */ + onFileAddedOrRemoved(t) { + this.hasAddedorRemovedFiles = !0, t && (this.hasAddedOrRemovedSymlinks = !0); + } + /** @internal */ + onDiscoveredSymlink() { + this.hasAddedOrRemovedSymlinks = !0; + } + /** @internal */ + onReleaseOldSourceFile(t, n, i, s) { + (!s || t.resolvedPath === t.path && s.resolvedPath !== t.path) && this.detachScriptInfoFromProject(t.fileName, i); + } + /** @internal */ + updateFromProject() { + Up(this); + } + /** + * Updates set of files that contribute to this project + * @returns: true if set of files in the project stays the same and false - otherwise. + */ + updateGraph() { + var t, n; + (t = nn) == null || t.push(nn.Phase.Session, "updateGraph", { name: this.projectName, kind: Aw[this.projectKind] }), this.resolutionCache.startRecordingFilesWithChangedResolutions(); + const i = this.updateGraphWorker(), s = this.hasAddedorRemovedFiles; + this.hasAddedorRemovedFiles = !1, this.hasAddedOrRemovedSymlinks = !1; + const o = this.resolutionCache.finishRecordingFilesWithChangedResolutions() || pl; + for (const _ of o) + this.cachedUnresolvedImportsPerFile.delete(_); + this.languageServiceEnabled && this.projectService.serverMode === 0 && !this.isOrphan() ? ((i || o.length) && (this.lastCachedUnresolvedImportsList = nKe(this.program, this.cachedUnresolvedImportsPerFile)), this.enqueueInstallTypingsForProject(s)) : this.lastCachedUnresolvedImportsList = void 0; + const c = this.projectProgramVersion === 0 && i; + return i && this.projectProgramVersion++, s && this.markAutoImportProviderAsDirty(), c && this.getPackageJsonAutoImportProvider(), (n = nn) == null || n.pop(), !i; + } + /** @internal */ + enqueueInstallTypingsForProject(t) { + const n = this.getTypeAcquisition(); + if (!n || !n.enable || this.projectService.typingsInstaller === LL) + return; + const i = this.typingsCache; + (t || !i || eKe(n, i.typeAcquisition) || tKe(this.getCompilationSettings(), i.compilerOptions) || rKe(this.lastCachedUnresolvedImportsList, i.unresolvedImports)) && (this.typingsCache = { + compilerOptions: this.getCompilationSettings(), + typeAcquisition: n, + unresolvedImports: this.lastCachedUnresolvedImportsList + }, this.projectService.typingsInstaller.enqueueInstallTypingsRequest(this, n, this.lastCachedUnresolvedImportsList)); + } + /** @internal */ + updateTypingFiles(t, n, i, s) { + this.typingsCache = { + compilerOptions: t, + typeAcquisition: n, + unresolvedImports: i + }; + const o = !n || !n.enable ? pl : W_(s); + BI( + o, + this.typingFiles, + cC(!this.useCaseSensitiveFileNames()), + /*inserted*/ + Ja, + (c) => this.detachScriptInfoFromProject(c) + ) && (this.typingFiles = o, this.resolutionCache.setFilesWithInvalidatedNonRelativeUnresolvedImports(this.cachedUnresolvedImportsPerFile), this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)); + } + closeWatchingTypingLocations() { + this.typingWatchers && P_(this.typingWatchers, nd), this.typingWatchers = void 0; + } + onTypingInstallerWatchInvoke() { + this.typingWatchers.isInvoked = !0, this.projectService.updateTypingsForProject({ projectName: this.getProjectName(), kind: KO }); + } + /** @internal */ + watchTypingLocations(t) { + if (!t) { + this.typingWatchers.isInvoked = !1; + return; + } + if (!t.length) { + this.closeWatchingTypingLocations(); + return; + } + const n = new Map(this.typingWatchers); + this.typingWatchers || (this.typingWatchers = /* @__PURE__ */ new Map()), this.typingWatchers.isInvoked = !1; + const i = (s, o) => { + const c = this.toPath(s); + if (n.delete(c), !this.typingWatchers.has(c)) { + const _ = o === "FileWatcher" ? Dl.TypingInstallerLocationFile : Dl.TypingInstallerLocationDirectory; + this.typingWatchers.set( + c, + oA(c) ? o === "FileWatcher" ? this.projectService.watchFactory.watchFile( + s, + () => this.typingWatchers.isInvoked ? this.writeLog("TypingWatchers already invoked") : this.onTypingInstallerWatchInvoke(), + 2e3, + this.projectService.getWatchOptions(this), + _, + this + ) : this.projectService.watchFactory.watchDirectory( + s, + (u) => { + if (this.typingWatchers.isInvoked) return this.writeLog("TypingWatchers already invoked"); + if (!Bo( + u, + ".json" + /* Json */ + )) return this.writeLog("Ignoring files that are not *.json"); + if (xh(u, Ln(this.projectService.typingsInstaller.globalTypingsCacheLocation, "package.json"), !this.useCaseSensitiveFileNames())) return this.writeLog("Ignoring package.json change at global typings location"); + this.onTypingInstallerWatchInvoke(); + }, + 1, + this.projectService.getWatchOptions(this), + _, + this + ) : (this.writeLog(`Skipping watcher creation at ${s}:: ${vG(_, this)}`), w6) + ); + } + }; + for (const s of t) { + const o = Vc(s); + if (o === "package.json" || o === "bower.json") { + i( + s, + "FileWatcher" + /* FileWatcher */ + ); + continue; + } + if (Zf(this.currentDirectory, s, this.currentDirectory, !this.useCaseSensitiveFileNames())) { + const c = s.indexOf(jo, this.currentDirectory.length + 1); + i( + c !== -1 ? s.substr(0, c) : s, + "DirectoryWatcher" + /* DirectoryWatcher */ + ); + continue; + } + if (Zf(this.projectService.typingsInstaller.globalTypingsCacheLocation, s, this.currentDirectory, !this.useCaseSensitiveFileNames())) { + i( + this.projectService.typingsInstaller.globalTypingsCacheLocation, + "DirectoryWatcher" + /* DirectoryWatcher */ + ); + continue; + } + i( + s, + "DirectoryWatcher" + /* DirectoryWatcher */ + ); + } + n.forEach((s, o) => { + s.close(), this.typingWatchers.delete(o); + }); + } + /** @internal */ + getCurrentProgram() { + return this.program; + } + removeExistingTypings(t) { + if (!t.length) return t; + const n = ZF(this.getCompilerOptions(), this); + return kn(t, (i) => !n.includes(i)); + } + updateGraphWorker() { + var t, n; + const i = this.languageService.getCurrentProgram(); + E.assert(i === this.program), E.assert(!this.isClosed(), "Called update graph worker of closed project"), this.writeLog(`Starting updateGraphWorker: Project: ${this.getProjectName()}`); + const s = ao(), { hasInvalidatedResolutions: o, hasInvalidatedLibResolutions: c } = this.resolutionCache.createHasInvalidatedResolutions(Th, Th); + this.hasInvalidatedResolutions = o, this.hasInvalidatedLibResolutions = c, this.resolutionCache.startCachingPerDirectoryResolution(), this.dirty = !1, this.updateFromProjectInProgress = !0, this.program = this.languageService.getProgram(), this.updateFromProjectInProgress = !1, (t = nn) == null || t.push(nn.Phase.Session, "finishCachingPerDirectoryResolution"), this.resolutionCache.finishCachingPerDirectoryResolution(this.program, i), (n = nn) == null || n.pop(), E.assert(i === void 0 || this.program !== void 0); + let _ = !1; + if (this.program && (!i || this.program !== i && this.program.structureIsReused !== 2)) { + if (_ = !0, this.rootFilesMap.forEach((g, h) => { + var S; + const T = this.program.getSourceFileByPath(h), C = g.info; + !T || ((S = g.info) == null ? void 0 : S.path) === T.resolvedPath || (g.info = this.projectService.getScriptInfo(T.fileName), E.assert(g.info.isAttached(this)), C?.detachFromProject(this)); + }), UW( + this.program, + this.missingFilesMap || (this.missingFilesMap = /* @__PURE__ */ new Map()), + // Watch the missing files + (g, h) => this.addMissingFileWatcher(g, h) + ), this.generatedFilesMap) { + const g = this.compilerOptions.outFile; + w_e(this.generatedFilesMap) ? (!g || !this.isValidGeneratedFileWatcher( + $u(g) + ".d.ts", + this.generatedFilesMap + )) && this.clearGeneratedFileWatch() : g ? this.clearGeneratedFileWatch() : this.generatedFilesMap.forEach((h, S) => { + const T = this.program.getSourceFileByPath(S); + (!T || T.resolvedPath !== S || !this.isValidGeneratedFileWatcher( + c5(T.fileName, this.compilerOptions, this.program), + h + )) && (_p(h), this.generatedFilesMap.delete(S)); + }); + } + this.languageServiceEnabled && this.projectService.serverMode === 0 && this.resolutionCache.updateTypeRootsWatch(); + } + this.projectService.verifyProgram(this), this.exportMapCache && !this.exportMapCache.isEmpty() && (this.exportMapCache.releaseSymbols(), this.hasAddedorRemovedFiles || i && !this.program.structureIsReused ? this.exportMapCache.clear() : this.changedFilesForExportMapCache && i && this.program && jg(this.changedFilesForExportMapCache, (g) => { + const h = i.getSourceFileByPath(g), S = this.program.getSourceFileByPath(g); + return !h || !S ? (this.exportMapCache.clear(), !0) : this.exportMapCache.onFileChanged(h, S, !!this.getTypeAcquisition().enable); + })), this.changedFilesForExportMapCache && this.changedFilesForExportMapCache.clear(), (this.hasAddedOrRemovedSymlinks || this.program && !this.program.structureIsReused && this.getCompilerOptions().preserveSymlinks) && (this.symlinks = void 0, this.moduleSpecifierCache.clear()); + const u = this.externalFiles || pl; + this.externalFiles = this.getExternalFiles(), BI( + this.externalFiles, + u, + cC(!this.useCaseSensitiveFileNames()), + // Ensure a ScriptInfo is created for new external files. This is performed indirectly + // by the host for files in the program when the program is retrieved above but + // the program doesn't contain external files so this must be done explicitly. + (g) => { + const h = this.projectService.getOrCreateScriptInfoNotOpenedByClient( + g, + this.currentDirectory, + this.directoryStructureHost, + /*deferredDeleteOk*/ + !1 + ); + h?.attachToProject(this); + }, + (g) => this.detachScriptInfoFromProject(g) + ); + const m = ao() - s; + return this.sendPerformanceEvent("UpdateGraph", m), this.writeLog(`Finishing updateGraphWorker: Project: ${this.getProjectName()} projectStateVersion: ${this.projectStateVersion} projectProgramVersion: ${this.projectProgramVersion} structureChanged: ${_}${this.program ? ` structureIsReused:: ${HR[this.program.structureIsReused]}` : ""} Elapsed: ${m}ms`), this.projectService.logger.isTestLogger ? this.program !== i ? this.print( + /*writeProjectFileNames*/ + !0, + this.hasAddedorRemovedFiles, + /*writeFileVersionAndText*/ + !0 + ) : this.writeLog("Same program as before") : this.hasAddedorRemovedFiles ? this.print( + /*writeProjectFileNames*/ + !0, + /*writeFileExplaination*/ + !0, + /*writeFileVersionAndText*/ + !1 + ) : this.program !== i && this.writeLog("Different program with same set of files"), this.projectService.verifyDocumentRegistry(), _; + } + /** @internal */ + sendPerformanceEvent(t, n) { + this.projectService.sendPerformanceEvent(t, n); + } + detachScriptInfoFromProject(t, n) { + const i = this.projectService.getScriptInfo(t); + i && (i.detachFromProject(this), n || this.resolutionCache.removeResolutionsOfFile(i.path)); + } + addMissingFileWatcher(t, n) { + var i; + if (H0(this)) { + const o = this.projectService.configFileExistenceInfoCache.get(t); + if ((i = o?.config) != null && i.projects.has(this.canonicalConfigFilePath)) return w6; + } + const s = this.projectService.watchFactory.watchFile( + Xi(n, this.currentDirectory), + (o, c) => { + H0(this) && this.getCachedDirectoryStructureHost().addOrDeleteFile(o, t, c), c === 0 && this.missingFilesMap.has(t) && (this.missingFilesMap.delete(t), s.close(), this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)); + }, + 500, + this.projectService.getWatchOptions(this), + Dl.MissingFile, + this + ); + return s; + } + isWatchedMissingFile(t) { + return !!this.missingFilesMap && this.missingFilesMap.has(t); + } + /** @internal */ + addGeneratedFileWatch(t, n) { + if (this.compilerOptions.outFile) + this.generatedFilesMap || (this.generatedFilesMap = this.createGeneratedFileWatcher(t)); + else { + const i = this.toPath(n); + if (this.generatedFilesMap) { + if (w_e(this.generatedFilesMap)) { + E.fail(`${this.projectName} Expected to not have --out watcher for generated file with options: ${JSON.stringify(this.compilerOptions)}`); + return; + } + if (this.generatedFilesMap.has(i)) return; + } else + this.generatedFilesMap = /* @__PURE__ */ new Map(); + this.generatedFilesMap.set(i, this.createGeneratedFileWatcher(t)); + } + } + createGeneratedFileWatcher(t) { + return { + generatedFilePath: this.toPath(t), + watcher: this.projectService.watchFactory.watchFile( + t, + () => { + this.clearSourceMapperCache(), this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this); + }, + 2e3, + this.projectService.getWatchOptions(this), + Dl.MissingGeneratedFile, + this + ) + }; + } + isValidGeneratedFileWatcher(t, n) { + return this.toPath(t) === n.generatedFilePath; + } + clearGeneratedFileWatch() { + this.generatedFilesMap && (w_e(this.generatedFilesMap) ? _p(this.generatedFilesMap) : P_(this.generatedFilesMap, _p), this.generatedFilesMap = void 0); + } + getScriptInfoForNormalizedPath(t) { + const n = this.projectService.getScriptInfoForPath(this.toPath(t)); + return n && !n.isAttached(this) ? Vh.ThrowProjectDoesNotContainDocument(t, this) : n; + } + getScriptInfo(t) { + return this.projectService.getScriptInfo(t); + } + filesToString(t) { + return this.filesToStringWorker( + t, + /*writeFileExplaination*/ + !0, + /*writeFileVersionAndText*/ + !1 + ); + } + filesToStringWorker(t, n, i) { + if (this.initialLoadPending) return ` Files (0) InitialLoadPending +`; + if (!this.program) return ` Files (0) NoProgram +`; + const s = this.program.getSourceFiles(); + let o = ` Files (${s.length}) +`; + if (t) { + for (const c of s) + o += ` ${c.fileName}${i ? ` ${c.version} ${JSON.stringify(c.text)}` : ""} +`; + n && (o += ` + +`, SU(this.program, (c) => o += ` ${c} +`)); + } + return o; + } + /** @internal */ + print(t, n, i) { + var s; + this.writeLog(`Project '${this.projectName}' (${Aw[this.projectKind]})`), this.writeLog(this.filesToStringWorker( + t && this.projectService.logger.hasLevel( + 3 + /* verbose */ + ), + n && this.projectService.logger.hasLevel( + 3 + /* verbose */ + ), + i && this.projectService.logger.hasLevel( + 3 + /* verbose */ + ) + )), this.writeLog("-----------------------------------------------"), this.autoImportProviderHost && this.autoImportProviderHost.print( + /*writeProjectFileNames*/ + !1, + /*writeFileExplaination*/ + !1, + /*writeFileVersionAndText*/ + !1 + ), (s = this.noDtsResolutionProject) == null || s.print( + /*writeProjectFileNames*/ + !1, + /*writeFileExplaination*/ + !1, + /*writeFileVersionAndText*/ + !1 + ); + } + setCompilerOptions(t) { + var n; + if (t) { + t.allowNonTsExtensions = !0; + const i = this.compilerOptions; + this.compilerOptions = t, this.setInternalCompilerOptionsForEmittingJsFiles(), (n = this.noDtsResolutionProject) == null || n.setCompilerOptions(this.getCompilerOptionsForNoDtsResolutionProject()), S7(i, t) && (this.cachedUnresolvedImportsPerFile.clear(), this.lastCachedUnresolvedImportsList = void 0, this.resolutionCache.onChangesAffectModuleResolution(), this.moduleSpecifierCache.clear()), this.markAsDirty(); + } + } + /** @internal */ + setWatchOptions(t) { + this.watchOptions = t; + } + /** @internal */ + getWatchOptions() { + return this.watchOptions; + } + setTypeAcquisition(t) { + t && (this.typeAcquisition = this.removeLocalTypingsFromTypeAcquisition(t)); + } + getTypeAcquisition() { + return this.typeAcquisition || {}; + } + /** @internal */ + getChangesSinceVersion(t, n) { + var i, s; + const o = n ? (u) => Ki(u.entries(), ([m, g]) => ({ + fileName: m, + isSourceOfProjectReferenceRedirect: g + })) : (u) => Ki(u.keys()); + this.initialLoadPending || Up(this); + const c = { + projectName: this.getProjectName(), + version: this.projectProgramVersion, + isInferred: X6(this), + options: this.getCompilationSettings(), + languageServiceDisabled: !this.languageServiceEnabled, + lastFileExceededProgramSize: this.lastFileExceededProgramSize + }, _ = this.updatedFileNames; + if (this.updatedFileNames = void 0, this.lastReportedFileNames && t === this.lastReportedVersion) { + if (this.projectProgramVersion === this.lastReportedVersion && !_) + return { info: c, projectErrors: this.getGlobalProjectErrors() }; + const u = this.lastReportedFileNames, m = ((i = this.externalFiles) == null ? void 0 : i.map((D) => ({ + fileName: eo(D), + isSourceOfProjectReferenceRedirect: !1 + }))) || pl, g = aC( + this.getFileNamesWithRedirectInfo(!!n).concat(m), + (D) => D.fileName, + (D) => D.isSourceOfProjectReferenceRedirect + ), h = /* @__PURE__ */ new Map(), S = /* @__PURE__ */ new Map(), T = _ ? Ki(_.keys()) : [], C = []; + return al(g, (D, w) => { + u.has(w) ? n && D !== u.get(w) && C.push({ + fileName: w, + isSourceOfProjectReferenceRedirect: D + }) : h.set(w, D); + }), al(u, (D, w) => { + g.has(w) || S.set(w, D); + }), this.lastReportedFileNames = g, this.lastReportedVersion = this.projectProgramVersion, { + info: c, + changes: { + added: o(h), + removed: o(S), + updated: n ? T.map((D) => ({ + fileName: D, + isSourceOfProjectReferenceRedirect: this.isSourceOfProjectReferenceRedirect(D) + })) : T, + updatedRedirects: n ? C : void 0 + }, + projectErrors: this.getGlobalProjectErrors() + }; + } else { + const u = this.getFileNamesWithRedirectInfo(!!n), m = ((s = this.externalFiles) == null ? void 0 : s.map((h) => ({ + fileName: eo(h), + isSourceOfProjectReferenceRedirect: !1 + }))) || pl, g = u.concat(m); + return this.lastReportedFileNames = aC( + g, + (h) => h.fileName, + (h) => h.isSourceOfProjectReferenceRedirect + ), this.lastReportedVersion = this.projectProgramVersion, { + info: c, + files: n ? g : g.map((h) => h.fileName), + projectErrors: this.getGlobalProjectErrors() + }; + } + } + // remove a root file from project + removeRoot(t) { + this.rootFilesMap.delete(t.path); + } + /** @internal */ + isSourceOfProjectReferenceRedirect(t) { + return !!this.program && this.program.isSourceOfProjectReferenceRedirect(t); + } + /** @internal */ + getGlobalPluginSearchPaths() { + return [ + ...this.projectService.pluginProbeLocations, + // ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/node_modules/ + Ln(this.projectService.getExecutingFilePath(), "../../..") + ]; + } + enableGlobalPlugins(t) { + if (!this.projectService.globalPlugins.length) return; + const n = this.projectService.host; + if (!n.require && !n.importPlugin) { + this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded"); + return; + } + const i = this.getGlobalPluginSearchPaths(); + for (const s of this.projectService.globalPlugins) + s && (t.plugins && t.plugins.some((o) => o.name === s) || (this.projectService.logger.info(`Loading global plugin ${s}`), this.enablePlugin({ name: s, global: !0 }, i))); + } + enablePlugin(t, n) { + this.projectService.requestEnablePlugin(this, t, n); + } + /** @internal */ + enableProxy(t, n) { + try { + if (typeof t != "function") { + this.projectService.logger.info(`Skipped loading plugin ${n.name} because it did not expose a proper factory function`); + return; + } + const i = { + config: n, + project: this, + languageService: this.languageService, + languageServiceHost: this, + serverHost: this.projectService.host, + session: this.projectService.session + }, s = t({ typescript: vwe }), o = s.create(i); + for (const c of Object.keys(this.languageService)) + c in o || (this.projectService.logger.info(`Plugin activation warning: Missing proxied method ${c} in created LS. Patching.`), o[c] = this.languageService[c]); + this.projectService.logger.info("Plugin validation succeeded"), this.languageService = o, this.plugins.push({ name: n.name, module: s }); + } catch (i) { + this.projectService.logger.info(`Plugin activation failed: ${i}`); + } + } + /** @internal */ + onPluginConfigurationChanged(t, n) { + this.plugins.filter((i) => i.name === t).forEach((i) => { + i.module.onConfigurationChanged && i.module.onConfigurationChanged(n); + }); + } + /** Starts a new check for diagnostics. Call this if some file has updated that would cause diagnostics to be changed. */ + refreshDiagnostics() { + this.projectService.sendProjectsUpdatedInBackgroundEvent(); + } + /** @internal */ + getPackageJsonsVisibleToFile(t, n) { + return this.projectService.serverMode !== 0 ? pl : this.projectService.getPackageJsonsVisibleToFile(t, this, n); + } + /** @internal */ + getNearestAncestorDirectoryWithPackageJson(t) { + return this.projectService.getNearestAncestorDirectoryWithPackageJson(t, this); + } + /** @internal */ + getPackageJsonsForAutoImport(t) { + return this.getPackageJsonsVisibleToFile(Ln(this.currentDirectory, YD), t); + } + /** @internal */ + getPackageJsonCache() { + return this.projectService.packageJsonCache; + } + /** @internal */ + getCachedExportInfoMap() { + return this.exportMapCache || (this.exportMapCache = rq(this)); + } + /** @internal */ + clearCachedExportInfoMap() { + var t; + (t = this.exportMapCache) == null || t.clear(); + } + /** @internal */ + getModuleSpecifierCache() { + return this.moduleSpecifierCache; + } + /** @internal */ + includePackageJsonAutoImports() { + return this.projectService.includePackageJsonAutoImports() === 0 || !this.languageServiceEnabled || AA(this.currentDirectory) || !this.isDefaultProjectForOpenFiles() ? 0 : this.projectService.includePackageJsonAutoImports(); + } + /** @internal */ + getHostForAutoImportProvider() { + var t, n; + return this.program ? { + fileExists: this.program.fileExists, + directoryExists: this.program.directoryExists, + realpath: this.program.realpath || ((t = this.projectService.host.realpath) == null ? void 0 : t.bind(this.projectService.host)), + getCurrentDirectory: this.getCurrentDirectory.bind(this), + readFile: this.projectService.host.readFile.bind(this.projectService.host), + getDirectories: this.projectService.host.getDirectories.bind(this.projectService.host), + trace: (n = this.projectService.host.trace) == null ? void 0 : n.bind(this.projectService.host), + useCaseSensitiveFileNames: this.program.useCaseSensitiveFileNames(), + readDirectory: this.projectService.host.readDirectory.bind(this.projectService.host) + } : this.projectService.host; + } + /** @internal */ + getPackageJsonAutoImportProvider() { + var t, n, i; + if (this.autoImportProviderHost === !1) + return; + if (this.projectService.serverMode !== 0) { + this.autoImportProviderHost = !1; + return; + } + if (this.autoImportProviderHost) { + if (Up(this.autoImportProviderHost), this.autoImportProviderHost.isEmpty()) { + this.autoImportProviderHost.close(), this.autoImportProviderHost = void 0; + return; + } + return this.autoImportProviderHost.getCurrentProgram(); + } + const s = this.includePackageJsonAutoImports(); + if (s) { + (t = nn) == null || t.push(nn.Phase.Session, "getPackageJsonAutoImportProvider"); + const o = ao(); + if (this.autoImportProviderHost = I_e.create( + s, + this, + this.getHostForAutoImportProvider() + ) ?? !1, this.autoImportProviderHost) + return Up(this.autoImportProviderHost), this.sendPerformanceEvent("CreatePackageJsonAutoImportProvider", ao() - o), (n = nn) == null || n.pop(), this.autoImportProviderHost.getCurrentProgram(); + (i = nn) == null || i.pop(); + } + } + isDefaultProjectForOpenFiles() { + return !!al( + this.projectService.openFiles, + (t, n) => this.projectService.tryGetDefaultProjectForFile(this.projectService.getScriptInfoForPath(n)) === this + ); + } + /** @internal */ + watchNodeModulesForPackageJsonChanges(t) { + return this.projectService.watchPackageJsonsInNodeModules(t, this); + } + /** @internal */ + getIncompleteCompletionsCache() { + return this.projectService.getIncompleteCompletionsCache(); + } + /** @internal */ + getNoDtsResolutionProject(t) { + return E.assert( + this.projectService.serverMode === 0 + /* Semantic */ + ), this.noDtsResolutionProject ?? (this.noDtsResolutionProject = new N_e(this)), this.noDtsResolutionProject.rootFile !== t && (this.projectService.setFileNamesOfAutoImportProviderOrAuxillaryProject( + this.noDtsResolutionProject, + [t] + ), this.noDtsResolutionProject.rootFile = t), this.noDtsResolutionProject; + } + /** @internal */ + runWithTemporaryFileUpdate(t, n, i) { + var s, o, c, _; + const u = this.program, m = E.checkDefined((s = this.program) == null ? void 0 : s.getSourceFile(t), "Expected file to be part of program"), g = E.checkDefined(m.getFullText()); + (o = this.getScriptInfo(t)) == null || o.editContent(0, g.length, n), this.updateGraph(); + try { + i(this.program, u, (c = this.program) == null ? void 0 : c.getSourceFile(t)); + } finally { + (_ = this.getScriptInfo(t)) == null || _.editContent(0, n.length, g); + } + } + /** @internal */ + getCompilerOptionsForNoDtsResolutionProject() { + return { + ...this.getCompilerOptions(), + noDtsResolution: !0, + allowJs: !0, + maxNodeModuleJsDepth: 3, + diagnostics: !1, + skipLibCheck: !0, + sourceMap: !1, + types: He, + lib: He, + noLib: !0 + }; + } + }; + function nKe(e, t) { + var n, i; + const s = e.getSourceFiles(); + (n = nn) == null || n.push(nn.Phase.Session, "getUnresolvedImports", { count: s.length }); + const o = e.getTypeChecker().getAmbientModules().map((_) => Op(_.getName())), c = GE(na(s, (_) => iKe( + e, + _, + o, + t + ))); + return (i = nn) == null || i.pop(), c; + } + function iKe(e, t, n, i) { + return HE(i, t.path, () => { + let s; + return e.forEachResolvedModule(({ resolvedModule: o }, c) => { + (!o || !rD(o.extension)) && !vl(c) && !n.some((_) => _ === c) && (s = Pr(s, nO(c).packageName)); + }, t), s || pl; + }); + } + var P_e = class extends kk { + /** @internal */ + constructor(e, t, n, i, s, o) { + super( + e.newInferredProjectName(), + 0, + e, + /*hasExplicitListOfFiles*/ + !1, + /*lastFileExceededProgramSize*/ + void 0, + t, + /*compileOnSaveEnabled*/ + !1, + n, + e.host, + s + ), this._isJsInferredProject = !1, this.typeAcquisition = o, this.projectRootPath = i && e.toCanonicalFileName(i), !i && !e.useSingleInferredProject && (this.canonicalCurrentDirectory = e.toCanonicalFileName(this.currentDirectory)), this.enableGlobalPlugins(this.getCompilerOptions()); + } + toggleJsInferredProject(e) { + e !== this._isJsInferredProject && (this._isJsInferredProject = e, this.setCompilerOptions()); + } + setCompilerOptions(e) { + if (!e && !this.getCompilationSettings()) + return; + const t = vV(e || this.getCompilationSettings()); + this._isJsInferredProject && typeof t.maxNodeModuleJsDepth != "number" ? t.maxNodeModuleJsDepth = 2 : this._isJsInferredProject || (t.maxNodeModuleJsDepth = void 0), t.allowJs = !0, super.setCompilerOptions(t); + } + addRoot(e) { + E.assert(e.isScriptOpen()), this.projectService.startWatchingConfigFilesForInferredProjectRoot(e), !this._isJsInferredProject && e.isJavaScript() ? this.toggleJsInferredProject( + /*isJsInferredProject*/ + !0 + ) : this.isOrphan() && this._isJsInferredProject && !e.isJavaScript() && this.toggleJsInferredProject( + /*isJsInferredProject*/ + !1 + ), super.addRoot(e); + } + removeRoot(e) { + this.projectService.stopWatchingConfigFilesForScriptInfo(e), super.removeRoot(e), !this.isOrphan() && this._isJsInferredProject && e.isJavaScript() && Ri(this.getRootScriptInfos(), (t) => !t.isJavaScript()) && this.toggleJsInferredProject( + /*isJsInferredProject*/ + !1 + ); + } + /** @internal */ + isOrphan() { + return !this.hasRoots(); + } + isProjectWithSingleRoot() { + return !this.projectRootPath && !this.projectService.useSingleInferredProject || this.getRootScriptInfos().length === 1; + } + close() { + lr(this.getRootScriptInfos(), (e) => this.projectService.stopWatchingConfigFilesForScriptInfo(e)), super.close(); + } + getTypeAcquisition() { + return this.typeAcquisition || { + enable: C_e(this), + include: He, + exclude: He + }; + } + }, N_e = class extends kk { + constructor(e) { + super( + e.projectService.newAuxiliaryProjectName(), + 4, + e.projectService, + /*hasExplicitListOfFiles*/ + !1, + /*lastFileExceededProgramSize*/ + void 0, + e.getCompilerOptionsForNoDtsResolutionProject(), + /*compileOnSaveEnabled*/ + !1, + /*watchOptions*/ + void 0, + e.projectService.host, + e.currentDirectory + ); + } + isOrphan() { + return !0; + } + scheduleInvalidateResolutionsOfFailedLookupLocations() { + } + }, A_e = class Vme extends kk { + /** @internal */ + constructor(t, n, i) { + super( + t.projectService.newAutoImportProviderProjectName(), + 3, + t.projectService, + /*hasExplicitListOfFiles*/ + !1, + /*lastFileExceededProgramSize*/ + void 0, + i, + /*compileOnSaveEnabled*/ + !1, + t.getWatchOptions(), + t.projectService.host, + t.currentDirectory + ), this.hostProject = t, this.rootFileNames = n, this.useSourceOfProjectReferenceRedirect = Is(this.hostProject, this.hostProject.useSourceOfProjectReferenceRedirect), this.getParsedCommandLine = Is(this.hostProject, this.hostProject.getParsedCommandLine); + } + /** @internal */ + static getRootFileNames(t, n, i, s) { + var o, c; + if (!t) + return He; + const _ = n.getCurrentProgram(); + if (!_) + return He; + const u = ao(); + let m, g; + const h = Ln(n.currentDirectory, YD), S = n.getPackageJsonsForAutoImport(Ln(n.currentDirectory, h)); + for (const R of S) + (o = R.dependencies) == null || o.forEach((W, V) => A(V)), (c = R.peerDependencies) == null || c.forEach((W, V) => A(V)); + let T = 0; + if (m) { + const R = n.getSymlinkCache(); + for (const W of Ki(m.keys())) { + if (t === 2 && T >= this.maxDependencies) + return n.log(`AutoImportProviderProject: attempted to add more than ${this.maxDependencies} dependencies. Aborting.`), He; + const V = $z( + W, + n.currentDirectory, + s, + i, + _.getModuleResolutionCache() + ); + if (V) { + const U = O(V, _, R); + if (U) { + T += w(U); + continue; + } + } + if (!lr([n.currentDirectory, n.getGlobalTypingsCacheLocation()], (U) => { + if (U) { + const _e = $z( + `@types/${W}`, + U, + s, + i, + _.getModuleResolutionCache() + ); + if (_e) { + const Z = O(_e, _, R); + return T += w(Z), !0; + } + } + }) && V && s.allowJs && s.maxNodeModuleJsDepth) { + const U = O( + V, + _, + R, + /*resolveJs*/ + !0 + ); + T += w(U); + } + } + } + const C = _.getResolvedProjectReferences(); + let D = 0; + return C?.length && n.projectService.getHostPreferences().includeCompletionsForModuleExports && C.forEach((R) => { + if (R?.commandLine.options.outFile) + D += w(F([ + Oh(R.commandLine.options.outFile, ".d.ts") + ])); + else if (R) { + const W = Iu( + () => HS( + R.commandLine, + !n.useCaseSensitiveFileNames() + ) + ); + D += w(F(Li( + R.commandLine.fileNames, + (V) => !fl(V) && !Bo( + V, + ".json" + /* Json */ + ) && !_.getSourceFile(V) ? x6( + V, + R.commandLine, + !n.useCaseSensitiveFileNames(), + W + ) : void 0 + ))); + } + }), g?.size && n.log(`AutoImportProviderProject: found ${g.size} root files in ${T} dependencies ${D} referenced projects in ${ao() - u} ms`), g ? Ki(g.values()) : He; + function w(R) { + return R?.length ? (g ?? (g = /* @__PURE__ */ new Set()), R.forEach((W) => g.add(W)), 1) : 0; + } + function A(R) { + Vi(R, "@types/") || (m || (m = /* @__PURE__ */ new Set())).add(R); + } + function O(R, W, V, $) { + var U; + const _e = eW( + R, + s, + i, + W.getModuleResolutionCache(), + $ + ); + if (_e) { + const Z = (U = i.realpath) == null ? void 0 : U.call(i, R.packageDirectory), J = Z ? n.toPath(Z) : void 0, re = J && J !== n.toPath(R.packageDirectory); + return re && V.setSymlinkedDirectory(R.packageDirectory, { + real: il(Z), + realPath: il(J) + }), F(_e, re ? (te) => te.replace(R.packageDirectory, Z) : void 0); + } + } + function F(R, W) { + return Li(R, (V) => { + const $ = W ? W(V) : V; + if (!_.getSourceFile($) && !(W && _.getSourceFile(V))) + return $; + }); + } + } + /** @internal */ + static create(t, n, i) { + if (t === 0) + return; + const s = { + ...n.getCompilerOptions(), + ...this.compilerOptionsOverrides + }, o = this.getRootFileNames(t, n, i, s); + if (o.length) + return new Vme(n, o, s); + } + /** @internal */ + isEmpty() { + return !at(this.rootFileNames); + } + /** @internal */ + isOrphan() { + return !0; + } + updateGraph() { + let t = this.rootFileNames; + t || (t = Vme.getRootFileNames( + this.hostProject.includePackageJsonAutoImports(), + this.hostProject, + this.hostProject.getHostForAutoImportProvider(), + this.getCompilationSettings() + )), this.projectService.setFileNamesOfAutoImportProviderOrAuxillaryProject(this, t), this.rootFileNames = t; + const n = this.getCurrentProgram(), i = super.updateGraph(); + return n && n !== this.getCurrentProgram() && this.hostProject.clearCachedExportInfoMap(), i; + } + /** @internal */ + scheduleInvalidateResolutionsOfFailedLookupLocations() { + } + hasRoots() { + var t; + return !!((t = this.rootFileNames) != null && t.length); + } + /** @internal */ + markAsDirty() { + this.rootFileNames = void 0, super.markAsDirty(); + } + getScriptFileNames() { + return this.rootFileNames || He; + } + getLanguageService() { + throw new Error("AutoImportProviderProject language service should never be used. To get the program, use `project.getCurrentProgram()`."); + } + /** @internal */ + onAutoImportProviderSettingsChanged() { + throw new Error("AutoImportProviderProject is an auto import provider; use `markAsDirty()` instead."); + } + /** @internal */ + onPackageJsonChange() { + throw new Error("package.json changes should be notified on an AutoImportProvider's host project"); + } + getHostForAutoImportProvider() { + throw new Error("AutoImportProviderProject cannot provide its own host; use `hostProject.getModuleResolutionHostForAutomImportProvider()` instead."); + } + getProjectReferences() { + return this.hostProject.getProjectReferences(); + } + /** @internal */ + includePackageJsonAutoImports() { + return 0; + } + /** @internal */ + getSymlinkCache() { + return this.hostProject.getSymlinkCache(); + } + /** @internal */ + getModuleResolutionCache() { + var t; + return (t = this.hostProject.getCurrentProgram()) == null ? void 0 : t.getModuleResolutionCache(); + } + }; + A_e.maxDependencies = 10, A_e.compilerOptionsOverrides = { + diagnostics: !1, + skipLibCheck: !0, + sourceMap: !1, + types: He, + lib: He, + noLib: !0 + }; + var I_e = A_e, F_e = class extends kk { + /** @internal */ + constructor(e, t, n, i, s) { + super( + e, + 1, + n, + /*hasExplicitListOfFiles*/ + !1, + /*lastFileExceededProgramSize*/ + void 0, + /*compilerOptions*/ + {}, + /*compileOnSaveEnabled*/ + !1, + /*watchOptions*/ + void 0, + i, + Hn(e) + ), this.canonicalConfigFilePath = t, this.openFileWatchTriggered = /* @__PURE__ */ new Map(), this.initialLoadPending = !0, this.sendLoadingProjectFinish = !1, this.pendingUpdateLevel = 2, this.pendingUpdateReason = s; + } + /** @internal */ + setCompilerHost(e) { + this.compilerHost = e; + } + /** @internal */ + getCompilerHost() { + return this.compilerHost; + } + /** @internal */ + useSourceOfProjectReferenceRedirect() { + return this.languageServiceEnabled; + } + /** @internal */ + getParsedCommandLine(e) { + const t = eo(e), n = this.projectService.toCanonicalFileName(t); + let i = this.projectService.configFileExistenceInfoCache.get(n); + return i || this.projectService.configFileExistenceInfoCache.set(n, i = { exists: this.projectService.host.fileExists(t) }), this.projectService.ensureParsedConfigUptoDate(t, n, i, this), this.languageServiceEnabled && this.projectService.serverMode === 0 && this.projectService.watchWildcards(t, i, this), i.exists ? i.config.parsedCommandLine : void 0; + } + /** @internal */ + onReleaseParsedCommandLine(e) { + this.releaseParsedConfig(this.projectService.toCanonicalFileName(eo(e))); + } + releaseParsedConfig(e) { + this.projectService.stopWatchingWildCards(e, this), this.projectService.releaseParsedConfig(e, this); + } + /** + * If the project has reload from disk pending, it reloads (and then updates graph as part of that) instead of just updating the graph + * @returns: true if set of files in the project stays the same and false - otherwise. + */ + updateGraph() { + if (this.deferredClose) return !1; + const e = this.dirty; + this.initialLoadPending = !1; + const t = this.pendingUpdateLevel; + this.pendingUpdateLevel = 0; + let n; + switch (t) { + case 1: + this.openFileWatchTriggered.clear(), n = this.projectService.reloadFileNamesOfConfiguredProject(this); + break; + case 2: + this.openFileWatchTriggered.clear(); + const i = E.checkDefined(this.pendingUpdateReason); + this.projectService.reloadConfiguredProject(this, i), n = !0; + break; + default: + n = super.updateGraph(); + } + return this.compilerHost = void 0, this.projectService.sendProjectLoadingFinishEvent(this), this.projectService.sendProjectTelemetry(this), t === 2 || // Already sent event through reload + n && // Not new program + (!e || !this.triggerFileForConfigFileDiag || this.getCurrentProgram().structureIsReused === 2) ? this.triggerFileForConfigFileDiag = void 0 : this.triggerFileForConfigFileDiag || this.projectService.sendConfigFileDiagEvent( + this, + /*triggerFile*/ + void 0, + /*force*/ + !1 + ), n; + } + /** @internal */ + getCachedDirectoryStructureHost() { + return this.directoryStructureHost; + } + getConfigFilePath() { + return this.getProjectName(); + } + getProjectReferences() { + return this.projectReferences; + } + updateReferences(e) { + this.projectReferences = e, this.potentialProjectReferences = void 0; + } + /** @internal */ + setPotentialProjectReference(e) { + E.assert(this.initialLoadPending), (this.potentialProjectReferences || (this.potentialProjectReferences = /* @__PURE__ */ new Set())).add(e); + } + /** @internal */ + getResolvedProjectReferenceToRedirect(e) { + const t = this.getCurrentProgram(); + return t && t.getResolvedProjectReferenceToRedirect(e); + } + /** @internal */ + forEachResolvedProjectReference(e) { + var t; + return (t = this.getCurrentProgram()) == null ? void 0 : t.forEachResolvedProjectReference(e); + } + /** @internal */ + enablePluginsWithOptions(e) { + var t; + if (this.plugins.length = 0, !((t = e.plugins) != null && t.length) && !this.projectService.globalPlugins.length) return; + const n = this.projectService.host; + if (!n.require && !n.importPlugin) { + this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded"); + return; + } + const i = this.getGlobalPluginSearchPaths(); + if (this.projectService.allowLocalPluginLoads) { + const s = Hn(this.canonicalConfigFilePath); + this.projectService.logger.info(`Local plugin loading enabled; adding ${s} to search paths`), i.unshift(s); + } + if (e.plugins) + for (const s of e.plugins) + this.enablePlugin(s, i); + return this.enableGlobalPlugins(e); + } + /** + * Get the errors that dont have any file name associated + */ + getGlobalProjectErrors() { + return kn(this.projectErrors, (e) => !e.file) || pl; + } + /** + * Get all the project errors + */ + getAllProjectErrors() { + return this.projectErrors || pl; + } + setProjectErrors(e) { + this.projectErrors = e; + } + close() { + this.projectService.configFileExistenceInfoCache.forEach((e, t) => this.releaseParsedConfig(t)), this.projectErrors = void 0, this.openFileWatchTriggered.clear(), this.compilerHost = void 0, super.close(); + } + /** @internal */ + markAsDirty() { + this.deferredClose || super.markAsDirty(); + } + /** @internal */ + isOrphan() { + return !!this.deferredClose; + } + getEffectiveTypeRoots() { + return LD(this.getCompilationSettings(), this) || []; + } + /** @internal */ + updateErrorOnNoInputFiles(e) { + this.parsedCommandLine = e, GF( + e.fileNames, + this.getConfigFilePath(), + this.getCompilerOptions().configFile.configFileSpecs, + this.projectErrors, + RN(e.raw) + ); + } + }, rG = class extends kk { + /** @internal */ + constructor(e, t, n, i, s, o, c) { + super( + e, + 2, + t, + /*hasExplicitListOfFiles*/ + !0, + i, + n, + s, + c, + t.host, + Hn(o || Vl(e)) + ), this.externalProjectName = e, this.compileOnSaveEnabled = s, this.excludedFiles = [], this.enableGlobalPlugins(this.getCompilerOptions()); + } + updateGraph() { + const e = super.updateGraph(); + return this.projectService.sendProjectTelemetry(this), e; + } + getExcludedFiles() { + return this.excludedFiles; + } + }; + function X6(e) { + return e.projectKind === 0; + } + function H0(e) { + return e.projectKind === 1; + } + function d8(e) { + return e.projectKind === 2; + } + function m8(e) { + return e.projectKind === 3 || e.projectKind === 4; + } + function g8(e) { + return H0(e) && !!e.deferredClose; + } + var nG = 20 * 1024 * 1024, iG = 4 * 1024 * 1024, FL = "projectsUpdatedInBackground", sG = "projectLoadingStart", aG = "projectLoadingFinish", oG = "largeFileReferenced", cG = "configFileDiag", lG = "projectLanguageServiceState", uG = "projectInfo", O_e = "openFileInfo", _G = "createFileWatcher", fG = "createDirectoryWatcher", pG = "closeFileWatcher", Bwe = "*ensureProjectForOpenFiles*"; + function Jwe(e) { + const t = /* @__PURE__ */ new Map(); + for (const n of e) + if (typeof n.type == "object") { + const i = n.type; + i.forEach((s) => { + E.assert(typeof s == "number"); + }), t.set(n.name, i); + } + return t; + } + var sKe = Jwe(Nd), aKe = Jwe(ek), oKe = new Map(Object.entries({ + none: 0, + block: 1, + smart: 2 + /* Smart */ + })), L_e = { + jquery: { + // jquery files can have names like "jquery-1.10.2.min.js" (or "jquery.intellisense.js") + match: /jquery(-[\d.]+)?(\.intellisense)?(\.min)?\.js$/i, + types: ["jquery"] + }, + WinJS: { + // e.g. c:/temp/UWApp1/lib/winjs-4.0.1/js/base.js + match: /^(.*\/winjs-[.\d]+)\/js\/base\.js$/i, + // If the winjs/base.js file is found.. + exclude: [["^", 1, "/.*"]], + // ..then exclude all files under the winjs folder + types: ["winjs"] + // And fetch the @types package for WinJS + }, + Kendo: { + // e.g. /Kendo3/wwwroot/lib/kendo/kendo.all.min.js + match: /^(.*\/kendo(-ui)?)\/kendo\.all(\.min)?\.js$/i, + exclude: [["^", 1, "/.*"]], + types: ["kendo-ui"] + }, + "Office Nuget": { + // e.g. /scripts/Office/1/excel-15.debug.js + match: /^(.*\/office\/1)\/excel-\d+\.debug\.js$/i, + // Office NuGet package is installed under a "1/office" folder + exclude: [["^", 1, "/.*"]], + // Exclude that whole folder if the file indicated above is found in it + types: ["office"] + // @types package to fetch instead + }, + References: { + match: /^(.*\/_references\.js)$/i, + exclude: [["^", 1, "$"]] + } + }; + function Q6(e) { + return rs(e.indentStyle) && (e.indentStyle = oKe.get(e.indentStyle.toLowerCase()), E.assert(e.indentStyle !== void 0)), e; + } + function OL(e) { + return sKe.forEach((t, n) => { + const i = e[n]; + rs(i) && (e[n] = t.get(i.toLowerCase())); + }), e; + } + function h8(e, t) { + let n, i; + return ek.forEach((s) => { + const o = e[s.name]; + if (o === void 0) return; + const c = aKe.get(s.name); + (n || (n = {}))[s.name] = c ? rs(o) ? c.get(o.toLowerCase()) : o : zS(s, o, t || "", i || (i = [])); + }), n && { watchOptions: n, errors: i }; + } + function M_e(e) { + let t; + return RF.forEach((n) => { + const i = e[n.name]; + i !== void 0 && ((t || (t = {}))[n.name] = i); + }), t; + } + function dG(e) { + return rs(e) ? mG(e) : e; + } + function mG(e) { + switch (e) { + case "JS": + return 1; + case "JSX": + return 2; + case "TS": + return 3; + case "TSX": + return 4; + default: + return 0; + } + } + function R_e(e) { + const { lazyConfiguredProjectsFromExternalProject: t, ...n } = e; + return n; + } + var gG = { + getFileName: (e) => e, + getScriptKind: (e, t) => { + let n; + if (t) { + const i = ZT(e); + i && at(t, (s) => s.extension === i ? (n = s.scriptKind, !0) : !1); + } + return n; + }, + hasMixedContent: (e, t) => at(t, (n) => n.isMixedContent && Bo(e, n.extension)) + }, hG = { + getFileName: (e) => e.fileName, + getScriptKind: (e) => dG(e.scriptKind), + // TODO: GH#18217 + hasMixedContent: (e) => !!e.hasMixedContent + }; + function zwe(e, t) { + for (const n of t) + if (n.getProjectName() === e) + return n; + } + var LL = { + isKnownTypesPackageName: Th, + // Should never be called because we never provide a types registry. + installPackage: qs, + enqueueInstallTypingsRequest: Ja, + attach: Ja, + onProjectClosed: Ja, + globalTypingsCacheLocation: void 0 + // TODO: GH#18217 + }, j_e = { close: Ja }; + function Wwe(e, t) { + if (!t) return; + const n = t.get(e.path); + if (n !== void 0) + return yG(e) ? n && !rs(n) ? ( + // Map with fileName as key + n.get(e.fileName) + ) : void 0 : rs(n) || !n ? n : ( + // direct result + n.get( + /*key*/ + !1 + ) + ); + } + function Uwe(e) { + return !!e.containingProjects; + } + function yG(e) { + return !!e.configFileInfo; + } + var B_e = /* @__PURE__ */ ((e) => (e[e.FindOptimized = 0] = "FindOptimized", e[e.Find = 1] = "Find", e[e.CreateReplayOptimized = 2] = "CreateReplayOptimized", e[e.CreateReplay = 3] = "CreateReplay", e[e.CreateOptimized = 4] = "CreateOptimized", e[e.Create = 5] = "Create", e[e.ReloadOptimized = 6] = "ReloadOptimized", e[e.Reload = 7] = "Reload", e))(B_e || {}); + function Vwe(e) { + return e - 1; + } + function qwe(e, t, n, i, s, o, c, _, u) { + for (var m; ; ) { + if (t.parsedCommandLine && (_ && !t.parsedCommandLine.options.composite || // Currently disableSolutionSearching is shared for finding solution/project when + // - loading solution for find all references + // - trying to find default project + t.parsedCommandLine.options.disableSolutionSearching)) return; + const g = t.projectService.getConfigFileNameForFile( + { + fileName: t.getConfigFilePath(), + path: e.path, + configFileInfo: !0, + isForDefaultProject: !_ + }, + i <= 3 + /* CreateReplay */ + ); + if (!g) return; + const h = t.projectService.findCreateOrReloadConfiguredProject( + g, + i, + s, + o, + _ ? void 0 : e.fileName, + // Config Diag event for project if its for default project + c, + _, + // Delay load if we are searching for solution + u + ); + if (!h) return; + !h.project.parsedCommandLine && ((m = t.parsedCommandLine) != null && m.options.composite) && h.project.setPotentialProjectReference(t.canonicalConfigFilePath); + const S = n(h); + if (S) return S; + t = h.project; + } + } + function Hwe(e, t, n, i, s, o, c, _) { + const u = t.options.disableReferencedProjectLoad ? 0 : i; + let m; + return lr( + t.projectReferences, + (g) => { + var h; + const S = eo(ak(g)), T = e.projectService.toCanonicalFileName(S), C = _?.get(T); + if (C !== void 0 && C >= u) return; + const D = e.projectService.configFileExistenceInfoCache.get(T); + let w = u === 0 ? D?.exists || (h = e.resolvedChildConfigs) != null && h.has(T) ? D.config.parsedCommandLine : void 0 : e.getParsedCommandLine(S); + if (w && u !== i && u > 2 && (w = e.getParsedCommandLine(S)), !w) return; + const A = e.projectService.findConfiguredProjectByProjectName(S, o); + if (!(u === 2 && !D && !A)) { + switch (u) { + case 6: + A && A.projectService.reloadConfiguredProjectOptimized(A, s, c); + // falls through + case 4: + (e.resolvedChildConfigs ?? (e.resolvedChildConfigs = /* @__PURE__ */ new Set())).add(T); + // falls through + case 2: + case 0: + if (A || u !== 0) { + const O = n( + D ?? e.projectService.configFileExistenceInfoCache.get(T), + A, + S, + s, + e, + T + ); + if (O) return O; + } + break; + default: + E.assertNever(u); + } + (_ ?? (_ = /* @__PURE__ */ new Map())).set(T, u), (m ?? (m = [])).push(w); + } + } + ) || lr( + m, + (g) => g.projectReferences && Hwe( + e, + g, + n, + u, + s, + o, + c, + _ + ) + ); + } + function J_e(e, t, n, i, s) { + let o = !1, c; + switch (t) { + case 2: + case 3: + V_e(e) && (c = e.projectService.configFileExistenceInfoCache.get(e.canonicalConfigFilePath)); + break; + case 4: + if (c = U_e(e), c) break; + // falls through + case 5: + o = lKe(e, n); + break; + case 6: + if (e.projectService.reloadConfiguredProjectOptimized(e, i, s), c = U_e(e), c) break; + // falls through + case 7: + o = e.projectService.reloadConfiguredProjectClearingSemanticCache( + e, + i, + s + ); + break; + case 0: + case 1: + break; + default: + E.assertNever(t); + } + return { project: e, sentConfigFileDiag: o, configFileExistenceInfo: c, reason: i }; + } + function Gwe(e, t) { + return e.initialLoadPending ? (e.potentialProjectReferences && jg(e.potentialProjectReferences, t)) ?? (e.resolvedChildConfigs && jg(e.resolvedChildConfigs, t)) : void 0; + } + function cKe(e, t, n, i) { + return e.getCurrentProgram() ? e.forEachResolvedProjectReference(t) : e.initialLoadPending ? Gwe(e, i) : lr(e.getProjectReferences(), n); + } + function z_e(e, t, n) { + const i = n && e.projectService.configuredProjects.get(n); + return i && t(i); + } + function $we(e, t) { + return cKe( + e, + (n) => z_e(e, t, n.sourceFile.path), + (n) => z_e(e, t, e.toPath(ak(n))), + (n) => z_e(e, t, n) + ); + } + function vG(e, t) { + return `${rs(t) ? `Config: ${t} ` : t ? `Project: ${t.getProjectName()} ` : ""}WatchType: ${e}`; + } + function W_e(e) { + return !e.isScriptOpen() && e.mTime !== void 0; + } + function Up(e) { + return e.invalidateResolutionsOfFailedLookupLocations(), e.dirty && !e.updateGraph(); + } + function Xwe(e, t, n) { + if (!n && (e.invalidateResolutionsOfFailedLookupLocations(), !e.dirty)) + return !1; + e.triggerFileForConfigFileDiag = t; + const i = e.pendingUpdateLevel; + if (e.updateGraph(), !e.triggerFileForConfigFileDiag && !n) return i === 2; + const s = e.projectService.sendConfigFileDiagEvent(e, t, n); + return e.triggerFileForConfigFileDiag = void 0, s; + } + function lKe(e, t) { + if (t) { + if (Xwe( + e, + t, + /*isReload*/ + !1 + )) return !0; + } else + Up(e); + return !1; + } + function U_e(e) { + const t = eo(e.getConfigFilePath()), n = e.projectService.ensureParsedConfigUptoDate( + t, + e.canonicalConfigFilePath, + e.projectService.configFileExistenceInfoCache.get(e.canonicalConfigFilePath), + e + ), i = n.config.parsedCommandLine; + if (e.parsedCommandLine = i, e.resolvedChildConfigs = void 0, e.updateReferences(i.projectReferences), V_e(e)) return n; + } + function V_e(e) { + return !!e.parsedCommandLine && (!!e.parsedCommandLine.options.composite || // If solution, no need to load it to determine if file belongs to it + !!Vz(e.parsedCommandLine)); + } + function uKe(e) { + return V_e(e) ? e.projectService.configFileExistenceInfoCache.get(e.canonicalConfigFilePath) : void 0; + } + function _Ke(e) { + return `Creating possible configured project for ${e.fileName} to open`; + } + function bG(e) { + return `User requested reload projects: ${e}`; + } + function q_e(e) { + H0(e) && (e.projectOptions = !0); + } + function H_e(e) { + let t = 1; + return () => e(t++); + } + function G_e() { + return { idToCallbacks: /* @__PURE__ */ new Map(), pathToId: /* @__PURE__ */ new Map() }; + } + function Qwe(e, t) { + return !!t && !!e.eventHandler && !!e.session; + } + function fKe(e, t) { + if (!Qwe(e, t)) return; + const n = G_e(), i = G_e(), s = G_e(); + let o = 1; + return e.session.addProtocolHandler("watchChange", (T) => (m(T.arguments), { responseRequired: !1 })), { + watchFile: c, + watchDirectory: _, + getCurrentDirectory: () => e.host.getCurrentDirectory(), + useCaseSensitiveFileNames: e.host.useCaseSensitiveFileNames + }; + function c(T, C) { + return u( + n, + T, + C, + (D) => ({ eventName: _G, data: { id: D, path: T } }) + ); + } + function _(T, C, D) { + return u( + D ? s : i, + T, + C, + (w) => ({ + eventName: fG, + data: { + id: w, + path: T, + recursive: !!D, + // Special case node_modules as we watch it for changes to closed script infos as well + ignoreUpdate: T.endsWith("/node_modules") ? void 0 : !0 + } + }) + ); + } + function u({ pathToId: T, idToCallbacks: C }, D, w, A) { + const O = e.toPath(D); + let F = T.get(O); + F || T.set(O, F = o++); + let R = C.get(F); + return R || (C.set(F, R = /* @__PURE__ */ new Set()), e.eventHandler(A(F))), R.add(w), { + close() { + const W = C.get(F); + W?.delete(w) && (W.size || (C.delete(F), T.delete(O), e.eventHandler({ eventName: pG, data: { id: F } }))); + } + }; + } + function m(T) { + os(T) ? T.forEach(g) : g(T); + } + function g({ id: T, created: C, deleted: D, updated: w }) { + h( + T, + C, + 0 + /* Created */ + ), h( + T, + D, + 2 + /* Deleted */ + ), h( + T, + w, + 1 + /* Changed */ + ); + } + function h(T, C, D) { + C?.length && (S(n, T, C, (w, A) => w(A, D)), S(i, T, C, (w, A) => w(A)), S(s, T, C, (w, A) => w(A))); + } + function S(T, C, D, w) { + var A; + (A = T.idToCallbacks.get(C)) == null || A.forEach((O) => { + D.forEach((F) => w(O, Vl(F))); + }); + } + } + var Ywe = class qme { + constructor(t) { + this.filenameToScriptInfo = /* @__PURE__ */ new Map(), this.nodeModulesWatchers = /* @__PURE__ */ new Map(), this.filenameToScriptInfoVersion = /* @__PURE__ */ new Map(), this.allJsFilesForOpenFileTelemetry = /* @__PURE__ */ new Set(), this.externalProjectToConfiguredProjectMap = /* @__PURE__ */ new Map(), this.externalProjects = [], this.inferredProjects = [], this.configuredProjects = /* @__PURE__ */ new Map(), this.newInferredProjectName = H_e(p_e), this.newAutoImportProviderProjectName = H_e(d_e), this.newAuxiliaryProjectName = H_e(m_e), this.openFiles = /* @__PURE__ */ new Map(), this.configFileForOpenFiles = /* @__PURE__ */ new Map(), this.rootOfInferredProjects = /* @__PURE__ */ new Set(), this.openFilesWithNonRootedDiskPath = /* @__PURE__ */ new Map(), this.compilerOptionsForInferredProjectsPerProjectRoot = /* @__PURE__ */ new Map(), this.watchOptionsForInferredProjectsPerProjectRoot = /* @__PURE__ */ new Map(), this.typeAcquisitionForInferredProjectsPerProjectRoot = /* @__PURE__ */ new Map(), this.projectToSizeMap = /* @__PURE__ */ new Map(), this.configFileExistenceInfoCache = /* @__PURE__ */ new Map(), this.safelist = L_e, this.legacySafelist = /* @__PURE__ */ new Map(), this.pendingProjectUpdates = /* @__PURE__ */ new Map(), this.pendingEnsureProjectForOpenFiles = !1, this.seenProjects = /* @__PURE__ */ new Map(), this.sharedExtendedConfigFileWatchers = /* @__PURE__ */ new Map(), this.extendedConfigCache = /* @__PURE__ */ new Map(), this.baseline = Ja, this.verifyDocumentRegistry = Ja, this.verifyProgram = Ja, this.onProjectCreation = Ja; + var n; + this.host = t.host, this.logger = t.logger, this.cancellationToken = t.cancellationToken, this.useSingleInferredProject = t.useSingleInferredProject, this.useInferredProjectPerProjectRoot = t.useInferredProjectPerProjectRoot, this.typingsInstaller = t.typingsInstaller || LL, this.throttleWaitMilliseconds = t.throttleWaitMilliseconds, this.eventHandler = t.eventHandler, this.suppressDiagnosticEvents = t.suppressDiagnosticEvents, this.globalPlugins = t.globalPlugins || pl, this.pluginProbeLocations = t.pluginProbeLocations || pl, this.allowLocalPluginLoads = !!t.allowLocalPluginLoads, this.typesMapLocation = t.typesMapLocation === void 0 ? Ln(Hn(this.getExecutingFilePath()), "typesMap.json") : t.typesMapLocation, this.session = t.session, this.jsDocParsingMode = t.jsDocParsingMode, t.serverMode !== void 0 ? this.serverMode = t.serverMode : this.serverMode = 0, this.host.realpath && (this.realpathToScriptInfos = wp()), this.currentDirectory = eo(this.host.getCurrentDirectory()), this.toCanonicalFileName = Wl(this.host.useCaseSensitiveFileNames), this.globalCacheLocationDirectoryPath = this.typingsInstaller.globalTypingsCacheLocation ? il(this.toPath(this.typingsInstaller.globalTypingsCacheLocation)) : void 0, this.throttledOperations = new h_e(this.host, this.logger), this.logger.info(`currentDirectory:: ${this.host.getCurrentDirectory()} useCaseSensitiveFileNames:: ${this.host.useCaseSensitiveFileNames}`), this.logger.info(`libs Location:: ${Hn(this.host.getExecutingFilePath())}`), this.logger.info(`globalTypingsCacheLocation:: ${this.typingsInstaller.globalTypingsCacheLocation}`), this.typesMapLocation ? this.loadTypesMap() : this.logger.info("No types map provided; using the default"), this.typingsInstaller.attach(this), this.hostConfiguration = { + formatCodeOptions: r9(this.host.newLine), + preferences: zp, + hostInfo: "Unknown host", + extraFileExtensions: [] + }, this.documentRegistry = oq( + this.host.useCaseSensitiveFileNames, + this.currentDirectory, + this.jsDocParsingMode, + this + ); + const i = this.logger.hasLevel( + 3 + /* verbose */ + ) ? 2 : this.logger.loggingEnabled() ? 1 : 0, s = i !== 0 ? (o) => this.logger.info(o) : Ja; + this.packageJsonCache = Z_e(this), this.watchFactory = this.serverMode !== 0 ? { + watchFile: ew, + watchDirectory: ew + } : VW( + fKe(this, t.canUseWatchEvents) || this.host, + i, + s, + vG + ), this.canUseWatchEvents = Qwe(this, t.canUseWatchEvents), (n = t.incrementalVerifier) == null || n.call(t, this); + } + toPath(t) { + return oo(t, this.currentDirectory, this.toCanonicalFileName); + } + /** @internal */ + getExecutingFilePath() { + return this.getNormalizedAbsolutePath(this.host.getExecutingFilePath()); + } + /** @internal */ + getNormalizedAbsolutePath(t) { + return Xi(t, this.host.getCurrentDirectory()); + } + /** @internal */ + setDocument(t, n, i) { + const s = E.checkDefined(this.getScriptInfoForPath(n)); + s.cacheSourceFile = { key: t, sourceFile: i }; + } + /** @internal */ + getDocument(t, n) { + const i = this.getScriptInfoForPath(n); + return i && i.cacheSourceFile && i.cacheSourceFile.key === t ? i.cacheSourceFile.sourceFile : void 0; + } + /** @internal */ + ensureInferredProjectsUpToDate_TestOnly() { + this.ensureProjectStructuresUptoDate(); + } + /** @internal */ + getCompilerOptionsForInferredProjects() { + return this.compilerOptionsForInferredProjects; + } + /** @internal */ + onUpdateLanguageServiceStateForProject(t, n) { + if (!this.eventHandler) + return; + const i = { + eventName: lG, + data: { project: t, languageServiceEnabled: n } + }; + this.eventHandler(i); + } + loadTypesMap() { + try { + const t = this.host.readFile(this.typesMapLocation); + if (t === void 0) { + this.logger.info(`Provided types map file "${this.typesMapLocation}" doesn't exist`); + return; + } + const n = JSON.parse(t); + for (const i of Object.keys(n.typesMap)) + n.typesMap[i].match = new RegExp(n.typesMap[i].match, "i"); + this.safelist = n.typesMap; + for (const i in n.simpleMap) + ro(n.simpleMap, i) && this.legacySafelist.set(i, n.simpleMap[i].toLowerCase()); + } catch (t) { + this.logger.info(`Error loading types map: ${t}`), this.safelist = L_e, this.legacySafelist.clear(); + } + } + // eslint-disable-line @typescript-eslint/unified-signatures + updateTypingsForProject(t) { + const n = this.findProject(t.projectName); + if (n) + switch (t.kind) { + case ZO: + n.updateTypingFiles( + t.compilerOptions, + t.typeAcquisition, + t.unresolvedImports, + t.typings + ); + return; + case KO: + n.enqueueInstallTypingsForProject( + /*forceRefresh*/ + !0 + ); + return; + } + } + /** @internal */ + watchTypingLocations(t) { + var n; + (n = this.findProject(t.projectName)) == null || n.watchTypingLocations(t.files); + } + /** @internal */ + delayEnsureProjectForOpenFiles() { + this.openFiles.size && (this.pendingEnsureProjectForOpenFiles = !0, this.throttledOperations.schedule( + Bwe, + /*delay*/ + 2500, + () => { + this.pendingProjectUpdates.size !== 0 ? this.delayEnsureProjectForOpenFiles() : this.pendingEnsureProjectForOpenFiles && (this.ensureProjectForOpenFiles(), this.sendProjectsUpdatedInBackgroundEvent()); + } + )); + } + delayUpdateProjectGraph(t) { + if (g8(t) || (t.markAsDirty(), m8(t))) return; + const n = t.getProjectName(); + this.pendingProjectUpdates.set(n, t), this.throttledOperations.schedule( + n, + /*delay*/ + 250, + () => { + this.pendingProjectUpdates.delete(n) && Up(t); + } + ); + } + /** @internal */ + hasPendingProjectUpdate(t) { + return this.pendingProjectUpdates.has(t.getProjectName()); + } + /** @internal */ + sendProjectsUpdatedInBackgroundEvent() { + if (!this.eventHandler) + return; + const t = { + eventName: FL, + data: { + openFiles: Ki(this.openFiles.keys(), (n) => this.getScriptInfoForPath(n).fileName) + } + }; + this.eventHandler(t); + } + /** @internal */ + sendLargeFileReferencedEvent(t, n) { + if (!this.eventHandler) + return; + const i = { + eventName: oG, + data: { file: t, fileSize: n, maxFileSize: iG } + }; + this.eventHandler(i); + } + /** @internal */ + sendProjectLoadingStartEvent(t, n) { + if (!this.eventHandler) + return; + t.sendLoadingProjectFinish = !0; + const i = { + eventName: sG, + data: { project: t, reason: n } + }; + this.eventHandler(i); + } + /** @internal */ + sendProjectLoadingFinishEvent(t) { + if (!this.eventHandler || !t.sendLoadingProjectFinish) + return; + t.sendLoadingProjectFinish = !1; + const n = { + eventName: aG, + data: { project: t } + }; + this.eventHandler(n); + } + /** @internal */ + sendPerformanceEvent(t, n) { + this.performanceEventHandler && this.performanceEventHandler({ kind: t, durationMs: n }); + } + /** @internal */ + delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(t) { + this.delayUpdateProjectGraph(t), this.delayEnsureProjectForOpenFiles(); + } + delayUpdateProjectGraphs(t, n) { + if (t.length) { + for (const i of t) + n && i.clearSourceMapperCache(), this.delayUpdateProjectGraph(i); + this.delayEnsureProjectForOpenFiles(); + } + } + setCompilerOptionsForInferredProjects(t, n) { + E.assert(n === void 0 || this.useInferredProjectPerProjectRoot, "Setting compiler options per project root path is only supported when useInferredProjectPerProjectRoot is enabled"); + const i = OL(t), s = h8(t, n), o = M_e(t); + i.allowNonTsExtensions = !0; + const c = n && this.toCanonicalFileName(n); + c ? (this.compilerOptionsForInferredProjectsPerProjectRoot.set(c, i), this.watchOptionsForInferredProjectsPerProjectRoot.set(c, s || !1), this.typeAcquisitionForInferredProjectsPerProjectRoot.set(c, o)) : (this.compilerOptionsForInferredProjects = i, this.watchOptionsForInferredProjects = s, this.typeAcquisitionForInferredProjects = o); + for (const _ of this.inferredProjects) + (c ? _.projectRootPath === c : !_.projectRootPath || !this.compilerOptionsForInferredProjectsPerProjectRoot.has(_.projectRootPath)) && (_.setCompilerOptions(i), _.setTypeAcquisition(o), _.setWatchOptions(s?.watchOptions), _.setProjectErrors(s?.errors), _.compileOnSaveEnabled = i.compileOnSave, _.markAsDirty(), this.delayUpdateProjectGraph(_)); + this.delayEnsureProjectForOpenFiles(); + } + findProject(t) { + if (t !== void 0) + return f_e(t) ? zwe(t, this.inferredProjects) : this.findExternalProjectByProjectName(t) || this.findConfiguredProjectByProjectName(eo(t)); + } + /** @internal */ + forEachProject(t) { + this.externalProjects.forEach(t), this.configuredProjects.forEach(t), this.inferredProjects.forEach(t); + } + /** @internal */ + forEachEnabledProject(t) { + this.forEachProject((n) => { + !n.isOrphan() && n.languageServiceEnabled && t(n); + }); + } + getDefaultProjectForFile(t, n) { + return n ? this.ensureDefaultProjectForFile(t) : this.tryGetDefaultProjectForFile(t); + } + /** @internal */ + tryGetDefaultProjectForFile(t) { + const n = rs(t) ? this.getScriptInfoForNormalizedPath(t) : t; + return n && !n.isOrphan() ? n.getDefaultProject() : void 0; + } + /** + * If there is default project calculation pending for this file, + * then it completes that calculation so that correct default project is used for the project + */ + tryGetDefaultProjectForEnsuringConfiguredProjectForFile(t) { + var n; + const i = rs(t) ? this.getScriptInfoForNormalizedPath(t) : t; + if (i) + return (n = this.pendingOpenFileProjectUpdates) != null && n.delete(i.path) && (this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo( + i, + 5 + /* Create */ + ), i.isOrphan() && this.assignOrphanScriptInfoToInferredProject(i, this.openFiles.get(i.path))), this.tryGetDefaultProjectForFile(i); + } + /** @internal */ + ensureDefaultProjectForFile(t) { + return this.tryGetDefaultProjectForEnsuringConfiguredProjectForFile(t) || this.doEnsureDefaultProjectForFile(t); + } + doEnsureDefaultProjectForFile(t) { + this.ensureProjectStructuresUptoDate(); + const n = rs(t) ? this.getScriptInfoForNormalizedPath(t) : t; + return n ? n.getDefaultProject() : (this.logErrorForScriptInfoNotFound(rs(t) ? t : t.fileName), Vh.ThrowNoProject()); + } + getScriptInfoEnsuringProjectsUptoDate(t) { + return this.ensureProjectStructuresUptoDate(), this.getScriptInfo(t); + } + /** + * Ensures the project structures are upto date + * This means, + * - we go through all the projects and update them if they are dirty + * - if updates reflect some change in structure or there was pending request to ensure projects for open files + * ensure that each open script info has project + */ + ensureProjectStructuresUptoDate() { + let t = this.pendingEnsureProjectForOpenFiles; + this.pendingProjectUpdates.clear(); + const n = (i) => { + t = Up(i) || t; + }; + this.externalProjects.forEach(n), this.configuredProjects.forEach(n), this.inferredProjects.forEach(n), t && this.ensureProjectForOpenFiles(); + } + getFormatCodeOptions(t) { + const n = this.getScriptInfoForNormalizedPath(t); + return n && n.getFormatCodeSettings() || this.hostConfiguration.formatCodeOptions; + } + getPreferences(t) { + const n = this.getScriptInfoForNormalizedPath(t); + return { ...this.hostConfiguration.preferences, ...n && n.getPreferences() }; + } + getHostFormatCodeOptions() { + return this.hostConfiguration.formatCodeOptions; + } + getHostPreferences() { + return this.hostConfiguration.preferences; + } + onSourceFileChanged(t, n) { + E.assert(!t.isScriptOpen()), n === 2 ? this.handleDeletedFile( + t, + /*deferredDelete*/ + !0 + ) : (t.deferredDelete && (t.deferredDelete = void 0), t.delayReloadNonMixedContentFile(), this.delayUpdateProjectGraphs( + t.containingProjects, + /*clearSourceMapperCache*/ + !1 + ), this.handleSourceMapProjects(t)); + } + handleSourceMapProjects(t) { + if (t.sourceMapFilePath) + if (rs(t.sourceMapFilePath)) { + const n = this.getScriptInfoForPath(t.sourceMapFilePath); + this.delayUpdateSourceInfoProjects(n?.sourceInfos); + } else + this.delayUpdateSourceInfoProjects(t.sourceMapFilePath.sourceInfos); + this.delayUpdateSourceInfoProjects(t.sourceInfos), t.declarationInfoPath && this.delayUpdateProjectsOfScriptInfoPath(t.declarationInfoPath); + } + delayUpdateSourceInfoProjects(t) { + t && t.forEach((n, i) => this.delayUpdateProjectsOfScriptInfoPath(i)); + } + delayUpdateProjectsOfScriptInfoPath(t) { + const n = this.getScriptInfoForPath(t); + n && this.delayUpdateProjectGraphs( + n.containingProjects, + /*clearSourceMapperCache*/ + !0 + ); + } + handleDeletedFile(t, n) { + E.assert(!t.isScriptOpen()), this.delayUpdateProjectGraphs( + t.containingProjects, + /*clearSourceMapperCache*/ + !1 + ), this.handleSourceMapProjects(t), t.detachAllProjects(), n ? (t.delayReloadNonMixedContentFile(), t.deferredDelete = !0) : this.deleteScriptInfo(t); + } + /** + * This is to watch whenever files are added or removed to the wildcard directories + */ + watchWildcardDirectory(t, n, i, s) { + let o = this.watchFactory.watchDirectory( + t, + (_) => this.onWildCardDirectoryWatcherInvoke( + t, + i, + s, + c, + _ + ), + n, + this.getWatchOptionsFromProjectWatchOptions(s.parsedCommandLine.watchOptions, Hn(i)), + Dl.WildcardDirectory, + i + ); + const c = { + packageJsonWatches: void 0, + close() { + var _; + o && (o.close(), o = void 0, (_ = c.packageJsonWatches) == null || _.forEach((u) => { + u.projects.delete(c), u.close(); + }), c.packageJsonWatches = void 0); + } + }; + return c; + } + onWildCardDirectoryWatcherInvoke(t, n, i, s, o) { + const c = this.toPath(o), _ = i.cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(o, c); + if (Vc(c) === "package.json" && !AA(c) && (_ && _.fileExists || !_ && this.host.fileExists(o))) { + const m = this.getNormalizedAbsolutePath(o); + this.logger.info(`Config: ${n} Detected new package.json: ${m}`), this.packageJsonCache.addOrUpdate(m, c), this.watchPackageJsonFile(m, c, s); + } + _?.fileExists || this.sendSourceFileChange(c); + const u = this.findConfiguredProjectByProjectName(n); + eA({ + watchedDirPath: this.toPath(t), + fileOrDirectory: o, + fileOrDirectoryPath: c, + configFileName: n, + extraFileExtensions: this.hostConfiguration.extraFileExtensions, + currentDirectory: this.currentDirectory, + options: i.parsedCommandLine.options, + program: u?.getCurrentProgram() || i.parsedCommandLine.fileNames, + useCaseSensitiveFileNames: this.host.useCaseSensitiveFileNames, + writeLog: (m) => this.logger.info(m), + toPath: (m) => this.toPath(m), + getScriptKind: u ? (m) => u.getScriptKind(m) : void 0 + }) || (i.updateLevel !== 2 && (i.updateLevel = 1), i.projects.forEach((m, g) => { + var h; + if (!m) return; + const S = this.getConfiguredProjectByCanonicalConfigFilePath(g); + if (!S) return; + if (u !== S && this.getHostPreferences().includeCompletionsForModuleExports) { + const C = this.toPath(n); + Pn((h = S.getCurrentProgram()) == null ? void 0 : h.getResolvedProjectReferences(), (D) => D?.sourceFile.path === C) && S.markAutoImportProviderAsDirty(); + } + const T = u === S ? 1 : 0; + if (!(S.pendingUpdateLevel > T)) + if (this.openFiles.has(c)) + if (E.checkDefined(this.getScriptInfoForPath(c)).isAttached(S)) { + const D = Math.max( + T, + S.openFileWatchTriggered.get(c) || 0 + /* Update */ + ); + S.openFileWatchTriggered.set(c, D); + } else + S.pendingUpdateLevel = T, this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(S); + else + S.pendingUpdateLevel = T, this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(S); + })); + } + delayUpdateProjectsFromParsedConfigOnConfigFileChange(t, n) { + const i = this.configFileExistenceInfoCache.get(t); + if (!i?.config) return !1; + let s = !1; + return i.config.updateLevel = 2, i.config.cachedDirectoryStructureHost.clearCache(), i.config.projects.forEach((o, c) => { + var _, u, m; + const g = this.getConfiguredProjectByCanonicalConfigFilePath(c); + if (g) + if (s = !0, c === t) { + if (g.initialLoadPending) return; + g.pendingUpdateLevel = 2, g.pendingUpdateReason = n, this.delayUpdateProjectGraph(g), g.markAutoImportProviderAsDirty(); + } else { + if (g.initialLoadPending) { + (u = (_ = this.configFileExistenceInfoCache.get(c)) == null ? void 0 : _.openFilesImpactedByConfigFile) == null || u.forEach((S) => { + var T; + (T = this.pendingOpenFileProjectUpdates) != null && T.has(S) || (this.pendingOpenFileProjectUpdates ?? (this.pendingOpenFileProjectUpdates = /* @__PURE__ */ new Map())).set( + S, + this.configFileForOpenFiles.get(S) + ); + }); + return; + } + const h = this.toPath(t); + g.resolutionCache.removeResolutionsFromProjectReferenceRedirects(h), this.delayUpdateProjectGraph(g), this.getHostPreferences().includeCompletionsForModuleExports && Pn((m = g.getCurrentProgram()) == null ? void 0 : m.getResolvedProjectReferences(), (S) => S?.sourceFile.path === h) && g.markAutoImportProviderAsDirty(); + } + }), s; + } + onConfigFileChanged(t, n, i) { + const s = this.configFileExistenceInfoCache.get(n), o = this.getConfiguredProjectByCanonicalConfigFilePath(n), c = o?.deferredClose; + i === 2 ? (s.exists = !1, o && (o.deferredClose = !0)) : (s.exists = !0, c && (o.deferredClose = void 0, o.markAsDirty())), this.delayUpdateProjectsFromParsedConfigOnConfigFileChange( + n, + "Change in config file detected" + ), this.openFiles.forEach((_, u) => { + var m, g; + const h = this.configFileForOpenFiles.get(u); + if (!((m = s.openFilesImpactedByConfigFile) != null && m.has(u))) return; + this.configFileForOpenFiles.delete(u); + const S = this.getScriptInfoForPath(u); + this.getConfigFileNameForFile( + S, + /*findFromCacheOnly*/ + !1 + ) && ((g = this.pendingOpenFileProjectUpdates) != null && g.has(u) || (this.pendingOpenFileProjectUpdates ?? (this.pendingOpenFileProjectUpdates = /* @__PURE__ */ new Map())).set(u, h)); + }), this.delayEnsureProjectForOpenFiles(); + } + removeProject(t) { + switch (this.logger.info("`remove Project::"), t.print( + /*writeProjectFileNames*/ + !0, + /*writeFileExplaination*/ + !0, + /*writeFileVersionAndText*/ + !1 + ), t.close(), E.shouldAssert( + 1 + /* Normal */ + ) && this.filenameToScriptInfo.forEach( + (n) => E.assert( + !n.isAttached(t), + "Found script Info still attached to project", + () => `${t.projectName}: ScriptInfos still attached: ${JSON.stringify( + Ki( + Ty( + this.filenameToScriptInfo.values(), + (i) => i.isAttached(t) ? { + fileName: i.fileName, + projects: i.containingProjects.map((s) => s.projectName), + hasMixedContent: i.hasMixedContent + } : void 0 + ) + ), + /*replacer*/ + void 0, + " " + )}` + ) + ), this.pendingProjectUpdates.delete(t.getProjectName()), t.projectKind) { + case 2: + XT(this.externalProjects, t), this.projectToSizeMap.delete(t.getProjectName()); + break; + case 1: + this.configuredProjects.delete(t.canonicalConfigFilePath), this.projectToSizeMap.delete(t.canonicalConfigFilePath); + break; + case 0: + XT(this.inferredProjects, t); + break; + } + } + /** @internal */ + assignOrphanScriptInfoToInferredProject(t, n) { + E.assert(t.isOrphan()); + const i = this.getOrCreateInferredProjectForProjectRootPathIfEnabled(t, n) || this.getOrCreateSingleInferredProjectIfEnabled() || this.getOrCreateSingleInferredWithoutProjectRoot( + t.isDynamic ? n || this.currentDirectory : Hn( + q_(t.fileName) ? t.fileName : Xi( + t.fileName, + n ? this.getNormalizedAbsolutePath(n) : this.currentDirectory + ) + ) + ); + if (i.addRoot(t), t.containingProjects[0] !== i && ($E(t.containingProjects, i), t.containingProjects.unshift(i)), i.updateGraph(), !this.useSingleInferredProject && !i.projectRootPath) + for (const s of this.inferredProjects) { + if (s === i || s.isOrphan()) + continue; + const o = s.getRootScriptInfos(); + E.assert(o.length === 1 || !!s.projectRootPath), o.length === 1 && lr(o[0].containingProjects, (c) => c !== o[0].containingProjects[0] && !c.isOrphan()) && s.removeFile( + o[0], + /*fileExists*/ + !0, + /*detachFromProject*/ + !0 + ); + } + return i; + } + assignOrphanScriptInfosToInferredProject() { + this.openFiles.forEach((t, n) => { + const i = this.getScriptInfoForPath(n); + i.isOrphan() && this.assignOrphanScriptInfoToInferredProject(i, t); + }); + } + /** + * Remove this file from the set of open, non-configured files. + * @param info The file that has been closed or newly configured + */ + closeOpenFile(t, n) { + var i; + const s = t.isDynamic ? !1 : this.host.fileExists(t.fileName); + t.close(s), this.stopWatchingConfigFilesForScriptInfo(t); + const o = this.toCanonicalFileName(t.fileName); + this.openFilesWithNonRootedDiskPath.get(o) === t && this.openFilesWithNonRootedDiskPath.delete(o); + let c = !1; + for (const _ of t.containingProjects) { + if (H0(_)) { + t.hasMixedContent && t.registerFileUpdate(); + const u = _.openFileWatchTriggered.get(t.path); + u !== void 0 && (_.openFileWatchTriggered.delete(t.path), _.pendingUpdateLevel < u && (_.pendingUpdateLevel = u, _.markFileAsDirty(t.path))); + } else X6(_) && _.isRoot(t) && (_.isProjectWithSingleRoot() && (c = !0), _.removeFile( + t, + s, + /*detachFromProject*/ + !0 + )); + _.languageServiceEnabled || _.markAsDirty(); + } + return this.openFiles.delete(t.path), this.configFileForOpenFiles.delete(t.path), (i = this.pendingOpenFileProjectUpdates) == null || i.delete(t.path), E.assert(!this.rootOfInferredProjects.has(t)), !n && c && this.assignOrphanScriptInfosToInferredProject(), s ? this.watchClosedScriptInfo(t) : this.handleDeletedFile( + t, + /*deferredDelete*/ + !1 + ), c; + } + deleteScriptInfo(t) { + E.assert(!t.isScriptOpen()), this.filenameToScriptInfo.delete(t.path), this.filenameToScriptInfoVersion.set(t.path, t.textStorage.version), this.stopWatchingScriptInfo(t); + const n = t.getRealpathIfDifferent(); + n && this.realpathToScriptInfos.remove(n, t), t.closeSourceMapFileWatcher(); + } + configFileExists(t, n, i) { + const s = this.configFileExistenceInfoCache.get(n); + let o; + if (this.openFiles.has(i.path) && (!yG(i) || i.isForDefaultProject) && (s ? (s.openFilesImpactedByConfigFile ?? (s.openFilesImpactedByConfigFile = /* @__PURE__ */ new Set())).add(i.path) : (o = /* @__PURE__ */ new Set()).add(i.path)), s) return s.exists; + const c = this.host.fileExists(t); + return this.configFileExistenceInfoCache.set(n, { exists: c, openFilesImpactedByConfigFile: o }), c; + } + createConfigFileWatcherForParsedConfig(t, n, i) { + var s, o; + const c = this.configFileExistenceInfoCache.get(n); + (!c.watcher || c.watcher === j_e) && (c.watcher = this.watchFactory.watchFile( + t, + (_, u) => this.onConfigFileChanged(t, n, u), + 2e3, + this.getWatchOptionsFromProjectWatchOptions((o = (s = c?.config) == null ? void 0 : s.parsedCommandLine) == null ? void 0 : o.watchOptions, Hn(t)), + Dl.ConfigFile, + i + )), this.ensureConfigFileWatcherForProject(c, i); + } + ensureConfigFileWatcherForProject(t, n) { + const i = t.config.projects; + i.set(n.canonicalConfigFilePath, i.get(n.canonicalConfigFilePath) || !1); + } + /** @internal */ + releaseParsedConfig(t, n) { + var i, s, o; + const c = this.configFileExistenceInfoCache.get(t); + (i = c.config) != null && i.projects.delete(n.canonicalConfigFilePath) && ((s = c.config) != null && s.projects.size || (c.config = void 0, WW(t, this.sharedExtendedConfigFileWatchers), E.checkDefined(c.watcher), (o = c.openFilesImpactedByConfigFile) != null && o.size ? c.inferredProjectRoots ? oA(Hn(t)) || (c.watcher.close(), c.watcher = j_e) : (c.watcher.close(), c.watcher = void 0) : (c.watcher.close(), this.configFileExistenceInfoCache.delete(t)))); + } + /** + * This is called on file close or when its removed from inferred project as root, + * so that we handle the watches and inferred project root data + * @internal + */ + stopWatchingConfigFilesForScriptInfo(t) { + if (this.serverMode !== 0) return; + const n = this.rootOfInferredProjects.delete(t), i = t.isScriptOpen(); + i && !n || this.forEachConfigFileLocation(t, (s) => { + var o, c, _; + const u = this.configFileExistenceInfoCache.get(s); + if (u) { + if (i) { + if (!((o = u?.openFilesImpactedByConfigFile) != null && o.has(t.path))) return; + } else if (!((c = u.openFilesImpactedByConfigFile) != null && c.delete(t.path))) return; + n && (u.inferredProjectRoots--, u.watcher && !u.config && !u.inferredProjectRoots && (u.watcher.close(), u.watcher = void 0)), !((_ = u.openFilesImpactedByConfigFile) != null && _.size) && !u.config && (E.assert(!u.watcher), this.configFileExistenceInfoCache.delete(s)); + } + }); + } + /** + * This is called by inferred project whenever script info is added as a root + * + * @internal + */ + startWatchingConfigFilesForInferredProjectRoot(t) { + this.serverMode === 0 && (E.assert(t.isScriptOpen()), this.rootOfInferredProjects.add(t), this.forEachConfigFileLocation(t, (n, i) => { + let s = this.configFileExistenceInfoCache.get(n); + s ? s.inferredProjectRoots = (s.inferredProjectRoots ?? 0) + 1 : (s = { exists: this.host.fileExists(i), inferredProjectRoots: 1 }, this.configFileExistenceInfoCache.set(n, s)), (s.openFilesImpactedByConfigFile ?? (s.openFilesImpactedByConfigFile = /* @__PURE__ */ new Set())).add(t.path), s.watcher || (s.watcher = oA(Hn(n)) ? this.watchFactory.watchFile( + i, + (o, c) => this.onConfigFileChanged(i, n, c), + 2e3, + this.hostConfiguration.watchOptions, + Dl.ConfigFileForInferredRoot + ) : j_e); + })); + } + /** + * This function tries to search for a tsconfig.json for the given file. + * This is different from the method the compiler uses because + * the compiler can assume it will always start searching in the + * current directory (the directory in which tsc was invoked). + * The server must start searching from the directory containing + * the newly opened file. + */ + forEachConfigFileLocation(t, n) { + if (this.serverMode !== 0) + return; + E.assert(!Uwe(t) || this.openFiles.has(t.path)); + const i = this.openFiles.get(t.path); + if (E.checkDefined(this.getScriptInfo(t.path)).isDynamic) return; + let o = Hn(t.fileName); + const c = () => Zf(i, o, this.currentDirectory, !this.host.useCaseSensitiveFileNames), _ = !i || !c(); + let u = !0, m = !0; + yG(t) && (Eo(t.fileName, "tsconfig.json") ? u = !1 : u = m = !1); + do { + const g = $6(o, this.currentDirectory, this.toCanonicalFileName); + if (u) { + const S = Ln(o, "tsconfig.json"); + if (n(Ln(g, "tsconfig.json"), S)) return S; + } + if (m) { + const S = Ln(o, "jsconfig.json"); + if (n(Ln(g, "jsconfig.json"), S)) return S; + } + if (XI(g)) + break; + const h = Hn(o); + if (h === o) break; + o = h, u = m = !0; + } while (_ || c()); + } + /** @internal */ + findDefaultConfiguredProject(t) { + var n; + return (n = this.findDefaultConfiguredProjectWorker( + t, + 1 + /* Find */ + )) == null ? void 0 : n.defaultProject; + } + /** @internal */ + findDefaultConfiguredProjectWorker(t, n) { + return t.isScriptOpen() ? this.tryFindDefaultConfiguredProjectForOpenScriptInfo( + t, + n + ) : void 0; + } + /** Get cached configFileName for scriptInfo or ancestor of open script info */ + getConfigFileNameForFileFromCache(t, n) { + if (n) { + const i = Wwe(t, this.pendingOpenFileProjectUpdates); + if (i !== void 0) return i; + } + return Wwe(t, this.configFileForOpenFiles); + } + /** Caches the configFilename for script info or ancestor of open script info */ + setConfigFileNameForFileInCache(t, n) { + if (!this.openFiles.has(t.path)) return; + const i = n || !1; + if (!yG(t)) + this.configFileForOpenFiles.set(t.path, i); + else { + let s = this.configFileForOpenFiles.get(t.path); + (!s || rs(s)) && this.configFileForOpenFiles.set( + t.path, + s = (/* @__PURE__ */ new Map()).set(!1, s) + ), s.set(t.fileName, i); + } + } + /** + * This function tries to search for a tsconfig.json for the given file. + * This is different from the method the compiler uses because + * the compiler can assume it will always start searching in the + * current directory (the directory in which tsc was invoked). + * The server must start searching from the directory containing + * the newly opened file. + * If script info is passed in, it is asserted to be open script info + * otherwise just file name + * when findFromCacheOnly is true only looked up in cache instead of hitting disk to figure things out + * @internal + */ + getConfigFileNameForFile(t, n) { + const i = this.getConfigFileNameForFileFromCache(t, n); + if (i !== void 0) return i || void 0; + if (n) return; + const s = this.forEachConfigFileLocation(t, (o, c) => this.configFileExists(c, o, t)); + return this.logger.info(`getConfigFileNameForFile:: File: ${t.fileName} ProjectRootPath: ${this.openFiles.get(t.path)}:: Result: ${s}`), this.setConfigFileNameForFileInCache(t, s), s; + } + printProjects() { + this.logger.hasLevel( + 1 + /* normal */ + ) && (this.logger.startGroup(), this.externalProjects.forEach(Q_e), this.configuredProjects.forEach(Q_e), this.inferredProjects.forEach(Q_e), this.logger.info("Open files: "), this.openFiles.forEach((t, n) => { + const i = this.getScriptInfoForPath(n); + this.logger.info(` FileName: ${i.fileName} ProjectRootPath: ${t}`), this.logger.info(` Projects: ${i.containingProjects.map((s) => s.getProjectName())}`); + }), this.logger.endGroup()); + } + /** @internal */ + findConfiguredProjectByProjectName(t, n) { + const i = this.toCanonicalFileName(t), s = this.getConfiguredProjectByCanonicalConfigFilePath(i); + return n ? s : s?.deferredClose ? void 0 : s; + } + getConfiguredProjectByCanonicalConfigFilePath(t) { + return this.configuredProjects.get(t); + } + findExternalProjectByProjectName(t) { + return zwe(t, this.externalProjects); + } + /** Get a filename if the language service exceeds the maximum allowed program size; otherwise returns undefined. */ + getFilenameForExceededTotalSizeLimitForNonTsFiles(t, n, i, s) { + if (n && n.disableSizeLimit || !this.host.getFileSize) + return; + let o = nG; + this.projectToSizeMap.set(t, 0), this.projectToSizeMap.forEach((_) => o -= _ || 0); + let c = 0; + for (const _ of i) { + const u = s.getFileName(_); + if (!ES(u) && (c += this.host.getFileSize(u), c > nG || c > o)) { + const m = i.map((g) => s.getFileName(g)).filter((g) => !ES(g)).map((g) => ({ name: g, size: this.host.getFileSize(g) })).sort((g, h) => h.size - g.size).slice(0, 5); + return this.logger.info(`Non TS file size exceeded limit (${c}). Largest files: ${m.map((g) => `${g.name}:${g.size}`).join(", ")}`), u; + } + } + this.projectToSizeMap.set(t, c); + } + createExternalProject(t, n, i, s, o) { + const c = OL(i), _ = h8(i, Hn(Vl(t))), u = new rG( + t, + this, + c, + /*lastFileExceededProgramSize*/ + this.getFilenameForExceededTotalSizeLimitForNonTsFiles(t, c, n, hG), + i.compileOnSave === void 0 ? !0 : i.compileOnSave, + /*projectFilePath*/ + void 0, + _?.watchOptions + ); + return u.setProjectErrors(_?.errors), u.excludedFiles = o, this.addFilesToNonInferredProject(u, n, hG, s), this.externalProjects.push(u), u; + } + /** @internal */ + sendProjectTelemetry(t) { + if (this.seenProjects.has(t.projectName)) { + q_e(t); + return; + } + if (this.seenProjects.set(t.projectName, !0), !this.eventHandler || !this.host.createSHA256Hash) { + q_e(t); + return; + } + const n = H0(t) ? t.projectOptions : void 0; + q_e(t); + const i = { + projectId: this.host.createSHA256Hash(t.projectName), + fileStats: p8( + t.getScriptInfos(), + /*includeSizes*/ + !0 + ), + compilerOptions: Are(t.getCompilationSettings()), + typeAcquisition: o(t.getTypeAcquisition()), + extends: n && n.configHasExtendsProperty, + files: n && n.configHasFilesProperty, + include: n && n.configHasIncludeProperty, + exclude: n && n.configHasExcludeProperty, + compileOnSave: t.compileOnSaveEnabled, + configFileName: s(), + projectType: t instanceof rG ? "external" : "configured", + languageServiceEnabled: t.languageServiceEnabled, + version: Xf + }; + this.eventHandler({ eventName: uG, data: i }); + function s() { + return H0(t) && tG(t.getConfigFilePath()) || "other"; + } + function o({ enable: c, include: _, exclude: u }) { + return { + enable: c, + include: _ !== void 0 && _.length !== 0, + exclude: u !== void 0 && u.length !== 0 + }; + } + } + addFilesToNonInferredProject(t, n, i, s) { + this.updateNonInferredProjectFiles(t, n, i), t.setTypeAcquisition(s), t.markAsDirty(); + } + /** @internal */ + createConfiguredProject(t, n) { + var i; + (i = nn) == null || i.instant(nn.Phase.Session, "createConfiguredProject", { configFilePath: t }); + const s = this.toCanonicalFileName(t); + let o = this.configFileExistenceInfoCache.get(s); + o ? o.exists = !0 : this.configFileExistenceInfoCache.set(s, o = { exists: !0 }), o.config || (o.config = { + cachedDirectoryStructureHost: TO(this.host, this.host.getCurrentDirectory(), this.host.useCaseSensitiveFileNames), + projects: /* @__PURE__ */ new Map(), + updateLevel: 2 + /* Full */ + }); + const c = new F_e( + t, + s, + this, + o.config.cachedDirectoryStructureHost, + n + ); + return E.assert(!this.configuredProjects.has(s)), this.configuredProjects.set(s, c), this.createConfigFileWatcherForParsedConfig(t, s, c), c; + } + /** + * Read the config file of the project, and update the project root file names. + */ + loadConfiguredProject(t, n) { + var i, s; + (i = nn) == null || i.push(nn.Phase.Session, "loadConfiguredProject", { configFilePath: t.canonicalConfigFilePath }), this.sendProjectLoadingStartEvent(t, n); + const o = eo(t.getConfigFilePath()), c = this.ensureParsedConfigUptoDate( + o, + t.canonicalConfigFilePath, + this.configFileExistenceInfoCache.get(t.canonicalConfigFilePath), + t + ), _ = c.config.parsedCommandLine; + E.assert(!!_.fileNames); + const u = _.options; + t.projectOptions || (t.projectOptions = { + configHasExtendsProperty: _.raw.extends !== void 0, + configHasFilesProperty: _.raw.files !== void 0, + configHasIncludeProperty: _.raw.include !== void 0, + configHasExcludeProperty: _.raw.exclude !== void 0 + }), t.parsedCommandLine = _, t.setProjectErrors(_.options.configFile.parseDiagnostics), t.updateReferences(_.projectReferences); + const m = this.getFilenameForExceededTotalSizeLimitForNonTsFiles(t.canonicalConfigFilePath, u, _.fileNames, gG); + m ? (t.disableLanguageService(m), this.configFileExistenceInfoCache.forEach((h, S) => this.stopWatchingWildCards(S, t))) : (t.setCompilerOptions(u), t.setWatchOptions(_.watchOptions), t.enableLanguageService(), this.watchWildcards(o, c, t)), t.enablePluginsWithOptions(u); + const g = _.fileNames.concat(t.getExternalFiles( + 2 + /* Full */ + )); + this.updateRootAndOptionsOfNonInferredProject(t, g, gG, u, _.typeAcquisition, _.compileOnSave, _.watchOptions), (s = nn) == null || s.pop(); + } + /** @internal */ + ensureParsedConfigUptoDate(t, n, i, s) { + var o, c, _; + if (i.config && (i.config.updateLevel === 1 && this.reloadFileNamesOfParsedConfig(t, i.config), !i.config.updateLevel)) + return this.ensureConfigFileWatcherForProject(i, s), i; + if (!i.exists && i.config) + return i.config.updateLevel = void 0, this.ensureConfigFileWatcherForProject(i, s), i; + const u = ((o = i.config) == null ? void 0 : o.cachedDirectoryStructureHost) || TO(this.host, this.host.getCurrentDirectory(), this.host.useCaseSensitiveFileNames), m = ID(t, (D) => this.host.readFile(D)), g = PN(t, rs(m) ? m : ""), h = g.parseDiagnostics; + rs(m) || h.push(m); + const S = Hn(t), T = LN( + g, + u, + S, + /*existingOptions*/ + void 0, + t, + /*resolutionStack*/ + void 0, + this.hostConfiguration.extraFileExtensions, + this.extendedConfigCache + ); + T.errors.length && h.push(...T.errors), this.logger.info(`Config: ${t} : ${JSON.stringify( + { + rootNames: T.fileNames, + options: T.options, + watchOptions: T.watchOptions, + projectReferences: T.projectReferences + }, + /*replacer*/ + void 0, + " " + )}`); + const C = (c = i.config) == null ? void 0 : c.parsedCommandLine; + return i.config ? (i.config.parsedCommandLine = T, i.config.watchedDirectoriesStale = !0, i.config.updateLevel = void 0) : i.config = { parsedCommandLine: T, cachedDirectoryStructureHost: u, projects: /* @__PURE__ */ new Map() }, !C && !V5( + // Old options + this.getWatchOptionsFromProjectWatchOptions( + /*projectOptions*/ + void 0, + S + ), + // New options + this.getWatchOptionsFromProjectWatchOptions(T.watchOptions, S) + ) && ((_ = i.watcher) == null || _.close(), i.watcher = void 0), this.createConfigFileWatcherForParsedConfig(t, n, s), xO( + n, + T.options, + this.sharedExtendedConfigFileWatchers, + (D, w) => this.watchFactory.watchFile( + D, + () => { + var A; + kO(this.extendedConfigCache, w, (F) => this.toPath(F)); + let O = !1; + (A = this.sharedExtendedConfigFileWatchers.get(w)) == null || A.projects.forEach((F) => { + O = this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(F, `Change in extended config file ${D} detected`) || O; + }), O && this.delayEnsureProjectForOpenFiles(); + }, + 2e3, + this.hostConfiguration.watchOptions, + Dl.ExtendedConfigFile, + t + ), + (D) => this.toPath(D) + ), i; + } + /** @internal */ + watchWildcards(t, { exists: n, config: i }, s) { + if (i.projects.set(s.canonicalConfigFilePath, !0), n) { + if (i.watchedDirectories && !i.watchedDirectoriesStale) return; + i.watchedDirectoriesStale = !1, KN( + i.watchedDirectories || (i.watchedDirectories = /* @__PURE__ */ new Map()), + i.parsedCommandLine.wildcardDirectories, + // Create new directory watcher + (o, c) => this.watchWildcardDirectory(o, c, t, i) + ); + } else { + if (i.watchedDirectoriesStale = !1, !i.watchedDirectories) return; + P_(i.watchedDirectories, _p), i.watchedDirectories = void 0; + } + } + /** @internal */ + stopWatchingWildCards(t, n) { + const i = this.configFileExistenceInfoCache.get(t); + !i.config || !i.config.projects.get(n.canonicalConfigFilePath) || (i.config.projects.set(n.canonicalConfigFilePath, !1), !al(i.config.projects, lo) && (i.config.watchedDirectories && (P_(i.config.watchedDirectories, _p), i.config.watchedDirectories = void 0), i.config.watchedDirectoriesStale = void 0)); + } + updateNonInferredProjectFiles(t, n, i) { + var s; + const o = t.getRootFilesMap(), c = /* @__PURE__ */ new Map(); + for (const _ of n) { + const u = i.getFileName(_), m = eo(u), g = Nw(m); + let h; + if (!g && !t.fileExists(u)) { + h = $6(m, this.currentDirectory, this.toCanonicalFileName); + const S = o.get(h); + S ? (((s = S.info) == null ? void 0 : s.path) === h && (t.removeFile( + S.info, + /*fileExists*/ + !1, + /*detachFromProject*/ + !0 + ), S.info = void 0), S.fileName = m) : o.set(h, { fileName: m }); + } else { + const S = i.getScriptKind(_, this.hostConfiguration.extraFileExtensions), T = i.hasMixedContent(_, this.hostConfiguration.extraFileExtensions), C = E.checkDefined(this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath( + m, + t.currentDirectory, + S, + T, + t.directoryStructureHost, + /*deferredDeleteOk*/ + !1 + )); + h = C.path; + const D = o.get(h); + !D || D.info !== C ? (t.addRoot(C, m), C.isScriptOpen() && this.removeRootOfInferredProjectIfNowPartOfOtherProject(C)) : D.fileName = m; + } + c.set(h, !0); + } + o.size > c.size && o.forEach((_, u) => { + c.has(u) || (_.info ? t.removeFile( + _.info, + t.fileExists(_.info.fileName), + /*detachFromProject*/ + !0 + ) : o.delete(u)); + }); + } + updateRootAndOptionsOfNonInferredProject(t, n, i, s, o, c, _) { + t.setCompilerOptions(s), t.setWatchOptions(_), c !== void 0 && (t.compileOnSaveEnabled = c), this.addFilesToNonInferredProject(t, n, i, o); + } + /** + * Reload the file names from config file specs and update the project graph + * + * @internal + */ + reloadFileNamesOfConfiguredProject(t) { + const n = this.reloadFileNamesOfParsedConfig(t.getConfigFilePath(), this.configFileExistenceInfoCache.get(t.canonicalConfigFilePath).config); + return t.updateErrorOnNoInputFiles(n), this.updateNonInferredProjectFiles( + t, + n.fileNames.concat(t.getExternalFiles( + 1 + /* RootNamesAndUpdate */ + )), + gG + ), t.markAsDirty(), t.updateGraph(); + } + reloadFileNamesOfParsedConfig(t, n) { + if (n.updateLevel === void 0) return n.parsedCommandLine; + E.assert( + n.updateLevel === 1 + /* RootNamesAndUpdate */ + ); + const i = n.parsedCommandLine.options.configFile.configFileSpecs, s = FD( + i, + Hn(t), + n.parsedCommandLine.options, + n.cachedDirectoryStructureHost, + this.hostConfiguration.extraFileExtensions + ); + return n.parsedCommandLine = { ...n.parsedCommandLine, fileNames: s }, n.updateLevel = void 0, n.parsedCommandLine; + } + /** @internal */ + setFileNamesOfAutoImportProviderOrAuxillaryProject(t, n) { + this.updateNonInferredProjectFiles(t, n, gG); + } + /** @internal */ + reloadConfiguredProjectOptimized(t, n, i) { + i.has(t) || (i.set( + t, + 6 + /* ReloadOptimized */ + ), t.initialLoadPending || this.setProjectForReload(t, 2, n)); + } + /** @internal */ + reloadConfiguredProjectClearingSemanticCache(t, n, i) { + return i.get(t) === 7 ? !1 : (i.set( + t, + 7 + /* Reload */ + ), this.clearSemanticCache(t), this.reloadConfiguredProject(t, bG(n)), !0); + } + setProjectForReload(t, n, i) { + n === 2 && this.clearSemanticCache(t), t.pendingUpdateReason = i && bG(i), t.pendingUpdateLevel = n; + } + /** + * Read the config file of the project again by clearing the cache and update the project graph + * + * @internal + */ + reloadConfiguredProject(t, n) { + t.initialLoadPending = !1, this.setProjectForReload( + t, + 0 + /* Update */ + ), this.loadConfiguredProject(t, n), Xwe( + t, + t.triggerFileForConfigFileDiag ?? t.getConfigFilePath(), + /*isReload*/ + !0 + ); + } + clearSemanticCache(t) { + t.originalConfiguredProjects = void 0, t.resolutionCache.clear(), t.getLanguageService( + /*ensureSynchronized*/ + !1 + ).cleanupSemanticCache(), t.cleanupProgram(), t.markAsDirty(); + } + /** @internal */ + sendConfigFileDiagEvent(t, n, i) { + if (!this.eventHandler || this.suppressDiagnosticEvents) return !1; + const s = t.getLanguageService().getCompilerOptionsDiagnostics(); + return s.push(...t.getAllProjectErrors()), !i && s.length === (t.configDiagDiagnosticsReported ?? 0) ? !1 : (t.configDiagDiagnosticsReported = s.length, this.eventHandler( + { + eventName: cG, + data: { configFileName: t.getConfigFilePath(), diagnostics: s, triggerFile: n ?? t.getConfigFilePath() } + } + ), !0); + } + getOrCreateInferredProjectForProjectRootPathIfEnabled(t, n) { + if (!this.useInferredProjectPerProjectRoot || // Its a dynamic info opened without project root + t.isDynamic && n === void 0) + return; + if (n) { + const s = this.toCanonicalFileName(n); + for (const o of this.inferredProjects) + if (o.projectRootPath === s) + return o; + return this.createInferredProject( + n, + /*isSingleInferredProject*/ + !1, + n + ); + } + let i; + for (const s of this.inferredProjects) + s.projectRootPath && Zf(s.projectRootPath, t.path, this.host.getCurrentDirectory(), !this.host.useCaseSensitiveFileNames) && (i && i.projectRootPath.length > s.projectRootPath.length || (i = s)); + return i; + } + getOrCreateSingleInferredProjectIfEnabled() { + if (this.useSingleInferredProject) + return this.inferredProjects.length > 0 && this.inferredProjects[0].projectRootPath === void 0 ? this.inferredProjects[0] : this.createInferredProject( + this.currentDirectory, + /*isSingleInferredProject*/ + !0, + /*projectRootPath*/ + void 0 + ); + } + getOrCreateSingleInferredWithoutProjectRoot(t) { + E.assert(!this.useSingleInferredProject); + const n = this.toCanonicalFileName(this.getNormalizedAbsolutePath(t)); + for (const i of this.inferredProjects) + if (!i.projectRootPath && i.isOrphan() && i.canonicalCurrentDirectory === n) + return i; + return this.createInferredProject( + t, + /*isSingleInferredProject*/ + !1, + /*projectRootPath*/ + void 0 + ); + } + createInferredProject(t, n, i) { + const s = i && this.compilerOptionsForInferredProjectsPerProjectRoot.get(i) || this.compilerOptionsForInferredProjects; + let o, c; + i && (o = this.watchOptionsForInferredProjectsPerProjectRoot.get(i), c = this.typeAcquisitionForInferredProjectsPerProjectRoot.get(i)), o === void 0 && (o = this.watchOptionsForInferredProjects), c === void 0 && (c = this.typeAcquisitionForInferredProjects), o = o || void 0; + const _ = new P_e( + this, + s, + o?.watchOptions, + i, + t, + c + ); + return _.setProjectErrors(o?.errors), n ? this.inferredProjects.unshift(_) : this.inferredProjects.push(_), _; + } + /** @internal */ + getOrCreateScriptInfoNotOpenedByClient(t, n, i, s) { + return this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath( + eo(t), + n, + /*scriptKind*/ + void 0, + /*hasMixedContent*/ + void 0, + i, + s + ); + } + getScriptInfo(t) { + return this.getScriptInfoForNormalizedPath(eo(t)); + } + /** @internal */ + getScriptInfoOrConfig(t) { + const n = eo(t), i = this.getScriptInfoForNormalizedPath(n); + if (i) return i; + const s = this.configuredProjects.get(this.toPath(t)); + return s && s.getCompilerOptions().configFile; + } + /** @internal */ + logErrorForScriptInfoNotFound(t) { + const n = Ki( + Ty( + this.filenameToScriptInfo.entries(), + (i) => i[1].deferredDelete ? void 0 : i + ), + ([i, s]) => ({ path: i, fileName: s.fileName }) + ); + this.logger.msg( + `Could not find file ${JSON.stringify(t)}. +All files are: ${JSON.stringify(n)}`, + "Err" + /* Err */ + ); + } + /** + * Returns the projects that contain script info through SymLink + * Note that this does not return projects in info.containingProjects + * + * @internal + */ + getSymlinkedProjects(t) { + let n; + if (this.realpathToScriptInfos) { + const s = t.getRealpathIfDifferent(); + s && lr(this.realpathToScriptInfos.get(s), i), lr(this.realpathToScriptInfos.get(t.path), i); + } + return n; + function i(s) { + if (s !== t) + for (const o of s.containingProjects) + o.languageServiceEnabled && !o.isOrphan() && !o.getCompilerOptions().preserveSymlinks && !t.isAttached(o) && (n ? al(n, (c, _) => _ === s.path ? !1 : as(c, o)) || n.add(s.path, o) : (n = wp(), n.add(s.path, o))); + } + } + watchClosedScriptInfo(t) { + if (E.assert(!t.fileWatcher), !t.isDynamicOrHasMixedContent() && (!this.globalCacheLocationDirectoryPath || !Vi(t.path, this.globalCacheLocationDirectoryPath))) { + const n = t.fileName.indexOf("/node_modules/"); + !this.host.getModifiedTime || n === -1 ? t.fileWatcher = this.watchFactory.watchFile( + t.fileName, + (i, s) => this.onSourceFileChanged(t, s), + 500, + this.hostConfiguration.watchOptions, + Dl.ClosedScriptInfo + ) : (t.mTime = this.getModifiedTime(t), t.fileWatcher = this.watchClosedScriptInfoInNodeModules(t.fileName.substring(0, n))); + } + } + createNodeModulesWatcher(t, n) { + let i = this.watchFactory.watchDirectory( + t, + (o) => { + var c; + const _ = jO(this.toPath(o)); + if (!_) return; + const u = Vc(_); + if ((c = s.affectedModuleSpecifierCacheProjects) != null && c.size && (u === "package.json" || u === "node_modules") && s.affectedModuleSpecifierCacheProjects.forEach((m) => { + var g; + (g = m.getModuleSpecifierCache()) == null || g.clear(); + }), s.refreshScriptInfoRefCount) + if (n === _) + this.refreshScriptInfosInDirectory(n); + else { + const m = this.filenameToScriptInfo.get(_); + m ? W_e(m) && this.refreshScriptInfo(m) : _C(_) || this.refreshScriptInfosInDirectory(_); + } + }, + 1, + this.hostConfiguration.watchOptions, + Dl.NodeModules + ); + const s = { + refreshScriptInfoRefCount: 0, + affectedModuleSpecifierCacheProjects: void 0, + close: () => { + var o; + i && !s.refreshScriptInfoRefCount && !((o = s.affectedModuleSpecifierCacheProjects) != null && o.size) && (i.close(), i = void 0, this.nodeModulesWatchers.delete(n)); + } + }; + return this.nodeModulesWatchers.set(n, s), s; + } + /** @internal */ + watchPackageJsonsInNodeModules(t, n) { + var i; + const s = this.toPath(t), o = this.nodeModulesWatchers.get(s) || this.createNodeModulesWatcher(t, s); + return E.assert(!((i = o.affectedModuleSpecifierCacheProjects) != null && i.has(n))), (o.affectedModuleSpecifierCacheProjects || (o.affectedModuleSpecifierCacheProjects = /* @__PURE__ */ new Set())).add(n), { + close: () => { + var c; + (c = o.affectedModuleSpecifierCacheProjects) == null || c.delete(n), o.close(); + } + }; + } + watchClosedScriptInfoInNodeModules(t) { + const n = t + "/node_modules", i = this.toPath(n), s = this.nodeModulesWatchers.get(i) || this.createNodeModulesWatcher(n, i); + return s.refreshScriptInfoRefCount++, { + close: () => { + s.refreshScriptInfoRefCount--, s.close(); + } + }; + } + getModifiedTime(t) { + return (this.host.getModifiedTime(t.fileName) || V_).getTime(); + } + refreshScriptInfo(t) { + const n = this.getModifiedTime(t); + if (n !== t.mTime) { + const i = sj(t.mTime, n); + t.mTime = n, this.onSourceFileChanged(t, i); + } + } + refreshScriptInfosInDirectory(t) { + t = t + jo, this.filenameToScriptInfo.forEach((n) => { + W_e(n) && Vi(n.path, t) && this.refreshScriptInfo(n); + }); + } + stopWatchingScriptInfo(t) { + t.fileWatcher && (t.fileWatcher.close(), t.fileWatcher = void 0); + } + getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(t, n, i, s, o, c) { + if (q_(t) || Nw(t)) + return this.getOrCreateScriptInfoWorker( + t, + n, + /*openedByClient*/ + !1, + /*fileContent*/ + void 0, + i, + !!s, + o, + c + ); + const _ = this.openFilesWithNonRootedDiskPath.get(this.toCanonicalFileName(t)); + if (_) + return _; + } + getOrCreateScriptInfoForNormalizedPath(t, n, i, s, o, c) { + return this.getOrCreateScriptInfoWorker( + t, + this.currentDirectory, + n, + i, + s, + !!o, + c, + /*deferredDeleteOk*/ + !1 + ); + } + getOrCreateScriptInfoWorker(t, n, i, s, o, c, _, u) { + E.assert(s === void 0 || i, "ScriptInfo needs to be opened by client to be able to set its user defined content"); + const m = $6(t, n, this.toCanonicalFileName); + let g = this.filenameToScriptInfo.get(m); + if (g) { + if (g.deferredDelete) { + if (E.assert(!g.isDynamic), !i && !(_ || this.host).fileExists(t)) + return u ? g : void 0; + g.deferredDelete = void 0; + } + } else { + const h = Nw(t); + if (E.assert(q_(t) || h || i, "", () => `${JSON.stringify({ fileName: t, currentDirectory: n, hostCurrentDirectory: this.currentDirectory, openKeys: Ki(this.openFilesWithNonRootedDiskPath.keys()) })} +Script info with non-dynamic relative file name can only be open script info or in context of host currentDirectory`), E.assert(!q_(t) || this.currentDirectory === n || !this.openFilesWithNonRootedDiskPath.has(this.toCanonicalFileName(t)), "", () => `${JSON.stringify({ fileName: t, currentDirectory: n, hostCurrentDirectory: this.currentDirectory, openKeys: Ki(this.openFilesWithNonRootedDiskPath.keys()) })} +Open script files with non rooted disk path opened with current directory context cannot have same canonical names`), E.assert(!h || this.currentDirectory === n || this.useInferredProjectPerProjectRoot, "", () => `${JSON.stringify({ fileName: t, currentDirectory: n, hostCurrentDirectory: this.currentDirectory, openKeys: Ki(this.openFilesWithNonRootedDiskPath.keys()) })} +Dynamic files must always be opened with service's current directory or service should support inferred project per projectRootPath.`), !i && !h && !(_ || this.host).fileExists(t)) + return; + g = new T_e(this.host, t, o, c, m, this.filenameToScriptInfoVersion.get(m)), this.filenameToScriptInfo.set(g.path, g), this.filenameToScriptInfoVersion.delete(g.path), i ? !q_(t) && (!h || this.currentDirectory !== n) && this.openFilesWithNonRootedDiskPath.set(this.toCanonicalFileName(t), g) : this.watchClosedScriptInfo(g); + } + return i && (this.stopWatchingScriptInfo(g), g.open(s), c && g.registerFileUpdate()), g; + } + /** + * This gets the script info for the normalized path. If the path is not rooted disk path then the open script info with project root context is preferred + */ + getScriptInfoForNormalizedPath(t) { + return !q_(t) && this.openFilesWithNonRootedDiskPath.get(this.toCanonicalFileName(t)) || this.getScriptInfoForPath($6(t, this.currentDirectory, this.toCanonicalFileName)); + } + getScriptInfoForPath(t) { + const n = this.filenameToScriptInfo.get(t); + return !n || !n.deferredDelete ? n : void 0; + } + /** @internal */ + getDocumentPositionMapper(t, n, i) { + const s = this.getOrCreateScriptInfoNotOpenedByClient( + n, + t.currentDirectory, + this.host, + /*deferredDeleteOk*/ + !1 + ); + if (!s) { + i && t.addGeneratedFileWatch(n, i); + return; + } + if (s.getSnapshot(), rs(s.sourceMapFilePath)) { + const m = this.getScriptInfoForPath(s.sourceMapFilePath); + if (m && (m.getSnapshot(), m.documentPositionMapper !== void 0)) + return m.sourceInfos = this.addSourceInfoToSourceMap(i, t, m.sourceInfos), m.documentPositionMapper ? m.documentPositionMapper : void 0; + s.sourceMapFilePath = void 0; + } else if (s.sourceMapFilePath) { + s.sourceMapFilePath.sourceInfos = this.addSourceInfoToSourceMap(i, t, s.sourceMapFilePath.sourceInfos); + return; + } else if (s.sourceMapFilePath !== void 0) + return; + let o, c = (m, g) => { + const h = this.getOrCreateScriptInfoNotOpenedByClient( + m, + t.currentDirectory, + this.host, + /*deferredDeleteOk*/ + !0 + ); + if (o = h || g, !h || h.deferredDelete) return; + const S = h.getSnapshot(); + return h.documentPositionMapper !== void 0 ? h.documentPositionMapper : uk(S); + }; + const _ = t.projectName, u = fq( + { getCanonicalFileName: this.toCanonicalFileName, log: (m) => this.logger.info(m), getSourceFileLike: (m) => this.getSourceFileLike(m, _, s) }, + s.fileName, + s.textStorage.getLineInfo(), + c + ); + return c = void 0, o ? rs(o) ? s.sourceMapFilePath = { + watcher: this.addMissingSourceMapFile( + t.currentDirectory === this.currentDirectory ? o : Xi(o, t.currentDirectory), + s.path + ), + sourceInfos: this.addSourceInfoToSourceMap(i, t) + } : (s.sourceMapFilePath = o.path, o.declarationInfoPath = s.path, o.deferredDelete || (o.documentPositionMapper = u || !1), o.sourceInfos = this.addSourceInfoToSourceMap(i, t, o.sourceInfos)) : s.sourceMapFilePath = !1, u; + } + addSourceInfoToSourceMap(t, n, i) { + if (t) { + const s = this.getOrCreateScriptInfoNotOpenedByClient( + t, + n.currentDirectory, + n.directoryStructureHost, + /*deferredDeleteOk*/ + !1 + ); + (i || (i = /* @__PURE__ */ new Set())).add(s.path); + } + return i; + } + addMissingSourceMapFile(t, n) { + return this.watchFactory.watchFile( + t, + () => { + const s = this.getScriptInfoForPath(n); + s && s.sourceMapFilePath && !rs(s.sourceMapFilePath) && (this.delayUpdateProjectGraphs( + s.containingProjects, + /*clearSourceMapperCache*/ + !0 + ), this.delayUpdateSourceInfoProjects(s.sourceMapFilePath.sourceInfos), s.closeSourceMapFileWatcher()); + }, + 2e3, + this.hostConfiguration.watchOptions, + Dl.MissingSourceMapFile + ); + } + /** @internal */ + getSourceFileLike(t, n, i) { + const s = n.projectName ? n : this.findProject(n); + if (s) { + const c = s.toPath(t), _ = s.getSourceFile(c); + if (_ && _.resolvedPath === c) return _; + } + const o = this.getOrCreateScriptInfoNotOpenedByClient( + t, + (s || this).currentDirectory, + s ? s.directoryStructureHost : this.host, + /*deferredDeleteOk*/ + !1 + ); + if (o) { + if (i && rs(i.sourceMapFilePath) && o !== i) { + const c = this.getScriptInfoForPath(i.sourceMapFilePath); + c && (c.sourceInfos ?? (c.sourceInfos = /* @__PURE__ */ new Set())).add(o.path); + } + return o.cacheSourceFile ? o.cacheSourceFile.sourceFile : (o.sourceFileLike || (o.sourceFileLike = { + get text() { + return E.fail("shouldnt need text"), ""; + }, + getLineAndCharacterOfPosition: (c) => { + const _ = o.positionToLineOffset(c); + return { line: _.line - 1, character: _.offset - 1 }; + }, + getPositionOfLineAndCharacter: (c, _, u) => o.lineOffsetToPosition(c + 1, _ + 1, u) + }), o.sourceFileLike); + } + } + /** @internal */ + setPerformanceEventHandler(t) { + this.performanceEventHandler = t; + } + setHostConfiguration(t) { + var n; + if (t.file) { + const i = this.getScriptInfoForNormalizedPath(eo(t.file)); + i && (i.setOptions(Q6(t.formatOptions), t.preferences), this.logger.info(`Host configuration update for file ${t.file}`)); + } else { + if (t.hostInfo !== void 0 && (this.hostConfiguration.hostInfo = t.hostInfo, this.logger.info(`Host information ${t.hostInfo}`)), t.formatOptions && (this.hostConfiguration.formatCodeOptions = { ...this.hostConfiguration.formatCodeOptions, ...Q6(t.formatOptions) }, this.logger.info("Format host information updated")), t.preferences) { + const { + lazyConfiguredProjectsFromExternalProject: i, + includePackageJsonAutoImports: s, + includeCompletionsForModuleExports: o + } = this.hostConfiguration.preferences; + this.hostConfiguration.preferences = { ...this.hostConfiguration.preferences, ...t.preferences }, i && !this.hostConfiguration.preferences.lazyConfiguredProjectsFromExternalProject && this.externalProjectToConfiguredProjectMap.forEach( + (c) => c.forEach((_) => { + !_.deferredClose && !_.isClosed() && _.pendingUpdateLevel === 2 && !this.hasPendingProjectUpdate(_) && _.updateGraph(); + }) + ), (s !== t.preferences.includePackageJsonAutoImports || !!o != !!t.preferences.includeCompletionsForModuleExports) && this.forEachProject((c) => { + c.onAutoImportProviderSettingsChanged(); + }); + } + if (t.extraFileExtensions && (this.hostConfiguration.extraFileExtensions = t.extraFileExtensions, this.reloadProjects(), this.logger.info("Host file extension mappings updated")), t.watchOptions) { + const i = (n = h8(t.watchOptions)) == null ? void 0 : n.watchOptions, s = qF(i, this.currentDirectory); + this.hostConfiguration.watchOptions = s, this.hostConfiguration.beforeSubstitution = s === i ? void 0 : i, this.logger.info(`Host watch options changed to ${JSON.stringify(this.hostConfiguration.watchOptions)}, it will be take effect for next watches.`); + } + } + } + /** @internal */ + getWatchOptions(t) { + return this.getWatchOptionsFromProjectWatchOptions(t.getWatchOptions(), t.getCurrentDirectory()); + } + getWatchOptionsFromProjectWatchOptions(t, n) { + const i = this.hostConfiguration.beforeSubstitution ? qF( + this.hostConfiguration.beforeSubstitution, + n + ) : this.hostConfiguration.watchOptions; + return t && i ? { ...i, ...t } : t || i; + } + closeLog() { + this.logger.close(); + } + sendSourceFileChange(t) { + this.filenameToScriptInfo.forEach((n) => { + if (this.openFiles.has(n.path) || !n.fileWatcher) return; + const i = Iu( + () => this.host.fileExists(n.fileName) ? n.deferredDelete ? 0 : 1 : 2 + /* Deleted */ + ); + if (t) { + if (W_e(n) || !n.path.startsWith(t) || i() === 2 && n.deferredDelete) return; + this.logger.info(`Invoking sourceFileChange on ${n.fileName}:: ${i()}`); + } + this.onSourceFileChanged( + n, + i() + ); + }); + } + /** + * This function rebuilds the project for every file opened by the client + * This does not reload contents of open files from disk. But we could do that if needed + */ + reloadProjects() { + this.logger.info("reload projects."), this.sendSourceFileChange( + /*inPath*/ + void 0 + ), this.pendingProjectUpdates.forEach((i, s) => { + this.throttledOperations.cancel(s), this.pendingProjectUpdates.delete(s); + }), this.throttledOperations.cancel(Bwe), this.pendingOpenFileProjectUpdates = void 0, this.pendingEnsureProjectForOpenFiles = !1, this.configFileExistenceInfoCache.forEach((i) => { + i.config && (i.config.updateLevel = 2, i.config.cachedDirectoryStructureHost.clearCache()); + }), this.configFileForOpenFiles.clear(), this.externalProjects.forEach((i) => { + this.clearSemanticCache(i), i.updateGraph(); + }); + const t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(); + this.externalProjectToConfiguredProjectMap.forEach((i, s) => { + const o = `Reloading configured project in external project: ${s}`; + i.forEach((c) => { + this.getHostPreferences().lazyConfiguredProjectsFromExternalProject ? this.reloadConfiguredProjectOptimized(c, o, t) : this.reloadConfiguredProjectClearingSemanticCache( + c, + o, + t + ); + }); + }), this.openFiles.forEach((i, s) => { + const o = this.getScriptInfoForPath(s); + Pn(o.containingProjects, d8) || this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo( + o, + 7, + t, + n + ); + }), n.forEach((i) => t.set( + i, + 7 + /* Reload */ + )), this.inferredProjects.forEach((i) => this.clearSemanticCache(i)), this.ensureProjectForOpenFiles(), this.cleanupProjectsAndScriptInfos( + t, + new Set(this.openFiles.keys()), + new Set(this.externalProjectToConfiguredProjectMap.keys()) + ), this.logger.info("After reloading projects.."), this.printProjects(); + } + /** + * Remove the root of inferred project if script info is part of another project + */ + removeRootOfInferredProjectIfNowPartOfOtherProject(t) { + E.assert(t.containingProjects.length > 0); + const n = t.containingProjects[0]; + !n.isOrphan() && X6(n) && n.isRoot(t) && lr(t.containingProjects, (i) => i !== n && !i.isOrphan()) && n.removeFile( + t, + /*fileExists*/ + !0, + /*detachFromProject*/ + !0 + ); + } + /** + * This function is to update the project structure for every inferred project. + * It is called on the premise that all the configured projects are + * up to date. + * This will go through open files and assign them to inferred project if open file is not part of any other project + * After that all the inferred project graphs are updated + */ + ensureProjectForOpenFiles() { + this.logger.info("Before ensureProjectForOpenFiles:"), this.printProjects(); + const t = this.pendingOpenFileProjectUpdates; + this.pendingOpenFileProjectUpdates = void 0, t?.forEach( + (n, i) => this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo( + this.getScriptInfoForPath(i), + 5 + /* Create */ + ) + ), this.openFiles.forEach((n, i) => { + const s = this.getScriptInfoForPath(i); + s.isOrphan() ? this.assignOrphanScriptInfoToInferredProject(s, n) : this.removeRootOfInferredProjectIfNowPartOfOtherProject(s); + }), this.pendingEnsureProjectForOpenFiles = !1, this.inferredProjects.forEach(Up), this.logger.info("After ensureProjectForOpenFiles:"), this.printProjects(); + } + /** + * Open file whose contents is managed by the client + * @param filename is absolute pathname + * @param fileContent is a known version of the file content that is more up to date than the one on disk + */ + openClientFile(t, n, i, s) { + return this.openClientFileWithNormalizedPath( + eo(t), + n, + i, + /*hasMixedContent*/ + !1, + s ? eo(s) : void 0 + ); + } + /** @internal */ + getOriginalLocationEnsuringConfiguredProject(t, n) { + const i = t.isSourceOfProjectReferenceRedirect(n.fileName), s = i ? n : t.getSourceMapper().tryGetSourcePosition(n); + if (!s) return; + const { fileName: o } = s, c = this.getScriptInfo(o); + if (!c && !this.host.fileExists(o)) return; + const _ = { fileName: eo(o), path: this.toPath(o) }, u = this.getConfigFileNameForFile( + _, + /*findFromCacheOnly*/ + !1 + ); + if (!u) return; + let m = this.findConfiguredProjectByProjectName(u); + if (!m) { + if (t.getCompilerOptions().disableReferencedProjectLoad) + return i ? n : c?.containingProjects.length ? s : n; + m = this.createConfiguredProject(u, `Creating project for original file: ${_.fileName}${n !== s ? " for location: " + n.fileName : ""}`); + } + const g = this.tryFindDefaultConfiguredProjectForOpenScriptInfoOrClosedFileInfo( + _, + 5, + J_e( + m, + 4 + /* CreateOptimized */ + ), + (T) => `Creating project referenced in solution ${T.projectName} to find possible configured project for original file: ${_.fileName}${n !== s ? " for location: " + n.fileName : ""}` + ); + if (!g.defaultProject) return; + if (g.defaultProject === t) return s; + S(g.defaultProject); + const h = this.getScriptInfo(o); + if (!h || !h.containingProjects.length) return; + return h.containingProjects.forEach((T) => { + H0(T) && S(T); + }), s; + function S(T) { + (t.originalConfiguredProjects ?? (t.originalConfiguredProjects = /* @__PURE__ */ new Set())).add(T.canonicalConfigFilePath); + } + } + /** @internal */ + fileExists(t) { + return !!this.getScriptInfoForNormalizedPath(t) || this.host.fileExists(t); + } + findExternalProjectContainingOpenScriptInfo(t) { + return Pn(this.externalProjects, (n) => (Up(n), n.containsScriptInfo(t))); + } + getOrCreateOpenScriptInfo(t, n, i, s, o) { + const c = this.getOrCreateScriptInfoWorker( + t, + o ? this.getNormalizedAbsolutePath(o) : this.currentDirectory, + /*openedByClient*/ + !0, + n, + i, + !!s, + /*hostToQueryFileExistsOn*/ + void 0, + /*deferredDeleteOk*/ + !0 + ); + return this.openFiles.set(c.path, o), c; + } + assignProjectToOpenedScriptInfo(t) { + let n, i; + const s = this.findExternalProjectContainingOpenScriptInfo(t); + let o, c; + if (!s && this.serverMode === 0) { + const _ = this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo( + t, + 5 + /* Create */ + ); + _ && (o = _.seenProjects, c = _.sentConfigDiag, _.defaultProject && (n = _.defaultProject.getConfigFilePath(), i = _.defaultProject.getAllProjectErrors())); + } + return t.containingProjects.forEach(Up), t.isOrphan() && (o?.forEach((_, u) => { + _ !== 4 && !c.has(u) && this.sendConfigFileDiagEvent( + u, + t.fileName, + /*force*/ + !0 + ); + }), E.assert(this.openFiles.has(t.path)), this.assignOrphanScriptInfoToInferredProject(t, this.openFiles.get(t.path))), E.assert(!t.isOrphan()), { configFileName: n, configFileErrors: i, retainProjects: o }; + } + /** + * Depending on kind + * - Find the configuedProject and return it - if allowDeferredClosed is set it will find the deferredClosed project as well + * - Create - if the project doesnt exist, it creates one as well. If not delayLoad, the project is updated (with triggerFile if passed) + * - Reload - if the project doesnt exist, it creates one. If not delayLoad, the project is reloaded clearing semantic cache + * @internal + */ + findCreateOrReloadConfiguredProject(t, n, i, s, o, c, _, u, m) { + let g = m ?? this.findConfiguredProjectByProjectName(t, s), h = !1, S; + switch (n) { + case 0: + case 1: + case 3: + if (!g) return; + break; + case 2: + if (!g) return; + S = uKe(g); + break; + case 4: + case 5: + g ?? (g = this.createConfiguredProject(t, i)), _ || ({ sentConfigFileDiag: h, configFileExistenceInfo: S } = J_e( + g, + n, + o + )); + break; + case 6: + if (g ?? (g = this.createConfiguredProject(t, bG(i))), g.projectService.reloadConfiguredProjectOptimized(g, i, c), S = U_e(g), S) break; + // falls through + case 7: + g ?? (g = this.createConfiguredProject(t, bG(i))), h = !u && this.reloadConfiguredProjectClearingSemanticCache(g, i, c), u && !u.has(g) && !c.has(g) && (this.setProjectForReload(g, 2, i), u.add(g)); + break; + default: + E.assertNever(n); + } + return { project: g, sentConfigFileDiag: h, configFileExistenceInfo: S, reason: i }; + } + /** + * Finds the default configured project for given info + * For any tsconfig found, it looks into that project, if not then all its references, + * The search happens for all tsconfigs till projectRootPath + */ + tryFindDefaultConfiguredProjectForOpenScriptInfo(t, n, i, s) { + const o = this.getConfigFileNameForFile( + t, + n <= 3 + /* CreateReplay */ + ); + if (!o) return; + const c = Vwe(n), _ = this.findCreateOrReloadConfiguredProject( + o, + c, + _Ke(t), + i, + t.fileName, + s + ); + return _ && this.tryFindDefaultConfiguredProjectForOpenScriptInfoOrClosedFileInfo( + t, + n, + _, + (u) => `Creating project referenced in solution ${u.projectName} to find possible configured project for ${t.fileName} to open`, + i, + s + ); + } + isMatchedByConfig(t, n, i) { + if (n.fileNames.some((u) => this.toPath(u) === i.path)) return !0; + if (TJ( + i.fileName, + n.options, + this.hostConfiguration.extraFileExtensions + )) return !1; + const { validatedFilesSpec: s, validatedIncludeSpecs: o, validatedExcludeSpecs: c } = n.options.configFile.configFileSpecs, _ = eo(Xi(Hn(t), this.currentDirectory)); + return s?.some((u) => this.toPath(Xi(u, _)) === i.path) ? !0 : !o?.length || XF( + i.fileName, + c, + this.host.useCaseSensitiveFileNames, + this.currentDirectory, + _ + ) ? !1 : o?.some((u) => { + const m = yJ(u, _, "files"); + return !!m && A0(`(${m})$`, this.host.useCaseSensitiveFileNames).test(i.fileName); + }); + } + tryFindDefaultConfiguredProjectForOpenScriptInfoOrClosedFileInfo(t, n, i, s, o, c) { + const _ = Uwe(t), u = Vwe(n), m = /* @__PURE__ */ new Map(); + let g; + const h = /* @__PURE__ */ new Set(); + let S, T, C, D; + return w(i), { + defaultProject: S ?? T, + tsconfigProject: C ?? D, + sentConfigDiag: h, + seenProjects: m, + seenConfigs: g + }; + function w(V) { + return F(V, V.project) ?? R(V.project) ?? W(V.project); + } + function A(V, $, U, _e, Z, J) { + if ($) { + if (m.has($)) return; + m.set($, u); + } else { + if (g?.has(J)) return; + (g ?? (g = /* @__PURE__ */ new Set())).add(J); + } + if (!Z.projectService.isMatchedByConfig( + U, + V.config.parsedCommandLine, + t + )) { + Z.languageServiceEnabled && Z.projectService.watchWildcards( + U, + V, + Z + ); + return; + } + const re = $ ? J_e( + $, + n, + t.fileName, + _e, + c + ) : Z.projectService.findCreateOrReloadConfiguredProject( + U, + n, + _e, + o, + t.fileName, + c + ); + if (!re) { + E.assert( + n === 3 + /* CreateReplay */ + ); + return; + } + return m.set(re.project, u), re.sentConfigFileDiag && h.add(re.project), O(re.project, Z); + } + function O(V, $) { + if (m.get(V) === n) return; + m.set(V, n); + const U = _ ? t : V.projectService.getScriptInfo(t.fileName), _e = U && V.containsScriptInfo(U); + if (_e && !V.isSourceOfProjectReferenceRedirect(U.path)) + return C = $, S = V; + !T && _ && _e && (D = $, T = V); + } + function F(V, $) { + return V.sentConfigFileDiag && h.add(V.project), V.configFileExistenceInfo ? A( + V.configFileExistenceInfo, + V.project, + eo(V.project.getConfigFilePath()), + V.reason, + V.project, + V.project.canonicalConfigFilePath + ) : O(V.project, $); + } + function R(V) { + return V.parsedCommandLine && Hwe( + V, + V.parsedCommandLine, + A, + u, + s(V), + o, + c + ); + } + function W(V) { + return _ ? qwe( + // If not in referenced projects, try ancestors and its references + t, + V, + w, + u, + `Creating possible configured project for ${t.fileName} to open`, + o, + c, + /*searchOnlyPotentialSolution*/ + !1 + ) : void 0; + } + } + tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(t, n, i, s) { + const o = n === 1, c = this.tryFindDefaultConfiguredProjectForOpenScriptInfo( + t, + n, + o, + i + ); + if (!c) return; + const { defaultProject: _, tsconfigProject: u, seenProjects: m } = c; + return _ && qwe( + t, + u, + (g) => { + m.set(g.project, n); + }, + n, + `Creating project possibly referencing default composite project ${_.getProjectName()} of open file ${t.fileName}`, + o, + i, + /*searchOnlyPotentialSolution*/ + !0, + s + ), c; + } + /** @internal */ + loadAncestorProjectTree(t) { + t ?? (t = new Set( + Ty(this.configuredProjects.entries(), ([s, o]) => o.initialLoadPending ? void 0 : s) + )); + const n = /* @__PURE__ */ new Set(), i = Ki(this.configuredProjects.values()); + for (const s of i) + Gwe(s, (o) => t.has(o)) && Up(s), this.ensureProjectChildren(s, t, n); + } + ensureProjectChildren(t, n, i) { + var s; + if (!S0(i, t.canonicalConfigFilePath) || t.getCompilerOptions().disableReferencedProjectLoad) return; + const o = (s = t.getCurrentProgram()) == null ? void 0 : s.getResolvedProjectReferences(); + if (o) + for (const c of o) { + if (!c) continue; + const _ = eU(c.references, (g) => n.has(g.sourceFile.path) ? g : void 0); + if (!_) continue; + const u = eo(c.sourceFile.fileName), m = this.findConfiguredProjectByProjectName(u) ?? this.createConfiguredProject( + u, + `Creating project referenced by : ${t.projectName} as it references project ${_.sourceFile.fileName}` + ); + Up(m), this.ensureProjectChildren(m, n, i); + } + } + cleanupConfiguredProjects(t, n, i) { + this.getOrphanConfiguredProjects( + t, + i, + n + ).forEach((s) => this.removeProject(s)); + } + cleanupProjectsAndScriptInfos(t, n, i) { + this.cleanupConfiguredProjects( + t, + i, + n + ); + for (const s of this.inferredProjects.slice()) + s.isOrphan() && this.removeProject(s); + this.removeOrphanScriptInfos(); + } + tryInvokeWildCardDirectories(t) { + this.configFileExistenceInfoCache.forEach((n, i) => { + var s, o; + !((s = n.config) != null && s.parsedCommandLine) || as( + n.config.parsedCommandLine.fileNames, + t.fileName, + this.host.useCaseSensitiveFileNames ? bb : Py + ) || (o = n.config.watchedDirectories) == null || o.forEach((c, _) => { + Zf(_, t.fileName, !this.host.useCaseSensitiveFileNames) && (this.logger.info(`Invoking ${i}:: wildcard for open scriptInfo:: ${t.fileName}`), this.onWildCardDirectoryWatcherInvoke( + _, + i, + n.config, + c.watcher, + t.fileName + )); + }); + }); + } + openClientFileWithNormalizedPath(t, n, i, s, o) { + const c = this.getScriptInfoForPath($6( + t, + o ? this.getNormalizedAbsolutePath(o) : this.currentDirectory, + this.toCanonicalFileName + )), _ = this.getOrCreateOpenScriptInfo(t, n, i, s, o); + !c && _ && !_.isDynamic && this.tryInvokeWildCardDirectories(_); + const { retainProjects: u, ...m } = this.assignProjectToOpenedScriptInfo(_); + return this.cleanupProjectsAndScriptInfos( + u, + /* @__PURE__ */ new Set([_.path]), + /*externalProjectsRetainingConfiguredProjects*/ + void 0 + ), this.telemetryOnOpenFile(_), this.printProjects(), m; + } + /** @internal */ + getOrphanConfiguredProjects(t, n, i) { + const s = new Set(this.configuredProjects.values()), o = (m) => { + m.originalConfiguredProjects && (H0(m) || !m.isOrphan()) && m.originalConfiguredProjects.forEach( + (g, h) => { + const S = this.getConfiguredProjectByCanonicalConfigFilePath(h); + return S && u(S); + } + ); + }; + if (t?.forEach((m, g) => u(g)), !s.size || (this.inferredProjects.forEach(o), this.externalProjects.forEach(o), this.externalProjectToConfiguredProjectMap.forEach((m, g) => { + i?.has(g) || m.forEach(u); + }), !s.size) || (al(this.openFiles, (m, g) => { + if (n?.has(g)) return; + const h = this.getScriptInfoForPath(g); + if (Pn(h.containingProjects, d8)) return; + const S = this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo( + h, + 1 + /* Find */ + ); + if (S?.defaultProject && (S?.seenProjects.forEach((T, C) => u(C)), !s.size)) + return s; + }), !s.size)) return s; + return al(this.configuredProjects, (m) => { + if (s.has(m) && (_(m) || $we(m, c)) && (u(m), !s.size)) + return s; + }), s; + function c(m) { + return !s.has(m) || _(m); + } + function _(m) { + var g, h; + return (m.deferredClose || m.projectService.hasPendingProjectUpdate(m)) && !!((h = (g = m.projectService.configFileExistenceInfoCache.get(m.canonicalConfigFilePath)) == null ? void 0 : g.openFilesImpactedByConfigFile) != null && h.size); + } + function u(m) { + s.delete(m) && (o(m), $we(m, u)); + } + } + removeOrphanScriptInfos() { + const t = new Map(this.filenameToScriptInfo); + this.filenameToScriptInfo.forEach((n) => { + if (!n.deferredDelete) { + if (!n.isScriptOpen() && n.isOrphan() && !k_e(n) && !x_e(n)) { + if (!n.sourceMapFilePath) return; + let i; + if (rs(n.sourceMapFilePath)) { + const s = this.filenameToScriptInfo.get(n.sourceMapFilePath); + i = s?.sourceInfos; + } else + i = n.sourceMapFilePath.sourceInfos; + if (!i || !jg(i, (s) => { + const o = this.getScriptInfoForPath(s); + return !!o && (o.isScriptOpen() || !o.isOrphan()); + })) + return; + } + if (t.delete(n.path), n.sourceMapFilePath) { + let i; + if (rs(n.sourceMapFilePath)) { + const s = this.filenameToScriptInfo.get(n.sourceMapFilePath); + s?.deferredDelete ? n.sourceMapFilePath = { + watcher: this.addMissingSourceMapFile(s.fileName, n.path), + sourceInfos: s.sourceInfos + } : t.delete(n.sourceMapFilePath), i = s?.sourceInfos; + } else + i = n.sourceMapFilePath.sourceInfos; + i && i.forEach((s, o) => t.delete(o)); + } + } + }), t.forEach((n) => this.deleteScriptInfo(n)); + } + telemetryOnOpenFile(t) { + if (this.serverMode !== 0 || !this.eventHandler || !t.isJavaScript() || !Lp(this.allJsFilesForOpenFileTelemetry, t.path)) + return; + const n = this.ensureDefaultProjectForFile(t); + if (!n.languageServiceEnabled) + return; + const i = n.getSourceFile(t.path), s = !!i && !!i.checkJsDirective; + this.eventHandler({ eventName: O_e, data: { info: { checkJs: s } } }); + } + closeClientFile(t, n) { + const i = this.getScriptInfoForNormalizedPath(eo(t)), s = i ? this.closeOpenFile(i, n) : !1; + return n || this.printProjects(), s; + } + collectChanges(t, n, i, s) { + for (const o of n) { + const c = Pn(t, (_) => _.projectName === o.getProjectName()); + s.push(o.getChangesSinceVersion(c && c.version, i)); + } + } + /** @internal */ + synchronizeProjectList(t, n) { + const i = []; + return this.collectChanges(t, this.externalProjects, n, i), this.collectChanges(t, Ty(this.configuredProjects.values(), (s) => s.deferredClose ? void 0 : s), n, i), this.collectChanges(t, this.inferredProjects, n, i), i; + } + /** @internal */ + applyChangesInOpenFiles(t, n, i) { + let s, o, c = !1; + if (t) + for (const u of t) { + (s ?? (s = [])).push(this.getScriptInfoForPath($6( + eo(u.fileName), + u.projectRootPath ? this.getNormalizedAbsolutePath(u.projectRootPath) : this.currentDirectory, + this.toCanonicalFileName + ))); + const m = this.getOrCreateOpenScriptInfo( + eo(u.fileName), + u.content, + dG(u.scriptKind), + u.hasMixedContent, + u.projectRootPath ? eo(u.projectRootPath) : void 0 + ); + (o || (o = [])).push(m); + } + if (n) + for (const u of n) { + const m = this.getScriptInfo(u.fileName); + E.assert(!!m), this.applyChangesToFile(m, u.changes); + } + if (i) + for (const u of i) + c = this.closeClientFile( + u, + /*skipAssignOrphanScriptInfosToInferredProject*/ + !0 + ) || c; + let _; + lr( + s, + (u, m) => !u && o[m] && !o[m].isDynamic ? this.tryInvokeWildCardDirectories(o[m]) : void 0 + ), o?.forEach( + (u) => { + var m; + return (m = this.assignProjectToOpenedScriptInfo(u).retainProjects) == null ? void 0 : m.forEach( + (g, h) => (_ ?? (_ = /* @__PURE__ */ new Map())).set(h, g) + ); + } + ), c && this.assignOrphanScriptInfosToInferredProject(), o ? (this.cleanupProjectsAndScriptInfos( + _, + new Set(o.map((u) => u.path)), + /*externalProjectsRetainingConfiguredProjects*/ + void 0 + ), o.forEach((u) => this.telemetryOnOpenFile(u)), this.printProjects()) : Ir(i) && this.printProjects(); + } + /** @internal */ + applyChangesToFile(t, n) { + for (const i of n) + t.editContent(i.span.start, i.span.start + i.span.length, i.newText); + } + // eslint-disable-line @typescript-eslint/unified-signatures + closeExternalProject(t, n) { + const i = eo(t); + if (this.externalProjectToConfiguredProjectMap.get(i)) + this.externalProjectToConfiguredProjectMap.delete(i); + else { + const o = this.findExternalProjectByProjectName(t); + o && this.removeProject(o); + } + n && (this.cleanupConfiguredProjects(), this.printProjects()); + } + openExternalProjects(t) { + const n = new Set(this.externalProjects.map((i) => i.getProjectName())); + this.externalProjectToConfiguredProjectMap.forEach((i, s) => n.add(s)); + for (const i of t) + this.openExternalProject( + i, + /*cleanupAfter*/ + !1 + ), n.delete(i.projectFileName); + n.forEach((i) => this.closeExternalProject( + i, + /*cleanupAfter*/ + !1 + )), this.cleanupConfiguredProjects(), this.printProjects(); + } + static escapeFilenameForRegex(t) { + return t.replace(this.filenameEscapeRegexp, "\\$&"); + } + resetSafeList() { + this.safelist = L_e; + } + applySafeList(t) { + const n = t.typeAcquisition; + E.assert(!!n, "proj.typeAcquisition should be set by now"); + const i = this.applySafeListWorker(t, t.rootFiles, n); + return i?.excludedFiles ?? []; + } + applySafeListWorker(t, n, i) { + if (i.enable === !1 || i.disableFilenameBasedTypeAcquisition) + return; + const s = i.include || (i.include = []), o = [], c = n.map((h) => Vl(h.fileName)); + for (const h of Object.keys(this.safelist)) { + const S = this.safelist[h]; + for (const T of c) + if (S.match.test(T)) { + if (this.logger.info(`Excluding files based on rule ${h} matching file '${T}'`), S.types) + for (const C of S.types) + s.includes(C) || s.push(C); + if (S.exclude) + for (const C of S.exclude) { + const D = T.replace(S.match, (...w) => C.map((A) => typeof A == "number" ? rs(w[A]) ? qme.escapeFilenameForRegex(w[A]) : (this.logger.info(`Incorrect RegExp specification in safelist rule ${h} - not enough groups`), "\\*") : A).join("")); + o.includes(D) || o.push(D); + } + else { + const C = qme.escapeFilenameForRegex(T); + o.includes(C) || o.push(C); + } + } + } + const _ = o.map((h) => new RegExp(h, "i")); + let u, m; + for (let h = 0; h < n.length; h++) + if (_.some((S) => S.test(c[h]))) + g(h); + else { + if (i.enable) { + const S = Vc(Dy(c[h])); + if (Bo(S, "js")) { + const T = $u(S), C = IR(T), D = this.legacySafelist.get(C); + if (D !== void 0) { + this.logger.info(`Excluded '${c[h]}' because it matched ${C} from the legacy safelist`), g(h), s.includes(D) || s.push(D); + continue; + } + } + } + /^.+[.-]min\.js$/.test(c[h]) ? g(h) : u?.push(n[h]); + } + return m ? { + rootFiles: u, + excludedFiles: m + } : void 0; + function g(h) { + m || (E.assert(!u), u = n.slice(0, h), m = []), m.push(c[h]); + } + } + // eslint-disable-line @typescript-eslint/unified-signatures + openExternalProject(t, n) { + const i = this.findExternalProjectByProjectName(t.projectFileName); + let s, o = []; + for (const c of t.rootFiles) { + const _ = eo(c.fileName); + if (tG(_)) { + if (this.serverMode === 0 && this.host.fileExists(_)) { + let u = this.findConfiguredProjectByProjectName(_); + u || (u = this.createConfiguredProject(_, `Creating configured project in external project: ${t.projectFileName}`), this.getHostPreferences().lazyConfiguredProjectsFromExternalProject || u.updateGraph()), (s ?? (s = /* @__PURE__ */ new Set())).add(u), E.assert(!u.isClosed()); + } + } else + o.push(c); + } + if (s) + this.externalProjectToConfiguredProjectMap.set(t.projectFileName, s), i && this.removeProject(i); + else { + this.externalProjectToConfiguredProjectMap.delete(t.projectFileName); + const c = t.typeAcquisition || {}; + c.include = c.include || [], c.exclude = c.exclude || [], c.enable === void 0 && (c.enable = D_e(o.map((m) => m.fileName))); + const _ = this.applySafeListWorker(t, o, c), u = _?.excludedFiles ?? []; + if (o = _?.rootFiles ?? o, i) { + i.excludedFiles = u; + const m = OL(t.options), g = h8(t.options, i.getCurrentDirectory()), h = this.getFilenameForExceededTotalSizeLimitForNonTsFiles(t.projectFileName, m, o, hG); + h ? i.disableLanguageService(h) : i.enableLanguageService(), i.setProjectErrors(g?.errors), this.updateRootAndOptionsOfNonInferredProject(i, o, hG, m, c, t.options.compileOnSave, g?.watchOptions), i.updateGraph(); + } else + this.createExternalProject(t.projectFileName, o, t.options, c, u).updateGraph(); + } + n && (this.cleanupConfiguredProjects( + s, + /* @__PURE__ */ new Set([t.projectFileName]) + ), this.printProjects()); + } + hasDeferredExtension() { + for (const t of this.hostConfiguration.extraFileExtensions) + if (t.scriptKind === 7) + return !0; + return !1; + } + /** + * Performs the initial steps of enabling a plugin by finding and instantiating the module for a plugin either asynchronously or synchronously + * @internal + */ + requestEnablePlugin(t, n, i) { + if (!this.host.importPlugin && !this.host.require) { + this.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded"); + return; + } + if (this.logger.info(`Enabling plugin ${n.name} from candidate paths: ${i.join(",")}`), !n.name || vl(n.name) || /[\\/]\.\.?(?:$|[\\/])/.test(n.name)) { + this.logger.info(`Skipped loading plugin ${n.name || JSON.stringify(n)} because only package name is allowed plugin name`); + return; + } + if (this.host.importPlugin) { + const s = kk.importServicePluginAsync( + n, + i, + this.host, + (c) => this.logger.info(c) + ); + this.pendingPluginEnablements ?? (this.pendingPluginEnablements = /* @__PURE__ */ new Map()); + let o = this.pendingPluginEnablements.get(t); + o || this.pendingPluginEnablements.set(t, o = []), o.push(s); + return; + } + this.endEnablePlugin( + t, + kk.importServicePluginSync( + n, + i, + this.host, + (s) => this.logger.info(s) + ) + ); + } + /** + * Performs the remaining steps of enabling a plugin after its module has been instantiated. + */ + endEnablePlugin(t, { pluginConfigEntry: n, resolvedModule: i, errorLogs: s }) { + var o; + if (i) { + const c = (o = this.currentPluginConfigOverrides) == null ? void 0 : o.get(n.name); + if (c) { + const _ = n.name; + n = c, n.name = _; + } + t.enableProxy(i, n); + } else + lr(s, (c) => this.logger.info(c)), this.logger.info(`Couldn't find ${n.name}`); + } + /** @internal */ + hasNewPluginEnablementRequests() { + return !!this.pendingPluginEnablements; + } + /** @internal */ + hasPendingPluginEnablements() { + return !!this.currentPluginEnablementPromise; + } + /** + * Waits for any ongoing plugin enablement requests to complete. + * + * @internal + */ + async waitForPendingPlugins() { + for (; this.currentPluginEnablementPromise; ) + await this.currentPluginEnablementPromise; + } + /** + * Starts enabling any requested plugins without waiting for the result. + * + * @internal + */ + enableRequestedPlugins() { + this.pendingPluginEnablements && this.enableRequestedPluginsAsync(); + } + async enableRequestedPluginsAsync() { + if (this.currentPluginEnablementPromise && await this.waitForPendingPlugins(), !this.pendingPluginEnablements) + return; + const t = Ki(this.pendingPluginEnablements.entries()); + this.pendingPluginEnablements = void 0, this.currentPluginEnablementPromise = this.enableRequestedPluginsWorker(t), await this.currentPluginEnablementPromise; + } + async enableRequestedPluginsWorker(t) { + E.assert(this.currentPluginEnablementPromise === void 0); + let n = !1; + await Promise.all(gr(t, async ([i, s]) => { + const o = await Promise.all(s); + if (i.isClosed() || g8(i)) { + this.logger.info(`Cancelling plugin enabling for ${i.getProjectName()} as it is ${i.isClosed() ? "closed" : "deferred close"}`); + return; + } + n = !0; + for (const c of o) + this.endEnablePlugin(i, c); + this.delayUpdateProjectGraph(i); + })), this.currentPluginEnablementPromise = void 0, n && this.sendProjectsUpdatedInBackgroundEvent(); + } + configurePlugin(t) { + this.forEachEnabledProject((n) => n.onPluginConfigurationChanged(t.pluginName, t.configuration)), this.currentPluginConfigOverrides = this.currentPluginConfigOverrides || /* @__PURE__ */ new Map(), this.currentPluginConfigOverrides.set(t.pluginName, t.configuration); + } + /** @internal */ + getPackageJsonsVisibleToFile(t, n, i) { + const s = this.packageJsonCache, o = i && this.toPath(i), c = [], _ = (u) => { + switch (s.directoryHasPackageJson(u)) { + // Sync and check same directory again + case 3: + return s.searchDirectoryAndAncestors(u, n), _(u); + // Check package.json + case -1: + const m = Ln(u, "package.json"); + this.watchPackageJsonFile(m, this.toPath(m), n); + const g = s.getInDirectory(u); + g && c.push(g); + } + if (o && o === u) + return !0; + }; + return sg( + n, + Hn(t), + _ + ), c; + } + /** @internal */ + getNearestAncestorDirectoryWithPackageJson(t, n) { + return sg( + n, + t, + (i) => { + switch (this.packageJsonCache.directoryHasPackageJson(i)) { + case -1: + return i; + case 0: + return; + case 3: + return this.host.fileExists(Ln(i, "package.json")) ? i : void 0; + } + } + ); + } + watchPackageJsonFile(t, n, i) { + E.assert(i !== void 0); + let s = (this.packageJsonFilesMap ?? (this.packageJsonFilesMap = /* @__PURE__ */ new Map())).get(n); + if (!s) { + let o = this.watchFactory.watchFile( + t, + (c, _) => { + switch (_) { + case 0: + case 1: + this.packageJsonCache.addOrUpdate(c, n), this.onPackageJsonChange(s); + break; + case 2: + this.packageJsonCache.delete(n), this.onPackageJsonChange(s), s.projects.clear(), s.close(); + } + }, + 250, + this.hostConfiguration.watchOptions, + Dl.PackageJson + ); + s = { + projects: /* @__PURE__ */ new Set(), + close: () => { + var c; + s.projects.size || !o || (o.close(), o = void 0, (c = this.packageJsonFilesMap) == null || c.delete(n), this.packageJsonCache.invalidate(n)); + } + }, this.packageJsonFilesMap.set(n, s); + } + s.projects.add(i), (i.packageJsonWatches ?? (i.packageJsonWatches = /* @__PURE__ */ new Set())).add(s); + } + onPackageJsonChange(t) { + t.projects.forEach((n) => { + var i; + return (i = n.onPackageJsonChange) == null ? void 0 : i.call(n); + }); + } + /** @internal */ + includePackageJsonAutoImports() { + switch (this.hostConfiguration.preferences.includePackageJsonAutoImports) { + case "on": + return 1; + case "off": + return 0; + default: + return 2; + } + } + /** @internal */ + getIncompleteCompletionsCache() { + return this.incompleteCompletionsCache || (this.incompleteCompletionsCache = pKe()); + } + }; + Ywe.filenameEscapeRegexp = /[-/\\^$*+?.()|[\]{}]/g; + var $_e = Ywe; + function pKe() { + let e; + return { + get() { + return e; + }, + set(t) { + e = t; + }, + clear() { + e = void 0; + } + }; + } + function X_e(e) { + return e.kind !== void 0; + } + function Q_e(e) { + e.print( + /*writeProjectFileNames*/ + !1, + /*writeFileExplaination*/ + !1, + /*writeFileVersionAndText*/ + !1 + ); + } + function Y_e(e) { + let t, n, i; + const s = { + get(u, m, g, h) { + if (!(!n || i !== c(u, g, h))) + return n.get(m); + }, + set(u, m, g, h, S, T, C) { + if (o(u, g, h).set(m, _( + S, + T, + C, + /*packageName*/ + void 0, + /*isBlockedByPackageJsonDependencies*/ + !1 + )), C) { + for (const D of T) + if (D.isInNodeModules) { + const w = D.path.substring(0, D.path.indexOf(Kg) + Kg.length - 1), A = e.toPath(w); + t?.has(A) || (t || (t = /* @__PURE__ */ new Map())).set( + A, + e.watchNodeModulesForPackageJsonChanges(w) + ); + } + } + }, + setModulePaths(u, m, g, h, S) { + const T = o(u, g, h), C = T.get(m); + C ? C.modulePaths = S : T.set(m, _( + /*kind*/ + void 0, + S, + /*moduleSpecifiers*/ + void 0, + /*packageName*/ + void 0, + /*isBlockedByPackageJsonDependencies*/ + void 0 + )); + }, + setBlockedByPackageJsonDependencies(u, m, g, h, S, T) { + const C = o(u, g, h), D = C.get(m); + D ? (D.isBlockedByPackageJsonDependencies = T, D.packageName = S) : C.set(m, _( + /*kind*/ + void 0, + /*modulePaths*/ + void 0, + /*moduleSpecifiers*/ + void 0, + S, + T + )); + }, + clear() { + t?.forEach(nd), n?.clear(), t?.clear(), i = void 0; + }, + count() { + return n ? n.size : 0; + } + }; + return E.isDebugging && Object.defineProperty(s, "__cache", { get: () => n }), s; + function o(u, m, g) { + const h = c(u, m, g); + return n && i !== h && s.clear(), i = h, n || (n = /* @__PURE__ */ new Map()); + } + function c(u, m, g) { + return `${u},${m.importModuleSpecifierEnding},${m.importModuleSpecifierPreference},${g.overrideImportMode}`; + } + function _(u, m, g, h, S) { + return { kind: u, modulePaths: m, moduleSpecifiers: g, packageName: h, isBlockedByPackageJsonDependencies: S }; + } + } + function Z_e(e) { + const t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(); + return { + addOrUpdate: i, + invalidate: s, + delete: (c) => { + t.delete(c), n.set(Hn(c), !0); + }, + getInDirectory: (c) => t.get(e.toPath(Ln(c, "package.json"))) || void 0, + directoryHasPackageJson: (c) => o(e.toPath(c)), + searchDirectoryAndAncestors: (c, _) => { + sg( + _, + c, + (u) => { + const m = e.toPath(u); + if (o(m) !== 3) + return !0; + const g = Ln(u, "package.json"); + mw(e, g) ? i(g, Ln(m, "package.json")) : n.set(m, !0); + } + ); + } + }; + function i(c, _) { + const u = E.checkDefined($V(c, e.host)); + t.set(_, u), n.delete(Hn(_)); + } + function s(c) { + t.delete(c), n.delete(Hn(c)); + } + function o(c) { + return t.has(Ln(c, "package.json")) ? -1 : n.has(c) ? 0 : 3; + } + } + var Zwe = { + isCancellationRequested: () => !1, + setRequest: () => { + }, + resetRequest: () => { + } + }; + function dKe(e) { + const t = e[0], n = e[1]; + return (1e9 * t + n) / 1e6; + } + function Kwe(e, t) { + if ((X6(e) || d8(e)) && e.isJsOnlyProject()) { + const n = e.getScriptInfoForNormalizedPath(t); + return n && !n.isJavaScript(); + } + return !1; + } + function mKe(e) { + return N_(e) || !!e.emitDecoratorMetadata; + } + function ePe(e, t, n) { + const i = t.getScriptInfoForNormalizedPath(e); + return { + start: i.positionToLineOffset(n.start), + end: i.positionToLineOffset(n.start + n.length), + // TODO: GH#18217 + text: vm(n.messageText, ` +`), + code: n.code, + category: rS(n), + reportsUnnecessary: n.reportsUnnecessary, + reportsDeprecated: n.reportsDeprecated, + source: n.source, + relatedInformation: gr(n.relatedInformation, SG) + }; + } + function SG(e) { + return e.file ? { + span: { + start: Y6(js(e.file, e.start)), + end: Y6(js(e.file, e.start + e.length)), + // TODO: GH#18217 + file: e.file.fileName + }, + message: vm(e.messageText, ` +`), + category: rS(e), + code: e.code + } : { + message: vm(e.messageText, ` +`), + category: rS(e), + code: e.code + }; + } + function Y6(e) { + return { line: e.line + 1, offset: e.character + 1 }; + } + function y8(e, t) { + const n = e.file && Y6(js(e.file, e.start)), i = e.file && Y6(js(e.file, e.start + e.length)), s = vm(e.messageText, ` +`), { code: o, source: c } = e, _ = rS(e), u = { + start: n, + end: i, + text: s, + code: o, + category: _, + reportsUnnecessary: e.reportsUnnecessary, + reportsDeprecated: e.reportsDeprecated, + source: c, + relatedInformation: gr(e.relatedInformation, SG) + }; + return t ? { ...u, fileName: e.file && e.file.fileName } : u; + } + function gKe(e, t) { + return e.every((n) => Yo(n.span) < t); + } + var tPe = b_e; + function K_e(e, t, n, i) { + const s = t.hasLevel( + 3 + /* verbose */ + ), o = JSON.stringify(e); + return s && t.info(`${e.type}:${Dv(e)}`), `Content-Length: ${1 + n(o, "utf8")}\r +\r +${o}${i}`; + } + var hKe = class { + constructor(e) { + this.operationHost = e; + } + startNew(e) { + this.complete(), this.requestId = this.operationHost.getCurrentRequestId(), this.executeAction(e); + } + complete() { + this.requestId !== void 0 && (this.operationHost.sendRequestCompletedEvent(this.requestId, this.performanceData), this.requestId = void 0), this.setTimerHandle(void 0), this.setImmediateId(void 0), this.performanceData = void 0; + } + immediate(e, t) { + const n = this.requestId; + E.assert(n === this.operationHost.getCurrentRequestId(), "immediate: incorrect request id"), this.setImmediateId( + this.operationHost.getServerHost().setImmediate(() => { + this.immediateId = void 0, this.operationHost.executeWithRequestId(n, () => this.executeAction(t), this.performanceData); + }, e) + ); + } + delay(e, t, n) { + const i = this.requestId; + E.assert(i === this.operationHost.getCurrentRequestId(), "delay: incorrect request id"), this.setTimerHandle( + this.operationHost.getServerHost().setTimeout( + () => { + this.timerHandle = void 0, this.operationHost.executeWithRequestId(i, () => this.executeAction(n), this.performanceData); + }, + t, + e + ) + ); + } + executeAction(e) { + var t, n, i, s, o, c; + let _ = !1; + try { + this.operationHost.isCancellationRequested() ? (_ = !0, (t = nn) == null || t.instant(nn.Phase.Session, "stepCanceled", { seq: this.requestId, early: !0 })) : ((n = nn) == null || n.push(nn.Phase.Session, "stepAction", { seq: this.requestId }), e(this), (i = nn) == null || i.pop()); + } catch (u) { + (s = nn) == null || s.popAll(), _ = !0, u instanceof t4 ? (o = nn) == null || o.instant(nn.Phase.Session, "stepCanceled", { seq: this.requestId }) : ((c = nn) == null || c.instant(nn.Phase.Session, "stepError", { seq: this.requestId, message: u.message }), this.operationHost.logError(u, `delayed processing of request ${this.requestId}`)); + } + this.performanceData = this.operationHost.getPerformanceData(), (_ || !this.hasPendingWork()) && this.complete(); + } + setTimerHandle(e) { + this.timerHandle !== void 0 && this.operationHost.getServerHost().clearTimeout(this.timerHandle), this.timerHandle = e; + } + setImmediateId(e) { + this.immediateId !== void 0 && this.operationHost.getServerHost().clearImmediate(this.immediateId), this.immediateId = e; + } + hasPendingWork() { + return !!this.timerHandle || !!this.immediateId; + } + }; + function efe(e, t) { + return { + seq: 0, + type: "event", + event: e, + body: t + }; + } + function yKe(e, t, n, i) { + const s = qE(os(n) ? n : n.projects, (o) => i(o, e)); + return !os(n) && n.symLinkedProjects && n.symLinkedProjects.forEach((o, c) => { + const _ = t(c); + s.push(...na(o, (u) => i(u, _))); + }), hb(s, wy); + } + function TG(e) { + return DR(({ textSpan: t }) => t.start + 100003 * t.length, FV(e)); + } + function vKe(e, t, n, i, s, o, c) { + const _ = tfe( + e, + t, + n, + rPe( + t, + n, + /*isForRename*/ + !0 + ), + sPe, + (g, h) => g.getLanguageService().findRenameLocations(h.fileName, h.pos, i, s, o), + (g, h) => h(Iw(g)) + ); + if (os(_)) + return _; + const u = [], m = TG(c); + return _.forEach((g, h) => { + for (const S of g) + !m.has(S) && !xG(Iw(S), h) && (u.push(S), m.add(S)); + }), u; + } + function rPe(e, t, n) { + const i = e.getLanguageService().getDefinitionAtPosition( + t.fileName, + t.pos, + /*searchOtherFilesOnly*/ + !1, + /*stopAtAlias*/ + n + ), s = i && Uc(i); + return s && !s.isLocal ? { fileName: s.fileName, pos: s.textSpan.start } : void 0; + } + function bKe(e, t, n, i, s) { + var o, c; + const _ = tfe( + e, + t, + n, + rPe( + t, + n, + /*isForRename*/ + !1 + ), + sPe, + (h, S) => (s.info(`Finding references to ${S.fileName} position ${S.pos} in project ${h.getProjectName()}`), h.getLanguageService().findReferences(S.fileName, S.pos)), + (h, S) => { + S(Iw(h.definition)); + for (const T of h.references) + S(Iw(T)); + } + ); + if (os(_)) + return _; + const u = _.get(t); + if (((c = (o = u?.[0]) == null ? void 0 : o.references[0]) == null ? void 0 : c.isDefinition) === void 0) + _.forEach((h) => { + for (const S of h) + for (const T of S.references) + delete T.isDefinition; + }); + else { + const h = TG(i); + for (const T of u) + for (const C of T.references) + if (C.isDefinition) { + h.add(C); + break; + } + const S = /* @__PURE__ */ new Set(); + for (; ; ) { + let T = !1; + if (_.forEach((C, D) => { + if (S.has(D)) return; + D.getLanguageService().updateIsDefinitionOfReferencedSymbols(C, h) && (S.add(D), T = !0); + }), !T) break; + } + _.forEach((T, C) => { + if (!S.has(C)) + for (const D of T) + for (const w of D.references) + w.isDefinition = !1; + }); + } + const m = [], g = TG(i); + return _.forEach((h, S) => { + for (const T of h) { + const C = xG(Iw(T.definition), S), D = C === void 0 ? T.definition : { + ...T.definition, + textSpan: ql(C.pos, T.definition.textSpan.length), + // Why would the length be the same in the original? + fileName: C.fileName, + contextSpan: TKe(T.definition, S) + }; + let w = Pn(m, (A) => IV(A.definition, D, i)); + w || (w = { definition: D, references: [] }, m.push(w)); + for (const A of T.references) + !g.has(A) && !xG(Iw(A), S) && (g.add(A), w.references.push(A)); + } + }), m.filter((h) => h.references.length !== 0); + } + function nPe(e, t, n) { + for (const i of os(e) ? e : e.projects) + n(i, t); + !os(e) && e.symLinkedProjects && e.symLinkedProjects.forEach((i, s) => { + for (const o of i) + n(o, s); + }); + } + function tfe(e, t, n, i, s, o, c) { + const _ = /* @__PURE__ */ new Map(), u = mP(); + u.enqueue({ project: t, location: n }), nPe(e, n.fileName, (D, w) => { + const A = { fileName: w, pos: n.pos }; + u.enqueue({ project: D, location: A }); + }); + const m = t.projectService, g = t.getCancellationToken(), h = Iu( + () => t.isSourceOfProjectReferenceRedirect(i.fileName) ? i : t.getLanguageService().getSourceMapper().tryGetGeneratedPosition(i) + ), S = Iu( + () => t.isSourceOfProjectReferenceRedirect(i.fileName) ? i : t.getLanguageService().getSourceMapper().tryGetSourcePosition(i) + ), T = /* @__PURE__ */ new Set(); + e: + for (; !u.isEmpty(); ) { + for (; !u.isEmpty(); ) { + if (g.isCancellationRequested()) break e; + const { project: D, location: w } = u.dequeue(); + if (_.has(D) || aPe(D, w) || (Up(D), !D.containsFile(eo(w.fileName)))) + continue; + const A = C(D, w); + _.set(D, A ?? pl), T.add(SKe(D)); + } + i && (m.loadAncestorProjectTree(T), m.forEachEnabledProject((D) => { + if (g.isCancellationRequested() || _.has(D)) return; + const w = s(i, D, h, S); + w && u.enqueue({ project: D, location: w }); + })); + } + if (_.size === 1) + return TR(_.values()); + return _; + function C(D, w) { + const A = o(D, w); + if (!A || !c) return A; + for (const O of A) + c(O, (F) => { + const R = m.getOriginalLocationEnsuringConfiguredProject(D, F); + if (!R) return; + const W = m.getScriptInfo(R.fileName); + for (const $ of W.containingProjects) + !$.isOrphan() && !_.has($) && u.enqueue({ project: $, location: R }); + const V = m.getSymlinkedProjects(W); + V && V.forEach(($, U) => { + for (const _e of $) + !_e.isOrphan() && !_.has(_e) && u.enqueue({ project: _e, location: { fileName: U, pos: R.pos } }); + }); + }); + return A; + } + } + function iPe(e, t) { + if (t.containsFile(eo(e.fileName)) && !aPe(t, e)) + return e; + } + function sPe(e, t, n, i) { + const s = iPe(e, t); + if (s) return s; + const o = n(); + if (o && t.containsFile(eo(o.fileName))) return o; + const c = i(); + return c && t.containsFile(eo(c.fileName)) ? c : void 0; + } + function aPe(e, t) { + if (!t) return !1; + const n = e.getLanguageService().getProgram(); + if (!n) return !1; + const i = n.getSourceFile(t.fileName); + return !!i && i.resolvedPath !== i.path && i.resolvedPath !== e.toPath(t.fileName); + } + function SKe(e) { + return H0(e) ? e.canonicalConfigFilePath : e.getProjectName(); + } + function Iw({ fileName: e, textSpan: t }) { + return { fileName: e, pos: t.start }; + } + function xG(e, t) { + return lw(e, t.getSourceMapper(), (n) => t.projectService.fileExists(n)); + } + function oPe(e, t) { + return C9(e, t.getSourceMapper(), (n) => t.projectService.fileExists(n)); + } + function TKe(e, t) { + return LV(e, t.getSourceMapper(), (n) => t.projectService.fileExists(n)); + } + var cPe = [ + "openExternalProject", + "openExternalProjects", + "closeExternalProject", + "synchronizeProjectList", + "emit-output", + "compileOnSaveAffectedFileList", + "compileOnSaveEmitFile", + "compilerOptionsDiagnostics-full", + "encodedSemanticClassifications-full", + "semanticDiagnosticsSync", + "suggestionDiagnosticsSync", + "geterrForProject", + "reload", + "reloadProjects", + "getCodeFixes", + "getCodeFixes-full", + "getCombinedCodeFix", + "getCombinedCodeFix-full", + "applyCodeActionCommand", + "getSupportedCodeFixes", + "getApplicableRefactors", + "getMoveToRefactoringFileSuggestions", + "getEditsForRefactor", + "getEditsForRefactor-full", + "organizeImports", + "organizeImports-full", + "getEditsForFileRename", + "getEditsForFileRename-full", + "prepareCallHierarchy", + "provideCallHierarchyIncomingCalls", + "provideCallHierarchyOutgoingCalls", + "getPasteEdits", + "copilotRelated" + /* CopilotRelated */ + ], xKe = [ + ...cPe, + "definition", + "definition-full", + "definitionAndBoundSpan", + "definitionAndBoundSpan-full", + "typeDefinition", + "implementation", + "implementation-full", + "references", + "references-full", + "rename", + "renameLocations-full", + "rename-full", + "quickinfo", + "quickinfo-full", + "completionInfo", + "completions", + "completions-full", + "completionEntryDetails", + "completionEntryDetails-full", + "signatureHelp", + "signatureHelp-full", + "navto", + "navto-full", + "documentHighlights", + "documentHighlights-full", + "preparePasteEdits" + /* PreparePasteEdits */ + ], lPe = class IX { + constructor(t) { + this.changeSeq = 0, this.regionDiagLineCountThreshold = 500, this.handlers = new Map(Object.entries({ + // TODO(jakebailey): correctly type the handlers + status: () => { + const o = { version: Xf }; + return this.requiredResponse(o); + }, + openExternalProject: (o) => (this.projectService.openExternalProject( + o.arguments, + /*cleanupAfter*/ + !0 + ), this.requiredResponse( + /*response*/ + !0 + )), + openExternalProjects: (o) => (this.projectService.openExternalProjects(o.arguments.projects), this.requiredResponse( + /*response*/ + !0 + )), + closeExternalProject: (o) => (this.projectService.closeExternalProject( + o.arguments.projectFileName, + /*cleanupAfter*/ + !0 + ), this.requiredResponse( + /*response*/ + !0 + )), + synchronizeProjectList: (o) => { + const c = this.projectService.synchronizeProjectList(o.arguments.knownProjects, o.arguments.includeProjectReferenceRedirectInfo); + if (!c.some((u) => u.projectErrors && u.projectErrors.length !== 0)) + return this.requiredResponse(c); + const _ = gr(c, (u) => !u.projectErrors || u.projectErrors.length === 0 ? u : { + info: u.info, + changes: u.changes, + files: u.files, + projectErrors: this.convertToDiagnosticsWithLinePosition( + u.projectErrors, + /*scriptInfo*/ + void 0 + ) + }); + return this.requiredResponse(_); + }, + updateOpen: (o) => (this.changeSeq++, this.projectService.applyChangesInOpenFiles( + o.arguments.openFiles && VE(o.arguments.openFiles, (c) => ({ + fileName: c.file, + content: c.fileContent, + scriptKind: c.scriptKindName, + projectRootPath: c.projectRootPath + })), + o.arguments.changedFiles && VE(o.arguments.changedFiles, (c) => ({ + fileName: c.fileName, + changes: Ty(bR(c.textChanges), (_) => { + const u = E.checkDefined(this.projectService.getScriptInfo(c.fileName)), m = u.lineOffsetToPosition(_.start.line, _.start.offset), g = u.lineOffsetToPosition(_.end.line, _.end.offset); + return m >= 0 ? { span: { start: m, length: g - m }, newText: _.newText } : void 0; + }) + })), + o.arguments.closedFiles + ), this.requiredResponse( + /*response*/ + !0 + )), + applyChangedToOpenFiles: (o) => (this.changeSeq++, this.projectService.applyChangesInOpenFiles( + o.arguments.openFiles, + o.arguments.changedFiles && VE(o.arguments.changedFiles, (c) => ({ + fileName: c.fileName, + // apply changes in reverse order + changes: bR(c.changes) + })), + o.arguments.closedFiles + ), this.requiredResponse( + /*response*/ + !0 + )), + exit: () => (this.exit(), this.notRequired( + /*request*/ + void 0 + )), + definition: (o) => this.requiredResponse(this.getDefinition( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "definition-full": (o) => this.requiredResponse(this.getDefinition( + o.arguments, + /*simplifiedResult*/ + !1 + )), + definitionAndBoundSpan: (o) => this.requiredResponse(this.getDefinitionAndBoundSpan( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "definitionAndBoundSpan-full": (o) => this.requiredResponse(this.getDefinitionAndBoundSpan( + o.arguments, + /*simplifiedResult*/ + !1 + )), + findSourceDefinition: (o) => this.requiredResponse(this.findSourceDefinition(o.arguments)), + "emit-output": (o) => this.requiredResponse(this.getEmitOutput(o.arguments)), + typeDefinition: (o) => this.requiredResponse(this.getTypeDefinition(o.arguments)), + implementation: (o) => this.requiredResponse(this.getImplementation( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "implementation-full": (o) => this.requiredResponse(this.getImplementation( + o.arguments, + /*simplifiedResult*/ + !1 + )), + references: (o) => this.requiredResponse(this.getReferences( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "references-full": (o) => this.requiredResponse(this.getReferences( + o.arguments, + /*simplifiedResult*/ + !1 + )), + rename: (o) => this.requiredResponse(this.getRenameLocations( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "renameLocations-full": (o) => this.requiredResponse(this.getRenameLocations( + o.arguments, + /*simplifiedResult*/ + !1 + )), + "rename-full": (o) => this.requiredResponse(this.getRenameInfo(o.arguments)), + open: (o) => (this.openClientFile( + eo(o.arguments.file), + o.arguments.fileContent, + mG(o.arguments.scriptKindName), + // TODO: GH#18217 + o.arguments.projectRootPath ? eo(o.arguments.projectRootPath) : void 0 + ), this.notRequired(o)), + quickinfo: (o) => this.requiredResponse(this.getQuickInfoWorker( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "quickinfo-full": (o) => this.requiredResponse(this.getQuickInfoWorker( + o.arguments, + /*simplifiedResult*/ + !1 + )), + getOutliningSpans: (o) => this.requiredResponse(this.getOutliningSpans( + o.arguments, + /*simplifiedResult*/ + !0 + )), + outliningSpans: (o) => this.requiredResponse(this.getOutliningSpans( + o.arguments, + /*simplifiedResult*/ + !1 + )), + todoComments: (o) => this.requiredResponse(this.getTodoComments(o.arguments)), + indentation: (o) => this.requiredResponse(this.getIndentation(o.arguments)), + nameOrDottedNameSpan: (o) => this.requiredResponse(this.getNameOrDottedNameSpan(o.arguments)), + breakpointStatement: (o) => this.requiredResponse(this.getBreakpointStatement(o.arguments)), + braceCompletion: (o) => this.requiredResponse(this.isValidBraceCompletion(o.arguments)), + docCommentTemplate: (o) => this.requiredResponse(this.getDocCommentTemplate(o.arguments)), + getSpanOfEnclosingComment: (o) => this.requiredResponse(this.getSpanOfEnclosingComment(o.arguments)), + fileReferences: (o) => this.requiredResponse(this.getFileReferences( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "fileReferences-full": (o) => this.requiredResponse(this.getFileReferences( + o.arguments, + /*simplifiedResult*/ + !1 + )), + format: (o) => this.requiredResponse(this.getFormattingEditsForRange(o.arguments)), + formatonkey: (o) => this.requiredResponse(this.getFormattingEditsAfterKeystroke(o.arguments)), + "format-full": (o) => this.requiredResponse(this.getFormattingEditsForDocumentFull(o.arguments)), + "formatonkey-full": (o) => this.requiredResponse(this.getFormattingEditsAfterKeystrokeFull(o.arguments)), + "formatRange-full": (o) => this.requiredResponse(this.getFormattingEditsForRangeFull(o.arguments)), + completionInfo: (o) => this.requiredResponse(this.getCompletions( + o.arguments, + "completionInfo" + /* CompletionInfo */ + )), + completions: (o) => this.requiredResponse(this.getCompletions( + o.arguments, + "completions" + /* Completions */ + )), + "completions-full": (o) => this.requiredResponse(this.getCompletions( + o.arguments, + "completions-full" + /* CompletionsFull */ + )), + completionEntryDetails: (o) => this.requiredResponse(this.getCompletionEntryDetails( + o.arguments, + /*fullResult*/ + !1 + )), + "completionEntryDetails-full": (o) => this.requiredResponse(this.getCompletionEntryDetails( + o.arguments, + /*fullResult*/ + !0 + )), + compileOnSaveAffectedFileList: (o) => this.requiredResponse(this.getCompileOnSaveAffectedFileList(o.arguments)), + compileOnSaveEmitFile: (o) => this.requiredResponse(this.emitFile(o.arguments)), + signatureHelp: (o) => this.requiredResponse(this.getSignatureHelpItems( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "signatureHelp-full": (o) => this.requiredResponse(this.getSignatureHelpItems( + o.arguments, + /*simplifiedResult*/ + !1 + )), + "compilerOptionsDiagnostics-full": (o) => this.requiredResponse(this.getCompilerOptionsDiagnostics(o.arguments)), + "encodedSyntacticClassifications-full": (o) => this.requiredResponse(this.getEncodedSyntacticClassifications(o.arguments)), + "encodedSemanticClassifications-full": (o) => this.requiredResponse(this.getEncodedSemanticClassifications(o.arguments)), + cleanup: () => (this.cleanup(), this.requiredResponse( + /*response*/ + !0 + )), + semanticDiagnosticsSync: (o) => this.requiredResponse(this.getSemanticDiagnosticsSync(o.arguments)), + syntacticDiagnosticsSync: (o) => this.requiredResponse(this.getSyntacticDiagnosticsSync(o.arguments)), + suggestionDiagnosticsSync: (o) => this.requiredResponse(this.getSuggestionDiagnosticsSync(o.arguments)), + geterr: (o) => (this.errorCheck.startNew((c) => this.getDiagnostics(c, o.arguments.delay, o.arguments.files)), this.notRequired( + /*request*/ + void 0 + )), + geterrForProject: (o) => (this.errorCheck.startNew((c) => this.getDiagnosticsForProject(c, o.arguments.delay, o.arguments.file)), this.notRequired( + /*request*/ + void 0 + )), + change: (o) => (this.change(o.arguments), this.notRequired(o)), + configure: (o) => (this.projectService.setHostConfiguration(o.arguments), this.notRequired(o)), + reload: (o) => (this.reload(o.arguments), this.requiredResponse({ reloadFinished: !0 })), + saveto: (o) => { + const c = o.arguments; + return this.saveToTmp(c.file, c.tmpfile), this.notRequired(o); + }, + close: (o) => { + const c = o.arguments; + return this.closeClientFile(c.file), this.notRequired(o); + }, + navto: (o) => this.requiredResponse(this.getNavigateToItems( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "navto-full": (o) => this.requiredResponse(this.getNavigateToItems( + o.arguments, + /*simplifiedResult*/ + !1 + )), + brace: (o) => this.requiredResponse(this.getBraceMatching( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "brace-full": (o) => this.requiredResponse(this.getBraceMatching( + o.arguments, + /*simplifiedResult*/ + !1 + )), + navbar: (o) => this.requiredResponse(this.getNavigationBarItems( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "navbar-full": (o) => this.requiredResponse(this.getNavigationBarItems( + o.arguments, + /*simplifiedResult*/ + !1 + )), + navtree: (o) => this.requiredResponse(this.getNavigationTree( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "navtree-full": (o) => this.requiredResponse(this.getNavigationTree( + o.arguments, + /*simplifiedResult*/ + !1 + )), + documentHighlights: (o) => this.requiredResponse(this.getDocumentHighlights( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "documentHighlights-full": (o) => this.requiredResponse(this.getDocumentHighlights( + o.arguments, + /*simplifiedResult*/ + !1 + )), + compilerOptionsForInferredProjects: (o) => (this.setCompilerOptionsForInferredProjects(o.arguments), this.requiredResponse( + /*response*/ + !0 + )), + projectInfo: (o) => this.requiredResponse(this.getProjectInfo(o.arguments)), + reloadProjects: (o) => (this.projectService.reloadProjects(), this.notRequired(o)), + jsxClosingTag: (o) => this.requiredResponse(this.getJsxClosingTag(o.arguments)), + linkedEditingRange: (o) => this.requiredResponse(this.getLinkedEditingRange(o.arguments)), + getCodeFixes: (o) => this.requiredResponse(this.getCodeFixes( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "getCodeFixes-full": (o) => this.requiredResponse(this.getCodeFixes( + o.arguments, + /*simplifiedResult*/ + !1 + )), + getCombinedCodeFix: (o) => this.requiredResponse(this.getCombinedCodeFix( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "getCombinedCodeFix-full": (o) => this.requiredResponse(this.getCombinedCodeFix( + o.arguments, + /*simplifiedResult*/ + !1 + )), + applyCodeActionCommand: (o) => this.requiredResponse(this.applyCodeActionCommand(o.arguments)), + getSupportedCodeFixes: (o) => this.requiredResponse(this.getSupportedCodeFixes(o.arguments)), + getApplicableRefactors: (o) => this.requiredResponse(this.getApplicableRefactors(o.arguments)), + getEditsForRefactor: (o) => this.requiredResponse(this.getEditsForRefactor( + o.arguments, + /*simplifiedResult*/ + !0 + )), + getMoveToRefactoringFileSuggestions: (o) => this.requiredResponse(this.getMoveToRefactoringFileSuggestions(o.arguments)), + preparePasteEdits: (o) => this.requiredResponse(this.preparePasteEdits(o.arguments)), + getPasteEdits: (o) => this.requiredResponse(this.getPasteEdits(o.arguments)), + "getEditsForRefactor-full": (o) => this.requiredResponse(this.getEditsForRefactor( + o.arguments, + /*simplifiedResult*/ + !1 + )), + organizeImports: (o) => this.requiredResponse(this.organizeImports( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "organizeImports-full": (o) => this.requiredResponse(this.organizeImports( + o.arguments, + /*simplifiedResult*/ + !1 + )), + getEditsForFileRename: (o) => this.requiredResponse(this.getEditsForFileRename( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "getEditsForFileRename-full": (o) => this.requiredResponse(this.getEditsForFileRename( + o.arguments, + /*simplifiedResult*/ + !1 + )), + configurePlugin: (o) => (this.configurePlugin(o.arguments), this.notRequired(o)), + selectionRange: (o) => this.requiredResponse(this.getSmartSelectionRange( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "selectionRange-full": (o) => this.requiredResponse(this.getSmartSelectionRange( + o.arguments, + /*simplifiedResult*/ + !1 + )), + prepareCallHierarchy: (o) => this.requiredResponse(this.prepareCallHierarchy(o.arguments)), + provideCallHierarchyIncomingCalls: (o) => this.requiredResponse(this.provideCallHierarchyIncomingCalls(o.arguments)), + provideCallHierarchyOutgoingCalls: (o) => this.requiredResponse(this.provideCallHierarchyOutgoingCalls(o.arguments)), + toggleLineComment: (o) => this.requiredResponse(this.toggleLineComment( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "toggleLineComment-full": (o) => this.requiredResponse(this.toggleLineComment( + o.arguments, + /*simplifiedResult*/ + !1 + )), + toggleMultilineComment: (o) => this.requiredResponse(this.toggleMultilineComment( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "toggleMultilineComment-full": (o) => this.requiredResponse(this.toggleMultilineComment( + o.arguments, + /*simplifiedResult*/ + !1 + )), + commentSelection: (o) => this.requiredResponse(this.commentSelection( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "commentSelection-full": (o) => this.requiredResponse(this.commentSelection( + o.arguments, + /*simplifiedResult*/ + !1 + )), + uncommentSelection: (o) => this.requiredResponse(this.uncommentSelection( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "uncommentSelection-full": (o) => this.requiredResponse(this.uncommentSelection( + o.arguments, + /*simplifiedResult*/ + !1 + )), + provideInlayHints: (o) => this.requiredResponse(this.provideInlayHints(o.arguments)), + mapCode: (o) => this.requiredResponse(this.mapCode(o.arguments)), + copilotRelated: () => this.requiredResponse(this.getCopilotRelatedInfo()) + })), this.host = t.host, this.cancellationToken = t.cancellationToken, this.typingsInstaller = t.typingsInstaller || LL, this.byteLength = t.byteLength, this.hrtime = t.hrtime, this.logger = t.logger, this.canUseEvents = t.canUseEvents, this.suppressDiagnosticEvents = t.suppressDiagnosticEvents, this.noGetErrOnBackgroundUpdate = t.noGetErrOnBackgroundUpdate; + const { throttleWaitMilliseconds: n } = t; + this.eventHandler = this.canUseEvents ? t.eventHandler || ((o) => this.defaultEventHandler(o)) : void 0; + const i = { + executeWithRequestId: (o, c, _) => this.executeWithRequestId(o, c, _), + getCurrentRequestId: () => this.currentRequestId, + getPerformanceData: () => this.performanceData, + getServerHost: () => this.host, + logError: (o, c) => this.logError(o, c), + sendRequestCompletedEvent: (o, c) => this.sendRequestCompletedEvent(o, c), + isCancellationRequested: () => this.cancellationToken.isCancellationRequested() + }; + this.errorCheck = new hKe(i); + const s = { + host: this.host, + logger: this.logger, + cancellationToken: this.cancellationToken, + useSingleInferredProject: t.useSingleInferredProject, + useInferredProjectPerProjectRoot: t.useInferredProjectPerProjectRoot, + typingsInstaller: this.typingsInstaller, + throttleWaitMilliseconds: n, + eventHandler: this.eventHandler, + suppressDiagnosticEvents: this.suppressDiagnosticEvents, + globalPlugins: t.globalPlugins, + pluginProbeLocations: t.pluginProbeLocations, + allowLocalPluginLoads: t.allowLocalPluginLoads, + typesMapLocation: t.typesMapLocation, + serverMode: t.serverMode, + session: this, + canUseWatchEvents: t.canUseWatchEvents, + incrementalVerifier: t.incrementalVerifier + }; + switch (this.projectService = new $_e(s), this.projectService.setPerformanceEventHandler(this.performanceEventHandler.bind(this)), this.gcTimer = new y_e( + this.host, + /*delay*/ + 7e3, + this.logger + ), this.projectService.serverMode) { + case 0: + break; + case 1: + cPe.forEach( + (o) => this.handlers.set(o, (c) => { + throw new Error(`Request: ${c.command} not allowed in LanguageServiceMode.PartialSemantic`); + }) + ); + break; + case 2: + xKe.forEach( + (o) => this.handlers.set(o, (c) => { + throw new Error(`Request: ${c.command} not allowed in LanguageServiceMode.Syntactic`); + }) + ); + break; + default: + E.assertNever(this.projectService.serverMode); + } + } + sendRequestCompletedEvent(t, n) { + this.event( + { + request_seq: t, + performanceData: n && uPe(n) + }, + "requestCompleted" + ); + } + addPerformanceData(t, n) { + this.performanceData || (this.performanceData = {}), this.performanceData[t] = (this.performanceData[t] ?? 0) + n; + } + addDiagnosticsPerformanceData(t, n, i) { + var s, o; + this.performanceData || (this.performanceData = {}); + let c = (s = this.performanceData.diagnosticsDuration) == null ? void 0 : s.get(t); + c || ((o = this.performanceData).diagnosticsDuration ?? (o.diagnosticsDuration = /* @__PURE__ */ new Map())).set(t, c = {}), c[n] = i; + } + performanceEventHandler(t) { + switch (t.kind) { + case "UpdateGraph": + this.addPerformanceData("updateGraphDurationMs", t.durationMs); + break; + case "CreatePackageJsonAutoImportProvider": + this.addPerformanceData("createAutoImportProviderProgramDurationMs", t.durationMs); + break; + } + } + defaultEventHandler(t) { + switch (t.eventName) { + case FL: + this.projectsUpdatedInBackgroundEvent(t.data.openFiles); + break; + case sG: + this.event({ + projectName: t.data.project.getProjectName(), + reason: t.data.reason + }, t.eventName); + break; + case aG: + this.event({ + projectName: t.data.project.getProjectName() + }, t.eventName); + break; + case oG: + case _G: + case fG: + case pG: + this.event(t.data, t.eventName); + break; + case cG: + this.event({ + triggerFile: t.data.triggerFile, + configFile: t.data.configFileName, + diagnostics: gr(t.data.diagnostics, (n) => y8( + n, + /*includeFileName*/ + !0 + )) + }, t.eventName); + break; + case lG: { + this.event({ + projectName: t.data.project.getProjectName(), + languageServiceEnabled: t.data.languageServiceEnabled + }, t.eventName); + break; + } + case uG: { + this.event({ + telemetryEventName: t.eventName, + payload: t.data + }, "telemetry"); + break; + } + } + } + projectsUpdatedInBackgroundEvent(t) { + this.projectService.logger.info(`got projects updated in background ${t}`), t.length && (!this.suppressDiagnosticEvents && !this.noGetErrOnBackgroundUpdate && (this.projectService.logger.info(`Queueing diagnostics update for ${t}`), this.errorCheck.startNew((n) => this.updateErrorCheck( + n, + t, + 100, + /*requireOpen*/ + !0 + ))), this.event({ + openFiles: t + }, FL)); + } + logError(t, n) { + this.logErrorWorker(t, n); + } + logErrorWorker(t, n, i) { + let s = "Exception on executing command " + n; + if (t.message && (s += `: +` + rw(t.message), t.stack && (s += ` +` + rw(t.stack))), this.logger.hasLevel( + 3 + /* verbose */ + )) { + if (i) + try { + const { file: o, project: c } = this.getFileAndProject(i), _ = c.getScriptInfoForNormalizedPath(o); + if (_) { + const u = uk(_.getSnapshot()); + s += ` + +File text of ${i.file}:${rw(u)} +`; + } + } catch { + } + if (t.ProgramFiles) { + s += ` + +Program files: ${JSON.stringify(t.ProgramFiles)} +`, s += ` + +Projects:: +`; + let o = 0; + const c = (_) => { + s += ` +Project '${_.projectName}' (${Aw[_.projectKind]}) ${o} +`, s += _.filesToString( + /*writeProjectFileNames*/ + !0 + ), s += ` +----------------------------------------------- +`, o++; + }; + this.projectService.externalProjects.forEach(c), this.projectService.configuredProjects.forEach(c), this.projectService.inferredProjects.forEach(c); + } + } + this.logger.msg( + s, + "Err" + /* Err */ + ); + } + send(t) { + if (t.type === "event" && !this.canUseEvents) { + this.logger.hasLevel( + 3 + /* verbose */ + ) && this.logger.info(`Session does not support events: ignored event: ${Dv(t)}`); + return; + } + this.writeMessage(t); + } + writeMessage(t) { + const n = K_e(t, this.logger, this.byteLength, this.host.newLine); + this.host.write(n); + } + event(t, n) { + this.send(efe(n, t)); + } + /** @internal */ + doOutput(t, n, i, s, o, c) { + const _ = { + seq: 0, + type: "response", + command: n, + request_seq: i, + success: s, + performanceData: o && uPe(o) + }; + if (s) { + let u; + if (os(t)) + _.body = t, u = t.metadata, delete t.metadata; + else if (typeof t == "object") + if (t.metadata) { + const { metadata: m, ...g } = t; + _.body = g, u = m; + } else + _.body = t; + else + _.body = t; + u && (_.metadata = u); + } else + E.assert(t === void 0); + c && (_.message = c), this.send(_); + } + semanticCheck(t, n) { + var i, s; + const o = ao(); + (i = nn) == null || i.push(nn.Phase.Session, "semanticCheck", { file: t, configFilePath: n.canonicalConfigFilePath }); + const c = Kwe(n, t) ? pl : n.getLanguageService().getSemanticDiagnostics(t).filter((_) => !!_.file); + this.sendDiagnosticsEvent(t, n, c, "semanticDiag", o), (s = nn) == null || s.pop(); + } + syntacticCheck(t, n) { + var i, s; + const o = ao(); + (i = nn) == null || i.push(nn.Phase.Session, "syntacticCheck", { file: t, configFilePath: n.canonicalConfigFilePath }), this.sendDiagnosticsEvent(t, n, n.getLanguageService().getSyntacticDiagnostics(t), "syntaxDiag", o), (s = nn) == null || s.pop(); + } + suggestionCheck(t, n) { + var i, s; + const o = ao(); + (i = nn) == null || i.push(nn.Phase.Session, "suggestionCheck", { file: t, configFilePath: n.canonicalConfigFilePath }), this.sendDiagnosticsEvent(t, n, n.getLanguageService().getSuggestionDiagnostics(t), "suggestionDiag", o), (s = nn) == null || s.pop(); + } + regionSemanticCheck(t, n, i) { + var s, o, c; + const _ = ao(); + (s = nn) == null || s.push(nn.Phase.Session, "regionSemanticCheck", { file: t, configFilePath: n.canonicalConfigFilePath }); + let u; + if (!this.shouldDoRegionCheck(t) || !(u = n.getLanguageService().getRegionSemanticDiagnostics(t, i))) { + (o = nn) == null || o.pop(); + return; + } + this.sendDiagnosticsEvent(t, n, u.diagnostics, "regionSemanticDiag", _, u.spans), (c = nn) == null || c.pop(); + } + // We should only do the region-based semantic check if we think it would be + // considerably faster than a whole-file semantic check. + /** @internal */ + shouldDoRegionCheck(t) { + var n; + const i = (n = this.projectService.getScriptInfoForNormalizedPath(t)) == null ? void 0 : n.textStorage.getLineInfo().getLineCount(); + return !!(i && i >= this.regionDiagLineCountThreshold); + } + sendDiagnosticsEvent(t, n, i, s, o, c) { + try { + const _ = E.checkDefined(n.getScriptInfo(t)), u = ao() - o, m = { + file: t, + diagnostics: i.map((g) => ePe(t, n, g)), + spans: c?.map((g) => xm(g, _)) + }; + this.event( + m, + s + ), this.addDiagnosticsPerformanceData(t, s, u); + } catch (_) { + this.logError(_, s); + } + } + /** It is the caller's responsibility to verify that `!this.suppressDiagnosticEvents`. */ + updateErrorCheck(t, n, i, s = !0) { + if (n.length === 0) + return; + E.assert(!this.suppressDiagnosticEvents); + const o = this.changeSeq, c = Math.min(i, 200); + let _ = 0; + const u = () => { + if (_++, n.length > _) + return t.delay("checkOne", c, g); + }, m = (h, S) => { + if (this.semanticCheck(h, S), this.changeSeq === o) { + if (this.getPreferences(h).disableSuggestions) + return u(); + t.immediate("suggestionCheck", () => { + this.suggestionCheck(h, S), u(); + }); + } + }, g = () => { + if (this.changeSeq !== o) + return; + let h, S = n[_]; + if (rs(S) ? S = this.toPendingErrorCheck(S) : "ranges" in S && (h = S.ranges, S = this.toPendingErrorCheck(S.file)), !S) + return u(); + const { fileName: T, project: C } = S; + if (Up(C), !!C.containsFile(T, s) && (this.syntacticCheck(T, C), this.changeSeq === o)) { + if (C.projectService.serverMode !== 0) + return u(); + if (h) + return t.immediate("regionSemanticCheck", () => { + const D = this.projectService.getScriptInfoForNormalizedPath(T); + D && this.regionSemanticCheck(T, C, h.map((w) => this.getRange({ file: T, ...w }, D))), this.changeSeq === o && t.immediate("semanticCheck", () => m(T, C)); + }); + t.immediate("semanticCheck", () => m(T, C)); + } + }; + n.length > _ && this.changeSeq === o && t.delay("checkOne", i, g); + } + cleanProjects(t, n) { + if (n) { + this.logger.info(`cleaning ${t}`); + for (const i of n) + i.getLanguageService( + /*ensureSynchronized*/ + !1 + ).cleanupSemanticCache(), i.cleanupProgram(); + } + } + cleanup() { + this.cleanProjects("inferred projects", this.projectService.inferredProjects), this.cleanProjects("configured projects", Ki(this.projectService.configuredProjects.values())), this.cleanProjects("external projects", this.projectService.externalProjects), this.host.gc && (this.logger.info("host.gc()"), this.host.gc()); + } + getEncodedSyntacticClassifications(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t); + return i.getEncodedSyntacticClassifications(n, t); + } + getEncodedSemanticClassifications(t) { + const { file: n, project: i } = this.getFileAndProject(t), s = t.format === "2020" ? "2020" : "original"; + return i.getLanguageService().getEncodedSemanticClassifications(n, t, s); + } + getProject(t) { + return t === void 0 ? void 0 : this.projectService.findProject(t); + } + getConfigFileAndProject(t) { + const n = this.getProject(t.projectFileName), i = eo(t.file); + return { + configFile: n && n.hasConfigFile(i) ? i : void 0, + project: n + }; + } + getConfigFileDiagnostics(t, n, i) { + const s = n.getAllProjectErrors(), o = n.getLanguageService().getCompilerOptionsDiagnostics(), c = kn( + Wi(s, o), + (_) => !!_.file && _.file.fileName === t + ); + return i ? this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(c) : gr( + c, + (_) => y8( + _, + /*includeFileName*/ + !1 + ) + ); + } + convertToDiagnosticsWithLinePositionFromDiagnosticFile(t) { + return t.map((n) => ({ + message: vm(n.messageText, this.host.newLine), + start: n.start, + // TODO: GH#18217 + length: n.length, + // TODO: GH#18217 + category: rS(n), + code: n.code, + source: n.source, + startLocation: n.file && Y6(js(n.file, n.start)), + // TODO: GH#18217 + endLocation: n.file && Y6(js(n.file, n.start + n.length)), + // TODO: GH#18217 + reportsUnnecessary: n.reportsUnnecessary, + reportsDeprecated: n.reportsDeprecated, + relatedInformation: gr(n.relatedInformation, SG) + })); + } + getCompilerOptionsDiagnostics(t) { + const n = this.getProject(t.projectFileName); + return this.convertToDiagnosticsWithLinePosition( + kn( + n.getLanguageService().getCompilerOptionsDiagnostics(), + (i) => !i.file + ), + /*scriptInfo*/ + void 0 + ); + } + convertToDiagnosticsWithLinePosition(t, n) { + return t.map( + (i) => ({ + message: vm(i.messageText, this.host.newLine), + start: i.start, + length: i.length, + category: rS(i), + code: i.code, + source: i.source, + startLocation: n && n.positionToLineOffset(i.start), + // TODO: GH#18217 + endLocation: n && n.positionToLineOffset(i.start + i.length), + reportsUnnecessary: i.reportsUnnecessary, + reportsDeprecated: i.reportsDeprecated, + relatedInformation: gr(i.relatedInformation, SG) + }) + ); + } + getDiagnosticsWorker(t, n, i, s) { + const { project: o, file: c } = this.getFileAndProject(t); + if (n && Kwe(o, c)) + return pl; + const _ = o.getScriptInfoForNormalizedPath(c), u = i(o, c); + return s ? this.convertToDiagnosticsWithLinePosition(u, _) : u.map((m) => ePe(c, o, m)); + } + getDefinition(t, n) { + const { file: i, project: s } = this.getFileAndProject(t), o = this.getPositionInFile(t, i), c = this.mapDefinitionInfoLocations(s.getLanguageService().getDefinitionAtPosition(i, o) || pl, s); + return n ? this.mapDefinitionInfo(c, s) : c.map(IX.mapToOriginalLocation); + } + mapDefinitionInfoLocations(t, n) { + return t.map((i) => { + const s = oPe(i, n); + return s ? { + ...s, + containerKind: i.containerKind, + containerName: i.containerName, + kind: i.kind, + name: i.name, + failedAliasResolution: i.failedAliasResolution, + ...i.unverified && { unverified: i.unverified } + } : i; + }); + } + getDefinitionAndBoundSpan(t, n) { + const { file: i, project: s } = this.getFileAndProject(t), o = this.getPositionInFile(t, i), c = E.checkDefined(s.getScriptInfo(i)), _ = s.getLanguageService().getDefinitionAndBoundSpan(i, o); + if (!_ || !_.definitions) + return { + definitions: pl, + textSpan: void 0 + // TODO: GH#18217 + }; + const u = this.mapDefinitionInfoLocations(_.definitions, s), { textSpan: m } = _; + return n ? { + definitions: this.mapDefinitionInfo(u, s), + textSpan: xm(m, c) + } : { + definitions: u.map(IX.mapToOriginalLocation), + textSpan: m + }; + } + findSourceDefinition(t) { + var n; + const { file: i, project: s } = this.getFileAndProject(t), o = this.getPositionInFile(t, i), c = s.getLanguageService().getDefinitionAtPosition(i, o); + let _ = this.mapDefinitionInfoLocations(c || pl, s).slice(); + if (this.projectService.serverMode === 0 && (!at(_, (T) => eo(T.fileName) !== i && !T.isAmbient) || at(_, (T) => !!T.failedAliasResolution))) { + const T = DR( + (A) => A.textSpan.start, + FV(this.host.useCaseSensitiveFileNames) + ); + _?.forEach((A) => T.add(A)); + const C = s.getNoDtsResolutionProject(i), D = C.getLanguageService(), w = (n = D.getDefinitionAtPosition( + i, + o, + /*searchOtherFilesOnly*/ + !0, + /*stopAtAlias*/ + !1 + )) == null ? void 0 : n.filter((A) => eo(A.fileName) !== i); + if (at(w)) + for (const A of w) { + if (A.unverified) { + const O = h(A, s.getLanguageService().getProgram(), D.getProgram()); + if (at(O)) { + for (const F of O) + T.add(F); + continue; + } + } + T.add(A); + } + else { + const A = _.filter((O) => eo(O.fileName) !== i && O.isAmbient); + for (const O of at(A) ? A : g()) { + const F = m(O.fileName, i, C); + if (!F) continue; + const R = this.projectService.getOrCreateScriptInfoNotOpenedByClient( + F, + C.currentDirectory, + C.directoryStructureHost, + /*deferredDeleteOk*/ + !1 + ); + if (!R) continue; + C.containsScriptInfo(R) || (C.addRoot(R), C.updateGraph()); + const W = D.getProgram(), V = E.checkDefined(W.getSourceFile(F)); + for (const $ of S(O.name, V, W)) + T.add($); + } + } + _ = Ki(T.values()); + } + return _ = _.filter((T) => !T.isAmbient && !T.failedAliasResolution), this.mapDefinitionInfo(_, s); + function m(T, C, D) { + var w, A, O; + const F = $5(T); + if (F && T.lastIndexOf(Kg) === F.topLevelNodeModulesIndex) { + const R = T.substring(0, F.packageRootIndex), W = (w = s.getModuleResolutionCache()) == null ? void 0 : w.getPackageJsonInfoCache(), V = s.getCompilationSettings(), $ = jD(Xi(R, s.getCurrentDirectory()), RD(W, s, V)); + if (!$) return; + const U = eW( + $, + { + moduleResolution: 2 + /* Node10 */ + }, + s, + s.getModuleResolutionCache() + ), _e = T.substring( + F.topLevelPackageNameIndex + 1, + F.packageRootIndex + ), Z = BD(zN(_e)), J = s.toPath(T); + if (U && at(U, (re) => s.toPath(re) === J)) + return (A = D.resolutionCache.resolveSingleModuleNameWithoutWatching(Z, C).resolvedModule) == null ? void 0 : A.resolvedFileName; + { + const re = T.substring(F.packageRootIndex + 1), te = `${Z}/${$u(re)}`; + return (O = D.resolutionCache.resolveSingleModuleNameWithoutWatching(te, C).resolvedModule) == null ? void 0 : O.resolvedFileName; + } + } + } + function g() { + const T = s.getLanguageService(), C = T.getProgram(), D = h_(C.getSourceFile(i), o); + return (Na(D) || Me(D)) && vo(D.parent) && ree(D, (w) => { + var A; + if (w === D) return; + const O = (A = T.getDefinitionAtPosition( + i, + w.getStart(), + /*searchOtherFilesOnly*/ + !0, + /*stopAtAlias*/ + !1 + )) == null ? void 0 : A.filter((F) => eo(F.fileName) !== i && F.isAmbient).map((F) => ({ + fileName: F.fileName, + name: rp(D) + })); + if (at(O)) + return O; + }) || pl; + } + function h(T, C, D) { + var w; + const A = D.getSourceFile(T.fileName); + if (!A) + return; + const O = h_(C.getSourceFile(i), o), F = C.getTypeChecker().getSymbolAtLocation(O), R = F && Lo( + F, + 276 + /* ImportSpecifier */ + ); + if (!R) return; + const W = ((w = R.propertyName) == null ? void 0 : w.text) || R.name.text; + return S(W, A, D); + } + function S(T, C, D) { + const w = So.Core.getTopMostDeclarationNamesInFile(T, C); + return Li(w, (A) => { + const O = D.getTypeChecker().getSymbolAtLocation(A), F = R4(A); + if (O && F) + return H6.createDefinitionInfo( + F, + D.getTypeChecker(), + O, + F, + /*unverified*/ + !0 + ); + }); + } + } + getEmitOutput(t) { + const { file: n, project: i } = this.getFileAndProject(t); + if (!i.shouldEmitFile(i.getScriptInfo(n))) + return { emitSkipped: !0, outputFiles: [], diagnostics: [] }; + const s = i.getLanguageService().getEmitOutput(n); + return t.richResponse ? { + ...s, + diagnostics: t.includeLinePosition ? this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(s.diagnostics) : s.diagnostics.map((o) => y8( + o, + /*includeFileName*/ + !0 + )) + } : s; + } + mapJSDocTagInfo(t, n, i) { + return t ? t.map((s) => { + var o; + return { + ...s, + text: i ? this.mapDisplayParts(s.text, n) : (o = s.text) == null ? void 0 : o.map((c) => c.text).join("") + }; + }) : []; + } + mapDisplayParts(t, n) { + return t ? t.map( + (i) => i.kind !== "linkName" ? i : { + ...i, + target: this.toFileSpan(i.target.fileName, i.target.textSpan, n) + } + ) : []; + } + mapSignatureHelpItems(t, n, i) { + return t.map((s) => ({ + ...s, + documentation: this.mapDisplayParts(s.documentation, n), + parameters: s.parameters.map((o) => ({ ...o, documentation: this.mapDisplayParts(o.documentation, n) })), + tags: this.mapJSDocTagInfo(s.tags, n, i) + })); + } + mapDefinitionInfo(t, n) { + return t.map((i) => ({ ...this.toFileSpanWithContext(i.fileName, i.textSpan, i.contextSpan, n), ...i.unverified && { unverified: i.unverified } })); + } + /* + * When we map a .d.ts location to .ts, Visual Studio gets confused because there's no associated Roslyn Document in + * the same project which corresponds to the file. VS Code has no problem with this, and luckily we have two protocols. + * This retains the existing behavior for the "simplified" (VS Code) protocol but stores the .d.ts location in a + * set of additional fields, and does the reverse for VS (store the .d.ts location where + * it used to be and stores the .ts location in the additional fields). + */ + static mapToOriginalLocation(t) { + return t.originalFileName ? (E.assert(t.originalTextSpan !== void 0, "originalTextSpan should be present if originalFileName is"), { + ...t, + fileName: t.originalFileName, + textSpan: t.originalTextSpan, + targetFileName: t.fileName, + targetTextSpan: t.textSpan, + contextSpan: t.originalContextSpan, + targetContextSpan: t.contextSpan + }) : t; + } + toFileSpan(t, n, i) { + const s = i.getLanguageService(), o = s.toLineColumnOffset(t, n.start), c = s.toLineColumnOffset(t, Yo(n)); + return { + file: t, + start: { line: o.line + 1, offset: o.character + 1 }, + end: { line: c.line + 1, offset: c.character + 1 } + }; + } + toFileSpanWithContext(t, n, i, s) { + const o = this.toFileSpan(t, n, s), c = i && this.toFileSpan(t, i, s); + return c ? { ...o, contextStart: c.start, contextEnd: c.end } : o; + } + getTypeDefinition(t) { + const { file: n, project: i } = this.getFileAndProject(t), s = this.getPositionInFile(t, n), o = this.mapDefinitionInfoLocations(i.getLanguageService().getTypeDefinitionAtPosition(n, s) || pl, i); + return this.mapDefinitionInfo(o, i); + } + mapImplementationLocations(t, n) { + return t.map((i) => { + const s = oPe(i, n); + return s ? { + ...s, + kind: i.kind, + displayParts: i.displayParts + } : i; + }); + } + getImplementation(t, n) { + const { file: i, project: s } = this.getFileAndProject(t), o = this.getPositionInFile(t, i), c = this.mapImplementationLocations(s.getLanguageService().getImplementationAtPosition(i, o) || pl, s); + return n ? c.map(({ fileName: _, textSpan: u, contextSpan: m }) => this.toFileSpanWithContext(_, u, m, s)) : c.map(IX.mapToOriginalLocation); + } + getSyntacticDiagnosticsSync(t) { + const { configFile: n } = this.getConfigFileAndProject(t); + return n ? pl : this.getDiagnosticsWorker( + t, + /*isSemantic*/ + !1, + (i, s) => i.getLanguageService().getSyntacticDiagnostics(s), + !!t.includeLinePosition + ); + } + getSemanticDiagnosticsSync(t) { + const { configFile: n, project: i } = this.getConfigFileAndProject(t); + return n ? this.getConfigFileDiagnostics(n, i, !!t.includeLinePosition) : this.getDiagnosticsWorker( + t, + /*isSemantic*/ + !0, + (s, o) => s.getLanguageService().getSemanticDiagnostics(o).filter((c) => !!c.file), + !!t.includeLinePosition + ); + } + getSuggestionDiagnosticsSync(t) { + const { configFile: n } = this.getConfigFileAndProject(t); + return n ? pl : this.getDiagnosticsWorker( + t, + /*isSemantic*/ + !0, + (i, s) => i.getLanguageService().getSuggestionDiagnostics(s), + !!t.includeLinePosition + ); + } + getJsxClosingTag(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t), s = this.getPositionInFile(t, n), o = i.getJsxClosingTagAtPosition(n, s); + return o === void 0 ? void 0 : { newText: o.newText, caretOffset: 0 }; + } + getLinkedEditingRange(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t), s = this.getPositionInFile(t, n), o = i.getLinkedEditingRangeAtPosition(n, s), c = this.projectService.getScriptInfoForNormalizedPath(n); + if (!(c === void 0 || o === void 0)) + return CKe(o, c); + } + getDocumentHighlights(t, n) { + const { file: i, project: s } = this.getFileAndProject(t), o = this.getPositionInFile(t, i), c = s.getLanguageService().getDocumentHighlights(i, o, t.filesToSearch); + return c ? n ? c.map(({ fileName: _, highlightSpans: u }) => { + const m = s.getScriptInfo(_); + return { + file: _, + highlightSpans: u.map(({ textSpan: g, kind: h, contextSpan: S }) => ({ + ...rfe(g, S, m), + kind: h + })) + }; + }) : c : pl; + } + provideInlayHints(t) { + const { file: n, project: i } = this.getFileAndProject(t), s = this.projectService.getScriptInfoForNormalizedPath(n); + return i.getLanguageService().provideInlayHints(n, t, this.getPreferences(n)).map((c) => { + const { position: _, displayParts: u } = c; + return { + ...c, + position: s.positionToLineOffset(_), + displayParts: u?.map(({ text: m, span: g, file: h }) => { + if (g) { + E.assertIsDefined(h, "Target file should be defined together with its span."); + const S = this.projectService.getScriptInfo(h); + return { + text: m, + span: { + start: S.positionToLineOffset(g.start), + end: S.positionToLineOffset(g.start + g.length), + file: h + } + }; + } else + return { text: m }; + }) + }; + }); + } + mapCode(t) { + var n; + const i = this.getHostFormatOptions(), s = this.getHostPreferences(), { file: o, languageService: c } = this.getFileAndLanguageServiceForSyntacticOperation(t), _ = this.projectService.getScriptInfoForNormalizedPath(o), u = (n = t.mapping.focusLocations) == null ? void 0 : n.map((g) => g.map((h) => { + const S = _.lineOffsetToPosition(h.start.line, h.start.offset), T = _.lineOffsetToPosition(h.end.line, h.end.offset); + return { + start: S, + length: T - S + }; + })), m = c.mapCode(o, t.mapping.contents, u, i, s); + return this.mapTextChangesToCodeEdits(m); + } + getCopilotRelatedInfo() { + return { + relatedFiles: [] + }; + } + setCompilerOptionsForInferredProjects(t) { + this.projectService.setCompilerOptionsForInferredProjects(t.options, t.projectRootPath); + } + getProjectInfo(t) { + return this.getProjectInfoWorker( + t.file, + t.projectFileName, + t.needFileNameList, + t.needDefaultConfiguredProjectInfo, + /*excludeConfigFiles*/ + !1 + ); + } + getProjectInfoWorker(t, n, i, s, o) { + const { project: c } = this.getFileAndProjectWorker(t, n); + return Up(c), { + configFileName: c.getProjectName(), + languageServiceDisabled: !c.languageServiceEnabled, + fileNames: i ? c.getFileNames( + /*excludeFilesFromExternalLibraries*/ + !1, + o + ) : void 0, + configuredProjectInfo: s ? this.getDefaultConfiguredProjectInfo(t) : void 0 + }; + } + getDefaultConfiguredProjectInfo(t) { + var n; + const i = this.projectService.getScriptInfo(t); + if (!i) return; + const s = this.projectService.findDefaultConfiguredProjectWorker( + i, + 3 + /* CreateReplay */ + ); + if (!s) return; + let o, c; + return s.seenProjects.forEach((_, u) => { + u !== s.defaultProject && (_ !== 3 ? (o ?? (o = [])).push(eo(u.getConfigFilePath())) : (c ?? (c = [])).push(eo(u.getConfigFilePath()))); + }), (n = s.seenConfigs) == null || n.forEach((_) => (o ?? (o = [])).push(_)), { + notMatchedByConfig: o, + notInProject: c, + defaultProject: s.defaultProject && eo(s.defaultProject.getConfigFilePath()) + }; + } + getRenameInfo(t) { + const { file: n, project: i } = this.getFileAndProject(t), s = this.getPositionInFile(t, n), o = this.getPreferences(n); + return i.getLanguageService().getRenameInfo(n, s, o); + } + getProjects(t, n, i) { + let s, o; + if (t.projectFileName) { + const c = this.getProject(t.projectFileName); + c && (s = [c]); + } else { + const c = n ? this.projectService.getScriptInfoEnsuringProjectsUptoDate(t.file) : this.projectService.getScriptInfo(t.file); + if (c) + n || this.projectService.ensureDefaultProjectForFile(c); + else return i ? pl : (this.projectService.logErrorForScriptInfoNotFound(t.file), Vh.ThrowNoProject()); + s = c.containingProjects, o = this.projectService.getSymlinkedProjects(c); + } + return s = kn(s, (c) => c.languageServiceEnabled && !c.isOrphan()), !i && (!s || !s.length) && !o ? (this.projectService.logErrorForScriptInfoNotFound(t.file ?? t.projectFileName), Vh.ThrowNoProject()) : o ? { projects: s, symLinkedProjects: o } : s; + } + getDefaultProject(t) { + if (t.projectFileName) { + const i = this.getProject(t.projectFileName); + if (i) + return i; + if (!t.file) + return Vh.ThrowNoProject(); + } + return this.projectService.getScriptInfo(t.file).getDefaultProject(); + } + getRenameLocations(t, n) { + const i = eo(t.file), s = this.getPositionInFile(t, i), o = this.getProjects(t), c = this.getDefaultProject(t), _ = this.getPreferences(i), u = this.mapRenameInfo( + c.getLanguageService().getRenameInfo(i, s, _), + E.checkDefined(this.projectService.getScriptInfo(i)) + ); + if (!u.canRename) return n ? { info: u, locs: [] } : []; + const m = vKe( + o, + c, + { fileName: t.file, pos: s }, + !!t.findInStrings, + !!t.findInComments, + _, + this.host.useCaseSensitiveFileNames + ); + return n ? { info: u, locs: this.toSpanGroups(m) } : m; + } + mapRenameInfo(t, n) { + if (t.canRename) { + const { canRename: i, fileToRename: s, displayName: o, fullDisplayName: c, kind: _, kindModifiers: u, triggerSpan: m } = t; + return { canRename: i, fileToRename: s, displayName: o, fullDisplayName: c, kind: _, kindModifiers: u, triggerSpan: xm(m, n) }; + } else + return t; + } + toSpanGroups(t) { + const n = /* @__PURE__ */ new Map(); + for (const { fileName: i, textSpan: s, contextSpan: o, originalContextSpan: c, originalTextSpan: _, originalFileName: u, ...m } of t) { + let g = n.get(i); + g || n.set(i, g = { file: i, locs: [] }); + const h = E.checkDefined(this.projectService.getScriptInfo(i)); + g.locs.push({ ...rfe(s, o, h), ...m }); + } + return Ki(n.values()); + } + getReferences(t, n) { + const i = eo(t.file), s = this.getProjects(t), o = this.getPositionInFile(t, i), c = bKe( + s, + this.getDefaultProject(t), + { fileName: t.file, pos: o }, + this.host.useCaseSensitiveFileNames, + this.logger + ); + if (!n) return c; + const _ = this.getPreferences(i), u = this.getDefaultProject(t), m = u.getScriptInfoForNormalizedPath(i), g = u.getLanguageService().getQuickInfoAtPosition(i, o), h = g ? WA(g.displayParts) : "", S = g && g.textSpan, T = S ? m.positionToLineOffset(S.start).offset : 0, C = S ? m.getSnapshot().getText(S.start, Yo(S)) : ""; + return { refs: na(c, (w) => w.references.map((A) => fPe(this.projectService, A, _))), symbolName: C, symbolStartOffset: T, symbolDisplayString: h }; + } + getFileReferences(t, n) { + const i = this.getProjects(t), s = eo(t.file), o = this.getPreferences(s), c = { fileName: s, pos: 0 }, _ = tfe( + i, + this.getDefaultProject(t), + c, + c, + iPe, + (g) => (this.logger.info(`Finding references to file ${s} in project ${g.getProjectName()}`), g.getLanguageService().getFileReferences(s)) + ); + let u; + if (os(_)) + u = _; + else { + u = []; + const g = TG(this.host.useCaseSensitiveFileNames); + _.forEach((h) => { + for (const S of h) + g.has(S) || (u.push(S), g.add(S)); + }); + } + return n ? { + refs: u.map((g) => fPe(this.projectService, g, o)), + symbolName: `"${t.file}"` + } : u; + } + /** + * @param fileName is the name of the file to be opened + * @param fileContent is a version of the file content that is known to be more up to date than the one on disk + */ + openClientFile(t, n, i, s) { + this.projectService.openClientFileWithNormalizedPath( + t, + n, + i, + /*hasMixedContent*/ + !1, + s + ); + } + getPosition(t, n) { + return t.position !== void 0 ? t.position : n.lineOffsetToPosition(t.line, t.offset); + } + getPositionInFile(t, n) { + const i = this.projectService.getScriptInfoForNormalizedPath(n); + return this.getPosition(t, i); + } + getFileAndProject(t) { + return this.getFileAndProjectWorker(t.file, t.projectFileName); + } + getFileAndLanguageServiceForSyntacticOperation(t) { + const { file: n, project: i } = this.getFileAndProject(t); + return { + file: n, + languageService: i.getLanguageService( + /*ensureSynchronized*/ + !1 + ) + }; + } + getFileAndProjectWorker(t, n) { + const i = eo(t), s = this.getProject(n) || this.projectService.ensureDefaultProjectForFile(i); + return { file: i, project: s }; + } + getOutliningSpans(t, n) { + const { file: i, languageService: s } = this.getFileAndLanguageServiceForSyntacticOperation(t), o = s.getOutliningSpans(i); + if (n) { + const c = this.projectService.getScriptInfoForNormalizedPath(i); + return o.map((_) => ({ + textSpan: xm(_.textSpan, c), + hintSpan: xm(_.hintSpan, c), + bannerText: _.bannerText, + autoCollapse: _.autoCollapse, + kind: _.kind + })); + } else + return o; + } + getTodoComments(t) { + const { file: n, project: i } = this.getFileAndProject(t); + return i.getLanguageService().getTodoComments(n, t.descriptors); + } + getDocCommentTemplate(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t), s = this.getPositionInFile(t, n); + return i.getDocCommentTemplateAtPosition(n, s, this.getPreferences(n), this.getFormatOptions(n)); + } + getSpanOfEnclosingComment(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t), s = t.onlyMultiLine, o = this.getPositionInFile(t, n); + return i.getSpanOfEnclosingComment(n, o, s); + } + getIndentation(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t), s = this.getPositionInFile(t, n), o = t.options ? Q6(t.options) : this.getFormatOptions(n), c = i.getIndentationAtPosition(n, s, o); + return { position: s, indentation: c }; + } + getBreakpointStatement(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t), s = this.getPositionInFile(t, n); + return i.getBreakpointStatementAtPosition(n, s); + } + getNameOrDottedNameSpan(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t), s = this.getPositionInFile(t, n); + return i.getNameOrDottedNameSpan(n, s, s); + } + isValidBraceCompletion(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t), s = this.getPositionInFile(t, n); + return i.isValidBraceCompletionAtPosition(n, s, t.openingBrace.charCodeAt(0)); + } + getQuickInfoWorker(t, n) { + const { file: i, project: s } = this.getFileAndProject(t), o = this.projectService.getScriptInfoForNormalizedPath(i), c = s.getLanguageService().getQuickInfoAtPosition(i, this.getPosition(t, o)); + if (!c) + return; + const _ = !!this.getPreferences(i).displayPartsForJSDoc; + if (n) { + const u = WA(c.displayParts); + return { + kind: c.kind, + kindModifiers: c.kindModifiers, + start: o.positionToLineOffset(c.textSpan.start), + end: o.positionToLineOffset(Yo(c.textSpan)), + displayString: u, + documentation: _ ? this.mapDisplayParts(c.documentation, s) : WA(c.documentation), + tags: this.mapJSDocTagInfo(c.tags, s, _) + }; + } else + return _ ? c : { + ...c, + tags: this.mapJSDocTagInfo( + c.tags, + s, + /*richResponse*/ + !1 + ) + }; + } + getFormattingEditsForRange(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t), s = this.projectService.getScriptInfoForNormalizedPath(n), o = s.lineOffsetToPosition(t.line, t.offset), c = s.lineOffsetToPosition(t.endLine, t.endOffset), _ = i.getFormattingEditsForRange(n, o, c, this.getFormatOptions(n)); + if (_) + return _.map((u) => this.convertTextChangeToCodeEdit(u, s)); + } + getFormattingEditsForRangeFull(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t), s = t.options ? Q6(t.options) : this.getFormatOptions(n); + return i.getFormattingEditsForRange(n, t.position, t.endPosition, s); + } + getFormattingEditsForDocumentFull(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t), s = t.options ? Q6(t.options) : this.getFormatOptions(n); + return i.getFormattingEditsForDocument(n, s); + } + getFormattingEditsAfterKeystrokeFull(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t), s = t.options ? Q6(t.options) : this.getFormatOptions(n); + return i.getFormattingEditsAfterKeystroke(n, t.position, t.key, s); + } + getFormattingEditsAfterKeystroke(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t), s = this.projectService.getScriptInfoForNormalizedPath(n), o = s.lineOffsetToPosition(t.line, t.offset), c = this.getFormatOptions(n), _ = i.getFormattingEditsAfterKeystroke(n, o, t.key, c); + if (t.key === ` +` && (!_ || _.length === 0 || gKe(_, o))) { + const { lineText: u, absolutePosition: m } = s.textStorage.getAbsolutePositionAndLineText(t.line); + if (u && u.search("\\S") < 0) { + const g = i.getIndentationAtPosition(n, o, c); + let h = 0, S, T; + for (S = 0, T = u.length; S < T; S++) + if (u.charAt(S) === " ") + h++; + else if (u.charAt(S) === " ") + h += c.tabSize; + else + break; + if (g !== h) { + const C = m + S; + _.push({ + span: bc(m, C), + newText: Qc.getIndentationString(g, c) + }); + } + } + } + if (_) + return _.map((u) => ({ + start: s.positionToLineOffset(u.span.start), + end: s.positionToLineOffset(Yo(u.span)), + newText: u.newText ? u.newText : "" + })); + } + getCompletions(t, n) { + const { file: i, project: s } = this.getFileAndProject(t), o = this.projectService.getScriptInfoForNormalizedPath(i), c = this.getPosition(t, o), _ = s.getLanguageService().getCompletionsAtPosition( + i, + c, + { + ...R_e(this.getPreferences(i)), + triggerCharacter: t.triggerCharacter, + triggerKind: t.triggerKind, + includeExternalModuleExports: t.includeExternalModuleExports, + includeInsertTextCompletions: t.includeInsertTextCompletions + }, + s.projectService.getFormatCodeOptions(i) + ); + if (_ === void 0) return; + if (n === "completions-full") return _; + const u = t.prefix || "", m = Li(_.entries, (h) => { + if (_.isMemberCompletion || Vi(h.name.toLowerCase(), u.toLowerCase())) { + const S = h.replacementSpan ? xm(h.replacementSpan, o) : void 0; + return { + ...h, + replacementSpan: S, + hasAction: h.hasAction || void 0, + symbol: void 0 + }; + } + }); + return n === "completions" ? (_.metadata && (m.metadata = _.metadata), m) : { + ..._, + optionalReplacementSpan: _.optionalReplacementSpan && xm(_.optionalReplacementSpan, o), + entries: m + }; + } + getCompletionEntryDetails(t, n) { + const { file: i, project: s } = this.getFileAndProject(t), o = this.projectService.getScriptInfoForNormalizedPath(i), c = this.getPosition(t, o), _ = s.projectService.getFormatCodeOptions(i), u = !!this.getPreferences(i).displayPartsForJSDoc, m = Li(t.entryNames, (g) => { + const { name: h, source: S, data: T } = typeof g == "string" ? { name: g, source: void 0, data: void 0 } : g; + return s.getLanguageService().getCompletionEntryDetails(i, c, h, _, S, this.getPreferences(i), T ? Ws(T, NKe) : void 0); + }); + return n ? u ? m : m.map((g) => ({ ...g, tags: this.mapJSDocTagInfo( + g.tags, + s, + /*richResponse*/ + !1 + ) })) : m.map((g) => ({ + ...g, + codeActions: gr(g.codeActions, (h) => this.mapCodeAction(h)), + documentation: this.mapDisplayParts(g.documentation, s), + tags: this.mapJSDocTagInfo(g.tags, s, u) + })); + } + getCompileOnSaveAffectedFileList(t) { + const n = this.getProjects( + t, + /*getScriptInfoEnsuringProjectsUptoDate*/ + !0, + /*ignoreNoProjectError*/ + !0 + ), i = this.projectService.getScriptInfo(t.file); + return i ? yKe( + i, + (s) => this.projectService.getScriptInfoForPath(s), + n, + (s, o) => { + if (!s.compileOnSaveEnabled || !s.languageServiceEnabled || s.isOrphan()) + return; + const c = s.getCompilationSettings(); + if (!(c.noEmit || fl(o.fileName) && !mKe(c))) + return { + projectFileName: s.getProjectName(), + fileNames: s.getCompileOnSaveAffectedFileList(o), + projectUsesOutFile: !!c.outFile + }; + } + ) : pl; + } + emitFile(t) { + const { file: n, project: i } = this.getFileAndProject(t); + if (i || Vh.ThrowNoProject(), !i.languageServiceEnabled) + return t.richResponse ? { emitSkipped: !0, diagnostics: [] } : !1; + const s = i.getScriptInfo(n), { emitSkipped: o, diagnostics: c } = i.emitFile(s, (_, u, m) => this.host.writeFile(_, u, m)); + return t.richResponse ? { + emitSkipped: o, + diagnostics: t.includeLinePosition ? this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(c) : c.map((_) => y8( + _, + /*includeFileName*/ + !0 + )) + } : !o; + } + getSignatureHelpItems(t, n) { + const { file: i, project: s } = this.getFileAndProject(t), o = this.projectService.getScriptInfoForNormalizedPath(i), c = this.getPosition(t, o), _ = s.getLanguageService().getSignatureHelpItems(i, c, t), u = !!this.getPreferences(i).displayPartsForJSDoc; + if (_ && n) { + const m = _.applicableSpan; + return { + ..._, + applicableSpan: { + start: o.positionToLineOffset(m.start), + end: o.positionToLineOffset(m.start + m.length) + }, + items: this.mapSignatureHelpItems(_.items, s, u) + }; + } else return u || !_ ? _ : { + ..._, + items: _.items.map((m) => ({ ...m, tags: this.mapJSDocTagInfo( + m.tags, + s, + /*richResponse*/ + !1 + ) })) + }; + } + toPendingErrorCheck(t) { + const n = eo(t), i = this.projectService.tryGetDefaultProjectForFile(n); + return i && { fileName: n, project: i }; + } + getDiagnostics(t, n, i) { + this.suppressDiagnosticEvents || i.length > 0 && this.updateErrorCheck(t, i, n); + } + change(t) { + const n = this.projectService.getScriptInfo(t.file); + E.assert(!!n), n.textStorage.switchToScriptVersionCache(); + const i = n.lineOffsetToPosition(t.line, t.offset), s = n.lineOffsetToPosition(t.endLine, t.endOffset); + i >= 0 && (this.changeSeq++, this.projectService.applyChangesToFile( + n, + BX({ + span: { start: i, length: s - i }, + newText: t.insertString + // TODO: GH#18217 + }) + )); + } + reload(t) { + const n = eo(t.file), i = t.tmpfile === void 0 ? void 0 : eo(t.tmpfile), s = this.projectService.getScriptInfoForNormalizedPath(n); + s && (this.changeSeq++, s.reloadFromFile(i)); + } + saveToTmp(t, n) { + const i = this.projectService.getScriptInfo(t); + i && i.saveTo(n); + } + closeClientFile(t) { + if (!t) + return; + const n = Hs(t); + this.projectService.closeClientFile(n); + } + mapLocationNavigationBarItems(t, n) { + return gr(t, (i) => ({ + text: i.text, + kind: i.kind, + kindModifiers: i.kindModifiers, + spans: i.spans.map((s) => xm(s, n)), + childItems: this.mapLocationNavigationBarItems(i.childItems, n), + indent: i.indent + })); + } + getNavigationBarItems(t, n) { + const { file: i, languageService: s } = this.getFileAndLanguageServiceForSyntacticOperation(t), o = s.getNavigationBarItems(i); + return o ? n ? this.mapLocationNavigationBarItems(o, this.projectService.getScriptInfoForNormalizedPath(i)) : o : void 0; + } + toLocationNavigationTree(t, n) { + return { + text: t.text, + kind: t.kind, + kindModifiers: t.kindModifiers, + spans: t.spans.map((i) => xm(i, n)), + nameSpan: t.nameSpan && xm(t.nameSpan, n), + childItems: gr(t.childItems, (i) => this.toLocationNavigationTree(i, n)) + }; + } + getNavigationTree(t, n) { + const { file: i, languageService: s } = this.getFileAndLanguageServiceForSyntacticOperation(t), o = s.getNavigationTree(i); + return o ? n ? this.toLocationNavigationTree(o, this.projectService.getScriptInfoForNormalizedPath(i)) : o : void 0; + } + getNavigateToItems(t, n) { + const i = this.getFullNavigateToItems(t); + return n ? na( + i, + ({ project: s, navigateToItems: o }) => o.map((c) => { + const _ = s.getScriptInfo(c.fileName), u = { + name: c.name, + kind: c.kind, + kindModifiers: c.kindModifiers, + isCaseSensitive: c.isCaseSensitive, + matchKind: c.matchKind, + file: c.fileName, + start: _.positionToLineOffset(c.textSpan.start), + end: _.positionToLineOffset(Yo(c.textSpan)) + }; + return c.kindModifiers && c.kindModifiers !== "" && (u.kindModifiers = c.kindModifiers), c.containerName && c.containerName.length > 0 && (u.containerName = c.containerName), c.containerKind && c.containerKind.length > 0 && (u.containerKind = c.containerKind), u; + }) + ) : na(i, ({ navigateToItems: s }) => s); + } + getFullNavigateToItems(t) { + const { currentFileOnly: n, searchValue: i, maxResultCount: s, projectFileName: o } = t; + if (n) { + E.assertIsDefined(t.file); + const { file: S, project: T } = this.getFileAndProject(t); + return [{ project: T, navigateToItems: T.getLanguageService().getNavigateToItems(i, s, S) }]; + } + const c = this.getHostPreferences(), _ = [], u = /* @__PURE__ */ new Map(); + if (!t.file && !o) + this.projectService.loadAncestorProjectTree(), this.projectService.forEachEnabledProject((S) => m(S)); + else { + const S = this.getProjects(t); + nPe( + S, + /*path*/ + void 0, + (T) => m(T) + ); + } + return _; + function m(S) { + const T = S.getLanguageService().getNavigateToItems( + i, + s, + /*fileName*/ + void 0, + /*excludeDts*/ + S.isNonTsProject(), + /*excludeLibFiles*/ + c.excludeLibrarySymbolsInNavTo + ), C = kn(T, (D) => g(D) && !xG(Iw(D), S)); + C.length && _.push({ project: S, navigateToItems: C }); + } + function g(S) { + const T = S.name; + if (!u.has(T)) + return u.set(T, [S]), !0; + const C = u.get(T); + for (const D of C) + if (h(D, S)) + return !1; + return C.push(S), !0; + } + function h(S, T) { + return S === T ? !0 : !S || !T ? !1 : S.containerKind === T.containerKind && S.containerName === T.containerName && S.fileName === T.fileName && S.isCaseSensitive === T.isCaseSensitive && S.kind === T.kind && S.kindModifiers === T.kindModifiers && S.matchKind === T.matchKind && S.name === T.name && S.textSpan.start === T.textSpan.start && S.textSpan.length === T.textSpan.length; + } + } + getSupportedCodeFixes(t) { + if (!t) return Jq(); + if (t.file) { + const { file: i, project: s } = this.getFileAndProject(t); + return s.getLanguageService().getSupportedCodeFixes(i); + } + const n = this.getProject(t.projectFileName); + return n || Vh.ThrowNoProject(), n.getLanguageService().getSupportedCodeFixes(); + } + isLocation(t) { + return t.line !== void 0; + } + extractPositionOrRange(t, n) { + let i, s; + return this.isLocation(t) ? i = o(t) : s = this.getRange(t, n), E.checkDefined(i === void 0 ? s : i); + function o(c) { + return c.position !== void 0 ? c.position : n.lineOffsetToPosition(c.line, c.offset); + } + } + getRange(t, n) { + const { startPosition: i, endPosition: s } = this.getStartAndEndPosition(t, n); + return { pos: i, end: s }; + } + getApplicableRefactors(t) { + const { file: n, project: i } = this.getFileAndProject(t), s = i.getScriptInfoForNormalizedPath(n); + return i.getLanguageService().getApplicableRefactors(n, this.extractPositionOrRange(t, s), this.getPreferences(n), t.triggerReason, t.kind, t.includeInteractiveActions).map((c) => ({ ...c, actions: c.actions.map((_) => ({ ..._, range: _.range ? { start: Y6({ line: _.range.start.line, character: _.range.start.offset }), end: Y6({ line: _.range.end.line, character: _.range.end.offset }) } : void 0 })) })); + } + getEditsForRefactor(t, n) { + const { file: i, project: s } = this.getFileAndProject(t), o = s.getScriptInfoForNormalizedPath(i), c = s.getLanguageService().getEditsForRefactor( + i, + this.getFormatOptions(i), + this.extractPositionOrRange(t, o), + t.refactor, + t.action, + this.getPreferences(i), + t.interactiveRefactorArguments + ); + if (c === void 0) + return { + edits: [] + }; + if (n) { + const { renameFilename: _, renameLocation: u, edits: m } = c; + let g; + if (_ !== void 0 && u !== void 0) { + const h = s.getScriptInfoForNormalizedPath(eo(_)); + g = nfe(uk(h.getSnapshot()), _, u, m); + } + return { + renameLocation: g, + renameFilename: _, + edits: this.mapTextChangesToCodeEdits(m), + notApplicableReason: c.notApplicableReason + }; + } + return c; + } + getMoveToRefactoringFileSuggestions(t) { + const { file: n, project: i } = this.getFileAndProject(t), s = i.getScriptInfoForNormalizedPath(n); + return i.getLanguageService().getMoveToRefactoringFileSuggestions(n, this.extractPositionOrRange(t, s), this.getPreferences(n)); + } + preparePasteEdits(t) { + const { file: n, project: i } = this.getFileAndProject(t); + return i.getLanguageService().preparePasteEditsForFile(n, t.copiedTextSpan.map((s) => this.getRange({ file: n, startLine: s.start.line, startOffset: s.start.offset, endLine: s.end.line, endOffset: s.end.offset }, this.projectService.getScriptInfoForNormalizedPath(n)))); + } + getPasteEdits(t) { + const { file: n, project: i } = this.getFileAndProject(t); + if (Nw(n)) return; + const s = t.copiedFrom ? { file: t.copiedFrom.file, range: t.copiedFrom.spans.map((c) => this.getRange({ file: t.copiedFrom.file, startLine: c.start.line, startOffset: c.start.offset, endLine: c.end.line, endOffset: c.end.offset }, i.getScriptInfoForNormalizedPath(eo(t.copiedFrom.file)))) } : void 0, o = i.getLanguageService().getPasteEdits( + { + targetFile: n, + pastedText: t.pastedText, + pasteLocations: t.pasteLocations.map((c) => this.getRange({ file: n, startLine: c.start.line, startOffset: c.start.offset, endLine: c.end.line, endOffset: c.end.offset }, i.getScriptInfoForNormalizedPath(n))), + copiedFrom: s, + preferences: this.getPreferences(n) + }, + this.getFormatOptions(n) + ); + return o && this.mapPasteEditsAction(o); + } + organizeImports(t, n) { + E.assert(t.scope.type === "file"); + const { file: i, project: s } = this.getFileAndProject(t.scope.args), o = s.getLanguageService().organizeImports( + { + fileName: i, + mode: t.mode ?? (t.skipDestructiveCodeActions ? "SortAndCombine" : void 0), + type: "file" + }, + this.getFormatOptions(i), + this.getPreferences(i) + ); + return n ? this.mapTextChangesToCodeEdits(o) : o; + } + getEditsForFileRename(t, n) { + const i = eo(t.oldFilePath), s = eo(t.newFilePath), o = this.getHostFormatOptions(), c = this.getHostPreferences(), _ = /* @__PURE__ */ new Set(), u = []; + return this.projectService.loadAncestorProjectTree(), this.projectService.forEachEnabledProject((m) => { + const g = m.getLanguageService().getEditsForFileRename(i, s, o, c), h = []; + for (const S of g) + _.has(S.fileName) || (u.push(S), h.push(S.fileName)); + for (const S of h) + _.add(S); + }), n ? u.map((m) => this.mapTextChangeToCodeEdit(m)) : u; + } + getCodeFixes(t, n) { + const { file: i, project: s } = this.getFileAndProject(t), o = s.getScriptInfoForNormalizedPath(i), { startPosition: c, endPosition: _ } = this.getStartAndEndPosition(t, o); + let u; + try { + u = s.getLanguageService().getCodeFixesAtPosition(i, c, _, t.errorCodes, this.getFormatOptions(i), this.getPreferences(i)); + } catch (m) { + const g = s.getLanguageService(), h = [ + ...g.getSyntacticDiagnostics(i), + ...g.getSemanticDiagnostics(i), + ...g.getSuggestionDiagnostics(i) + ].map( + (T) => AP(c, _ - c, T.start, T.length) && T.code + ), S = t.errorCodes.find((T) => !h.includes(T)); + throw S !== void 0 && (m.message = `BADCLIENT: Bad error code, ${S} not found in range ${c}..${_} (found: ${h.join(", ")}); could have caused this error: +${m.message}`), m; + } + return n ? u.map((m) => this.mapCodeFixAction(m)) : u; + } + getCombinedCodeFix({ scope: t, fixId: n }, i) { + E.assert(t.type === "file"); + const { file: s, project: o } = this.getFileAndProject(t.args), c = o.getLanguageService().getCombinedCodeFix({ type: "file", fileName: s }, n, this.getFormatOptions(s), this.getPreferences(s)); + return i ? { changes: this.mapTextChangesToCodeEdits(c.changes), commands: c.commands } : c; + } + applyCodeActionCommand(t) { + const n = t.command; + for (const i of $T(n)) { + const { file: s, project: o } = this.getFileAndProject(i); + o.getLanguageService().applyCodeActionCommand(i, this.getFormatOptions(s)).then( + (c) => { + }, + (c) => { + } + ); + } + return {}; + } + getStartAndEndPosition(t, n) { + let i, s; + return t.startPosition !== void 0 ? i = t.startPosition : (i = n.lineOffsetToPosition(t.startLine, t.startOffset), t.startPosition = i), t.endPosition !== void 0 ? s = t.endPosition : (s = n.lineOffsetToPosition(t.endLine, t.endOffset), t.endPosition = s), { startPosition: i, endPosition: s }; + } + mapCodeAction({ description: t, changes: n, commands: i }) { + return { description: t, changes: this.mapTextChangesToCodeEdits(n), commands: i }; + } + mapCodeFixAction({ fixName: t, description: n, changes: i, commands: s, fixId: o, fixAllDescription: c }) { + return { fixName: t, description: n, changes: this.mapTextChangesToCodeEdits(i), commands: s, fixId: o, fixAllDescription: c }; + } + mapPasteEditsAction({ edits: t, fixId: n }) { + return { edits: this.mapTextChangesToCodeEdits(t), fixId: n }; + } + mapTextChangesToCodeEdits(t) { + return t.map((n) => this.mapTextChangeToCodeEdit(n)); + } + mapTextChangeToCodeEdit(t) { + const n = this.projectService.getScriptInfoOrConfig(t.fileName); + return !!t.isNewFile == !!n && (n || this.projectService.logErrorForScriptInfoNotFound(t.fileName), E.fail("Expected isNewFile for (only) new files. " + JSON.stringify({ isNewFile: !!t.isNewFile, hasScriptInfo: !!n }))), n ? { fileName: t.fileName, textChanges: t.textChanges.map((i) => kKe(i, n)) } : DKe(t); + } + convertTextChangeToCodeEdit(t, n) { + return { + start: n.positionToLineOffset(t.span.start), + end: n.positionToLineOffset(t.span.start + t.span.length), + newText: t.newText ? t.newText : "" + }; + } + getBraceMatching(t, n) { + const { file: i, languageService: s } = this.getFileAndLanguageServiceForSyntacticOperation(t), o = this.projectService.getScriptInfoForNormalizedPath(i), c = this.getPosition(t, o), _ = s.getBraceMatchingAtPosition(i, c); + return _ ? n ? _.map((u) => xm(u, o)) : _ : void 0; + } + getDiagnosticsForProject(t, n, i) { + if (this.suppressDiagnosticEvents) + return; + const { fileNames: s, languageServiceDisabled: o } = this.getProjectInfoWorker( + i, + /*projectFileName*/ + void 0, + /*needFileNameList*/ + !0, + /*needDefaultConfiguredProjectInfo*/ + void 0, + /*excludeConfigFiles*/ + !0 + ); + if (o) return; + const c = s.filter((D) => !D.includes("lib.d.ts")); + if (c.length === 0) return; + const _ = [], u = [], m = [], g = [], h = eo(i), S = this.projectService.ensureDefaultProjectForFile(h); + for (const D of c) + this.getCanonicalFileName(D) === this.getCanonicalFileName(i) ? _.push(D) : this.projectService.getScriptInfo(D).isScriptOpen() ? u.push(D) : fl(D) ? g.push(D) : m.push(D); + const C = [..._, ...u, ...m, ...g].map((D) => ({ fileName: D, project: S })); + this.updateErrorCheck( + t, + C, + n, + /*requireOpen*/ + !1 + ); + } + configurePlugin(t) { + this.projectService.configurePlugin(t); + } + getSmartSelectionRange(t, n) { + const { locations: i } = t, { file: s, languageService: o } = this.getFileAndLanguageServiceForSyntacticOperation(t), c = E.checkDefined(this.projectService.getScriptInfo(s)); + return gr(i, (_) => { + const u = this.getPosition(_, c), m = o.getSmartSelectionRange(s, u); + return n ? this.mapSelectionRange(m, c) : m; + }); + } + toggleLineComment(t, n) { + const { file: i, languageService: s } = this.getFileAndLanguageServiceForSyntacticOperation(t), o = this.projectService.getScriptInfo(i), c = this.getRange(t, o), _ = s.toggleLineComment(i, c); + if (n) { + const u = this.projectService.getScriptInfoForNormalizedPath(i); + return _.map((m) => this.convertTextChangeToCodeEdit(m, u)); + } + return _; + } + toggleMultilineComment(t, n) { + const { file: i, languageService: s } = this.getFileAndLanguageServiceForSyntacticOperation(t), o = this.projectService.getScriptInfoForNormalizedPath(i), c = this.getRange(t, o), _ = s.toggleMultilineComment(i, c); + if (n) { + const u = this.projectService.getScriptInfoForNormalizedPath(i); + return _.map((m) => this.convertTextChangeToCodeEdit(m, u)); + } + return _; + } + commentSelection(t, n) { + const { file: i, languageService: s } = this.getFileAndLanguageServiceForSyntacticOperation(t), o = this.projectService.getScriptInfoForNormalizedPath(i), c = this.getRange(t, o), _ = s.commentSelection(i, c); + if (n) { + const u = this.projectService.getScriptInfoForNormalizedPath(i); + return _.map((m) => this.convertTextChangeToCodeEdit(m, u)); + } + return _; + } + uncommentSelection(t, n) { + const { file: i, languageService: s } = this.getFileAndLanguageServiceForSyntacticOperation(t), o = this.projectService.getScriptInfoForNormalizedPath(i), c = this.getRange(t, o), _ = s.uncommentSelection(i, c); + if (n) { + const u = this.projectService.getScriptInfoForNormalizedPath(i); + return _.map((m) => this.convertTextChangeToCodeEdit(m, u)); + } + return _; + } + mapSelectionRange(t, n) { + const i = { + textSpan: xm(t.textSpan, n) + }; + return t.parent && (i.parent = this.mapSelectionRange(t.parent, n)), i; + } + getScriptInfoFromProjectService(t) { + const n = eo(t), i = this.projectService.getScriptInfoForNormalizedPath(n); + return i || (this.projectService.logErrorForScriptInfoNotFound(n), Vh.ThrowNoProject()); + } + toProtocolCallHierarchyItem(t) { + const n = this.getScriptInfoFromProjectService(t.file); + return { + name: t.name, + kind: t.kind, + kindModifiers: t.kindModifiers, + file: t.file, + containerName: t.containerName, + span: xm(t.span, n), + selectionSpan: xm(t.selectionSpan, n) + }; + } + toProtocolCallHierarchyIncomingCall(t) { + const n = this.getScriptInfoFromProjectService(t.from.file); + return { + from: this.toProtocolCallHierarchyItem(t.from), + fromSpans: t.fromSpans.map((i) => xm(i, n)) + }; + } + toProtocolCallHierarchyOutgoingCall(t, n) { + return { + to: this.toProtocolCallHierarchyItem(t.to), + fromSpans: t.fromSpans.map((i) => xm(i, n)) + }; + } + prepareCallHierarchy(t) { + const { file: n, project: i } = this.getFileAndProject(t), s = this.projectService.getScriptInfoForNormalizedPath(n); + if (s) { + const o = this.getPosition(t, s), c = i.getLanguageService().prepareCallHierarchy(n, o); + return c && QV(c, (_) => this.toProtocolCallHierarchyItem(_)); + } + } + provideCallHierarchyIncomingCalls(t) { + const { file: n, project: i } = this.getFileAndProject(t), s = this.getScriptInfoFromProjectService(n); + return i.getLanguageService().provideCallHierarchyIncomingCalls(n, this.getPosition(t, s)).map((c) => this.toProtocolCallHierarchyIncomingCall(c)); + } + provideCallHierarchyOutgoingCalls(t) { + const { file: n, project: i } = this.getFileAndProject(t), s = this.getScriptInfoFromProjectService(n); + return i.getLanguageService().provideCallHierarchyOutgoingCalls(n, this.getPosition(t, s)).map((c) => this.toProtocolCallHierarchyOutgoingCall(c, s)); + } + getCanonicalFileName(t) { + const n = this.host.useCaseSensitiveFileNames ? t : Dy(t); + return Hs(n); + } + exit() { + } + notRequired(t) { + return t && this.doOutput( + /*info*/ + void 0, + t.command, + t.seq, + /*success*/ + !0, + this.performanceData + ), { responseRequired: !1, performanceData: this.performanceData }; + } + requiredResponse(t) { + return { response: t, responseRequired: !0, performanceData: this.performanceData }; + } + addProtocolHandler(t, n) { + if (this.handlers.has(t)) + throw new Error(`Protocol handler already exists for command "${t}"`); + this.handlers.set(t, n); + } + setCurrentRequest(t) { + E.assert(this.currentRequestId === void 0), this.currentRequestId = t, this.cancellationToken.setRequest(t); + } + resetCurrentRequest(t) { + E.assert(this.currentRequestId === t), this.currentRequestId = void 0, this.cancellationToken.resetRequest(t); + } + // eslint-disable-line @typescript-eslint/unified-signatures + executeWithRequestId(t, n, i) { + const s = this.performanceData; + try { + return this.performanceData = i, this.setCurrentRequest(t), n(); + } finally { + this.resetCurrentRequest(t), this.performanceData = s; + } + } + executeCommand(t) { + const n = this.handlers.get(t.command); + if (n) { + const i = this.executeWithRequestId( + t.seq, + () => n(t), + /*perfomanceData*/ + void 0 + ); + return this.projectService.enableRequestedPlugins(), i; + } else + return this.logger.msg( + `Unrecognized JSON command:${Dv(t)}`, + "Err" + /* Err */ + ), this.doOutput( + /*info*/ + void 0, + "unknown", + t.seq, + /*success*/ + !1, + /*performanceData*/ + void 0, + `Unrecognized JSON command: ${t.command}` + ), { responseRequired: !1 }; + } + onMessage(t) { + var n, i, s, o, c, _, u; + this.gcTimer.scheduleCollect(); + let m; + const g = this.performanceData; + this.logger.hasLevel( + 2 + /* requestTime */ + ) && (m = this.hrtime(), this.logger.hasLevel( + 3 + /* verbose */ + ) && this.logger.info(`request:${rw(this.toStringMessage(t))}`)); + let h, S; + try { + h = this.parseMessage(t), S = h.arguments && h.arguments.file ? h.arguments : void 0, (n = nn) == null || n.instant(nn.Phase.Session, "request", { seq: h.seq, command: h.command }), (i = nn) == null || i.push( + nn.Phase.Session, + "executeCommand", + { seq: h.seq, command: h.command }, + /*separateBeginAndEnd*/ + !0 + ); + const { response: T, responseRequired: C, performanceData: D } = this.executeCommand(h); + if ((s = nn) == null || s.pop(), this.logger.hasLevel( + 2 + /* requestTime */ + )) { + const w = dKe(this.hrtime(m)).toFixed(4); + C ? this.logger.perftrc(`${h.seq}::${h.command}: elapsed time (in milliseconds) ${w}`) : this.logger.perftrc(`${h.seq}::${h.command}: async elapsed time (in milliseconds) ${w}`); + } + (o = nn) == null || o.instant(nn.Phase.Session, "response", { seq: h.seq, command: h.command, success: !!T }), T ? this.doOutput( + T, + h.command, + h.seq, + /*success*/ + !0, + D + ) : C && this.doOutput( + /*info*/ + void 0, + h.command, + h.seq, + /*success*/ + !1, + D, + "No content available." + ); + } catch (T) { + if ((c = nn) == null || c.popAll(), T instanceof t4) { + (_ = nn) == null || _.instant(nn.Phase.Session, "commandCanceled", { seq: h?.seq, command: h?.command }), this.doOutput( + { canceled: !0 }, + h.command, + h.seq, + /*success*/ + !0, + this.performanceData + ); + return; + } + this.logErrorWorker(T, this.toStringMessage(t), S), (u = nn) == null || u.instant(nn.Phase.Session, "commandError", { seq: h?.seq, command: h?.command, message: T.message }), this.doOutput( + /*info*/ + void 0, + h ? h.command : "unknown", + h ? h.seq : 0, + /*success*/ + !1, + this.performanceData, + "Error processing request. " + T.message + ` +` + T.stack + ); + } finally { + this.performanceData = g; + } + } + parseMessage(t) { + return JSON.parse(t); + } + toStringMessage(t) { + return t; + } + getFormatOptions(t) { + return this.projectService.getFormatCodeOptions(t); + } + getPreferences(t) { + return this.projectService.getPreferences(t); + } + getHostFormatOptions() { + return this.projectService.getHostFormatCodeOptions(); + } + getHostPreferences() { + return this.projectService.getHostPreferences(); + } + }; + function uPe(e) { + const t = e.diagnosticsDuration && Ki(e.diagnosticsDuration, ([n, i]) => ({ ...i, file: n })); + return { ...e, diagnosticsDuration: t }; + } + function xm(e, t) { + return { + start: t.positionToLineOffset(e.start), + end: t.positionToLineOffset(Yo(e)) + }; + } + function rfe(e, t, n) { + const i = xm(e, n), s = t && xm(t, n); + return s ? { ...i, contextStart: s.start, contextEnd: s.end } : i; + } + function kKe(e, t) { + return { start: _Pe(t, e.span.start), end: _Pe(t, Yo(e.span)), newText: e.newText }; + } + function _Pe(e, t) { + return X_e(e) ? EKe(e.getLineAndCharacterOfPosition(t)) : e.positionToLineOffset(t); + } + function CKe(e, t) { + const n = e.ranges.map( + (i) => ({ + start: t.positionToLineOffset(i.start), + end: t.positionToLineOffset(i.start + i.length) + }) + ); + return e.wordPattern ? { ranges: n, wordPattern: e.wordPattern } : { ranges: n }; + } + function EKe(e) { + return { line: e.line + 1, offset: e.character + 1 }; + } + function DKe(e) { + E.assert(e.textChanges.length === 1); + const t = ya(e.textChanges); + return E.assert(t.span.start === 0 && t.span.length === 0), { fileName: e.fileName, textChanges: [{ start: { line: 0, offset: 0 }, end: { line: 0, offset: 0 }, newText: t.newText }] }; + } + function nfe(e, t, n, i) { + const s = wKe(e, t, i), { line: o, character: c } = pC(ex(s), n); + return { line: o + 1, offset: c + 1 }; + } + function wKe(e, t, n) { + for (const { fileName: i, textChanges: s } of n) + if (i === t) + for (let o = s.length - 1; o >= 0; o--) { + const { newText: c, span: { start: _, length: u } } = s[o]; + e = e.slice(0, _) + c + e.slice(_ + u); + } + return e; + } + function fPe(e, { fileName: t, textSpan: n, contextSpan: i, isWriteAccess: s, isDefinition: o }, { disableLineTextInReferences: c }) { + const _ = E.checkDefined(e.getScriptInfo(t)), u = rfe(n, i, _), m = c ? void 0 : PKe(_, u); + return { + file: t, + ...u, + lineText: m, + isWriteAccess: s, + isDefinition: o + }; + } + function PKe(e, t) { + const n = e.lineToTextSpan(t.start.line - 1); + return e.getSnapshot().getText(n.start, Yo(n)).replace(/\r|\n/g, ""); + } + function NKe(e) { + return e === void 0 || e && typeof e == "object" && typeof e.exportName == "string" && (e.fileName === void 0 || typeof e.fileName == "string") && (e.ambientModuleName === void 0 || typeof e.ambientModuleName == "string" && (e.isPackageJsonImport === void 0 || typeof e.isPackageJsonImport == "boolean")); + } + var Z6 = 4, ife = /* @__PURE__ */ ((e) => (e[e.PreStart = 0] = "PreStart", e[e.Start = 1] = "Start", e[e.Entire = 2] = "Entire", e[e.Mid = 3] = "Mid", e[e.End = 4] = "End", e[e.PostEnd = 5] = "PostEnd", e))(ife || {}), AKe = class { + constructor() { + this.goSubtree = !0, this.lineIndex = new v8(), this.endBranch = [], this.state = 2, this.initialText = "", this.trailingText = "", this.lineIndex.root = new K6(), this.startPath = [this.lineIndex.root], this.stack = [this.lineIndex.root]; + } + get done() { + return !1; + } + insertLines(e, t) { + t && (this.trailingText = ""), e ? e = this.initialText + e + this.trailingText : e = this.initialText + this.trailingText; + const i = v8.linesFromText(e).lines; + i.length > 1 && i[i.length - 1] === "" && i.pop(); + let s, o; + for (let _ = this.endBranch.length - 1; _ >= 0; _--) + this.endBranch[_].updateCounts(), this.endBranch[_].charCount() === 0 && (o = this.endBranch[_], _ > 0 ? s = this.endBranch[_ - 1] : s = this.branchNode); + o && s.remove(o); + const c = this.startPath[this.startPath.length - 1]; + if (i.length > 0) + if (c.text = i[0], i.length > 1) { + let _ = new Array(i.length - 1), u = c; + for (let h = 1; h < i.length; h++) + _[h - 1] = new ML(i[h]); + let m = this.startPath.length - 2; + for (; m >= 0; ) { + const h = this.startPath[m]; + _ = h.insertAt(u, _), m--, u = h; + } + let g = _.length; + for (; g > 0; ) { + const h = new K6(); + h.add(this.lineIndex.root), _ = h.insertAt(this.lineIndex.root, _), g = _.length, this.lineIndex.root = h; + } + this.lineIndex.root.updateCounts(); + } else + for (let _ = this.startPath.length - 2; _ >= 0; _--) + this.startPath[_].updateCounts(); + else { + this.startPath[this.startPath.length - 2].remove(c); + for (let u = this.startPath.length - 2; u >= 0; u--) + this.startPath[u].updateCounts(); + } + return this.lineIndex; + } + post(e, t, n) { + n === this.lineCollectionAtBranch && (this.state = 4), this.stack.pop(); + } + pre(e, t, n, i, s) { + const o = this.stack[this.stack.length - 1]; + this.state === 2 && s === 1 && (this.state = 1, this.branchNode = o, this.lineCollectionAtBranch = n); + let c; + function _(u) { + return u.isLeaf() ? new ML("") : new K6(); + } + switch (s) { + case 0: + this.goSubtree = !1, this.state !== 4 && o.add(n); + break; + case 1: + this.state === 4 ? this.goSubtree = !1 : (c = _(n), o.add(c), this.startPath.push(c)); + break; + case 2: + this.state !== 4 ? (c = _(n), o.add(c), this.startPath.push(c)) : n.isLeaf() || (c = _(n), o.add(c), this.endBranch.push(c)); + break; + case 3: + this.goSubtree = !1; + break; + case 4: + this.state !== 4 ? this.goSubtree = !1 : n.isLeaf() || (c = _(n), o.add(c), this.endBranch.push(c)); + break; + case 5: + this.goSubtree = !1, this.state !== 1 && o.add(n); + break; + } + this.goSubtree && this.stack.push(c); + } + // just gather text from the leaves + leaf(e, t, n) { + this.state === 1 ? this.initialText = n.text.substring(0, e) : this.state === 2 ? (this.initialText = n.text.substring(0, e), this.trailingText = n.text.substring(e + t)) : this.trailingText = n.text.substring(e + t); + } + }, IKe = class { + constructor(e, t, n) { + this.pos = e, this.deleteLen = t, this.insertedText = n; + } + getTextChangeRange() { + return IP(ql(this.pos, this.deleteLen), this.insertedText ? this.insertedText.length : 0); + } + }, kG = class VT { + constructor() { + this.changes = [], this.versions = new Array(VT.maxVersions), this.minVersion = 0, this.currentVersion = 0; + } + versionToIndex(t) { + if (!(t < this.minVersion || t > this.currentVersion)) + return t % VT.maxVersions; + } + currentVersionToIndex() { + return this.currentVersion % VT.maxVersions; + } + // REVIEW: can optimize by coalescing simple edits + edit(t, n, i) { + this.changes.push(new IKe(t, n, i)), (this.changes.length > VT.changeNumberThreshold || n > VT.changeLengthThreshold || i && i.length > VT.changeLengthThreshold) && this.getSnapshot(); + } + getSnapshot() { + return this._getSnapshot(); + } + _getSnapshot() { + let t = this.versions[this.currentVersionToIndex()]; + if (this.changes.length > 0) { + let n = t.index; + for (const i of this.changes) + n = n.edit(i.pos, i.deleteLen, i.insertedText); + t = new pPe(this.currentVersion + 1, this, n, this.changes), this.currentVersion = t.version, this.versions[this.currentVersionToIndex()] = t, this.changes = [], this.currentVersion - this.minVersion >= VT.maxVersions && (this.minVersion = this.currentVersion - VT.maxVersions + 1); + } + return t; + } + getSnapshotVersion() { + return this._getSnapshot().version; + } + getAbsolutePositionAndLineText(t) { + return this._getSnapshot().index.lineNumberToInfo(t); + } + lineOffsetToPosition(t, n) { + return this._getSnapshot().index.absolutePositionOfStartOfLine(t) + (n - 1); + } + positionToLineOffset(t) { + return this._getSnapshot().index.positionToLineOffset(t); + } + lineToTextSpan(t) { + const n = this._getSnapshot().index, { lineText: i, absolutePosition: s } = n.lineNumberToInfo(t + 1), o = i !== void 0 ? i.length : n.absolutePositionOfStartOfLine(t + 2) - s; + return ql(s, o); + } + getTextChangesBetweenVersions(t, n) { + if (t < n) + if (t >= this.minVersion) { + const i = []; + for (let s = t + 1; s <= n; s++) { + const o = this.versions[this.versionToIndex(s)]; + for (const c of o.changesSincePreviousVersion) + i.push(c.getTextChangeRange()); + } + return BY(i); + } else + return; + else + return e7; + } + getLineCount() { + return this._getSnapshot().index.getLineCount(); + } + static fromString(t) { + const n = new VT(), i = new pPe(0, n, new v8()); + n.versions[n.currentVersion] = i; + const s = v8.linesFromText(t); + return i.index.load(s.lines), n; + } + }; + kG.changeNumberThreshold = 8, kG.changeLengthThreshold = 256, kG.maxVersions = 8; + var CG = kG, pPe = class p5e { + constructor(t, n, i, s = pl) { + this.version = t, this.cache = n, this.index = i, this.changesSincePreviousVersion = s; + } + getText(t, n) { + return this.index.getText(t, n - t); + } + getLength() { + return this.index.getLength(); + } + getChangeRange(t) { + if (t instanceof p5e && this.cache === t.cache) + return this.version <= t.version ? e7 : this.cache.getTextChangesBetweenVersions(t.version, this.version); + } + }, v8 = class Hme { + constructor() { + this.checkEdits = !1; + } + absolutePositionOfStartOfLine(t) { + return this.lineNumberToInfo(t).absolutePosition; + } + positionToLineOffset(t) { + const { oneBasedLine: n, zeroBasedColumn: i } = this.root.charOffsetToLineInfo(1, t); + return { line: n, offset: i + 1 }; + } + positionToColumnAndLineText(t) { + return this.root.charOffsetToLineInfo(1, t); + } + getLineCount() { + return this.root.lineCount(); + } + lineNumberToInfo(t) { + const n = this.getLineCount(); + if (t <= n) { + const { position: i, leaf: s } = this.root.lineNumberToInfo(t, 0); + return { absolutePosition: i, lineText: s && s.text }; + } else + return { absolutePosition: this.root.charCount(), lineText: void 0 }; + } + load(t) { + if (t.length > 0) { + const n = []; + for (let i = 0; i < t.length; i++) + n[i] = new ML(t[i]); + this.root = Hme.buildTreeFromBottom(n); + } else + this.root = new K6(); + } + walk(t, n, i) { + this.root.walk(t, n, i); + } + getText(t, n) { + let i = ""; + return n > 0 && t < this.root.charCount() && this.walk(t, n, { + goSubtree: !0, + done: !1, + leaf: (s, o, c) => { + i = i.concat(c.text.substring(s, s + o)); + } + }), i; + } + getLength() { + return this.root.charCount(); + } + every(t, n, i) { + i || (i = this.root.charCount()); + const s = { + goSubtree: !0, + done: !1, + leaf(o, c, _) { + t(_, o, c) || (this.done = !0); + } + }; + return this.walk(n, i - n, s), !s.done; + } + edit(t, n, i) { + if (this.root.charCount() === 0) + return E.assert(n === 0), i !== void 0 ? (this.load(Hme.linesFromText(i).lines), this) : void 0; + { + let s; + if (this.checkEdits) { + const _ = this.getText(0, this.root.charCount()); + s = _.slice(0, t) + i + _.slice(t + n); + } + const o = new AKe(); + let c = !1; + if (t >= this.root.charCount()) { + t = this.root.charCount() - 1; + const _ = this.getText(t, 1); + i ? i = _ + i : i = _, n = 0, c = !0; + } else if (n > 0) { + const _ = t + n, { zeroBasedColumn: u, lineText: m } = this.positionToColumnAndLineText(_); + u === 0 && (n += m.length, i = i ? i + m : m); + } + if (this.root.walk(t, n, o), o.insertLines(i, c), this.checkEdits) { + const _ = o.lineIndex.getText(0, o.lineIndex.getLength()); + E.assert(s === _, "buffer edit mismatch"); + } + return o.lineIndex; + } + } + static buildTreeFromBottom(t) { + if (t.length < Z6) + return new K6(t); + const n = new Array(Math.ceil(t.length / Z6)); + let i = 0; + for (let s = 0; s < n.length; s++) { + const o = Math.min(i + Z6, t.length); + n[s] = new K6(t.slice(i, o)), i = o; + } + return this.buildTreeFromBottom(n); + } + static linesFromText(t) { + const n = ex(t); + if (n.length === 0) + return { lines: [], lineMap: n }; + const i = new Array(n.length), s = n.length - 1; + for (let c = 0; c < s; c++) + i[c] = t.substring(n[c], n[c + 1]); + const o = t.substring(n[s]); + return o.length > 0 ? i[s] = o : i.pop(), { lines: i, lineMap: n }; + } + }, K6 = class Gme { + constructor(t = []) { + this.children = t, this.totalChars = 0, this.totalLines = 0, t.length && this.updateCounts(); + } + isLeaf() { + return !1; + } + updateCounts() { + this.totalChars = 0, this.totalLines = 0; + for (const t of this.children) + this.totalChars += t.charCount(), this.totalLines += t.lineCount(); + } + execWalk(t, n, i, s, o) { + return i.pre && i.pre(t, n, this.children[s], this, o), i.goSubtree ? (this.children[s].walk(t, n, i), i.post && i.post(t, n, this.children[s], this, o)) : i.goSubtree = !0, i.done; + } + skipChild(t, n, i, s, o) { + s.pre && !s.done && (s.pre(t, n, this.children[i], this, o), s.goSubtree = !0); + } + walk(t, n, i) { + if (this.children.length === 0) return; + let s = 0, o = this.children[s].charCount(), c = t; + for (; c >= o; ) + this.skipChild( + c, + n, + s, + i, + 0 + /* PreStart */ + ), c -= o, s++, o = this.children[s].charCount(); + if (c + n <= o) { + if (this.execWalk( + c, + n, + i, + s, + 2 + /* Entire */ + )) + return; + } else { + if (this.execWalk( + c, + o - c, + i, + s, + 1 + /* Start */ + )) + return; + let _ = n - (o - c); + for (s++, o = this.children[s].charCount(); _ > o; ) { + if (this.execWalk( + 0, + o, + i, + s, + 3 + /* Mid */ + )) + return; + _ -= o, s++, o = this.children[s].charCount(); + } + if (_ > 0 && this.execWalk( + 0, + _, + i, + s, + 4 + /* End */ + )) + return; + } + if (i.pre) { + const _ = this.children.length; + if (s < _ - 1) + for (let u = s + 1; u < _; u++) + this.skipChild( + 0, + 0, + u, + i, + 5 + /* PostEnd */ + ); + } + } + // Input position is relative to the start of this node. + // Output line number is absolute. + charOffsetToLineInfo(t, n) { + if (this.children.length === 0) + return { oneBasedLine: t, zeroBasedColumn: n, lineText: void 0 }; + for (const o of this.children) { + if (o.charCount() > n) + return o.isLeaf() ? { oneBasedLine: t, zeroBasedColumn: n, lineText: o.text } : o.charOffsetToLineInfo(t, n); + n -= o.charCount(), t += o.lineCount(); + } + const i = this.lineCount(); + if (i === 0) + return { oneBasedLine: 1, zeroBasedColumn: 0, lineText: void 0 }; + const s = E.checkDefined(this.lineNumberToInfo(i, 0).leaf); + return { oneBasedLine: i, zeroBasedColumn: s.charCount(), lineText: void 0 }; + } + /** + * Input line number is relative to the start of this node. + * Output line number is relative to the child. + * positionAccumulator will be an absolute position once relativeLineNumber reaches 0. + */ + lineNumberToInfo(t, n) { + for (const i of this.children) { + const s = i.lineCount(); + if (s >= t) + return i.isLeaf() ? { position: n, leaf: i } : i.lineNumberToInfo(t, n); + t -= s, n += i.charCount(); + } + return { position: n, leaf: void 0 }; + } + splitAfter(t) { + let n; + const i = this.children.length; + t++; + const s = t; + if (t < i) { + for (n = new Gme(); t < i; ) + n.add(this.children[t]), t++; + n.updateCounts(); + } + return this.children.length = s, n; + } + remove(t) { + const n = this.findChildIndex(t), i = this.children.length; + if (n < i - 1) + for (let s = n; s < i - 1; s++) + this.children[s] = this.children[s + 1]; + this.children.pop(); + } + findChildIndex(t) { + const n = this.children.indexOf(t); + return E.assert(n !== -1), n; + } + insertAt(t, n) { + let i = this.findChildIndex(t); + const s = this.children.length, o = n.length; + if (s < Z6 && i === s - 1 && o === 1) + return this.add(n[0]), this.updateCounts(), []; + { + const c = this.splitAfter(i); + let _ = 0; + for (i++; i < Z6 && _ < o; ) + this.children[i] = n[_], i++, _++; + let u = [], m = 0; + if (_ < o) { + m = Math.ceil((o - _) / Z6), u = new Array(m); + let g = 0; + for (let S = 0; S < m; S++) + u[S] = new Gme(); + let h = u[0]; + for (; _ < o; ) + h.add(n[_]), _++, h.children.length === Z6 && (g++, h = u[g]); + for (let S = u.length - 1; S >= 0; S--) + u[S].children.length === 0 && u.pop(); + } + c && u.push(c), this.updateCounts(); + for (let g = 0; g < m; g++) + u[g].updateCounts(); + return u; + } + } + // assume there is room for the item; return true if more room + add(t) { + this.children.push(t), E.assert(this.children.length <= Z6); + } + charCount() { + return this.totalChars; + } + lineCount() { + return this.totalLines; + } + }, ML = class { + constructor(e) { + this.text = e; + } + isLeaf() { + return !0; + } + walk(e, t, n) { + n.leaf(e, t, this); + } + charCount() { + return this.text.length; + } + lineCount() { + return 1; + } + }, dPe = class d5e { + constructor(t, n, i, s, o, c) { + this.telemetryEnabled = t, this.logger = n, this.host = i, this.globalTypingsCacheLocation = s, this.event = o, this.maxActiveRequestCount = c, this.activeRequestCount = 0, this.requestQueue = mP(), this.requestMap = /* @__PURE__ */ new Map(), this.requestedRegistry = !1, this.packageInstallId = 0; + } + isKnownTypesPackageName(t) { + var n; + return f1.validatePackageName(t) !== f1.NameValidationResult.Ok ? !1 : (this.requestedRegistry || (this.requestedRegistry = !0, this.installer.send({ kind: "typesRegistry" })), !!((n = this.typesRegistryCache) != null && n.has(t))); + } + installPackage(t) { + this.packageInstallId++; + const n = { kind: "installPackage", ...t, id: this.packageInstallId }, i = new Promise((s, o) => { + (this.packageInstalledPromise ?? (this.packageInstalledPromise = /* @__PURE__ */ new Map())).set(this.packageInstallId, { resolve: s, reject: o }); + }); + return this.installer.send(n), i; + } + attach(t) { + this.projectService = t, this.installer = this.createInstallerProcess(); + } + onProjectClosed(t) { + this.installer.send({ projectName: t.getProjectName(), kind: "closeProject" }); + } + enqueueInstallTypingsRequest(t, n, i) { + const s = __e(t, n, i); + this.logger.hasLevel( + 3 + /* verbose */ + ) && this.logger.info(`TIAdapter:: Scheduling throttled operation:${Dv(s)}`), this.activeRequestCount < this.maxActiveRequestCount ? this.scheduleRequest(s) : (this.logger.hasLevel( + 3 + /* verbose */ + ) && this.logger.info(`TIAdapter:: Deferring request for: ${s.projectName}`), this.requestQueue.enqueue(s), this.requestMap.set(s.projectName, s)); + } + handleMessage(t) { + var n, i; + switch (this.logger.hasLevel( + 3 + /* verbose */ + ) && this.logger.info(`TIAdapter:: Received response:${Dv(t)}`), t.kind) { + case GU: + this.typesRegistryCache = new Map(Object.entries(t.typesRegistry)); + break; + case e9: { + const s = (n = this.packageInstalledPromise) == null ? void 0 : n.get(t.id); + E.assertIsDefined(s, "Should find the promise for package install"), (i = this.packageInstalledPromise) == null || i.delete(t.id), t.success ? s.resolve({ successMessage: t.message }) : s.reject(t.message), this.projectService.updateTypingsForProject(t), this.event(t, "setTypings"); + break; + } + case mse: { + const s = { + message: t.message + }; + this.event(s, "typesInstallerInitializationFailed"); + break; + } + case $U: { + const s = { + eventId: t.eventId, + packages: t.packagesToInstall + }; + this.event(s, "beginInstallTypes"); + break; + } + case XU: { + if (this.telemetryEnabled) { + const c = { + telemetryEventName: "typingsInstalled", + payload: { + installedPackages: t.packagesToInstall.join(","), + installSuccess: t.installSuccess, + typingsInstallerVersion: t.typingsInstallerVersion + } + }; + this.event(c, "telemetry"); + } + const s = { + eventId: t.eventId, + packages: t.packagesToInstall, + success: t.installSuccess + }; + this.event(s, "endInstallTypes"); + break; + } + case KO: { + this.projectService.updateTypingsForProject(t); + break; + } + case ZO: { + for (this.activeRequestCount > 0 ? this.activeRequestCount-- : E.fail("TIAdapter:: Received too many responses"); !this.requestQueue.isEmpty(); ) { + const s = this.requestQueue.dequeue(); + if (this.requestMap.get(s.projectName) === s) { + this.requestMap.delete(s.projectName), this.scheduleRequest(s); + break; + } + this.logger.hasLevel( + 3 + /* verbose */ + ) && this.logger.info(`TIAdapter:: Skipping defunct request for: ${s.projectName}`); + } + this.projectService.updateTypingsForProject(t), this.event(t, "setTypings"); + break; + } + case pA: + this.projectService.watchTypingLocations(t); + break; + } + } + scheduleRequest(t) { + this.logger.hasLevel( + 3 + /* verbose */ + ) && this.logger.info(`TIAdapter:: Scheduling request for: ${t.projectName}`), this.activeRequestCount++, this.host.setTimeout( + () => { + this.logger.hasLevel( + 3 + /* verbose */ + ) && this.logger.info(`TIAdapter:: Sending request:${Dv(t)}`), this.installer.send(t); + }, + d5e.requestDelayMillis, + `${t.projectName}::${t.kind}` + ); + } + }; + dPe.requestDelayMillis = 100; + var mPe = dPe, gPe = {}; + Ec(gPe, { + ActionInvalidate: () => KO, + ActionPackageInstalled: () => e9, + ActionSet: () => ZO, + ActionWatchTypingLocations: () => pA, + Arguments: () => QU, + AutoImportProviderProject: () => I_e, + AuxiliaryProject: () => N_e, + CharRangeSection: () => ife, + CloseFileWatcherEvent: () => pG, + CommandNames: () => tPe, + ConfigFileDiagEvent: () => cG, + ConfiguredProject: () => F_e, + ConfiguredProjectLoadKind: () => B_e, + CreateDirectoryWatcherEvent: () => fG, + CreateFileWatcherEvent: () => _G, + Errors: () => Vh, + EventBeginInstallTypes: () => $U, + EventEndInstallTypes: () => XU, + EventInitializationFailed: () => mse, + EventTypesRegistry: () => GU, + ExternalProject: () => rG, + GcTimer: () => y_e, + InferredProject: () => P_e, + LargeFileReferencedEvent: () => oG, + LineIndex: () => v8, + LineLeaf: () => ML, + LineNode: () => K6, + LogLevel: () => l_e, + Msg: () => u_e, + OpenFileInfoTelemetryEvent: () => O_e, + Project: () => kk, + ProjectInfoTelemetryEvent: () => uG, + ProjectKind: () => Aw, + ProjectLanguageServiceStateEvent: () => lG, + ProjectLoadingFinishEvent: () => aG, + ProjectLoadingStartEvent: () => sG, + ProjectService: () => $_e, + ProjectsUpdatedInBackgroundEvent: () => FL, + ScriptInfo: () => T_e, + ScriptVersionCache: () => CG, + Session: () => lPe, + TextStorage: () => S_e, + ThrottledOperations: () => h_e, + TypingsInstallerAdapter: () => mPe, + allFilesAreJsOrDts: () => E_e, + allRootFilesAreJsOrDts: () => C_e, + asNormalizedPath: () => Dwe, + convertCompilerOptions: () => OL, + convertFormatOptions: () => Q6, + convertScriptKindName: () => mG, + convertTypeAcquisition: () => M_e, + convertUserPreferences: () => R_e, + convertWatchOptions: () => h8, + countEachFileTypes: () => p8, + createInstallTypingsRequest: () => __e, + createModuleSpecifierCache: () => Y_e, + createNormalizedPathMap: () => wwe, + createPackageJsonCache: () => Z_e, + createSortedArray: () => g_e, + emptyArray: () => pl, + findArgument: () => wbe, + formatDiagnosticToProtocol: () => y8, + formatMessage: () => K_e, + getBaseConfigFileName: () => tG, + getDetailWatchInfo: () => vG, + getLocationInNewDocument: () => nfe, + hasArgument: () => Dbe, + hasNoTypeScriptSource: () => D_e, + indent: () => rw, + isBackgroundProject: () => m8, + isConfigFile: () => X_e, + isConfiguredProject: () => H0, + isDynamicFileName: () => Nw, + isExternalProject: () => d8, + isInferredProject: () => X6, + isInferredProjectName: () => f_e, + isProjectDeferredClose: () => g8, + makeAutoImportProviderProjectName: () => d_e, + makeAuxiliaryProjectName: () => m_e, + makeInferredProjectName: () => p_e, + maxFileSize: () => iG, + maxProgramSizeForNonTsFiles: () => nG, + normalizedPathToPath: () => $6, + nowString: () => Pbe, + nullCancellationToken: () => Zwe, + nullTypingsInstaller: () => LL, + protocol: () => v_e, + scriptInfoIsContainedByBackgroundProject: () => x_e, + scriptInfoIsContainedByDeferredClosedProject: () => k_e, + stringifyIndented: () => Dv, + toEvent: () => efe, + toNormalizedPath: () => eo, + tryConvertScriptKindName: () => dG, + typingsInstaller: () => c_e, + updateProjectIfDirty: () => Up + }), typeof console < "u" && (E.loggingHost = { + log(e, t) { + switch (e) { + case 1: + return console.error(t); + case 2: + return console.warn(t); + case 3: + return console.log(t); + case 4: + return console.log(t); + } + } + }); + })({ get exports() { + return hu; + }, set exports(bh) { + hu = bh, Cf.exports && (Cf.exports = bh); + } }); + }(zme)), zme.exports; +} +var Dft = Eft(); +const wft = /* @__PURE__ */ dft(Dft); +function Wme(Cf) { + gft(Cf) ? (hft("show-in-ide"), i5e(`${s5e}show-in-ide`, yft(Cf))) : (vft("show-in-ide"), i5e(`${s5e}show-in-ide`, Cf)); +} +$me.on("show-in-ide", (Cf) => { + const hu = Cf.detail.node; + if (Cf.detail.source) { + Wme(Cf.detail.source); + return; + } + if (!hu) + return; + if (hu.isFlowComponent) { + Wme(hu.node); + return; + } + const bh = m5e(hu); + bh && Wme(bh); +}); +function m5e(Cf) { + if (!Cf.isReactComponent) + return; + const hu = n5e(Cf.node); + if (hu) + return hu; + const bh = mft(Cf.node); + if (bh) + return bh; + const uR = Cf.children.sort((Ec, FX) => Ec.siblingIndex - FX.siblingIndex).find((Ec) => Ec.isReactComponent && m5e(Ec) !== void 0); + if (!uR) + throw new Error(`Could not find the source of ${Cf.nameAndIdentifier}`); + return n5e(uR.node); +} +function Pft(Cf) { + Jme.active || Jme.setActive(!0), bft("copilot-init-app", { framework: Cf }, async (hu) => { + if (hu.data.success) + document.body.innerHTML = `

The files have been created

+

You need to restart the server for the changes to have effect.

`; + else { + const bh = hu.data.reason; + Sft(bh); + } + }), Jme.setActive(!1); +} +class Nft { + constructor(hu) { + this._currentTree = hu; + } + get root() { + return this.currentTree.root; + } + get allNodesFlat() { + return this.currentTree.allNodesFlat; + } + getNodeOfElement(hu) { + return this.currentTree.getNodeOfElement(hu); + } + getChildren(hu) { + return this.currentTree.getChildren(hu); + } + hasFlowComponents() { + return this.currentTree.hasFlowComponents(); + } + findNodeByUuid(hu) { + return this.currentTree.findNodeByUuid(hu); + } + getElementByNodeUuid(hu) { + return this.currentTree.getElementByNodeUuid(hu); + } + findByTreePath(hu) { + return this.currentTree.findByTreePath(hu); + } + get currentTree() { + return this._currentTree; + } + set currentTree(hu) { + this._currentTree = hu, $me.emit("copilot-tree-created", {}); + } +} +$me.on("navigate", (Cf) => { + const hu = window.history.state?.idx, bh = {}; + hu !== void 0 && (bh.idx = hu + 1), window.history.pushState(bh, "", Cf.detail.path), window.dispatchEvent(new PopStateEvent("popstate")); +}); +window.Vaadin.copilot.comm = Tft; +window.Vaadin.copilot.ts = wft; +const Aft = new xft(); +window.Vaadin.copilot.tree = new Nft(Aft); +window.Vaadin.copilot.initEmptyApp = Pft; diff --git a/src/main/frontend/generated/jar-resources/copilot/copilot-info-plugin-DEhoYnCY.js b/src/main/frontend/generated/jar-resources/copilot/copilot-info-plugin-DEhoYnCY.js new file mode 100644 index 0000000..01a87b0 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/copilot/copilot-info-plugin-DEhoYnCY.js @@ -0,0 +1,241 @@ +import { a as P, a5 as H, z as C, U, D as N, j as g, x as d, a6 as I, E as j, H as B, G as L, _ as O, $ as q, M as J, b as M, n as T } from "./copilot-xjoIJFQc.js"; +import { r as A } from "./state-9-chcL5F.js"; +import { B as V } from "./base-panel-CTLXjjmN.js"; +import { i as y } from "./icons-AkLm3oZf.js"; +const W = "copilot-info-panel{--dev-tools-red-color: red;--dev-tools-grey-color: gray;--dev-tools-green-color: green;position:relative}copilot-info-panel div.info-tray{display:flex;flex-direction:column;gap:10px}copilot-info-panel vaadin-button{margin-inline:var(--lumo-space-l)}copilot-info-panel dl{display:grid;grid-template-columns:auto auto;gap:0;margin:var(--space-100) var(--space-50);font:var(--font-xsmall)}copilot-info-panel dl>dt,copilot-info-panel dl>dd{padding:3px 10px;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}copilot-info-panel dd.live-reload-status>span{overflow:hidden;text-overflow:ellipsis;display:block;color:var(--status-color)}copilot-info-panel dd span.hidden{display:none}copilot-info-panel dd span.true{color:var(--dev-tools-green-color);font-size:large}copilot-info-panel dd span.false{color:var(--dev-tools-red-color);font-size:large}copilot-info-panel code{white-space:nowrap;-webkit-user-select:all;user-select:all}copilot-info-panel .checks{display:inline-grid;grid-template-columns:auto 1fr;gap:var(--space-50)}copilot-info-panel span.hint{font-size:var(--font-size-0);background:var(--gray-50);padding:var(--space-75);border-radius:var(--radius-2)}"; +var D, E; +function _() { + return E || (E = 1, D = function() { + var e = document.getSelection(); + if (!e.rangeCount) + return function() { + }; + for (var t = document.activeElement, n = [], i = 0; i < e.rangeCount; i++) + n.push(e.getRangeAt(i)); + switch (t.tagName.toUpperCase()) { + // .toUpperCase handles XHTML + case "INPUT": + case "TEXTAREA": + t.blur(); + break; + default: + t = null; + break; + } + return e.removeAllRanges(), function() { + e.type === "Caret" && e.removeAllRanges(), e.rangeCount || n.forEach(function(l) { + e.addRange(l); + }), t && t.focus(); + }; + }), D; +} +var k, $; +function z() { + if ($) return k; + $ = 1; + var e = _(), t = { + "text/plain": "Text", + "text/html": "Url", + default: "Text" + }, n = "Copy to clipboard: #{key}, Enter"; + function i(a) { + var o = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C"; + return a.replace(/#{\s*key\s*}/g, o); + } + function l(a, o) { + var s, u, f, v, p, r, h = !1; + o || (o = {}), s = o.debug || !1; + try { + f = e(), v = document.createRange(), p = document.getSelection(), r = document.createElement("span"), r.textContent = a, r.ariaHidden = "true", r.style.all = "unset", r.style.position = "fixed", r.style.top = 0, r.style.clip = "rect(0, 0, 0, 0)", r.style.whiteSpace = "pre", r.style.webkitUserSelect = "text", r.style.MozUserSelect = "text", r.style.msUserSelect = "text", r.style.userSelect = "text", r.addEventListener("copy", function(c) { + if (c.stopPropagation(), o.format) + if (c.preventDefault(), typeof c.clipboardData > "u") { + s && console.warn("unable to use e.clipboardData"), s && console.warn("trying IE specific stuff"), window.clipboardData.clearData(); + var x = t[o.format] || t.default; + window.clipboardData.setData(x, a); + } else + c.clipboardData.clearData(), c.clipboardData.setData(o.format, a); + o.onCopy && (c.preventDefault(), o.onCopy(c.clipboardData)); + }), document.body.appendChild(r), v.selectNodeContents(r), p.addRange(v); + var R = document.execCommand("copy"); + if (!R) + throw new Error("copy command was unsuccessful"); + h = !0; + } catch (c) { + s && console.error("unable to copy using execCommand: ", c), s && console.warn("trying IE specific stuff"); + try { + window.clipboardData.setData(o.format || "text", a), o.onCopy && o.onCopy(window.clipboardData), h = !0; + } catch (x) { + s && console.error("unable to copy using clipboardData: ", x), s && console.error("falling back to prompt"), u = i("message" in o ? o.message : n), window.prompt(u, a); + } + } finally { + p && (typeof p.removeRange == "function" ? p.removeRange(v) : p.removeAllRanges()), r && document.body.removeChild(r), f(); + } + return h; + } + return k = l, k; +} +var F = z(); +const G = /* @__PURE__ */ P(F); +var K = Object.defineProperty, X = Object.getOwnPropertyDescriptor, w = (e, t, n, i) => { + for (var l = i > 1 ? void 0 : i ? X(t, n) : t, a = e.length - 1, o; a >= 0; a--) + (o = e[a]) && (l = (i ? o(t, n, l) : o(l)) || l); + return i && l && K(t, n, l), l; +}; +let b = class extends V { + constructor() { + super(...arguments), this.serverInfo = [], this.clientInfo = [{ name: "Browser", version: navigator.userAgent }], this.handleServerInfoEvent = (e) => { + const t = JSON.parse(e.data.info); + this.serverInfo = t.versions, H().then((n) => { + n && (this.clientInfo.unshift({ name: "Vaadin Employee", version: "true", more: void 0 }), this.requestUpdate("clientInfo")); + }), C() === "success" && U("hotswap-active", { value: N() }); + }; + } + connectedCallback() { + super.connectedCallback(), this.onCommand("copilot-info", this.handleServerInfoEvent), this.onEventBus("system-info-with-callback", (e) => { + e.detail.callback(this.getInfoForClipboard(e.detail.notify)); + }), this.reaction( + () => g.idePluginState, + () => { + this.requestUpdate("serverInfo"); + } + ); + } + getIndex(e) { + return this.serverInfo.findIndex((t) => t.name === e); + } + render() { + return d` +
+
+ ${[...this.serverInfo, ...this.clientInfo].map( + (e) => d` +
${e.name}
+
+ ${this.renderValue(e.version)} ${e.more} +
+ ` + )} + ${this.renderDevWorkflowSection()} +
+ ${this.renderDevelopmentWorkflowButton()} +
`; + } + renderDevWorkflowSection() { + const e = C(), t = this.getIdePluginLabelText(g.idePluginState), n = this.getHotswapAgentLabelText(e); + return d` +
Java Hotswap
+
${m(e === "success")} ${n}
+ ${I() !== "unsupported" ? d`
IDE Plugin
+
${m(I() === "success")} ${t}
` : j} + `; + } + renderDevelopmentWorkflowButton() { + const e = B(); + let t = "", n = null; + return e.status === "success" ? (t = "More details...", n = y.successColorful) : e.status === "warning" ? (t = "Improve Development Workflow...", n = y.warningColorful) : e.status === "error" && (t = "Fix Development Workflow...", n = d`${y.error}`), d` + + ${n} + ${t} + `; + } + getHotswapAgentLabelText(e) { + return e === "success" ? "Java Hotswap is enabled" : e === "error" ? "Hotswap is partially enabled" : "Hotswap is not enabled"; + } + getIdePluginLabelText(e) { + if (I() !== "success") + return "Not installed"; + if (e?.version) { + let t = null; + return e?.ide && (e?.ide === "intellij" ? t = "IntelliJ" : e?.ide === "vscode" ? t = "VS Code" : e?.ide === "eclipse" && (t = "Eclipse")), t ? `${e?.version} ${t}` : e?.version; + } + return "Not installed"; + } + renderValue(e) { + return e === "false" ? m(!1) : e === "true" ? m(!0) : e; + } + getInfoForClipboard(e) { + const t = this.renderRoot.querySelectorAll(".info-tray dt"), l = Array.from(t).map((a) => ({ + key: a.textContent.trim(), + value: a.nextElementSibling.textContent.trim() + })).filter((a) => a.key !== "Live reload").filter((a) => !a.key.startsWith("Vaadin Emplo")).map((a) => { + const { key: o } = a; + let { value: s } = a; + if (o === "IDE Plugin") + s = this.getIdePluginLabelText(g.idePluginState) ?? "false"; + else if (o === "Java Hotswap") { + const u = g.jdkInfo?.jrebel, f = C(); + u && f === "success" ? s = "JRebel is in use" : s = this.getHotswapAgentLabelText(f); + } + return `${o}: ${s}`; + }).join(` +`); + return e && O({ + type: q.INFORMATION, + message: "Environment information copied to clipboard", + dismissId: "versionInfoCopied" + }), l.trim(); + } +}; +w([ + A() +], b.prototype, "serverInfo", 2); +w([ + A() +], b.prototype, "clientInfo", 2); +b = w([ + T("copilot-info-panel") +], b); +let S = class extends J { + createRenderRoot() { + return this; + } + connectedCallback() { + super.connectedCallback(), this.style.display = "flex"; + } + render() { + return d``; + } +}; +S = w([ + T("copilot-info-actions") +], S); +const Q = { + header: "Info", + expanded: !1, + panelOrder: 15, + panel: "right", + floating: !1, + tag: "copilot-info-panel", + actionsTag: "copilot-info-actions", + eager: !0 + // Render even when collapsed as error handling depends on this +}, Y = { + init(e) { + e.addPanel(Q); + } +}; +window.Vaadin.copilot.plugins.push(Y); +function m(e) { + return e ? d`` : d``; +} +export { + S as Actions, + b as CopilotInfoPanel +}; diff --git a/src/main/frontend/generated/jar-resources/copilot/copilot-init-step2-tquZBMEC.js b/src/main/frontend/generated/jar-resources/copilot/copilot-init-step2-tquZBMEC.js new file mode 100644 index 0000000..46664b4 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/copilot/copilot-init-step2-tquZBMEC.js @@ -0,0 +1,2655 @@ +import { n as A, M as D, b as u, j as a, o as T, p as d, q as oe, r as O, u as E, O as q, A as I, v as b, x as l, w as pe, y as ge, z as N, B as G, E as p, D as ue, k as ve, l as fe, P as me, F as be, I as we, V as ye, G as xe, H as ae, J as $, K as H, L as se, N as K, Q as Pe, R as Ie, S as ze, T as Ae, U as re, W as Ce, X as ke, Y as Se, Z as $e, _ as le, $ as de, a0 as De } from "./copilot-xjoIJFQc.js"; +import { n as j, r as C } from "./state-9-chcL5F.js"; +import { e as k, m as ce } from "./overlay-monkeypatch-CXhp9hXg.js"; +import { i as c } from "./icons-AkLm3oZf.js"; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +function Le(e) { + return (t, o) => { + const i = typeof t == "function" ? t : t[o]; + Object.assign(i, e); + }; +} +const X = "@keyframes bounce{0%{transform:scale(.8)}50%{transform:scale(1.5)}to{transform:scale(1)}}@keyframes around-we-go-again{0%{background-position:0 0,0 0,calc(var(--glow-size) * -.5) calc(var(--glow-size) * -.5),calc(100% + calc(var(--glow-size) * .5)) calc(100% + calc(var(--glow-size) * .5))}25%{background-position:0 0,0 0,calc(100% + calc(var(--glow-size) * .5)) calc(var(--glow-size) * -.5),calc(var(--glow-size) * -.5) calc(100% + calc(var(--glow-size) * .5))}50%{background-position:0 0,0 0,calc(100% + calc(var(--glow-size) * .5)) calc(100% + calc(var(--glow-size) * .5)),calc(var(--glow-size) * -.5) calc(var(--glow-size) * -.5)}75%{background-position:0 0,0 0,calc(var(--glow-size) * -.5) calc(100% + calc(var(--glow-size) * .5)),calc(100% + calc(var(--glow-size) * .5)) calc(var(--glow-size) * -.5)}to{background-position:0 0,0 0,calc(var(--glow-size) * -.5) calc(var(--glow-size) * -.5),calc(100% + calc(var(--glow-size) * .5)) calc(100% + calc(var(--glow-size) * .5))}}@keyframes swirl{0%{rotate:0deg;filter:hue-rotate(20deg)}50%{filter:hue-rotate(-30deg)}to{rotate:360deg;filter:hue-rotate(20deg)}}"; +var Ee = Object.defineProperty, Me = Object.getOwnPropertyDescriptor, S = (e, t, o, i) => { + for (var n = i > 1 ? void 0 : i ? Me(t, o) : t, s = e.length - 1, r; s >= 0; s--) + (r = e[s]) && (n = (i ? r(t, o, n) : r(n)) || n); + return i && n && Ee(t, o, n), n; +}; +const J = "data-drag-initial-index", R = "data-drag-final-index"; +let P = class extends D { + constructor() { + super(...arguments), this.position = "right", this.opened = !1, this.keepOpen = !1, this.resizing = !1, this.closingForcefully = !1, this.draggingSectionPanel = null, this.documentMouseUpListener = () => { + this.resizing && u.emit("user-select", { allowSelection: !0 }), this.resizing = !1, a.setDrawerResizing(!1), this.removeAttribute("resizing"); + }, this.activationAnimationTransitionEndListener = () => { + this.style.removeProperty("--closing-delay"), this.style.removeProperty("--initial-position"), this.removeEventListener("transitionend", this.activationAnimationTransitionEndListener); + }, this.resizingMouseMoveListener = (e) => { + if (!this.resizing) + return; + const { x: t, y: o } = e; + e.stopPropagation(), e.preventDefault(), requestAnimationFrame(() => { + let i; + if (this.position === "right") { + const n = document.body.clientWidth - t; + this.style.setProperty("--size", `${n}px`), T.saveDrawerSize(this.position, n), i = { width: n }; + } else if (this.position === "left") { + const n = t; + this.style.setProperty("--size", `${n}px`), T.saveDrawerSize(this.position, n), i = { width: n }; + } else if (this.position === "bottom") { + const n = document.body.clientHeight - o; + this.style.setProperty("--size", `${n}px`), T.saveDrawerSize(this.position, n), i = { height: n }; + } + d.panels.filter((n) => !n.floating && n.panel === this.position).forEach((n) => { + d.updatePanel(n.tag, i); + }); + }); + }, this.sectionPanelDraggingStarted = (e, t) => { + this.draggingSectionPanel = e, u.emit("user-select", { allowSelection: !1 }), this.draggingSectionPointerStartY = t.clientY, e.toggleAttribute("dragging", !0), e.style.zIndex = "1000", Array.from(this.querySelectorAll("copilot-section-panel-wrapper")).forEach((o, i) => { + o.setAttribute(J, `${i}`); + }), document.addEventListener("mousemove", this.sectionPanelDragging), document.addEventListener("mouseup", this.sectionPanelDraggingFinished); + }, this.sectionPanelDragging = (e) => { + if (!this.draggingSectionPanel) + return; + const { clientX: t, clientY: o } = e; + if (!oe(this.getBoundingClientRect(), t, o)) { + this.cleanUpDragging(); + return; + } + const i = o - this.draggingSectionPointerStartY; + this.draggingSectionPanel.style.transform = `translateY(${i}px)`, this.updateSectionPanelPositionsWhileDragging(); + }, this.sectionPanelDraggingFinished = () => { + if (!this.draggingSectionPanel) + return; + u.emit("user-select", { allowSelection: !0 }); + const e = this.getAllPanels().filter( + (t) => t.hasAttribute(R) && t.panelInfo?.panelOrder !== Number.parseInt(t.getAttribute(R), 10) + ).map((t) => ({ + tag: t.panelTag, + order: Number.parseInt(t.getAttribute(R), 10) + })); + this.cleanUpDragging(), d.updateOrders(e), document.removeEventListener("mouseup", this.sectionPanelDraggingFinished), document.removeEventListener("mousemove", this.sectionPanelDragging); + }, this.updateSectionPanelPositionsWhileDragging = () => { + const e = this.draggingSectionPanel.getBoundingClientRect().height; + this.getAllPanels().sort((t, o) => { + const i = t.getBoundingClientRect(), n = o.getBoundingClientRect(), s = (i.top + i.bottom) / 2, r = (n.top + n.bottom) / 2; + return s - r; + }).forEach((t, o) => { + if (t.setAttribute(R, `${o}`), t.panelTag !== this.draggingSectionPanel?.panelTag) { + const i = Number.parseInt(t.getAttribute(J), 10); + i > o ? t.style.transform = `translateY(${-e}px)` : i < o ? t.style.transform = `translateY(${e}px)` : t.style.removeProperty("transform"); + } + }); + }; + } + static get styles() { + return [ + O(X), + E` + :host { + --size: 350px; + --min-size: 20%; + --max-size: 80%; + --default-content-height: 300px; + --transition-duration: var(--duration-2); + --opening-delay: var(--duration-2); + --closing-delay: var(--duration-3); + --hover-size: 18px; + --initial-position: 0px; + position: absolute; + z-index: var(--z-index-drawer); + transition: translate var(--transition-duration) var(--closing-delay); + } + + :host([no-transition]), + :host([no-transition]) .container { + transition: none; + -webkit-transition: none; + -moz-transition: none; + -o-transition: none; + } + + :host(:is([position='left'], [position='right'])) { + width: var(--size); + min-width: var(--min-size); + max-width: var(--max-size); + top: 0; + bottom: 0; + } + + :host([position='left']) { + left: var(--initial-position); + translate: calc(-100% + var(--hover-size)) 0%; + padding-right: var(--hover-size); + } + + :host([position='right']) { + right: var(--initial-position); + translate: calc(100% - var(--hover-size)) 0%; + padding-left: var(--hover-size); + } + + :host([position='bottom']) { + height: var(--size); + min-height: var(--min-size); + max-height: var(--max-size); + bottom: var(--initial-position); + left: 0; + right: 0; + translate: 0% calc(100% - var(--hover-size)); + padding-top: var(--hover-size); + } + + /* The visible container. Needed to have extra space for hover and resize handle outside it. */ + + .container { + display: flex; + flex-direction: column; + box-sizing: border-box; + height: 100%; + background: var(--surface); + -webkit-backdrop-filter: var(--surface-backdrop-filter); + backdrop-filter: var(--surface-backdrop-filter); + overflow-y: auto; + overflow-x: hidden; + box-shadow: var(--surface-box-shadow-2); + transition: + opacity var(--transition-duration) var(--closing-delay), + visibility calc(var(--transition-duration) * 2) var(--closing-delay); + opacity: 0; + /* For accessibility (restored when open) */ + visibility: hidden; + } + + :host([position='left']) .container { + border-right: 1px solid var(--surface-border-color); + } + + :host([position='right']) .container { + border-left: 1px solid var(--surface-border-color); + } + + :host([position='bottom']) .container { + border-top: 1px solid var(--surface-border-color); + } + + /* Opened state */ + + :host(:is([opened], [keepopen])) { + translate: 0% 0%; + transition-delay: var(--opening-delay); + z-index: var(--z-index-opened-drawer); + } + + :host(:is([opened], [keepopen])) .container { + transition-delay: var(--opening-delay); + visibility: visible; + opacity: 1; + } + + .drawer-indicator { + align-items: center; + border-radius: 9999px; + box-shadow: inset 0 0 0 1px hsl(0 0% 0% / 0.2); + color: white; + display: flex; + height: 1.75rem; + justify-content: center; + overflow: hidden; + opacity: 1; + position: absolute; + transition-delay: 0.5s; + transition-duration: 0.2s; + transition-property: opacity; + width: 1.75rem; + } + + .drawer-indicator::before { + animation: 5s swirl linear infinite; + animation-play-state: running; + background-image: radial-gradient(circle at 50% -10%, hsl(221 100% 55% / 0.6) 0%, transparent 60%), + radial-gradient(circle at 25% 40%, hsl(303 71% 64%) 0%, transparent 70%), + radial-gradient(circle at 80% 10%, hsla(262, 38%, 9%, 0.5) 0%, transparent 80%), + radial-gradient(circle at 110% 50%, hsla(147, 100%, 77%, 1) 20%, transparent 100%); + content: ''; + inset: 0; + opacity: 1; + position: absolute; + transition: opacity 0.5s; + } + :host([attention-required]) .drawer-indicator::before { + background-image: radial-gradient(circle at 50% -10%, hsl(0deg 100% 55% / 60%) 0%, transparent 60%), + radial-gradient(circle at 25% 40%, hsl(0deg 71% 64%) 0%, transparent 70%), + radial-gradient(circle at 80% 10%, hsl(0deg 38% 9% / 50%) 0%, transparent 80%), + radial-gradient(circle at 110% 50%, hsl(0deg 100% 77%) 20%, transparent 100%); + } + :host([opened]) .drawer-indicator { + opacity: 0; + transition-delay: 0s; + } + + .drawer-indicator svg { + height: 0.75rem; + width: 0.75rem; + z-index: 1; + } + + :host([position='right']) .drawer-indicator { + left: 0.25rem; + top: calc(50% - 0.875rem); + } + + :host([position='right']) .drawer-indicator svg { + margin-inline-start: -0.625rem; + transform: rotate(-90deg); + } + + :host([position='left']) .drawer-indicator { + right: 0.25rem; + top: calc(50% - 0.875rem); + } + + :host([position='left']) .drawer-indicator svg { + margin-inline-end: -0.625rem; + transform: rotate(90deg); + } + + :host([position='bottom']) .drawer-indicator { + left: calc(50% - 0.875rem); + top: 0.25rem; + } + + :host([position='bottom']) .drawer-indicator svg { + margin-top: -0.625rem; + } + + .overflow-indicator { + align-items: center; + border-radius: 9999px; + bottom: -0.875rem; + box-shadow: inset 0 0 0 1px hsl(0 0% 0% / 0.2); + color: white; + display: flex; + height: 1.75rem; + justify-content: center; + left: calc(50% - 0.875rem); + overflow: hidden; + opacity: 0; + position: absolute; + transition: opacity 0.2s; + width: 1.75rem; + } + + .overflow-indicator::after { + background: hsl(0 0% 0% / 0.5); + border-radius: 9999px; + content: ''; + inset: 2px; + opacity: 1; + position: absolute; + } + + .overflow-indicator::before { + animation: 5s swirl linear infinite; + animation-play-state: running; + background-image: radial-gradient(circle at 50% -10%, hsl(221 100% 55% / 0.6) 0%, transparent 60%), + radial-gradient(circle at 25% 40%, hsl(303 71% 64%) 0%, transparent 70%), + radial-gradient(circle at 80% 10%, hsla(262, 38%, 9%, 0.5) 0%, transparent 80%), + radial-gradient(circle at 110% 50%, hsla(147, 100%, 77%, 1) 20%, transparent 100%); + content: ''; + inset: 0; + opacity: 1; + position: absolute; + transition: opacity 0.5s; + } + + .overflow-indicator svg { + height: 0.75rem; + margin-top: -0.625rem; + width: 0.75rem; + z-index: 1; + } + + :host([position='left']) [canscroll] .overflow-indicator, + :host([position='right']) [canscroll] .overflow-indicator { + opacity: 1; + } + + .resize { + position: absolute; + z-index: 10; + inset: 0; + } + + :host(:is([position='left'], [position='right'])) .resize { + width: var(--hover-size); + cursor: col-resize; + } + + :host([position='left']) .resize { + left: auto; + right: calc(var(--hover-size) * 0.5); + } + + :host([position='right']) .resize { + right: auto; + left: calc(var(--hover-size) * 0.5); + } + + :host([position='bottom']) .resize { + height: var(--hover-size); + bottom: auto; + top: calc(var(--hover-size) * 0.5); + cursor: row-resize; + } + + :host([resizing]) .container { + /* vaadin-grid (used in the outline) blocks the mouse events */ + pointer-events: none; + } + + /* Visual indication of the drawer */ + + :host::before { + content: ''; + position: absolute; + pointer-events: none; + z-index: -1; + inset: var(--hover-size); + transition: opacity var(--transition-duration) var(--closing-delay); + } + + :host([document-hidden])::before { + animation: none; + } + + :host([document-hidden]) .drawer-indicator { + -webkit-filter: grayscale(100%); /* Chrome, Safari, Opera */ + filter: grayscale(100%); + } + + :host(:is([opened], [keepopen]))::before { + transition-delay: var(--opening-delay); + opacity: 0; + } + + .hasmoreContainer { + height: 100%; + position: relative; + } + ` + ]; + } + connectedCallback() { + super.connectedCallback(), this.reaction( + () => d.panels, + () => this.requestUpdate() + ), this.reaction( + () => a.operationInProgress, + (t) => { + t === q.DragAndDrop && !this.opened && !this.keepOpen ? this.style.setProperty("pointer-events", "none") : this.style.setProperty("pointer-events", "auto"); + } + ), this.reaction( + () => d.getAttentionRequiredPanelConfiguration(), + () => { + const t = d.getAttentionRequiredPanelConfiguration(); + t && !t.floating && this.toggleAttribute(I, t.panel === this.position); + } + ), this.reaction( + () => a.active, + () => { + if (!a.active || !b.isActivationAnimation() || a.activatedFrom === "restore" || a.activatedFrom === "test") + return; + const t = d.getAttentionRequiredPanelConfiguration(); + t && !t.floating && t.panel === this.position || (this.addEventListener("transitionend", this.activationAnimationTransitionEndListener), this.toggleAttribute("no-transition", !0), this.opened = !0, this.style.setProperty("--closing-delay", "var(--duration-1)"), this.style.setProperty("--initial-position", "calc(-1 * (max(var(--size), var(--min-size)) * 1) / 3)"), requestAnimationFrame(() => { + this.toggleAttribute("no-transition", !1), this.opened = !1; + })); + } + ), document.addEventListener("mouseup", this.documentMouseUpListener); + const e = T.getDrawerSize(this.position); + e && this.style.setProperty("--size", `${e}px`), document.addEventListener("mousemove", this.resizingMouseMoveListener), this.addEventListener("mouseenter", this.mouseEnterListener), u.on("document-activation-change", (t) => { + this.toggleAttribute("document-hidden", !t.detail.active); + }); + } + firstUpdated(e) { + super.firstUpdated(e), requestAnimationFrame(() => this.toggleAttribute("no-transition", !1)), this.resizeElement.addEventListener("mousedown", (t) => { + t.button === 0 && (this.resizing = !0, a.setDrawerResizing(!0), this.setAttribute("resizing", ""), u.emit("user-select", { allowSelection: !1 })); + }); + } + updated(e) { + super.updated(e), e.has("opened") && this.opened && this.hasAttribute(I) && (this.removeAttribute(I), d.clearAttention()), this.updateScrollable(); + } + disconnectedCallback() { + super.disconnectedCallback(), document.removeEventListener("mousemove", this.resizingMouseMoveListener), document.removeEventListener("mouseup", this.documentMouseUpListener), this.removeEventListener("mouseenter", this.mouseEnterListener); + } + /** + * Cleans up attributes/styles etc... for dragging operations + * @private + */ + cleanUpDragging() { + this.draggingSectionPanel && (a.setSectionPanelDragging(!1), this.draggingSectionPanel.style.zIndex = "", Array.from(this.querySelectorAll("copilot-section-panel-wrapper")).forEach((e) => { + e.style.removeProperty("transform"), e.removeAttribute(R), e.removeAttribute(J); + }), this.draggingSectionPanel.removeAttribute("dragging"), this.draggingSectionPanel = null); + } + getAllPanels() { + return Array.from(this.querySelectorAll("copilot-section-panel-wrapper")); + } + /** + * Closes the drawer and disables mouse enter event for a while. + */ + forceClose() { + this.closingForcefully = !0, this.opened = !1, setTimeout(() => { + this.closingForcefully = !1; + }, 0.5); + } + mouseEnterListener(e) { + if (this.closingForcefully || a.sectionPanelResizing) + return; + document.querySelector("copilot-main").shadowRoot.querySelector("copilot-drawer-panel[opened]") || (this.opened = !0); + } + render() { + return l` +
+
+ +
+
${c.chevronDown}
+
+
+
${c.chevronUp}
+ `; + } + updateScrollable() { + this.hasmoreContainer.toggleAttribute( + "canscroll", + this.container.scrollHeight - this.container.scrollTop - this.container.clientHeight > 10 + ); + } +}; +S([ + j({ reflect: !0, attribute: !0 }) +], P.prototype, "position", 2); +S([ + j({ reflect: !0, type: Boolean }) +], P.prototype, "opened", 2); +S([ + j({ reflect: !0, type: Boolean }) +], P.prototype, "keepOpen", 2); +S([ + k(".container") +], P.prototype, "container", 2); +S([ + k(".hasmoreContainer") +], P.prototype, "hasmoreContainer", 2); +S([ + k(".resize") +], P.prototype, "resizeElement", 2); +S([ + Le({ passive: !0 }) +], P.prototype, "updateScrollable", 1); +P = S([ + A("copilot-drawer-panel") +], P); +var Re = Object.defineProperty, Oe = Object.getOwnPropertyDescriptor, he = (e, t, o, i) => { + for (var n = i > 1 ? void 0 : i ? Oe(t, o) : t, s = e.length - 1, r; s >= 0; s--) + (r = e[s]) && (n = (i ? r(t, o, n) : r(n)) || n); + return i && n && Re(t, o, n), n; +}; +let F = class extends pe { + constructor() { + super(...arguments), this.checked = !1; + } + static get styles() { + return E` + .switch { + display: inline-flex; + align-items: center; + gap: var(--space-100); + } + + .switch input { + height: 0; + opacity: 0; + width: 0; + } + + .slider { + background-color: var(--gray-300); + border-radius: 9999px; + cursor: pointer; + inset: 0; + position: absolute; + transition: 0.4s; + height: 0.75rem; + position: relative; + width: 1.5rem; + min-width: 1.5rem; + } + + .slider:before { + background-color: white; + border-radius: 50%; + bottom: 1px; + content: ''; + height: 0.625rem; + left: 1px; + position: absolute; + transition: 0.4s; + width: 0.625rem; + } + + input:checked + .slider { + background-color: var(--selection-color); + } + + input:checked + .slider:before { + transform: translateX(0.75rem); + } + + label:has(input:focus) { + outline: 2px solid var(--selection-color); + outline-offset: 2px; + } + `; + } + render() { + return l` + + `; + } + // @change=${(e: InputEvent) => this.toggleFeatureFlag(e, feature)} +}; +he([ + j({ reflect: !0, type: Boolean }) +], F.prototype, "checked", 2); +F = he([ + A("copilot-toggle-button") +], F); +function m(e, t) { + const o = document.createElement(e); + if (t.style && (o.className = t.style), t.icon) + if (typeof t.icon == "string") { + const i = document.createElement("vaadin-icon"); + i.setAttribute("icon", t.icon), o.append(i); + } else + o.append(_e(t.icon.strings[0])); + if (t.label) { + const i = document.createElement("span"); + i.className = "label", i.innerHTML = t.label, o.append(i); + } + if (t.hint) { + const i = document.createElement("span"); + i.className = "hint", i.innerHTML = t.hint, o.append(i); + } + return o; +} +function _e(e) { + if (!e) return null; + const t = document.createElement("template"); + t.innerHTML = e; + const o = t.content.children; + return o.length === 1 ? o[0] : o; +} +class je { + constructor() { + this.offsetX = 0, this.offsetY = 0; + } + draggingStarts(t, o) { + this.offsetX = o.clientX - t.getBoundingClientRect().left, this.offsetY = o.clientY - t.getBoundingClientRect().top; + } + dragging(t, o) { + const i = o.clientX, n = o.clientY, s = i - this.offsetX, r = i - this.offsetX + t.getBoundingClientRect().width, h = n - this.offsetY, g = n - this.offsetY + t.getBoundingClientRect().height; + return this.adjust(t, s, h, r, g); + } + adjust(t, o, i, n, s) { + let r, h, g, v; + const y = document.documentElement.getBoundingClientRect().width, U = document.documentElement.getBoundingClientRect().height; + return (n + o) / 2 < y / 2 ? (t.style.setProperty("--left", `${o}px`), t.style.setProperty("--right", ""), v = void 0, r = Math.max(0, o)) : (t.style.removeProperty("--left"), t.style.setProperty("--right", `${y - n}px`), r = void 0, v = Math.max(0, y - n)), (i + s) / 2 < U / 2 ? (t.style.setProperty("--top", `${i}px`), t.style.setProperty("--bottom", ""), g = void 0, h = Math.max(0, i)) : (t.style.setProperty("--top", ""), t.style.setProperty("--bottom", `${U - s}px`), h = void 0, g = Math.max(0, U - s)), { + left: r, + right: v, + top: h, + bottom: g + }; + } + anchor(t) { + const { left: o, top: i, bottom: n, right: s } = t.getBoundingClientRect(); + return this.adjust(t, o, i, s, n); + } + anchorLeftTop(t) { + const { left: o, top: i } = t.getBoundingClientRect(); + return t.style.setProperty("--left", `${o}px`), t.style.setProperty("--right", ""), t.style.setProperty("--top", `${i}px`), t.style.setProperty("--bottom", ""), { + left: o, + top: i + }; + } +} +const x = new je(); +var Te = Object.defineProperty, He = Object.getOwnPropertyDescriptor, M = (e, t, o, i) => { + for (var n = i > 1 ? void 0 : i ? He(t, o) : t, s = e.length - 1, r; s >= 0; s--) + (r = e[s]) && (n = (i ? r(t, o, n) : r(n)) || n); + return i && n && Te(t, o, n), n; +}; +const Z = "https://github.com/JetBrains/JetBrainsRuntime/releases"; +function Be(e, t) { + if (!t) + return !0; + const [o, i, n] = t.split(".").map((g) => parseInt(g)), [s, r, h] = e.split(".").map((g) => parseInt(g)); + if (o < s) + return !0; + if (o == s) { + if (i < r) + return !0; + if (i === r) + return n < h; + } + return !1; +} +const Q = "Download complete"; +let w = class extends D { + constructor() { + super(), this.javaPluginSectionOpened = !1, this.hotswapSectionOpened = !1, this.hotswapTab = "hotswapagent", this.downloadStatusMessages = [], this.downloadProgress = 0, this.onDownloadStatusUpdate = this.downloadStatusUpdate.bind(this), this.reaction( + () => [a.jdkInfo, a.idePluginState], + () => { + a.idePluginState && (!a.idePluginState.ide || !a.idePluginState.active ? this.javaPluginSectionOpened = !0 : (!(/* @__PURE__ */ new Set(["vscode", "intellij"])).has(a.idePluginState.ide) || !a.idePluginState.active) && (this.javaPluginSectionOpened = !1)), a.jdkInfo && N() !== "success" && (this.hotswapSectionOpened = !0); + }, + { fireImmediately: !0 } + ); + } + connectedCallback() { + super.connectedCallback(), u.on("set-up-vs-code-hotswap-status", this.onDownloadStatusUpdate); + } + disconnectedCallback() { + super.disconnectedCallback(), u.off("set-up-vs-code-hotswap-status", this.onDownloadStatusUpdate); + } + render() { + const e = { + intellij: a.idePluginState?.ide === "intellij", + vscode: a.idePluginState?.ide === "vscode", + eclipse: a.idePluginState?.ide === "eclipse", + idePluginInstalled: !!a.idePluginState?.active + }; + return l` +
${this.renderPluginSection(e)} ${this.renderHotswapSection(e)}
+
+ Close + +
+ `; + } + renderPluginSection(e) { + let t = ""; + e.intellij ? t = "IntelliJ" : e.vscode ? t = "VS Code" : e.eclipse && (t = "Eclipse"); + let o, i; + e.vscode || e.intellij ? e.idePluginInstalled ? (o = `Plugin for ${t} installed`, i = this.renderPluginInstalledContent()) : (o = `Plugin for ${t} not installed`, i = this.renderPluginIsNotInstalledContent(e)) : e.eclipse ? (o = "Eclipse development workflow is not supported yet", i = this.renderEclipsePluginContent()) : (o = "No IDE found", i = this.renderNoIdePluginContent()); + const n = e.idePluginInstalled ? c.successColorful : c.warningColorful; + return l` +
{ + G(() => { + this.javaPluginSectionOpened = s.target.open; + }); + }}> + + ${n} +
${o}
+
+
${i}
+
+ `; + } + renderNoIdePluginContent() { + return l` +
+
We could not detect an IDE
+ ${this.recommendSupportedPlugin()} +
+ `; + } + renderEclipsePluginContent() { + return l` +
+
Eclipse workflow environment is not supported yet.
+ ${this.recommendSupportedPlugin()} +
+ `; + } + recommendSupportedPlugin() { + return l`

+ Please use Visual Studio Code or + IntelliJ IDEA for better development experience +

`; + } + renderPluginInstalledContent() { + return l`

You have a running plugin. Enjoy your awesome development workflow!

`; + } + renderPluginIsNotInstalledContent(e) { + let t = null, o = "Install from Marketplace"; + return e.intellij ? (t = we, o = "Install from JetBrains Marketplace") : e.vscode && (t = ye, o = "Install from VSCode Marketplace"), l` +
+
Install the Vaadin IDE Plugin to ensure a smooth development workflow
+

+ Installing the plugin is not required, but strongly recommended.
Some Vaadin Copilot functionality, such + as undo, will not function optimally without the plugin. +

+ ${t ? l`
+ ${o} + + +
` : p} +
+ `; + } + renderHotswapSection(e) { + const { jdkInfo: t } = a; + if (!t) + return p; + const o = N(), i = ue(); + let n, s, r; + return o === "success" ? (n = c.successColorful, r = "Java Hotswap is enabled") : o === "warning" ? (n = c.warningColorful, r = "Java Hotswap is not enabled") : o === "error" && (n = c.warningColorful, r = "Java Hotswap is partially enabled"), this.hotswapTab === "jrebel" ? t.jrebel ? s = this.renderJRebelInstalledContent() : s = this.renderJRebelNotInstalledContent() : e.intellij ? s = this.renderHotswapAgentIntelliJPluginContent() : s = this.renderHotswapAgentNotInstalledContent(e), l`
{ + G(() => { + this.hotswapSectionOpened = h.target.open; + }); + }}> + + ${n} +
${r}
+
+
+ ${i !== "none" ? l`${i == "jrebel" ? this.renderJRebelInstalledContent() : this.renderHotswapAgentInstalledContent()}` : l` +
+ + +
+
${s}
+
+
+ `} +
+ `; + } + renderJRebelNotInstalledContent() { + return l` +
+ JRebel ${c.linkExternal} is a commercial hotswap solution. Vaadin + detects the JRebel Agent and automatically reloads the application in the browser after the Java changes have + been hotpatched. +

+ Go to + + https://www.jrebel.com/products/jrebel/learn ${c.linkExternal} + to get started +

+
+ `; + } + renderHotswapAgentNotInstalledContent(e) { + const t = [ + this.renderJavaRunningInDebugModeSection(), + this.renderHotswapAgentJdkSection(e), + this.renderInstallHotswapAgentJdkSection(e), + this.renderHotswapAgentVersionSection(), + this.renderHotswapAgentMissingArgParam(e) + ]; + return l`
${t}
`; + } + renderHotswapAgentIntelliJPluginContent() { + const t = N() === "success"; + return l` +
+
+
+ + ${t ? c.successColorful : c.warningColorful} +
Use 'Debug using Hotswap Agent' launch configuration
+
+
+ Vaadin IntelliJ plugin offers launch mode that does not require any manual configuration! +

+ In order to run recommended launch configuration, you should click three dots right next to Debug button + and select Debug using Hotswap Agent option. +

+
+
+
+
+ `; + } + renderJavaRunningInDebugModeSection() { + const e = a.jdkInfo?.runningInJavaDebugMode; + return l` +
+
+ + ${e ? c.successColorful : c.warningColorful} +
Run Java in debug mode
+
+
Start the application in debug mode in the IDE
+
+
+ `; + } + renderHotswapAgentMissingArgParam(e) { + const t = a.jdkInfo?.runningWitHotswap && a.jdkInfo?.runningWithExtendClassDef; + return l` +
+
+ + ${t ? c.successColorful : c.warningColorful} +
Enable HotswapAgent
+
+
+
    + ${e.intellij ? l`
  • Launch as mentioned in the previous step
  • ` : p} + ${e.intellij ? l`
  • + To manually configure IntelliJ, add the + -XX:HotswapAgent=fatjar -XX:+AllowEnhancedClassRedefinition -XX:+UpdateClasses JVM + arguments when launching the application +
  • ` : l`
  • + Add the + -XX:HotswapAgent=fatjar -XX:+AllowEnhancedClassRedefinition -XX:+UpdateClasses JVM + arguments when launching the application +
  • `} +
+
+
+
+ `; + } + renderHotswapAgentJdkSection(e) { + const t = a.jdkInfo?.extendedClassDefCapable, o = this.downloadStatusMessages?.[this.downloadStatusMessages.length - 1] === Q; + return l` +
+
+ + ${t ? c.successColorful : c.warningColorful} +
Run using JetBrains Runtime JDK
+
+
+ JetBrains Runtime provides much better hotswapping compared to other JDKs. +
    + ${e.intellij && Be("1.3.0", a.idePluginState?.version) ? l`
  • Upgrade to the latest IntelliJ plugin
  • ` : p} + ${e.intellij ? l`
  • Launch the application in IntelliJ using "Debug using Hotswap Agent"
  • ` : p} + ${e.vscode ? l`
  • + Let Copilot download and set up JetBrains Runtime for VS Code + ${this.downloadProgress > 0 ? l`` : p} +
      + ${this.downloadStatusMessages.map((i) => l`
    • ${i}
    • `)} + ${o ? l`

      Go to VS Code and launch the 'Debug using Hotswap Agent' configuration

      ` : p} +
    +
  • ` : p} +
  • + ${e.intellij || e.vscode ? l`If there is a problem, you can manually + download JetBrains Runtime JDK and set up + your debug configuration to use it.` : l`Download JetBrains Runtime JDK and set up + your debug configuration to use it.`} +
  • +
+
+
+
+ `; + } + renderInstallHotswapAgentJdkSection(e) { + const t = a.jdkInfo?.hotswapAgentFound, o = a.jdkInfo?.extendedClassDefCapable; + return l` +
+
+ + ${t ? c.successColorful : c.warningColorful} +
Install HotswapAgent
+
+
+ Hotswap Agent provides application level support for hot reloading, such as reinitalizing Vaadin @Route or + @BrowserCallable classes when they are updated +
    + ${e.intellij ? l`
  • Launch as mentioned in the previous step
  • ` : p} + ${!e.intellij && !o ? l`
  • First install JetBrains Runtime as mentioned in the step above.
  • ` : p} + ${e.intellij ? l`
  • + To manually configure IntelliJ, download HotswapAgent and install the jar file as + [JAVA_HOME]/lib/hotswap/hotswap-agent.jar in the JetBrains Runtime JDK. Note that the + file must be renamed to exactly match this path. +
  • ` : l`
  • + Download HotswapAgent and install the jar file as + [JAVA_HOME]/lib/hotswap/hotswap-agent.jar in the JetBrains Runtime JDK. Note that the + file must be renamed to exactly match this path. +
  • `} +
+
+
+
+ `; + } + renderHotswapAgentVersionSection() { + if (!a.jdkInfo?.hotswapAgentFound) + return p; + const e = a.jdkInfo?.hotswapVersionOk, t = a.jdkInfo?.hotswapVersion, o = a.jdkInfo?.hotswapAgentLocation; + return l` +
+
+ + ${e ? c.successColorful : c.warningColorful} +
Hotswap version requires update
+
+
+ HotswapAgent version ${t} is in use + Download the latest HotswapAgent + and place it in ${o} +
+
+
+ `; + } + renderJRebelInstalledContent() { + return l`
JRebel is in use. Enjoy your awesome development workflow!
`; + } + renderHotswapAgentInstalledContent() { + return l`
Hotswap agent is in use. Enjoy your awesome development workflow!
`; + } + async downloadJetbrainsRuntime(e) { + return e.target.disabled = !0, e.preventDefault(), this.downloadStatusMessages = [], ve(`${me}set-up-vs-code-hotswap`, {}, (t) => { + t.data.error ? (fe("Error downloading JetBrains runtime", t.data.error), this.downloadStatusMessages = [...this.downloadStatusMessages, "Download failed"]) : this.downloadStatusMessages = [...this.downloadStatusMessages, Q]; + }); + } + downloadStatusUpdate(e) { + const t = e.detail.progress; + t ? this.downloadProgress = t : this.downloadStatusMessages = [...this.downloadStatusMessages, e.detail.message]; + } +}; +w.NAME = "copilot-development-setup-user-guide"; +w.styles = E` + :host { + --icon-size: 24px; + --summary-header-gap: 10px; + --footer-height: calc(50px + var(--space-150)); + color: var(--color); + } + :host code { + background-color: var(--gray-50); + font-size: var(--font-size-0); + display: inline-block; + margin-top: var(--space-100); + margin-bottom: var(--space-100); + user-select: all; + } + + [part='container'] { + display: flex; + flex-direction: column; + gap: var(--space-150); + padding: var(--space-150); + box-sizing: border-box; + height: calc(100% - var(--footer-height)); + overflow: auto; + } + + [part='footer'] { + display: flex; + justify-content: flex-end; + height: var(--footer-height); + padding-left: var(--space-150); + padding-right: var(--space-150); + } + [part='hotswap-agent-section-container'] { + display: flex; + flex-direction: column; + gap: var(--space-100); + } + [part='content'] { + display: flex; + padding: var(--space-150); + flex-direction: column; + } + div.inner-section div.hint { + margin-left: calc(var(--summary-header-gap) + var(--icon-size)); + margin-top: var(--space-75); + } + details { + display: flex; + flex-direction: column; + box-sizing: border-box; + + & > summary span.icon { + width: var(--icon-size); + height: var(--icon-size); + } + & > summary, + summary::part(header) { + display: flex; + flex-direction: row; + align-items: center; + cursor: pointer; + position: relative; + gap: var(--summary-header-gap); + font: var(--font); + } + summary::after, + summary::part(header)::after { + content: ''; + display: block; + width: 4px; + height: 4px; + border-color: var(--color); + opacity: var(--panel-toggle-opacity, 0.2); + border-width: 2px; + border-style: solid solid none none; + transform: rotate(var(--panel-toggle-angle, -45deg)); + position: absolute; + right: 15px; + top: calc(50% - var(--panel-toggle-offset, 2px)); + } + &:not([open]) { + --panel-toggle-angle: 135deg; + --panel-toggle-offset: 4px; + } + } + details[part='panel'] { + background: var(--card-bg); + border: var(--card-border); + border-radius: 4px; + user-select: none; + + &:has(summary:hover) { + border-color: var(--accent-color); + } + + & > summary, + summary::part(header) { + padding: 10px 10px; + padding-right: 25px; + } + + summary:hover, + summary::part(header):hover { + --panel-toggle-opacity: 0.5; + } + + input[type='checkbox'], + summary::part(checkbox) { + margin: 0; + } + + &:not([open]):hover { + background: var(--card-hover-bg); + } + + &[open] { + background: var(--card-open-bg); + box-shadow: var(--card-open-shadow); + + & > summary { + font-weight: bold; + } + } + .tabs { + border-bottom: 1px solid var(--border-color); + box-sizing: border-box; + display: flex; + height: 2.25rem; + } + + .tab { + background: none; + border: none; + border-bottom: 1px solid transparent; + color: var(--color); + font: var(--font-button); + height: 2.25rem; + padding: 0 0.75rem; + } + + .tab[aria-selected='true'] { + color: var(--color-high-contrast); + border-bottom-color: var(--color-high-contrast); + } + + .tab-content { + flex: 1 1 auto; + gap: var(--space-150); + overflow: auto; + padding: var(--space-150); + } + } + `; +M([ + C() +], w.prototype, "javaPluginSectionOpened", 2); +M([ + C() +], w.prototype, "hotswapSectionOpened", 2); +M([ + C() +], w.prototype, "hotswapTab", 2); +M([ + C() +], w.prototype, "downloadStatusMessages", 2); +M([ + C() +], w.prototype, "downloadProgress", 2); +w = M([ + A(w.NAME) +], w); +const Y = ge({ + header: "Development Workflow", + tag: be, + width: 800, + height: 800, + floatingPosition: { + top: 50, + left: 50 + }, + individual: !0 +}), Ue = { + init(e) { + e.addPanel(Y); + } +}; +window.Vaadin.copilot.plugins.push(Ue); +d.addPanel(Y); +var Ne = Object.defineProperty, Je = Object.getOwnPropertyDescriptor, Ve = (e, t, o, i) => { + for (var n = i > 1 ? void 0 : i ? Je(t, o) : t, s = e.length - 1, r; s >= 0; s--) + (r = e[s]) && (n = (i ? r(t, o, n) : r(n)) || n); + return i && n && Ne(t, o, n), n; +}; +let ee = class extends D { + constructor() { + super(...arguments), this.clickListener = xe; + } + createRenderRoot() { + return this; + } + connectedCallback() { + super.connectedCallback(), this.classList.add("custom-menu-item"), this.addEventListener("click", this.clickListener); + } + disconnectedCallback() { + super.disconnectedCallback(), this.removeEventListener("click", this.clickListener); + } + render() { + const e = ae(), t = e.status === "warning" || e.status === "error"; + return l` +
+
Development workflow
+
${e.message}
+
+ ${t ? l`
` : p} + `; + } +}; +ee = Ve([ + A("copilot-activation-button-development-workflow") +], ee); +var Fe = Object.defineProperty, qe = Object.getOwnPropertyDescriptor, Xe = (e, t, o, i) => { + for (var n = i > 1 ? void 0 : i ? qe(t, o) : t, s = e.length - 1, r; s >= 0; s--) + (r = e[s]) && (n = (i ? r(t, o, n) : r(n)) || n); + return i && n && Fe(t, o, n), n; +}; +let te = class extends D { + constructor() { + super(...arguments), this.info = a.userInfo, this.clickListener = this.getClickListener(); + } + createRenderRoot() { + return this; + } + connectedCallback() { + super.connectedCallback(), this.classList.add("custom-menu-item"), this.addEventListener("click", this.clickListener); + } + disconnectedCallback() { + super.disconnectedCallback(), this.removeEventListener("click", this.clickListener); + } + render() { + const e = this.getStatus(); + return l` +
+
${this.getUsername()}
+ ${e ? l`
${e}
` : p} +
+ ${this.renderPortrait()} ${this.renderDot()} + `; + } + getClickListener() { + return a.userInfo?.validLicense ? () => window.open("https://vaadin.com/myaccount", "_blank", "noopener") : () => a.setLoginCheckActive(!0); + } + getUsername() { + return a.userInfo?.firstName ? `${a.userInfo.firstName} ${a.userInfo.lastName}` : "Log in"; + } + getStatus() { + if (!a.userInfo?.validLicense) { + if ($.active) { + const e = Math.round($.remainingTimeInMillis / 864e5); + return `Preview expires in ${e}${e === 1 ? " day" : " days"}`; + } + if ($.expired && !a.userInfo?.validLicense) + return "Preview expired"; + if (!$.active && !$.expired && !a.userInfo?.validLicense) + return "No valid license available"; + } + } + renderPortrait() { + return a.userInfo?.portraitUrl ? l`
` : p; + } + renderDot() { + return a.userInfo?.validLicense ? p : $.active || $.expired ? l`
` : p; + } +}; +te = Xe([ + A("copilot-activation-button-user-info") +], te); +var Ye = Object.defineProperty, We = Object.getOwnPropertyDescriptor, B = (e, t, o, i) => { + for (var n = i > 1 ? void 0 : i ? We(t, o) : t, s = e.length - 1, r; s >= 0; s--) + (r = e[s]) && (n = (i ? r(t, o, n) : r(n)) || n); + return i && n && Ye(t, o, n), n; +}; +const Ge = 8; +let _ = class extends D { + constructor() { + super(...arguments), this.initialMouseDownPosition = null, this.dragging = !1, this.items = [], this.mouseDownListener = (e) => { + this.initialMouseDownPosition = { x: e.clientX, y: e.clientY }, x.draggingStarts(this, e), document.addEventListener("mousemove", this.documentDraggingMouseMoveEventListener); + }, this.documentDraggingMouseMoveEventListener = (e) => { + if (this.initialMouseDownPosition && !this.dragging) { + const { clientX: t, clientY: o } = e; + this.dragging = Math.abs(t - this.initialMouseDownPosition.x) + Math.abs(o - this.initialMouseDownPosition.y) > Ge; + } + this.dragging && (this.setOverlayVisibility(!1), x.dragging(this, e)); + }, this.documentMouseUpListener = (e) => { + if (this.initialMouseDownPosition = null, document.removeEventListener("mousemove", this.documentDraggingMouseMoveEventListener), this.dragging) { + const t = x.dragging(this, e); + b.setActivationButtonPosition(t), this.setOverlayVisibility(!0); + } else + this.setMenuBarOnClick(); + this.dragging = !1; + }, this.closeMenuMouseMoveListener = (e) => { + e.composedPath().some((i) => { + if (i instanceof HTMLElement) { + const n = i; + if (n.localName === this.localName || n.localName === "vaadin-menu-bar-overlay" && n.classList.contains("activation-button-menu")) + return !0; + } + return this.checkPointerIsInRangeInSurroundingRectangle(e); + }) || this.closeMenu(); + }, this.checkPointerIsInRangeInSurroundingRectangle = (e) => { + const o = document.querySelector("copilot-main")?.shadowRoot?.querySelector("vaadin-menu-bar-overlay.activation-button-menu"), i = this.menubar; + if (!o) + return !1; + const n = o.querySelector("vaadin-menu-bar-list-box"); + if (!n) + return !1; + const s = n.getBoundingClientRect(), r = i.getBoundingClientRect(), h = Math.min(s.x, r.x), g = Math.min(s.y, r.y), v = Math.max(s.width, r.width), y = s.height + r.height; + return oe(new DOMRect(h, g, v, y), e.clientX, e.clientY); + }, this.dispatchSpotlightActivationEvent = (e) => { + this.dispatchEvent( + new CustomEvent("spotlight-activation-changed", { + detail: e + }) + ); + }, this.activationBtnClicked = (e) => { + if (a.active && this.handleAttentionRequiredOnClick()) { + e?.stopPropagation(), e?.preventDefault(); + return; + } + e?.stopPropagation(), this.dispatchEvent(new CustomEvent("activation-btn-clicked")); + }, this.handleAttentionRequiredOnClick = () => { + const e = d.getAttentionRequiredPanelConfiguration(); + return e ? e.panel && !e.floating ? (u.emit("open-attention-required-drawer", null), !0) : (d.clearAttention(), !0) : !1; + }, this.closeMenu = () => { + this.menubar._close(), document.removeEventListener("mousemove", this.closeMenuMouseMoveListener); + }, this.setMenuBarOnClick = () => { + const e = this.shadowRoot.querySelector("vaadin-menu-bar-button"); + e && (e.onclick = this.activationBtnClicked); + }; + } + static get styles() { + return [ + O(X), + E` + :host { + --space: 8px; + --height: 28px; + --width: 28px; + position: absolute; + top: clamp(var(--space), var(--top), calc(100vh - var(--height) - var(--space))); + left: clamp(var(--space), var(--left), calc(100vw - var(--width) - var(--space))); + bottom: clamp(var(--space), var(--bottom), calc(100vh - var(--height) - var(--space))); + right: clamp(var(--space), var(--right), calc(100vw - var(--width) - var(--space))); + user-select: none; + -ms-user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + --indicator-color: var(--red); + /* Don't add a z-index or anything else that creates a stacking context */ + } + + :host .menu-button { + min-width: unset; + } + + :host([document-hidden]) { + -webkit-filter: grayscale(100%); /* Chrome, Safari, Opera */ + filter: grayscale(100%); + } + + .menu-button::part(container) { + overflow: visible; + } + + .menu-button vaadin-menu-bar-button { + all: initial; + display: block; + position: relative; + z-index: var(--z-index-activation-button); + width: var(--width); + height: var(--height); + overflow: hidden; + color: transparent; + background: hsl(0 0% 0% / 0.25); + border-radius: 8px; + box-shadow: 0 0 0 1px hsl(0 0% 100% / 0.1); + cursor: default; + -webkit-backdrop-filter: blur(8px); + backdrop-filter: blur(8px); + transition: + box-shadow 0.2s, + background-color 0.2s; + } + + /* visual effect when active */ + + .menu-button vaadin-menu-bar-button::before { + all: initial; + content: ''; + background-image: radial-gradient(circle at 50% -10%, hsl(221 100% 55% / 0.6) 0%, transparent 60%), + radial-gradient(circle at 25% 40%, hsl(303 71% 64%) 0%, transparent 70%), + radial-gradient(circle at 80% 10%, hsla(262, 38%, 9%, 0.5) 0%, transparent 80%), + radial-gradient(circle at 110% 50%, hsla(147, 100%, 77%, 1) 20%, transparent 100%); + animation: 5s swirl linear infinite; + animation-play-state: paused; + inset: -6px; + opacity: 0; + position: absolute; + transition: opacity 0.5s; + } + + /* vaadin symbol */ + + .menu-button vaadin-menu-bar-button::after { + all: initial; + content: ''; + position: absolute; + inset: 1px; + background: url('data:image/svg+xml;utf8,'); + background-size: 100%; + } + + .menu-button vaadin-menu-bar-button[focus-ring] { + outline: 2px solid var(--selection-color); + outline-offset: 2px; + } + + .menu-button vaadin-menu-bar-button:hover { + background: hsl(0 0% 0% / 0.8); + box-shadow: + 0 0 0 1px hsl(0 0% 100% / 0.1), + 0 2px 8px -1px hsl(0 0% 0% / 0.3); + } + + :host([active]) .menu-button vaadin-menu-bar-button { + background-color: transparent; + box-shadow: + inset 0 0 0 1px hsl(0 0% 0% / 0.2), + 0 2px 8px -1px hsl(0 0% 0% / 0.3); + } + + :host([active]) .menu-button vaadin-menu-bar-button::before { + opacity: 1; + animation-play-state: running; + } + + :host([attention-required]) { + animation: bounce 0.5s; + animation-iteration-count: 2; + } + + [part='indicator'] { + top: -6px; + right: -6px; + width: 12px; + height: 12px; + box-sizing: border-box; + border-radius: 100%; + position: absolute; + display: var(--indicator-display, none); + background: var(--indicator-color); + z-index: calc(var(--z-index-activation-button) + 1); + border: 2px solid var(--indicator-border); + } + + :host([indicator='warning']) { + --indicator-display: block; + --indicator-color: var(--yellow); + } + + :host([indicator='error']) { + --indicator-display: block; + --indicator-color: var(--red); + } + ` + ]; + } + connectedCallback() { + super.connectedCallback(), this.reaction( + () => d.attentionRequiredPanelTag, + () => { + this.toggleAttribute(I, d.attentionRequiredPanelTag !== null), this.updateIndicator(); + } + ), this.reaction( + () => a.active, + () => { + this.toggleAttribute("active", a.active); + }, + { fireImmediately: !0 } + ), this.addEventListener("mousedown", this.mouseDownListener), document.addEventListener("mouseup", this.documentMouseUpListener); + const e = b.getActivationButtonPosition(); + e ? (this.style.setProperty("--left", `${e.left}px`), this.style.setProperty("--bottom", `${e.bottom}px`), this.style.setProperty("--right", `${e.right}px`), this.style.setProperty("--top", `${e.top}px`)) : (this.style.setProperty("--bottom", "var(--space)"), this.style.setProperty("--right", "var(--space)")), u.on("document-activation-change", (t) => { + this.toggleAttribute("document-hidden", !t.detail.active); + }), this.reaction( + () => [a.jdkInfo, a.idePluginState], + () => { + this.updateIndicator(); + } + ), this.reaction( + () => [a.userInfo], + () => { + this.requestUpdate(); + } + ), this.reaction( + () => [ + a.active, + a.idePluginState, + b.isActivationAnimation(), + a.userInfo + ], + () => { + this.generateItems(); + } + ); + } + disconnectedCallback() { + super.disconnectedCallback(), this.removeEventListener("mousedown", this.mouseDownListener), document.removeEventListener("mouseup", this.documentMouseUpListener); + } + updateIndicator() { + if (this.hasAttribute(I)) { + this.setAttribute("indicator", "error"); + return; + } + const e = ae(); + e.status !== "success" ? this.setAttribute("indicator", e.status) : this.removeAttribute("indicator"); + } + /** + * To hide overlay while dragging + * @param visible + */ + setOverlayVisibility(e) { + const t = this.shadowRoot.querySelector("vaadin-menu-bar-button").__overlay; + e ? (t?.style.setProperty("display", "flex"), t?.style.setProperty("visibility", "visible")) : (t?.style.setProperty("display", "none"), t?.style.setProperty("visibility", "invisible")); + } + generateItems() { + const e = [ + { + text: "Vaadin Copilot", + children: [] + } + ]; + a.userInfo?.copilotProjectCannotLeaveLocalhost !== !0 && e[0].children.push({ + component: m("vaadin-menu-bar-item", { + label: "Toggle Command Window", + hint: H.toggleCommandWindow, + style: "toggle-spotlight" + }), + action: "spotlight" + }), a.active && (a.idePluginState?.supportedActions?.find((t) => t === "undo") && (e[0].children = [ + { + component: m("vaadin-menu-bar-item", { + label: "Undo", + hint: H.undo + }), + action: "undo" + }, + { + component: m("vaadin-menu-bar-item", { + label: "Redo", + hint: H.redo + }), + action: "redo" + }, + ...e[0].children + ]), e[0].children = [ + { + component: m("vaadin-menu-bar-item", { + label: "Tell us what you think" + // Label used also in ScreenshotsIT.java + }), + action: "feedback" + }, + { + component: m("vaadin-menu-bar-item", { + label: "Show welcome message" + }), + action: "welcome" + }, + { + component: m("vaadin-menu-bar-item", { + label: "Show keyboard shortcuts" + }), + action: "shortcuts" + }, + { + text: "Settings", + children: [ + { + component: m("vaadin-menu-bar-item", { + label: "Activation shortcut enabled", + hint: b.isActivationShortcut() ? "✓" : void 0 + }), + action: "shortcut" + }, + { + component: m("vaadin-menu-bar-item", { + label: "Show animation when activating", + hint: b.isActivationAnimation() ? "✓" : void 0 + }), + action: "animate-on-activate" + } + ] + }, + { + component: "hr" + }, + ...e[0].children + ]), e[0].children = [ + ...e[0].children, + { component: "hr" }, + { + component: m("vaadin-menu-bar-item", { + label: 'DeactivateActivate Copilot', + hint: b.isActivationShortcut() ? H.toggleCopilot : void 0 + }), + action: "copilot" + } + ], e[0].children.unshift({ component: "copilot-activation-button-development-workflow" }), a.active && (e[0].children.unshift({ component: "hr" }), e[0].children.unshift({ component: "copilot-activation-button-user-info" })), this.items = e; + } + render() { + return l` + + +
+ `; + } + handleMenuItemClick(e) { + if (this.closeMenu(), e.onClick) { + e.onClick(); + return; + } + switch (e.action) { + case "copilot": + this.activationBtnClicked(); + break; + case "spotlight": + a.setSpotlightActive(!a.spotlightActive); + break; + case "shortcut": + b.setActivationShortcut(!b.isActivationShortcut()); + break; + case "animate-on-activate": + b.setActivationAnimation(!b.isActivationAnimation()); + break; + case "undo": + case "redo": + u.emit("undoRedo", { undo: e.action === "undo" }); + break; + case "feedback": + d.updatePanel("copilot-feedback-panel", { + floating: !0 + }); + break; + case "welcome": + a.setWelcomeActive(!0), a.setSpotlightActive(!0); + break; + case "shortcuts": + d.updatePanel("copilot-shortcuts-panel", { + floating: !0 + }); + break; + } + } + firstUpdated() { + this.setMenuBarOnClick(), ce(this.shadowRoot); + } +}; +B([ + k("vaadin-menu-bar") +], _.prototype, "menubar", 2); +B([ + C() +], _.prototype, "dragging", 2); +B([ + C() +], _.prototype, "items", 2); +_ = B([ + A("copilot-activation-button") +], _); +var Ke = Object.defineProperty, Ze = Object.getOwnPropertyDescriptor, L = (e, t, o, i) => { + for (var n = i > 1 ? void 0 : i ? Ze(t, o) : t, s = e.length - 1, r; s >= 0; s--) + (r = e[s]) && (n = (i ? r(t, o, n) : r(n)) || n); + return i && n && Ke(t, o, n), n; +}; +const f = "resize-dir", V = "floating-resizing-active"; +let z = class extends D { + constructor() { + super(...arguments), this.panelTag = "", this.dockingItems = [ + { + component: m("vaadin-context-menu-item", { + icon: c.dockRight, + label: "Dock right" + }), + panel: "right" + }, + { + component: m("vaadin-context-menu-item", { + icon: c.dockLeft, + label: "Dock left" + }), + panel: "left" + }, + { + component: m("vaadin-context-menu-item", { + icon: c.dockBottom, + label: "Dock bottom" + }), + panel: "bottom" + } + ], this.floatingResizingStarted = !1, this.resizingInDrawerStarted = !1, this.toggling = !1, this.rectangleBeforeResizing = null, this.floatingResizeHandlerMouseMoveListener = (e) => { + if (!this.panelInfo?.floating || this.floatingResizingStarted || !this.panelInfo?.expanded) + return; + const t = this.getBoundingClientRect(), o = Math.abs(e.clientX - t.x), i = Math.abs(t.x + t.width - e.clientX), n = Math.abs(e.clientY - t.y), s = Math.abs(t.y + t.height - e.clientY), r = Number.parseInt( + window.getComputedStyle(this).getPropertyValue("--floating-offset-resize-threshold"), + 10 + ); + let h = ""; + o < r ? n < r ? (h = "nw-resize", this.setAttribute(f, "top left")) : s < r ? (h = "sw-resize", this.setAttribute(f, "bottom left")) : (h = "col-resize", this.setAttribute(f, "left")) : i < r ? n < r ? (h = "ne-resize", this.setAttribute(f, "top right")) : s < r ? (h = "se-resize", this.setAttribute(f, "bottom right")) : (h = "col-resize", this.setAttribute(f, "right")) : s < r ? (h = "row-resize", this.setAttribute(f, "bottom")) : n < r && (h = "row-resize", this.setAttribute(f, "top")), h !== "" ? (this.rectangleBeforeResizing = this.getBoundingClientRect(), this.style.setProperty("--resize-cursor", h)) : (this.style.removeProperty("--resize-cursor"), this.removeAttribute(f)), this.toggleAttribute(V, h !== ""); + }, this.floatingResizingMouseDownListener = (e) => { + if (!this.hasAttribute(V) || e.button !== 0) + return; + e.stopPropagation(), e.preventDefault(), x.anchorLeftTop(this), this.floatingResizingStarted = !0, this.toggleAttribute("resizing", !0); + const t = this.getResizeDirections(), { clientX: o, clientY: i } = e; + (t.includes("top") || t.includes("bottom")) && this.style.setProperty("--section-height", null), t.forEach((n) => this.setResizePosition(n, o, i)), a.setSectionPanelResizing(!0); + }, this.floatingResizingMouseLeaveListener = () => { + this.panelInfo?.floating && (this.floatingResizingStarted || (this.removeAttribute("resizing"), this.removeAttribute(V), this.removeAttribute("dragging"), this.style.removeProperty("--resize-cursor"), this.removeAttribute(f))); + }, this.floatingResizingMouseMoveListener = (e) => { + if (!this.panelInfo?.floating || !this.floatingResizingStarted) + return; + e.stopPropagation(), e.preventDefault(); + const t = this.getResizeDirections(), { clientX: o, clientY: i } = e; + t.forEach((n) => this.setResizePosition(n, o, i)); + }, this.setFloatingResizeDirectionProps = (e, t, o, i) => { + o && o > Number.parseFloat(window.getComputedStyle(this).getPropertyValue("--min-width")) && (this.style.setProperty(`--${e}`, `${t}px`), this.style.setProperty("width", `${o}px`)); + const n = window.getComputedStyle(this), s = Number.parseFloat(n.getPropertyValue("--header-height")), r = Number.parseFloat(n.getPropertyValue("--floating-offset-resize-threshold")) / 2; + i && i > s + r && (this.style.setProperty(`--${e}`, `${t}px`), this.style.setProperty("height", `${i}px`), this.container.style.setProperty("margin-top", "calc(var(--floating-offset-resize-threshold) / 4)"), this.container.style.height = `calc(${i}px - var(--floating-offset-resize-threshold) / 2)`); + }, this.floatingResizingMouseUpListener = (e) => { + if (!this.floatingResizingStarted || !this.panelInfo?.floating) + return; + e.stopPropagation(), e.preventDefault(), this.floatingResizingStarted = !1, a.setSectionPanelResizing(!1); + const { width: t, height: o } = this.getBoundingClientRect(), { left: i, top: n, bottom: s, right: r } = x.anchor(this), h = window.getComputedStyle(this.container), g = Number.parseInt(h.borderTopWidth, 10), v = Number.parseInt(h.borderTopWidth, 10); + d.updatePanel(this.panelInfo.tag, { + width: t, + height: o - (g + v), + floatingPosition: { + ...this.panelInfo.floatingPosition, + left: i, + top: n, + bottom: s, + right: r + } + }), this.style.removeProperty("width"), this.style.removeProperty("height"), this.container.style.removeProperty("height"), this.container.style.removeProperty("margin-top"), this.setCssSizePositionProperties(), this.toggleAttribute("dragging", !1); + }, this.transitionEndEventListener = () => { + this.toggling && (this.toggling = !1, x.anchor(this)); + }, this.resizeInDrawerMouseDownListener = (e) => { + e.button === 0 && (this.resizingInDrawerStarted = !0, this.setAttribute("resizing", ""), u.emit("user-select", { allowSelection: !1 })); + }, this.resizeInDrawerMouseMoveListener = (e) => { + if (!this.resizingInDrawerStarted) + return; + const { y: t } = e; + e.stopPropagation(), e.preventDefault(); + const o = t - this.getBoundingClientRect().top; + this.style.setProperty("--section-height", `${o}px`), d.updatePanel(this.panelInfo.tag, { + height: o + }); + }, this.resizeInDrawerMouseUpListener = () => { + this.resizingInDrawerStarted && (this.panelInfo?.floating || (this.resizingInDrawerStarted = !1, this.removeAttribute("resizing"), u.emit("user-select", { allowSelection: !0 }), this.style.setProperty("--section-height", `${this.getBoundingClientRect().height}px`))); + }, this.sectionPanelMouseEnterListener = () => { + this.hasAttribute(I) && (this.removeAttribute(I), d.clearAttention()); + }, this.contentAreaMouseDownListener = () => { + d.bringToFront(this.panelInfo.tag); + }, this.documentMouseUpEventListener = () => { + document.removeEventListener("mousemove", this.draggingEventListener), this.panelInfo?.floating && (this.toggleAttribute("dragging", !1), a.setSectionPanelDragging(!1)); + }, this.panelHeaderMouseDownEventListener = (e) => { + e.button === 0 && (d.bringToFront(this.panelInfo.tag), !this.hasAttribute(f) && (e.target instanceof HTMLButtonElement && e.target.getAttribute("part") === "title-button" ? this.startDraggingDebounce(e) : this.startDragging(e))); + }, this.panelHeaderMouseUpEventListener = (e) => { + e.button === 0 && this.startDraggingDebounce.clear(); + }, this.startDragging = (e) => { + x.draggingStarts(this, e), document.addEventListener("mousemove", this.draggingEventListener), a.setSectionPanelDragging(!0), this.panelInfo?.floating ? this.toggleAttribute("dragging", !0) : this.parentElement.sectionPanelDraggingStarted(this, e), e.preventDefault(), e.stopPropagation(); + }, this.startDraggingDebounce = se(this.startDragging, 200), this.draggingEventListener = (e) => { + const t = x.dragging(this, e); + if (this.panelInfo?.floating && this.panelInfo?.floatingPosition) { + e.preventDefault(); + const { left: o, top: i, bottom: n, right: s } = t; + d.updatePanel(this.panelInfo.tag, { + floatingPosition: { + ...this.panelInfo.floatingPosition, + left: o, + top: i, + bottom: n, + right: s + } + }); + } + }, this.setCssSizePositionProperties = () => { + const e = d.getPanelByTag(this.panelTag); + if (e && (e.height !== void 0 && (this.panelInfo?.floating || e.panel === "left" || e.panel === "right" ? this.style.setProperty("--section-height", `${e.height}px`) : this.style.removeProperty("--section-height")), e.width !== void 0 && (e.floating || e.panel === "bottom" ? this.style.setProperty("--section-width", `${e.width}px`) : this.style.removeProperty("--section-width")), e.floating && e.floatingPosition && !this.toggling)) { + const { left: t, top: o, bottom: i, right: n } = e.floatingPosition; + this.style.setProperty("--left", t !== void 0 ? `${t}px` : "auto"), this.style.setProperty("--top", o !== void 0 ? `${o}px` : "auto"), this.style.setProperty("--bottom", i !== void 0 ? `${i}px` : ""), this.style.setProperty("--right", n !== void 0 ? `${n}px` : ""); + } + }, this.renderPopupButton = () => { + if (!this.panelInfo) + return p; + let e; + return this.panelInfo.panel === void 0 ? e = "Close the popup" : e = this.panelInfo.floating ? `Dock ${this.panelInfo.header} to ${this.panelInfo.panel}` : `Open ${this.panelInfo.header} as a popup`, l` + + + + `; + }, this.changePanelFloating = (e) => { + if (this.panelInfo) + if (e.stopPropagation(), K(this), this.panelInfo?.floating) + d.updatePanel(this.panelInfo.tag, { floating: !1 }); + else { + let t; + if (this.panelInfo.floatingPosition) + t = this.panelInfo.floatingPosition; + else { + const { left: n, top: s } = this.getBoundingClientRect(); + t = { + left: n, + top: s + }; + } + let o = this.panelInfo?.height; + o === void 0 && this.panelInfo.expanded && (o = Number.parseInt(window.getComputedStyle(this).height, 10)), this.parentElement.forceClose(), d.updatePanel(this.panelInfo.tag, { + floating: !0, + expanded: !0, + width: this.panelInfo?.width || Number.parseInt(window.getComputedStyle(this).width, 10), + height: o, + floatingPosition: t + }), d.bringToFront(this.panelInfo.tag); + } + }, this.toggleExpand = (e) => { + this.panelInfo && (e.stopPropagation(), x.anchorLeftTop(this), d.updatePanel(this.panelInfo.tag, { + expanded: !this.panelInfo.expanded + }), this.toggling = !0, this.toggleAttribute("expanded", this.panelInfo.expanded)); + }; + } + static get styles() { + return [ + O(X), + E` + * { + box-sizing: border-box; + } + + :host { + flex: none; + display: grid; + align-content: start; + grid-template-rows: auto 1fr; + transition: grid-template-rows var(--duration-2); + overflow: hidden; + position: relative; + --min-width: 160px; + --resize-div-size: 10px; + --header-height: 37px; + --content-height: calc(var(--section-height) - var(--header-height)); + --content-width: var(--content-width, 100%); + --floating-border-width: 1px; + --floating-offset-resize-threshold: 8px; + cursor: var(--cursor, var(--resize-cursor, default)); + } + + :host(:not([expanded])) { + grid-template-rows: auto 0fr; + --content-height: 0px !important; + } + + [part='header'] { + align-items: center; + color: var(--color-high-contrast); + display: flex; + flex: none; + font: var(--font-small-medium); + justify-content: space-between; + min-width: 100%; + user-select: none; + -webkit-user-select: none; + width: var(--min-width); + height: var(--header-height); + } + + :host([floating]:not([expanded])) [part='header'] { + --min-width: unset; + } + + [part='header'] { + border-bottom: 1px solid var(--border-color); + } + + :host([floating]) [part='header'] { + transition: border-color var(--duration-2); + } + + :host([floating]:not([expanded])) [part='header'] { + border-color: transparent; + } + + [part='title'] { + flex: auto; + margin: 0; + overflow: hidden; + text-overflow: ellipsis; + } + + [part='content'] { + height: var(--content-height); + overflow: auto; + transition: + height var(--duration-2), + width var(--duration-2), + opacity var(--duration-2), + visibility calc(var(--duration-2) * 2); + } + + [part='drawer-resize'] { + resize: vertical; + cursor: row-resize; + position: absolute; + bottom: -5px; + left: 0; + width: 100%; + height: 10px; + } + + :host([floating]) [part='drawer-resize'] { + display: none; + } + + :host(:not([expanded])) [part='drawer-resize'] { + display: none; + } + + :host(:not([floating]):not(:last-child)) { + border-bottom: 1px solid var(--border-color); + } + + :host(:not([expanded])) [part='content'] { + opacity: 0; + visibility: hidden; + } + + :host([floating]:not([expanded])) [part='content'] { + width: 0; + height: 0; + } + + :host(:not([expanded])) [part='content'][style*='height'] { + height: 0 !important; + } + + :host(:not([expanded])) [part='content'][style*='width'] { + width: 0 !important; + } + + :host([floating]) { + position: fixed; + min-width: 0; + min-height: 0; + z-index: calc(var(--z-index-floating-panel) + var(--z-index-focus, 0)); + top: clamp(0px, var(--top), calc(100vh - var(--section-height, var(--header-height)) * 0.5)); + left: clamp(calc(var(--section-width) * -0.5), var(--left), calc(100vw - var(--section-width) * 0.5)); + bottom: clamp( + calc(var(--section-height, var(--header-height)) * -0.5), + var(--bottom), + calc(100vh - var(--section-height, var(--header-height)) * 0.5) + ); + right: clamp(calc(var(--section-width) * -0.5), var(--right), calc(100vw - var(--section-width) * 0.5)); + width: var(--section-width); + overflow: visible; + } + :host([floating]) [part='container'] { + background: var(--surface); + border: var(--floating-border-width) solid var(--surface-border-color); + -webkit-backdrop-filter: var(--surface-backdrop-filter); + backdrop-filter: var(--surface-backdrop-filter); + border-radius: var(--radius-2); + margin: auto; + box-shadow: var(--surface-box-shadow-2); + } + [part='container'] { + overflow: hidden; + } + :host([floating][expanded]) { + max-height: 100vh; + } + :host([floating][expanded]) [part='container'] { + height: calc(100% - var(--floating-offset-resize-threshold) / 2); + width: calc(100% - var(--floating-offset-resize-threshold) / 2); + } + + :host([floating]:not([expanded])) { + width: unset; + } + + :host([floating]) .drag-handle { + cursor: var(--resize-cursor, move); + } + + :host([floating][expanded]) [part='content'] { + min-width: var(--min-width); + min-height: 0; + width: var(--content-width); + } + + /* :hover for Firefox, :active for others */ + + :host([floating][expanded]) [part='content']:is(:hover, :active) { + transition: none; + } + + [part='header'] button { + align-items: center; + appearance: none; + background: transparent; + border: 0px; + border-radius: var(--radius-1); + color: var(--color); + display: flex; + flex: 0 0 auto; + height: 2.25rem; + justify-content: center; + padding: 0px; + width: 16px; + margin-left: 10px; + margin-right: 10px; + } + + div.actions { + width: auto; + } + + :host(:not([expanded])) div.actions { + display: none; + } + + [part='title'] button { + color: var(--color-high-contrast); + font: var(--font-xsmall-semibold); + width: auto; + } + + [part='header'] button:hover { + color: var(--color-high-contrast); + } + + [part='header'] button:focus-visible { + outline: 2px solid var(--blue-500); + outline-offset: -2px; + } + + [part='header'] button svg { + display: block; + } + + [part='header'] .actions:empty { + display: none; + } + + ::slotted(*) { + box-sizing: border-box; + display: block; + height: var(--content-height, var(--default-content-height, 100%)); + /* padding: var(--space-150); */ + width: 100%; + } + + :host(:not([floating])) ::slotted(*) { + /* padding-top: var(--space-50); */ + } + /*workaround for outline to have a explicit height while floating by default. + may be removed after https://github.com/vaadin/web-components/issues/7620 is solved + */ + :host([floating][expanded][paneltag='copilot-outline-panel']) { + --grid-default-height: 400px; + } + + :host([dragging]) { + opacity: 0.4; + } + + :host([dragging]) [part='content'] { + pointer-events: none; + } + + :host([resizing]), + :host([resizing]) [part='content'] { + transition: none; + } + :host([resizing]) [part='content'] { + height: 100%; + } + + :host([hiding-while-drag-and-drop]) { + display: none; + } + + // dragging in drawer + + :host(:not([floating])) .drag-handle { + cursor: grab; + } + + :host(:not([floating])[dragging]) .drag-handle { + cursor: grabbing; + } + ` + ]; + } + connectedCallback() { + super.connectedCallback(), this.setAttribute("role", "region"), this.reaction( + () => d.getAttentionRequiredPanelConfiguration(), + () => { + const e = d.getAttentionRequiredPanelConfiguration(); + this.toggleAttribute(I, e?.tag === this.panelTag && e?.floating); + } + ), this.addEventListener("mouseenter", this.sectionPanelMouseEnterListener), document.addEventListener("mousemove", this.resizeInDrawerMouseMoveListener), document.addEventListener("mouseup", this.resizeInDrawerMouseUpListener), this.reaction( + () => a.operationInProgress, + () => { + requestAnimationFrame(() => { + this.toggleAttribute( + "hiding-while-drag-and-drop", + a.operationInProgress === q.DragAndDrop && this.panelInfo?.floating && !this.panelInfo.showWhileDragging + ); + }); + } + ), this.reaction( + () => d.floatingPanelsZIndexOrder, + () => { + this.style.setProperty("--z-index-focus", `${d.getFloatingPanelZIndex(this.panelTag)}`); + }, + { fireImmediately: !0 } + ), this.addEventListener("transitionend", this.transitionEndEventListener), this.addEventListener("mousemove", this.floatingResizeHandlerMouseMoveListener), this.addEventListener("mousedown", this.floatingResizingMouseDownListener), this.addEventListener("mouseleave", this.floatingResizingMouseLeaveListener), document.addEventListener("mousemove", this.floatingResizingMouseMoveListener), document.addEventListener("mouseup", this.floatingResizingMouseUpListener); + } + disconnectedCallback() { + super.disconnectedCallback(), this.removeEventListener("mouseenter", this.sectionPanelMouseEnterListener), this.drawerResizeElement.removeEventListener("mousedown", this.resizeInDrawerMouseDownListener), document.removeEventListener("mousemove", this.resizeInDrawerMouseMoveListener), document.removeEventListener("mouseup", this.resizeInDrawerMouseUpListener), this.removeEventListener("mousemove", this.floatingResizeHandlerMouseMoveListener), this.removeEventListener("mousedown", this.floatingResizingMouseDownListener), document.removeEventListener("mousemove", this.floatingResizingMouseMoveListener), document.removeEventListener("mouseup", this.floatingResizingMouseUpListener); + } + setResizePosition(e, t, o) { + const i = this.rectangleBeforeResizing, n = 0, s = window.innerWidth, r = 0, h = window.innerHeight, g = Math.max(n, Math.min(s, t)), v = Math.max(r, Math.min(h, o)); + if (e === "left") + this.setFloatingResizeDirectionProps( + "left", + g, + i.left - g + i.width + ); + else if (e === "right") + this.setFloatingResizeDirectionProps( + "right", + g, + g - i.right + i.width + ); + else if (e === "top") { + const y = i.top - v + i.height; + this.setFloatingResizeDirectionProps("top", v, void 0, y); + } else if (e === "bottom") { + const y = v - i.bottom + i.height; + this.setFloatingResizeDirectionProps("bottom", v, void 0, y); + } + } + willUpdate(e) { + super.willUpdate(e), e.has("panelTag") && (this.panelInfo = d.getPanelByTag(this.panelTag), this.setAttribute("aria-labelledby", this.panelInfo.tag.concat("-title"))), this.toggleAttribute("floating", this.panelInfo?.floating); + } + updated(e) { + super.updated(e), this.setCssSizePositionProperties(); + } + firstUpdated(e) { + super.firstUpdated(e), document.addEventListener("mouseup", this.documentMouseUpEventListener), this.headerDraggableArea.addEventListener("mousedown", this.panelHeaderMouseDownEventListener), this.headerDraggableArea.addEventListener("mouseup", this.panelHeaderMouseUpEventListener), this.toggleAttribute("expanded", this.panelInfo?.expanded), this.toggleAttribute("individual", this.panelInfo?.individual ?? !1), Pe(this), this.setCssSizePositionProperties(), this.contentArea.addEventListener("mousedown", this.contentAreaMouseDownListener), this.drawerResizeElement.addEventListener("mousedown", this.resizeInDrawerMouseDownListener), ce(this.shadowRoot); + } + render() { + return this.panelInfo ? l` +
+
+ ${this.panelInfo.expandable !== !1 ? l` ` : p} +

+ +

+
${this.renderActions()}
+ ${this.renderHelpButton()} ${this.renderPopupButton()} +
+
+ +
+
+
+ ` : p; + } + getPopupButtonIcon() { + return this.panelInfo ? this.panelInfo.panel === void 0 ? c.close : this.panelInfo.floating ? this.panelInfo.panel === "bottom" ? c.dockBottom : this.panelInfo.panel === "left" ? c.dockLeft : this.panelInfo.panel === "right" ? c.dockRight : p : c.popup : p; + } + renderHelpButton() { + return this.panelInfo?.helpUrl ? l` ` : p; + } + renderActions() { + if (!this.panelInfo?.actionsTag) + return p; + const e = this.panelInfo.actionsTag; + return Ie(`<${e}>`); + } + changeDockingPanel(e) { + const t = e.detail.value.panel; + if (this.panelInfo?.panel !== t) { + const o = d.panels.filter((i) => i.panel === t).map((i) => i.panelOrder).sort((i, n) => n - i)[0]; + K(this), d.updatePanel(this.panelInfo.tag, { panel: t, panelOrder: o + 1 }); + } + this.panelInfo.floating && this.changePanelFloating(e); + } + getResizeDirections() { + const e = this.getAttribute(f); + return e ? e.split(" ") : []; + } +}; +L([ + j() +], z.prototype, "panelTag", 2); +L([ + k(".drag-handle") +], z.prototype, "headerDraggableArea", 2); +L([ + k("#content") +], z.prototype, "contentArea", 2); +L([ + k('[part="drawer-resize"]') +], z.prototype, "drawerResizeElement", 2); +L([ + k('[part="container"]') +], z.prototype, "container", 2); +L([ + C() +], z.prototype, "dockingItems", 2); +z = L([ + A("copilot-section-panel-wrapper") +], z); +function Qe(e) { + a.setOperationWaitsHmrUpdate(e, 3e4); +} +u.on("undoRedo", (e) => { + const o = { files: e.detail.files ?? ze(), uiId: Ae() }, i = e.detail.undo ? "copilot-plugin-undo" : "copilot-plugin-redo", n = e.detail.undo ? "undo" : "redo"; + re(n), Qe(q.RedoUndo), u.send(i, o); +}); +var et = Object.defineProperty, tt = Object.getOwnPropertyDescriptor, it = (e, t, o, i) => { + for (var n = i > 1 ? void 0 : i ? tt(t, o) : t, s = e.length - 1, r; s >= 0; s--) + (r = e[s]) && (n = (i ? r(t, o, n) : r(n)) || n); + return i && n && et(t, o, n), n; +}; +let ie = class extends D { + static get styles() { + return [ + O(Ce), + O(ke), + E` + :host { + --lumo-secondary-text-color: var(--dev-tools-text-color); + --lumo-contrast-80pct: var(--dev-tools-text-color-emphasis); + --lumo-contrast-60pct: var(--dev-tools-text-color-secondary); + --lumo-font-size-m: 14px; + + position: fixed; + bottom: 2.5rem; + right: 0rem; + visibility: visible; /* Always show, even if copilot is off */ + user-select: none; + z-index: 10000; + + --dev-tools-text-color: rgba(255, 255, 255, 0.8); + + --dev-tools-text-color-secondary: rgba(255, 255, 255, 0.65); + --dev-tools-text-color-emphasis: rgba(255, 255, 255, 0.95); + --dev-tools-text-color-active: rgba(255, 255, 255, 1); + + --dev-tools-background-color-inactive: rgba(45, 45, 45, 0.25); + --dev-tools-background-color-active: rgba(45, 45, 45, 0.98); + --dev-tools-background-color-active-blurred: rgba(45, 45, 45, 0.85); + + --dev-tools-border-radius: 0.5rem; + --dev-tools-box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 4px 12px -2px rgba(0, 0, 0, 0.4); + + --dev-tools-blue-hsl: 206, 100%, 70%; + --dev-tools-blue-color: hsl(var(--dev-tools-blue-hsl)); + --dev-tools-green-hsl: 145, 80%, 42%; + --dev-tools-green-color: hsl(var(--dev-tools-green-hsl)); + --dev-tools-grey-hsl: 0, 0%, 50%; + --dev-tools-grey-color: hsl(var(--dev-tools-grey-hsl)); + --dev-tools-yellow-hsl: 38, 98%, 64%; + --dev-tools-yellow-color: hsl(var(--dev-tools-yellow-hsl)); + --dev-tools-red-hsl: 355, 100%, 68%; + --dev-tools-red-color: hsl(var(--dev-tools-red-hsl)); + + /* Needs to be in ms, used in JavaScript as well */ + --dev-tools-transition-duration: 180ms; + } + + .notification-tray { + display: flex; + flex-direction: column-reverse; + align-items: flex-end; + margin: 0.5rem; + flex: none; + } + + @supports (backdrop-filter: blur(1px)) { + .notification-tray div.message { + backdrop-filter: blur(8px); + } + + .notification-tray div.message { + background-color: var(--dev-tools-background-color-active-blurred); + } + } + + .notification-tray .message { + pointer-events: auto; + background-color: var(--dev-tools-background-color-active); + color: var(--dev-tools-text-color); + max-width: 40rem; + box-sizing: border-box; + border-radius: var(--dev-tools-border-radius); + margin-top: 0.5rem; + transition: var(--dev-tools-transition-duration); + transform-origin: bottom right; + animation: slideIn var(--dev-tools-transition-duration); + box-shadow: var(--dev-tools-box-shadow); + padding-top: 0.25rem; + padding-bottom: 0.25rem; + } + + .notification-tray .message.animate-out { + animation: slideOut forwards var(--dev-tools-transition-duration); + } + + .notification-tray .message .message-details { + word-break: break-all; + } + + .message.information { + --dev-tools-notification-color: var(--dev-tools-blue-color); + } + + .message.warning { + --dev-tools-notification-color: var(--dev-tools-yellow-color); + } + + .message.error { + --dev-tools-notification-color: var(--dev-tools-red-color); + } + + .message { + display: flex; + padding: 0.1875rem 0.75rem 0.1875rem 2rem; + background-clip: padding-box; + } + + .message.log { + padding-left: 0.75rem; + } + + .message-content { + max-width: 100%; + margin-right: 0.5rem; + -webkit-user-select: text; + -moz-user-select: text; + user-select: text; + } + + .message-heading { + position: relative; + display: flex; + align-items: center; + margin: 0.125rem 0; + } + + .message .message-details { + font-weight: 400; + color: var(--dev-tools-text-color-secondary); + margin: 0.25rem 0; + display: flex; + flex-direction: column; + } + + .message .message-details[hidden] { + display: none; + } + + .message .message-details p { + display: inline; + margin: 0; + margin-right: 0.375em; + word-break: break-word; + } + + .message .persist { + color: var(--dev-tools-text-color-secondary); + white-space: nowrap; + margin: 0.375rem 0; + display: flex; + align-items: center; + position: relative; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + } + + .message .persist::before { + content: ''; + width: 1em; + height: 1em; + border-radius: 0.2em; + margin-right: 0.375em; + background-color: rgba(255, 255, 255, 0.3); + } + + .message .persist:hover::before { + background-color: rgba(255, 255, 255, 0.4); + } + + .message .persist.on::before { + background-color: rgba(255, 255, 255, 0.9); + } + + .message .persist.on::after { + content: ''; + order: -1; + position: absolute; + width: 0.75em; + height: 0.25em; + border: 2px solid var(--dev-tools-background-color-active); + border-width: 0 0 2px 2px; + transform: translate(0.05em, -0.05em) rotate(-45deg) scale(0.8, 0.9); + } + + .message .dismiss-message { + font-weight: 600; + align-self: stretch; + display: flex; + align-items: center; + padding: 0 0.25rem; + margin-left: 0.5rem; + color: var(--dev-tools-text-color-secondary); + } + + .message .dismiss-message:hover { + color: var(--dev-tools-text-color); + } + + .message.log { + color: var(--dev-tools-text-color-secondary); + } + + .message:not(.log) .message-heading { + font-weight: 500; + } + + .message.has-details .message-heading { + color: var(--dev-tools-text-color-emphasis); + font-weight: 600; + } + + .message-heading::before { + position: absolute; + margin-left: -1.5rem; + display: inline-block; + text-align: center; + font-size: 0.875em; + font-weight: 600; + line-height: calc(1.25em - 2px); + width: 14px; + height: 14px; + box-sizing: border-box; + border: 1px solid transparent; + border-radius: 50%; + } + + .message.information .message-heading::before { + content: 'i'; + border-color: currentColor; + color: var(--dev-tools-notification-color); + } + + .message.warning .message-heading::before, + .message.error .message-heading::before { + content: '!'; + color: var(--dev-tools-background-color-active); + background-color: var(--dev-tools-notification-color); + } + + .ahreflike { + font-weight: 500; + color: var(--dev-tools-text-color-secondary); + text-decoration: underline; + cursor: pointer; + } + + @keyframes slideIn { + from { + transform: translateX(100%); + opacity: 0; + } + to { + transform: translateX(0%); + opacity: 1; + } + } + + @keyframes slideOut { + from { + transform: translateX(0%); + opacity: 1; + } + to { + transform: translateX(100%); + opacity: 0; + } + } + + @keyframes fade-in { + 0% { + opacity: 0; + } + } + + @keyframes bounce { + 0% { + transform: scale(0.8); + } + 50% { + transform: scale(1.5); + background-color: hsla(var(--dev-tools-red-hsl), 1); + } + 100% { + transform: scale(1); + } + } + ` + ]; + } + render() { + return l`
+ ${a.notifications.map((e) => this.renderNotification(e))} +
`; + } + renderNotification(e) { + return l` +
+
+
${e.message}
+
+ ${Se(e.details)} + ${e.link ? l`Learn more` : ""} +
+ ${e.dismissId ? l`
{ + this.toggleDontShowAgain(e); + }}> + ${nt(e)} +
` : ""} +
+
{ + $e(e), t.stopPropagation(); + }}> + Dismiss +
+
+ `; + } + toggleDontShowAgain(e) { + e.dontShowAgain = !e.dontShowAgain, this.requestUpdate(); + } +}; +ie = it([ + A("copilot-notifications-container") +], ie); +function nt(e) { + return e.dontShowAgainMessage ? e.dontShowAgainMessage : "Do not show this again"; +} +le({ + type: de.WARNING, + message: "Development Mode", + details: "This application is running in development mode.", + dismissId: "devmode" +}); +const W = se(async () => { + await De(); +}); +u.on("vite-after-update", () => { + W(); +}); +const ne = window?.Vaadin?.connectionState?.stateChangeListeners; +ne ? ne.add((e, t) => { + e === "loading" && t === "connected" && a.active && W(); +}) : console.warn("Unable to add listener for connection state changes"); +u.on("copilot-plugin-state", (e) => { + a.setIdePluginState(e.detail), e.detail.active && re("plugin-active", { pluginVersion: e.detail.version, ide: e.detail.ide }), e.preventDefault(); +}); +u.on("location-changed", (e) => { + W(); +}); +u.on("copilot-ide-notification", (e) => { + le({ + type: de[e.detail.type], + message: e.detail.message, + dismissId: e.detail.dismissId + }), e.preventDefault(); +}); diff --git a/src/main/frontend/generated/jar-resources/copilot/copilot-log-plugin-Dd9Vu3DN.js b/src/main/frontend/generated/jar-resources/copilot/copilot-log-plugin-Dd9Vu3DN.js new file mode 100644 index 0000000..82a5350 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/copilot/copilot-log-plugin-Dd9Vu3DN.js @@ -0,0 +1,221 @@ +import { j as M, a1 as T, a2 as w, Y as p, x as l, $ as c, a3 as S, U as L, M as D, b as R, a4 as C, n as y } from "./copilot-xjoIJFQc.js"; +import { r as $ } from "./state-9-chcL5F.js"; +import { B as I } from "./base-panel-CTLXjjmN.js"; +import { i as n } from "./icons-AkLm3oZf.js"; +const q = "copilot-log-panel{padding:var(--space-100);font:var(--font-xsmall);display:flex;flex-direction:column;gap:var(--space-50);overflow-y:auto;max-width:100vw}copilot-log-panel .row{display:flex;align-items:flex-start;padding:var(--space-50) var(--space-100);border-radius:var(--radius-2);gap:var(--space-100)}copilot-log-panel .row.information{background-color:var(--blue-50)}copilot-log-panel .row.warning{background-color:var(--yellow-50)}copilot-log-panel .row.error{background-color:var(--red-50)}copilot-log-panel .type{margin-top:var(--space-25)}copilot-log-panel .type.error{color:var(--red)}copilot-log-panel .type.warning{color:var(--yellow)}copilot-log-panel .type.info{color:var(--color)}copilot-log-panel .message{display:flex;flex-direction:column;flex-grow:1;gap:var(--space-25);overflow:hidden}copilot-log-panel .message>*:not(.expanded){white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}copilot-log-panel .message>.expanded{overflow-wrap:break-word}copilot-log-panel .firstrow{display:flex;align-items:baseline;gap:.5em;flex-direction:column}copilot-log-panel .firstrowmessage{width:100%;overflow:hidden;text-overflow:ellipsis}copilot-log-panel button{padding:0;border:0;background:transparent}copilot-log-panel svg{height:12px;width:12px}copilot-log-panel .secondrow,copilot-log-panel .timestamp{font-size:var(--font-size-0);line-height:var(--line-height-1)}copilot-log-panel .expand span{height:12px;width:12px}"; +var A = Object.defineProperty, B = Object.getOwnPropertyDescriptor, h = (e, t, a, o) => { + for (var s = o > 1 ? void 0 : o ? B(t, a) : t, d = e.length - 1, i; d >= 0; d--) + (i = e[d]) && (s = (o ? i(t, a, s) : i(s)) || s); + return o && s && A(t, a, s), s; +}; +class _ { + constructor() { + this.showTimestamps = !1, C(this); + } + toggleShowTimestamps() { + this.showTimestamps = !this.showTimestamps; + } +} +const g = new _(); +let r = class extends I { + constructor() { + super(...arguments), this.unreadErrors = !1, this.messages = [], this.nextMessageId = 1, this.transitionDuration = 0, this.errorHandlersAdded = !1; + } + connectedCallback() { + super.connectedCallback(), this.onCommand("log", (e) => { + this.handleLogEventData({ type: e.data.type, message: e.data.message }); + }), this.onEventBus("log", (e) => this.handleLogEvent(e)), this.onEventBus("update-log", (e) => this.updateLog(e.detail)), this.onEventBus("notification-shown", (e) => this.handleNotification(e)), this.onEventBus("clear-log", () => this.clear()), this.reaction( + () => M.sectionPanelResizing, + () => { + this.requestUpdate(); + } + ), this.transitionDuration = parseInt( + window.getComputedStyle(this).getPropertyValue("--dev-tools-transition-duration"), + 10 + ), this.errorHandlersAdded || (T((e) => { + this.log(e.type, e.message, !!e.internal, e.details, e.link); + }), w.forEach((e) => { + this.log(e.type, e.message, !!e.internal, e.details, e.link); + }), w.length = 0, this.errorHandlersAdded = !0); + } + clear() { + this.messages = []; + } + handleNotification(e) { + this.log(e.detail.type, e.detail.message, !0, e.detail.details, e.detail.link); + } + handleLogEvent(e) { + this.handleLogEventData(e.detail); + } + handleLogEventData(e) { + this.log( + e.type, + e.message, + !!e.internal, + e.details, + e.link, + p(e.expandedMessage), + p(e.expandedDetails), + e.id + ); + } + activate() { + this.unreadErrors = !1, this.updateComplete.then(() => { + const e = this.renderRoot.querySelector(".message:last-child"); + e && e.scrollIntoView(); + }); + } + render() { + return l` + ${this.messages.map((e) => this.renderMessage(e))} `; + } + renderMessage(e) { + let t, a, o; + return e.type === c.ERROR ? (t = "error", o = n.exclamationMark, a = "Error") : e.type === c.WARNING ? (t = "warning", o = n.warning, a = "Warning") : (t = "info", o = n.info, a = "Info"), e.internal && (t += " internal"), l` + + `; + } + log(e, t, a, o, s, d, i, E) { + const k = this.nextMessageId; + this.nextMessageId += 1, i || (i = t); + const f = { + id: k, + type: e, + message: t, + details: o, + link: s, + dontShowAgain: !1, + deleted: !1, + expanded: !1, + expandedMessage: d, + expandedDetails: i, + timestamp: /* @__PURE__ */ new Date(), + internal: a, + userId: E + }; + for (this.messages.push(f); this.messages.length > r.MAX_LOG_ROWS; ) + this.messages.shift(); + return this.requestUpdate(), this.updateComplete.then(() => { + const m = this.renderRoot.querySelector(".message:last-child"); + m ? (setTimeout(() => m.scrollIntoView({ behavior: "smooth" }), this.transitionDuration), this.unreadErrors = !1) : e === c.ERROR && (this.unreadErrors = !0); + }), f; + } + updateLog(e) { + let t = this.messages.find((a) => a.userId === e.id); + t || (t = this.log(c.INFORMATION, "", !1)), Object.assign(t, e), S(t.expandedDetails) && (t.expandedDetails = p(t.expandedDetails)), this.requestUpdate(); + } + updated() { + const e = this.querySelector(".row:last-child"); + e && this.isTooLong(e.querySelector(".firstrowmessage")) && e.querySelector("button.expand")?.removeAttribute("hidden"); + } + toggleExpanded(e) { + this.canBeExpanded(e) && (e.expanded = !e.expanded, this.requestUpdate()), L("use-log", { source: "toggleExpanded" }); + } + canBeExpanded(e) { + if (e.expandedMessage || e.expanded) + return !0; + const t = this.querySelector(`[data\\-id="${e.id}"]`)?.querySelector( + ".firstrowmessage" + ); + return this.isTooLong(t); + } + isTooLong(e) { + return e && e.offsetWidth < e.scrollWidth; + } +}; +r.MAX_LOG_ROWS = 1e3; +h([ + $() +], r.prototype, "unreadErrors", 2); +h([ + $() +], r.prototype, "messages", 2); +r = h([ + y("copilot-log-panel") +], r); +let x = class extends D { + createRenderRoot() { + return this; + } + connectedCallback() { + super.connectedCallback(), this.style.display = "flex"; + } + render() { + return l` + + + `; + } +}; +x = h([ + y("copilot-log-panel-actions") +], x); +const b = { + header: "Log", + expanded: !0, + panelOrder: 0, + panel: "bottom", + floating: !1, + tag: "copilot-log-panel", + actionsTag: "copilot-log-panel-actions" +}, P = { + init(e) { + e.addPanel(b); + } +}; +window.Vaadin.copilot.plugins.push(P); +const v = { hour: "numeric", minute: "numeric", second: "numeric", fractionalSecondDigits: 3 }; +let u; +try { + u = new Intl.DateTimeFormat(navigator.language, v); +} catch (e) { + console.error("Failed to create date time formatter for ", navigator.language, e), u = new Intl.DateTimeFormat("en-US", v); +} +function U(e) { + return u.format(e); +} +export { + x as Actions, + r as CopilotLogPanel +}; diff --git a/src/main/frontend/generated/jar-resources/copilot/copilot-shortcuts-plugin-Chva6DtS.js b/src/main/frontend/generated/jar-resources/copilot/copilot-shortcuts-plugin-Chva6DtS.js new file mode 100644 index 0000000..2c0a624 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/copilot/copilot-shortcuts-plugin-Chva6DtS.js @@ -0,0 +1,55 @@ +import { n as u, x as d, R as h, K as l, y as g } from "./copilot-xjoIJFQc.js"; +import { B as f } from "./base-panel-CTLXjjmN.js"; +import { i as e } from "./icons-AkLm3oZf.js"; +const m = "copilot-shortcuts-panel{font:var(--font-xsmall);padding:var(--space-200);display:flex;flex-direction:column;gap:var(--space-50)}copilot-shortcuts-panel h3{font:var(--font-xsmall-semibold);margin:0;padding:0}copilot-shortcuts-panel h3:not(:first-of-type){margin-top:var(--space-200)}copilot-shortcuts-panel ul{list-style:none;margin:0;padding:0 var(--space-50);display:flex;flex-direction:column}copilot-shortcuts-panel ul li{display:flex;align-items:center;gap:var(--space-150);padding:var(--space-75) 0}copilot-shortcuts-panel ul li:not(:last-of-type){border-bottom:1px dashed var(--border-color)}copilot-shortcuts-panel ul li svg{height:16px;width:16px}copilot-shortcuts-panel ul li .kbds{flex:1;text-align:right}copilot-shortcuts-panel kbd{display:inline-block;border-radius:var(--radius-1);border:1px solid var(--border-color);min-width:1em;min-height:1em;text-align:center;margin:0 .1em;padding:.25em;box-sizing:border-box;font-size:var(--font-size-1);font-family:var(--font-family);line-height:1}"; +var $ = Object.defineProperty, b = Object.getOwnPropertyDescriptor, v = (i, s, n, a) => { + for (var t = a > 1 ? void 0 : a ? b(s, n) : s, r = i.length - 1, p; r >= 0; r--) + (p = i[r]) && (t = (a ? p(s, n, t) : p(t)) || t); + return a && t && $(s, n, t), t; +}; +let c = class extends f { + render() { + return d` +

Global

+
    +
  • ${e.vaadinLogo} Copilot ${o(l.toggleCopilot)}
  • +
  • ${e.terminal} Command window ${o(l.toggleCommandWindow)}
  • +
  • ${e.undo} Undo ${o(l.undo)}
  • +
  • ${e.redo} Redo ${o(l.redo)}
  • +
+

Selected component

+
    +
  • ${e.code} Go to source ${o(l.goToSource)}
  • +
  • ${e.copy} Copy ${o(l.copy)}
  • +
  • ${e.paste} Paste ${o(l.paste)}
  • +
  • ${e.duplicate} Duplicate ${o(l.duplicate)}
  • +
  • ${e.userUp} Select parent ${o(l.selectParent)}
  • +
  • ${e.userLeft} Select previous sibling ${o(l.selectPreviousSibling)}
  • +
  • ${e.userRight} Select first child / next sibling ${o(l.selectNextSibling)}
  • +
  • ${e.trash} Delete ${o(l.delete)}
  • +
`; + } +}; +c = v([ + u("copilot-shortcuts-panel") +], c); +function o(i) { + return d`${h(i)}`; +} +const x = g({ + header: "Keyboard Shortcuts", + tag: "copilot-shortcuts-panel", + width: 400, + height: 550, + floatingPosition: { + top: 50, + left: 50 + } +}), y = { + init(i) { + i.addPanel(x); + } +}; +window.Vaadin.copilot.plugins.push(y); diff --git a/src/main/frontend/generated/jar-resources/copilot/copilot-xjoIJFQc.js b/src/main/frontend/generated/jar-resources/copilot/copilot-xjoIJFQc.js new file mode 100644 index 0000000..8e92226 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/copilot/copilot-xjoIJFQc.js @@ -0,0 +1,5624 @@ +class Po { + constructor() { + this.eventBuffer = [], this.handledTypes = [], this.copilotMain = null, this.debug = !1, this.eventProxy = { + functionCallQueue: [], + dispatchEvent(...t) { + return this.functionCallQueue.push({ name: "dispatchEvent", args: t }), !0; + }, + removeEventListener(...t) { + this.functionCallQueue.push({ name: "removeEventListener", args: t }); + }, + addEventListener(...t) { + this.functionCallQueue.push({ name: "addEventListener", args: t }); + }, + processQueue(t) { + this.functionCallQueue.forEach((n) => { + t[n.name].call(t, ...n.args); + }), this.functionCallQueue = []; + } + }; + } + getEventTarget() { + return this.copilotMain ? this.copilotMain : (this.copilotMain = document.querySelector("copilot-main"), this.copilotMain ? (this.eventProxy.processQueue(this.copilotMain), this.copilotMain) : this.eventProxy); + } + on(t, n) { + const r = n; + return this.getEventTarget().addEventListener(t, r), this.handledTypes.push(t), this.flush(t), () => this.off(t, r); + } + once(t, n) { + this.getEventTarget().addEventListener(t, n, { once: !0 }); + } + off(t, n) { + this.getEventTarget().removeEventListener(t, n); + const r = this.handledTypes.indexOf(t, 0); + r > -1 && this.handledTypes.splice(r, 1); + } + emit(t, n) { + const r = new CustomEvent(t, { detail: n, cancelable: !0 }); + return this.handledTypes.includes(t) || this.eventBuffer.push(r), this.debug && console.debug("Emit event", r), this.getEventTarget().dispatchEvent(r), r.defaultPrevented; + } + emitUnsafe({ type: t, data: n }) { + return this.emit(t, n); + } + // Communication with server via eventbus + send(t, n) { + const r = new CustomEvent("copilot-send", { detail: { command: t, data: n } }); + this.getEventTarget().dispatchEvent(r); + } + // Listeners for Copilot itself + onSend(t) { + this.on("copilot-send", t); + } + offSend(t) { + this.off("copilot-send", t); + } + flush(t) { + const n = []; + this.eventBuffer.filter((r) => r.type === t).forEach((r) => { + this.getEventTarget().dispatchEvent(r), n.push(r); + }), this.eventBuffer = this.eventBuffer.filter((r) => !n.includes(r)); + } +} +var Co = { + 0: "Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'", + 1: function(t, n) { + return "Cannot apply '" + t + "' to '" + n.toString() + "': Field not found."; + }, + /* + 2(prop) { + return `invalid decorator for '${prop.toString()}'` + }, + 3(prop) { + return `Cannot decorate '${prop.toString()}': action can only be used on properties with a function value.` + }, + 4(prop) { + return `Cannot decorate '${prop.toString()}': computed can only be used on getter properties.` + }, + */ + 5: "'keys()' can only be used on observable objects, arrays, sets and maps", + 6: "'values()' can only be used on observable objects, arrays, sets and maps", + 7: "'entries()' can only be used on observable objects, arrays and maps", + 8: "'set()' can only be used on observable objects, arrays and maps", + 9: "'remove()' can only be used on observable objects, arrays and maps", + 10: "'has()' can only be used on observable objects, arrays and maps", + 11: "'get()' can only be used on observable objects, arrays and maps", + 12: "Invalid annotation", + 13: "Dynamic observable objects cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)", + 14: "Intercept handlers should return nothing or a change object", + 15: "Observable arrays cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)", + 16: "Modification exception: the internal structure of an observable array was changed.", + 17: function(t, n) { + return "[mobx.array] Index out of bounds, " + t + " is larger than " + n; + }, + 18: "mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js", + 19: function(t) { + return "Cannot initialize from classes that inherit from Map: " + t.constructor.name; + }, + 20: function(t) { + return "Cannot initialize map from " + t; + }, + 21: function(t) { + return "Cannot convert to map from '" + t + "'"; + }, + 22: "mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js", + 23: "It is not possible to get index atoms from arrays", + 24: function(t) { + return "Cannot obtain administration from " + t; + }, + 25: function(t, n) { + return "the entry '" + t + "' does not exist in the observable map '" + n + "'"; + }, + 26: "please specify a property", + 27: function(t, n) { + return "no observable property '" + t.toString() + "' found on the observable object '" + n + "'"; + }, + 28: function(t) { + return "Cannot obtain atom from " + t; + }, + 29: "Expecting some object", + 30: "invalid action stack. did you forget to finish an action?", + 31: "missing option for computed: get", + 32: function(t, n) { + return "Cycle detected in computation " + t + ": " + n; + }, + 33: function(t) { + return "The setter of computed value '" + t + "' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"; + }, + 34: function(t) { + return "[ComputedValue '" + t + "'] It is not possible to assign a new value to a computed value."; + }, + 35: "There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`", + 36: "isolateGlobalState should be called before MobX is running any reactions", + 37: function(t) { + return "[mobx] `observableArray." + t + "()` mutates the array in-place, which is not allowed inside a derivation. Use `array.slice()." + t + "()` instead"; + }, + 38: "'ownKeys()' can only be used on observable objects", + 39: "'defineProperty()' can only be used on observable objects" +}, Do = process.env.NODE_ENV !== "production" ? Co : {}; +function h(e) { + for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++) + n[r - 1] = arguments[r]; + if (process.env.NODE_ENV !== "production") { + var i = typeof e == "string" ? e : Do[e]; + throw typeof i == "function" && (i = i.apply(null, n)), new Error("[MobX] " + i); + } + throw new Error(typeof e == "number" ? "[MobX] minified error nr: " + e + (n.length ? " " + n.map(String).join(",") : "") + ". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts" : "[MobX] " + e); +} +var Ro = {}; +function Vn() { + return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : Ro; +} +var Jr = Object.assign, Mt = Object.getOwnPropertyDescriptor, Y = Object.defineProperty, Xt = Object.prototype, jt = []; +Object.freeze(jt); +var In = {}; +Object.freeze(In); +var To = typeof Proxy < "u", Vo = /* @__PURE__ */ Object.toString(); +function Xr() { + To || h(process.env.NODE_ENV !== "production" ? "`Proxy` objects are not available in the current environment. Please configure MobX to enable a fallback implementation.`" : "Proxy not available"); +} +function $e(e) { + process.env.NODE_ENV !== "production" && f.verifyProxies && h("MobX is currently configured to be able to run in ES5 mode, but in ES5 MobX won't be able to " + e); +} +function W() { + return ++f.mobxGuid; +} +function kn(e) { + var t = !1; + return function() { + if (!t) + return t = !0, e.apply(this, arguments); + }; +} +var Ue = function() { +}; +function S(e) { + return typeof e == "function"; +} +function Se(e) { + var t = typeof e; + switch (t) { + case "string": + case "symbol": + case "number": + return !0; + } + return !1; +} +function Yt(e) { + return e !== null && typeof e == "object"; +} +function C(e) { + if (!Yt(e)) + return !1; + var t = Object.getPrototypeOf(e); + if (t == null) + return !0; + var n = Object.hasOwnProperty.call(t, "constructor") && t.constructor; + return typeof n == "function" && n.toString() === Vo; +} +function Yr(e) { + var t = e?.constructor; + return t ? t.name === "GeneratorFunction" || t.displayName === "GeneratorFunction" : !1; +} +function Qt(e, t, n) { + Y(e, t, { + enumerable: !1, + writable: !0, + configurable: !0, + value: n + }); +} +function Qr(e, t, n) { + Y(e, t, { + enumerable: !1, + writable: !1, + configurable: !0, + value: n + }); +} +function Ve(e, t) { + var n = "isMobX" + e; + return t.prototype[n] = !0, function(r) { + return Yt(r) && r[n] === !0; + }; +} +function Ge(e) { + return e != null && Object.prototype.toString.call(e) === "[object Map]"; +} +function Io(e) { + var t = Object.getPrototypeOf(e), n = Object.getPrototypeOf(t), r = Object.getPrototypeOf(n); + return r === null; +} +function te(e) { + return e != null && Object.prototype.toString.call(e) === "[object Set]"; +} +var $r = typeof Object.getOwnPropertySymbols < "u"; +function ko(e) { + var t = Object.keys(e); + if (!$r) + return t; + var n = Object.getOwnPropertySymbols(e); + return n.length ? [].concat(t, n.filter(function(r) { + return Xt.propertyIsEnumerable.call(e, r); + })) : t; +} +var ft = typeof Reflect < "u" && Reflect.ownKeys ? Reflect.ownKeys : $r ? function(e) { + return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e)); +} : ( + /* istanbul ignore next */ + Object.getOwnPropertyNames +); +function An(e) { + return typeof e == "string" ? e : typeof e == "symbol" ? e.toString() : new String(e).toString(); +} +function ei(e) { + return e === null ? null : typeof e == "object" ? "" + e : e; +} +function Z(e, t) { + return Xt.hasOwnProperty.call(e, t); +} +var Lo = Object.getOwnPropertyDescriptors || function(t) { + var n = {}; + return ft(t).forEach(function(r) { + n[r] = Mt(t, r); + }), n; +}; +function R(e, t) { + return !!(e & t); +} +function T(e, t, n) { + return n ? e |= t : e &= ~t, e; +} +function $n(e, t) { + (t == null || t > e.length) && (t = e.length); + for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n]; + return r; +} +function Mo(e, t) { + for (var n = 0; n < t.length; n++) { + var r = t[n]; + r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, Uo(r.key), r); + } +} +function Ke(e, t, n) { + return t && Mo(e.prototype, t), Object.defineProperty(e, "prototype", { + writable: !1 + }), e; +} +function Be(e, t) { + var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"]; + if (n) return (n = n.call(e)).next.bind(n); + if (Array.isArray(e) || (n = Bo(e)) || t) { + n && (e = n); + var r = 0; + return function() { + return r >= e.length ? { + done: !0 + } : { + done: !1, + value: e[r++] + }; + }; + } + throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); +} +function de() { + return de = Object.assign ? Object.assign.bind() : function(e) { + for (var t = 1; t < arguments.length; t++) { + var n = arguments[t]; + for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]); + } + return e; + }, de.apply(null, arguments); +} +function ti(e, t) { + e.prototype = Object.create(t.prototype), e.prototype.constructor = e, En(e, t); +} +function En(e, t) { + return En = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) { + return n.__proto__ = r, n; + }, En(e, t); +} +function jo(e, t) { + if (typeof e != "object" || !e) return e; + var n = e[Symbol.toPrimitive]; + if (n !== void 0) { + var r = n.call(e, t); + if (typeof r != "object") return r; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return String(e); +} +function Uo(e) { + var t = jo(e, "string"); + return typeof t == "symbol" ? t : t + ""; +} +function Bo(e, t) { + if (e) { + if (typeof e == "string") return $n(e, t); + var n = {}.toString.call(e).slice(8, -1); + return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? $n(e, t) : void 0; + } +} +var ne = /* @__PURE__ */ Symbol("mobx-stored-annotations"); +function Q(e) { + function t(n, r) { + if (wt(r)) + return e.decorate_20223_(n, r); + yt(n, r, e); + } + return Object.assign(t, e); +} +function yt(e, t, n) { + if (Z(e, ne) || Qt(e, ne, de({}, e[ne])), process.env.NODE_ENV !== "production" && Ut(n) && !Z(e[ne], t)) { + var r = e.constructor.name + ".prototype." + t.toString(); + h("'" + r + "' is decorated with 'override', but no such decorated member was found on prototype."); + } + zo(e, n, t), Ut(n) || (e[ne][t] = n); +} +function zo(e, t, n) { + if (process.env.NODE_ENV !== "production" && !Ut(t) && Z(e[ne], n)) { + var r = e.constructor.name + ".prototype." + n.toString(), i = e[ne][n].annotationType_, o = t.annotationType_; + h("Cannot apply '@" + o + "' to '" + r + "':" + (` +The field is already decorated with '@` + i + "'.") + ` +Re-decorating fields is not allowed. +Use '@override' decorator for methods overridden by subclass.`); + } +} +function wt(e) { + return typeof e == "object" && typeof e.kind == "string"; +} +function $t(e, t) { + process.env.NODE_ENV !== "production" && !t.includes(e.kind) && h("The decorator applied to '" + String(e.name) + "' cannot be used on a " + e.kind + " element"); +} +var b = /* @__PURE__ */ Symbol("mobx administration"), ve = /* @__PURE__ */ function() { + function e(n) { + n === void 0 && (n = process.env.NODE_ENV !== "production" ? "Atom@" + W() : "Atom"), this.name_ = void 0, this.flags_ = 0, this.observers_ = /* @__PURE__ */ new Set(), this.lastAccessedBy_ = 0, this.lowestObserverState_ = y.NOT_TRACKING_, this.onBOL = void 0, this.onBUOL = void 0, this.name_ = n; + } + var t = e.prototype; + return t.onBO = function() { + this.onBOL && this.onBOL.forEach(function(r) { + return r(); + }); + }, t.onBUO = function() { + this.onBUOL && this.onBUOL.forEach(function(r) { + return r(); + }); + }, t.reportObserved = function() { + return bi(this); + }, t.reportChanged = function() { + j(), mi(this), U(); + }, t.toString = function() { + return this.name_; + }, Ke(e, [{ + key: "isBeingObserved", + get: function() { + return R(this.flags_, e.isBeingObservedMask_); + }, + set: function(r) { + this.flags_ = T(this.flags_, e.isBeingObservedMask_, r); + } + }, { + key: "isPendingUnobservation", + get: function() { + return R(this.flags_, e.isPendingUnobservationMask_); + }, + set: function(r) { + this.flags_ = T(this.flags_, e.isPendingUnobservationMask_, r); + } + }, { + key: "diffValue", + get: function() { + return R(this.flags_, e.diffValueMask_) ? 1 : 0; + }, + set: function(r) { + this.flags_ = T(this.flags_, e.diffValueMask_, r === 1); + } + }]); +}(); +ve.isBeingObservedMask_ = 1; +ve.isPendingUnobservationMask_ = 2; +ve.diffValueMask_ = 4; +var Ln = /* @__PURE__ */ Ve("Atom", ve); +function ni(e, t, n) { + t === void 0 && (t = Ue), n === void 0 && (n = Ue); + var r = new ve(e); + return t !== Ue && es(r, t), n !== Ue && Pi(r, n), r; +} +function Wo(e, t) { + return e === t; +} +function Fo(e, t) { + return Wn(e, t); +} +function Zo(e, t) { + return Wn(e, t, 1); +} +function qo(e, t) { + return Object.is ? Object.is(e, t) : e === t ? e !== 0 || 1 / e === 1 / t : e !== e && t !== t; +} +var ze = { + identity: Wo, + structural: Fo, + default: qo, + shallow: Zo +}; +function Ne(e, t, n) { + return pt(e) ? e : Array.isArray(e) ? N.array(e, { + name: n + }) : C(e) ? N.object(e, void 0, { + name: n + }) : Ge(e) ? N.map(e, { + name: n + }) : te(e) ? N.set(e, { + name: n + }) : typeof e == "function" && !We(e) && !vt(e) ? Yr(e) ? Fe(e) : ht(n, e) : e; +} +function Go(e, t, n) { + if (e == null || Je(e) || ln(e) || pe(e) || J(e)) + return e; + if (Array.isArray(e)) + return N.array(e, { + name: n, + deep: !1 + }); + if (C(e)) + return N.object(e, void 0, { + name: n, + deep: !1 + }); + if (Ge(e)) + return N.map(e, { + name: n, + deep: !1 + }); + if (te(e)) + return N.set(e, { + name: n, + deep: !1 + }); + process.env.NODE_ENV !== "production" && h("The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets"); +} +function en(e) { + return e; +} +function Ko(e, t) { + return process.env.NODE_ENV !== "production" && pt(e) && h("observable.struct should not be used with observable values"), Wn(e, t) ? t : e; +} +var Ho = "override"; +function Ut(e) { + return e.annotationType_ === Ho; +} +function At(e, t) { + return { + annotationType_: e, + options_: t, + make_: Jo, + extend_: Xo, + decorate_20223_: Yo + }; +} +function Jo(e, t, n, r) { + var i; + if ((i = this.options_) != null && i.bound) + return this.extend_(e, t, n, !1) === null ? 0 : 1; + if (r === e.target_) + return this.extend_(e, t, n, !1) === null ? 0 : 2; + if (We(n.value)) + return 1; + var o = ri(e, this, t, n, !1); + return Y(r, t, o), 2; +} +function Xo(e, t, n, r) { + var i = ri(e, this, t, n); + return e.defineProperty_(t, i, r); +} +function Yo(e, t) { + process.env.NODE_ENV !== "production" && $t(t, ["method", "field"]); + var n = t.kind, r = t.name, i = t.addInitializer, o = this, a = function(c) { + var u, d, v, g; + return xe((u = (d = o.options_) == null ? void 0 : d.name) != null ? u : r.toString(), c, (v = (g = o.options_) == null ? void 0 : g.autoAction) != null ? v : !1); + }; + if (n == "field") + return function(l) { + var c, u = l; + return We(u) || (u = a(u)), (c = o.options_) != null && c.bound && (u = u.bind(this), u.isMobxAction = !0), u; + }; + if (n == "method") { + var s; + return We(e) || (e = a(e)), (s = this.options_) != null && s.bound && i(function() { + var l = this, c = l[r].bind(l); + c.isMobxAction = !0, l[r] = c; + }), e; + } + h("Cannot apply '" + o.annotationType_ + "' to '" + String(r) + "' (kind: " + n + "):" + (` +'` + o.annotationType_ + "' can only be used on properties with a function value.")); +} +function Qo(e, t, n, r) { + var i = t.annotationType_, o = r.value; + process.env.NODE_ENV !== "production" && !S(o) && h("Cannot apply '" + i + "' to '" + e.name_ + "." + n.toString() + "':" + (` +'` + i + "' can only be used on properties with a function value.")); +} +function ri(e, t, n, r, i) { + var o, a, s, l, c, u, d; + i === void 0 && (i = f.safeDescriptors), Qo(e, t, n, r); + var v = r.value; + if ((o = t.options_) != null && o.bound) { + var g; + v = v.bind((g = e.proxy_) != null ? g : e.target_); + } + return { + value: xe( + (a = (s = t.options_) == null ? void 0 : s.name) != null ? a : n.toString(), + v, + (l = (c = t.options_) == null ? void 0 : c.autoAction) != null ? l : !1, + // https://github.com/mobxjs/mobx/discussions/3140 + (u = t.options_) != null && u.bound ? (d = e.proxy_) != null ? d : e.target_ : void 0 + ), + // Non-configurable for classes + // prevents accidental field redefinition in subclass + configurable: i ? e.isPlainObject_ : !0, + // https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058 + enumerable: !1, + // Non-obsevable, therefore non-writable + // Also prevents rewriting in subclass constructor + writable: !i + }; +} +function ii(e, t) { + return { + annotationType_: e, + options_: t, + make_: $o, + extend_: ea, + decorate_20223_: ta + }; +} +function $o(e, t, n, r) { + var i; + if (r === e.target_) + return this.extend_(e, t, n, !1) === null ? 0 : 2; + if ((i = this.options_) != null && i.bound && (!Z(e.target_, t) || !vt(e.target_[t])) && this.extend_(e, t, n, !1) === null) + return 0; + if (vt(n.value)) + return 1; + var o = oi(e, this, t, n, !1, !1); + return Y(r, t, o), 2; +} +function ea(e, t, n, r) { + var i, o = oi(e, this, t, n, (i = this.options_) == null ? void 0 : i.bound); + return e.defineProperty_(t, o, r); +} +function ta(e, t) { + var n; + process.env.NODE_ENV !== "production" && $t(t, ["method"]); + var r = t.name, i = t.addInitializer; + return vt(e) || (e = Fe(e)), (n = this.options_) != null && n.bound && i(function() { + var o = this, a = o[r].bind(o); + a.isMobXFlow = !0, o[r] = a; + }), e; +} +function na(e, t, n, r) { + var i = t.annotationType_, o = r.value; + process.env.NODE_ENV !== "production" && !S(o) && h("Cannot apply '" + i + "' to '" + e.name_ + "." + n.toString() + "':" + (` +'` + i + "' can only be used on properties with a generator function value.")); +} +function oi(e, t, n, r, i, o) { + o === void 0 && (o = f.safeDescriptors), na(e, t, n, r); + var a = r.value; + if (vt(a) || (a = Fe(a)), i) { + var s; + a = a.bind((s = e.proxy_) != null ? s : e.target_), a.isMobXFlow = !0; + } + return { + value: a, + // Non-configurable for classes + // prevents accidental field redefinition in subclass + configurable: o ? e.isPlainObject_ : !0, + // https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058 + enumerable: !1, + // Non-obsevable, therefore non-writable + // Also prevents rewriting in subclass constructor + writable: !o + }; +} +function Mn(e, t) { + return { + annotationType_: e, + options_: t, + make_: ra, + extend_: ia, + decorate_20223_: oa + }; +} +function ra(e, t, n) { + return this.extend_(e, t, n, !1) === null ? 0 : 1; +} +function ia(e, t, n, r) { + return aa(e, this, t, n), e.defineComputedProperty_(t, de({}, this.options_, { + get: n.get, + set: n.set + }), r); +} +function oa(e, t) { + process.env.NODE_ENV !== "production" && $t(t, ["getter"]); + var n = this, r = t.name, i = t.addInitializer; + return i(function() { + var o = He(this)[b], a = de({}, n.options_, { + get: e, + context: this + }); + a.name || (a.name = process.env.NODE_ENV !== "production" ? o.name_ + "." + r.toString() : "ObservableObject." + r.toString()), o.values_.set(r, new z(a)); + }), function() { + return this[b].getObservablePropValue_(r); + }; +} +function aa(e, t, n, r) { + var i = t.annotationType_, o = r.get; + process.env.NODE_ENV !== "production" && !o && h("Cannot apply '" + i + "' to '" + e.name_ + "." + n.toString() + "':" + (` +'` + i + "' can only be used on getter(+setter) properties.")); +} +function tn(e, t) { + return { + annotationType_: e, + options_: t, + make_: sa, + extend_: la, + decorate_20223_: ca + }; +} +function sa(e, t, n) { + return this.extend_(e, t, n, !1) === null ? 0 : 1; +} +function la(e, t, n, r) { + var i, o; + return ua(e, this, t, n), e.defineObservableProperty_(t, n.value, (i = (o = this.options_) == null ? void 0 : o.enhancer) != null ? i : Ne, r); +} +function ca(e, t) { + if (process.env.NODE_ENV !== "production") { + if (t.kind === "field") + throw h("Please use `@observable accessor " + String(t.name) + "` instead of `@observable " + String(t.name) + "`"); + $t(t, ["accessor"]); + } + var n = this, r = t.kind, i = t.name, o = /* @__PURE__ */ new WeakSet(); + function a(s, l) { + var c, u, d = He(s)[b], v = new Oe(l, (c = (u = n.options_) == null ? void 0 : u.enhancer) != null ? c : Ne, process.env.NODE_ENV !== "production" ? d.name_ + "." + i.toString() : "ObservableObject." + i.toString(), !1); + d.values_.set(i, v), o.add(s); + } + if (r == "accessor") + return { + get: function() { + return o.has(this) || a(this, e.get.call(this)), this[b].getObservablePropValue_(i); + }, + set: function(l) { + return o.has(this) || a(this, l), this[b].setObservablePropValue_(i, l); + }, + init: function(l) { + return o.has(this) || a(this, l), l; + } + }; +} +function ua(e, t, n, r) { + var i = t.annotationType_; + process.env.NODE_ENV !== "production" && !("value" in r) && h("Cannot apply '" + i + "' to '" + e.name_ + "." + n.toString() + "':" + (` +'` + i + "' cannot be used on getter/setter properties")); +} +var da = "true", fa = /* @__PURE__ */ ai(); +function ai(e) { + return { + annotationType_: da, + options_: e, + make_: ha, + extend_: va, + decorate_20223_: pa + }; +} +function ha(e, t, n, r) { + var i, o; + if (n.get) + return nn.make_(e, t, n, r); + if (n.set) { + var a = xe(t.toString(), n.set); + return r === e.target_ ? e.defineProperty_(t, { + configurable: f.safeDescriptors ? e.isPlainObject_ : !0, + set: a + }) === null ? 0 : 2 : (Y(r, t, { + configurable: !0, + set: a + }), 2); + } + if (r !== e.target_ && typeof n.value == "function") { + var s; + if (Yr(n.value)) { + var l, c = (l = this.options_) != null && l.autoBind ? Fe.bound : Fe; + return c.make_(e, t, n, r); + } + var u = (s = this.options_) != null && s.autoBind ? ht.bound : ht; + return u.make_(e, t, n, r); + } + var d = ((i = this.options_) == null ? void 0 : i.deep) === !1 ? N.ref : N; + if (typeof n.value == "function" && (o = this.options_) != null && o.autoBind) { + var v; + n.value = n.value.bind((v = e.proxy_) != null ? v : e.target_); + } + return d.make_(e, t, n, r); +} +function va(e, t, n, r) { + var i, o; + if (n.get) + return nn.extend_(e, t, n, r); + if (n.set) + return e.defineProperty_(t, { + configurable: f.safeDescriptors ? e.isPlainObject_ : !0, + set: xe(t.toString(), n.set) + }, r); + if (typeof n.value == "function" && (i = this.options_) != null && i.autoBind) { + var a; + n.value = n.value.bind((a = e.proxy_) != null ? a : e.target_); + } + var s = ((o = this.options_) == null ? void 0 : o.deep) === !1 ? N.ref : N; + return s.extend_(e, t, n, r); +} +function pa(e, t) { + h("'" + this.annotationType_ + "' cannot be used as a decorator"); +} +var ga = "observable", ba = "observable.ref", ma = "observable.shallow", ya = "observable.struct", si = { + deep: !0, + name: void 0, + defaultDecorator: void 0, + proxy: !0 +}; +Object.freeze(si); +function Nt(e) { + return e || si; +} +var On = /* @__PURE__ */ tn(ga), wa = /* @__PURE__ */ tn(ba, { + enhancer: en +}), Aa = /* @__PURE__ */ tn(ma, { + enhancer: Go +}), Ea = /* @__PURE__ */ tn(ya, { + enhancer: Ko +}), li = /* @__PURE__ */ Q(On); +function xt(e) { + return e.deep === !0 ? Ne : e.deep === !1 ? en : Sa(e.defaultDecorator); +} +function Oa(e) { + var t; + return e ? (t = e.defaultDecorator) != null ? t : ai(e) : void 0; +} +function Sa(e) { + var t, n; + return e && (t = (n = e.options_) == null ? void 0 : n.enhancer) != null ? t : Ne; +} +function ci(e, t, n) { + if (wt(t)) + return On.decorate_20223_(e, t); + if (Se(t)) { + yt(e, t, On); + return; + } + return pt(e) ? e : C(e) ? N.object(e, t, n) : Array.isArray(e) ? N.array(e, t) : Ge(e) ? N.map(e, t) : te(e) ? N.set(e, t) : typeof e == "object" && e !== null ? e : N.box(e, t); +} +Jr(ci, li); +var Na = { + box: function(t, n) { + var r = Nt(n); + return new Oe(t, xt(r), r.name, !0, r.equals); + }, + array: function(t, n) { + var r = Nt(n); + return (f.useProxies === !1 || r.proxy === !1 ? Es : fs)(t, xt(r), r.name); + }, + map: function(t, n) { + var r = Nt(n); + return new Ii(t, xt(r), r.name); + }, + set: function(t, n) { + var r = Nt(n); + return new ki(t, xt(r), r.name); + }, + object: function(t, n, r) { + return ke(function() { + return Di(f.useProxies === !1 || r?.proxy === !1 ? He({}, r) : cs({}, r), t, n); + }); + }, + ref: /* @__PURE__ */ Q(wa), + shallow: /* @__PURE__ */ Q(Aa), + deep: li, + struct: /* @__PURE__ */ Q(Ea) +}, N = /* @__PURE__ */ Jr(ci, Na), ui = "computed", xa = "computed.struct", Sn = /* @__PURE__ */ Mn(ui), _a = /* @__PURE__ */ Mn(xa, { + equals: ze.structural +}), nn = function(t, n) { + if (wt(n)) + return Sn.decorate_20223_(t, n); + if (Se(n)) + return yt(t, n, Sn); + if (C(t)) + return Q(Mn(ui, t)); + process.env.NODE_ENV !== "production" && (S(t) || h("First argument to `computed` should be an expression."), S(n) && h("A setter as second argument is no longer supported, use `{ set: fn }` option instead")); + var r = C(n) ? n : {}; + return r.get = t, r.name || (r.name = t.name || ""), new z(r); +}; +Object.assign(nn, Sn); +nn.struct = /* @__PURE__ */ Q(_a); +var er, tr, Bt = 0, Pa = 1, Ca = (er = (tr = /* @__PURE__ */ Mt(function() { +}, "name")) == null ? void 0 : tr.configurable) != null ? er : !1, nr = { + value: "action", + configurable: !0, + writable: !1, + enumerable: !1 +}; +function xe(e, t, n, r) { + n === void 0 && (n = !1), process.env.NODE_ENV !== "production" && (S(t) || h("`action` can only be invoked on functions"), (typeof e != "string" || !e) && h("actions should have valid names, got: '" + e + "'")); + function i() { + return di(e, n, t, r || this, arguments); + } + return i.isMobxAction = !0, i.toString = function() { + return t.toString(); + }, Ca && (nr.value = e, Y(i, "name", nr)), i; +} +function di(e, t, n, r, i) { + var o = Da(e, t, r, i); + try { + return n.apply(r, i); + } catch (a) { + throw o.error_ = a, a; + } finally { + Ra(o); + } +} +function Da(e, t, n, r) { + var i = process.env.NODE_ENV !== "production" && P() && !!e, o = 0; + if (process.env.NODE_ENV !== "production" && i) { + o = Date.now(); + var a = r ? Array.from(r) : jt; + V({ + type: Un, + name: e, + object: n, + arguments: a + }); + } + var s = f.trackingDerivation, l = !t || !s; + j(); + var c = f.allowStateChanges; + l && (Ie(), c = rn(!0)); + var u = jn(!0), d = { + runAsAction_: l, + prevDerivation_: s, + prevAllowStateChanges_: c, + prevAllowStateReads_: u, + notifySpy_: i, + startTime_: o, + actionId_: Pa++, + parentActionId_: Bt + }; + return Bt = d.actionId_, d; +} +function Ra(e) { + Bt !== e.actionId_ && h(30), Bt = e.parentActionId_, e.error_ !== void 0 && (f.suppressReactionErrors = !0), on(e.prevAllowStateChanges_), st(e.prevAllowStateReads_), U(), e.runAsAction_ && oe(e.prevDerivation_), process.env.NODE_ENV !== "production" && e.notifySpy_ && I({ + time: Date.now() - e.startTime_ + }), f.suppressReactionErrors = !1; +} +function Ta(e, t) { + var n = rn(e); + try { + return t(); + } finally { + on(n); + } +} +function rn(e) { + var t = f.allowStateChanges; + return f.allowStateChanges = e, t; +} +function on(e) { + f.allowStateChanges = e; +} +var Va = "create", Oe = /* @__PURE__ */ function(e) { + function t(r, i, o, a, s) { + var l; + return o === void 0 && (o = process.env.NODE_ENV !== "production" ? "ObservableValue@" + W() : "ObservableValue"), a === void 0 && (a = !0), s === void 0 && (s = ze.default), l = e.call(this, o) || this, l.enhancer = void 0, l.name_ = void 0, l.equals = void 0, l.hasUnreportedChange_ = !1, l.interceptors_ = void 0, l.changeListeners_ = void 0, l.value_ = void 0, l.dehancer = void 0, l.enhancer = i, l.name_ = o, l.equals = s, l.value_ = i(r, void 0, o), process.env.NODE_ENV !== "production" && a && P() && _e({ + type: Va, + object: l, + observableKind: "value", + debugObjectName: l.name_, + newValue: "" + l.value_ + }), l; + } + ti(t, e); + var n = t.prototype; + return n.dehanceValue = function(i) { + return this.dehancer !== void 0 ? this.dehancer(i) : i; + }, n.set = function(i) { + var o = this.value_; + if (i = this.prepareNewValue_(i), i !== f.UNCHANGED) { + var a = P(); + process.env.NODE_ENV !== "production" && a && V({ + type: F, + object: this, + observableKind: "value", + debugObjectName: this.name_, + newValue: i, + oldValue: o + }), this.setNewValue_(i), process.env.NODE_ENV !== "production" && a && I(); + } + }, n.prepareNewValue_ = function(i) { + if (X(this), L(this)) { + var o = M(this, { + object: this, + type: F, + newValue: i + }); + if (!o) + return f.UNCHANGED; + i = o.newValue; + } + return i = this.enhancer(i, this.value_, this.name_), this.equals(this.value_, i) ? f.UNCHANGED : i; + }, n.setNewValue_ = function(i) { + var o = this.value_; + this.value_ = i, this.reportChanged(), q(this) && G(this, { + type: F, + object: this, + newValue: i, + oldValue: o + }); + }, n.get = function() { + return this.reportObserved(), this.dehanceValue(this.value_); + }, n.intercept_ = function(i) { + return Et(this, i); + }, n.observe_ = function(i, o) { + return o && i({ + observableKind: "value", + debugObjectName: this.name_, + object: this, + type: F, + newValue: this.value_, + oldValue: void 0 + }), Ot(this, i); + }, n.raw = function() { + return this.value_; + }, n.toJSON = function() { + return this.get(); + }, n.toString = function() { + return this.name_ + "[" + this.value_ + "]"; + }, n.valueOf = function() { + return ei(this.get()); + }, n[Symbol.toPrimitive] = function() { + return this.valueOf(); + }, t; +}(ve), z = /* @__PURE__ */ function() { + function e(n) { + this.dependenciesState_ = y.NOT_TRACKING_, this.observing_ = [], this.newObserving_ = null, this.observers_ = /* @__PURE__ */ new Set(), this.runId_ = 0, this.lastAccessedBy_ = 0, this.lowestObserverState_ = y.UP_TO_DATE_, this.unboundDepsCount_ = 0, this.value_ = new zt(null), this.name_ = void 0, this.triggeredBy_ = void 0, this.flags_ = 0, this.derivation = void 0, this.setter_ = void 0, this.isTracing_ = B.NONE, this.scope_ = void 0, this.equals_ = void 0, this.requiresReaction_ = void 0, this.keepAlive_ = void 0, this.onBOL = void 0, this.onBUOL = void 0, n.get || h(31), this.derivation = n.get, this.name_ = n.name || (process.env.NODE_ENV !== "production" ? "ComputedValue@" + W() : "ComputedValue"), n.set && (this.setter_ = xe(process.env.NODE_ENV !== "production" ? this.name_ + "-setter" : "ComputedValue-setter", n.set)), this.equals_ = n.equals || (n.compareStructural || n.struct ? ze.structural : ze.default), this.scope_ = n.context, this.requiresReaction_ = n.requiresReaction, this.keepAlive_ = !!n.keepAlive; + } + var t = e.prototype; + return t.onBecomeStale_ = function() { + Ua(this); + }, t.onBO = function() { + this.onBOL && this.onBOL.forEach(function(r) { + return r(); + }); + }, t.onBUO = function() { + this.onBUOL && this.onBUOL.forEach(function(r) { + return r(); + }); + }, t.get = function() { + if (this.isComputing && h(32, this.name_, this.derivation), f.inBatch === 0 && // !globalState.trackingDerivatpion && + this.observers_.size === 0 && !this.keepAlive_) + Nn(this) && (this.warnAboutUntrackedRead_(), j(), this.value_ = this.computeValue_(!1), U()); + else if (bi(this), Nn(this)) { + var r = f.trackingContext; + this.keepAlive_ && !r && (f.trackingContext = this), this.trackAndCompute() && ja(this), f.trackingContext = r; + } + var i = this.value_; + if (Tt(i)) + throw i.cause; + return i; + }, t.set = function(r) { + if (this.setter_) { + this.isRunningSetter && h(33, this.name_), this.isRunningSetter = !0; + try { + this.setter_.call(this.scope_, r); + } finally { + this.isRunningSetter = !1; + } + } else + h(34, this.name_); + }, t.trackAndCompute = function() { + var r = this.value_, i = ( + /* see #1208 */ + this.dependenciesState_ === y.NOT_TRACKING_ + ), o = this.computeValue_(!0), a = i || Tt(r) || Tt(o) || !this.equals_(r, o); + return a && (this.value_ = o, process.env.NODE_ENV !== "production" && P() && _e({ + observableKind: "computed", + debugObjectName: this.name_, + object: this.scope_, + type: "update", + oldValue: r, + newValue: o + })), a; + }, t.computeValue_ = function(r) { + this.isComputing = !0; + var i = rn(!1), o; + if (r) + o = fi(this, this.derivation, this.scope_); + else if (f.disableErrorBoundaries === !0) + o = this.derivation.call(this.scope_); + else + try { + o = this.derivation.call(this.scope_); + } catch (a) { + o = new zt(a); + } + return on(i), this.isComputing = !1, o; + }, t.suspend_ = function() { + this.keepAlive_ || (xn(this), this.value_ = void 0, process.env.NODE_ENV !== "production" && this.isTracing_ !== B.NONE && console.log("[mobx.trace] Computed value '" + this.name_ + "' was suspended and it will recompute on the next access.")); + }, t.observe_ = function(r, i) { + var o = this, a = !0, s = void 0; + return Ni(function() { + var l = o.get(); + if (!a || i) { + var c = Ie(); + r({ + observableKind: "computed", + debugObjectName: o.name_, + type: F, + object: o, + newValue: l, + oldValue: s + }), oe(c); + } + a = !1, s = l; + }); + }, t.warnAboutUntrackedRead_ = function() { + process.env.NODE_ENV !== "production" && (this.isTracing_ !== B.NONE && console.log("[mobx.trace] Computed value '" + this.name_ + "' is being read outside a reactive context. Doing a full recompute."), (typeof this.requiresReaction_ == "boolean" ? this.requiresReaction_ : f.computedRequiresReaction) && console.warn("[mobx] Computed value '" + this.name_ + "' is being read outside a reactive context. Doing a full recompute.")); + }, t.toString = function() { + return this.name_ + "[" + this.derivation.toString() + "]"; + }, t.valueOf = function() { + return ei(this.get()); + }, t[Symbol.toPrimitive] = function() { + return this.valueOf(); + }, Ke(e, [{ + key: "isComputing", + get: function() { + return R(this.flags_, e.isComputingMask_); + }, + set: function(r) { + this.flags_ = T(this.flags_, e.isComputingMask_, r); + } + }, { + key: "isRunningSetter", + get: function() { + return R(this.flags_, e.isRunningSetterMask_); + }, + set: function(r) { + this.flags_ = T(this.flags_, e.isRunningSetterMask_, r); + } + }, { + key: "isBeingObserved", + get: function() { + return R(this.flags_, e.isBeingObservedMask_); + }, + set: function(r) { + this.flags_ = T(this.flags_, e.isBeingObservedMask_, r); + } + }, { + key: "isPendingUnobservation", + get: function() { + return R(this.flags_, e.isPendingUnobservationMask_); + }, + set: function(r) { + this.flags_ = T(this.flags_, e.isPendingUnobservationMask_, r); + } + }, { + key: "diffValue", + get: function() { + return R(this.flags_, e.diffValueMask_) ? 1 : 0; + }, + set: function(r) { + this.flags_ = T(this.flags_, e.diffValueMask_, r === 1); + } + }]); +}(); +z.isComputingMask_ = 1; +z.isRunningSetterMask_ = 2; +z.isBeingObservedMask_ = 4; +z.isPendingUnobservationMask_ = 8; +z.diffValueMask_ = 16; +var an = /* @__PURE__ */ Ve("ComputedValue", z), y; +(function(e) { + e[e.NOT_TRACKING_ = -1] = "NOT_TRACKING_", e[e.UP_TO_DATE_ = 0] = "UP_TO_DATE_", e[e.POSSIBLY_STALE_ = 1] = "POSSIBLY_STALE_", e[e.STALE_ = 2] = "STALE_"; +})(y || (y = {})); +var B; +(function(e) { + e[e.NONE = 0] = "NONE", e[e.LOG = 1] = "LOG", e[e.BREAK = 2] = "BREAK"; +})(B || (B = {})); +var zt = function(t) { + this.cause = void 0, this.cause = t; +}; +function Tt(e) { + return e instanceof zt; +} +function Nn(e) { + switch (e.dependenciesState_) { + case y.UP_TO_DATE_: + return !1; + case y.NOT_TRACKING_: + case y.STALE_: + return !0; + case y.POSSIBLY_STALE_: { + for (var t = jn(!0), n = Ie(), r = e.observing_, i = r.length, o = 0; o < i; o++) { + var a = r[o]; + if (an(a)) { + if (f.disableErrorBoundaries) + a.get(); + else + try { + a.get(); + } catch { + return oe(n), st(t), !0; + } + if (e.dependenciesState_ === y.STALE_) + return oe(n), st(t), !0; + } + } + return vi(e), oe(n), st(t), !1; + } + } +} +function X(e) { + if (process.env.NODE_ENV !== "production") { + var t = e.observers_.size > 0; + !f.allowStateChanges && (t || f.enforceActions === "always") && console.warn("[MobX] " + (f.enforceActions ? "Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: " : "Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, a computed value or the render function of a React component? You can wrap side effects in 'runInAction' (or decorate functions with 'action') if needed. Tried to modify: ") + e.name_); + } +} +function Ia(e) { + process.env.NODE_ENV !== "production" && !f.allowStateReads && f.observableRequiresReaction && console.warn("[mobx] Observable '" + e.name_ + "' being read outside a reactive context."); +} +function fi(e, t, n) { + var r = jn(!0); + vi(e), e.newObserving_ = new Array( + // Reserve constant space for initial dependencies, dynamic space otherwise. + // See https://github.com/mobxjs/mobx/pull/3833 + e.runId_ === 0 ? 100 : e.observing_.length + ), e.unboundDepsCount_ = 0, e.runId_ = ++f.runId; + var i = f.trackingDerivation; + f.trackingDerivation = e, f.inBatch++; + var o; + if (f.disableErrorBoundaries === !0) + o = t.call(n); + else + try { + o = t.call(n); + } catch (a) { + o = new zt(a); + } + return f.inBatch--, f.trackingDerivation = i, La(e), ka(e), st(r), o; +} +function ka(e) { + process.env.NODE_ENV !== "production" && e.observing_.length === 0 && (typeof e.requiresObservable_ == "boolean" ? e.requiresObservable_ : f.reactionRequiresObservable) && console.warn("[mobx] Derivation '" + e.name_ + "' is created/updated without reading any observable value."); +} +function La(e) { + for (var t = e.observing_, n = e.observing_ = e.newObserving_, r = y.UP_TO_DATE_, i = 0, o = e.unboundDepsCount_, a = 0; a < o; a++) { + var s = n[a]; + s.diffValue === 0 && (s.diffValue = 1, i !== a && (n[i] = s), i++), s.dependenciesState_ > r && (r = s.dependenciesState_); + } + for (n.length = i, e.newObserving_ = null, o = t.length; o--; ) { + var l = t[o]; + l.diffValue === 0 && pi(l, e), l.diffValue = 0; + } + for (; i--; ) { + var c = n[i]; + c.diffValue === 1 && (c.diffValue = 0, Ma(c, e)); + } + r !== y.UP_TO_DATE_ && (e.dependenciesState_ = r, e.onBecomeStale_()); +} +function xn(e) { + var t = e.observing_; + e.observing_ = []; + for (var n = t.length; n--; ) + pi(t[n], e); + e.dependenciesState_ = y.NOT_TRACKING_; +} +function hi(e) { + var t = Ie(); + try { + return e(); + } finally { + oe(t); + } +} +function Ie() { + var e = f.trackingDerivation; + return f.trackingDerivation = null, e; +} +function oe(e) { + f.trackingDerivation = e; +} +function jn(e) { + var t = f.allowStateReads; + return f.allowStateReads = e, t; +} +function st(e) { + f.allowStateReads = e; +} +function vi(e) { + if (e.dependenciesState_ !== y.UP_TO_DATE_) { + e.dependenciesState_ = y.UP_TO_DATE_; + for (var t = e.observing_, n = t.length; n--; ) + t[n].lowestObserverState_ = y.UP_TO_DATE_; + } +} +var fn = function() { + this.version = 6, this.UNCHANGED = {}, this.trackingDerivation = null, this.trackingContext = null, this.runId = 0, this.mobxGuid = 0, this.inBatch = 0, this.pendingUnobservations = [], this.pendingReactions = [], this.isRunningReactions = !1, this.allowStateChanges = !1, this.allowStateReads = !0, this.enforceActions = !0, this.spyListeners = [], this.globalReactionErrorHandlers = [], this.computedRequiresReaction = !1, this.reactionRequiresObservable = !1, this.observableRequiresReaction = !1, this.disableErrorBoundaries = !1, this.suppressReactionErrors = !1, this.useProxies = !0, this.verifyProxies = !1, this.safeDescriptors = !0; +}, hn = !0, f = /* @__PURE__ */ function() { + var e = /* @__PURE__ */ Vn(); + return e.__mobxInstanceCount > 0 && !e.__mobxGlobals && (hn = !1), e.__mobxGlobals && e.__mobxGlobals.version !== new fn().version && (hn = !1), hn ? e.__mobxGlobals ? (e.__mobxInstanceCount += 1, e.__mobxGlobals.UNCHANGED || (e.__mobxGlobals.UNCHANGED = {}), e.__mobxGlobals) : (e.__mobxInstanceCount = 1, e.__mobxGlobals = /* @__PURE__ */ new fn()) : (setTimeout(function() { + h(35); + }, 1), new fn()); +}(); +function Ma(e, t) { + e.observers_.add(t), e.lowestObserverState_ > t.dependenciesState_ && (e.lowestObserverState_ = t.dependenciesState_); +} +function pi(e, t) { + e.observers_.delete(t), e.observers_.size === 0 && gi(e); +} +function gi(e) { + e.isPendingUnobservation === !1 && (e.isPendingUnobservation = !0, f.pendingUnobservations.push(e)); +} +function j() { + f.inBatch++; +} +function U() { + if (--f.inBatch === 0) { + Ai(); + for (var e = f.pendingUnobservations, t = 0; t < e.length; t++) { + var n = e[t]; + n.isPendingUnobservation = !1, n.observers_.size === 0 && (n.isBeingObserved && (n.isBeingObserved = !1, n.onBUO()), n instanceof z && n.suspend_()); + } + f.pendingUnobservations = []; + } +} +function bi(e) { + Ia(e); + var t = f.trackingDerivation; + return t !== null ? (t.runId_ !== e.lastAccessedBy_ && (e.lastAccessedBy_ = t.runId_, t.newObserving_[t.unboundDepsCount_++] = e, !e.isBeingObserved && f.trackingContext && (e.isBeingObserved = !0, e.onBO())), e.isBeingObserved) : (e.observers_.size === 0 && f.inBatch > 0 && gi(e), !1); +} +function mi(e) { + e.lowestObserverState_ !== y.STALE_ && (e.lowestObserverState_ = y.STALE_, e.observers_.forEach(function(t) { + t.dependenciesState_ === y.UP_TO_DATE_ && (process.env.NODE_ENV !== "production" && t.isTracing_ !== B.NONE && yi(t, e), t.onBecomeStale_()), t.dependenciesState_ = y.STALE_; + })); +} +function ja(e) { + e.lowestObserverState_ !== y.STALE_ && (e.lowestObserverState_ = y.STALE_, e.observers_.forEach(function(t) { + t.dependenciesState_ === y.POSSIBLY_STALE_ ? (t.dependenciesState_ = y.STALE_, process.env.NODE_ENV !== "production" && t.isTracing_ !== B.NONE && yi(t, e)) : t.dependenciesState_ === y.UP_TO_DATE_ && (e.lowestObserverState_ = y.UP_TO_DATE_); + })); +} +function Ua(e) { + e.lowestObserverState_ === y.UP_TO_DATE_ && (e.lowestObserverState_ = y.POSSIBLY_STALE_, e.observers_.forEach(function(t) { + t.dependenciesState_ === y.UP_TO_DATE_ && (t.dependenciesState_ = y.POSSIBLY_STALE_, t.onBecomeStale_()); + })); +} +function yi(e, t) { + if (console.log("[mobx.trace] '" + e.name_ + "' is invalidated due to a change in: '" + t.name_ + "'"), e.isTracing_ === B.BREAK) { + var n = []; + wi(ts(e), n, 1), new Function(`debugger; +/* +Tracing '` + e.name_ + `' + +You are entering this break point because derivation '` + e.name_ + "' is being traced and '" + t.name_ + `' is now forcing it to update. +Just follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update +The stackframe you are looking for is at least ~6-8 stack-frames up. + +` + (e instanceof z ? e.derivation.toString().replace(/[*]\//g, "/") : "") + ` + +The dependencies for this derivation are: + +` + n.join(` +`) + ` +*/ + `)(); + } +} +function wi(e, t, n) { + if (t.length >= 1e3) { + t.push("(and many more)"); + return; + } + t.push("" + " ".repeat(n - 1) + e.name), e.dependencies && e.dependencies.forEach(function(r) { + return wi(r, t, n + 1); + }); +} +var ee = /* @__PURE__ */ function() { + function e(n, r, i, o) { + n === void 0 && (n = process.env.NODE_ENV !== "production" ? "Reaction@" + W() : "Reaction"), this.name_ = void 0, this.onInvalidate_ = void 0, this.errorHandler_ = void 0, this.requiresObservable_ = void 0, this.observing_ = [], this.newObserving_ = [], this.dependenciesState_ = y.NOT_TRACKING_, this.runId_ = 0, this.unboundDepsCount_ = 0, this.flags_ = 0, this.isTracing_ = B.NONE, this.name_ = n, this.onInvalidate_ = r, this.errorHandler_ = i, this.requiresObservable_ = o; + } + var t = e.prototype; + return t.onBecomeStale_ = function() { + this.schedule_(); + }, t.schedule_ = function() { + this.isScheduled || (this.isScheduled = !0, f.pendingReactions.push(this), Ai()); + }, t.runReaction_ = function() { + if (!this.isDisposed) { + j(), this.isScheduled = !1; + var r = f.trackingContext; + if (f.trackingContext = this, Nn(this)) { + this.isTrackPending = !0; + try { + this.onInvalidate_(), process.env.NODE_ENV !== "production" && this.isTrackPending && P() && _e({ + name: this.name_, + type: "scheduled-reaction" + }); + } catch (i) { + this.reportExceptionInDerivation_(i); + } + } + f.trackingContext = r, U(); + } + }, t.track = function(r) { + if (!this.isDisposed) { + j(); + var i = P(), o; + process.env.NODE_ENV !== "production" && i && (o = Date.now(), V({ + name: this.name_, + type: "reaction" + })), this.isRunning = !0; + var a = f.trackingContext; + f.trackingContext = this; + var s = fi(this, r, void 0); + f.trackingContext = a, this.isRunning = !1, this.isTrackPending = !1, this.isDisposed && xn(this), Tt(s) && this.reportExceptionInDerivation_(s.cause), process.env.NODE_ENV !== "production" && i && I({ + time: Date.now() - o + }), U(); + } + }, t.reportExceptionInDerivation_ = function(r) { + var i = this; + if (this.errorHandler_) { + this.errorHandler_(r, this); + return; + } + if (f.disableErrorBoundaries) + throw r; + var o = process.env.NODE_ENV !== "production" ? "[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '" + this + "'" : "[mobx] uncaught error in '" + this + "'"; + f.suppressReactionErrors ? process.env.NODE_ENV !== "production" && console.warn("[mobx] (error in reaction '" + this.name_ + "' suppressed, fix error of causing action below)") : console.error(o, r), process.env.NODE_ENV !== "production" && P() && _e({ + type: "error", + name: this.name_, + message: o, + error: "" + r + }), f.globalReactionErrorHandlers.forEach(function(a) { + return a(r, i); + }); + }, t.dispose = function() { + this.isDisposed || (this.isDisposed = !0, this.isRunning || (j(), xn(this), U())); + }, t.getDisposer_ = function(r) { + var i = this, o = function a() { + i.dispose(), r == null || r.removeEventListener == null || r.removeEventListener("abort", a); + }; + return r == null || r.addEventListener == null || r.addEventListener("abort", o), o[b] = this, o; + }, t.toString = function() { + return "Reaction[" + this.name_ + "]"; + }, t.trace = function(r) { + r === void 0 && (r = !1), as(this, r); + }, Ke(e, [{ + key: "isDisposed", + get: function() { + return R(this.flags_, e.isDisposedMask_); + }, + set: function(r) { + this.flags_ = T(this.flags_, e.isDisposedMask_, r); + } + }, { + key: "isScheduled", + get: function() { + return R(this.flags_, e.isScheduledMask_); + }, + set: function(r) { + this.flags_ = T(this.flags_, e.isScheduledMask_, r); + } + }, { + key: "isTrackPending", + get: function() { + return R(this.flags_, e.isTrackPendingMask_); + }, + set: function(r) { + this.flags_ = T(this.flags_, e.isTrackPendingMask_, r); + } + }, { + key: "isRunning", + get: function() { + return R(this.flags_, e.isRunningMask_); + }, + set: function(r) { + this.flags_ = T(this.flags_, e.isRunningMask_, r); + } + }, { + key: "diffValue", + get: function() { + return R(this.flags_, e.diffValueMask_) ? 1 : 0; + }, + set: function(r) { + this.flags_ = T(this.flags_, e.diffValueMask_, r === 1); + } + }]); +}(); +ee.isDisposedMask_ = 1; +ee.isScheduledMask_ = 2; +ee.isTrackPendingMask_ = 4; +ee.isRunningMask_ = 8; +ee.diffValueMask_ = 16; +function Ba(e) { + return f.globalReactionErrorHandlers.push(e), function() { + var t = f.globalReactionErrorHandlers.indexOf(e); + t >= 0 && f.globalReactionErrorHandlers.splice(t, 1); + }; +} +var rr = 100, za = function(t) { + return t(); +}; +function Ai() { + f.inBatch > 0 || f.isRunningReactions || za(Wa); +} +function Wa() { + f.isRunningReactions = !0; + for (var e = f.pendingReactions, t = 0; e.length > 0; ) { + ++t === rr && (console.error(process.env.NODE_ENV !== "production" ? "Reaction doesn't converge to a stable state after " + rr + " iterations." + (" Probably there is a cycle in the reactive function: " + e[0]) : "[mobx] cycle in reaction: " + e[0]), e.splice(0)); + for (var n = e.splice(0), r = 0, i = n.length; r < i; r++) + n[r].runReaction_(); + } + f.isRunningReactions = !1; +} +var Wt = /* @__PURE__ */ Ve("Reaction", ee); +function P() { + return process.env.NODE_ENV !== "production" && !!f.spyListeners.length; +} +function _e(e) { + if (process.env.NODE_ENV !== "production" && f.spyListeners.length) + for (var t = f.spyListeners, n = 0, r = t.length; n < r; n++) + t[n](e); +} +function V(e) { + if (process.env.NODE_ENV !== "production") { + var t = de({}, e, { + spyReportStart: !0 + }); + _e(t); + } +} +var Fa = { + type: "report-end", + spyReportEnd: !0 +}; +function I(e) { + process.env.NODE_ENV !== "production" && _e(e ? de({}, e, { + type: "report-end", + spyReportEnd: !0 + }) : Fa); +} +function Za(e) { + return process.env.NODE_ENV === "production" ? (console.warn("[mobx.spy] Is a no-op in production builds"), function() { + }) : (f.spyListeners.push(e), kn(function() { + f.spyListeners = f.spyListeners.filter(function(t) { + return t !== e; + }); + })); +} +var Un = "action", qa = "action.bound", Ei = "autoAction", Ga = "autoAction.bound", Oi = "", _n = /* @__PURE__ */ At(Un), Ka = /* @__PURE__ */ At(qa, { + bound: !0 +}), Pn = /* @__PURE__ */ At(Ei, { + autoAction: !0 +}), Ha = /* @__PURE__ */ At(Ga, { + autoAction: !0, + bound: !0 +}); +function Si(e) { + var t = function(r, i) { + if (S(r)) + return xe(r.name || Oi, r, e); + if (S(i)) + return xe(r, i, e); + if (wt(i)) + return (e ? Pn : _n).decorate_20223_(r, i); + if (Se(i)) + return yt(r, i, e ? Pn : _n); + if (Se(r)) + return Q(At(e ? Ei : Un, { + name: r, + autoAction: e + })); + process.env.NODE_ENV !== "production" && h("Invalid arguments for `action`"); + }; + return t; +} +var Ae = /* @__PURE__ */ Si(!1); +Object.assign(Ae, _n); +var ht = /* @__PURE__ */ Si(!0); +Object.assign(ht, Pn); +Ae.bound = /* @__PURE__ */ Q(Ka); +ht.bound = /* @__PURE__ */ Q(Ha); +function Ja(e) { + return di(e.name || Oi, !1, e, this, void 0); +} +function We(e) { + return S(e) && e.isMobxAction === !0; +} +function Ni(e, t) { + var n, r, i, o; + t === void 0 && (t = In), process.env.NODE_ENV !== "production" && (S(e) || h("Autorun expects a function as first argument"), We(e) && h("Autorun does not accept actions since actions are untrackable")); + var a = (n = (r = t) == null ? void 0 : r.name) != null ? n : process.env.NODE_ENV !== "production" ? e.name || "Autorun@" + W() : "Autorun", s = !t.scheduler && !t.delay, l; + if (s) + l = new ee(a, function() { + this.track(d); + }, t.onError, t.requiresObservable); + else { + var c = xi(t), u = !1; + l = new ee(a, function() { + u || (u = !0, c(function() { + u = !1, l.isDisposed || l.track(d); + })); + }, t.onError, t.requiresObservable); + } + function d() { + e(l); + } + return (i = t) != null && (i = i.signal) != null && i.aborted || l.schedule_(), l.getDisposer_((o = t) == null ? void 0 : o.signal); +} +var Xa = function(t) { + return t(); +}; +function xi(e) { + return e.scheduler ? e.scheduler : e.delay ? function(t) { + return setTimeout(t, e.delay); + } : Xa; +} +function _i(e, t, n) { + var r, i, o; + n === void 0 && (n = In), process.env.NODE_ENV !== "production" && ((!S(e) || !S(t)) && h("First and second argument to reaction should be functions"), C(n) || h("Third argument of reactions should be an object")); + var a = (r = n.name) != null ? r : process.env.NODE_ENV !== "production" ? "Reaction@" + W() : "Reaction", s = Ae(a, n.onError ? Ya(n.onError, t) : t), l = !n.scheduler && !n.delay, c = xi(n), u = !0, d = !1, v, g = n.compareStructural ? ze.structural : n.equals || ze.default, m = new ee(a, function() { + u || l ? A() : d || (d = !0, c(A)); + }, n.onError, n.requiresObservable); + function A() { + if (d = !1, !m.isDisposed) { + var x = !1, H = v; + m.track(function() { + var Le = Ta(!1, function() { + return e(m); + }); + x = u || !g(v, Le), v = Le; + }), (u && n.fireImmediately || !u && x) && s(v, H, m), u = !1; + } + } + return (i = n) != null && (i = i.signal) != null && i.aborted || m.schedule_(), m.getDisposer_((o = n) == null ? void 0 : o.signal); +} +function Ya(e, t) { + return function() { + try { + return t.apply(this, arguments); + } catch (n) { + e.call(this, n); + } + }; +} +var Qa = "onBO", $a = "onBUO"; +function es(e, t, n) { + return Ci(Qa, e, t, n); +} +function Pi(e, t, n) { + return Ci($a, e, t, n); +} +function Ci(e, t, n, r) { + var i = Ze(t), o = S(r) ? r : n, a = e + "L"; + return i[a] ? i[a].add(o) : i[a] = /* @__PURE__ */ new Set([o]), function() { + var s = i[a]; + s && (s.delete(o), s.size === 0 && delete i[a]); + }; +} +function Di(e, t, n, r) { + process.env.NODE_ENV !== "production" && (arguments.length > 4 && h("'extendObservable' expected 2-4 arguments"), typeof e != "object" && h("'extendObservable' expects an object as first argument"), pe(e) && h("'extendObservable' should not be used on maps, use map.merge instead"), C(t) || h("'extendObservable' only accepts plain objects as second argument"), (pt(t) || pt(n)) && h("Extending an object with another observable (object) is not supported")); + var i = Lo(t); + return ke(function() { + var o = He(e, r)[b]; + ft(i).forEach(function(a) { + o.extend_( + a, + i[a], + // must pass "undefined" for { key: undefined } + n && a in n ? n[a] : !0 + ); + }); + }), e; +} +function ts(e, t) { + return Ri(Ze(e, t)); +} +function Ri(e) { + var t = { + name: e.name_ + }; + return e.observing_ && e.observing_.length > 0 && (t.dependencies = ns(e.observing_).map(Ri)), t; +} +function ns(e) { + return Array.from(new Set(e)); +} +var rs = 0; +function Ti() { + this.message = "FLOW_CANCELLED"; +} +Ti.prototype = /* @__PURE__ */ Object.create(Error.prototype); +var vn = /* @__PURE__ */ ii("flow"), is = /* @__PURE__ */ ii("flow.bound", { + bound: !0 +}), Fe = /* @__PURE__ */ Object.assign(function(t, n) { + if (wt(n)) + return vn.decorate_20223_(t, n); + if (Se(n)) + return yt(t, n, vn); + process.env.NODE_ENV !== "production" && arguments.length !== 1 && h("Flow expects single argument with generator function"); + var r = t, i = r.name || "", o = function() { + var s = this, l = arguments, c = ++rs, u = Ae(i + " - runid: " + c + " - init", r).apply(s, l), d, v = void 0, g = new Promise(function(m, A) { + var x = 0; + d = A; + function H(D) { + v = void 0; + var ae; + try { + ae = Ae(i + " - runid: " + c + " - yield " + x++, u.next).call(u, D); + } catch (ge) { + return A(ge); + } + Qe(ae); + } + function Le(D) { + v = void 0; + var ae; + try { + ae = Ae(i + " - runid: " + c + " - yield " + x++, u.throw).call(u, D); + } catch (ge) { + return A(ge); + } + Qe(ae); + } + function Qe(D) { + if (S(D?.then)) { + D.then(Qe, A); + return; + } + return D.done ? m(D.value) : (v = Promise.resolve(D.value), v.then(H, Le)); + } + H(void 0); + }); + return g.cancel = Ae(i + " - runid: " + c + " - cancel", function() { + try { + v && ir(v); + var m = u.return(void 0), A = Promise.resolve(m.value); + A.then(Ue, Ue), ir(A), d(new Ti()); + } catch (x) { + d(x); + } + }), g; + }; + return o.isMobXFlow = !0, o; +}, vn); +Fe.bound = /* @__PURE__ */ Q(is); +function ir(e) { + S(e.cancel) && e.cancel(); +} +function vt(e) { + return e?.isMobXFlow === !0; +} +function os(e, t) { + return e ? Je(e) || !!e[b] || Ln(e) || Wt(e) || an(e) : !1; +} +function pt(e) { + return process.env.NODE_ENV !== "production" && arguments.length !== 1 && h("isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property"), os(e); +} +function as() { + if (process.env.NODE_ENV !== "production") { + for (var e = !1, t = arguments.length, n = new Array(t), r = 0; r < t; r++) + n[r] = arguments[r]; + typeof n[n.length - 1] == "boolean" && (e = n.pop()); + var i = ss(n); + if (!i) + return h("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly"); + i.isTracing_ === B.NONE && console.log("[mobx.trace] '" + i.name_ + "' tracing enabled"), i.isTracing_ = e ? B.BREAK : B.LOG; + } +} +function ss(e) { + switch (e.length) { + case 0: + return f.trackingDerivation; + case 1: + return Ze(e[0]); + case 2: + return Ze(e[0], e[1]); + } +} +function re(e, t) { + t === void 0 && (t = void 0), j(); + try { + return e.apply(t); + } finally { + U(); + } +} +function be(e) { + return e[b]; +} +var ls = { + has: function(t, n) { + return process.env.NODE_ENV !== "production" && f.trackingDerivation && $e("detect new properties using the 'in' operator. Use 'has' from 'mobx' instead."), be(t).has_(n); + }, + get: function(t, n) { + return be(t).get_(n); + }, + set: function(t, n, r) { + var i; + return Se(n) ? (process.env.NODE_ENV !== "production" && !be(t).values_.has(n) && $e("add a new observable property through direct assignment. Use 'set' from 'mobx' instead."), (i = be(t).set_(n, r, !0)) != null ? i : !0) : !1; + }, + deleteProperty: function(t, n) { + var r; + return process.env.NODE_ENV !== "production" && $e("delete properties from an observable object. Use 'remove' from 'mobx' instead."), Se(n) ? (r = be(t).delete_(n, !0)) != null ? r : !0 : !1; + }, + defineProperty: function(t, n, r) { + var i; + return process.env.NODE_ENV !== "production" && $e("define property on an observable object. Use 'defineProperty' from 'mobx' instead."), (i = be(t).defineProperty_(n, r)) != null ? i : !0; + }, + ownKeys: function(t) { + return process.env.NODE_ENV !== "production" && f.trackingDerivation && $e("iterate keys to detect added / removed properties. Use 'keys' from 'mobx' instead."), be(t).ownKeys_(); + }, + preventExtensions: function(t) { + h(13); + } +}; +function cs(e, t) { + var n, r; + return Xr(), e = He(e, t), (r = (n = e[b]).proxy_) != null ? r : n.proxy_ = new Proxy(e, ls); +} +function L(e) { + return e.interceptors_ !== void 0 && e.interceptors_.length > 0; +} +function Et(e, t) { + var n = e.interceptors_ || (e.interceptors_ = []); + return n.push(t), kn(function() { + var r = n.indexOf(t); + r !== -1 && n.splice(r, 1); + }); +} +function M(e, t) { + var n = Ie(); + try { + for (var r = [].concat(e.interceptors_ || []), i = 0, o = r.length; i < o && (t = r[i](t), t && !t.type && h(14), !!t); i++) + ; + return t; + } finally { + oe(n); + } +} +function q(e) { + return e.changeListeners_ !== void 0 && e.changeListeners_.length > 0; +} +function Ot(e, t) { + var n = e.changeListeners_ || (e.changeListeners_ = []); + return n.push(t), kn(function() { + var r = n.indexOf(t); + r !== -1 && n.splice(r, 1); + }); +} +function G(e, t) { + var n = Ie(), r = e.changeListeners_; + if (r) { + r = r.slice(); + for (var i = 0, o = r.length; i < o; i++) + r[i](t); + oe(n); + } +} +var pn = /* @__PURE__ */ Symbol("mobx-keys"); +function sn(e, t, n) { + return process.env.NODE_ENV !== "production" && (!C(e) && !C(Object.getPrototypeOf(e)) && h("'makeAutoObservable' can only be used for classes that don't have a superclass"), Je(e) && h("makeAutoObservable can only be used on objects not already made observable")), C(e) ? Di(e, e, t, n) : (ke(function() { + var r = He(e, n)[b]; + if (!e[pn]) { + var i = Object.getPrototypeOf(e), o = new Set([].concat(ft(e), ft(i))); + o.delete("constructor"), o.delete(b), Qt(i, pn, o); + } + e[pn].forEach(function(a) { + return r.make_( + a, + // must pass "undefined" for { key: undefined } + t && a in t ? t[a] : !0 + ); + }); + }), e); +} +var or = "splice", F = "update", us = 1e4, ds = { + get: function(t, n) { + var r = t[b]; + return n === b ? r : n === "length" ? r.getArrayLength_() : typeof n == "string" && !isNaN(n) ? r.get_(parseInt(n)) : Z(Ft, n) ? Ft[n] : t[n]; + }, + set: function(t, n, r) { + var i = t[b]; + return n === "length" && i.setArrayLength_(r), typeof n == "symbol" || isNaN(n) ? t[n] = r : i.set_(parseInt(n), r), !0; + }, + preventExtensions: function() { + h(15); + } +}, Bn = /* @__PURE__ */ function() { + function e(n, r, i, o) { + n === void 0 && (n = process.env.NODE_ENV !== "production" ? "ObservableArray@" + W() : "ObservableArray"), this.owned_ = void 0, this.legacyMode_ = void 0, this.atom_ = void 0, this.values_ = [], this.interceptors_ = void 0, this.changeListeners_ = void 0, this.enhancer_ = void 0, this.dehancer = void 0, this.proxy_ = void 0, this.lastKnownLength_ = 0, this.owned_ = i, this.legacyMode_ = o, this.atom_ = new ve(n), this.enhancer_ = function(a, s) { + return r(a, s, process.env.NODE_ENV !== "production" ? n + "[..]" : "ObservableArray[..]"); + }; + } + var t = e.prototype; + return t.dehanceValue_ = function(r) { + return this.dehancer !== void 0 ? this.dehancer(r) : r; + }, t.dehanceValues_ = function(r) { + return this.dehancer !== void 0 && r.length > 0 ? r.map(this.dehancer) : r; + }, t.intercept_ = function(r) { + return Et(this, r); + }, t.observe_ = function(r, i) { + return i === void 0 && (i = !1), i && r({ + observableKind: "array", + object: this.proxy_, + debugObjectName: this.atom_.name_, + type: "splice", + index: 0, + added: this.values_.slice(), + addedCount: this.values_.length, + removed: [], + removedCount: 0 + }), Ot(this, r); + }, t.getArrayLength_ = function() { + return this.atom_.reportObserved(), this.values_.length; + }, t.setArrayLength_ = function(r) { + (typeof r != "number" || isNaN(r) || r < 0) && h("Out of range: " + r); + var i = this.values_.length; + if (r !== i) + if (r > i) { + for (var o = new Array(r - i), a = 0; a < r - i; a++) + o[a] = void 0; + this.spliceWithArray_(i, 0, o); + } else + this.spliceWithArray_(r, i - r); + }, t.updateArrayLength_ = function(r, i) { + r !== this.lastKnownLength_ && h(16), this.lastKnownLength_ += i, this.legacyMode_ && i > 0 && ji(r + i + 1); + }, t.spliceWithArray_ = function(r, i, o) { + var a = this; + X(this.atom_); + var s = this.values_.length; + if (r === void 0 ? r = 0 : r > s ? r = s : r < 0 && (r = Math.max(0, s + r)), arguments.length === 1 ? i = s - r : i == null ? i = 0 : i = Math.max(0, Math.min(i, s - r)), o === void 0 && (o = jt), L(this)) { + var l = M(this, { + object: this.proxy_, + type: or, + index: r, + removedCount: i, + added: o + }); + if (!l) + return jt; + i = l.removedCount, o = l.added; + } + if (o = o.length === 0 ? o : o.map(function(d) { + return a.enhancer_(d, void 0); + }), this.legacyMode_ || process.env.NODE_ENV !== "production") { + var c = o.length - i; + this.updateArrayLength_(s, c); + } + var u = this.spliceItemsIntoValues_(r, i, o); + return (i !== 0 || o.length !== 0) && this.notifyArraySplice_(r, o, u), this.dehanceValues_(u); + }, t.spliceItemsIntoValues_ = function(r, i, o) { + if (o.length < us) { + var a; + return (a = this.values_).splice.apply(a, [r, i].concat(o)); + } else { + var s = this.values_.slice(r, r + i), l = this.values_.slice(r + i); + this.values_.length += o.length - i; + for (var c = 0; c < o.length; c++) + this.values_[r + c] = o[c]; + for (var u = 0; u < l.length; u++) + this.values_[r + o.length + u] = l[u]; + return s; + } + }, t.notifyArrayChildUpdate_ = function(r, i, o) { + var a = !this.owned_ && P(), s = q(this), l = s || a ? { + observableKind: "array", + object: this.proxy_, + type: F, + debugObjectName: this.atom_.name_, + index: r, + newValue: i, + oldValue: o + } : null; + process.env.NODE_ENV !== "production" && a && V(l), this.atom_.reportChanged(), s && G(this, l), process.env.NODE_ENV !== "production" && a && I(); + }, t.notifyArraySplice_ = function(r, i, o) { + var a = !this.owned_ && P(), s = q(this), l = s || a ? { + observableKind: "array", + object: this.proxy_, + debugObjectName: this.atom_.name_, + type: or, + index: r, + removed: o, + added: i, + removedCount: o.length, + addedCount: i.length + } : null; + process.env.NODE_ENV !== "production" && a && V(l), this.atom_.reportChanged(), s && G(this, l), process.env.NODE_ENV !== "production" && a && I(); + }, t.get_ = function(r) { + if (this.legacyMode_ && r >= this.values_.length) { + console.warn(process.env.NODE_ENV !== "production" ? "[mobx.array] Attempt to read an array index (" + r + ") that is out of bounds (" + this.values_.length + "). Please check length first. Out of bound indices will not be tracked by MobX" : "[mobx] Out of bounds read: " + r); + return; + } + return this.atom_.reportObserved(), this.dehanceValue_(this.values_[r]); + }, t.set_ = function(r, i) { + var o = this.values_; + if (this.legacyMode_ && r > o.length && h(17, r, o.length), r < o.length) { + X(this.atom_); + var a = o[r]; + if (L(this)) { + var s = M(this, { + type: F, + object: this.proxy_, + // since "this" is the real array we need to pass its proxy + index: r, + newValue: i + }); + if (!s) + return; + i = s.newValue; + } + i = this.enhancer_(i, a); + var l = i !== a; + l && (o[r] = i, this.notifyArrayChildUpdate_(r, i, a)); + } else { + for (var c = new Array(r + 1 - o.length), u = 0; u < c.length - 1; u++) + c[u] = void 0; + c[c.length - 1] = i, this.spliceWithArray_(o.length, 0, c); + } + }, e; +}(); +function fs(e, t, n, r) { + return n === void 0 && (n = process.env.NODE_ENV !== "production" ? "ObservableArray@" + W() : "ObservableArray"), r === void 0 && (r = !1), Xr(), ke(function() { + var i = new Bn(n, t, r, !1); + Qr(i.values_, b, i); + var o = new Proxy(i.values_, ds); + return i.proxy_ = o, e && e.length && i.spliceWithArray_(0, 0, e), o; + }); +} +var Ft = { + clear: function() { + return this.splice(0); + }, + replace: function(t) { + var n = this[b]; + return n.spliceWithArray_(0, n.values_.length, t); + }, + // Used by JSON.stringify + toJSON: function() { + return this.slice(); + }, + /* + * functions that do alter the internal structure of the array, (based on lib.es6.d.ts) + * since these functions alter the inner structure of the array, the have side effects. + * Because the have side effects, they should not be used in computed function, + * and for that reason the do not call dependencyState.notifyObserved + */ + splice: function(t, n) { + for (var r = arguments.length, i = new Array(r > 2 ? r - 2 : 0), o = 2; o < r; o++) + i[o - 2] = arguments[o]; + var a = this[b]; + switch (arguments.length) { + case 0: + return []; + case 1: + return a.spliceWithArray_(t); + case 2: + return a.spliceWithArray_(t, n); + } + return a.spliceWithArray_(t, n, i); + }, + spliceWithArray: function(t, n, r) { + return this[b].spliceWithArray_(t, n, r); + }, + push: function() { + for (var t = this[b], n = arguments.length, r = new Array(n), i = 0; i < n; i++) + r[i] = arguments[i]; + return t.spliceWithArray_(t.values_.length, 0, r), t.values_.length; + }, + pop: function() { + return this.splice(Math.max(this[b].values_.length - 1, 0), 1)[0]; + }, + shift: function() { + return this.splice(0, 1)[0]; + }, + unshift: function() { + for (var t = this[b], n = arguments.length, r = new Array(n), i = 0; i < n; i++) + r[i] = arguments[i]; + return t.spliceWithArray_(0, 0, r), t.values_.length; + }, + reverse: function() { + return f.trackingDerivation && h(37, "reverse"), this.replace(this.slice().reverse()), this; + }, + sort: function() { + f.trackingDerivation && h(37, "sort"); + var t = this.slice(); + return t.sort.apply(t, arguments), this.replace(t), this; + }, + remove: function(t) { + var n = this[b], r = n.dehanceValues_(n.values_).indexOf(t); + return r > -1 ? (this.splice(r, 1), !0) : !1; + } +}; +w("at", k); +w("concat", k); +w("flat", k); +w("includes", k); +w("indexOf", k); +w("join", k); +w("lastIndexOf", k); +w("slice", k); +w("toString", k); +w("toLocaleString", k); +w("toSorted", k); +w("toSpliced", k); +w("with", k); +w("every", K); +w("filter", K); +w("find", K); +w("findIndex", K); +w("findLast", K); +w("findLastIndex", K); +w("flatMap", K); +w("forEach", K); +w("map", K); +w("some", K); +w("toReversed", K); +w("reduce", Vi); +w("reduceRight", Vi); +function w(e, t) { + typeof Array.prototype[e] == "function" && (Ft[e] = t(e)); +} +function k(e) { + return function() { + var t = this[b]; + t.atom_.reportObserved(); + var n = t.dehanceValues_(t.values_); + return n[e].apply(n, arguments); + }; +} +function K(e) { + return function(t, n) { + var r = this, i = this[b]; + i.atom_.reportObserved(); + var o = i.dehanceValues_(i.values_); + return o[e](function(a, s) { + return t.call(n, a, s, r); + }); + }; +} +function Vi(e) { + return function() { + var t = this, n = this[b]; + n.atom_.reportObserved(); + var r = n.dehanceValues_(n.values_), i = arguments[0]; + return arguments[0] = function(o, a, s) { + return i(o, a, s, t); + }, r[e].apply(r, arguments); + }; +} +var hs = /* @__PURE__ */ Ve("ObservableArrayAdministration", Bn); +function ln(e) { + return Yt(e) && hs(e[b]); +} +var vs = {}, ce = "add", Zt = "delete", Ii = /* @__PURE__ */ function() { + function e(n, r, i) { + var o = this; + r === void 0 && (r = Ne), i === void 0 && (i = process.env.NODE_ENV !== "production" ? "ObservableMap@" + W() : "ObservableMap"), this.enhancer_ = void 0, this.name_ = void 0, this[b] = vs, this.data_ = void 0, this.hasMap_ = void 0, this.keysAtom_ = void 0, this.interceptors_ = void 0, this.changeListeners_ = void 0, this.dehancer = void 0, this.enhancer_ = r, this.name_ = i, S(Map) || h(18), ke(function() { + o.keysAtom_ = ni(process.env.NODE_ENV !== "production" ? o.name_ + ".keys()" : "ObservableMap.keys()"), o.data_ = /* @__PURE__ */ new Map(), o.hasMap_ = /* @__PURE__ */ new Map(), n && o.merge(n); + }); + } + var t = e.prototype; + return t.has_ = function(r) { + return this.data_.has(r); + }, t.has = function(r) { + var i = this; + if (!f.trackingDerivation) + return this.has_(r); + var o = this.hasMap_.get(r); + if (!o) { + var a = o = new Oe(this.has_(r), en, process.env.NODE_ENV !== "production" ? this.name_ + "." + An(r) + "?" : "ObservableMap.key?", !1); + this.hasMap_.set(r, a), Pi(a, function() { + return i.hasMap_.delete(r); + }); + } + return o.get(); + }, t.set = function(r, i) { + var o = this.has_(r); + if (L(this)) { + var a = M(this, { + type: o ? F : ce, + object: this, + newValue: i, + name: r + }); + if (!a) + return this; + i = a.newValue; + } + return o ? this.updateValue_(r, i) : this.addValue_(r, i), this; + }, t.delete = function(r) { + var i = this; + if (X(this.keysAtom_), L(this)) { + var o = M(this, { + type: Zt, + object: this, + name: r + }); + if (!o) + return !1; + } + if (this.has_(r)) { + var a = P(), s = q(this), l = s || a ? { + observableKind: "map", + debugObjectName: this.name_, + type: Zt, + object: this, + oldValue: this.data_.get(r).value_, + name: r + } : null; + return process.env.NODE_ENV !== "production" && a && V(l), re(function() { + var c; + i.keysAtom_.reportChanged(), (c = i.hasMap_.get(r)) == null || c.setNewValue_(!1); + var u = i.data_.get(r); + u.setNewValue_(void 0), i.data_.delete(r); + }), s && G(this, l), process.env.NODE_ENV !== "production" && a && I(), !0; + } + return !1; + }, t.updateValue_ = function(r, i) { + var o = this.data_.get(r); + if (i = o.prepareNewValue_(i), i !== f.UNCHANGED) { + var a = P(), s = q(this), l = s || a ? { + observableKind: "map", + debugObjectName: this.name_, + type: F, + object: this, + oldValue: o.value_, + name: r, + newValue: i + } : null; + process.env.NODE_ENV !== "production" && a && V(l), o.setNewValue_(i), s && G(this, l), process.env.NODE_ENV !== "production" && a && I(); + } + }, t.addValue_ = function(r, i) { + var o = this; + X(this.keysAtom_), re(function() { + var c, u = new Oe(i, o.enhancer_, process.env.NODE_ENV !== "production" ? o.name_ + "." + An(r) : "ObservableMap.key", !1); + o.data_.set(r, u), i = u.value_, (c = o.hasMap_.get(r)) == null || c.setNewValue_(!0), o.keysAtom_.reportChanged(); + }); + var a = P(), s = q(this), l = s || a ? { + observableKind: "map", + debugObjectName: this.name_, + type: ce, + object: this, + name: r, + newValue: i + } : null; + process.env.NODE_ENV !== "production" && a && V(l), s && G(this, l), process.env.NODE_ENV !== "production" && a && I(); + }, t.get = function(r) { + return this.has(r) ? this.dehanceValue_(this.data_.get(r).get()) : this.dehanceValue_(void 0); + }, t.dehanceValue_ = function(r) { + return this.dehancer !== void 0 ? this.dehancer(r) : r; + }, t.keys = function() { + return this.keysAtom_.reportObserved(), this.data_.keys(); + }, t.values = function() { + var r = this, i = this.keys(); + return ar({ + next: function() { + var a = i.next(), s = a.done, l = a.value; + return { + done: s, + value: s ? void 0 : r.get(l) + }; + } + }); + }, t.entries = function() { + var r = this, i = this.keys(); + return ar({ + next: function() { + var a = i.next(), s = a.done, l = a.value; + return { + done: s, + value: s ? void 0 : [l, r.get(l)] + }; + } + }); + }, t[Symbol.iterator] = function() { + return this.entries(); + }, t.forEach = function(r, i) { + for (var o = Be(this), a; !(a = o()).done; ) { + var s = a.value, l = s[0], c = s[1]; + r.call(i, c, l, this); + } + }, t.merge = function(r) { + var i = this; + return pe(r) && (r = new Map(r)), re(function() { + C(r) ? ko(r).forEach(function(o) { + return i.set(o, r[o]); + }) : Array.isArray(r) ? r.forEach(function(o) { + var a = o[0], s = o[1]; + return i.set(a, s); + }) : Ge(r) ? (Io(r) || h(19, r), r.forEach(function(o, a) { + return i.set(a, o); + })) : r != null && h(20, r); + }), this; + }, t.clear = function() { + var r = this; + re(function() { + hi(function() { + for (var i = Be(r.keys()), o; !(o = i()).done; ) { + var a = o.value; + r.delete(a); + } + }); + }); + }, t.replace = function(r) { + var i = this; + return re(function() { + for (var o = ps(r), a = /* @__PURE__ */ new Map(), s = !1, l = Be(i.data_.keys()), c; !(c = l()).done; ) { + var u = c.value; + if (!o.has(u)) { + var d = i.delete(u); + if (d) + s = !0; + else { + var v = i.data_.get(u); + a.set(u, v); + } + } + } + for (var g = Be(o.entries()), m; !(m = g()).done; ) { + var A = m.value, x = A[0], H = A[1], Le = i.data_.has(x); + if (i.set(x, H), i.data_.has(x)) { + var Qe = i.data_.get(x); + a.set(x, Qe), Le || (s = !0); + } + } + if (!s) + if (i.data_.size !== a.size) + i.keysAtom_.reportChanged(); + else + for (var D = i.data_.keys(), ae = a.keys(), ge = D.next(), Qn = ae.next(); !ge.done; ) { + if (ge.value !== Qn.value) { + i.keysAtom_.reportChanged(); + break; + } + ge = D.next(), Qn = ae.next(); + } + i.data_ = a; + }), this; + }, t.toString = function() { + return "[object ObservableMap]"; + }, t.toJSON = function() { + return Array.from(this); + }, t.observe_ = function(r, i) { + return process.env.NODE_ENV !== "production" && i === !0 && h("`observe` doesn't support fireImmediately=true in combination with maps."), Ot(this, r); + }, t.intercept_ = function(r) { + return Et(this, r); + }, Ke(e, [{ + key: "size", + get: function() { + return this.keysAtom_.reportObserved(), this.data_.size; + } + }, { + key: Symbol.toStringTag, + get: function() { + return "Map"; + } + }]); +}(), pe = /* @__PURE__ */ Ve("ObservableMap", Ii); +function ar(e) { + return e[Symbol.toStringTag] = "MapIterator", Fn(e); +} +function ps(e) { + if (Ge(e) || pe(e)) + return e; + if (Array.isArray(e)) + return new Map(e); + if (C(e)) { + var t = /* @__PURE__ */ new Map(); + for (var n in e) + t.set(n, e[n]); + return t; + } else + return h(21, e); +} +var gs = {}, ki = /* @__PURE__ */ function() { + function e(n, r, i) { + var o = this; + r === void 0 && (r = Ne), i === void 0 && (i = process.env.NODE_ENV !== "production" ? "ObservableSet@" + W() : "ObservableSet"), this.name_ = void 0, this[b] = gs, this.data_ = /* @__PURE__ */ new Set(), this.atom_ = void 0, this.changeListeners_ = void 0, this.interceptors_ = void 0, this.dehancer = void 0, this.enhancer_ = void 0, this.name_ = i, S(Set) || h(22), this.enhancer_ = function(a, s) { + return r(a, s, i); + }, ke(function() { + o.atom_ = ni(o.name_), n && o.replace(n); + }); + } + var t = e.prototype; + return t.dehanceValue_ = function(r) { + return this.dehancer !== void 0 ? this.dehancer(r) : r; + }, t.clear = function() { + var r = this; + re(function() { + hi(function() { + for (var i = Be(r.data_.values()), o; !(o = i()).done; ) { + var a = o.value; + r.delete(a); + } + }); + }); + }, t.forEach = function(r, i) { + for (var o = Be(this), a; !(a = o()).done; ) { + var s = a.value; + r.call(i, s, s, this); + } + }, t.add = function(r) { + var i = this; + if (X(this.atom_), L(this)) { + var o = M(this, { + type: ce, + object: this, + newValue: r + }); + if (!o) + return this; + } + if (!this.has(r)) { + re(function() { + i.data_.add(i.enhancer_(r, void 0)), i.atom_.reportChanged(); + }); + var a = process.env.NODE_ENV !== "production" && P(), s = q(this), l = s || a ? { + observableKind: "set", + debugObjectName: this.name_, + type: ce, + object: this, + newValue: r + } : null; + a && process.env.NODE_ENV !== "production" && V(l), s && G(this, l), a && process.env.NODE_ENV !== "production" && I(); + } + return this; + }, t.delete = function(r) { + var i = this; + if (L(this)) { + var o = M(this, { + type: Zt, + object: this, + oldValue: r + }); + if (!o) + return !1; + } + if (this.has(r)) { + var a = process.env.NODE_ENV !== "production" && P(), s = q(this), l = s || a ? { + observableKind: "set", + debugObjectName: this.name_, + type: Zt, + object: this, + oldValue: r + } : null; + return a && process.env.NODE_ENV !== "production" && V(l), re(function() { + i.atom_.reportChanged(), i.data_.delete(r); + }), s && G(this, l), a && process.env.NODE_ENV !== "production" && I(), !0; + } + return !1; + }, t.has = function(r) { + return this.atom_.reportObserved(), this.data_.has(this.dehanceValue_(r)); + }, t.entries = function() { + var r = 0, i = Array.from(this.keys()), o = Array.from(this.values()); + return sr({ + next: function() { + var s = r; + return r += 1, s < o.length ? { + value: [i[s], o[s]], + done: !1 + } : { + value: void 0, + done: !0 + }; + } + }); + }, t.keys = function() { + return this.values(); + }, t.values = function() { + this.atom_.reportObserved(); + var r = this, i = 0, o = Array.from(this.data_.values()); + return sr({ + next: function() { + return i < o.length ? { + value: r.dehanceValue_(o[i++]), + done: !1 + } : { + value: void 0, + done: !0 + }; + } + }); + }, t.intersection = function(r) { + if (te(r) && !J(r)) + return r.intersection(this); + var i = new Set(this); + return i.intersection(r); + }, t.union = function(r) { + if (te(r) && !J(r)) + return r.union(this); + var i = new Set(this); + return i.union(r); + }, t.difference = function(r) { + return new Set(this).difference(r); + }, t.symmetricDifference = function(r) { + if (te(r) && !J(r)) + return r.symmetricDifference(this); + var i = new Set(this); + return i.symmetricDifference(r); + }, t.isSubsetOf = function(r) { + return new Set(this).isSubsetOf(r); + }, t.isSupersetOf = function(r) { + return new Set(this).isSupersetOf(r); + }, t.isDisjointFrom = function(r) { + if (te(r) && !J(r)) + return r.isDisjointFrom(this); + var i = new Set(this); + return i.isDisjointFrom(r); + }, t.replace = function(r) { + var i = this; + return J(r) && (r = new Set(r)), re(function() { + Array.isArray(r) ? (i.clear(), r.forEach(function(o) { + return i.add(o); + })) : te(r) ? (i.clear(), r.forEach(function(o) { + return i.add(o); + })) : r != null && h("Cannot initialize set from " + r); + }), this; + }, t.observe_ = function(r, i) { + return process.env.NODE_ENV !== "production" && i === !0 && h("`observe` doesn't support fireImmediately=true in combination with sets."), Ot(this, r); + }, t.intercept_ = function(r) { + return Et(this, r); + }, t.toJSON = function() { + return Array.from(this); + }, t.toString = function() { + return "[object ObservableSet]"; + }, t[Symbol.iterator] = function() { + return this.values(); + }, Ke(e, [{ + key: "size", + get: function() { + return this.atom_.reportObserved(), this.data_.size; + } + }, { + key: Symbol.toStringTag, + get: function() { + return "Set"; + } + }]); +}(), J = /* @__PURE__ */ Ve("ObservableSet", ki); +function sr(e) { + return e[Symbol.toStringTag] = "SetIterator", Fn(e); +} +var lr = /* @__PURE__ */ Object.create(null), cr = "remove", Cn = /* @__PURE__ */ function() { + function e(n, r, i, o) { + r === void 0 && (r = /* @__PURE__ */ new Map()), o === void 0 && (o = fa), this.target_ = void 0, this.values_ = void 0, this.name_ = void 0, this.defaultAnnotation_ = void 0, this.keysAtom_ = void 0, this.changeListeners_ = void 0, this.interceptors_ = void 0, this.proxy_ = void 0, this.isPlainObject_ = void 0, this.appliedAnnotations_ = void 0, this.pendingKeys_ = void 0, this.target_ = n, this.values_ = r, this.name_ = i, this.defaultAnnotation_ = o, this.keysAtom_ = new ve(process.env.NODE_ENV !== "production" ? this.name_ + ".keys" : "ObservableObject.keys"), this.isPlainObject_ = C(this.target_), process.env.NODE_ENV !== "production" && !Bi(this.defaultAnnotation_) && h("defaultAnnotation must be valid annotation"), process.env.NODE_ENV !== "production" && (this.appliedAnnotations_ = {}); + } + var t = e.prototype; + return t.getObservablePropValue_ = function(r) { + return this.values_.get(r).get(); + }, t.setObservablePropValue_ = function(r, i) { + var o = this.values_.get(r); + if (o instanceof z) + return o.set(i), !0; + if (L(this)) { + var a = M(this, { + type: F, + object: this.proxy_ || this.target_, + name: r, + newValue: i + }); + if (!a) + return null; + i = a.newValue; + } + if (i = o.prepareNewValue_(i), i !== f.UNCHANGED) { + var s = q(this), l = process.env.NODE_ENV !== "production" && P(), c = s || l ? { + type: F, + observableKind: "object", + debugObjectName: this.name_, + object: this.proxy_ || this.target_, + oldValue: o.value_, + name: r, + newValue: i + } : null; + process.env.NODE_ENV !== "production" && l && V(c), o.setNewValue_(i), s && G(this, c), process.env.NODE_ENV !== "production" && l && I(); + } + return !0; + }, t.get_ = function(r) { + return f.trackingDerivation && !Z(this.target_, r) && this.has_(r), this.target_[r]; + }, t.set_ = function(r, i, o) { + return o === void 0 && (o = !1), Z(this.target_, r) ? this.values_.has(r) ? this.setObservablePropValue_(r, i) : o ? Reflect.set(this.target_, r, i) : (this.target_[r] = i, !0) : this.extend_(r, { + value: i, + enumerable: !0, + writable: !0, + configurable: !0 + }, this.defaultAnnotation_, o); + }, t.has_ = function(r) { + if (!f.trackingDerivation) + return r in this.target_; + this.pendingKeys_ || (this.pendingKeys_ = /* @__PURE__ */ new Map()); + var i = this.pendingKeys_.get(r); + return i || (i = new Oe(r in this.target_, en, process.env.NODE_ENV !== "production" ? this.name_ + "." + An(r) + "?" : "ObservableObject.key?", !1), this.pendingKeys_.set(r, i)), i.get(); + }, t.make_ = function(r, i) { + if (i === !0 && (i = this.defaultAnnotation_), i !== !1) { + if (fr(this, i, r), !(r in this.target_)) { + var o; + if ((o = this.target_[ne]) != null && o[r]) + return; + h(1, i.annotationType_, this.name_ + "." + r.toString()); + } + for (var a = this.target_; a && a !== Xt; ) { + var s = Mt(a, r); + if (s) { + var l = i.make_(this, r, s, a); + if (l === 0) + return; + if (l === 1) + break; + } + a = Object.getPrototypeOf(a); + } + dr(this, i, r); + } + }, t.extend_ = function(r, i, o, a) { + if (a === void 0 && (a = !1), o === !0 && (o = this.defaultAnnotation_), o === !1) + return this.defineProperty_(r, i, a); + fr(this, o, r); + var s = o.extend_(this, r, i, a); + return s && dr(this, o, r), s; + }, t.defineProperty_ = function(r, i, o) { + o === void 0 && (o = !1), X(this.keysAtom_); + try { + j(); + var a = this.delete_(r); + if (!a) + return a; + if (L(this)) { + var s = M(this, { + object: this.proxy_ || this.target_, + name: r, + type: ce, + newValue: i.value + }); + if (!s) + return null; + var l = s.newValue; + i.value !== l && (i = de({}, i, { + value: l + })); + } + if (o) { + if (!Reflect.defineProperty(this.target_, r, i)) + return !1; + } else + Y(this.target_, r, i); + this.notifyPropertyAddition_(r, i.value); + } finally { + U(); + } + return !0; + }, t.defineObservableProperty_ = function(r, i, o, a) { + a === void 0 && (a = !1), X(this.keysAtom_); + try { + j(); + var s = this.delete_(r); + if (!s) + return s; + if (L(this)) { + var l = M(this, { + object: this.proxy_ || this.target_, + name: r, + type: ce, + newValue: i + }); + if (!l) + return null; + i = l.newValue; + } + var c = ur(r), u = { + configurable: f.safeDescriptors ? this.isPlainObject_ : !0, + enumerable: !0, + get: c.get, + set: c.set + }; + if (a) { + if (!Reflect.defineProperty(this.target_, r, u)) + return !1; + } else + Y(this.target_, r, u); + var d = new Oe(i, o, process.env.NODE_ENV !== "production" ? this.name_ + "." + r.toString() : "ObservableObject.key", !1); + this.values_.set(r, d), this.notifyPropertyAddition_(r, d.value_); + } finally { + U(); + } + return !0; + }, t.defineComputedProperty_ = function(r, i, o) { + o === void 0 && (o = !1), X(this.keysAtom_); + try { + j(); + var a = this.delete_(r); + if (!a) + return a; + if (L(this)) { + var s = M(this, { + object: this.proxy_ || this.target_, + name: r, + type: ce, + newValue: void 0 + }); + if (!s) + return null; + } + i.name || (i.name = process.env.NODE_ENV !== "production" ? this.name_ + "." + r.toString() : "ObservableObject.key"), i.context = this.proxy_ || this.target_; + var l = ur(r), c = { + configurable: f.safeDescriptors ? this.isPlainObject_ : !0, + enumerable: !1, + get: l.get, + set: l.set + }; + if (o) { + if (!Reflect.defineProperty(this.target_, r, c)) + return !1; + } else + Y(this.target_, r, c); + this.values_.set(r, new z(i)), this.notifyPropertyAddition_(r, void 0); + } finally { + U(); + } + return !0; + }, t.delete_ = function(r, i) { + if (i === void 0 && (i = !1), X(this.keysAtom_), !Z(this.target_, r)) + return !0; + if (L(this)) { + var o = M(this, { + object: this.proxy_ || this.target_, + name: r, + type: cr + }); + if (!o) + return null; + } + try { + var a; + j(); + var s = q(this), l = process.env.NODE_ENV !== "production" && P(), c = this.values_.get(r), u = void 0; + if (!c && (s || l)) { + var d; + u = (d = Mt(this.target_, r)) == null ? void 0 : d.value; + } + if (i) { + if (!Reflect.deleteProperty(this.target_, r)) + return !1; + } else + delete this.target_[r]; + if (process.env.NODE_ENV !== "production" && delete this.appliedAnnotations_[r], c && (this.values_.delete(r), c instanceof Oe && (u = c.value_), mi(c)), this.keysAtom_.reportChanged(), (a = this.pendingKeys_) == null || (a = a.get(r)) == null || a.set(r in this.target_), s || l) { + var v = { + type: cr, + observableKind: "object", + object: this.proxy_ || this.target_, + debugObjectName: this.name_, + oldValue: u, + name: r + }; + process.env.NODE_ENV !== "production" && l && V(v), s && G(this, v), process.env.NODE_ENV !== "production" && l && I(); + } + } finally { + U(); + } + return !0; + }, t.observe_ = function(r, i) { + return process.env.NODE_ENV !== "production" && i === !0 && h("`observe` doesn't support the fire immediately property for observable objects."), Ot(this, r); + }, t.intercept_ = function(r) { + return Et(this, r); + }, t.notifyPropertyAddition_ = function(r, i) { + var o, a = q(this), s = process.env.NODE_ENV !== "production" && P(); + if (a || s) { + var l = a || s ? { + type: ce, + observableKind: "object", + debugObjectName: this.name_, + object: this.proxy_ || this.target_, + name: r, + newValue: i + } : null; + process.env.NODE_ENV !== "production" && s && V(l), a && G(this, l), process.env.NODE_ENV !== "production" && s && I(); + } + (o = this.pendingKeys_) == null || (o = o.get(r)) == null || o.set(!0), this.keysAtom_.reportChanged(); + }, t.ownKeys_ = function() { + return this.keysAtom_.reportObserved(), ft(this.target_); + }, t.keys_ = function() { + return this.keysAtom_.reportObserved(), Object.keys(this.target_); + }, e; +}(); +function He(e, t) { + var n; + if (process.env.NODE_ENV !== "production" && t && Je(e) && h("Options can't be provided for already observable objects."), Z(e, b)) + return process.env.NODE_ENV !== "production" && !(Ui(e) instanceof Cn) && h("Cannot convert '" + qt(e) + `' into observable object: +The target is already observable of different type. +Extending builtins is not supported.`), e; + process.env.NODE_ENV !== "production" && !Object.isExtensible(e) && h("Cannot make the designated object observable; it is not extensible"); + var r = (n = t?.name) != null ? n : process.env.NODE_ENV !== "production" ? (C(e) ? "ObservableObject" : e.constructor.name) + "@" + W() : "ObservableObject", i = new Cn(e, /* @__PURE__ */ new Map(), String(r), Oa(t)); + return Qt(e, b, i), e; +} +var bs = /* @__PURE__ */ Ve("ObservableObjectAdministration", Cn); +function ur(e) { + return lr[e] || (lr[e] = { + get: function() { + return this[b].getObservablePropValue_(e); + }, + set: function(n) { + return this[b].setObservablePropValue_(e, n); + } + }); +} +function Je(e) { + return Yt(e) ? bs(e[b]) : !1; +} +function dr(e, t, n) { + var r; + process.env.NODE_ENV !== "production" && (e.appliedAnnotations_[n] = t), (r = e.target_[ne]) == null || delete r[n]; +} +function fr(e, t, n) { + if (process.env.NODE_ENV !== "production" && !Bi(t) && h("Cannot annotate '" + e.name_ + "." + n.toString() + "': Invalid annotation."), process.env.NODE_ENV !== "production" && !Ut(t) && Z(e.appliedAnnotations_, n)) { + var r = e.name_ + "." + n.toString(), i = e.appliedAnnotations_[n].annotationType_, o = t.annotationType_; + h("Cannot apply '" + o + "' to '" + r + "':" + (` +The field is already annotated with '` + i + "'.") + ` +Re-annotating fields is not allowed. +Use 'override' annotation for methods overridden by subclass.`); + } +} +var ms = /* @__PURE__ */ Mi(0), ys = /* @__PURE__ */ function() { + var e = !1, t = {}; + return Object.defineProperty(t, "0", { + set: function() { + e = !0; + } + }), Object.create(t)[0] = 1, e === !1; +}(), gn = 0, Li = function() { +}; +function ws(e, t) { + Object.setPrototypeOf ? Object.setPrototypeOf(e.prototype, t) : e.prototype.__proto__ !== void 0 ? e.prototype.__proto__ = t : e.prototype = t; +} +ws(Li, Array.prototype); +var zn = /* @__PURE__ */ function(e) { + function t(r, i, o, a) { + var s; + return o === void 0 && (o = process.env.NODE_ENV !== "production" ? "ObservableArray@" + W() : "ObservableArray"), a === void 0 && (a = !1), s = e.call(this) || this, ke(function() { + var l = new Bn(o, i, a, !0); + l.proxy_ = s, Qr(s, b, l), r && r.length && s.spliceWithArray(0, 0, r), ys && Object.defineProperty(s, "0", ms); + }), s; + } + ti(t, e); + var n = t.prototype; + return n.concat = function() { + this[b].atom_.reportObserved(); + for (var i = arguments.length, o = new Array(i), a = 0; a < i; a++) + o[a] = arguments[a]; + return Array.prototype.concat.apply( + this.slice(), + //@ts-ignore + o.map(function(s) { + return ln(s) ? s.slice() : s; + }) + ); + }, n[Symbol.iterator] = function() { + var r = this, i = 0; + return Fn({ + next: function() { + return i < r.length ? { + value: r[i++], + done: !1 + } : { + done: !0, + value: void 0 + }; + } + }); + }, Ke(t, [{ + key: "length", + get: function() { + return this[b].getArrayLength_(); + }, + set: function(i) { + this[b].setArrayLength_(i); + } + }, { + key: Symbol.toStringTag, + get: function() { + return "Array"; + } + }]); +}(Li); +Object.entries(Ft).forEach(function(e) { + var t = e[0], n = e[1]; + t !== "concat" && Qt(zn.prototype, t, n); +}); +function Mi(e) { + return { + enumerable: !1, + configurable: !0, + get: function() { + return this[b].get_(e); + }, + set: function(n) { + this[b].set_(e, n); + } + }; +} +function As(e) { + Y(zn.prototype, "" + e, Mi(e)); +} +function ji(e) { + if (e > gn) { + for (var t = gn; t < e + 100; t++) + As(t); + gn = e; + } +} +ji(1e3); +function Es(e, t, n) { + return new zn(e, t, n); +} +function Ze(e, t) { + if (typeof e == "object" && e !== null) { + if (ln(e)) + return t !== void 0 && h(23), e[b].atom_; + if (J(e)) + return e.atom_; + if (pe(e)) { + if (t === void 0) + return e.keysAtom_; + var n = e.data_.get(t) || e.hasMap_.get(t); + return n || h(25, t, qt(e)), n; + } + if (Je(e)) { + if (!t) + return h(26); + var r = e[b].values_.get(t); + return r || h(27, t, qt(e)), r; + } + if (Ln(e) || an(e) || Wt(e)) + return e; + } else if (S(e) && Wt(e[b])) + return e[b]; + h(28); +} +function Ui(e, t) { + if (e || h(29), Ln(e) || an(e) || Wt(e) || pe(e) || J(e)) + return e; + if (e[b]) + return e[b]; + h(24, e); +} +function qt(e, t) { + var n; + if (t !== void 0) + n = Ze(e, t); + else { + if (We(e)) + return e.name; + Je(e) || pe(e) || J(e) ? n = Ui(e) : n = Ze(e); + } + return n.name_; +} +function ke(e) { + var t = Ie(), n = rn(!0); + j(); + try { + return e(); + } finally { + U(), on(n), oe(t); + } +} +var hr = Xt.toString; +function Wn(e, t, n) { + return n === void 0 && (n = -1), Dn(e, t, n); +} +function Dn(e, t, n, r, i) { + if (e === t) + return e !== 0 || 1 / e === 1 / t; + if (e == null || t == null) + return !1; + if (e !== e) + return t !== t; + var o = typeof e; + if (o !== "function" && o !== "object" && typeof t != "object") + return !1; + var a = hr.call(e); + if (a !== hr.call(t)) + return !1; + switch (a) { + // Strings, numbers, regular expressions, dates, and booleans are compared by value. + case "[object RegExp]": + // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i') + case "[object String]": + return "" + e == "" + t; + case "[object Number]": + return +e != +e ? +t != +t : +e == 0 ? 1 / +e === 1 / t : +e == +t; + case "[object Date]": + case "[object Boolean]": + return +e == +t; + case "[object Symbol]": + return typeof Symbol < "u" && Symbol.valueOf.call(e) === Symbol.valueOf.call(t); + case "[object Map]": + case "[object Set]": + n >= 0 && n++; + break; + } + e = vr(e), t = vr(t); + var s = a === "[object Array]"; + if (!s) { + if (typeof e != "object" || typeof t != "object") + return !1; + var l = e.constructor, c = t.constructor; + if (l !== c && !(S(l) && l instanceof l && S(c) && c instanceof c) && "constructor" in e && "constructor" in t) + return !1; + } + if (n === 0) + return !1; + n < 0 && (n = -1), r = r || [], i = i || []; + for (var u = r.length; u--; ) + if (r[u] === e) + return i[u] === t; + if (r.push(e), i.push(t), s) { + if (u = e.length, u !== t.length) + return !1; + for (; u--; ) + if (!Dn(e[u], t[u], n - 1, r, i)) + return !1; + } else { + var d = Object.keys(e), v; + if (u = d.length, Object.keys(t).length !== u) + return !1; + for (; u--; ) + if (v = d[u], !(Z(t, v) && Dn(e[v], t[v], n - 1, r, i))) + return !1; + } + return r.pop(), i.pop(), !0; +} +function vr(e) { + return ln(e) ? e.slice() : Ge(e) || pe(e) || te(e) || J(e) ? Array.from(e.entries()) : e; +} +var pr, Os = ((pr = Vn().Iterator) == null ? void 0 : pr.prototype) || {}; +function Fn(e) { + return e[Symbol.iterator] = Ss, Object.assign(Object.create(Os), e); +} +function Ss() { + return this; +} +function Bi(e) { + return ( + // Can be function + e instanceof Object && typeof e.annotationType_ == "string" && S(e.make_) && S(e.extend_) + ); +} +["Symbol", "Map", "Set"].forEach(function(e) { + var t = Vn(); + typeof t[e] > "u" && h("MobX requires global '" + e + "' to be available or polyfilled"); +}); +typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ == "object" && __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({ + spy: Za, + extras: { + getDebugName: qt + }, + $mobx: b +}); +const gr = "copilot-conf"; +class ue { + static get sessionConfiguration() { + const t = sessionStorage.getItem(gr); + return t ? JSON.parse(t) : {}; + } + static saveCopilotActivation(t) { + const n = this.sessionConfiguration; + n.active = t, this.persist(n); + } + static getCopilotActivation() { + return this.sessionConfiguration.active; + } + static saveSpotlightActivation(t) { + const n = this.sessionConfiguration; + n.spotlightActive = t, this.persist(n); + } + static getSpotlightActivation() { + return this.sessionConfiguration.spotlightActive; + } + static saveSpotlightPosition(t, n, r, i) { + const o = this.sessionConfiguration; + o.spotlightPosition = { left: t, top: n, right: r, bottom: i }, this.persist(o); + } + static getSpotlightPosition() { + return this.sessionConfiguration.spotlightPosition; + } + static saveDrawerSize(t, n) { + const r = this.sessionConfiguration; + r.drawerSizes = r.drawerSizes ?? {}, r.drawerSizes[t] = n, this.persist(r); + } + static getDrawerSize(t) { + const n = this.sessionConfiguration; + if (n.drawerSizes) + return n.drawerSizes[t]; + } + static savePanelConfigurations(t) { + const n = this.sessionConfiguration; + n.sectionPanelState = t, this.persist(n); + } + static getPanelConfigurations() { + return this.sessionConfiguration.sectionPanelState; + } + static persist(t) { + sessionStorage.setItem(gr, JSON.stringify(t)); + } + static savePrompts(t) { + const n = this.sessionConfiguration; + n.prompts = t, this.persist(n); + } + static getPrompts() { + return this.sessionConfiguration.prompts || []; + } + static saveCurrentSelection(t) { + const n = this.sessionConfiguration; + n.selection = n.selection ?? {}, n.selection && (n.selection.current = t, n.selection.location = window.location.pathname, this.persist(n)); + } + static savePendingSelection(t) { + const n = this.sessionConfiguration; + n.selection = n.selection ?? {}, n.selection && (n.selection.pending = t, n.selection.location = window.location.pathname, this.persist(n)); + } + static getCurrentSelection() { + const t = this.sessionConfiguration.selection; + if (t?.location === window.location.pathname) + return t.current; + } + static getPendingSelection() { + const t = this.sessionConfiguration.selection; + if (t?.location === window.location.pathname) + return t.pending; + } +} +var Xe = /* @__PURE__ */ ((e) => (e.INFORMATION = "information", e.WARNING = "warning", e.ERROR = "error", e))(Xe || {}); +const Ns = Symbol.for("react.portal"), xs = Symbol.for("react.fragment"), _s = Symbol.for("react.strict_mode"), Ps = Symbol.for("react.profiler"), Cs = Symbol.for("react.provider"), Ds = Symbol.for("react.context"), zi = Symbol.for("react.forward_ref"), Rs = Symbol.for("react.suspense"), Ts = Symbol.for("react.suspense_list"), Vs = Symbol.for("react.memo"), Is = Symbol.for("react.lazy"); +function ks(e, t, n) { + const r = e.displayName; + if (r) + return r; + const i = t.displayName || t.name || ""; + return i !== "" ? `${n}(${i})` : n; +} +function br(e) { + return e.displayName || "Context"; +} +function Gt(e) { + if (e == null) + return null; + if (typeof e == "function") + return e.displayName || e.name || null; + if (typeof e == "string") + return e; + switch (e) { + case xs: + return "Fragment"; + case Ns: + return "Portal"; + case Ps: + return "Profiler"; + case _s: + return "StrictMode"; + case Rs: + return "Suspense"; + case Ts: + return "SuspenseList"; + } + if (typeof e == "object") + switch (e.$$typeof) { + case Ds: + return `${br(e)}.Consumer`; + case Cs: + return `${br(e._context)}.Provider`; + case zi: + return ks(e, e.render, "ForwardRef"); + case Vs: + const t = e.displayName || null; + return t !== null ? t : Gt(e.type) || "Memo"; + case Is: { + const n = e, r = n._payload, i = n._init; + try { + return Gt(i(r)); + } catch { + return null; + } + } + } + return null; +} +let _t; +function jc() { + const e = /* @__PURE__ */ new Set(); + return Array.from(document.body.querySelectorAll("*")).flatMap(Us).filter(Ls).filter((n) => !n.fileName.endsWith("frontend/generated/flow/Flow.tsx")).forEach((n) => e.add(n.fileName)), Array.from(e); +} +function Ls(e) { + return !!e && e.fileName; +} +function Ms(e) { + return e?._debugSource || void 0; +} +function js(e) { + if (e && e.type?.__debugSourceDefine) + return e.type.__debugSourceDefine; +} +function Us(e) { + return Ms(Kt(e)); +} +function Bs() { + return `__reactFiber$${Wi()}`; +} +function zs() { + return `__reactContainer$${Wi()}`; +} +function Wi() { + if (!(!_t && (_t = Array.from(document.querySelectorAll("*")).flatMap((e) => Object.keys(e)).filter((e) => e.startsWith("__reactFiber$")).map((e) => e.replace("__reactFiber$", "")).find((e) => e), !_t))) + return _t; +} +function Vt(e) { + const t = e.type; + return t?.$$typeof === zi && !t.displayName && e.child ? Vt(e.child) : Gt(e.type) ?? Gt(e.elementType) ?? "???"; +} +function Ws() { + const e = Array.from(document.querySelectorAll("body > *")).flatMap((n) => n[zs()]).find((n) => n), t = Pe(e); + return Pe(t?.child); +} +function Fs(e) { + const t = []; + let n = Pe(e.child); + for (; n; ) + t.push(n), n = Pe(n.sibling); + return t; +} +function Zs(e) { + return e.hasOwnProperty("entanglements") && e.hasOwnProperty("containerInfo"); +} +function qs(e) { + return e.hasOwnProperty("stateNode") && e.hasOwnProperty("pendingProps"); +} +function Pe(e) { + const t = e?.stateNode; + if (t?.current && (Zs(t) || qs(t))) + return t?.current; + if (!e) + return; + if (!e.alternate) + return e; + const n = e.alternate, r = e?.actualStartTime, i = n?.actualStartTime; + return i !== r && i > r ? n : e; +} +function Kt(e) { + const t = Bs(), n = Pe(e[t]); + if (n?._debugSource) + return n; + let r = n?.return || void 0; + for (; r && !r._debugSource; ) + r = r.return || void 0; + return r; +} +function Ht(e) { + if (e.stateNode?.isConnected === !0) + return e.stateNode; + if (e.child) + return Ht(e.child); +} +function mr(e) { + const t = Ht(e); + return t && Pe(Kt(t)) === e; +} +function Gs(e) { + return typeof e.type != "function" ? !1 : !!(e._debugSource || js(e)); +} +const Zn = async (e, t, n) => window.Vaadin.copilot.comm(e, t, n), Ce = "copilot-", Ks = "24.6.0", Uc = "attention-required", Bc = "https://plugins.jetbrains.com/plugin/23758-vaadin", zc = "https://marketplace.visualstudio.com/items?itemName=vaadin.vaadin-vscode"; +function Wc(e) { + return e === void 0 ? !1 : e.nodeId >= 0; +} +function Hs(e) { + if (e.javaClass) + return e.javaClass.substring(e.javaClass.lastIndexOf(".") + 1); +} +function yr(e) { + const t = window.Vaadin; + if (t && t.Flow) { + const { clients: n } = t.Flow, r = Object.keys(n); + for (const i of r) { + const o = n[i]; + if (o.getNodeId) { + const a = o.getNodeId(e); + if (a >= 0) { + const s = o.getNodeInfo(a); + return { nodeId: a, uiId: o.getUIId(), element: e, javaClass: s.javaClass, styles: s.styles }; + } + } + } + } +} +function Fc() { + const e = window.Vaadin; + let t; + if (e && e.Flow) { + const { clients: n } = e.Flow, r = Object.keys(n); + for (const i of r) { + const o = n[i]; + o.getUIId && (t = o.getUIId()); + } + } + return t; +} +function Zc(e) { + return { + uiId: e.uiId, + nodeId: e.nodeId + }; +} +function Js(e) { + return e ? e.type?.type === "FlowContainer" : !1; +} +function Xs(e) { + return e.localName.startsWith("flow-container"); +} +function Fi(e, t) { + const n = e(); + n ? t(n) : setTimeout(() => Fi(e, t), 50); +} +async function Zi(e) { + const t = e(); + if (t) + return t; + let n; + const r = new Promise((o) => { + n = o; + }), i = setInterval(() => { + const o = e(); + o && (clearInterval(i), n(o)); + }, 10); + return r; +} +function Ys(e) { + return N.box(e, { deep: !1 }); +} +function Qs(e) { + return e && typeof e.lastAccessedBy_ == "number"; +} +function qc(e) { + if (e) { + if (typeof e == "string") + return e; + if (!Qs(e)) + throw new Error(`Expected message to be a string or an observable value but was ${JSON.stringify(e)}`); + return e.get(); + } +} +function qn(e) { + Promise.resolve().then(() => Ul).then(({ showNotification: t }) => { + t(e); + }); +} +function $s() { + qn({ + type: Xe.INFORMATION, + message: "The previous operation is still in progress. Please wait for it to finish." + }); +} +class el { + constructor() { + this.spotlightActive = !1, this.welcomeActive = !1, this.loginCheckActive = !1, this.userInfo = void 0, this.active = !1, this.activatedFrom = null, this.activatedAtLeastOnce = !1, this.operationInProgress = void 0, this.operationWaitsHmrUpdate = void 0, this.operationWaitsHmrUpdateTimeout = void 0, this.idePluginState = void 0, this.notifications = [], this.infoTooltip = null, this.sectionPanelDragging = !1, this.spotlightDragging = !1, this.sectionPanelResizing = !1, this.drawerResizing = !1, this.jdkInfo = void 0, sn(this, { + notifications: N.shallow + }), this.spotlightActive = ue.getSpotlightActivation() ?? !1; + } + setActive(t, n) { + this.active = t, t && (this.activatedAtLeastOnce = !0), this.activatedFrom = n ?? null; + } + setSpotlightActive(t) { + this.spotlightActive = t; + } + setWelcomeActive(t) { + this.welcomeActive = t; + } + setLoginCheckActive(t) { + this.loginCheckActive = t; + } + setUserInfo(t) { + this.userInfo = t; + } + startOperation(t) { + if (this.operationInProgress) + throw new Error(`An ${t} operation is already in progress`); + if (this.operationWaitsHmrUpdate) { + $s(); + return; + } + this.operationInProgress = t; + } + stopOperation(t) { + if (this.operationInProgress) { + if (this.operationInProgress !== t) + return; + } else return; + this.operationInProgress = void 0; + } + setOperationWaitsHmrUpdate(t, n) { + this.operationWaitsHmrUpdate = t, this.operationWaitsHmrUpdateTimeout = n; + } + clearOperationWaitsHmrUpdate() { + this.operationWaitsHmrUpdate = void 0, this.operationWaitsHmrUpdateTimeout = void 0; + } + setIdePluginState(t) { + this.idePluginState = t; + } + setJdkInfo(t) { + this.jdkInfo = t; + } + toggleActive(t) { + this.setActive(!this.active, this.active ? null : t ?? null); + } + reset() { + this.active = !1, this.activatedAtLeastOnce = !1; + } + setNotifications(t) { + this.notifications = t; + } + removeNotification(t) { + t.animatingOut = !0, setTimeout(() => { + this.reallyRemoveNotification(t); + }, 180); + } + reallyRemoveNotification(t) { + const n = this.notifications.indexOf(t); + n > -1 && this.notifications.splice(n, 1); + } + setTooltip(t, n) { + this.infoTooltip = { + text: t, + loader: n + }; + } + clearTooltip() { + this.infoTooltip = null; + } + setSectionPanelDragging(t) { + this.sectionPanelDragging = t; + } + setSpotlightDragging(t) { + this.spotlightDragging = t; + } + setSectionPanelResizing(t) { + this.sectionPanelResizing = t; + } + setDrawerResizing(t) { + this.drawerResizing = t; + } +} +const Gc = (e, t, n) => t >= e.left && t <= e.right && n >= e.top && n <= e.bottom, tl = (e) => { + const t = []; + let n = rl(e); + for (; n; ) + t.push(n), n = n.parentElement; + return t; +}, nl = (e, t) => { + let n = e; + for (; !(n instanceof HTMLElement && n.localName === `${Ce}main`); ) { + if (!n.isConnected) + return null; + if (n.parentNode ? n = n.parentNode : n.host && (n = n.host), n instanceof HTMLElement && n.localName === t) + return n; + } + return null; +}; +function rl(e) { + return e.parentElement ?? e.parentNode?.host; +} +function qe(e) { + return !e || !(e instanceof HTMLElement) ? !1 : [...tl(e), e].map((t) => t.localName).some((t) => t.startsWith(Ce)); +} +function wr(e) { + return e instanceof Element; +} +function Ar(e) { + return e.startsWith("vaadin-") ? e.substring(7).split("-").map((r) => r.charAt(0).toUpperCase() + r.slice(1)).join(" ") : e; +} +function Er(e) { + if (!e) + return; + if (e.id) + return `#${e.id}`; + if (!e.children) + return; + const t = Array.from(e.children).find((r) => r.localName === "label"); + if (t) + return t.outerText.trim(); + const n = Array.from(e.childNodes).find( + (r) => r.nodeType === Node.TEXT_NODE && r.textContent && r.textContent.trim().length > 0 + ); + if (n && n.textContent) + return n.textContent.trim(); +} +var qi = /* @__PURE__ */ ((e) => (e["vaadin-combo-box"] = "vaadin-combo-box", e["vaadin-date-picker"] = "vaadin-date-picker", e["vaadin-dialog"] = "vaadin-dialog", e["vaadin-multi-select-combo-box"] = "vaadin-multi-select-combo-box", e["vaadin-select"] = "vaadin-select", e["vaadin-time-picker"] = "vaadin-time-picker", e["vaadin-popover"] = "vaadin-popover", e))(qi || {}); +const et = { + "vaadin-combo-box": { + hideOnActivation: !0, + open: (e) => Pt(e), + close: (e) => Ct(e) + }, + "vaadin-select": { + hideOnActivation: !0, + open: (e) => { + const t = e; + Ki(t, t._overlayElement), t.opened = !0; + }, + close: (e) => { + const t = e; + Hi(t, t._overlayElement), t.opened = !1; + } + }, + "vaadin-multi-select-combo-box": { + hideOnActivation: !0, + open: (e) => Pt(e.$.comboBox), + close: (e) => { + Ct(e.$.comboBox), e.removeAttribute("focused"); + } + }, + "vaadin-date-picker": { + hideOnActivation: !0, + open: (e) => Pt(e), + close: (e) => Ct(e) + }, + "vaadin-time-picker": { + hideOnActivation: !0, + open: (e) => Pt(e.$.comboBox), + close: (e) => { + Ct(e.$.comboBox), e.removeAttribute("focused"); + } + }, + "vaadin-dialog": { + hideOnActivation: !1 + }, + "vaadin-popover": { + hideOnActivation: !1 + } +}, Gi = (e) => { + e.preventDefault(), e.stopImmediatePropagation(); +}, Pt = (e) => { + e.addEventListener("focusout", Gi, { capture: !0 }), Ki(e), e.opened = !0; +}, Ct = (e) => { + Hi(e), e.removeAttribute("focused"), e.removeEventListener("focusout", Gi, { capture: !0 }), e.opened = !1; +}, Ki = (e, t) => { + const n = t ?? e.$.overlay; + n.__oldModeless = n.modeless, n.modeless = !0; +}, Hi = (e, t) => { + const n = t ?? e.$.overlay; + n.modeless = n.__oldModeless !== void 0 ? n.__oldModeless : n.modeless, delete n.__oldModeless; +}; +class il { + constructor() { + this.openedOverlayOwners = /* @__PURE__ */ new Set(), this.overlayCloseEventListener = (t) => { + qe(t.target?.owner) || (window.Vaadin.copilot._uiState.active || qe(t.detail.sourceEvent.target)) && (t.preventDefault(), t.stopImmediatePropagation()); + }; + } + /** + * Modifies pointer-events property to auto if dialog overlay is present on body element.
+ * Overriding closeOnOutsideClick method in order to keep overlay present while copilot is active + * @private + */ + onCopilotActivation() { + const t = Array.from(document.body.children).find( + (r) => r.localName.startsWith("vaadin") && r.localName.endsWith("-overlay") + ); + if (!t) + return; + const n = this.getOwner(t); + if (n) { + const r = et[n.localName]; + if (!r) + return; + r.hideOnActivation && r.close ? r.close(n) : document.body.style.getPropertyValue("pointer-events") === "none" && document.body.style.removeProperty("pointer-events"); + } + } + /** + * Restores pointer-events state on deactivation.
+ * Closes opened overlays while using copilot. + * @private + */ + onCopilotDeactivation() { + this.openedOverlayOwners.forEach((n) => { + const r = et[n.localName]; + r && r.close && r.close(n); + }), document.body.querySelector("vaadin-dialog-overlay") && document.body.style.setProperty("pointer-events", "none"); + } + getOwner(t) { + const n = t; + return n.owner ?? n.__dataHost; + } + addOverlayOutsideClickEvent() { + document.documentElement.addEventListener("vaadin-overlay-outside-click", this.overlayCloseEventListener, { + capture: !0 + }), document.documentElement.addEventListener("vaadin-overlay-escape-press", this.overlayCloseEventListener, { + capture: !0 + }); + } + removeOverlayOutsideClickEvent() { + document.documentElement.removeEventListener("vaadin-overlay-outside-click", this.overlayCloseEventListener), document.documentElement.removeEventListener("vaadin-overlay-escape-press", this.overlayCloseEventListener); + } + toggle(t) { + const n = et[t.localName]; + this.isOverlayActive(t) ? (n.close(t), this.openedOverlayOwners.delete(t)) : (n.open(t), this.openedOverlayOwners.add(t)); + } + isOverlayActive(t) { + const n = et[t.localName]; + return n.active ? n.active(t) : t.hasAttribute("opened"); + } + overlayStatus(t) { + if (!t) + return { visible: !1 }; + const n = t.localName; + let r = Object.keys(qi).includes(n); + if (!r) + return { visible: !1 }; + const i = et[t.localName]; + i.hasOverlay && (r = i.hasOverlay(t)); + const o = this.isOverlayActive(t); + return { visible: r, active: o }; + } +} +async function Ji() { + return Zi(() => { + const e = window.Vaadin.devTools, t = e?.frontendConnection && e?.frontendConnection.status === "active"; + return e !== void 0 && t && e?.frontendConnection; + }); +} +function fe(e, t) { + Ji().then((n) => n.send(e, t)); +} +class ol { + constructor() { + this.promise = new Promise((t) => { + this.resolveInit = t; + }); + } + done(t) { + this.resolveInit(t); + } +} +class al { + constructor() { + this.dismissedNotifications = [], this.termsSummaryDismissed = !1, this.activationButtonPosition = null, this.paletteState = null, this.activationShortcut = !0, this.activationAnimation = !0, sn(this), this.initializer = new ol(), this.initializer.promise.then(() => { + _i( + () => JSON.stringify(this), + () => { + fe("copilot-set-machine-configuration", { conf: JSON.stringify(Or(this)) }); + } + ); + }), window.Vaadin.copilot.eventbus.on("copilot-machine-configuration", (t) => { + const n = t.detail.conf; + Object.assign(this, Or(n)), this.initializer.done(!0), t.preventDefault(); + }), this.loadData(); + } + loadData() { + fe("copilot-get-machine-configuration", {}); + } + addDismissedNotification(t) { + this.dismissedNotifications.push(t); + } + getDismissedNotifications() { + return this.dismissedNotifications; + } + setTermsSummaryDismissed(t) { + this.termsSummaryDismissed = t; + } + isTermsSummaryDismissed() { + return this.termsSummaryDismissed; + } + getActivationButtonPosition() { + return this.activationButtonPosition; + } + setActivationButtonPosition(t) { + this.activationButtonPosition = t; + } + getPaletteState() { + return this.paletteState; + } + setPaletteState(t) { + this.paletteState = t; + } + isActivationShortcut() { + return this.activationShortcut; + } + setActivationShortcut(t) { + this.activationShortcut = t; + } + isActivationAnimation() { + return this.activationAnimation; + } + setActivationAnimation(t) { + this.activationAnimation = t; + } +} +function Or(e) { + const t = { ...e }; + return delete t.initializer, t; +} +class sl { + constructor() { + this._previewActivated = !1, this._remainingTimeInMillis = -1, this._active = !1, this._configurationLoaded = !1, sn(this); + } + setConfiguration(t) { + this._previewActivated = t.previewActivated, t.previewActivated ? this._remainingTimeInMillis = t.remainingTimeInMillis : this._remainingTimeInMillis = -1, this._active = t.active, this._configurationLoaded = !0; + } + get previewActivated() { + return this._previewActivated; + } + get remainingTimeInMillis() { + return this._remainingTimeInMillis; + } + get active() { + return this._active; + } + get configurationLoaded() { + return this._configurationLoaded; + } + get expired() { + return this.previewActivated && !this.active; + } + reset() { + this._previewActivated = !1, this._active = !1, this._configurationLoaded = !1, this._remainingTimeInMillis = -1; + } + loadPreviewConfiguration() { + Zn(`${Ce}get-preview`, {}, (t) => { + const n = t.data; + this.setConfiguration(n); + }).catch((t) => { + Promise.resolve().then(() => Gl).then((n) => { + n.handleCopilotError("Load preview configuration failed", t); + }); + }); + } +} +class ll { + constructor() { + this._panels = [], this._attentionRequiredPanelTag = null, this._floatingPanelsZIndexOrder = [], this.renderedPanels = /* @__PURE__ */ new Set(), sn(this), this.restorePositions(); + } + shouldRender(t) { + return this.renderedPanels.has(t); + } + restorePositions() { + const t = ue.getPanelConfigurations(); + t && (this._panels = this._panels.map((n) => { + const r = t.find((i) => i.tag === n.tag); + return r && (n = Object.assign(n, { ...r })), n; + })); + } + /** + * Brings a given floating panel to the front. + * + * @param panelTag the tag name of the panel + */ + bringToFront(t) { + this._floatingPanelsZIndexOrder = this._floatingPanelsZIndexOrder.filter((n) => n !== t), this.getPanelByTag(t)?.floating && this._floatingPanelsZIndexOrder.push(t); + } + /** + * Returns the focused z-index of floating panel as following order + *
    + *
  • Returns 50 for last(focused) element
  • + *
  • Returns the index of element in list(starting from 0)
  • + *
  • Returns 0 if panel is not in the list
  • + *
+ * @param panelTag + */ + getFloatingPanelZIndex(t) { + const n = this._floatingPanelsZIndexOrder.findIndex((r) => r === t); + return n === this._floatingPanelsZIndexOrder.length - 1 ? 50 : n === -1 ? 0 : n; + } + get floatingPanelsZIndexOrder() { + return this._floatingPanelsZIndexOrder; + } + get attentionRequiredPanelTag() { + return this._attentionRequiredPanelTag; + } + set attentionRequiredPanelTag(t) { + this._attentionRequiredPanelTag = t; + } + getAttentionRequiredPanelConfiguration() { + return this._panels.find((t) => t.tag === this._attentionRequiredPanelTag); + } + clearAttention() { + this._attentionRequiredPanelTag = null; + } + get panels() { + return this._panels; + } + addPanel(t) { + if (this.getPanelByTag(t.tag)) + return; + this._panels.push(t), this.restorePositions(); + const n = this.getPanelByTag(t.tag); + if (n) + (n.eager || n.expanded) && this.renderedPanels.add(t.tag); + else throw new Error(`Panel configuration not found for tag ${t.tag}`); + } + getPanelByTag(t) { + return this._panels.find((n) => n.tag === t); + } + updatePanel(t, n) { + const r = [...this._panels], i = r.find((o) => o.tag === t); + if (i) { + for (const o in n) + i[o] = n[o]; + i.expanded && this.renderedPanels.add(i.tag), n.floating === !1 && (this._floatingPanelsZIndexOrder = this._floatingPanelsZIndexOrder.filter((o) => o !== t)), this._panels = r, ue.savePanelConfigurations(this._panels); + } + } + updateOrders(t) { + const n = [...this._panels]; + n.forEach((r) => { + const i = t.find((o) => o.tag === r.tag); + i && (r.panelOrder = i.order); + }), this._panels = n, ue.savePanelConfigurations(n); + } + removePanel(t) { + const n = this._panels.findIndex((r) => r.tag === t); + n < 0 || (this._panels.splice(n, 1), ue.savePanelConfigurations(this._panels)); + } +} +window.Vaadin ??= {}; +window.Vaadin.copilot ??= {}; +window.Vaadin.copilot.plugins = []; +window.Vaadin.copilot._uiState = new el(); +window.Vaadin.copilot.eventbus = new Po(); +window.Vaadin.copilot.overlayManager = new il(); +window.Vaadin.copilot._machineState = new al(); +window.Vaadin.copilot._previewState = new sl(); +window.Vaadin.copilot._sectionPanelUiState = new ll(); +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const cl = (e) => (t, n) => { + n !== void 0 ? n.addInitializer(() => { + customElements.define(e, t); + }) : customElements.define(e, t); +}; +/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const It = globalThis, Gn = It.ShadowRoot && (It.ShadyCSS === void 0 || It.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Kn = Symbol(), Sr = /* @__PURE__ */ new WeakMap(); +let Xi = class { + constructor(t, n, r) { + if (this._$cssResult$ = !0, r !== Kn) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); + this.cssText = t, this.t = n; + } + get styleSheet() { + let t = this.o; + const n = this.t; + if (Gn && t === void 0) { + const r = n !== void 0 && n.length === 1; + r && (t = Sr.get(n)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), r && Sr.set(n, t)); + } + return t; + } + toString() { + return this.cssText; + } +}; +const le = (e) => new Xi(typeof e == "string" ? e : e + "", void 0, Kn), ul = (e, ...t) => { + const n = e.length === 1 ? e[0] : t.reduce((r, i, o) => r + ((a) => { + if (a._$cssResult$ === !0) return a.cssText; + if (typeof a == "number") return a; + throw Error("Value passed to 'css' function must be a 'css' function result: " + a + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security."); + })(i) + e[o + 1], e[0]); + return new Xi(n, e, Kn); +}, dl = (e, t) => { + if (Gn) e.adoptedStyleSheets = t.map((n) => n instanceof CSSStyleSheet ? n : n.styleSheet); + else for (const n of t) { + const r = document.createElement("style"), i = It.litNonce; + i !== void 0 && r.setAttribute("nonce", i), r.textContent = n.cssText, e.appendChild(r); + } +}, Nr = Gn ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => { + let n = ""; + for (const r of t.cssRules) n += r.cssText; + return le(n); +})(e) : e; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const { is: fl, defineProperty: hl, getOwnPropertyDescriptor: vl, getOwnPropertyNames: pl, getOwnPropertySymbols: gl, getPrototypeOf: bl } = Object, cn = globalThis, xr = cn.trustedTypes, ml = xr ? xr.emptyScript : "", yl = cn.reactiveElementPolyfillSupport, lt = (e, t) => e, Rn = { toAttribute(e, t) { + switch (t) { + case Boolean: + e = e ? ml : null; + break; + case Object: + case Array: + e = e == null ? e : JSON.stringify(e); + } + return e; +}, fromAttribute(e, t) { + let n = e; + switch (t) { + case Boolean: + n = e !== null; + break; + case Number: + n = e === null ? null : Number(e); + break; + case Object: + case Array: + try { + n = JSON.parse(e); + } catch { + n = null; + } + } + return n; +} }, Yi = (e, t) => !fl(e, t), _r = { attribute: !0, type: String, converter: Rn, reflect: !1, hasChanged: Yi }; +Symbol.metadata ??= Symbol("metadata"), cn.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap(); +let je = class extends HTMLElement { + static addInitializer(t) { + this._$Ei(), (this.l ??= []).push(t); + } + static get observedAttributes() { + return this.finalize(), this._$Eh && [...this._$Eh.keys()]; + } + static createProperty(t, n = _r) { + if (n.state && (n.attribute = !1), this._$Ei(), this.elementProperties.set(t, n), !n.noAccessor) { + const r = Symbol(), i = this.getPropertyDescriptor(t, r, n); + i !== void 0 && hl(this.prototype, t, i); + } + } + static getPropertyDescriptor(t, n, r) { + const { get: i, set: o } = vl(this.prototype, t) ?? { get() { + return this[n]; + }, set(a) { + this[n] = a; + } }; + return { get() { + return i?.call(this); + }, set(a) { + const s = i?.call(this); + o.call(this, a), this.requestUpdate(t, s, r); + }, configurable: !0, enumerable: !0 }; + } + static getPropertyOptions(t) { + return this.elementProperties.get(t) ?? _r; + } + static _$Ei() { + if (this.hasOwnProperty(lt("elementProperties"))) return; + const t = bl(this); + t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties); + } + static finalize() { + if (this.hasOwnProperty(lt("finalized"))) return; + if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(lt("properties"))) { + const n = this.properties, r = [...pl(n), ...gl(n)]; + for (const i of r) this.createProperty(i, n[i]); + } + const t = this[Symbol.metadata]; + if (t !== null) { + const n = litPropertyMetadata.get(t); + if (n !== void 0) for (const [r, i] of n) this.elementProperties.set(r, i); + } + this._$Eh = /* @__PURE__ */ new Map(); + for (const [n, r] of this.elementProperties) { + const i = this._$Eu(n, r); + i !== void 0 && this._$Eh.set(i, n); + } + this.elementStyles = this.finalizeStyles(this.styles); + } + static finalizeStyles(t) { + const n = []; + if (Array.isArray(t)) { + const r = new Set(t.flat(1 / 0).reverse()); + for (const i of r) n.unshift(Nr(i)); + } else t !== void 0 && n.push(Nr(t)); + return n; + } + static _$Eu(t, n) { + const r = n.attribute; + return r === !1 ? void 0 : typeof r == "string" ? r : typeof t == "string" ? t.toLowerCase() : void 0; + } + constructor() { + super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev(); + } + _$Ev() { + this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t) => t(this)); + } + addController(t) { + (this._$EO ??= /* @__PURE__ */ new Set()).add(t), this.renderRoot !== void 0 && this.isConnected && t.hostConnected?.(); + } + removeController(t) { + this._$EO?.delete(t); + } + _$E_() { + const t = /* @__PURE__ */ new Map(), n = this.constructor.elementProperties; + for (const r of n.keys()) this.hasOwnProperty(r) && (t.set(r, this[r]), delete this[r]); + t.size > 0 && (this._$Ep = t); + } + createRenderRoot() { + const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions); + return dl(t, this.constructor.elementStyles), t; + } + connectedCallback() { + this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((t) => t.hostConnected?.()); + } + enableUpdating(t) { + } + disconnectedCallback() { + this._$EO?.forEach((t) => t.hostDisconnected?.()); + } + attributeChangedCallback(t, n, r) { + this._$AK(t, r); + } + _$EC(t, n) { + const r = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, r); + if (i !== void 0 && r.reflect === !0) { + const o = (r.converter?.toAttribute !== void 0 ? r.converter : Rn).toAttribute(n, r.type); + this._$Em = t, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$Em = null; + } + } + _$AK(t, n) { + const r = this.constructor, i = r._$Eh.get(t); + if (i !== void 0 && this._$Em !== i) { + const o = r.getPropertyOptions(i), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : Rn; + this._$Em = i, this[i] = a.fromAttribute(n, o.type), this._$Em = null; + } + } + requestUpdate(t, n, r) { + if (t !== void 0) { + if (r ??= this.constructor.getPropertyOptions(t), !(r.hasChanged ?? Yi)(this[t], n)) return; + this.P(t, n, r); + } + this.isUpdatePending === !1 && (this._$ES = this._$ET()); + } + P(t, n, r) { + this._$AL.has(t) || this._$AL.set(t, n), r.reflect === !0 && this._$Em !== t && (this._$Ej ??= /* @__PURE__ */ new Set()).add(t); + } + async _$ET() { + this.isUpdatePending = !0; + try { + await this._$ES; + } catch (n) { + Promise.reject(n); + } + const t = this.scheduleUpdate(); + return t != null && await t, !this.isUpdatePending; + } + scheduleUpdate() { + return this.performUpdate(); + } + performUpdate() { + if (!this.isUpdatePending) return; + if (!this.hasUpdated) { + if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) { + for (const [i, o] of this._$Ep) this[i] = o; + this._$Ep = void 0; + } + const r = this.constructor.elementProperties; + if (r.size > 0) for (const [i, o] of r) o.wrapped !== !0 || this._$AL.has(i) || this[i] === void 0 || this.P(i, this[i], o); + } + let t = !1; + const n = this._$AL; + try { + t = this.shouldUpdate(n), t ? (this.willUpdate(n), this._$EO?.forEach((r) => r.hostUpdate?.()), this.update(n)) : this._$EU(); + } catch (r) { + throw t = !1, this._$EU(), r; + } + t && this._$AE(n); + } + willUpdate(t) { + } + _$AE(t) { + this._$EO?.forEach((n) => n.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t); + } + _$EU() { + this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1; + } + get updateComplete() { + return this.getUpdateComplete(); + } + getUpdateComplete() { + return this._$ES; + } + shouldUpdate(t) { + return !0; + } + update(t) { + this._$Ej &&= this._$Ej.forEach((n) => this._$EC(n, this[n])), this._$EU(); + } + updated(t) { + } + firstUpdated(t) { + } +}; +je.elementStyles = [], je.shadowRootOptions = { mode: "open" }, je[lt("elementProperties")] = /* @__PURE__ */ new Map(), je[lt("finalized")] = /* @__PURE__ */ new Map(), yl?.({ ReactiveElement: je }), (cn.reactiveElementVersions ??= []).push("2.0.4"); +const Me = Symbol("LitMobxRenderReaction"), Pr = Symbol("LitMobxRequestUpdate"); +function wl(e, t) { + var n, r; + return r = class extends e { + constructor() { + super(...arguments), this[n] = () => { + this.requestUpdate(); + }; + } + connectedCallback() { + super.connectedCallback(); + const o = this.constructor.name || this.nodeName; + this[Me] = new t(`${o}.update()`, this[Pr]), this.hasUpdated && this.requestUpdate(); + } + disconnectedCallback() { + super.disconnectedCallback(), this[Me] && (this[Me].dispose(), this[Me] = void 0); + } + update(o) { + this[Me] ? this[Me].track(super.update.bind(this, o)) : super.update(o); + } + }, n = Pr, r; +} +function Al(e) { + return wl(e, ee); +} +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const Hn = globalThis, Jt = Hn.trustedTypes, Cr = Jt ? Jt.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Jn = "$lit$", ie = `lit$${Math.random().toFixed(9).slice(2)}$`, Xn = "?" + ie, El = `<${Xn}>`, De = document, gt = () => De.createComment(""), bt = (e) => e === null || typeof e != "object" && typeof e != "function", Yn = Array.isArray, Qi = (e) => Yn(e) || typeof e?.[Symbol.iterator] == "function", bn = `[ +\f\r]`, tt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Dr = /-->/g, Rr = />/g, me = RegExp(`>|${bn}(?:([^\\s"'>=/]+)(${bn}*=${bn}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`, "g"), Tr = /'/g, Vr = /"/g, $i = /^(?:script|style|textarea|title)$/i, eo = (e) => (t, ...n) => ({ _$litType$: e, strings: t, values: n }), ct = eo(1), Xc = eo(2), he = Symbol.for("lit-noChange"), O = Symbol.for("lit-nothing"), Ir = /* @__PURE__ */ new WeakMap(), Ee = De.createTreeWalker(De, 129); +function to(e, t) { + if (!Yn(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array"); + return Cr !== void 0 ? Cr.createHTML(t) : t; +} +const no = (e, t) => { + const n = e.length - 1, r = []; + let i, o = t === 2 ? "" : t === 3 ? "" : "", a = tt; + for (let s = 0; s < n; s++) { + const l = e[s]; + let c, u, d = -1, v = 0; + for (; v < l.length && (a.lastIndex = v, u = a.exec(l), u !== null); ) v = a.lastIndex, a === tt ? u[1] === "!--" ? a = Dr : u[1] !== void 0 ? a = Rr : u[2] !== void 0 ? ($i.test(u[2]) && (i = RegExp("" ? (a = i ?? tt, d = -1) : u[1] === void 0 ? d = -2 : (d = a.lastIndex - u[2].length, c = u[1], a = u[3] === void 0 ? me : u[3] === '"' ? Vr : Tr) : a === Vr || a === Tr ? a = me : a === Dr || a === Rr ? a = tt : (a = me, i = void 0); + const g = a === me && e[s + 1].startsWith("/>") ? " " : ""; + o += a === tt ? l + El : d >= 0 ? (r.push(c), l.slice(0, d) + Jn + l.slice(d) + ie + g) : l + ie + (d === -2 ? s : g); + } + return [to(e, o + (e[n] || "") + (t === 2 ? "" : t === 3 ? "" : "")), r]; +}; +class mt { + constructor({ strings: t, _$litType$: n }, r) { + let i; + this.parts = []; + let o = 0, a = 0; + const s = t.length - 1, l = this.parts, [c, u] = no(t, n); + if (this.el = mt.createElement(c, r), Ee.currentNode = this.el.content, n === 2 || n === 3) { + const d = this.el.content.firstChild; + d.replaceWith(...d.childNodes); + } + for (; (i = Ee.nextNode()) !== null && l.length < s; ) { + if (i.nodeType === 1) { + if (i.hasAttributes()) for (const d of i.getAttributeNames()) if (d.endsWith(Jn)) { + const v = u[a++], g = i.getAttribute(d).split(ie), m = /([.?@])?(.*)/.exec(v); + l.push({ type: 1, index: o, name: m[2], strings: g, ctor: m[1] === "." ? io : m[1] === "?" ? oo : m[1] === "@" ? ao : St }), i.removeAttribute(d); + } else d.startsWith(ie) && (l.push({ type: 6, index: o }), i.removeAttribute(d)); + if ($i.test(i.tagName)) { + const d = i.textContent.split(ie), v = d.length - 1; + if (v > 0) { + i.textContent = Jt ? Jt.emptyScript : ""; + for (let g = 0; g < v; g++) i.append(d[g], gt()), Ee.nextNode(), l.push({ type: 2, index: ++o }); + i.append(d[v], gt()); + } + } + } else if (i.nodeType === 8) if (i.data === Xn) l.push({ type: 2, index: o }); + else { + let d = -1; + for (; (d = i.data.indexOf(ie, d + 1)) !== -1; ) l.push({ type: 7, index: o }), d += ie.length - 1; + } + o++; + } + } + static createElement(t, n) { + const r = De.createElement("template"); + return r.innerHTML = t, r; + } +} +function Re(e, t, n = e, r) { + if (t === he) return t; + let i = r !== void 0 ? n._$Co?.[r] : n._$Cl; + const o = bt(t) ? void 0 : t._$litDirective$; + return i?.constructor !== o && (i?._$AO?.(!1), o === void 0 ? i = void 0 : (i = new o(e), i._$AT(e, n, r)), r !== void 0 ? (n._$Co ??= [])[r] = i : n._$Cl = i), i !== void 0 && (t = Re(e, i._$AS(e, t.values), i, r)), t; +} +let ro = class { + constructor(t, n) { + this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = n; + } + get parentNode() { + return this._$AM.parentNode; + } + get _$AU() { + return this._$AM._$AU; + } + u(t) { + const { el: { content: n }, parts: r } = this._$AD, i = (t?.creationScope ?? De).importNode(n, !0); + Ee.currentNode = i; + let o = Ee.nextNode(), a = 0, s = 0, l = r[0]; + for (; l !== void 0; ) { + if (a === l.index) { + let c; + l.type === 2 ? c = new Ye(o, o.nextSibling, this, t) : l.type === 1 ? c = new l.ctor(o, l.name, l.strings, this, t) : l.type === 6 && (c = new so(o, this, t)), this._$AV.push(c), l = r[++s]; + } + a !== l?.index && (o = Ee.nextNode(), a++); + } + return Ee.currentNode = De, i; + } + p(t) { + let n = 0; + for (const r of this._$AV) r !== void 0 && (r.strings !== void 0 ? (r._$AI(t, r, n), n += r.strings.length - 2) : r._$AI(t[n])), n++; + } +}; +class Ye { + get _$AU() { + return this._$AM?._$AU ?? this._$Cv; + } + constructor(t, n, r, i) { + this.type = 2, this._$AH = O, this._$AN = void 0, this._$AA = t, this._$AB = n, this._$AM = r, this.options = i, this._$Cv = i?.isConnected ?? !0; + } + get parentNode() { + let t = this._$AA.parentNode; + const n = this._$AM; + return n !== void 0 && t?.nodeType === 11 && (t = n.parentNode), t; + } + get startNode() { + return this._$AA; + } + get endNode() { + return this._$AB; + } + _$AI(t, n = this) { + t = Re(this, t, n), bt(t) ? t === O || t == null || t === "" ? (this._$AH !== O && this._$AR(), this._$AH = O) : t !== this._$AH && t !== he && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Qi(t) ? this.k(t) : this._(t); + } + O(t) { + return this._$AA.parentNode.insertBefore(t, this._$AB); + } + T(t) { + this._$AH !== t && (this._$AR(), this._$AH = this.O(t)); + } + _(t) { + this._$AH !== O && bt(this._$AH) ? this._$AA.nextSibling.data = t : this.T(De.createTextNode(t)), this._$AH = t; + } + $(t) { + const { values: n, _$litType$: r } = t, i = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = mt.createElement(to(r.h, r.h[0]), this.options)), r); + if (this._$AH?._$AD === i) this._$AH.p(n); + else { + const o = new ro(i, this), a = o.u(this.options); + o.p(n), this.T(a), this._$AH = o; + } + } + _$AC(t) { + let n = Ir.get(t.strings); + return n === void 0 && Ir.set(t.strings, n = new mt(t)), n; + } + k(t) { + Yn(this._$AH) || (this._$AH = [], this._$AR()); + const n = this._$AH; + let r, i = 0; + for (const o of t) i === n.length ? n.push(r = new Ye(this.O(gt()), this.O(gt()), this, this.options)) : r = n[i], r._$AI(o), i++; + i < n.length && (this._$AR(r && r._$AB.nextSibling, i), n.length = i); + } + _$AR(t = this._$AA.nextSibling, n) { + for (this._$AP?.(!1, !0, n); t && t !== this._$AB; ) { + const r = t.nextSibling; + t.remove(), t = r; + } + } + setConnected(t) { + this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t)); + } +} +class St { + get tagName() { + return this.element.tagName; + } + get _$AU() { + return this._$AM._$AU; + } + constructor(t, n, r, i, o) { + this.type = 1, this._$AH = O, this._$AN = void 0, this.element = t, this.name = n, this._$AM = i, this.options = o, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = O; + } + _$AI(t, n = this, r, i) { + const o = this.strings; + let a = !1; + if (o === void 0) t = Re(this, t, n, 0), a = !bt(t) || t !== this._$AH && t !== he, a && (this._$AH = t); + else { + const s = t; + let l, c; + for (t = o[0], l = 0; l < o.length - 1; l++) c = Re(this, s[r + l], n, l), c === he && (c = this._$AH[l]), a ||= !bt(c) || c !== this._$AH[l], c === O ? t = O : t !== O && (t += (c ?? "") + o[l + 1]), this._$AH[l] = c; + } + a && !i && this.j(t); + } + j(t) { + t === O ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? ""); + } +} +class io extends St { + constructor() { + super(...arguments), this.type = 3; + } + j(t) { + this.element[this.name] = t === O ? void 0 : t; + } +} +class oo extends St { + constructor() { + super(...arguments), this.type = 4; + } + j(t) { + this.element.toggleAttribute(this.name, !!t && t !== O); + } +} +class ao extends St { + constructor(t, n, r, i, o) { + super(t, n, r, i, o), this.type = 5; + } + _$AI(t, n = this) { + if ((t = Re(this, t, n, 0) ?? O) === he) return; + const r = this._$AH, i = t === O && r !== O || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, o = t !== O && (r === O || i); + i && this.element.removeEventListener(this.name, this, r), o && this.element.addEventListener(this.name, this, t), this._$AH = t; + } + handleEvent(t) { + typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t); + } +} +class so { + constructor(t, n, r) { + this.element = t, this.type = 6, this._$AN = void 0, this._$AM = n, this.options = r; + } + get _$AU() { + return this._$AM._$AU; + } + _$AI(t) { + Re(this, t); + } +} +const Ol = { M: Jn, P: ie, A: Xn, C: 1, L: no, R: ro, D: Qi, V: Re, I: Ye, H: St, N: oo, U: ao, B: io, F: so }, Sl = Hn.litHtmlPolyfillSupport; +Sl?.(mt, Ye), (Hn.litHtmlVersions ??= []).push("3.2.1"); +const Nl = (e, t, n) => { + const r = n?.renderBefore ?? t; + let i = r._$litPart$; + if (i === void 0) { + const o = n?.renderBefore ?? null; + r._$litPart$ = i = new Ye(t.insertBefore(gt(), o), o, void 0, n ?? {}); + } + return i._$AI(e), i; +}; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +let ut = class extends je { + constructor() { + super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0; + } + createRenderRoot() { + const t = super.createRenderRoot(); + return this.renderOptions.renderBefore ??= t.firstChild, t; + } + update(t) { + const n = this.render(); + this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Nl(n, this.renderRoot, this.renderOptions); + } + connectedCallback() { + super.connectedCallback(), this._$Do?.setConnected(!0); + } + disconnectedCallback() { + super.disconnectedCallback(), this._$Do?.setConnected(!1); + } + render() { + return he; + } +}; +ut._$litElement$ = !0, ut.finalized = !0, globalThis.litElementHydrateSupport?.({ LitElement: ut }); +const xl = globalThis.litElementPolyfillSupport; +xl?.({ LitElement: ut }); +(globalThis.litElementVersions ??= []).push("4.1.1"); +class _l extends Al(ut) { +} +class Pl extends _l { + constructor() { + super(...arguments), this.disposers = []; + } + /** + * Creates a MobX reaction using the given parameters and disposes it when this element is detached. + * + * This should be called from `connectedCallback` to ensure that the reaction is active also if the element is attached again later. + */ + reaction(t, n, r) { + this.disposers.push(_i(t, n, r)); + } + /** + * Creates a MobX autorun using the given parameters and disposes it when this element is detached. + * + * This should be called from `connectedCallback` to ensure that the reaction is active also if the element is attached again later. + */ + autorun(t, n) { + this.disposers.push(Ni(t, n)); + } + disconnectedCallback() { + super.disconnectedCallback(), this.disposers.forEach((t) => { + t(); + }), this.disposers = []; + } +} +const $ = window.Vaadin.copilot._sectionPanelUiState; +if (!$) + throw new Error("Tried to access copilot section panel ui state before it was initialized."); +let we = []; +const kr = []; +function Lr(e) { + e.init({ + addPanel: (t) => { + $.addPanel(t); + }, + send(t, n) { + fe(t, n); + } + }); +} +function Cl() { + we.push(import("./copilot-log-plugin-Dd9Vu3DN.js")), we.push(import("./copilot-info-plugin-DEhoYnCY.js")), we.push(import("./copilot-features-plugin-DArMO9Mk.js")), we.push(import("./copilot-feedback-plugin-B550SpdM.js")), we.push(import("./copilot-shortcuts-plugin-Chva6DtS.js")); +} +function Dl() { + { + const e = `https://cdn.vaadin.com/copilot/${Ks}/copilot-plugins.js`; + import( + /* @vite-ignore */ + e + ).catch((t) => { + console.warn(`Unable to load plugins from ${e}. Some Copilot features are unavailable.`, t); + }); + } +} +function Rl() { + Promise.all(we).then(() => { + const e = window.Vaadin; + if (e.copilot.plugins) { + const t = e.copilot.plugins; + e.copilot.plugins.push = (n) => Lr(n), Array.from(t).forEach((n) => { + kr.includes(n) || (Lr(n), kr.push(n)); + }); + } + }), we = []; +} +function $c(e) { + return Object.assign({ + expanded: !0, + expandable: !1, + panelOrder: 0, + floating: !1, + width: 500, + height: 500, + floatingPosition: { + top: 50, + left: 350 + } + }, e); +} +class Tl { + constructor() { + this.active = !1, this.activate = () => { + this.active = !0, this.blurActiveApplicationElement(); + }, this.deactivate = () => { + this.active = !1; + }, this.focusInEventListener = (t) => { + this.active && (t.preventDefault(), t.stopPropagation(), qe(t.target) || requestAnimationFrame(() => { + t.target.blur && t.target.blur(), document.body.querySelector("copilot-main")?.focus(); + })); + }; + } + hostConnectedCallback() { + const t = this.getApplicationRootElement(); + t && t instanceof HTMLElement && t.addEventListener("focusin", this.focusInEventListener); + } + hostDisconnectedCallback() { + const t = this.getApplicationRootElement(); + t && t instanceof HTMLElement && t.removeEventListener("focusin", this.focusInEventListener); + } + getApplicationRootElement() { + return document.body.firstElementChild; + } + blurActiveApplicationElement() { + document.activeElement && document.activeElement.blur && document.activeElement.blur(); + } +} +const Dt = new Tl(), E = window.Vaadin.copilot.eventbus; +if (!E) + throw new Error("Tried to access copilot eventbus before it was initialized."); +const nt = window.Vaadin.copilot.overlayManager, eu = { + AddClickListener: "Add Click Listener", + AI: "AI", + Delete: "Delete", + DragAndDrop: "Drag and Drop", + Duplicate: "Duplicate", + SetLabel: "Set label", + SetText: "Set text", + SetHelper: "Set helper text", + WrapWithTag: "Wrapping with tag", + Alignment: "Alignment", + Padding: "Padding", + ModifyComponentSource: "Modify component source", + Gap: "Gap", + RedoUndo: "Redo/Undo", + Sizing: "Sizing", + ConnectToService: "ConnectToService" +}, p = window.Vaadin.copilot._uiState; +if (!p) + throw new Error("Tried to access copilot ui state before it was initialized."); +const Vl = () => { + fe("copilot-browser-info", { + userAgent: navigator.userAgent, + locale: navigator.language, + timezone: Intl.DateTimeFormat().resolvedOptions().timeZone + }); +}, un = (e, t) => { + fe("copilot-track-event", { event: e, properties: t }); +}, tu = (e, t) => { + un(e, { ...t, view: "react" }); +}, nu = (e, t) => { + un(e, { ...t, view: "flow" }); +}; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const lo = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, co = (e) => (...t) => ({ _$litDirective$: e, values: t }); +class uo { + constructor(t) { + } + get _$AU() { + return this._$AM._$AU; + } + _$AT(t, n, r) { + this._$Ct = t, this._$AM = n, this._$Ci = r; + } + _$AS(t, n) { + return this.update(t, n); + } + update(t, n) { + return this.render(...n); + } +} +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +class Tn extends uo { + constructor(t) { + if (super(t), this.it = O, t.type !== lo.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings"); + } + render(t) { + if (t === O || t == null) return this._t = void 0, this.it = t; + if (t === he) return t; + if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value"); + if (t === this.it) return this._t; + this.it = t; + const n = [t]; + return n.raw = n, this._t = { _$litType$: this.constructor.resultType, strings: n, values: [] }; + } +} +Tn.directiveName = "unsafeHTML", Tn.resultType = 1; +const Il = co(Tn), dn = window.Vaadin.copilot._machineState; +if (!dn) + throw new Error("Trying to use stored machine state before it was initialized"); +const kl = 5e3; +let Mr = 1; +function fo(e) { + p.notifications.includes(e) && (e.dontShowAgain && e.dismissId && Ll(e.dismissId), p.removeNotification(e), E.emit("notification-dismissed", e)); +} +function ho(e) { + return dn.getDismissedNotifications().includes(e); +} +function Ll(e) { + ho(e) || dn.addDismissedNotification(e); +} +function Ml(e) { + return !(e.dismissId && (ho(e.dismissId) || p.notifications.find((t) => t.dismissId === e.dismissId))); +} +function vo(e) { + Ml(e) && jl(e); +} +function jl(e) { + const t = Mr; + Mr += 1; + const n = { ...e, id: t, dontShowAgain: !1, animatingOut: !1 }; + p.setNotifications([...p.notifications, n]), (e.delay || !e.link && !e.dismissId) && setTimeout(() => { + fo(n); + }, e.delay ?? kl), E.emit("notification-shown", e); +} +const Ul = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + dismissNotification: fo, + showNotification: vo +}, Symbol.toStringTag, { value: "Module" })), Bl = (e) => { + Te("Unspecified error", e), E.emit("vite-after-update", {}); +}, zl = (e, t) => e.error ? (Wl({ + error: e.error, + message: e.errorMessage, + stackTrace: e.errorStacktrace, + requestData: t +}), !0) : !1, po = (e, t, n, r) => { + qn({ + type: Xe.ERROR, + message: e, + details: Ys( + ct`
+ ${Il(t)} + +
` + ), + delay: 3e4 + }), p.userInfo?.copilotProjectCannotLeaveLocalhost !== !0 && E.emit("system-info-with-callback", { + callback: (i) => E.send("copilot-error", { + message: e, + details: String(n).replace(" ", ` +`) + (r ? ` + +Request: +${JSON.stringify(r)} +` : ""), + versions: i + }), + notify: !1 + }), p.clearOperationWaitsHmrUpdate(); +}, Wl = (e) => { + po(e.error, e.message, e.stackTrace, e.requestData); +}; +function Fl(e, t) { + po(e, t.message, t.stack || ""); +} +function Te(e, t) { + qn({ + type: Xe.ERROR, + message: "Copilot internal error", + details: e + (t ? ` +${t}` : "") + }), E.emit("system-info-with-callback", { + callback: (n) => E.send("copilot-error", { + message: `Copilot internal error: ${e}`, + details: t?.stack ?? t ?? "", + versions: n + }), + notify: !1 + }); +} +function jr(e) { + return e?.stack?.includes("cdn.vaadin.com/copilot") || e?.stack?.includes("/copilot/copilot/") || e?.stack?.includes("/copilot/copilot-private/"); +} +function go() { + const e = window.onerror; + window.onerror = (t, n, r, i, o) => { + if (jr(o)) { + Te(t.toString(), o); + return; + } + e && e(t, n, r, i, o); + }, Ba((t) => { + jr(t) && Te("", t); + }), mo((t) => bo.push(t)); +} +const bo = []; +function mo(e) { + const t = window.Vaadin.ConsoleErrors; + window.Vaadin.ConsoleErrors = { + push: (n) => { + Ja(() => { + $.attentionRequiredPanelTag = "copilot-log-panel"; + }), n[0].type !== void 0 && n[0].message !== void 0 ? e({ + type: n[0].type, + message: n[0].message, + internal: !!n[0].internal, + details: n[0].details, + link: n[0].link + }) : e({ type: Xe.ERROR, message: n.map((r) => Zl(r)).join(" "), internal: !1 }), t.push(n); + } + }; +} +function Zl(e) { + return e.message ? e.message.toString() : e.toString(); +} +function ql(e) { + vo({ + type: Xe.ERROR, + message: `Unable to ${e}`, + details: "Could not find sources for React components, probably because the project is not a React (or Flow) project" + }); +} +const Gl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + catchErrors: mo, + consoleErrorsQueue: bo, + handleBrowserOperationError: Fl, + handleCopilotError: Te, + handleErrorDuringOperation: Bl, + handleServerOperationErrorIfNeeded: zl, + installErrorHandlers: go, + showNotReactFlowProject: ql +}, Symbol.toStringTag, { value: "Module" })), yo = window.Vaadin.copilot._previewState; +if (!yo) + throw new Error("Tried to access copilot preview state before it was initialized."); +const wo = () => { + Kl().then((e) => p.setUserInfo(e)).catch((e) => Te("Failed to load userInfo", e)); +}, Kl = async () => Zn(`${Ce}get-user-info`, {}, (e) => (delete e.data.reqId, e.data)), Hl = async () => Zi(() => p.userInfo), ru = async () => (await Hl()).vaadiner; +E.on("copilot-prokey-received", (e) => { + wo(), e.preventDefault(); +}); +function Jl() { + const e = window.navigator.userAgent; + return e.indexOf("Windows") !== -1 ? "Windows" : e.indexOf("Mac") !== -1 ? "Mac" : e.indexOf("Linux") !== -1 ? "Linux" : null; +} +function Xl() { + return Jl() === "Mac"; +} +function Yl() { + return Xl() ? "⌘" : "Ctrl"; +} +function Ql(e) { + return e.composed && e.composedPath().map((t) => t.localName).some((t) => t === "copilot-spotlight"); +} +function $l(e) { + return e.composed && e.composedPath().map((t) => t.localName).some((t) => t === "copilot-drawer-panel" || t === "copilot-section-panel-wrapper"); +} +let mn = !1, rt = 0; +const Ur = (e) => { + if (dn.isActivationShortcut()) + if (e.key === "Shift" && !e.ctrlKey && !e.altKey && !e.metaKey) + mn = !0; + else if (mn && e.shiftKey && (e.key === "Control" || e.key === "Meta")) { + if (rt++, rt === 2) { + p.toggleActive("shortcut"), rt = 0; + return; + } + setTimeout(() => { + rt = 0; + }, 500); + } else + mn = !1, rt = 0; + p.active && ec(e); +}, ec = (e) => { + const t = Ql(e); + if (e.shiftKey && e.code === "Space") + p.setSpotlightActive(!p.spotlightActive), e.stopPropagation(), e.preventDefault(); + else if (e.key === "Escape") { + if (e.stopPropagation(), p.loginCheckActive) { + p.setLoginCheckActive(!1); + return; + } + E.emit("close-drawers", {}), p.setSpotlightActive(!1); + } else !$l(e) && !t && tc(e) ? (E.emit("delete-selected", {}), e.preventDefault(), e.stopPropagation()) : (e.ctrlKey || e.metaKey) && e.key === "d" && !t ? (E.emit("duplicate-selected", {}), e.preventDefault(), e.stopPropagation()) : (e.ctrlKey || e.metaKey) && e.key === "b" && !t ? (E.emit("show-selected-in-ide", {}), e.preventDefault(), e.stopPropagation()) : (e.ctrlKey || e.metaKey) && e.key === "z" ? p.idePluginState?.supportedActions?.find((n) => n === "undo") && (E.emit("undoRedo", { undo: !e.shiftKey }), e.preventDefault(), e.stopPropagation()) : qe(e.target) && E.emit("keyboard-event", { event: e }); +}, tc = (e) => (e.key === "Backspace" || e.key === "Delete") && !e.shiftKey && !e.ctrlKey && !e.altKey && !e.metaKey, se = Yl(), iu = { + toggleCopilot: ` + ${se} ${se}`, + toggleCommandWindow: " + Space", + undo: `${se} + Z`, + redo: `${se} + + Z`, + duplicate: `${se} + D`, + goToSource: `${se} + B`, + selectParent: "", + selectPreviousSibling: "", + selectNextSibling: "", + delete: "DEL", + copy: `${se} + C`, + paste: `${se} + V` +}; +/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const Ao = Symbol.for(""), nc = (e) => { + if (e?.r === Ao) return e?._$litStatic$; +}, Eo = (e) => ({ _$litStatic$: e, r: Ao }), Br = /* @__PURE__ */ new Map(), rc = (e) => (t, ...n) => { + const r = n.length; + let i, o; + const a = [], s = []; + let l, c = 0, u = !1; + for (; c < r; ) { + for (l = t[c]; c < r && (o = n[c], (i = nc(o)) !== void 0); ) l += i + t[++c], u = !0; + c !== r && s.push(o), a.push(l), c++; + } + if (c === r && a.push(t[r]), u) { + const d = a.join("$$lit$$"); + (t = Br.get(d)) === void 0 && (a.raw = a, Br.set(d, t = a)), n = s; + } + return e(t, ...n); +}, dt = rc(ct); +/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const { I: ic } = Ol, zr = () => document.createComment(""), it = (e, t, n) => { + const r = e._$AA.parentNode, i = t === void 0 ? e._$AB : t._$AA; + if (n === void 0) { + const o = r.insertBefore(zr(), i), a = r.insertBefore(zr(), i); + n = new ic(o, a, e, e.options); + } else { + const o = n._$AB.nextSibling, a = n._$AM, s = a !== e; + if (s) { + let l; + n._$AQ?.(e), n._$AM = e, n._$AP !== void 0 && (l = e._$AU) !== a._$AU && n._$AP(l); + } + if (o !== i || s) { + let l = n._$AA; + for (; l !== o; ) { + const c = l.nextSibling; + r.insertBefore(l, i), l = c; + } + } + } + return n; +}, ye = (e, t, n = e) => (e._$AI(t, n), e), oc = {}, ac = (e, t = oc) => e._$AH = t, sc = (e) => e._$AH, yn = (e) => { + e._$AP?.(!1, !0); + let t = e._$AA; + const n = e._$AB.nextSibling; + for (; t !== n; ) { + const r = t.nextSibling; + t.remove(), t = r; + } +}; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const Wr = (e, t, n) => { + const r = /* @__PURE__ */ new Map(); + for (let i = t; i <= n; i++) r.set(e[i], i); + return r; +}, Oo = co(class extends uo { + constructor(e) { + if (super(e), e.type !== lo.CHILD) throw Error("repeat() can only be used in text expressions"); + } + dt(e, t, n) { + let r; + n === void 0 ? n = t : t !== void 0 && (r = t); + const i = [], o = []; + let a = 0; + for (const s of e) i[a] = r ? r(s, a) : a, o[a] = n(s, a), a++; + return { values: o, keys: i }; + } + render(e, t, n) { + return this.dt(e, t, n).values; + } + update(e, [t, n, r]) { + const i = sc(e), { values: o, keys: a } = this.dt(t, n, r); + if (!Array.isArray(i)) return this.ut = a, o; + const s = this.ut ??= [], l = []; + let c, u, d = 0, v = i.length - 1, g = 0, m = o.length - 1; + for (; d <= v && g <= m; ) if (i[d] === null) d++; + else if (i[v] === null) v--; + else if (s[d] === a[g]) l[g] = ye(i[d], o[g]), d++, g++; + else if (s[v] === a[m]) l[m] = ye(i[v], o[m]), v--, m--; + else if (s[d] === a[m]) l[m] = ye(i[d], o[m]), it(e, l[m + 1], i[d]), d++, m--; + else if (s[v] === a[g]) l[g] = ye(i[v], o[g]), it(e, i[d], i[v]), v--, g++; + else if (c === void 0 && (c = Wr(a, g, m), u = Wr(s, d, v)), c.has(s[d])) if (c.has(s[v])) { + const A = u.get(a[g]), x = A !== void 0 ? i[A] : null; + if (x === null) { + const H = it(e, i[d]); + ye(H, o[g]), l[g] = H; + } else l[g] = ye(x, o[g]), it(e, i[d], x), i[A] = null; + g++; + } else yn(i[v]), v--; + else yn(i[d]), d++; + for (; g <= m; ) { + const A = it(e, l[m + 1]); + ye(A, o[g]), l[g++] = A; + } + for (; d <= v; ) { + const A = i[d++]; + A !== null && yn(A); + } + return this.ut = a, ac(e, l), he; + } +}), kt = /* @__PURE__ */ new Map(), lc = (e) => { + const n = $.panels.filter((r) => !r.floating && r.panel === e).sort((r, i) => r.panelOrder - i.panelOrder); + return dt` + ${Oo( + n, + (r) => r.tag, + (r) => { + const i = Eo(r.tag); + return dt` + ${$.shouldRender(r.tag) ? dt`<${i} slot="content">` : O} + `; + } + )} + `; +}, cc = () => { + const e = $.panels; + return dt` + ${Oo( + e.filter((t) => t.floating), + (t) => t.tag, + (t) => { + const n = Eo(t.tag); + return dt` + + <${n} slot="content"> + `; + } + )} + `; +}, ou = (e) => { + const t = e.panelTag, n = e.querySelector('[slot="content"]'); + n && kt.set(t, n); +}, au = (e) => { + if (kt.has(e.panelTag)) { + const t = kt.get(e.panelTag); + e.querySelector('[slot="content"]').replaceWith(t); + } + kt.delete(e.panelTag); +}, _ = []; +for (let e = 0; e < 256; ++e) + _.push((e + 256).toString(16).slice(1)); +function uc(e, t = 0) { + return (_[e[t + 0]] + _[e[t + 1]] + _[e[t + 2]] + _[e[t + 3]] + "-" + _[e[t + 4]] + _[e[t + 5]] + "-" + _[e[t + 6]] + _[e[t + 7]] + "-" + _[e[t + 8]] + _[e[t + 9]] + "-" + _[e[t + 10]] + _[e[t + 11]] + _[e[t + 12]] + _[e[t + 13]] + _[e[t + 14]] + _[e[t + 15]]).toLowerCase(); +} +let wn; +const dc = new Uint8Array(16); +function fc() { + if (!wn) { + if (typeof crypto > "u" || !crypto.getRandomValues) + throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported"); + wn = crypto.getRandomValues.bind(crypto); + } + return wn(dc); +} +const hc = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Fr = { randomUUID: hc }; +function So(e, t, n) { + if (Fr.randomUUID && !t && !e) + return Fr.randomUUID(); + e = e || {}; + const r = e.random || (e.rng || fc)(); + return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, uc(r); +} +const Lt = [], at = [], su = async (e, t, n) => { + let r, i; + t.reqId = So(); + const o = new Promise((a, s) => { + r = a, i = s; + }); + return Lt.push({ + handleMessage(a) { + if (a?.data?.reqId !== t.reqId) + return !1; + try { + r(n(a)); + } catch (s) { + i(s); + } + return !0; + } + }), fe(e, t), o; +}; +function vc(e) { + for (const t of Lt) + if (t.handleMessage(e)) + return Lt.splice(Lt.indexOf(t), 1), !0; + if (E.emitUnsafe({ type: e.command, data: e.data })) + return !0; + for (const t of xo()) + if (No(t, e)) + return !0; + return at.push(e), !1; +} +function No(e, t) { + return e.handleMessage?.call(e, t); +} +function pc() { + if (at.length) + for (const e of xo()) + for (let t = 0; t < at.length; t++) + No(e, at[t]) && (at.splice(t, 1), t--); +} +function xo() { + const e = document.querySelector("copilot-main"); + return e ? e.renderRoot.querySelectorAll("copilot-section-panel-wrapper *") : []; +} +const gc = ":host{--gray-h: 220;--gray-s: 30%;--gray-l: 30%;--gray-hsl: var(--gray-h) var(--gray-s) var(--gray-l);--gray: hsl(var(--gray-hsl));--gray-50: hsl(var(--gray-hsl) / .05);--gray-100: hsl(var(--gray-hsl) / .1);--gray-150: hsl(var(--gray-hsl) / .16);--gray-200: hsl(var(--gray-hsl) / .24);--gray-250: hsl(var(--gray-hsl) / .34);--gray-300: hsl(var(--gray-hsl) / .46);--gray-350: hsl(var(--gray-hsl) / .6);--gray-400: hsl(var(--gray-hsl) / .7);--gray-450: hsl(var(--gray-hsl) / .8);--gray-500: hsl(var(--gray-hsl) / .9);--gray-550: hsl(var(--gray-hsl));--gray-600: hsl(var(--gray-h) var(--gray-s) calc(var(--gray-l) - 2%));--gray-650: hsl(var(--gray-h) var(--gray-s) calc(var(--gray-l) - 4%));--gray-700: hsl(var(--gray-h) var(--gray-s) calc(var(--gray-l) - 8%));--gray-750: hsl(var(--gray-h) var(--gray-s) calc(var(--gray-l) - 12%));--gray-800: hsl(var(--gray-h) var(--gray-s) calc(var(--gray-l) - 20%));--gray-850: hsl(var(--gray-h) var(--gray-s) calc(var(--gray-l) - 23%));--gray-900: hsl(var(--gray-h) var(--gray-s) calc(var(--gray-l) - 30%));--blue-h: 220;--blue-s: 90%;--blue-l: 53%;--blue-hsl: var(--blue-h) var(--blue-s) var(--blue-l);--blue: hsl(var(--blue-hsl));--blue-50: hsl(var(--blue-hsl) / .05);--blue-100: hsl(var(--blue-hsl) / .1);--blue-150: hsl(var(--blue-hsl) / .2);--blue-200: hsl(var(--blue-hsl) / .3);--blue-250: hsl(var(--blue-hsl) / .4);--blue-300: hsl(var(--blue-hsl) / .5);--blue-350: hsl(var(--blue-hsl) / .6);--blue-400: hsl(var(--blue-hsl) / .7);--blue-450: hsl(var(--blue-hsl) / .8);--blue-500: hsl(var(--blue-hsl) / .9);--blue-550: hsl(var(--blue-hsl));--blue-600: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) - 4%));--blue-650: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) - 8%));--blue-700: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) - 12%));--blue-750: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) - 15%));--blue-800: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) - 18%));--blue-850: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) - 24%));--blue-900: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) - 27%));--purple-h: 246;--purple-s: 90%;--purple-l: 60%;--purple-hsl: var(--purple-h) var(--purple-s) var(--purple-l);--purple: hsl(var(--purple-hsl));--purple-50: hsl(var(--purple-hsl) / .05);--purple-100: hsl(var(--purple-hsl) / .1);--purple-150: hsl(var(--purple-hsl) / .2);--purple-200: hsl(var(--purple-hsl) / .3);--purple-250: hsl(var(--purple-hsl) / .4);--purple-300: hsl(var(--purple-hsl) / .5);--purple-350: hsl(var(--purple-hsl) / .6);--purple-400: hsl(var(--purple-hsl) / .7);--purple-450: hsl(var(--purple-hsl) / .8);--purple-500: hsl(var(--purple-hsl) / .9);--purple-550: hsl(var(--purple-hsl));--purple-600: hsl(var(--purple-h) calc(var(--purple-s) - 4%) calc(var(--purple-l) - 2%));--purple-650: hsl(var(--purple-h) calc(var(--purple-s) - 8%) calc(var(--purple-l) - 4%));--purple-700: hsl(var(--purple-h) calc(var(--purple-s) - 15%) calc(var(--purple-l) - 7%));--purple-750: hsl(var(--purple-h) calc(var(--purple-s) - 23%) calc(var(--purple-l) - 11%));--purple-800: hsl(var(--purple-h) calc(var(--purple-s) - 24%) calc(var(--purple-l) - 15%));--purple-850: hsl(var(--purple-h) calc(var(--purple-s) - 24%) calc(var(--purple-l) - 19%));--purple-900: hsl(var(--purple-h) calc(var(--purple-s) - 27%) calc(var(--purple-l) - 23%));--green-h: 150;--green-s: 80%;--green-l: 42%;--green-hsl: var(--green-h) var(--green-s) var(--green-l);--green: hsl(var(--green-hsl));--green-50: hsl(var(--green-hsl) / .05);--green-100: hsl(var(--green-hsl) / .1);--green-150: hsl(var(--green-hsl) / .2);--green-200: hsl(var(--green-hsl) / .3);--green-250: hsl(var(--green-hsl) / .4);--green-300: hsl(var(--green-hsl) / .5);--green-350: hsl(var(--green-hsl) / .6);--green-400: hsl(var(--green-hsl) / .7);--green-450: hsl(var(--green-hsl) / .8);--green-500: hsl(var(--green-hsl) / .9);--green-550: hsl(var(--green-hsl));--green-600: hsl(var(--green-h) var(--green-s) calc(var(--green-l) - 2%));--green-650: hsl(var(--green-h) var(--green-s) calc(var(--green-l) - 4%));--green-700: hsl(var(--green-h) var(--green-s) calc(var(--green-l) - 8%));--green-750: hsl(var(--green-h) var(--green-s) calc(var(--green-l) - 12%));--green-800: hsl(var(--green-h) var(--green-s) calc(var(--green-l) - 15%));--green-850: hsl(var(--green-h) var(--green-s) calc(var(--green-l) - 19%));--green-900: hsl(var(--green-h) var(--green-s) calc(var(--green-l) - 23%));--yellow-h: 38;--yellow-s: 98%;--yellow-l: 64%;--yellow-hsl: var(--yellow-h) var(--yellow-s) var(--yellow-l);--yellow: hsl(var(--yellow-hsl));--yellow-50: hsl(var(--yellow-hsl) / .07);--yellow-100: hsl(var(--yellow-hsl) / .12);--yellow-150: hsl(var(--yellow-hsl) / .2);--yellow-200: hsl(var(--yellow-hsl) / .3);--yellow-250: hsl(var(--yellow-hsl) / .4);--yellow-300: hsl(var(--yellow-hsl) / .5);--yellow-350: hsl(var(--yellow-hsl) / .6);--yellow-400: hsl(var(--yellow-hsl) / .7);--yellow-450: hsl(var(--yellow-hsl) / .8);--yellow-500: hsl(var(--yellow-hsl) / .9);--yellow-550: hsl(var(--yellow-hsl));--yellow-600: hsl(var(--yellow-h) var(--yellow-s) calc(var(--yellow-l) - 5%));--yellow-650: hsl(var(--yellow-h) var(--yellow-s) calc(var(--yellow-l) - 10%));--yellow-700: hsl(var(--yellow-h) var(--yellow-s) calc(var(--yellow-l) - 15%));--yellow-750: hsl(var(--yellow-h) var(--yellow-s) calc(var(--yellow-l) - 20%));--yellow-800: hsl(var(--yellow-h) var(--yellow-s) calc(var(--yellow-l) - 25%));--yellow-850: hsl(var(--yellow-h) var(--yellow-s) calc(var(--yellow-l) - 30%));--yellow-900: hsl(var(--yellow-h) var(--yellow-s) calc(var(--yellow-l) - 35%));--red-h: 355;--red-s: 75%;--red-l: 55%;--red-hsl: var(--red-h) var(--red-s) var(--red-l);--red: hsl(var(--red-hsl));--red-50: hsl(var(--red-hsl) / .05);--red-100: hsl(var(--red-hsl) / .1);--red-150: hsl(var(--red-hsl) / .2);--red-200: hsl(var(--red-hsl) / .3);--red-250: hsl(var(--red-hsl) / .4);--red-300: hsl(var(--red-hsl) / .5);--red-350: hsl(var(--red-hsl) / .6);--red-400: hsl(var(--red-hsl) / .7);--red-450: hsl(var(--red-hsl) / .8);--red-500: hsl(var(--red-hsl) / .9);--red-550: hsl(var(--red-hsl));--red-600: hsl(var(--red-h) calc(var(--red-s) - 5%) calc(var(--red-l) - 2%));--red-650: hsl(var(--red-h) calc(var(--red-s) - 10%) calc(var(--red-l) - 4%));--red-700: hsl(var(--red-h) calc(var(--red-s) - 15%) calc(var(--red-l) - 8%));--red-750: hsl(var(--red-h) calc(var(--red-s) - 20%) calc(var(--red-l) - 12%));--red-800: hsl(var(--red-h) calc(var(--red-s) - 25%) calc(var(--red-l) - 15%));--red-850: hsl(var(--red-h) calc(var(--red-s) - 30%) calc(var(--red-l) - 19%));--red-900: hsl(var(--red-h) calc(var(--red-s) - 35%) calc(var(--red-l) - 23%));--codeblock-bg: #f4f4f4;--vaadin-logo-blue: #00b4f0;--background-color: rgba(255, 255, 255, .87);--primary-color: #0368DE;--input-border-color: rgba(0, 0, 0, .42);--divider-color: rgba(0, 0, 0, .1);--body-text-color: rgba(0, 0, 0, .87);--secondary-text-color: rgba(0, 0, 0, .6);--primary-contrast-text-color: white;--active-color: rgba(3, 104, 222, .1);--focus-color: #1A81FA;--hover-color: rgba(0, 0, 0, .05);--success-color: #066845;--error-color: #CE0010;--warning-color: #8A6C1E;--contrast-color-5: rgba(0, 0, 0, .05);--contrast-color-10: rgba(0, 0, 0, .1);--contrast-color-20: rgba(0, 0, 0, .2);--contrast-color-30: rgba(0, 0, 0, .3);--contrast-color-40: rgba(0, 0, 0, .4);--contrast-color-50: rgba(0, 0, 0, .5);--contrast-color-60: rgba(0, 0, 0, .6);--contrast-color-70: rgba(0, 0, 0, .7);--contrast-color-80: rgba(0, 0, 0, .8);--contrast-color-90: rgba(0, 0, 0, .9);--contrast-color-100: black;--blue-color: #0368DE;--violet-color: #7B2BFF}:host(.dark){--gray-s: 15%;--gray-l: 70%;--gray-600: hsl(var(--gray-h) calc(var(--gray-s) - 2%) calc(var(--gray-l) + 6%));--gray-650: hsl(var(--gray-h) calc(var(--gray-s) - 5%) calc(var(--gray-l) + 14%));--gray-700: hsl(var(--gray-h) calc(var(--gray-s) - 2%) calc(var(--gray-l) + 26%));--gray-750: hsl(var(--gray-h) calc(var(--gray-s) - 2%) calc(var(--gray-l) + 36%));--gray-800: hsl(var(--gray-h) calc(var(--gray-s) - 2%) calc(var(--gray-l) + 48%));--gray-850: hsl(var(--gray-h) calc(var(--gray-s) - 2%) calc(var(--gray-l) + 62%));--gray-900: hsl(var(--gray-h) calc(var(--gray-s) - 2%) calc(var(--gray-l) + 70%));--blue-s: 90%;--blue-l: 58%;--blue-600: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) + 6%));--blue-650: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) + 12%));--blue-700: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) + 17%));--blue-750: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) + 22%));--blue-800: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) + 28%));--blue-850: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) + 35%));--blue-900: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) + 43%));--purple-600: hsl(var(--purple-h) var(--purple-s) calc(var(--purple-l) + 4%));--purple-650: hsl(var(--purple-h) var(--purple-s) calc(var(--purple-l) + 9%));--purple-700: hsl(var(--purple-h) var(--purple-s) calc(var(--purple-l) + 12%));--purple-750: hsl(var(--purple-h) var(--purple-s) calc(var(--purple-l) + 18%));--purple-800: hsl(var(--purple-h) var(--purple-s) calc(var(--purple-l) + 24%));--purple-850: hsl(var(--purple-h) var(--purple-s) calc(var(--purple-l) + 29%));--purple-900: hsl(var(--purple-h) var(--purple-s) calc(var(--purple-l) + 33%));--green-600: hsl(calc(var(--green-h) - 1) calc(var(--green-s) - 5%) calc(var(--green-l) + 5%));--green-650: hsl(calc(var(--green-h) - 2) calc(var(--green-s) - 10%) calc(var(--green-l) + 12%));--green-700: hsl(calc(var(--green-h) - 4) calc(var(--green-s) - 15%) calc(var(--green-l) + 20%));--green-750: hsl(calc(var(--green-h) - 6) calc(var(--green-s) - 20%) calc(var(--green-l) + 29%));--green-800: hsl(calc(var(--green-h) - 8) calc(var(--green-s) - 25%) calc(var(--green-l) + 37%));--green-850: hsl(calc(var(--green-h) - 10) calc(var(--green-s) - 30%) calc(var(--green-l) + 42%));--green-900: hsl(calc(var(--green-h) - 12) calc(var(--green-s) - 35%) calc(var(--green-l) + 48%));--yellow-600: hsl(calc(var(--yellow-h) + 1) var(--yellow-s) calc(var(--yellow-l) + 4%));--yellow-650: hsl(calc(var(--yellow-h) + 2) var(--yellow-s) calc(var(--yellow-l) + 7%));--yellow-700: hsl(calc(var(--yellow-h) + 4) var(--yellow-s) calc(var(--yellow-l) + 11%));--yellow-750: hsl(calc(var(--yellow-h) + 6) var(--yellow-s) calc(var(--yellow-l) + 16%));--yellow-800: hsl(calc(var(--yellow-h) + 8) var(--yellow-s) calc(var(--yellow-l) + 20%));--yellow-850: hsl(calc(var(--yellow-h) + 10) var(--yellow-s) calc(var(--yellow-l) + 24%));--yellow-900: hsl(calc(var(--yellow-h) + 12) var(--yellow-s) calc(var(--yellow-l) + 29%));--red-600: hsl(calc(var(--red-h) - 1) calc(var(--red-s) - 5%) calc(var(--red-l) + 3%));--red-650: hsl(calc(var(--red-h) - 2) calc(var(--red-s) - 10%) calc(var(--red-l) + 7%));--red-700: hsl(calc(var(--red-h) - 4) calc(var(--red-s) - 15%) calc(var(--red-l) + 14%));--red-750: hsl(calc(var(--red-h) - 6) calc(var(--red-s) - 20%) calc(var(--red-l) + 19%));--red-800: hsl(calc(var(--red-h) - 8) calc(var(--red-s) - 25%) calc(var(--red-l) + 24%));--red-850: hsl(calc(var(--red-h) - 10) calc(var(--red-s) - 30%) calc(var(--red-l) + 30%));--red-900: hsl(calc(var(--red-h) - 12) calc(var(--red-s) - 35%) calc(var(--red-l) + 36%));--codeblock-bg: var(--gray-100);--background-color: rgba(0, 0, 0, .87);--primary-color: white;--input-border-color: rgba(255, 255, 255, .42);--divider-color: rgba(255, 255, 255, .2);--body-text-color: white;--secondary-text-color: rgba(255, 255, 255, .7);--primary-contrast-text-color: rgba(0, 0, 0, .87);--active-color: rgba(255, 255, 255, .2);--focus-color: rgba(255, 255, 255, .7);--hover-color: rgba(255, 255, 255, .1);--success-color: #39C693;--error-color: #FF707A;--warning-color: #FEC941;--contrast-color-5: rgba(255, 255, 255, .05);--contrast-color-10: rgba(255, 255, 255, .1);--contrast-color-20: rgba(255, 255, 255, .2);--contrast-color-30: rgba(255, 255, 255, .3);--contrast-color-40: rgba(255, 255, 255, .4);--contrast-color-50: rgba(255, 255, 255, .5);--contrast-color-60: rgba(255, 255, 255, .6);--contrast-color-70: rgba(255, 255, 255, .7);--contrast-color-80: rgba(255, 255, 255, .8);--contrast-color-90: rgba(255, 255, 255, .9);--contrast-color-100: white;--blue-color: #95C6FF;--violet-color: #CBB4FF}", bc = '@font-face{font-family:Manrope;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAANFgABMAAAAChtAAANDuAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGlAbgaUKHJ5OP0hWQVKLegZgP1NUQVSBAgCNbC9qEQgKhIEUg6B0C4tKADCDzBIBNgIkA5cQBCAFinYHricMB1uVT3IGdbKkfEKdqm5DOACfurI2odQKZdyeoO6yfzV36AKXjG1ZMIPzAATVn00z+////7OTiRx2CS5patophmf7DVTMk0ces3hMpVYEIp6YRUtpSSsmRGzx2hEINOyoI+cX4TXh6Dqj+jmKQwRMWZRJTEoI0x76tvNPyX8qh7fIg+qFCpOmkFojQUkSVLy3e8dEaR3eg7ql3TtiF6mH3B/Vz4hN/n8dVV45DcfUq9uXn9ukUyOIk8IEFwoDV7eVWkILH8VcyMtkBYsJT11W5fq5Yt9Vy3LUiloMBYswpxNNI5HyR1Ri81WbzDIpzE2MILLbzhwJF26lWRrnwDOf+ktnn1VpR/FZhuMsiutFPUw92fsiksbhFTSWipZu0N9I3X8c0Avx0z6am+ntKd5I3bP6EJDJTQ8sEaO2iDP3tRVfi3Bqs3sgsSVbthPH38QFQueRUErziJQCJQV6phTwXXmIcrOZySaEEEKAEELAACHGGCNEjIgxYIiIEBGQIkYMESFGROQzhBBCRPQsUorUUkuVUnxLLUXkqP5IKUWkFj+kFPEpAiIiAiLFiGH+0c3/S6SUVouzdvn67Bjb3wN0vLFs31oTnOfX9q3OSbddODZFRKrIo4iUMkOEMAwRAoQQQnKos5qRZdmekWR7c09F9RVgRVhiAJfIuxywrMbbZovqyucSqGKo8gkPz9t9/619zqm6dfn6S+4PMhpERO3uEYNImRyJEcBsfjTgq+HBbf0DAcdGlixRtrgRRUFlKDgR5SlGuGauytGy0BwNL21b3r+o1Mq2dbY1c7WmLdvmLS/tav8bw/Nz640oA5AyQMFIUKQEE8ZG5Pb3FiyaRRJjjNrGCCc5qkeISBwoaKMixh1GY+VFap+XTKHT0nl8rXO1c7X5iJ+0zvXkSmVunNZJ8wkhhBCLEDIIUS1EtSwTWcaiGGNczp9gv+M0XFKaU97XG/9PHbA/9201CTYTJpgE1nhYAhEEwh//8v/UAO7vebtrhGgEoxWyIAjFEGL4rf5xwJz1PyCoicZYEJEgEkRDkCAqGgsxiMY1rWwrV3pur1bIvfZbra+Vmm09l826GADw8P+5+b9Hvb17vaY0nzFYOuCZM8OAMIwEEHBEgogECUGCqEgMXl5rn61lva/Wu7f1V31dGuCkGR3EP2tt/mXE8lU0kWxPxIBk+rpZSI2SiDvQB5fv7e67Wn5TCFCAE+DrygEM2vj8/7vZ73PPvXSNRJNMdUprrnmHCzitlM9X6j0XJYwrY0tDRUMIwRJisAyWMAQbIU07IYYoKc04rTl56NtM+znmGQGrBSGDF8d0MfW/6a76A/MsKQ7yScLnexFo+YhiWIEKRGB4OVy8F17+PBze/Z8zbrvNnZ0xAZTJByXvebJibbTIEBqlEGmZr4RCtmhiu3uozTvX6zbhpujkB6JDaHtAKSa9NumlSfHab78RsxOehdvze5MEQu9/a2r6nTqgb9dFJDuCQMlcJFsnX8fXEoJToJCkCSzgad8e97QRUAABITA5l6UkJVIzYgWWD+x+872sTfExz9qtAARSAOD///dVrfZdQJQAWTMHdNiBvYmcGfpAE6WJLcVNIVb5//f/58P/HyABgpYRRBmESBkgRZ9PULK/QNJGfPyAKCo4SRQdJ8mJTkmj+QTIHYgarihRsvOEGCUHTYih2lhH7BbVlFNuOdtNOfWmVLTbbVO73NLllNuV263/n037UunL/vuR0s0oAgrtRcyS7ltV/aQutdDe0bgNOIAeonO6uqCFlmcWmaMN9/wkA4oWwlCrxXD+8jz82qd2553whCb4I9dm1QqXsI6T+3ZCc/eHJgrwq4BQUEAwFh2Rq62UlZWKVGWdrP//U5X66Vknlt31K2/UsrUA+cpYyDYsKuzhS/pRxtfNFpGijjlhJurYqDAlcE3kU4ByyijvfHO92d2XQgoOSIFSgLJ1bhYoKWZTIsom+T/7KZ3NzN8XmDxfVIQSEBQgH0tACWwrT+ZOzRlX48+bg6faq9Jf9tmdVQbvH0CSGVK5W9d1l7pLTa3YyDKSg5TAsLDg0AgFZkIwDPy7vbyeG6Y/K28iEkomJYj0c8yarf9edf5yGvAvwYOIiITQSAhBmqYIwVnW0+yGPf6i7Lmr0FKKPESKuCAhhBBEpLuubv8va0omrFJthUabKiIioq8b+/G8YUytI9Hm+rbxV69/zXIAioqKoIJKxJX2F1GIS7MnQ8ujunqiwDCmVlBJ7ke+x9txy64sM6w1ShAVEREJIdz8GWt9n7zmZtvzToXHiwhJyYgYZRzGPX3fnD45JbhVHTgNkeMiHq771s4AgjNZsyDraIipJBCAzzcMYCYHAARc8xcIDebwfFT0RdRXsrXDQJX05dGGjc8f7rrvZhTa11alCO1nsVqCBgMA1vR4/u9KCSKwOhAGvYOic35Cgk78RTAg707r+Y8gTD/c7lXunLPuucwHLaWk0gnN9fSL/GZ1eqUWyIOGtagpq1o9dU2a9oFSxyb0rXlhtlQa9i1zh50lbaVKf1PDhPiWSrjY0uKWuvJY2uNGX/4xUJTjutZhd7tetpR9PaM/qZbQWIg87tamtDfa02vi1PBM5jXWZb0Ox3RGWNd7ebXuWst9nvsaxtN0ke5TWWvJDf4RHjRG4i1NUf64fD+oNe0JfwsbQlq2/QggXWWPSilvW75G6WXrevVU5Q5NMlmnM3Y7LzlTElouWE96s8bcRfakstpjKbSmBv3FzvTG9qk8ugK3rHoul3rmW0mCXqs5psvUbr/o+GB0hlI+rTO1vWaiPqDnWffrZWzlbfErnwRtZThnWgMkc5bSmOpeK3ueZz8iaq+R2PWPK6rVCh63k4mVC+jHWfsWU/rI32lwhsWWfDDwXDPSHJ/tPEfPxTfZCVom6b0w6MO+Qfrc6p+JxEICadGx+aSmt6det1XGliVMfN3VvnJlcm34zVFYRXfHeS25xnHZsgdeZvDI/g41lYLsysUdcdTF/bXpe8f/avaxFe+4mafQipexR2sT69KoTvlb9/AJqeqIq+fGM0wqKdM+ir1xPTnvgWPtnvq2W98ts3VsTiE5qvh/JKPuNI2ShQrDsSB8JHkbpH3bUt/X5TuxGKU5nnokZ7r/lue4kteJ4xn3+e513ffnt4W5jjPG5P0K4+r4nbJi57CG34oauI/HQu94RK5HfxSlD1Fg6qVvU7ppKenTj6SGu0p2f3UXWfenETzDfQm0Z8OyjtvOy4qrGROyv9Pa95bn5zYPNwm23z7I2tf5/KT7zUrhxcFUyc+2rRj+2rcSx0iwr8H9ODmOxeJHOCN3lY9gh4WjH8gO7nP+9SA0EvTnHjSm5Ztl/KOm5GHw6wn7h8cHXE846qsdhe7uywS+cqjEvH6QXtrF6zCu3jsJQ/6TZPVB2v14cEN9vYDGT3p5wq0y8QQovHmb0rsjVLl0YRZT2WWZPHvU0Yqgh5iuBGYWI5s5KjktUFd+uVc18HlNu0ZLdGvxntHyxy9zmGK54zqsManb16YZ/OCmuyodKE9Y7RC7GkefcI/jEH86C13zf00K2+tbUQf9hHTEb1KO+3MlzLun6Li0V5Zqet8Vq2v7Vcf17Z7D3v1ddOzfgbEO7EixOrRjXpU9fYPm27OZST0zrBeEo5yWihrxVYLT+xPkDONii1mY3CDzsEpyDllmORf8rbDgigi/cxiez2xiGyOZEohOO6LzTOdL2DGdo9hrX3y4UDkr3ziG6jj/R0lR6RRrp/3IWY0mBDfdhNesDXTLbV46dID+9BeSTg9AD3UheeQRqFs3kr/9DerxD5Jej0F9+rh64l9O+g1gGjROaAJhsXfiSryXIDSNMscHKTxmaflmA0AFhM7BYCBlnyvXOJGRE0ZBj54bVg5xeDYvgbBwEUiZTQTDRCtKQuRYD5dHSZBcg2CupaGExWYp2YYKMywScaNEEl4o1FKzjZ3EYZFKFop0ylBcNGs70rpzcUOX2ZiJ28fSzokIh62MjSISMTI3E0uLHo9L1lbe1saAwKO9XXR0AJVinZ2udNqoYYOJu9uEybjx9Aq+fiXgJQxRwEbljcMIzgs3jVDoKMLGKHxc78YJRE4a0lzgMpsRWxRtLVFymVIrlDmr0jOH7B1Mb6dSdJHy76IDVUp9b3NC1VR4N4rukY3Xyu/cK0rUoeQ+Ir2fytQr7zvAyf2PKjQKx95FpWai2kLV3zMg1Uq228lup+JsNx6EqVGEnEXxakhmfYS1ieHtMH9/FB9GyMs4vk6wbkn8SLGeU+g9zflk0HfGoGwW/aUUCwyJCSIzoyxYYJhkid6KFZyaNSoGG6Amm2iy2MIImx1Ql10M8diD6LMPmuEMomBADIdodpHYsIQ2bTKovCysrJB3WiLtsoI/cBd/6CHqsKOoJ5dljBljmWPlsqyxYyx7nFyWM26M5Y6Xy/LGj7H8peaymqlzX90Kcl/L8LhbP1vc/TB7ntswMlQOz5HjNs4Za53zZ1e+XzDr8mCDuUNaQXQ4zpxhGBgoXLDYccfG4WUJzFJLYZZZwU2AAFCoMHxy6zgKF2G+KFHmU9gNSZMGkyEDW6ZMSJYsPFrZeHR0nOnlcWZkRJUvH4mJiZe99iERjxmyF827cANeE/c2bfYHG22eBFX79TQdehFolrPQ6aI4ZpaqXogipAvGI/YwArtYwN7sFNFjs0RR4+DmGQ8vWnyeeSYQEIylxLkWIixINiazA9vSggTfQqYxLmJnUDlKbClHinhvHtqKQzl2DCj9OJujFUoUscF2TJKthVfLiGJrW8R2jBhuTImDsJBJvVSMiMI6F5vMkXE+2dhJdiKC7cuBIXmMRDjGkAVsw06wJRg5TLUEBwMrGLdFlU6H+JWiaDbfRhTBZBiRo7WHUdjFdHZZ69AV/YpX7EHkOkNQDRuZoGvlqE2EQYlw8Q/lKNEbRmIX4+R5EYx/CXMkmIxrnSR7RVkxwfQ5hhx2tV6AweVhMYgcIbUWL5wNIgGbYsOHZ+x5xWExc9jh4g6/237k1Q6VS1jcsbhjccfijsUdrQygsUi2YefIrnzby7HXEYaJTPo4DYyptgJY92JDuC764zwdVKj91J608S5XX9KvpPuksdYHeaDRJdKxzmp8SxXx3Xpa2Ip4k3iJeJb7qZPKOulmn8rcGrRWPnWJ8aRO1QDPg2M1qsVLgm2ZfWXozhvbEtWsb5r6UJr6rFQ5wU0Fd6gcXzxPHfM2dBudlai8kbIXrHvzD9ZQCR342R/iL+PP4q7jTuLMuGacCTt/jFrJT514jtCOYEVnR17xCUf5dJf+eKQ4ERLWi2KA0WxPJxfBWZRwky7myWyeJd8+7r5xCkeNPyzVYcAGouMTft/4WSjIKIPWKOIuSonLR/EtZbkC3/EVx8h64/HWSq+SnahiYfDDfSasmnA4QzXUDGj4iWTj5/JfNfdzWbnq6lSsnkloGKbo/4m2xgEKFwmES9Rp/nIjrF1pnL1rnYR0o0kj3eQEfiME1FRANw9u1MTI1MMA/O775ts3FpHA7U1AFPDX8ubc3U2ca/dd23z3po/V35s7Tk/3yOJ7tudGqn/c4BcYcDMGfYwhB+Old6PhfdDLvdpHDzSyr6bqdYjG9gthb4Fxp/LEupPrWLF3lbLrHzXZR/MdG59G98RnPveFL3WYYaZZZptvgU5dFlpimZW+8o1vfed7P5RNLYXiLiJIimYwWWwOl8eXEQhl5UTyCopKmrWo6KmX3u7yqCc87XnveNfnvtRhpi6b1ErasmawOXyhBo1K3U6p0s65sa13BV2+tKqUG2e4jLBCGARJ0Qwmi83h8vgyAqGsnEheQbHb0bDTn9KY06/tqZRSVf6iYS9727c70JXD4SQ3PydGPlBluVK+Ej/qfgYGfzVNm1+uuMyuhTpq6OL+/VW8tN7+/x4brS6vSvbDAb0OOuSwI4465rg+J5z0s36nnHbGWeeczwWUgX8WekLHAdJwgYfP82l579Vs7ycvNejDo9rPsgNPemxcB7YjoERUdCJBgqWZx2A+o3QZMmXJliNXnnwFChUpVmKBUmXKLezq/nvTKib1ttpmuw47mp3PinOeuw71F9N9nrkHuvD/TiUikpFTUCY3KFWRyj2Ls3xJU7Dmla53iDMZSn2CN1zefeO/nRcw7XczZn18/ufxLP8/foJngAG99+w6JxuQTgM9aFhPhGTuDUeCpGgGk8XmcHl8GYFQVk4kr1CKbSio7HRYj8f6y/i5DOuaddpMZflljvpOQDBiD6JO1wUAAAAAAAAAQD/O6R/nco146XcKCgoKihpyf54HPOihPAyPeNRj5fELFFzESIpI1SW2Xman9JZP5ibakDzIb/ZVF6xV5JDky70czs4xcVytW3o81t/bPK+RN8F43m+GGQm3eMIe/ev1Wi8Ot5l0hWv9/0GoN0RthvHxCMPDw8PDw1Oj2eZboFOXhZZYZqWvbMpmNP9XInugCnYQJEUzmCw2h8vjywiEsnIieQXFV6WBy70NT44bLybj5NHN9DG2Ep2VrfKunBhAVuuE3TJTdKZrySakBum0Pm4QVfB76yVEGqJGpZTzsv8fhF8ljrXjCmvI7+dfx+eaGwDEBHNk1tn9l6Iij98A8OP0Rfe7MAiSohlMFpvD5fFlBEJZOZG8Qim2dKDDneRmy33lx9K9h3uAobJUL16a0+geffnXycPeyTJrtPxeAeKmNL6vL+CZiE0ymHXcitNy3GA5EiRFM5gsNofL48sIhLJyInmFUmzpQIc7yc2W+8qPK93VV/wnoKXXPJHw9RLxlByuaFiplDty2JfsHL/pFOl4EGtJ9rPH7jlXTl2q41usZSQefMciqYmBBckVHjCmogRVSVlhTbym7XxpBrQ6G0ghXq9ARbOiqpltjrnmmW/BE2iSD24iyMm+dNLh9ey1t+k5WeHIr3nxAz+cB+TYPT0GqNi3BZk7A5fwrnX1Of/8W5OzO4mt/3ijlvarw5dUd2dwmF6H+2NLz3iBF3uN9I7y12W+ADOAG3UGAAAAAAAAAAAAAID7sCOgv1qYPKGqdXhmdp7rJzjnZ7V+Uee8ehc0+L9Gv7roksuuuOqa625oWtgMiLv6TYvftfpDmw6d7rrnvgce+Vuvx+m72GHTMkIJC/QvSIpmMFlsDpfHlxEIZeVE8gqKC/diCLR3s2/lB52V8XJSeAb2y83Hwy2t3BB3jfFo9ISnPe/dfJzkczN1ZblGvhI/5h9t3X3j1Eo6ZgyJ6afYSxzhCzVoVLpcUd/C01zRHWY6wlGOKcfNAzDj9fAuS0729PScTl+luXSJoD1LO5rjG3Bt1AfAgSApmsFksTlcHl9GIJSVE8krKC7cEcR4dsozheVZeM7zzQt1dAYAAAAAAACYmZm5InMyMhfmZT4s0KnLwp7bWYws2ViaZcjyJSvEynwlwyYZiSImSIpmMFlsDpfHlxEIZeVE8gqK01JvN8ZU5BbkriR35x5xbx7dyxPwtOeXr2eOquTjxeeZGXRluXa+gh91961Ra9L6bTwwMzMzZ/qWXw3TG/tsQw/2QRjyF4MgKZrBZLE5XB5fRiCUlRPJK5RiS0Flp8N6PNZfxtt5vj/Z4kT2eGA38ckAIo5KeJgAbGpQ+ieUG9o3Dv/y0BrBxUG2pxvM24Sjc9Jzq2pPLt4+MCfl9wyCk6z71Ogk6r5wIN7/rrKI/nAAARzAAB5QgB2ggj04gCPQwOnw8GwPz+bwSIdnfXjEAxF+L4UqmTfcDb7rYdkN1ORXRtY7gNXJf/r5ggkJT/ZyH72w7GyZCoXJjXPgN2Wmgu955Uo5+FiwiMMD70qLhRzwa2kFTwZeP0yacNtVIwac/om+8ix5BjhUkcFXgK7KX18IflosVghAx39NdQ5sYi7tQmuVJ5bSLC1AnBxbNsgN7S4De3DMerUhOHjWEByMFRIiZ1R26A2jb33kiF6+jGt/Gv/lXrqp5jmDZNDb77Hl3gMD+rP6A/rEa+Zdo/F26vwQKePqvFVqn9P8AsZhEGfG36nsy200/n8KlUZnSN3zAv6fkbGJKSAQShqaPkjNcFiD17muUpWWGZubwXCPXsU7OnuIHtSz+pCevgGhFeGQLlk9r66pRW5uimdJGfyE83Hyk98H3Pv+XE/zLjzyrX+Ut/N5PAw2eo238foufjde7k26Oy/v4i7APXtsR3eUhz/k2XFEB3dCD+Ng0Ois61x0oJ1qZEt956ByAa4OYjcWGzAN0a7eUSY4KFhvLEjwnBigBAd2dUMUiTUAGkGhXENXN/q4N+pjcAWmUTbiRpEShyVxEEkRkMHg2RruDNNgsBlni2aD3GCcyejOhHfONHrqiWn1J8RkOSooYhLGtLgFXIl7CPo4A5cGIMya0Zwtn4fhrlmUCKdW21uJ0cPSoGtJ6LQLtsJzoFBgUJmtokC5QqtcW2s+WriQZHFilqbRe5j3JcBtold7KA0dRxuu1oBZJKbh5KEwc2hGhcxajHxLwCSsBoMbfUpf/2IHcCb3aMFR9TAtDhZ5l3lQPmikWL0FPPCpFdJUyAokezNQDuRocATNBR4b3i1MLhmRvZcpWvco6tNEBSMxoCxPxz3MCDQhRCiSM4tETpVgK3AWEsWRVulmfec4YnXDsukcAMXJs0PdqsE/U+mbLVu+UH19Hdf7lcHumKPm+iJRqnVorWKsSzRhleSWiATFueE5IgSG7iQq+l0ZohQ5n2axkfus0DbYCRM0VqDwtrYCbdX4jdk8eGtbxNXKcXdt1CjFA6AXIw/Q4FDudGWivX7RRZD1zsrabRPWFiiQE5ya2q1LrZWTmyrqcwoL8eNRc4GGBnSdKNBWFzh2AmM/kf/XjufIDQELF5XAYi58+HC1hC83In5Y/K3kKUCQ+VZbjW+NEIuECrWYXBxvCRKskiiRVIpcQfLst8H/HBSnSBGlMl+L940fbHPCCalO+9HuKKrL7AGqiyBYlGGIICKoAIFSNAk+Nw4grNwPleQgrHwRVs7u7rWEkBFKYagkryhUzoRQEMqLcOXM3l9pOM17NQiLjaHghnFDR0WKmJD3PR0y2I6QvnaG0+c9HoK+5s440fYu/vH++yLivI5+xuCesX1dnNfJXV44dFqmjWA8iJRtE2H6BwLLgvkFIEtOWnxdsdIZLiAKC4KiBUdTYBGLvGMMS4tCTZ/57S7jIMGBobkaIcuk+ylC1Ry+LlTDLgs+wsmkBYW2ltj59EAOyZpWTF3Ao7ouawxF645hefx1WKLRDbXePmCr1PdbtCa9+B4SW/16AzePuPuCYJLN941EeJw/A5eQWK0GzH0rtlqCQvguAlv3LKlFyi4SWdFaqxBwzfjqbMCvxaCR9yXPvu7necxcBd2LH65hqkwkqdSUYoQLJiEi8OYLnStPZDqHWmt7Za7aqlQqZuXEZLNSLhuV2dJ0paQ1KseLU5ViQd94LF8XFmi19hiLaxOEpERi4AB44d1qNzbJjfIpIZ0Z+Vx7g6QcMmxNVNNxMIh0ZgBqwhYGiONSVp7QSc2ps5SjIKT6NwcITZNH/arY4ZaBYH2g7th+cpRQyoDWkZAtARFzQByEUpRULm/7OpVTt6nc/QCxg52UfM0dUqz0GtGBfLr0E17HQ0vlqhu1eWq2dVL0Hu+wBIq9l8g/B5AoZAzAEZUEYFN7rlNFqkalicS5OM4dJte+lBG/MAhKrEch0TFZVipV2HFTqVFJo1QFJnXde31nKdQXAA1TuWKh4zQijofUugbDH5pYrJx/V6CYEo8fPxna6BxUrU6JIiebE0+905hkIwfdrfFY7+n8U7JSat3KRQug4hgusf2G5gN/lRvVQKc1SVHZSahlxwek6m9LFBCqVKQqVXIGMnHiOnLBZNwvBnw6VooyMglhqoULV9VofKo+6Yr54JAiwwKUK6dytCnEdYFqPoYL9FpXg6cPXaGluKhGf9ngWHWVue6pCEc0SuEvlonWbR5tHOcUUsRcUMg+V0IpddGx20MT7emRixSVsSL4i839jaqRJRwbxqQAZh35UFsIiXFQL+5iYE153npj/2mGWrsKdSp6ySI8s2K1AhkEn4XKdSBXXyFiTgdZQkqx+u+pxpkys1PsACkX59v1tAjAQEzdgvd/0tYXSkGrUqKi65DmpA4XiYV4A6C/dk9dvBiA1wIJoHypnqkN1gAA9OpSRTDyv4wjAgL8HSS6fPfwBIdOlsr1krHmzgCLqfGeAb7LW3mFVnzbp/ssZZeAo6SjxK9x/5vPo5ZtV+3wgNr/Hgvgrnje/Pl8tyZ3/49AX/qBxzcv0vt8BKdpZvvfCWP+TwLzvlG+wvcGAHnxMwfQAgNBRBBAxApAGXrZn3xVAQDwMXH5kYkQBwIABWgHUnmBAhBtHDhYJoiUD2twyt2pQwptXz9shvP4HQpZsDtxIhqw3m75sc+g/63HZsvHCqZcCPgLFi5aIq1aYdJu27xdnvN8e7Sn7IBDnfBpOtLZ/m/TTpGJeWFibHXHhx1O8bx4TXxV+I7CqsIPpSGO4GiO5zKcytW4dvep7ie7X+p+z8WnLq69uO7iCxc3Xnz14hsX37yEPsqP/volv16K2Dh7mB3mozzNs3yW7x48dfCBI5+Gs57rP0L9OgA84AFCEEN10BFvRISsQIKUeYpOoUk1OS8w0M1t/UIP1bbXt6O0hJbSr+gpeo5eoB0iwFwxDrYSC+6gxDrxqjhc+GZhVWH1xfZchKM4Rl5ZtfzZ7jfLfppxZcavzBuC+yt4z7UfeQ386s8kc2OdRWCEtA3XA6ineBziiR/fDvvbW+cdgYAtu5N1fMN2//AbAH589OEXgIAfT/pxzRHJw6T/2h/1d9+Nw5Fd5K8enwf2zr/wDHiaDyvaM2b+vCNzKXMa0PdvyRzK/JWpyry1awP6+p8MAwAAfU8QwCMAPmjGNg6OOvYkX5FPFfDPZpsjAPBvAgD/KcDPAjxr/tcxiXPf8cVjp/a4DnPY4wuIDwQAedeFravLOyLvZtyUfQNKunz3XBnT1t60RcsfcdVT1rtfP3eLwHVtXvXHjnQjvnn9i3zLuu+y/lcdBhfuvIgsIxYglFy4DaIppMuURSdfoW8cdVyl0/to5HE2slWbrcZNzdp06PNEv0ETYhJo6XiQgYzCDYdAuAiRsBLH3Mxe39DwLV7lfCMX3MB6Zp7Wc9NseMt2ea7d2cVNWfgeTrm+7dzzldEvZ9GLWszw2UOs0dlx4syNDw4ugdUCrSLlYZNEm8XZLWHdpSqy3/8c9L2M1nTZT+rdcNF1TX7X7U9/eWjUS8NeuRWAS4ggDtJZo5Nu4M+LD18qS0Tn6Cqcc2iuYfrNPK1Y/uCqhad2bLct0WOxLr7+Md8dyz3j56kV/uXvOYkBK72w1rhtxoR4K8iQMJMeM+UJ054y40n/KffB02Y9y+IZnzxnjiLXUnIpLY/25Fl2y9PmVU7eGVpVbivT51NBD7e39ZlaV3lT+qqaDvR4X6eprJc70itVNLWqZveDMy3qx3SdbXHqFoDini2v1e3rkT3d0ByD55x1niEiq/Q9QkwCuSJfUJs6yqjDjjiXEUYafq6ycBi9R+9zBiaonbRK1BHIkIMiBRUNEwsXD18qoUwqalmyaeTJl6sQxoL6uqbOE1gizUSpih++NmmNn1PUheVVsldW5na7QkE7pW0BJ0TQ6n0NrOVfo//XY5fejjW9b9P2XdOiusTBFSQXkP2frUYUv7LRAPMzgl9YqUN0Hl4tb48I/W2pXgt0WugevvsWeYDnrmBvyLy2LQeQ1HywJSsQnw1QZQu2ZgeUWYPtLQQ7cio553a2KE2O4POe6lDP9EXP9WUvVNqLHe6lSnq+E82rurmdbH6nWrCsqZe+zKmWsexd3cCeXvu8o+YcO/c6l1/HCpPHLbnEsNl22g4IYhBAAIForJA+yoZoB3b+42ALgZEfSANEs58eoDnEzf7uAC0gdkP+FqAlxAPADwVoBQkA8OcDtIZWFA20ebl4Mr0orYD6dpP8yeqCwI5v4Ox/EFD7BtTRAQAeBAcH20SiIBy5N4QQ5HCvmjwTDtApfB5SSh7dcRjaeTs1EVojTnsuTT9p2B5QynWTaTLacRvqXN8kBHo6pHZ3Rhaw1EdepqkBu7rlkagRtoLU4J0C6WZ24NQ5AoQUwWkuQlWiNqUZAPOJcZLTCizPqDwBmRC1kxxNUUgSCNUgAAUuV8IlwlUjLClcUyQHbNzxQwVVUwA7gpCDHKidmRekIOf9p4WJEEANKZoVXSoJl1AJAjsmMGFq0CaggCPB3GRV3SRMW+E0Z31bFV4tFQhiI4wwdjoi0Ry0mjk6IKN3VAog+Y/q8lYHCHDwmmhW27HpIW7KUsR2w9VDPGGKbGV6iDgHSY6IRJcKZdjRjk8eWG0tuQCCn8LDJCq2EMnYT603k6KG0byX9RAHAWOEDmsXVljRqsoklr05444oxGCyAmC4JtJAYwBRwTVwpA4nOdGJTyCMYIdjegJMCu+ARnPT0HFnYblIHxAocJi2IAIJpAUARc0E8AApRHwmvDvitbOFIw6Oc02CVe4MAgKe7Qtf9FX1+evZwZFj19CuiGSk9ptFW2Q/3JsUL3hfl3DZ16MnETbMHp6AUfi3kPrmqWeF91AgQdjeCdskKrYgksBewt5MipoIwe9lfROHamAG9Td5B7GyxJKWVbHcWcTOGZDeFSCmEdvX7s2kqNVhJ+sb2qDGoD1LuziWgIABrmaN2RLeZVEVsQpXNtuyS4m95ltFtLMNpmab8EqPF5CISXgyk6JmAvgdUoj4TNiBHtpiOGLU/GIlv3bBkSsqVa73uKf7Sgq+f8+ARBUxR4FTsswIfo8UohaAuybhaHAJYwIPeZ4xCv/WqOGCgReQDGyFuSYL68YdwPoZggR0mDknbtZ1U2bLPM41u3E+HDB1pQjybgoRR3TgWYqIMq4C6RG4Qmd9Q8/KFCZorhDWVBJF4ygzWa9L3MVZjPHo55B+vbjXirFb4dAndteBNsG4g/rTHa6hr7JcZJ4/PqCUocx+ucp50s8Xl2cMMOVYgAlMphgeVWm9T+et0Ip5ZJYMBbesMfJu0+HjpsWGzILkSnjyFe7Go1/CkhY4Y+rDx6NzSlgg8K8GKwIDfsiCY+3CvrghEHxQsaBaAlcgnMF0LqYd0Ma0RWAymcogqW9GWIHgX0PWEpRL0fliZu02RhRZOfFrLQruAzFbb+/MDln848J4jOtteSlFou+dJLpg4bFrIBJzH+oQ7DOfB8XhZGxA9cfrx54dVVwOIAVPB1xejuDKAtYGc15/nLX2z1UebdgugaGKOvRy7IW9YWffNjPtJnX1xOVVNvza8BOiylL3Tie69Krdxpzx3u+OB/tdmvqFktiidvO6B0XPWDEMEUG1zssisxyinxTNKtwKMGhKpabjKjwux95Zidr3wmLqE74YDKHQMWhT1vMk/3a7p6TeYK5qSOgFMsGTHhmskbp/UIucQbaWuprUrATl5Rj2BvQbH5u6qhVkkq+ycp59GvMM606+RaPG+OqgtdSPH7809Z/On42QbfoTc39zZp/U1fVMH9r9f0qu3+JrEfpZwFYHm/S8aYc77C8/L/bWQdbOPxr+mZkByklybvafBuCjRao/CZW5NfMMG0i91yxfAsUJ5i+tCbKNVjwS9W9gCocIQR7t3HYuf8a45CXFQC61GA3ggLwUoAAVEDAGBGEJCI6BVEo69sNSsVzaFom+IRi4NGstCrxtBsH2gi2dVooakf99iu5zrwn8aO6eJOv+N2lsH4FqpTXkg38H3F6+3ZkiQ40KZMZke6QWKoZPFrKjMJOnN6jQ1yk1uOK6o6iiH9dCFQYnBJV6mO9HXg1rOAnE2yowBpwLK7BMVVdxq2sIeeOJzfcNClnVF4tDbUC1QQiKeNOMxxdVslzbkl7II/W7/tS5B4Ob/QO4hsMd0KBEa0lpK/FZVDGIHNFiyVUSbd8J8y1cDeo+6g8fXhSmVtYO3uibFp/wEuo3/F2qxL+JnDShKme02IRTjbR3typGDPXABUGIii3QSyUrLBtJZYVLIm6DMvCOvNoWUddcrJD/yuG7eukTCPjVG/DV9iPKKC8tC5UdeRTYIfJIF9+kHqCtlHbJLqW3CgyQf/DwsBzih3RCrG05cAsNw634YT/z7KlNF/LUL8Pb/OMBHpgTl4q6QY1FusYfchBMcaXxsCYCvceb89p6l28Kv9LHyu3LxOZ0vlTW1sr8WG7I2FyK2UKRerN1VZVrDY2OmKtx7tGy46OU0H3RucGG3rthFkUesk7qjGeBx/MyBOeaaKruyZBMdr9XynkIDn4xfWZpPPxqrQo4+A+mxExLUXRypof3PDMtjvzdg8piA6zbgBwOT0FZClehKCq/BX9ZD+31zObdNVWg3l879NKjEPv0QaTUTRyuzA38uRI3ADrlbYTEFdZjzIePcwM+2iPIraViSK17clQQO6RRKtYgGSVsyLfXyMDOeHxsRKoRzOhTzdL8wHNMVSl+6hWvS6obCJDqoGaoVz8Ki2M8KvDwiB4fBsLq1CwlaXJEPSVXkCQnv1fthyB2OtPwg7xNypaiXcDoM8yhHG+KC3pJuige7StbWnvRc/GEgSupIAWza/ykWZUUPPXsl/acd2DaL2GG5VULSyCLaLoWnz2JYZXTIxMTa6NIE/ibBbCcsMuKqP3kXiakSV1nhzvUGD9HgAJwL0v8kag0q3ugTOIkFZUVo4fSTzcz1o5Iqb5dwEA0k6mrYSTjMu71RqqxZ5XfqJG+5QZCuOB6Z3gw1tS4djJjtPFUvZvOAbnJ3TR8qAXu3MWO7FL3wP5NkMNpnIUmTK8ev1WhJLWjuZJuC4QAs8y8ZphJloabZoE0MjB0jfR/Y2RSdsZ79LzGx9S8dxO5Pi1SSCG7U51gdxX3pB0RvOGDGzG5xTK7oUSK12jrGHOuUpl568lJzu6FYYUdAjHWyqXScgEGjSVNJnJ3RCHdLYGFHLfAs5DYtthvA2Ao9oB9MvYF1WmithQ+u+YbuU+a/kp9TtuI62pZyhtwxY7Dg7HrkfCglzYjdKWcTCMjFgplGtLmUEe4hLYSSKJvuIdkaJIb7/6Q67OugYDbiKulQWXcPedwOM6oddVugPJWpddz3ZMgYc4A9+GGzGM3OiEQ3njJv12A4Vhr5Vtwe0GTZp/mmwe8zDwqlgkacKGiLVu4LHMrxRwzQUnhFGD597CnEkQwaj/eNfUbSF5FwZjMaQRpGAkg/Btd5DZfDACqcinoKWL3RdWMxxM6lYsT5KUu1bT3gnPl+90GXMO+uTZbGjGhpbWJDDPFDLKc+sWknbV8MGM/Q0UaA7hQLtMtXGVSqP8U0rdxXw77w68fb3vw/KyXG5WzRUZ4P8p9OIDxVAxRWKmaBwqxsXUHipGh/sgFKYimMTDrhSwiWHRAFtHo3sAmj/33CdjlKr0w5omlLRQ4ghs4yq2MCDvO41ZF0jHh3RYhPk3IWVT3a26AwD4Md4bMFkWuGjh2Tq054VQtWG6X8F2LHqnoSwd3SFZa9V0bfBydzgmLhz+xIa/tEePIEqx6hxv39J5cHepdVVlrAyuns9t8Sj7NjN+k9qnMn1jqrlBJ/3bk9k7c7ThLj6SbI6CsjHAUBSOkhcnwFVpNwDPQ3046ARJTMqPB9rPsoYvxUnTPYFwcpkKp05UG1FN46hnRuwJJ6e60gRhT+eYNfCwN1SWpNyRQpKVYhGr0R2NE4oAxBClyY0fuOcah3DEHGsccVbPQ4AKNy3NnZC0LpllWcYaaXaH7ispLi+ik0s0R4JiHGpmyzDEs5mqMI/2Pmxmba/YO9uzvJtZyhQ05PPbggo7k0pGc/GVl84KnQEAj4gn/VUZvF1rEdiS6CDoOcpGcss8Z7TgUuZLFNNpRSz7agqGrp1xPWGePOhomTvjApyX/7fscNxi3wNgHc1JvoP19cIVZE5ZtlruEMBsWZPQJlrAWcshGIfjpx3VkU+fOrxBThn+PJtnKoSBcg0GrxC7q65lekFW35p04m+IkZHl3s0jheF0A2ZuFHboUbiOeeGIikktynsH9bagvKW/Fdi0/TpWR5MuqKblmDLmIGX/NNre9ct0unP8FA6fUiNczFxgIZLriFX4LKS66p5M8Dgyrufa9gvQLlxwSIb9KGr5Mv8bahC9OOBy04LBoAKeXsEJ2Dtb8WMp1k2HdGgPwQ3/SXt0snIJFusL2lhxjdmC/tYQG4bPJModM5cSwTfjORuldLWwcBNsne1a+pnwFN5sPydofIVtgumy0TN+Z8H7bWK7i5kQFKWw3f0lNLAgK7uH2r5QF5PO1CFpurWQIXF+DjTg5IrhVpDvYhob2XlX1Uy6XMFhS0drm0/MHfatglV8sIBtWU9AipvrfzWAbBd2vxMxrJDwtH9UGNGC8QmgOPNR9tpZvtqQ/xN0nNJGWrDJ31wKeR3Gp6cIUJDXEWrHJyHGHY4ceKfe96P1e38sPNhgHrTE3rOK5XLzeeH+SglWNk/30Yx+vtoo/XRNUuWwuGGkB3zHyDrA06LHl7vmQ5fO7kBQeaq0xpfiT2iltOOf2faiKKCopYeXbUTXii+aZuNjBiXzgOaLzYxh/rfL6vPiVrMXme3o92iOLWq+U3inSIGoFVugwR/lSlYk05qBV6knFPuMsqvcgd1isnvto1o7nWgV/WHVxyt4EDLKbvbzCxzE8QZawSiNW/pQ3HsGvunYB//lT0ChXxXq+YlHpSlVfO+Er4+1bVxEGe3o6P5/gkBq1koxLg1z0V5qNoYqy47HZoixTod/VupXnSDR7QLMaXDKIV1rryyVCmqiQMCKTbIrzy6CCEha8GhvCarVytJHjE6vJx+aMgMsOcLcIZOb12AdLTQcfMn1BBqakkej7S0oIGRkMaDFddEDVOuHI9Q3hxd9zUnsMAcJzsrtdWqrDwYYom3vWPeKYwFfa1uN+O9g24Pe5Gd14ZVnWppOYibgSjHvnWVXknPdMiUbJGuTLRKzSxTpTrZ2rL3TzbwXhJpwcJumr3P85uhfW+iLKlu1TDLy2ABihralQQ+7yLAXhAEIOFa0fTYEGhoo6UNBr2IDyka1cvhNn0/msbELGrSANZtRYUXOi2Est80JWtiHPG7yLUufZh2LNGE3f9IEsALpjC6VxyUVkfb26GihplGjykSrr0o8tJiYuUaaEKaq0IINe0+aFQAUN8tVx6Gxm1Rf9JVzQfI4DPc/3zdNb5ZuCOrs2aB6FDUUVUSynCxtZdHm901/J4Ru4aCALvGPLlaZfJUu2qdBFx34wYjX6ntD9lGE3Oe6hTSAfwEW17HQalf0oBS+3l6ma6VcvxISsAWWwoCbYW1pe7kN+kTkk82CeZfOsQETYAFL9R60XnZJdDpxWKneFR0gG0xY4dDbN78oz2SobkpUtjOUsD58mFkGcvbNciohCs04rpeCdFW0QZ2CxpO2z245666udxRzXpDmct6c2Sa73pF7MicQHsiBlhlgeyzij3oerCKrNJkHovk2pDXDNwxHd9X7gsl1xKGeizqqu4pP/FanSK74YUYR7GFCbsMOOO7OU2mlsfMLK3aNz2Br7VGWzXZ0o9o1qN2vj3qsHymorx+LdBvrfNwkkRku8Dz15bRDsO8PhhNXsUf3bQUSghgFlvOuMtrSRMrFpIKeRHO1rT1KxQLCdZgflQ5dc9gQpiBRtmec4RgY9IW6bLW9OB16BOIabfrnSmRD+Ci9+9y3NpsImdlhtdFJVL7Cm9XqMqfHRKRTc4tY3yPednRqlMYXdpsAn2wcaCz40AhUvwpobKira/lJ3+M9AydT8LHYLFEBXAQ3lnyLo2MQxWLCeSZ+pFe4YteEXnjPjWZ+0VVBdXLHDNV8rVunQMUw7rtXnq9R5MLDiMuwvvSLwW3JMBzc25755M16Tawx/R1Nz6otm1iipO9RDNQbX30APvQHSBYbZ8qqZdzxA0erD3lpEhMbUWFld8Hq41uB6zRtx2/nfqtx3G/MmZF9j7iVZ67umuH4TJWRURhwWO611nInAQHf+uJa71zb1VTQobWxiOqrmnQ2yvrU+I3OXy6NE+1FNMqT39aQ+NPCysHfqNjw1V2IOHdNV9Ts8PONmuDjkdJC3p2Dy6BxZz2T8rUtKNNkbtfmFlTlSvHvz3hTt7ehh/GCgLbvR8r5dQgWAHMOeH40JmnTs4whw8Ulbj/L5eR58z6/jZ8iahHZ22qseCEC+U3325gQwlR2rkqll8cS6t8eXy1PJFYnSq2LhT1ySUA6LgU8htXMTNKAYF8ekXU/Sqh+XvH54bpNm8Sv+VMJVKRPsBcMj2wUi974V5ePUM7jcmiXl+hLNBq8WI+eGtJDAbHTm5rAMrRElPE3dtirm0qZ8ZQsFQvmLuY9XG/3j8Y8ZHvmuJgJLs/Er72vE5fAZqzDIvJMzV38RxMvvQLPMQPAea729zE366ZpcS4L0RluWnWpu4aqeO14D+fJK++5DuaI2n7vicKgDfvDkyUChv2ZaTW5OrQ9ekFONDiyVY/THz59f79Csr5/+6qaedDWl6uyZR9wBz+5DPoSNEQUeyz5SBzfCNZzRJTfAhNUNp7ig9bMHYj32Kwup1oL16O2YwkWH95KASUlgVXUmlHp59en8AHFRUhh4ovNp//xR/zGVmKKKA54bUlthdcKKiUrLIjooTrV8QKeLN3yjpJG9yubIAl6r14FGZYq7XbS72CfjbWFvKhRPqDgsiW6E94X2n3j7aWxLhn2jCvAVOJAZ5h+kFKZDFWJtF6uxGm+0HdifrjcaP9O61HvuvdfdnlAX6W4R5PCXe+xkmAt/kFiZjMemFCQVMhr3YJDHanObfGoP6kRe9GFkWIX2NzTN3VUo22WsDpucnUNs4jb3H5DKfw5N0aeOvHYtmMFUtmq2eGRCxsNzMOuEZuSx3IyJu/zisNDn6A2ZEqmBZdgeB8iEZR99kDTg6nI1mOy+zYFqkeQ8SmF88FZcwpZa5/xZtqkly60iVitCoIDvbI4LPDoUmzauT7tPTRx35fOmgQ3q5LgfVLmNqTich6WOoGkCqX2N9oJplmKtDa3KkFPwpTTanLHsKYexe75nRySLePasq5tBO05HQegOZ3XkK8UNTPyW26OWVO267Mzzt9HrrPqJdxRSc6SJ5AY680OPywUKMTwqt6Us4PH2NV0CtTKZkHptqY9YaPc3PClLDhdOespe7NR28DWVBxmZf/tt5fVeD34HA5+A5ZSNyqJB9wn6VcKB7+aJnLYJcHHWa8j+oNSH6uLsEYW7tC9tOCh7q7QsxBAb0VZ8LEs6x4QtjaYZHPw4bBtDpNhVpTAEYz28wwSFe69g1lLMwYl5sVRzluniouFjwK8BmJn8PhMb+0oWwhYlb2Ivvrq+Ysy/7zeW6zMZr3/Ufmo/vO4aL990jTrofv/q8iLxIqXehAvVjlZVXGisNSMqVHWgCh2qsOwUS60ZoWKxVe0v9jsww1fs5dso9kzKV4tZPm8xoyp2qZgMeIxRM/WPd/YVb5dJ3UaXlWXhXuAAXwUprAVpXuM5QUU5HFZEYZi0IEITlpa2KyIVXJqIiEmGwN3GQv1aEBpIiBS+Z8HXwEcQ1nKTRm95zJzMwalpe8L1rjyEZO3JxznFoe6D+ewp3B2iR5qTt8kqjhQdHxjxFzO9yoGfQtN/JLGTPsRQbixVzZZT6YLYnTHOkfFs7Pq4Kwvn1PGzVsQJ7rolcxw4/YVREMbg+Fvjy5u38aAcwtJSCFG9v+HirTL91kofnZwuHrdj9LBulZ5J9CUzCo9DyxmGDUG0T4BZvfn4+fgwb8P+v9SQCHr3tGuc+IKG6Mlpz/mxq/L8Ax7TMH9edxV8wijz5CCCrpGeL8WDARiWLgX6VrhZbgIipx2+gAE9VHxqIht645vo75fkJ40yZRZgQ8Lk46LCPeX+3qkelKw0D+tEruzOm5anIon0wkB9kIis+iBRkFWoFwUxqb5I5xsu8/aZ9fWWRfjAgyHzniitoe+GIY41sxeUU4OgtBgxAHp+c+uuWW1JPs6vGqDNldAzuQv2IZ4QtOqbykN0lCLuEmcUnZGujdjgPXy1JU85fIaW9VF3XdSDZRcxmZTmeir1U/JNfHNichGiGawpuA6GaA/pg234J0/a8MsHH/4rxIie6F18BzCvHp75dGC5L+IS4tJywdfeM/dt3vhe0LuInggxwDdVShG2DjZF68TYFylsCzL/8lsjArMI+3PyqWc+gweXxbqwvK1ZQp2nW9wNGNLJwiRExAh5uwZJ6akTTQC3vTs1PF/4CVtjjuAFebbqnqXpiOCfCDdH8/1On6FWt0fC5qytQpLidAn+WWj0D8Th3iS7ri4ADPDJb52L9o4HLt2QAj93R9PhuKwnT5yG0dO0Cl6SVyAKJux9OX46vDoZ1hUzY4AepypzmPMlB+7yWan6hBLhvKU8ZS7LiSMDkaNGzfy4nCwWNFWCmnl/EdBeiNsUp8n6UzW/CO6cGmO1Yrq9QJCPyz2aMyUkjNGTOyP0YNmYlkCrgFepRJhnc1JIQa+koYnf8Sl4h16fYUEz9EPp1J8BryPQnYp+METb/b5s92UctnuyGrd84OF154shHUk+wubfzIMnPu1fvqmdfPRPvK4VWR82wdlNtg7n63ztjgCvGlZEQVhYJ+4SSqWIUUOpSJccSIuIjN/yj9Tm3ze9wpe4eZRA2IV/AWIKJYfwgyU+BPaL+uE7DJiv7nWh5RRM1gMIXKdzb+0hgFgB6gQcm9s5a9sSudEg9Y+4zV7Ury2OMyToajXdfixrNd3OpuCK+0HU/anhF9F6TMjboVUk8oXp/bshWwTpcwWCzTr3RPYo+W9qdFunN3CI+FRRZh0nokS/GpSG0SavghQXgmFzrjiicMfaqN12cs1X+DUYkYHVr99C6CICMjscOvRXwof59Nxjl0dVU6P+K+eq/Brm5oCtIGXa+09wpFLM46/DQ/BW+yEyUxv2nSZ7iG/vnXPr/Uso9RG1a6NC2W9DuxF/gndXoSYyqNkEXe1DRm3QbxP88Nl1tgPeibGe46nDdJRx1c+6NaeG0JZRx6BTOHsWOWqGAJOhj8bhXJRbEYtLdkFseVYILlUTxLq52wLuEIXTnDSwpYcOKT1o+tNzThDOfOldvml4eLnX5wNnunIR+I3YSNtwTZgzUccGHsxaNfHhtNRu0lXXR8l0rODWwtt6jX4Hg0QeEx0uaWxt5CuqG6FXJo7Tx2SwEGu6btILgrek0FJ4X0TatvlIVK5MMRb6qgpoztcWsFuo6pMR7nZ1i92CWNL/W0RNUOHooqzo+H3uMd4BiSowuxyXTubI4ymmTP/WxzWVL71uf05kTj/qXxE5T+wf6Pe3leMMF0VvR51AyGd5KVxY8EYcSTQpvNA9PnZHTIv6jK12fTz+QC9+c13YPzI78uC/GL7eOXkllmCfuEqsW1+X0LGjBpmQyQgwCJux94TbGVn9GefXi5MdK3PDNiThESDA3lWvnQe60R+PvXsT47zKo/0mZRJVFxm/c2tsmLw3PmXQW9Ubtw/9tdxrMRWoguqdrtYFyntBotlTviAiQirNjqTv1Wo98GP1iv84sgBKjDo4eFVITiaTbAx/3PBQ52DndrnLZAiqE9A6Dw38B9R3LvFi2qZfmR0jS9Q6R87mfw7+rD2VLDRxYoOzk3fOY/ILFyS6V8qjCStzQ8prBu+w11c+F2447azVOdoX1XZOktXpg4msIoREF5SETvHnGeQbSxKjDDwGtqFIfCwU8MqJVstCUwK5iWVJqwVmUSr5DTGueNVjMNGZCAUa87tbPG2USP1VX6byc+cP6KFxTufh5iQb/4K9SaxGOZNhOkkqs0qyfQR+jNIdmxldkm+vxDQrfI0rsfYFO7xNe9vu7izN2h9UHDPm9ind8lR6zljxzIdXYAF0vBOsgk4AHQ8OdMMYeG3/tQ7fIh7ZQAW9pZqQ33k6Z7OO08xfmn74sHcPLC1JOVmZ0R0UE02AQehfUgp7erKDvzQDrxrxRtSb0AwIOKNzhxafpZjpKINhhciaAP1K4TFZvVynVQgl8ie0J1RUUAaMsFsGSw5R3JiIn/GTt0E46pytjmfYdKhwW5ueLyjgTkuiYCkK4VFY66Fi5bHbybbdFMIq9XH/Zg8/M88hgrRIU2lcjEG1sGRqC+rARGlDUWdOwaHFxLq4OMKiwYhebzl0NMcwtwcjrt0UJA+2FRFtlfYjkASED9MZA6SFss8ez4HR8GeJ4i4L+ZBtZQVN0b4bp/0oinoaFwJ9mtiqcN8efzOad6rwRCGfQdjed0frpuvA8zzaG2nWvsf7H7Npw9I84C6dzKy353hCnDmmKakgPQ8zQSV15K42Dhg/z6cNPcg8lXaCjCFy4SQVzFIAh+jJMVFAncZiX38ePTDfRwXPrwxkeymSAftz1UFO5fjlJg0TTOgFMIBnTr6ZrOG0e13Qo7SV3WR8NWQh+SXRCY7p2Anqzy4X76EGtpw8bezTeK+Y78Hc+rxtqPFyDrPw4byFQV2a9Qs9d/x3QCJkHSYoOhcqavWehyJPOt0g63C2hUJVelyQsHhZNGDjZjJIo0M/KXZrJur8oi6NNluepMZ6fJQ5q06jw+dQmtyNuvhvQgnEeWWZVXJn9qm0EU0mytxXZ20AjYigXipc4f98d3WBJ62qeJLl0jij1Ki02G+TBPNxhqlF7zKCxJt6px+KcsXiTkpOUXqSjBdkHsspJdOYVBKbXnGQGVFnqpNGV5UXFV0EaF5vSy3IV4mQF3UMwp0YkTOCQqN1vs03G9SUg8LhSUT1t/cnfpQHX0JidSAJs2eZPdkx2lfjuH9Mv6bSstujxiNOzbQ3L6Jtvv3Hg7LlHbdrJah9B2Rz42Rz65X6VIe+VE/0s1OWp02DufCR6fGUzcCyc9ni5fJ1vPR63YGI3VpYfFXllbXfxQCyLIMzfFdYVvHiM0iZTZpKwuErg010jEoenr+sEs02UtCtkulN/IK808IVq/TLcDl12vFdwq5pk4+hxybB07WWs6qjejIsyx3KIJhHaxtvElns7hKDm5uaamYaxahde6QWt7cJvADaDJNsklcF1+3XEZ+UlyGPDmgLtYN5pEeV5cQngzoQRtv9uFoJkPuRw5VzB4C58Zcq//xEH6/Cs+m5xkO55EeoNuTjK9bjtafk/sVJqxT1j0sADzX4JGzDIUXrhmua1KIJI9/aYOfXYhoN94LBzMzQg+C2X+MIjFHZS9gqX4W3d2zajtuNUos9u8Soq9tqmq7XikHXbpHF+PYqgm6wsvpXkh4N5qkBA1r8ozIYdUD3rygZo5kz/xNbGK0T8Wi16j3iBKK3+t1TtQWlQjzMCM9w3lX3w+zqRgf7pKP2qC517do4Trftm/296g+TjibipSsfb43dfT+AnEbe+nxz4vY7h0CtPBCfLQ8Eno3H4AvIYd2kZzd3TO7Lngu1qufSeGvb43KV/XmDJ/rXm18vXLzz7y8nabsuOr8rkFRHrZOvfb81xQdWQsD9WJPwEkjRJIG62JKcV9uBE1ADOcLksd9J8GDbVXG6F2WFxVVJzxNjTpl0UPF5mhVp7NtXRAsRN2givJDglYDAYDdINyxHVVzAvJ2BJXo0ajCFjqo0I3TR4AQ3SsRegcDWO3A7ReX9e2eR/DaxwM1d6JT+9pQfMrF9fg47z1Ous06IliUK9miOFfsl90hdI1uY3n4hzrf8uokjejX22oW+gH0jM0dSdzzdp8Zo4v/JL6r8cvNbrdKZfElNhQ9b4R9AQZ+ng+pcmWYker6gNd7AZKQoBp2LpmAqBNx/NP/bVFbkb4jZKiofpufV9MgiZs2udr9q/va3mG90bCg5eAqpeK4qbQD2yD04hZZBZxPTYMcpFNqX/p5CN16B53LIezCRsNNiP++V92jXFNpyOXEf5SNSlc/++QpDMMwtwxCz13XqE1Fnlr76trAWMfpJUmML1pizEtQAbdYgNhrQX5KjTh1D16OCJk/Jhc5CzLXYoBkmqLfGMsRQDMx/Jh0be8+Otk3fLzRIPsdttoO3oe2A3WwEP2KBvvzIDB8ZaARdrXg6WeCHY+TyVUkH527eQuE6wCwEEZWKQzyccfn7FHx8XV6kRu7JUDEAmg4BGreuMqfIwRaYoN43y+LS9SKGNwA8Z9oyy5VCylqKKdPWCgzOzvn1EoHBVX7+Ae3AU/gm/Q8ze2E/IRu/vq+ri4Xq6gePtJcA8UtLR6sq3BBGWauJs6oxjh5gy1ounR1A/Z6SBcSaSRujD+Jxa2tvnrZtyBS7oii9p48upXUlcLt1qF8ELRRHJ8DbwmNSdinfMXS4t8MjQq6NM5GktkniqvvH+WwUsjuvrn4WwfS8dlCKKuE5YqiaZIiqvHfAZj+Vk2MdRjM/rUlH7e/NnEvbO7ofm9LmGpvTwWRbJ+HqZYfHzy5jrq09nEd+WPXkqi3gVJUyIattJAzpYaRaeHA8S38k5Tr9OzaPGDgya1VPPAMBpzESc/k0WfCCVg0ViTl/ehUf06XSakJcPV6E2wryDWZEbZtU5YxrBwNZZJyUs7iQKdUhXxdUKw6LMNzMFjRXXbvu4WOuDGkdPFgV6L3Sosx45npICRfrg9kMKpZfRTqVQJb/x5lZdHyICVnFve3NsTmi6/1nMeO53l5ib3fL3pITXR3EhgZi5ClmNGAXrgVRVSfX6PUITQEMSZNsM7YU/21lshp22ARrPXq98FWeuDmGX/BjmGQNwJBAqzgJudE2MK7lpMZ3KeadVrFwKzZc0uizz7pW4QrwIzy174L+DqOzyu/X7duxZtDSLR3OKEj7oqKcet9BLU1xJOeOZbfXDRfIdghjt+2q5bbwBzUYbgwptWg8Vp19JklVYUdLccRWXjSYSlGDC+mBIdFtO3Ruu3kTuhgloe5xP2DCfNBh+bk4vtzYPNOBbLIimd9PZkWPrBvKuhY1SHhHHO216vUG+1Ws118UxdtofRzOPV0Kd41N9Nb+MHraEkbbrZYhGsbepsZSRgNcmtZvS/LCGnlih5ypZZEZLKM/ddFBAmN/bqZkmL9kaLHfgoyoCtbUmxlwVuv8P6s8xXJllXWp6n/4rwqZwmaqO70LcJ65W2A/BC7vxwJ9QMjvVk4hPX4aUSthE9K8f1D13kR9cpZw52KfA4POyb8TJzFGGArYbZeY1TQ2ggFmoEmAGCryfhwzzkoSs/seFa2dZ7dGhC1KduQ+O9jCefCiR6CDDfUgezIdYhaipyRMlR9nVre56d54IzLu30J4Do/E7VdKVo2/aYk+jpeVth5BzM3JWDyZ85ndiHUhxt/CY2dd71c1IMKGTK0G0DJsFes9UhBiFhaf4ZoKKJTIhVViFtXUWFd7jFQspuDfDLhND1Azjbk7WITrijs4v9n/Cv7ovchyf+pNohc7Af+TLLTP2PodRuN252p/IWYGsmXQOgX7jm95R1EAFQOC60liq8Kdch/Bi2rvZz0UMQj7KKl7rXsDvF/cESL20fpa6UsbSeHEEZKBWUAC7vdzY4n78iRE7xxZBEur/uvhLbmy0dJ63OrI7ZKBGX/meYt0VG7y4RRvvsiTb5bWxL2o4/PofsOXJtNqVr59A1FzhQn/03c/nQtbTzKhsWYCBFpTXqArm8gMt3cKyuDGUd6keFcn5dTk1/lvSZlvZEWERydMabe5fH0iwRCtdmuM4A4kuagqcLQ4UWDefom3JrHw5R8l4RGx0cTYmhwgt6fLrZc7XHclcTxwQEdZuq5Lq6tsV+eWdRboyjs1EOKVKTRERiAmK5iXm/ZmGQ0/zUQ/FyRM6qzxVniYLuUs00+J2CNBk1VCT4COB9QNnd3IwTm3oaCBfmb4ye9wRhJnMekSZtAO0nHrFMd1znO+Zbk3FaDj8zDwXdFck1L79Ri62M4Si7Fvsc12vxBaAvjTK1xhizif/V8l7sJswVFV9ugYHMtmYMFyONWpt+/g3HDeg2Ba+w2CqcITpqwixldmDaMz8sdxnGZZGi9/JEhuEYN8jbOGaFks0O62Hd1rMF3oaKk5VRWuJ/vI2j4fP57SuVWThalmFeYcTllTQ1t3qFqXOflEBMwQoO2CRu1McO+z8dloWg8t0MEGqD2fIpADK5I5m3JTfo466drP0O0FPNgf5+ytZmx1zndaSLzv8sbRAXOwKLpVphR/3lZr/5vTW+IctsWO6rFHnpnhS8bJChNX0LsGsKct2LurhOo1Ykdn2Rn4TWbAmv4Ko8Ed+lloRdb1Kxbdlezbyvu1o5P3CzOBiZsMkOrh/aWzY5MH16BfN2861/6kuGx18gW9LvliWeHEtmN2fLsTwRMTuXSmDJN9Uo+H8u0B5vyuOP8xWfPZ7/cKfm82Qr468HiJunu7vP0O4ue22AcCtBloZWazpgDQjt9bt3wCrdfGAgFgVCi+qCrgi0/5F83BrZ2z75z8nddvG53eEetfuNCnfjBLNHcn50loF4FPZbhxEDeflN7z/G+0CY/xjQSrO6iXm3DLzt39TY0Szejt+aP4l3eQxxAfjpuW2PRTIRW5MPBBXH4c7zHNhDqL9LgvHNR5uG/ovf5XBeimtXyr6L3us0HnEThIuDtooUc8nh/LS0gNfIBceO45gOk3Lfnw0zHULST+JX9Uby+aiUb9cZdybhPO6iXqTjth1TgA6HjoCSW6811xW8cjmqrPkh147J7N2xXtt/Fyvqiq/rvwfv8OM31TXdByF223oQ3twN7bK9pjyL8mNm3b0Ata7tyubSOoRqSqkzveggaEIfSP6jNjGr/aTwQVogE0hLytPgtjgVAoW/tPm9uBX1pL6x2hq89tkTjfzN+2Sh2Mjzl9xulDVbn5F39wouH3wfGt0BMqZnaVvU3d9tmG5LK/eG6/ow9qxzNZT82trOlJRpX5Zj6vFYvBbIp8AhzQ5txdsuu7YTukTX++cSuSXR+1F8FHaOabvQWyvzlpT5ejObS3HANwzzdf/j3oT9v6UFs1716K0yXygRfu8Zml6A09P/kOuZqxV20To5tdBmgt3tzUQOPkvI4w/uO0NXWzxZnv9uxR//GyoZ5w6dqn62MP5i7Gbs3dGbnxF2gVd+L56P+/RSr6kR1INQxPSa26i/sDNNFpklKce6fBktmmM7nFoH+OdYosQZPESpr9IplHJczwUGL2y1ylxWGRcv7db6hWdhC0im/CFW8A1UAWIIu+A3arOd8MP5kdkMxGZhKyltZik4nDzi5WVze8kfbvCBlzi5WlpjeWqXbjTuOkw3bLmdmGYtorMnRmKS8oeU+XUSF1sOa9WDYr/XHGwAsjcKEd+L0pci92naR2NK+x7KAhMzoky7RVYUY6tTUSjrJXoZIdJYeq5dtiM+7S14jMsVQjQygqIXmf0lrnpfmtDM/KNg3jgIQlFsOu9ZFdSYchAI+uO8m1RK9GaWRuGZKshXHCz97KWVYLZQ76zNNglAffPR+HPO3Vu5SkFieB6zuCwHaoPxROzbdqdPmAv0c8dHNBFD91vhdoFZMow7df9tRCpHKJRaWRpMr4F/118i/4xi7EtZcU2ilwcWpDeWiw6s0jCBvEEX4cDBVrGxruWGxd2znv4mjnAuulwYeDuFX50s4FlnnWtZMe1s1FdAsOsGsqKRdqaynTNYqDq/rscHYjMzERm9gvZJkCU3xCgqBDoQNevD03qlaU7rClI2IdnsPn6y10Ka6mfcYmUt/GUjEUA+VFs3ksuww1P/sIWmd44J6dypvSzJr/r3pMDXwCjrNzjYh/oCbWzIENgCVO7V/tH2eBV9suVcbqBMaKJrpLR7KVb7COwS+0iDFzmWkyOg9xVKdY8hmgHzCnWuEreJ688Sewq6b97v+vm2qe8n/t8y1hXqJpc4cz4D+glvX/5JWC2KdwWCZP1AmrKmtpro9zLchawJy6WcU77A9yp7ZkWCyNidnsOz9RTOcijpczkcSpw4PTb3c0lchFgPC28knXRXpdJbTOp2WquW0t6XMp0Na5nm7Ppi5+sLkVBINsr4y/H7C932hbRldkYeTyL84E1WcvvS+yR1zW47XBS/84l37tqiX6+K/4vaqj7UFF+tzWXaq5gwTAsZu2x+rt4nahUEDfMVGi+t2m837dzHNX81Pt77MNjT1PpqJfNIV01NO2XsKNb20nn19FXxu48990+potUPWv9tdas4txnRtLCqvaqIuvGSxYrYAljo95Lkp4nm7NeMKglljcCI0R+hsiGVxJksuZVEsQUp/XG2e1baY0Z+985tsgCY5VwIr2pHYbiOFICocZi163xyE5JA4cLRQtbhRT8cMDbq8HKLNXBJyGyxqOPeDL23OzanntRRsQvGuPsZm439v5HroT6pCjsT2vmtb3tMdLU2GnEbQb+RRaI7ssmCkfv5DRoy4zHiu1zXGp52kyklqVWamnLilaicJOmNLAa38xet4axtk3yHC57EJj4UF1BM95L6DLBFYxJUuNgxngT8rFpz11hBjlBKF7vc6tTRIWLTT2ppeiTIMGl7QUR6v5VRVnkrLV47GpRaQYDHcwqWVDLbchLChWUnqooM50KZucm+JIaf6rAxBkbfjxkgZoGHgQ/m0JGZJhKIDJMq99/QU6WWarr0fMqSkosZFPmx0wwxefoPk/s+LDx25KjPilpbM1c7PB92J9a18gjQGSPDGhVSzCMPdkNg96tZNwOfwBekDiIOISfacbvoCzmkry4UiM1Wg8XA0V2LdJSZE9kA5BqzZLl5UHnWBDqtT7xiZ/wl9To7E4naIzrUqhqK3L6FjYu8Zq+buVbXcmO1GP4JOu22d9qt9ZLWf3wkV0qzKqmmmoNx0nqlE1QApDf1gwlPysmWjdfelt6c7Wt7Lu80R0x/PB5CppKBxB6RLW7z2YMSc+FsXRf5iO35Q0FV0TtR2N+6XIEHlHvqdA0QG/yCv9z03yC03v+lC7zRLUne1tR3+5RzojGtCEag4FLz7/bvbEWib3+heP0wgdDEMNtbBGOCJcIqwOKMyMqEm1NqeNeRO4bYpUqUdz/X/Wh1HMT4vTf+8wZ72f5K22C3c/LU1729GV/vZJcyfhyrdfb+y9PHvtxtiXy/uuf8Trll3oW98aLigmbmVrYkKMYhnSvj1euwwXKZFLAgSh8sqQPSKBG7hBqziI45rYu31W5lJw1qdSvYuahAyq0Rwr2neHHsuM2CZW95NlmX0KJadGou1EzAr91pAsdeZBQ1nxxTxJbdQ6RcsvTUBknsNEkzKjN6+yz9b2LNwbgbRq0es31U3ry4aKy49MpgoHoDfsFMmUGSIpJO/L0enHN5cpxSlZ4/5GS3205dRvuRF+JnsJWNUN/4b/H747iF5rjbUqkl9dYPgYuw3vRgFdjAS9/tPw68gl2i9yTATQkhrFawtE62EUDIiX4rEslUPawl173Sgyg6/MFCri75QkGKo5skMwzFyUc5S7zbgGhJnmrDKD8zoWG+9/LSk5qWksH83ySudXH8qhY4yalDZfypl3x+XVZB+56WhVW/10WXXxoYYuW3YsiEBDa9zrGGQ56lAAr06Vk9n0JuqA7btyi4/N+bsD6h2kgDQ1B4/Bd1PPTq2fAutfnA9CxqGt1pTNTi9f33q9UbR8igW8BA0l57N9M3emv6yhNzf5YWVF0tNeXQXtpXWWOGujey6qAXVQw1NvbrbX+QwttHm0tq3957JAfUd/es+lF5SMaSmPwTqbxZ2xdfXs/MUqEGtx/1uubIvJXgzCaB3PKrP/3ruN9/PxGr1zkB6wnsC8U6odzZbf7M2B/AfVRLh0DXXvzg2LUdAETixLubt39g4CHKgGXqttptFWxXxlGBmo/UMaxyEBBmETi3fCePYac0yBhGT0Q+T24QKLh/oyLc6kFplWUShq6wpqOJxYiVr1p3tmdWM/mQUwEJMJevQtWN0Uf1qt8piA4VSrCqraXWcynaRlW3SBB25Nh7SElw0vjoR+VyBIOElvn39uqexciVIoknBW7zIuh/R5zF0lfLG4OGPPxZrhznmHDZsSboiOhz3dTnw5lG9QD2ldGhmLGg9qgWPXQN2+BQYlatMPehy4NAXANWN94piQxxaH8mjnmR83pjdSnIjRmRJyKpkZ5ThbXLAJIinQJIMVlQJrFUk2qYCOnLZkTF1zSVOpGZhP1pIznVoCx8ximTlpHGQwi7NTgTUAHe64O+fFdRUvc3kI3e5UGhLcYeBzens5fGEvj9nHgXmame9ql2u/y62e0SSvbIrPvN/FyxNA8A+t5CA2p9iLnrBMsORMTrZFJbIzHdef8c2573Zv4hM3+0dmx3b8D+mpfEfn3Wwwf8ur3gr5jQsLAT3gLFyBIhvplS7jErw0DIcDgJC26AK9qGeZMNGNYFhc3BFNTj8sE45L0+SHx0WSjBFp8LyUrYI3X+Hrh4Lxf2S6ad7iooeFhofFhsJHDxvBAlrj48LCh8WexaaHD+tLip8U7ZSqNwSknZQp0g/LheMS2efwqlf15Qju4kKpLiIoxsXicYUCGdYqTsuDSY+m2AnSwtT7NQHetIaR1PJTBlPV3Ub/zfXkojFNjaj/KEWtFoy4RmqN9oJhad52/7r7JoPy1MXUekL71EjP/jODXV3g2t8TFG0ffzhiqgRjFQunAzijA3Tu+7ho1w/S/yyXf99f1lcMfEWll1IGnuaUN9uIZXh8BTmciq8sx1OSS2PaIwJf5IZI5fm7QwvD3n1ixa6jQrg3ObmUAJF9ZXhCMkNvYND0egZDr6cJPXDYAmlISDAgEmRgnlnImRKfTMrJJaahbTaJmJtNSlPlAncK70A+Xf9tiBSDXAoibkcWy0fvp6/WkHakh4jS0TApQW+IRZDChPjC5G1kXVD01mpp3motyLXM3SzyNCR4EKNKotAgA1G0mMmWZ9KXlO7s0gkLPmhQ2pTI4EL8LmlKK5ccbdDFAntKXy9uS71xS71mfrJdnpZ/GLRYSn7SLs1JcHGJXUqJYWkLqbuleXnbpbKs7TfjmK53XmoGWG4n/tHX7ohOLsnx74wgxn0IuIAgrkPw5WX0w+BKoju+J3bs2nK6XjdTR39u66a4WQT2aP/X4t4Egq0IaELHaBAG08j2CoQEuCIho16XqarTZSTAAoqzczYjs4WBxGj0aEJyioxLY0nZVKqczaIpueRruGxcMpUn45LsyeFhCyhv+zh4maqYHZH5/Ogw3gzUlLWBVACwB0W/8ix95ywC7ar8bmMsrOoeEHKZl7gpgtrjBJ8qG4bipOadQr0HzJmgniDcEm9HjVYT/An+kQFOrIU2lQ7/fzdZjKXQlmQIw90y339p5kbH630rIr0LxFCxcQ1ysieYaOgJrnTZZErA+ta/CylScRKrq0GeOmVfI7URSA7HoB+3NFMYxsh8/aWFF5XQVOSnrCgItt2wBnu6O4SkE1KB8jXFY/0anjVLqzkJ1V2CKGvyV9ge/3gw//ZgTDI9noGKw2E0YZAhJCTIwJEQUZpQFBhiUBc4MH2U/rufWepcE2EBFmKd4K6nkf6QB/QtvTbhRujn5RzuLn2Ukjlaxi79J1NzgE3eNdLSa0ZvjU9ZhcoI3JrM1MVoCgF7tvmdBRNwrGXMKcwcIRRKZ7s+q2QIyxAeP44MM2FLd9KbekPIiUMDKYTeMOWqkv3eyExM5BoYyjBZppB1B7UYSDtHzs0lfrMGSUqXLCsefMiaQyt9sgzKgmKigw8p4Z55PggjvwmMOgWVQjB6LntwcHR04BFxGMTgDRxBGo5j35xly0xHUn53QDwHrMzx8Cuw/EpB8N+pjwc/HmynZOmEG12Vxmr/6Yi21cZBCnwzxnB/I/R6dPQxQV1ju+1FGDiiQv//3jPF3JKTaG+bKndAR2le1xgS7rYFAhiVKSPEoedblvvWFW/57gVXKtheZw5+QTy4YSQCxvdlNTmdrGvXgGWjWARFR75G5gyEghgH/y0rQxbt1fySCWJky/nFF+5FqHwPUQcNldUkWnGJ/H5JMDq9mkyrXjroPSjHTt4Ts3QX7u1REg9KOusEpD1NUeHRlZX55Dxh2C7SYBgaZA4/g8+tVfEv4Mt50/GnU2ZV95p/auFDIl7Sv9nu8mbBV+QJ5P7Cr+MVtXZH4dFS+5vr/TIfvQ2H1w4XGw7pgrJh2QV8tQk/KZeRq7o6uGRycJmqgWEGXSYT6nFXnRs8eyqsd2jqDPoCps0tA/pbdyy7rKm5nL0s59tva7T+ZXX1t7m1WZcvL/nt187COieAdR7/4UOhe9Y9YW4cWaxOdGRufn/w0MT9sTploaFji1+6a9psWuXgZfbqvfeELaedtImO9kULO8fJaeLuOHoxianXlW3y0ncF1B6ozlNN3OMB9p2yw7tzasL7hYI93bWq/t3CXVfFuZeryrgzF8u3EXSDdOJ+uZLUO0jR5hwkUrpVGbS+QconUQ6mFF4PMc3BrdBjywx8CYHIRL/LHN1EsLo3V/e4heZVGLZ3zI29y6PAacTni8t8hy8v5X/qPoOqQmplfurI1WbWNg8WLIchr6TijyPgSwsvo0RRnZhxyMvpJBErjaCXY3VORUt/dsyM0XLjhavn29KUC5cqaFi+GtRmeEjcs5zygjTljhlLf3ZrzGhXJSo9kobhEwgkPEiC9eu/zP5pyqYZukIN2TvXJhOw+V0Rz7z3/PjPYUadP12+U5AVkLx5I1pn2PGR6Zu+GtopxEsGd0T0xCPb4DQMz8bBM8VEJdmMnyetSg1SB5avDs/crFYofft7QqQZ0EqrrjSwyrchSbXB+EV71s+L8iv79H4z8DHAPD7mTdLRubaled41DaHjTnerDDOB/I7RxqBE8n3/7JwSP3aTD9gtcDcCFi76oEt2qsxZyIuCf2GlUDpnOrJTRxVyWClNPtyULXVuetlaQiwM6Yqe5PHZTUfG3cD6CNi36KNu3UIc/r4D8Ey5c8fiiPnQL92eetlDAngb+rpYS4DVqNmQBqodXVZd/aRk899aa98V0LAwW54T1gZtsHBHGuyiRdeqGzasGoO9cF0TXA/BsrXmUuR1hFQhbNdygI6PzTKH/iIn9gqdO2pk7nIlBh9bQAo7wnDasPJyen83XUguj5e2rlUlLvHbuqFclFffWvS1HO5W9EMHCGwETFuPcO/I35N4C5d0Q5kZwORX/V9X1nnXf/Af3po3rG3jR6MY6diOcLXYswf+3gBqv8oxAvz8S7nOe5C7doBexEHrRgCOFpHwXxgxJFWPBAwVnmuoOxGiP3udICs9b/fJP3zeGcwmGEN28152eo3XqB1UbX8DzVDSiSXBm5FSb+Ru3qcIR+FRd/j2OLW3hBchEDZ8lZQKc5XUQL6g0CK6Q+Ak45anR+4JLRMWKGmB3ADvzJACh3UIGy7cDlUTjX2Mkq+kB/I49ZZRZqc4EGZ/DS7m5QUaeYIwWvLbVKXkFBt3y8ULUhDpBfI0jvkO7NJ0NBD+TaCUhqeCvfCv68M3b+g7mhqbweK3skbhTnMKA9NeyuLn7W0JKQ9cbUwuSsMQ+CWMyHYWK7KzZDNMSMMiBomf7YZZmZCSpJUGbPXMqErC0RLW1ISHa4a1xlM9LnSSYLP7KemqixdWvG7nDETrdNEDHHb0AWSQAenAZcUBNid6gEE1iyAeFqQOS8RkHU4VS6yCYbGESa8N2BhhG9dAF5LnVVhFPl9uG+me5O+fRIlCY1tzlTQRaV7lPaywjfLQMri67azcSAGXP2mB2ibkr3rpX8uBDgdi/t31RpzxWrwLxIKbg4wvsQHHhaumqZDT3P53KrwnYV7oXuirV/1ho3Svv7Kn4bWx3v6LFSYJ5s6llvBPLLrYyOthc3r4XF5vL4c9uNjsYOcTw2ouIb4gLq4gPh4YYLQ9H9nAAMMBf+xpGAGex7XzqZ89u788CZ2s8o9ZKSQMLMQt2kBG+pz/DjNOzY/CwbBTg5JLCZb8b2vkPiLHAYTzd+9E7IYc6rz93k3eHV4qeA76R6Dnw7/2LOcDselu24K0azOLnM0dooUjt0g1R0+75/fdSkLaNDkc6x7N4+lpLkl6L3nLnrikbAw6FwcxuTno5AhjyCpVijFpZUyihL9tXljwYlSS1Rbt+54jvzO2mv+s6J2k/KFbK3h3sv+tYE3qTGhcAFOZtXtCuhoP8zlUloiJp3I4dKaAAZJoS8cildFrhOuR8UDlufGrwBD8HqZQy8QCzjDZl1+KD4puWxUcHBJJSGB2bh+RLwvJTV6ncI9cgcduMDzMrTxh/VIrpiN+M1xiO+QenRztGOomE2Maz5ncE3VxWYvCp8NG7F+EG0WYUEalLYVVWkT/JhSccaWmynNw8o7LZMQwE5br6nMbBJizVQjwGgOa2jAWWrTSvTDFEa+tZJVv3JPQGIwvTIjBJbcFpdH1J5XjMoGIxlHqRoIY9pm1y7qX09GUxAZ/KqGadk4hV0mEwvKRKB9fYnitKAHnA6hwKJwq/iZZWWFPTXF0MpaKy3x3xdYFxM3fRWASvFKzH/jDesO3kvOnJX9taJN8ZSYwIH29rPjatkHyF4PF1y0gtu0Kkgvl7jtjULEe2x2ap3r7Loook3D1LBb/IYny0vvj1CNYrqwsMDPRs04axVhl51cWIEuOXPfh8U862prImDtXcinhP6+4T+/qoz8qWEG/jwz4VxQ82tvvo4n+iMGTB6QnKa7yoWHB/gLB0B/obuu8flVi0O/k+sTXkw8hyb2avp8My/93Z0nIDSC4oe+POD6RT4xF/KmVWd6LRNyTKVoXwnI4fyfY+6cEqDupHSx3YnYMjllH/jqqQLwqJWUz9JHOL++DrYasm9xRTWw+u3kmyg8cMR+HAOqXdNZuplwX8FO/xJWtiH+kfV3gaPn3Jh8Hmmo138kCKAV/U+vxBbx/hARTiYe2/S18MOR4gV2fXfcA31Wx4mb0dO3IV1im/LdQMNderG7eZEz5n1/WR0+eLMf++SkYD2LLP3/C5uRkecznL3qT5GuCHY6OOwqSW4MRo1zlnUA98DDNcFveEwsHYBT5LPDvjIp7etJdACFeD0WofcqvfFbVJYyFHc+ZCwHcYmx0tNGZLzvQw++Y4FqgB4O1ae9N1qpBPx2nMoAGsOlEnLJv5tUtRkHlk0L/s2VRCH8QV1+zvkl9v35BWRdqffngNAIdMz1byb/6QMDgxYfcBms/YgrpXOTnOGExzEAAJubeZmgfvQRPenahE0AqtFS+no7mUqOjdG8gaqkhzSnbHbYtzS0GTXiRJ/puH4PKOXhgUN6hPe5jMY/0ovfai95qR0uH8HKa+MUDDNonuqXTVqc/Tqdzcnx4wG9btpjPboYF4AXjeZv912PFMHlsADzeqSD73M7KkJdv5X8HeYtLNdceo0815+hhnpqiFPA8BNtKSqPJj9lfy8g2pYOpGrFNwGzSA6aKk80mTLYcOLIVvdxTBYReCLs3VH2oTwOQFU8CsOVn/20mM4WpTKNKK1tn2+A+AuahYWig0cUvHnGRwUXlWTJqdgmgelWpAzrZNgyAX44Irp2F3Lw370xxKBo+nI8UJwL5bRdOaT3UbmYKh5M9nzK1MxAnHfcC35GfkqPG8/4YQ3L0jJ/yrwpcNsTzA85Y24VAeKMskDZAEJML0hESoI537XdWq7Fo2zEc3Qr/Akm+mc3ljk5KVij2DnAhGl15W6IBkE6MiCs/A8Ab0CG/NXZAOJi5u96Nn6kEQIv3ZZYBgAYgpgYAAPEWAEcGBEAAxKoBUftufl9Rjn+nqRhDlcfQP4dwe3s2lHZZX4N/d/5QAmWnRj597T8BQgsQpVxeDy0IiADIBqkaACRmx3pRDRLNUiM0faQLvaoa5BnUVxShcoqwIkxo770do2CaEHaHolxd1Cl2rsaXzaINoKuYohFrXYjpeJO7FrM6MRZVHy9XNVIM0686JlVC7ZS6WghrAMiuEwyztMAkLmNssPPH1WoBII9JnC/1Uolk+d6SUdkEqUkMVHIaPFcU87II4IEKinB0alrA+66qvm/gmppK8IKmubREgPqj5Q6CGiWl1aSba7mxRlNt5a2ojfvg5rkFWCxgL4cJMQbGOe1W0R9oLjEkVpZvtZFwdmB7OYTNJSHqg/ZCrrXWvT911PAWsm+wBc57Vuw3LPrvh+Se0gCWzYzFPkjUw0vqf5OlOIp6tFwrBUmpra6pGtUTywUglokaNALriQQcp43OUqVmuts2Y/rSmUeIzUAhz+A8r/dC7Ryk5Vp5C9gV8XCJWH5k3d7NOAevsrhb3zz9CHWv+MO6uoHeMM5TMJh4mxJbieJBKcSbYM1B0m6WcaJrdQbPgBi+c35jlahI4mjf4hQo9+hRGECkbUehp7yWVjT9KwW51BpZ4DJzWo6WcaQzc4RoABorjlBGDGOmSfZ0vDSb3mH8IHMItrwRQ4EJw+WBMBwv1K25rrv8Ifyh9UDqBwJ9WdA2LFR3huoiVff3AnHJDLNo80ypeo7pJvkOStxMOwENSVsytCdgXP0JYUBNZWHBWF5CBlTgguNK6KjPzAiSqjg87SWujR5EGGibZMVECgAfiyl4D7XMwDpIjm8xgbCVVpDpwZ4GkH7XFTBSbVepIUPfaCLcqQ1764iwf5gmV7Nwjj/YGP46IADq6b87CD3/b2YANMBySMT4AknTyGFST3rIHI+hO9oE4Y4wQq3EWFd0u4XepFP8OBbZsb0jJQ5IXHzLFUBqkt4L8u4V7ogrV1wJNL9oujXmAdIh2oo+KLxe+L6wsfA/d4qfi8/j94seFv1bPD6ZJd8V/x8iPUiv01u0QyXd0mP0Kn1Gf6b/YHt+jg/4Lt5GD//CDgzfcpAdzU5kl2CXbbfCbqfdpN0be4J9lP0y+z779yIfh3KHIUeKY4rjOsczTtZOUU7rnK47Y52Lncec/wsHYBdhl2EbsMex71zYLgaXbS73cK64UtwYnonfhH9LSCL8SBgiTBIeEF4R/iUyiRpiI/Ew8RXJnhRMqiL1kn5wZbgaXPe5/kP2JOvIRrKZPEA+Qb5H/kqhUZSUfMoqyhbKGOU65R3VmsqiJlEbqS3Uo9T71DmalLaB9itdS+9zc3PbxPBglDIuu3u4r3L/4FHsMcB0YmYzR1l41lLWFFvDHmR/4TA5qZxWzg0umhvCLeP2cie4v/PceHreJt41viNfw2/n/+Cp9Iz1bPA84flWECwoE1zxInnFei3wOuPt6V3lPeEj8En32exz3eeZzy8+33wdfAm+dF9/X4VvgW+Vb5fvVd8//Oz9GH4Kv3i/DL8ivwa/Rr/n/lj/WP8m/4sBlgH6gIaA8YAfhR7C+cJtwp8DZYHVgfsC74vIIijaLLod5BSUHXQ66PdgarA+2Bw8EPxcTBEnimvFPeIHIY4hiSFbQp6GBoQuCx2T4CSBknmSXEmH5DvJJylHmiftkF6X/jflG7Yo7EjY23C/8Mrw4QhqBIxojJiREWVuMl9ZTLgkvCp8PPx2+K/h/8hd5cHy1IiMiPKIYxHnIu5HvEPbK9gKH0WwQoYWozPQB9Hn0VcjLZQ2SpLSRxmuXBipidRFtkeewThGsiJjMDyMFGPEHMacwExhLmMeYl5gpjF/Yv6JYkRVYLOxzdgR7BT2GXY2iqvKi5JHZUWdiJqK+qr2UQepw9Wq6PToo9G/xHhEe0YnxhTHdMcMxIzFnIsZj3WKSYnlxWpijbHHY8/GXopDxrrHZsVlxbXFHYubiZuKt4ljxQXHhcdp4onx9HhZvCq+Jf77+JkEp3h2fGg8TBAkNCbMJHxPUCbmJOoTxxJfJf6e+I8GrbHTxCXlJZ1Nupn0OZGTuCL5RPK55BfJvybP4ry1GTgBTo0rwBXjKnB1uO/w1kk6PA3fge/DD+PH8SfxN/AT+Of4aYSc7JHsmRyaLEdiESaSisiRLKQGaUbMyAFkFPmV4KML1UURcAQaQUDIIBQQTIQxwo8wDEbBFviQ6JbCSSkk1hJbiaeJPxDfkSSpChKJVEu6SbbSB+sLyQpyFvko+f80v7R8ipKyn/KC8htlbp503tKUsymXqAiDs0FJzaPWUm/RaPN95i+nfUv7ZgRGS6ODEW+kGplGT6O/cSW9hF5Br6O30rvpA/RR+lH6JP19OiGdmR7DUDH2MSYYPzI+Zfhn5DMzmRPMZyxOZkBmDAuyWCwJS8MqZd1kk7P8s9RsLtvEbmPvZ4+xz3Dssp2yvbPjOEbOKc5VzlPOay7IscoJzVFwES6Vy+aKuGlcNTefa+AauVXcRm4X9zr3Mfdjzr+5frmxPC5PzFPzdLx9vBreQd4Yb5I3zZvgTfJ+4c1uH8d897xSfjf/Xio3vyi1J/UXAaJgteCQ4J9C38IFwlHhM+H3IkqRtEgtoojYIlXz97BWVC1qFw2LToouix6LucUaMUUsEk+IX0osSwglopIYCU5SLTkvtVqAX0Bd4LNALiVIhdICaZ10UDotY5d2yI7J15Wdk/9XTi0PLA8vT1SQFSqFVlGiqFL0KIYVRxWXFHcVLxWzSosKfAW3QqYUKiuUjcpx5W3lE+W7tL2eewzgAETABYCYeDXn7S3dj+qCYpOKRAItV5ZYXLBY6cV3rz/p2BVEm66KDe6m4Fits6L9R16yG0L4Fh15/8B45Juq7R/jOJOoGJKtJDFRL5mK55SWrFSNPbXb0LB/imGNqmltZLNxxLz7BIfGtr1bYLopKKkgUKCiEEUQsXIinkaIx4GlCtPLr/nuG9vf3dxxMn72mFhtWWj2mAUHzutbtwsLn2s3S3BY0j+ulktYn3RF1y05wuMpMxI3XN6fIsW/59OS7rw95UFJkF9wlR+41+fkE+XzY3GOn5x2MBmBSKQyW7kBRqgdYOUWc8qAdvs5IbzKRN/+ngjRvQm/6mrMT5vPzgZnZitNj+6slE0YUexyVcbx+T5cmZmaiEZNvLzgosDUXVBnqzo4dnufVOhrJkqQ7g5moCzlHsTQb22puxWXw4pbFNWKQeBONLkhuV4JTX+R/mMEQxpXXwtl02nKK3A77Cjpjk4Dm+SnD5fDmhBZWEkRzRjVMBmm38vtIftNYtLZoCNKHKRiVZNu5NOEGIV9E/MRL5obj4dOaxD0FeT00HYJw5Rp39kekzSSJNe6wKHdEOkmeLUPTRiujDIlqPuUDXHUMgKsB2+ICTHYdGEKLiGRSqH98+53/1C1FhLio7Fo0A1OgH08y5yY4Y3PStNNhMMlgA3gdXGXu2AAHCk/A65uYD2QKsAgMfn4bLIe0IP+411Bwd6FBhje+8MUzbVCHac5xOIjm6IZ+EdZ/N3IU2BuYnXzk77RRojbnG8xTn3jCeedkaODVTyBje+yBPVG4SmJh5tnleO5HbdTQ7PZ0YgAK41jw+XgfbYUX3q00M5ZKMS4/TKNwrawGaOezOhUXEwbuNR+XqFbFFYNJTsmQOrebJvFlxMI0bhmzkYkl86rzGW26ywK6c6oGx1aF2iiESKLr0Q2GmOID+oxYad1LTipY8QUVmMnn05p57fcTWcrZqIuIAdDQvb5ZJjU3sO2D43RZiYa8PpmI7G9YEwumYEZy5BCwknh+2B4+BTlZyqa6DEbTUgYnJsKds5ieWNj9KxUSFiZoQCiOiZP9JjWFq90JEVahaCtSIaVG46oUNOiiCgE+s9BO4m28bsMIfFCkiLZw1pJmalYKleLhl48OmJQGmS3fPAv+jsWp0ooUc2YbzdXc5+Zuj3FEXPSYXw6aOhFiZuC4eFSxLIibpXutUbe9fnThR6P7v6Buk62A3jEKPJZBBYV47bBpaipi8nLLT9p9+vwemhoKebqoRuXfK/2HKBMLs4ygI+1UXv6xwoGSwudAEtekXy61Liu7dFKlhCPGz/DQdlX0N86f0FDDcCQtNeYGn52DheDNsHf3Ic0Er1Q/lCjYNApZhKRoJIi0DG2ievY2oWoNRDDHJUFZhrwY1PZe8i+ZIwkyI5LlkN7/OMMeW/A33zzpWBPtzSX5UrGTWqSgmJYdF/6m+pxe+g9/3ttVw6IUycbQWqEGuumqX3HKDotG+RvFbEwuX29Nm2tR4vDNNAbsTFL9EhyHb87aixnbd+td6WJIAatAdCedoeIdCsZBaj1k33j7C52Th0vz+Qaiuc8I5WWXzC6kQ+rGtbZrW0vT6RWHu/lRwadtIWJrwJB2l5JnC2S6irj5P6RjHRG+pBAkJLDFpSKGE0GgayPC5pv5QWaQSX6m1YGcdZ1SLBW53vYM7cYRGpI2AmZk0aIP9O3jbvfE9F+Hos3yNaE3987PfsVT9PK95Tj1CuCdGPR5CfedJMTFLqd4IrvnxUMFr+C0lIegl/9SY836wNNCs24b1BdEySXfPKLh15VbKx+d7cEoQtKQ96mYDibEA1BLvy4GsqAZq8C+bvI6hTbgRcEu4pLNNQiZ4MzsagiF3zpEJTxCR18IP2GINuxWfr5uS0P/TJIIwOny9Vwbv2chouTk8VWLihWZsvVSwfUkG/536E3P2TkDvZKjuxz5TJ8SlXyX9IYxlITGWl8NDHyisBqp2RUN8lF4HLAtyQ01k/QvEMtosmsJzpePyqDovpdbSC3+abVrl6x8ONpWstuupNmDxjHXJ594oyqs+ysecfK5BoHxbscgf9dt1ECEMAidWLAzN+bxXGktxpAaCGHm8TfxNxxHTBmXg804UIvOGRga094db1pbII+nkQtC8f8JL3LuHQI2vohAMXsaGSQYETh6H82tZ+JI4O+p6h+xM9i+5k4VWloHtGaNJ6GM7PuWkkXsveWO/vgsuoNO/Kw65OMTRdM8Y8y9W106zxYVGHJkTKoc34r6m/uKvMWSTbPFV0HeT+kJte/C+KgMIQiBjgU9d/nfMgbPEdhHwO13APedQpwBBwCvTa0X4aHN24MYXq5Yho9/bfMLkybV1euJCQEMp2/faur4++ETvFAWxg+g6V7Y+TmP5QyMI7x9+bjIG5Cn6gDmpSWKJSNTxIcmARYf0KjvBYtxGsXY1E0Gtnlcr2X++POWiSGjIdyT+qLMnfemekbLWQ5jb+y/T/FQtyre7ZzjXgrIRqr070vC7tUs7lGy8pXPUgttPiYYbkC3ohZeysAajZ8nMORjAdDVmaB5Lgvyju/lJluutUbCx73HM9fdY1s4y/FHa+ARB67B2o+p0nAT3zCjv0Z0l0EqqVJ3ROybfIFXUzPd3n8Tfeo2CC7fRTWAIcylx8ihqrfVf9glmYPMS4H7PW9pwRupKyshUcB7wMID5fXkxoJMQmW+cbD0WS0Ua/nU7unN/TKr2BQT0awiKe+Trm6HSHWsGFcmbW0z69b4L8T6Kbdvi71eAxEPUEC4JaeZRUww9odit5YP5uy5/O5lWv+Ekx3Z1OZxblVN2rTraGdTCwojx6FTQYipicEQRTJQaefcEJ2i8B2mAI87S6WSPZ2C0gWtlg50tBIkgmZalqZGbM0/lKKZ72WCoeduFvQ02HrNHWQDNqXUYCXJ7lJmb1vhnE6RGX6cZ9Hq6SKmy1MJrjeDSF6IrDRzqvYkHF0ttTfv7rGiVYlrq066HumxOHsPTyUyQdH9hV49hB7fa/WY9W+eJxCBBPDJVQ4plAM0WIVnJG5CDFZG/avZI01TcSSwALNm29aOSCLaGly2w3X10kNAyqhUWApIsUoRnrgFk62ic7cfu9e8a9UFrqx2eKIGktlUd8kFla8X81JkFNyJlILEByBRGynNMVVo1vlgDvmHfIolRwJioL3KLMFuWSUoi2+NULVoRoZ2P6zJ+AlAmO09BYBUXW7v26wPwx7jchVD6Gk7xZIKmHgYqgpg2/7s6h2ouKSMIDgNnRcA+brbsTXndf9/p7t0Qmax1UfPOHZSdhGmOdROl1t3/JqXaRm1Nrmt5IjNl4W2PKhIToW1icnKzOa8fiB4ZJ0oT7dKBdUE0oILVwmfTQJ2rqNgRjI95aW82xmhjXsd9+aA/yx6vCipi4U0yxhEpMkqYbGa7kn4eGObIsOorAKCgnNbuDAsvW52wYmxoE/rlRBDDssR7/9anjKnUiV74njQZMasi0nF15/C1MpUmelpTwNNwNPF+wjufqiLmm1PdDCZwMS4E4ZFouZKUtNgkFQNt8WB+z2rzJDcEBX5fL3Pq7Vsd2PfgYm2lFsfbRn2YPs//yCWOoK2G4h0HPI4cCEKajLTBUnk2tUqgg1Bx1iIH5kkhK3K9DPP1wa8eLuJJ4uCBQH+wr4CrAWbAfrkU9U/VmqeKUSVgtIm007aMc8eKTVCkVe76DFTwYFZDXUyysYWkMDxQ4bP5U8TJiHGy1jIXDRpEugUWvxumt1ezp8VzHogvVg2q4BYIO9T6u9KG071dubRSVhbYV4S7vgS3LINzRw47yFNfj7yzfor0U91dEgh7MI1K2ltArLDJEnDsAeCsm52PXN4eDyaiurOxOjpP1C30Q1XRiqO/Sp0eZYKFZJmPA30PGP1vB8XeyOAB9faWjYs9tPXKj8gCCRN5+rAC1gK1hr6uAZuFi8rqF4r4Wss02SgWGMcMhy6WiE85S2kUvpVO7HB4eDEPfPDqQBAGr1ZWDCCnoG9fWObl1P/zT6aYCQcG9JbdM08MtXS95U/TWFmdpoWkKwOu+4DOKDLP3pAedwFhILJzXCWikYmDgQ23wkpKasBC1JYaLayIxpo+eWiTshTR4pfLW8RJYun416zL1NwSbPjNdGjkZGHPOlYikCHZLEqWCYsENOHPvrWJXx6LqPJgqeHYnC4vjDkJSUPOUqbtxnDph1IQZHWrZw1sNkqmZBdLUJV/+ROAiszTUWISAFQ73lrqT/Hnj+wTUuJXEO9fDoGfX8E3ebKbGsNvDRk/oEBVbTW4rJevxK8mycDfz1STy6sLkMOkuL13e8SvQlpD2iVPlj4ROCk/z46wZ6kKB9rSJq5bpf5YRa1ffkmpIehb1Kg+xmy4eTI7A1ru2qeQc+0SulIQRxqCchZUNMkDA5YtDfB8bc8x2NOcMzZ9zqRmyEmGJuOZEubAmIdjmcenDDwKzLaJG/gaXqfXZVA0NNplSzZ90gFU1OHSbXijoo4dMNRoc13ZeUdetrPVUWY8I6sDsMzaUMhNVsTTaDDnh1SLpMMjPeaNux0LRbS7jn2rMvblXOcH9AMCIq33VKCC/U3yYTjQ/3wyrn/dWRK2J0pUFlFIYuXePaSk6ADrmFhK5AwCcNAJ4wwxDPSkyWdCIWSkkyqL9NR1fMQbh9PdsUmdEJ76uVFFnRtamOz7YuGnuiJSmhHgFfTmZbcSFbwOBN9qV6/P47tB2Z9/AIjp+yD7suX2iRl4auwZItj4vwxbmMH1rOAJcQ7Nfnolca2SiYnMxhG0U7mYwDhogT/M0e1dQ/qJLtT3Za9Jpgb5RLJ3fMJbfxCu3HxOzYgF2POKJ6SuB9BPkW1E8fN1riSo7tWes4wRDQy5/8w4WI6vI9Cbhe7erk+RUBYSDU6B+Gw1ziiU9XUFsRCUjC1nJfJQncfkVJRCiSp7xFKIXnAl5nkk5wX3wh0QUqe/WCp0kQoqDuYA7pLrRS2qr374nvFdhLt1zQg1OTAxCaXGMVsQ7gywyskiQyRhMiVncYBVZkEgvWX1ycxaxtsq3xNjNzhpD45pEVfP27+560hoTwHv1bY9nVdoqJysz4yCjgs1sLH5x5S5DvOBwDQE7VzGWA2AARzZDbOenbE2LBmIRHaODWhAdFMmDKh0JoMAT5OdKDG8ybSsx30CCQ0SZsu/OOsy6IvlWstfIWlMyDRJEN8kgvxEEDFJIiGGYSyyvgVfbc7QEPiUxzRcC3BDlz6Ptsb3t3GP+S+T+t6/6kwVA4OXKY+WV+qsgoYNfwyvbEG2kZ+UAFdTnn2VVtCxcaii+ZdyEuz/oKrtq6DzpVjlwR+qSLcfnXuaqGYz8yvG8uIN3TC/7gc5nQLLlqGh5XddLEI8Y7dj/IXQlwk0GDSZxbS84V8wWd/eL/J3sODwktUFCAFEY1fgyY3FbnwwgZPSSOeKf64MH4zRMK95BjN2E28ZjcXKpVLKm9WZklDDKy3o7pudnC4ZH3mZ8N0+SzTOUkYYQDXuJhYPipFgrgltBfWvzOj73LR1EZ2BsRAd+TpjEx6Yh6/itksSHE9A7BVgIXiUcQC4DWLZZqezZI6qpvZsqgNn+GTc0Agm7x1GAIgnS2RZm+ioxxySiXG1abRNrDQSR2U/FPioSc0VI+gvjiYvvP/M/AJBXGwtQEFm1XHCOClK9C81uZfi7a6Hs/Zi/l6U8F/yQMPu8bHUIaPC0UH5Fjkca0aquBYRSPVcJZVHSc3Qm8N8U2eu3gCes/L0nveFwdDZZwmO5dfeHFwNTphRwlUTBJ4NDCdTwyLTG7KUkg+hrKCqAYvMHVKa4ITVcjQ1P6CvJKNeno6YiLy/w4EjeVbhGef6VfvIzf7cv2w7BhJJYdmdGh7dFLN/vFVY4x2hw9tbAQ8bAgo3kNexKwkDj9D0Xm/fLOZ9OLpeLqTVXudtZ8Nn/2zPycJOe/e5bqdmu1ZQIAiUhGBOSzq+vl2yIBWT/+g61zprIZ8/nnK7INHeZyBKzDzUom9bgc+e8iROWtfjWD4dD/XcbUTaO36d9dlk20Tuf2y/yiYbf00wkKdrKisQSMgzBYjoMV/S5SdPhxAp5keDZ9HImfZbqZI3N0/WjppooDc/AsDytHs0bY7fpH24OuseXuq66SKrc7wgwiaJYFdBDvaIcjJZXXkpugdjcmRexoJt9g3ic7RE/Y8A/zp+Qimx3EumX0YlkXpkIgW0lXS/4af/ummoaAr+1owegBAbJL0PEvKuCM/a0CRTR+0CsJfFD/P5Ms53kW1z7qd3CBafKn+uK4oCn8lL4WWkZhaL6dhcWfDGoe9vWx/qn4D7Uzo/f9ZZ1Bk6LTXThbGlLUX/VrSlYLUj4NLE1NwI0CBRr5J6baqvfSb739Ajs/+LU/ydoXsgS4JHoCjOdzfOPXrNZXknKA42WxIOn22z2BfQ8vQmJmYl5vH0TfZWIl8fgw3LPMlxqXhO7MEMHogfngn/9dolrmzAtHsDlKve3zTtWrJl4J/qXsBDJ86pNiWDooyiQgwFS37D3VNzWXphHDidsiXHLsA0Gp42d46YiTWRKGCudvV+HSEx8JeopAFFrKHfCz7+m+oS8xIqskMNf/bOtKT8VkKXjJqBku3M5WnULb95ygpThHhleTsc7pWFjhoDRQ53i6PGv7VyGsYjce9ogdhTCBLqTPWcmXFNOfK352eTKaR1YafVbu1441sOFnvzQiHkEPB8QqH4+SqVHho019tCsYTzBEMJC2XZaL6vyz0pATqr+42Ji8dPvrg2W6LOTqtTRQao718xJ54sO7pYEPKj5v9Ih/ubIkp2+fE2i63UXYrS44KWG4MGudfhtGkUMkiQsLfLsHXr+GhCxpbYq8CCZT0fxIut4JBGWAbz9PNOKtJeGDa6VgJ6Ep3Bjuj/yJbdTHroXjyS8s+phMEYbr7JTe8pPSUDH8Fe4xFr5ibzajBWP6ibWGlPMSDTjEXonsScYBxlLQDHR8aSc6ZInRotacMh+eck8eVSbrtYIimwA+5Hk4/fByaWgJesLu4KGugBF6R0xu4rpX2jpVSkkZSdK1e3PD7vv6GYtN9kVTVBhZ3m94oma9p/b3p+s6lBjap3dJ+VeiwoDz+9a+ur/On5y6rOLG7j+bHcgJ6j4zEg4/POnLaNrv1uB8cvETGSEzcultUq8v+pS0Bb37CDAKHr0GoWuX46YIL3gd70av43uH7359LGTo6xrwjpcL4DTapFR6bDxbWOu5tX+vo4TGcGeQAHd3zSB8YTwJ+lv831/87w3bA2HYcKmMOp9unxH77Jb5ZioOt2DcaK1NzFenRMtfknCweDU4ISG5aMmwTEYu4uRH1dwWH6nGVKHcZ9P1OYZaWbm3wAQ79qQgBAQbnnGBlBr6BDLhuHJwNXO560/pmAanj1b3XNczfKnh7ecIS5KLBAP/bZKTTr/dFBOR3FfqZTx1LcJGVNGmhsJzlwSO+P2lBq7W+Zs0NAEg6dYuyq7kKwZ9+24+eU+iXWhSMOr06biK6pI2xAfY5sP+2GK1tPKzPNOZlUJJACekJa4p7EeD8BddVAmoAjRDxfNTOYJ4BCpVeQxb9dy4kJ3vpNamDMnGrXQPb6u6+xes1XRE/YVXMey+3bWz/rcv+SS5OJeyfFeb9IlhM2w3PzjjmDNYV4kPs8rzzBI4Uu2kkDnpngwbsADWY5hzte76qvo4+l9nIjitokJNMZ+RR42XPCRR4AtHv+PgF/mxvGQpZoQXKUUxLFP27InvdPTeKXlGhdPQKbswxNxKQKDI9ptkJ8hMvAuztgnUynmowQ47iBNVR4BmKFctr4Pk4dQke2e/1MNJe56N/nrfNVgGuTPBozHb5KRordmw+vryNQvGuuSQZ5Y95ChcTx9L9UZRJwmwPX9X4DG5mlpmdFKvL/ri0NfqRehy05B1RADcuUbaLtBc8jjtf1JBmg9/6lOGklJvrEevF2oPtXLLep6SQYA6TVwqRo2QE5Ey0RiSaUDZHFvK9XDCudh8kInHTF/VoD0XdHfys5LkJNDQV9Jbvv3u65iBsiw/0eJQH8sJTzsQHNCGN5yyHDr87nXr7Bakkq+kGh4GAhEgQr/rdW+5Xtbw7uqhBlQTqow8f2qCcrmh3vLl8Q+93Qdl85HZsmdUkbKVcvVbeksuI60U8uPplImJk7m8UL2Op6lgkjilbBbasQg0Muca0hOSPxvRVVn9dh+cJhDGbLoEkoZRv6hfsrHERZcu6e/nfjEN3ij6VeH30sVSl7jUhJrcvAdL15zg/Gcew9dLE0p2rNyYl07/0+nlylLNhw+LweHF8XxMobElKAu09N3PyGL/i8TyY/WLKhj4gDz7UM82LFqxbqrCv5Ar7hRTnRGPelbqm3SA9ATMxE+jiwy2hF2UGdoxQj8Vdk0kxphklUIe1l+5X8lWxwu6KpziMBXJ+pfQs9NLioqPQEQxYmmypl1cZsJ6S4qM1mvcxFEKe38gBqvfH72dvcHfPmQ8N4wLZflsKpXVQPC+K+nVuHyQiqaQ+0ZhzmDLOiAY1t3glniN8PUkpa/ACHKTY9T7nRz64cWmQCCmesM5XrBDfawD1lB2t7LyULvMZqmGkYj8kfyw/tHeJ+rnzEgmt68fk1+Y8ZLBjS4y1hXtMR5k16aJ6b2yGVl0inu6dIFTTJWVmARw9rU63VwRhN+PxvG5WczkQqlkRI2fQuZU3V4NsUH1O9cwY9Wv3ASsFBNA3GYj+vx8fjfzQUNQxA/VIZomJeTb94bNj5WlhhLiXEaTa3x8Ur3yokabXp2KNaOcyumQOuyncrSZ4I4O9p8av+YdUf+jF3qub7mcczPw1Z2132uZeQ4V6v19h29fwRZJK/mQkDjsDke4PwshSW0qSjDa1Ig5WNDmR2Z40aFkeQH/Xi/Ceww9jFn/pCJNkqnr+l8tKYh8dqlAkjYaC6l+ShJIkSRIRERv1eytVFIhQeBILIwU28Ay2mm3PfPtQ+lceikQUAcf03JBjt8r8Pj1GxsP2Z/zwtF/HesKWf+UFglE4aSNGsbVJiZ1GTfOBglW+WpPxUZyG9sunoQxatGETHOscGVDISU21BXSmBx73rob3AIW8HD0bO8CGIgjSE6Wd405PJnliNpUGjxRWVuvDX4EG6JUdHUS3yS0ysqNmIRYDm5FjlpYpDSYNNc+WxgBE36rraudyJ1XM7ACdGevTd216ByWQCBGvJOyMHkYKhyEQodGhnIIBmez5wL49PnZjwproZRX6BsMQfB2Ltg/ZiNqPfmEieX/TxGzbu2yivs1x9SOjMFUwFxnFDBTDUosloOlDIXHWmHRm1s3ctrhInWq7LHI9WQ+4Ox3eUmflUBpY3lY4VmzIynPwM8ozi8K3Lgcdu/txbGbRRWDobnur5lwo4cWYO6chE4n+BDBNyunc9GCBoNOgbil9HhUpy8K/XfA/eQtWl5Z6arqLLYXQkIQ8v+p0/JKHV2LgbruM5mFSw0brNdlUT5mmxl5rbxaUHF6VLtw1ju3+v7miA3l+sXI8lTpXJph5dJYxPIQvM/YwhK+7230CGSYnRUIJWy++FnbNkeQb5kfgKgx12wN4UOXMSUP1Khht6Xy5xe9w0U8bw4t5VG44l/lqX0iQTKaktXvDJ1QlU8yzOnLSIJcUDa/FgOq/EpTBAf0AAe6MlIoczQZBQEpCBifqOXTdrqYGwRt8qCNkFkrpeOR6OKZTNvPXEVixeftsGVKRHkpZFRv/dFDitZ4SnF3jay2wH0hMykowDSg9+vd2R8DhDjIvlDKH6XsjObkEysX53aGpPZY4vLVHsEf2Szo1WkJRsZTHGMmPUlQ7CUAevr6pcmsceGjR/prDOVlzC8955keAkh5cw92PimbThbsQ14wu36UM9Zi29t9uLMt1Z/jMIAHgvsasilZ60FesMx8qVq3GVraMpM3VvaJ3JBVQ4Txi/oLXWOrqaL6YbQPAzG9Gg7rK8Ws1OlQKe3jlfJypdpBfYUUtvk4uz25RHT0i/538ctzA84zmuYqbaRDP3Y6eSCGxesD9RLGkPoeQBU1MKQHvxqZ3qnf3SQrYFP3fsb+l4uN32bZP1tTefOY4qDoo5TogOku5QvTU8buhLM4KZeqFVWWTAgsUDRbbU4PDVhdHHgscT5Lo3kEf5AO+bamleR0m4RZbPpwDXjtf4pcqcZvMAvzm+5mVloJQg5J7vHgR47L2m/AdSyfzyfZCxZk0Tm5cSPDl6rOTAtIZuC/JJBOLZoMBG/I5BG+Q1ZMQIFaq/zlfiaMIW6vJuqL25bKhDqX3JO5CZlQ2K403Bi+s1IcAZPoduCWgyQGP9LjRdJB+oWbJ6dUJY37q/t+VsvGM4hQOBZt5nkpV6wMEOyKnln6qIf8Vp1Ao2Y7p/XyO0B2zu7W6YZdebeqj9ll5J137nWFWzuGjEjSFmFKWU7JqpjYdct0lBDFvDouRp10kJdO3vCnKww8Ikj6vKMvBp85DkXPN/tVWVKdgl3Mj0VxmjTdVxSqdRrYqI/Yd8RvRtmGQ96lbdNYhSfFWvF5UWt9pkHD55b9B18/9zK9ZyJ+T96nva8olCozQyewvGJ52D+zCoc2Wea+1Gcqgq/1q+ADdq1tb+cWEge/2WwmLVnylrMLcuSbwP6cNHLNLVWQjMSmzZi2CYIjhcaCSAG80Yz8JJtTBealFjYLgikKZDDmIr7LuR60Fcb3jAfGsxslS2hHQieTZkPd7WnKNg1PWLmrRGYEpmlcXbBcFRyZRB8lmnsZ/3rDa3ZTiLPRQlLRfEplhInZbJNqLxarEhMf+vVYLocgOYnmSJfBxWDsfjb6SzAhkXWioXq18HWodPqY4zl5bkplB0WFAeLe+XLtnyanFV9g4hkBS5upodW/0rg3aIbHsTa9RH+rZcrKN46MmEPEkeV495XoETnboof226EZVw5sj6lElBbqu479jv/WoD41M1TpYmrwsgy1MwC9OsVRgSHHnZC+P4neBbexV3sjAlyW9P9vGYD2tiUDoNE+R2BPyg9rPf6dAirn8glrarCarenVYZY5N2fOMEINAhIDxBFmgJ7zYeDYK8nnutxlQ/S0Va/wOGk8YB6THnOIHQbz5cb8zSXmQKiQ1KGK6nsy50dIDfvTQwBp+hjQpFFkj2E1cuMlHvKUGsdzz1GQeIceZLXc6mtq/S/HObyp9UZCUT91UHihP3/6+ou01sixXIeivsHFixrR6OSvvh8dc9M55xOru9UdCndmDydvOpUyPk0ldPVNn5ljjlxl9LlxVqupflTaAQ36mktBqm3RQwuatwxVTHAeFRwp4b+92IBuh672RgZlK/Vj9uBOpZmfSD9wECgM24HZWFCPxORco6FhegXw4b/KyCZ0UVyxuPbnwigBejiMZd5x96QYwXhjfV1CwOh9syPuqUZjhkHGWJK++exrOJgSKpLo6oBx8BvQlck22YjbX8rT0oZ02X7Hoj8qIIdC0WIL0TfTRSgqrVNDu7emQpAv7reoZYv5xN+U/Y3Kag7Hw/0dqClrJpST1I6LJbnFUg2mQh0pIdLdglN//k9NDVITX9qkPL6OzL2VKeoMo3vqRxCdbWH16W0vycLKNDAA+8bH0ZE1qBS/3/i0CFdS33CnlMqIlelgsK9nwt3A8waL4RMBTIxQAhs9CTJsZMCpEKKZWDgLtcrgvSmqGsLzIcHYn+cPL6kjo9D4OlnQp3wkhzQp1S5TpmGW8jlejSnQ/sZsAwYHA2HguikpgYVnaRA+ufXFP8+rPBlIrkiXpfomdQvERalhKxlL2VqLpgnghHtPlnPKqbzMR4gbGMoVNDgYgFXvWou2M4T7P/70QPOAy+XOGC4Rg2Wgzq3AhqLKLawDXFzysnBFhep/sNDpsyH9fDMSI5GEJq7kyX9+Gu78ENEOQ/W7lRZyQVbZMCJeHnB2stjcLP1jpLpD3AphZzN4ue5uxPq+C/H5VKWaZMyiOgGSukLM/M16U5pAXytILQnHTh616Te8iW4702cRXOgqpPsceaQTRAmTuIjhvoS/N+zxoig2mAkSsuIpoFk8D+L+53ksJ+Du3Hu78WgMuSsXiQZTTZY/FoxCKTc0esrjx/xo0E9ggy0b2TVhmySm73/BQhAL14WNrVcKmIMP5vP0m/j3xcYcFl4cCufH1E13SclRdC3rUeH+W0RwpdDQIfLZ2t7CimUJCiuj7mKnzCr5MAJ+dVJ3+5TbRqE0kaRCro8sZ22HUERHh013f6vOCRKXXpTNqbddYU7Gh6JqNemCZbbFsIbD57n6c6unsof44CjPWZBBQ41dPIQUMFkNugriJ+OPzhtVPQa9VqPrW67Wap1W2mcmSdP0TX6tXV2rNyQwEmcnzqHEpI8CZjtDUbWHQMFqdJLtjvvY6Zs0itE7NpZUfAq7q/Im/oSsLk3u9pAZLAOmPn2eYNlycoJWFkR8jVf8oIyuyQWT3aP+v0XlfkT96p+wmcJixkfoU8Fk4rHP0SQAHhh9tyxk4pw4RPwlLBQHZxQTh/bYTKjfe3Ylb1NeCvpu+mqKq++X0NoMt7Rao1AOYMGRi7ufDAJeURXbFzvQOpicEnT6k+d6kSYi0fHsqzx8W1sf3NLSDM+3RpTKuhs/O2nUjBjUtB0j3DIK8x1g2hEpDzotY/09x9ZrxjWO8sfwLRpZqixl3Dl91qX2MJccXUfEto/sy9/zzxqfmZBABrViXWH9vno9lrgaDi3ELrCn+FkxWLTFxZQa8bPbX0Ybd6rK8BKu7zzLQTzTKwbhCm62rng5rOF8XLDXTqNfqgbWCkRgkD/j1pN+1O8die8Q+CvJd3ntUFzcKDi0My7Je0CZihUSjWGtyr7qS4JGK3Yxfw+L4IQbBZF/UxhhGWtSEDq/oKxOY0cuESvwpBENcP6dsFkNhPG92kiZGpynykeHMTH9nfBPPjzhBUvBB8nizncCkIzuRI+HdqlftjNhcVxUEh2koe5aI6e5S0aIoR6aKi7ZyxaN2+IUasM0C8+C1pZXrpaLGtZH9vq4I7iijVF8GjHGknOSexjtJZcbNXxbxqhNyjVibSoGNyYWgJuJoBdBZMZtS94gsccLFBkGghUnqd5KEcuVhakOdrLiJG8bUFZcv2QVcLc4ESem98OKyzIud3cmNA5/8tywyqWyN4P/GX6o99cnNqeiu9zbG6cz4AjJ9IzFzXrJgnwmmWFaF3VnH83GLRTX/17C0bFSJjBZHY16ZH0y+7r5CVA/eZ3EjQwhlHfmyMtiW8MpYjStJrJTS4up7jCtwDopzMs30+/YKsJGdaJbfUponRoHMvD7XbCGB87mDWAAjmLsjDX5rGna/FdKda9+/IaROyZOkvCiGXiqRoV3zOj0uJwcxqYXVx9FRM3IeWwv2rE1uLU1Wodp713jiQTRZII3dOt+nGgCpazyZTTHxZyh2xBMbFJKF0rh+/ea+4G1SSyspdE463AqpFDleyU1/v4gQg1W0iOkYCwFE68CvCBSiw8mbmbrpyChXfPjQElKk5CvXVNczBHaquDUJrm4Wgzdt8s9bWUS8+u98siQUqWxsfcHHYnE+Dg9CttfUBwzgzutg2h6L4+mmy0Z6N2mdV4Yu0QhEHGicDNkHf57lpaLmt4aIAowrRJi4WyBk39vku1SngZvToK6HN5a12CIeelUSz+4i8c8SHoBkB6xsB8EUSSa/MbJLq9sCIYZ67boMQt0RLRZRZZNg3VLUtsnXVkWZMnFdzjFP6GR2uZozGDQHwoGnz+6wVuN3Jq6EZnn49rIXFqjO5CaChrWSzfxkNzprNvjGpmPY7l3A/pknszUudAFjWalRdE72JxMNVSsulDDmCidokBa+uH2L5zVFrgb/MSqKcjzfXpSxaq4LoXtcxykeq06l6nWMzfjH6/RZ7uvtQZ3HJ9aO2IAtOqj1auBo8SxMVWqSl32qeZhixvMyMZRxI3ZUXj5WxyUmWNYWuQd8PpTNmMl7t2PJZ8BE5dVLMRdowc6us/2Mqglbxdr0YGYP9BffJ5ZZsneP+11u8+EuqBjlOnuvLEPd0zkNNAl19U0+bw9k55orxav3bB9wS6PmhbCJFtej4bF2TZtJxph2d9HUfHKTg37ZG3Umu1qzKmL55rz78uWr3vIGzTEBOYYYUjFoipvd6PYO8dtOkHGKJklqgKHy8rtFpucmne+dsjJXH5tNv0YBA3I9scv/XyDbVJreXkytdbBCzH+eJ18/fRyLQVez7Uhd362M3rws1aK03GMq472e02kiQB7ussro8B2mdFe/xr1iUwImQvum/ii+0HJFXa8rvYKyl6DQ9e2MErTBP4pwebTyWiCIuXFudnkua1LOg4RTV6BzDcENdcUyiZSXzptWbxbr1zxtGTgWpUcplh5FiB8HQ4nMIElFIjsUGmwdZrSNzqEpIW/2Dd56HmLdqBM32EkDe3oInveLbvnHwOq+HazQXKXcHTZwr4kMB6gywaSbc6AdE3p84aayp/2Wb4Rg+KKzbtn3TdpP7k4XzVVUZSryXQkcPt4RQbgxFCwjNmOyTvyPzAcA735jrwjGLSjVIlifJhOLjSUzqXGlu/wbnN3NMaweY4SDHztwKpS9fg5wJGAR5Bzr1q4fEN2waYCSf8fhrqtJsOWcncpAMTzzCm+E66uLf7O8rk1DRTFKziKsHBnoR/GZ6LPJ7l0vVSzvR4vVn1nD2mESTxsnIhxVtJIznSLqhQ1kTHAIV19Xlg2chxFBilD4V/pctDHbkYQtRMy/CJsBguavCyumEeDyoLqLXyV+CrBkF3YnBZex37ZGoFb17UCZNfXWKVyKa84ZU2Q7/PeBbYlnv3/QI/hrRXHy/X5qYqx2D5Yb3E6uHvlkwemWO0eSl9sDxZutpuOWO2ityU1aul+E9ocyrb58xyMXOH8c9yJkYrw9gQmTO3EgnqqMwsQKXvQsKQe8CX88m8QPv6IXwpVdDlnl5LzG8d7ZDtECDUyL/zJsxK/gECMNjLeyGpLSQWNURMUe9krUGF8i4Y+FfA3ZZUlnI4K/rcsj9nC6rD6OidLCxhDNDTVvtv4bG8xLl6chBaSeM3qobQ+G7TvifkcXnJKGrcySp4wrF4qj/aiFfvmGcYuYtCQ/k9e314fjEvdbyw0MpD2F6jclzil1ANElrZ8afnvV1nO+npnEgiuG5cnkKEalm0ITLDW4UxAVjR+VBspW1Jvv1mIF+Od00XSNwJYSuSSpsMQ5MyZX96/h/am7sbLuZTXSSa+g1KXmFJBy6k5HngUCu5HQB1EVGzbhy17Q+N0ZNFZlcKgj2ov84zZSN6TGBloKgUYRnXGucbg+MZ+utUJkwjGnztsghG+dwprDYAIHuWxljVtJWsrYrI4kcMsWwmrJrKaY20H45dTPZazt6PkHU3j9jyjJ/6NfpKgoaEtpsgd0119n1Gmv3fcC0970LGlo7xObGe2TX6CHaWHjmyLEK86wwfLdrdY1P7J6A/wMjgUastsT5ciNtq+xfi/YmsIVQvyW07F6dR9nwSM4jzDJpi1ZzNGlU09VvZg4QBF4RoV6VUMsit18BZ0wiASzOMWsiuey3EbVDhCMjIpycLQ/lyTm6u+nu+9jSIwv22DaooOhGVhiCEUs16MMEExIVSUqZoVqQuGVoalY5RnoCLclWvvra9aRkaoTZPBLnIjDaq1b+5oenOnpq0stE426YoYFzLp6UzkAMjTN0ARioSqqPriN1mo0vAtR53GGigqkMwsPLepFdVkO6o9WK9coTPjd8EmwoOzEYORcqDQMyDW3IHuwTZfZSLN46HSTLJwxDx6sr8FzKWv+0Iy5soqIn6gdJn+4pISrlVne/ZmjTu12iQeVc471R7R+pnMxk5dj4KckDkHSE8j1Tp23D01YlKl7T7EXIm1Ul3YNg1CVKldnv7S5zDYUTyJlE2DTbEsSPoK9Y5y+UxnVy38B2+COMQQ3UkpQyyqhvOdud7Jn19u46Yk2KbZFyTdx8RX+xfBOHVQq7fnxe95Cvi2zvHVqlWWUmJHW0lJav0plZjsaiaUxVG6tm3PTMa/tCA6UdWgYurVLfqwWix+YmvuS/a4/E0wLBc/kGyOj6fK3L0NsoGRJVlSVg/Z+baXNwJ2R/P73hoW9klaVngAzEZN5Z4IUlm0KbTMHtLTbYrAT7TgXd2qmPFdwumzDp/PQVUp8wFbsmSASvUBkfs3Ax5HQHJEnfuwen3nYPgOoRhPKs6bjW2ER4pkZ/SHvYq5UxsNHbZrU8/ekk8fAWMqxpO15boGb8wcgBC1L60P4W7OdqqyL9d1TlIEcxVnVbs1IC9c1rMU9BnLdNa0J+EIVh9VKNRZ38OphNk0HKFvaFjqME1lJRWalkl0GA2hktGe1DPRZt7G7OdvpsYzNgVGvDgPjEfSto0Scf+TkpaegmPam0Amb21YSse3rzGTX7AT8Rj0BsX66rXHF+uRYeZPpycFnkvFEBESVWRUyZXKqqUXjoxw24et7g3Kz93aGyhoJv34tTDxVTjVOeNXDaFmFgrGIonSjj5nYsLBox8LGkyTG68HJyr3TfO4R29Yqy1/yZoaVnCsDL00TcbYhn3MOz7bUpGNFpXc8LpA0hs9e0skw9i5w8N67sJI6dDbkzzu4EcgFRdnXkT2QcNHbHnxlmZoo7fEQ3omFnZ8Rk4Qz33IDGa4ESc2qfs3Q3Uuf6roENcSW16TMjmKm6hJ2ZeaSzc04gX+WTNX3f793apcmQRZmizsRHFczYsicc12VdbGRFU4STk82/gfYuy51RresT9NLg8CvXAtyxZdTgVDIy/jrUzVuvpBtvuBxVFNVxEK/OEgzEDXoevQN9O+AeKFoFGIiQRMlPFuH5ce66N/+agQEn0kaeLjY+w2T0BxZqbtjHve2M3XtO/Jq5VXLCPUa3oS6HKsgtAQFirhSDLaoBtV2UIiCdsxDiZfAEkB6ksPmbL3+8xTE2BTURB8qM5H54GyFGYZxYIPmxbJi4PVfXg2SZJvy/AP09GtCuRgsEUfmQb/3qQZV6NVKhMsvRMTejXOJ9C6/DosFZEqNjeIvzNZmECzuLWP1iTKS5xWp8UecXPAOt/Uq8Sn2lksn8fMLst9dxjOs+l/GEV9iCeH5Mx0vN7gfkvfV09Yc4cWSMCO/k+R6Kx4jsQReV5gSH2tmxMJORRJZjLBkFGTKMlIvb+BVVnyvwTRlvsbH5bBFKwGdXFXalmYEUvGbeDWGBciC55dIcVEGIXY90vNUnB7qeRkBu+Rtx1vpHVQTE/QCKFTR+aAJhVGdGl0epHdBVaVHoOEPdSgNh4jC/qzNncg7eh67FvyvCuQsfvfuyfxvGXVZdxX9Kpr/ojiAo/Awlg/SVZK5BXeyMvHsvZyb1PL3vNlLm7xhCuXKzT7TrYpqs++EDthUeBEpi1St4zWb4l0u8NVTNCI3+iT6ymVvDa5z867+ioJB9exsXspz8NGX8O2KZHokAGpzQDOkYm2PZGgroc9ml1F3Xi5FoKSaO34e0rYf6Q85DG4ljPsftls02NJ8zDFMyx/TILfEPvIEwA9jRZZGUoqiOMOkEOc+h2U28leMEd8rMZTEPnNxuUm39+fxUf2Faki4kRljXXmqA8YKRoMct/b3wN1UWbzQXsFTRS/fyx2Jfh4f+uIHZt+8uhYuQ4PRmnYdq6ks0hL7p2rjjFYm4zVP4ROl1OGA6623lTSBxjlBSE96KSMcSG9ieTMrjEfwCws6D0aJHIwpMFmd3SGd+x5Sa6ZG96SHrplY1O4ElJvOT+mSL4zTU5BOwWO2ypNihy06OTiwNeMF5g6M2OBWdQHyYeSXLhZfpNImtPT8ENv9s7FbDOZozVLg8PlH9Tpml7bhnICKndvJOmgh5hte6MftIMbXewcPD8WM+LwBg3odbYYWJ55Fjbucw20bnTOuDwBPHGHFXNbVp0/JB34YejEt2XtTGl6iQGI+ywQbJ8VErnNrgN2z4XCM9CwMdg9oHNkQpdl43F76YyzM+HIsZXeuq7oC/9KTG28ojPk5bsJD740A6HUWsAgdp45ht6MPFp3CDtjTHMuN+rHGkSZPRfQLeLwK1apmDPc+McjDei9rfNztMfrwyU1Y+DTPoKCwh0zu/YpWwYjXzMF5BLJXFtwtprZ6HKeiglpJNyQZfABh+UM0KEnnsr+SNzRIVmg7LCqLfFWKoK1Z7QZPGdOOzeWIyPr9/6F9GcKxrLNvzSzYz/Nr8+Fsl4cUuBmbsLxwSPsBgYJ9FIrtpzc3b3R/jW+Iuq7v2F9QcNLTUccHkK70onELjNSniKmUUgYxvWUpD6Q2pMaJDdAxJQezly14oYHhOPmbuBGj8JHmttiMUGcLxmoflKZpmXx3nU2chG0M52GMZqT+y7ZMdrdXZzbSCRYOXPDsjZnJkouemrP1nZV79jTExX774/fTjuil1eYw53wbLAdqbKMhhreklpOUs2lYNWPk5jgqyK6sbOp5xint/M6WmdEtdWW6mrM2Qr/WTh2QAc4CJX1C30lGUrkiPhcal3nAJ886pfqe9vxmXBmJWmxJJ0Gq+x5nPa97cIziI3Z26DxVIEoavrd1Nj1IQ+954Nic6CpZ66k44UgSWkh4PlYYt0tb4mAE5UkouTyq+VXv6wUIr8hyk0Q5zrTKdsYnDdWWopmddD6MtYS2rKGXw/lDs+jT91FHDklrVV1+PF6jZHbHN8ZaWRugnc6aIuY5noqF26UoUw9OPME9L7nzrYxJnWacFAvWOYsYfPwA06Yh2yDo1w+XMlcDi/Ofcmg2Rgbu/t0jkZWxQAVIlCk+DEjlqRiRILxaenVDQmhmZKTjm6jMrMrspe+tfB5I5PwTI6BWWuuAU0+Fo2HbNFCRfhmdjekFCqfsNWJVYqKuFu7dnaZ71bfoxHh3LeWTX1yrZWJsd/543flp/OyGbUyDsYS2NkuMbRcqyQ93ijxMnbMYaPSmM7aRe+adciIOmuItkWatmlnHfSVC9VqYRgBUoB04mXG6RORYRPhmWAITh+5oRfYDoDjJPS4bVcLUQZ2+2RbPx9U7UNtt+CzLPbG6lrLiIa0h4ldZ6+o1D65pQpVthL0Z6qn4gk/GxYM1JQHnl1xCVHRmXEEm7cpmgQXCGCugRMmM/UVZWc3nTC60/RyV76cd+G66dqv9j61p+vubtrG4H7mywbUW6kDOxY/NVwo/NtwYzDIKdZ2fb8863gXiP03NssO7+PGyjkm5xtkN9rYjfYOSNNTohKPQWxqEZfy6oAtpFMQxrmV+w3s5fJErQrKMctsp6xR8wud7HXjwEV5ZdRqohhDcyXqkp/SjmEoo7Li9DeolZmS4e+Mys04rcwAyaQ4d3iWiC+u70LzvcZc5hQabC67VX+w32RBOvVySWTD1YsEpSIni6mjUex4P2eqpgDFvdXp3iitPRJlarTWBKSiq+jwpQx6yQekHJyTjRlROninyXAWgmbTmO/z7CP2GPZfWln+60IDqgnHJ4I+G5dS/AS7J+SEseH9gt34U15wrUooeAO+uHXf67jeU/eltzzE9XghReSC224uXSj8rkTU1kzoTr65Nwxkx6AQXbebn6y36dDxlU4Ew4/eqM9qlV4czkwI7s7hpMp4O5LSyjx0bQ2FUMRzS7PXJ3o4r7AhcSgUqVeTRHpKZV8ylx0PHvYHKQ8iPJcmx2eJKim+Fj7s7u1m0/g9Thgqk3Yk0C3pbbIj3OGV8UNbZUMkSvqqFAJKCWVkoR5C7nTbjoXKTEWA9OI/82Sdd7Ka8ogKY6jrs5I3NgpZKWEyr+gPtg1020ha2Ab5nR/7I1ErVxXKWo3dYlnyGMVV/a9okGI6hO0LuaxuW18Jre47qFyN7Ei7/PduP5qSevGXKvZfsJ8N2e0Ss0xmbGPEljcSeFwhV3SsqXQfEYmaUVylBiUpET5ZiZSJxe6RusoLkV7Atip1BM0s3tCa0Udq+afQew6RUotjHJV9VXiVzh7YsRHnRmsM8e4S031ougHXWB7piX5j00L5sAfvsVcrtS21Qh+XK0agye1DshbsFb5Tk7s67hWK7S0hVO/jJqyx8D8zaaeO2Jr7YY31yOh4NvOdAJmH/ydLQV6JOYy4HgmpIqxrZW9GT8sk368JSsIZg0vDjJLjCAj6zijKOypSx6aoTBcsdYTt3B6fZ0rAJlKMcLGOGaboY1BXwUgxTwuJjny1EOmO5FXCg1Eo6XCPpEHkib36Ms8ebrTPSH4YnC++ZHUTtmnSbQ1P3Bbh3IGZEAQRiYOm5/yllpa5hQ8KxKZI3P7Noxcf2yiQKjr0EqY4El5OoZjbKv01HBROf7F47dAWuzNuoLpBq3YMqvqt6YBD+PTHzljfq6Z0Xmy3SVa4ao4XUb1Pa2Fpn357t6uQXnPfrO4B1DOXkK53MxelLLauNZJmOUc6bG6ZRZQXpBfMtqhqTs+eTtKKnsWZFoj06pkve9xsWyYZYTE5W/Bwb7ixdrbwUSZqpk4ReccWqQO2ET7YLUFk3rnzzpx36bzd8/4573vTP4KySLy0iUicOHIXTtNeKUjd0/nDDrvJAapl1DqcNDlDWUz0wHIh8NLN2OcYZPIS+oaMVnDTrN/w8EEc1eIPa2/VuA+sZymh3T/HTMu0JlEpxQAeOH7Mumwag2fllyTHFMrt7fVdFfFxbByK89nvRuZ9at6aee+f95r+frNJWS2oIkN/HAjjTj/sMblH0enUFVO3opptZXn7sP6utcIOI2N8rXh/7J/J9AE8uTS3PjQziBZe8sxYrK6wnRoN1LSOQbppBkAIdR+bBTOWLDwAfYJaCBqRveP4fhO+UTFjSYi1vX2ZLf1CZbIY+ftB2aicpN2v8/kUaRfM2NuLN3xo77Cr++lIqFr7mh+sqJQa7Lc5V0/k3CHfvJuKcGojOSihVMQHW1wmcxUBk8X2bOw/NDuB4bMqdTrsDoIn1pMuCC0lJ/QghY4l6/M697lwnH5LN4PBDrvpvVBIAViPmDFricJy0DtwxmMZvmR0vredE9+CSVK27p0pJzKZ7AiIrQILO4GSp1dDVq/3Rb+JNdqc8mCQ6+vOo123YUJrIXHL4UTt1da3wO7L//FuofdGeq+1KN9Z+G1KD+F68fEYQuwdh7z9YTuwj/BS+tyVl0RE206lFyapEQ1hXR8OVIvnzTJFuZVUHIBX37ge3h0irJxdOLHdmeylg+fCpy0pAuVkmKxp+lXQthyYM7+YBCXZbjK2qTMujk+QFZEA+c+IdS7H55h8Mp9toF34fsQJearn7x4HhZs4FHY45YVc+K8EO+85AM8+ldZZMHstn8ExhmYdMlFcOzJSipO5aCTFQj1mkd7CnP5o72GINWCztTlPqKCQo5TuilKGRZ5bwXT9lHWChV7mDPXHziQEWlwkZok+KaNOd/CofdkEno7tMRRHFHhB9D0OYscaHZJQ13qkwbGxm/7mjOHj+Vs4Dg5YmB/K+rOUDpAORfALdL3szMVa4HyLytXk4Q2PYcRG7f2Q5chnf0YV8VIMeFT+09QExMgq0F2EeCJOyAVyLTLnPPjLY4Ij4wv/WvbnFubVkC0oN3dfazpnQS6MFD3+TubIVcdck+YO+UJ2kCp4iAQagowZ8u+FOeM9aPZhaAv1C3SlaIAOEkng1W19eJKC8AO56crnpeJBjR+iGFwp/FczLi1SqpajA2y/WGhp+ZLDbsxJK8tgp40J965gNJHs5pQFDbveiBupWF/1NytRf8Tx2p6Jp4/ASMQSlUnn5cOCevPwXFUqSavfaW3wBw1vxG4L19VGpeG7DfCRxUuWc7IiW5sJ61m7+7KPWEhjHj6C2pF66oVft+CYr7U+uC3EPnS+JnONgo6g4Av99GMeeXV6QTi6q7XKRgqpxyce0OEIEhJO9n8L8MPUR2xO02woc3NksN9mHzTfcNhljGghXTL9XG2fyZQWBL+FPfzyUQ65Gp0WIThDG2PqMNMTLNAM+ELefeiEaM30dioY06e3NfQEuY6D7xs54r/T2xZs+evjABkvdfo8Fr6tEy1N3/J1/X82G7TXPT6g/FjBRc5PlDKCIi9d6k508o3wj0Hnvrplt6K4+9JxFOVsRsjy83UVFt3nzYmpCAaMlAOnF0WfsgWftQumBItEJlpcGutDh8DMFac6CE8+wWb7LCL0uJIFCXm8/z7QXEvK7rDnUOnpgv6WR7sALB5Pqx9PgeW9kBisaEX5AHYeVMp4yEip4sf3em/3tiRv7U8iP/4OM8hPFD0x7OtNeOKriqzy5c7Pi6DlvlzgPAczb+nzgS0swNqDvZrHLB16IfjiSQ58/qhJUB4fdQsI8Kd4TJTjDm13MlG/EstlPGPcSQNnM8C1v3rylYiPp3Ow5GPOHpmP9QCzBgt9V9LBJcQlYDV1g5Vp7rKEMpDlLMmf7RqLwzjhzIDz8terChmmAfoNbY+X3ZGAgFtuuVjeEsDjZq/byhnHAJjq6tq7WIq5wKc/LYo5zcbWXp+LKg7v09oVP0cGnwxj9FUbOGS8EZ0rifgdNiyc5IgtuZRBVU9f/QuM85cvJf1DX4Q4HKZa+kRFY+R2p93p7WPeYBAB7sgxea+g7NyX2iH5Z2LCb26dvHf5+Te+yfNFjErnNzfz6c+9AmxJwqDa6459FDIQ+7W7didq792wE9cotG2h926fS1qj2FiG9J4ep+opQp3esKjfJhAmqdz/bkY6GOB87nLyi8CgVHJzYbBSdLmab99msmy1ldYtiVPiQHppP8RMt2HGXJiyT+u50PtP8o84r7gjo5ugf25fLmio8W2j2hoqv2/PJ/ubMS0nNZ2X9UcrzPSRXYRV5auHovEAocHR/vqXM1iN4tfUypFEv3B/PsQQM/LuUYMIES+YIyiCTnF/a6ETDiIZS7zXUhmK7JBAkJ4aSTN+s7Pdv2aN7JE/nReK+J+PkMXRDQmjIaVxncNJWaWDPiqqilV9FDfOpltoz0tMEgMHd+KPxGKBC96RjEw67V/jLHH6QPKTBF6tA11CW5bCrlEDzxPLJXv5cQRxSgoRGk+t/V/3EuFdUDEik4BHCBVbyP2WDs5jf1UqdinOlvh0mhynRxDZDglBy7HAdrKSQVYKkFCiVU7jWDb4RVaZCUkCbpSSXNRiZQNHFpU0X2lQnmNcdcmNjjHPuUvNw4F9ZyPkl87k9mR63uLIq0QPPCAmRRmmeCwdqzMkx43lEk1IIpYZ3d6X9jVUIBGfF7eGKx6xdC1MfH85jJz/4QqsnB4rRJJ9x1gAW57bGq5rjuZiKT86oSeuY3fqI5PeEdRRfvz6H7JzTILW07rjKJHU18qNWoHzySXev2wfQ5M2kfC25j+/qS10NZCC9xDW6Y6pLGsCaosnHnPnLpS0Wbd27jgdhk+MN2lbnPFA/UcEOPqSWVGghrMODmh+1wAyICToRDsky90FGYLD6X1T3alYsZ62dL01nrOPN1k9kgE1DN78EactOuPvgKg7lXGvF1kv2LiRAhrysUKRIOZAaOKL1HZwjycB/TbKbLbzTu3E34y9RTNR+YnTxO8/+2z1QWNr0cttaKzM0UAGpwEVPWuZOHej7o1Z/YNTOBYgM93kqH0o3qSnqCBhst8dlVtRN5RZs9V9xNS4qQOp3JoA7a5HjsxZ2dRJGYQdZ4o+Ubm4TaDsCY9TqtO+zz1llFZdK2oQb3MX90nq+qlilce3F072HYbnqtlu2HSv1W73/ao1BS3vJqJyZDzo3HcR4aZOkHYBQ2tNdCYEbXm10dNplyyTabymk2FsFii3cu1bh46L6xGb2JPhk9St9Z4MD7oVcpQtvWdLypc+ybhfZl9dydw505X/tovgT4yp4je+ltyf7ZF00L2UiafSjzole61s6dQEMUjqNWXELwqIxivUjVUdyTADFbtV9winaICHPtwk0W9IEFle7+TihyTgwTYyNrO1VaBJjy6iTKNg1WsaSYy77PyCE4bLF/r9jwV/+PxFyvc1T08S91aWxyje/cjvthuAueAKOVF/d/HVal1C0vIIK/u2eI9/ctuy03UB1u9oq+qIA0dyYSrG7xJACxTumKIuIEJeX6gLFYiT/h2B7NUeEjk7h51mu9NGr7j00hXzKNR3Wa6OxEuxmls067TGuM/C1nLj7+Ca1GX4yNwGjis2mAfXZ92UQyQD1HnlC7N/SaT8DauMIdE57bxuZoxNEd43O9VbwQBhsqaSfjtx4Sw/nWg/6O7d4wL9wxvlN2dYo7uf8ZYPnNFBlFGmdEZgcEugwz8VD2QbPlA4Csl+BQGZ0/6/MXzZsHEwl89mVFWs1aIusxebrLaLNYOGBi1u2Y7jPCTyuDi1FD4M1y8Vv/doTLz3XjRY7PTjfV89KEdH5re8eWrnq5IJKau2vmlKrp8hcLMtiKDm3IPPnjD0aEqCk3MwjZztbx9JJRJNyvpaduvj11EZkfubgtxfXz3lVDs5/fqp3OJbxHf9zGDwDBlxTjJa3G4ckrZQdL899wkHR6kTHbFjkVwpeNNZUytcK63MxBKJzKwfE1qzJBf08aJxuyk2ZppibL6twH/lhs+FmaXiiEJ22GVpqXlAijT+2yFRKN1dAzH3x0/UKsUOP8R6uXBXgU0MsvM86OeDmhotdFVyxOQoTn5UrtjmafLaCNHW96PZdHG6pkuJ9k2wslHXgRidV5fCZne8+pZn2+VHEvF9w/li6W5hieLPTktXTN2Poj5ZyPqTleImdbzuHA6GsuzsNlG3tm3cLBNb4ne0l2zyI+PjElbjq2UWJsgXxTri9sZ7W+4PHBMbXfAp5jHXr3NJU24K9omOinNNQJslQ1z8TvdOVcZB6HZ4kpuEHbE5eQe42ZCrsXWeqXtheEmmOwX0vhYeImeGi/SwYwVaDMBxL8z2xKOx+f48SH2dpdokrJ0Hd1v41uK8ZrnPDX7OwHHCOgQ/3tQ8HmQaaaW1qcxF1/fE7RiONc+KTGs+wQ83/W+pLaB92bQ6betN2C5bxr5N2vT1LNZo1e/4bgxkrpV7MT1WXBeSgE+b9fa7DdUw3nHENwLzxs7NiFsH/NLb+Lb7iGiFHddYxtIcJEjHWeo2/BR1ouPcxVFfyKS//WX6Q66arWCRQqTkK65HzyQHR90GNMr2356lzVNnUV1mDL+D7IWj/aIRtLA98VcNfACw3jfeu7mHGYwtR689tmOyII19zek1rs6rjh77fNYysdRouH429G72cc95zD/YDBjbEqKPGsp+XrbCA9KD7tWVAeMGziMyHegmmIrqsVtaGkHxX+C97TocmLk8T3cpkg6C+psysvgtLt++zcSbFV3P1TuuzRbe09hTbSux+qxtG21q71q+Ct0NG8KRjyuZupg+V9eB0bxYgVVgfWa+sLl1PhkLjNVMWH4NXX4xnVpZZtr6yPXVhZh/qg71Ix+tSpqIZsAIYicrDGOuShDYfLihlAOdUsns8p70tYSjbMcHG8PpcW5jEd5CzYe00Ptbjy9VEPxYbuUD9tMXc/mLm9t/9w9nS4NnihfKuVRSY0IEcQyMjNE8t7Tc32eNjf5SyzFJzZLxnLrc6YPx+z60xwHG/LxQmEIL+71+R/6eLv/f8iwes4Th7NmWNloSVkelU0Ko10fugizXanviqVTMzF0qlWSyHJoke0xO6WLWjKVyvpPmiCiLZXO5VmFTW67MuEy1a7nSkNjhW9EwoSVn0bmW0DgT1dcSyeh6Yp4VgR5s8OuWKOsaursb6lqeBJ3O7ebY7KcdKN2OHEEt9L24tY/V20lCfqFSHKDnYXHXKGlmIZLPoUb/wLGc6RFte9wyQsY1aQdzWa0ujCTJoYJzeCJ0/yTKam3L0q/8fmUhmwj34vGCRFbr+8m81Q/xQP8lX229t7G1f3RyhgtT2sFUbilth92hs7YKU9E5DAppUjcN3YOTmMm8UStst2Bo6GZTVanLBbQUw1PW2EHp7sPYBJIwLNtCV+3Fv+d/Vf5AnE7znD+BFptFVmbhKoG5994/t/q+2+VcfkYzkfeO37Yru9PBBsrqkgskf/ZxRj96USp0hvrO+Ml6URuUkJXtAO34GbfEkAWwPsvQF2586a5Z04Onx5a/iqOqhgQlVlQUx5gvyZumSu515KKhqJ24sF2GCDKlU7EZkXKkOncqcwYYXr9nuOPf4rv1l4XtK8tzmCvkGArZpxA1hQhGztzD1IS+EPR/PfPfTNOdl2sEZNEw7CO6++oUAR0p//uDlkVhftn1ombXHILfw8+cBGpmTxAOd6UuKU/GpK0EcbtYdc1aPfzkjpN8my61S8XTgmus3ZN6lBvlHz/XmbpYYQ7bridI/+RoyVbmej728PUkyH+2e5wRb74XLdhKgyiF3yoGGgw15Z1APyYYLvz5/fWvPg+KPysWwHaKhW21KVokWWmJEo0lfehoCs2x1fMVeSWMjUeEdvaEuEWjEKic1vy+vxYc2XJtMM3jlYFINXtF2CrwtoenQHxrjjByFE3XgwJ57CZOaVR0Y7BRGVb13JlJtQ/Xrpkg/p9Iya+xc/WP/dDLSUrVpTuzpJ9Ph4LXu7wej/1kOEwxFLWZz09ff8nSzd71FhNSZQSPxfMSBMbWsvyd/icv6ctCvMdLBgp1LCGlZHJJ4Flc82F02JUv0Xa+DT3m/2RQ0Rrqbmo5Spxmm1WviqdfFvocPJmXWirb6SEmfbtJnWPzKB6ICYcb4fjQvxwA7wSDTCQQZjSOi9kDT4pKt4SfSMkFkOhu7rmwE6spT9H1ycLihe2dWuWjMcfIBPZC1YAQhUVCcMaDjNtf7g2Hux/OS+Jswv/L7Heuu7f8Kt++Wi5LcAjswRkfRgxBTpZCxDKVaGYkPxcj5ZNSte1zxEkHM43mBQg1hhnWKNevetAIyLjPpbCOm4u7PQLOhKK0mJKpdGteZ1UObkTC6UdjTXFTGGxpV1y1RugyyVn+PW9kMlhamd2UYLyKE7BMJ/gxYvX3twdqPbq6N0X2oNZtzUz7ZDfFWZXCYlpTyampgoGm5s6dZjfRB94XG0L3JKTDji+ISRCF9981wO/edMWmZRKxYfxuThjwPm6Q9+VYXgTt82S9YifTPWLoiCzzlB0TM2itkURTYwJ2Nimo3Baw1U6ok6/qxD2Vm3FurEUcFdI4kMmCCy6e2zZgyMqM3lPl+hH68KnBGYKAPBvTJC38q+b5Eu1ALpuJJ/K2MSE1gREn5od6PP2jfX1Wnzc1RJQtM+If2V6uTOCdivvkKb2mat1UN60pHEa9bdu+K9ZQyrNhhKCXCz0QcChCMxWStv8XzM9h04XQV7wHNNYjjiq89Cj9nP+EM65qcl2Lu6z9s3Bv/G3McNBZ9X43aiYIkiEZArAR5g8XnVO0nb9TYXq9MOSBB247qwZl/fj1GrbgW8tEiP061Nv/Sh2fSwzHxbhsmhckOtlMEn/3H7ZrUKk6FRp2YfnsyXxNB/eLIkz7Z+bsuQmRpwUhxa/8jM8ilFcUQpyjBwvvIDFztX0LpRrb0oLXWRBYG6Ggz0SSxSKekXKh7TKE1zAGtC7LWEUp3hzrYsh727RGD4kGemsNRTUhgNZ7jNqZ/MgQ2hz2miNMo0NN/I6gwqxRDGmNx0m+NWXScR6LQTSq7Vt43ep6NN9Rfbjb0Yu8w6dkkri2EqIuVXXJTsyW3cmOoY3UBqerleAHf6itmeqpFkLqWiyvcNK0770iRxmtNJ6r6PBPE1sZ/XvAY69XUHJ68Ryi8Pxds3LZvYW3ZzfzLHjbMC+aokUDb/HJM48WvZ+z/q64Tgr0yZFOCq2+OqLYVIYQl0aNQ8TqcB9lVxR/asQTzNW4Id30jTCM/LllhdVJ9uAu94X6XUiKiPX8lpHRZ1RI2F4WzRSvsIBVAjC6W2Ox9KXIl2XLUzcd4zqtiTVBPhO0THcAQJwKrYlLwddjsY3o+rhUUQ9EfQjq/7JYJgA0b3Xb2rzSG/7ge0AKLSm2wyTNL23oFS1daxj8YbvCpjrDHLPMgh+vjrKK2ftRppAtkB+qa8acqDll8qN0PcQMJt1wJ7h6d0Qq2JFIqIcCOYQDK4JNutj6EMdcve0eShpkV3sU/wPzhRvkOG4p2+x0ZbN4YeMWlgobA8qRuBPi3N0SPLBaXJ3cw2xBHZ1DxFlVFKFXw0+vSLm1WaC/6s6/6viY1vL4C3JhoKqygLI+VaPln7eeZ06olUSoqP53skZB/TxxASBMBAm0vtgKwqMXuJz7YFuTQgJ6ZgHIfZrMztxfvbGouSV0GZ0AwFefC5QAAr45avWd2Sf3oYGvdTFA0AABAIAA+LP1ue2YAvpiffDAx9twPCC1Q9daML+yD5PH4deNNQB0ejQiI1+IQJtNWEJ60v/6NYGpdv3wnQqNyMv8UajmligHJ+ZFM7LdASRo5JotAzTe+bJIAzpIKgE/XH2Kk786b/X1gE7wuXQAmod0GUze9iisGKDp9NmAtoTwPR6Dxo1H5oNWQgUXrs5KAr/GdhCXWZWA9xuOGVBhFIDvWgz955wGoh7umZ4KGKD5pQbAaNv8btpCGyuQwqISh0YrUTgAQJCn9cGWKexZnZvn6RC1LM6Hg2oNQG1eYyGmu8sDk9/TTuPj+9eILkuak0O6G42zf9orSJWuhAAA+5m3tWpEzVkPKNOgyMViRcAaGPoev4JagBq/9xvsMoMi1xSY/81hrIphlLnvmDEFKi6Ia1Gh6ehKE3QcxB4VG1RGRRyx+88SmIX68iIsMZ4btbxZ1ClQ8wV4WERJ5ihmKudd/x3M/3DjySsYxCGhVFP/3NzPopKGViXBRay7is2gQ+UlcSzwl+HDHMFmso1z7UMABsaQpvI24Ums56jlD6eWTIdyxrlZQtuwptVq6X6aZkIz8p2624Hm6n+KgSb42lFd1BSo9Ti1Y4hrwlwurgex0nIXrgX3xo3RiUQBupbhnKQSASEe8DC9lVmo3R712CzXhWjDM4JnzKOeYrEsCRqDRVggNPI6tS0IVnQ3Ax0rdjIyUIvlYqxDOzd4pjgpXhcMwQ60GcvgqB2G3pO+44QS8JVW20csqdZG8jEkh6THGMfBQgpAfxtxdR3TufCoYXIz3egWn9MPgrsl6Pq3sFaub3KNnbxk0Yh8ylL+uuk6C8oLCk6TOCAniUFCjHN3UDj1VySiRqnHsBJTYugCfXDjEjl+ag8WZeuzNyyaa7U79thhfszJ8UUOAJQ7VvEa+vbYCA2BvhnQt1GDFv8HGBI7UKuJpN4BCjjp3FtGuAeN+AoloKi3UK8BdfkNlFc1qOvtEndkYsPqfQz0QQljE2n7X1x5yj2bM9SfoYssuHguRbkd+oqQ+2hF4IoIxg8SV8E7DUHJXY6cpsFoPOwzuew4PHa19WB9CmFYM8TVuxzc4eahMaCx5A/F4Eztpcb+5nSaTg3gzMlaCIPz7kjWtDpPHYXKulZHGL4yoTZHK5OWMI171hf2erA+U18dijJAO/vk1mUsLroAaxiDjiMowzQfx8ITKMNrhhljOlXn9k94BudfL0uD7jV+aJuvKbdH5n4KgC2NDZffWBUX6o4gsmMpWBLJxX/Z+SbgGxKamrvH4CFiCOISfHRN2MkXjdqCm7HSmVPMroB+8YYRGmRk/xqJVrcIYfB+O13F0M+qUN0BcEwjkG4YlN2oYq4C9L34AeYzo/7zNTosMWa/pX8urgSPMbjd5TZ4tznnGt8LB55/fNp5y3nVs6NfRSVwIfqTph4EYMCbD19arM3tB70jTfv4bydBgP+Umq3NCJ+ryyL3N7fs6W7W7YBHzntVEOeIqxBK5VfhiDenxepVeMxNVBFw1ldF5LFNWmuossFeZXVylW140FZRiKJWUVGCUmWPxqxxKS0DAXCNgQb6e4IIkAxocDrcEDst66nCA6r2KgIgaq6yAg7qZKImHqqsAVN51dl0gd2oWmLsqhVuomqNOviJeoOHIMCUONq6J2AU3BBLraZVEiNzaDaqQRDUwbldhrBoVNGquWml3EQbgEwYiSmYCVN8qyiRgobUkrHik8hu38mp7ltTTESryKJ8Y020/Am5So3NmVylA5GbMQhmmQjRma+sSctUxaJEZQ1gVyhkmAAVKANA3OgrVlyekZONSbPNZlhLJmONkCUJLu7v22W3KB0nCdm56JlE9seyVYw3kQRUwBlfN5P3zJ+4tiYNL88KKLGD6HyvWqBar5oJGdCOhB7Bln7BsFIP0w3ID7WGHZ4MTzgZKVSLtnTm49k7g5a3laWQni7MDDj6x3uBplQSGUp5UyroWOX2w0L0qHrcvqobeIf2cnnjRUzsXqRYRrT+5vlwGKJcCP3BYrL4Gn3N/KdAb7ffoP1nFYN4SIBW4FZCaA1J0AaSQWILwC9dBe0gtSR1yszH9QnHbs6wLfCqQrh4tudWe8WISFyR62gaan/2ADo3jBbim2kGD8wWxcJO4I6/dDI3t7vNw8Pn2eIEeeeVT958+NZPaEl+/AUQpuHrnvutJhIkmLgdhfWwjSSkwoSLIBMB3VfOq7fUGyLLUsLA5peqAR97SIzYlhcrXoLE/HX1ZI8kl1x35fAQBBARCRmf5U63gjgjBiZWK0m87o2u9TFSy1eZAspvqPcKtjMhETEJKVm7klNQSpNeahmllEklqzS7VVsjhCUAzkgtu7VG+gEKhMoop6xy5clXQNuedPRlVgj4squ5MHIfgF3uKt669iEK9zctnZzKgbKRyU6Van01RVRbZHVc3L0QZQPey91hedOLlisPZKwro3mRzZBZGC8iKiYuIdkJ+S74zJgYGztI0Fxsww2a7apUh2xqlKSVnIKp8QrsK93ejlBkZOUQYcqd6DCvaqnN4pqi1k3TFkqj9XQV76yreNPYy763ZjVnauh7VahnsRANZrp/nTg4ubjBPBDDvHxQfgFBcRqYYeW4UR6qphTvs4AFOIFoLFEDE3bBswjmM/QTE2ZkrCHjjDfBdIZNb6JJRkLhCBElY1Qcy2ZK7LSpAdBONV8oaqXyZKVaq+tIPotNG67duHUnK9ewOlBUggtaUVVT5+DRHrOtQyCSwNYm4KRNgFwbgBBc2iaLDbw2MEcRZor8Ue9DpxUXpintOAzbWMSEmjFhPvzirFiJadAjHbAzd2hw0H9l0EzNzC3+usvNiJRixeubDvw+1MiF+UgUbe1/j0SySfhPtrm4ZequkvM+SiDlc0RDdxDKXh72GLaSPQysiFJ52zRbdjJ8pJasVpmZnZvn1NHnxAoUvcVdRgzp9LN+p1bSrNeAQWg2u6t31+yp3Vv3Drq8v/5AgxIXWN7bKODLTdPB5kMtSjfSat3G5Jr1vWYMbdy52WqLzfbJFiVHb5zHTjt07zA3K2MdnV3d4Z7I4V49mKyt0Wy9dVqtluk81aW+aP/A4JByk6zsXkg57KBDDpg2I3MkNqwlHCVT8iSI4z5Y1ILnO8UnlHiimJGSM8G/DtG1LZ/95LRJJAr09ajcCtpThYP+WL5Vz/dCzXGBzuGdgiuq74pcx1GejfXKojFSxic8jeVsGTG55ep4grJVSzaGjcyUfBNqq5/4AdE9X8TPhYKMqVKID9XYhI9zVCxTir8Ki6w/1EQpdR6zHRWQXN0JrNgTQhb6qLm190Tfs7idNqbP5ITEuiGYfbgAdXimpxiZ7KwczGwRtudrlZXHuBbTx/GAH3dUb8sRbBnkti7VjnbIl5R2yxohNuxxLj46cjsMO1kaRvGjdQgHWWPFPJICwdS5lTe2r6vpMqu4h5rgiVDhsO7PgED7wiEUtsARlJrqSD9KktoTkeNWdlYMip9OL1bbi2FvEn9byr0c9osakvt76gA4bliSERCRqMecjIJpzJuUAQVwFUcRdUA7XViSERCtmsgaxeIUaUVte74rv6/5ME6bEr4bGXRgV0Ibf+z28e9+N7UpHxcI1WLoBBLkNxf8sArWwjhwAS/bu0ZAQURCxrx0CQhTIuYsywONQIQW6IIfrt/t5gfzCgwu64OTlGaAUxAwZV6+1DgcnnPh4rv+pC++PyxLYEi2UMBoMnrC65MG0NvlQWST+zco8LqdxzECg5AwsJNpENF5AM2LmZOFZ0lMqXkYtOpKtkh2g4BBSE2NaedJUByzUGqSls2gIu1AGjVZbdc6bHoYTtBqmm06oZsghtH+vfr057qOVxgbu34SH09Xe91nvprooBoMDELC6E7GIagBKWHmRFimYVrpDGtSUrJFshsCDEJqakxbcZFQHLNgNUnLZlCRdjSNmqy2ax02PQwnaDXNNn2Lbnzn0mnWd8YaBd3HPvGZz33hZNg5t8XdV8rXvunsoG4jn/vMF770jftW3Tle/uynwKndNgVnfXsO8uB4PKN9FqWcWefWH+ichP72Pp/d2+9A7AhFMr9eBpcLhpXaP/7VmKtyrsa5LkJ1u780/wvXQHwLnkEbtUfMd8ADCcW0+QbMbtzSemMZquhVynWv39vj802trf5rXYQQsimNQlwsO/y6KyRcl7NHpJ1mql7yzUig+iEALc3kzNgC4mpqIK2XRamWswzls9wKDR7Tg8OcCxAipuzxVITQy0HAbXHK4KmTKolzAIiJLQlZcxc1dMD6FaJi9rrC0NgBd76WOjYnbJBJMiSDDVzQ0I4jRHLnbN2/oQ3JosF8TYoS4kM/RK7FCW6iZ9wtLnozF2rCmMmhCeMmRpmxKTZCP4C5QQhGUAwnJLf9rHbsdxIUy8q9CiiGEw/y/o9tqDk08xhDC6oDPtbnl75jyZmJjPplx12aokok7+iXdXdrhbw5MSsYkm4AFtWSKa5NEPudoCvMpZHc+5HlS0y5VdfVPA/xAcNLRxpTVLhYi6j7eZQt0m3eX+1/fzhstp0Lrzj+5JQl4W7n+nSkksRrLZcL9tATOX4hy3d0lyWAz2HhQPpjZMnXc/O8YVmVA6QUbVsH7rY1jA2ejuUUlq7rJMu9TpY+kRTxZ/UWVHJqBcnUwXHFhCmQKTlfxcrzMkS9JPh0fCP3/aipaotwsDuUDOGb9RxA6fn1uMjMWiGlOfYRPoKVdV0R6z1uiRSgIiMlHRKUKLG1DgZoJ4giSa3SPoKalU0uNmok3NTPI7dTO/3nvy4/m3u5pXdq22nv6P9/zQU7AAA=) format("woff2")}:host{--font-family: "Manrope", sans-serif;--monospace-font-family: Inconsolata, Monaco, Consolas, Courier New, Courier, monospace;--font-size-0: .6875rem;--font-size-1: .75rem;--font-size-2: .875rem;--font-size-3: 1rem;--font-size-4: 1.125rem;--font-size-5: 1.25rem;--font-size-6: 1.375rem;--font-size-7: 1.5rem;--line-height-1: 1.125rem;--line-height-2: 1.25rem;--line-height-3: 1.5rem;--line-height-4: 1.75rem;--line-height-5: 2rem;--line-height-6: 2.25rem;--line-height-7: 2.5rem;--font-weight-normal: 440;--font-weight-medium: 540;--font-weight-semibold: 640;--font-weight-bold: 740;--font: normal 400 var(--font-size-3) / var(--line-height-3) var(--font-family);--font-medium: normal var(--font-weight-medium) var(--font-size-3) / var(--line-height-3) var(--font-family);--font-semibold: normal var(--font-weight-semibold) var(--font-size-3) / var(--line-height-3) var(--font-family);--font-bold: normal var(--font-weight-bold) var(--font-size-3) / var(--line-height-3) var(--font-family);--font-small: normal 400 var(--font-size-2) / var(--line-height-2) var(--font-family);--font-small-medium: normal var(--font-weight-medium) var(--font-size-2) / var(--line-height-2) var(--font-family);--font-small-semibold: normal var(--font-weight-semibold) var(--font-size-2) / var(--line-height-2) var(--font-family);--font-small-bold: normal var(--font-weight-bold) var(--font-size-2) / var(--line-height-2) var(--font-family);--font-xsmall: normal 400 var(--font-size-1) / var(--line-height-1) var(--font-family);--font-xsmall-medium: normal var(--font-weight-medium) var(--font-size-1) / var(--line-height-1) var(--font-family);--font-xsmall-semibold: normal var(--font-weight-semibold) var(--font-size-1) / var(--line-height-1) var(--font-family);--font-xsmall-bold: normal var(--font-weight-bold) var(--font-size-1) / var(--line-height-1) var(--font-family);--font-button: normal var(--font-weight-medium) var(--font-size-1) / var(--line-height-1) var(--font-family);--font-tooltip: normal var(--font-weight-medium) var(--font-size-1) / var(--line-height-2) var(--font-family);--z-index-component-selector: 100;--z-index-floating-panel: 101;--z-index-drawer: 150;--z-index-opened-drawer: 151;--z-index-spotlight: 200;--z-index-popover: 300;--z-index-activation-button: 1000;--duration-1: .1s;--duration-2: .2s;--duration-3: .3s;--duration-4: .4s;--button-background: var(--gray-100);--button-background-hover: var(--gray-150);--size-m: 1.75rem;--space-25: 2px;--space-50: 4px;--space-75: 6px;--space-100: 8px;--space-150: 12px;--space-200: 16px;--space-300: 24px;--space-400: 32px;--space-500: 40px;--space-600: 48px;--space-700: 56px;--space-800: 64px;--space-900: 72px;--radius-1: .1875rem;--radius-2: .375rem;--radius-3: .75rem}:host{--lumo-font-family: var(--font-family);--lumo-font-size-xs: var(--font-size-1);--lumo-font-size-s: var(--font-size-2);--lumo-font-size-m: var(--font-size-3);--lumo-font-size-l: var(--font-size-4);--lumo-font-size-xl: var(--font-size-5);--lumo-font-size-xxl: var(--font-size-6);--lumo-font-size-xxxl: var(--font-size-7);--lumo-line-height-s: var(--line-height-2);--lumo-line-height-m: var(--line-height-3);--lumo-line-height-l: var(--line-height-4);--lumo-border-radius-s: var(--radius-1);--lumo-border-radius-m: var(--radius-2);--lumo-border-radius-l: var(--radius-3);--lumo-base-color: var(--surface-0);--lumo-body-text-color: var(--color-high-contrast);--lumo-header-text-color: var(--color-high-contrast);--lumo-secondary-text-color: var(--color);--lumo-tertiary-text-color: var(--color);--lumo-error-text-color: var(--color-danger);--lumo-primary-text-color: var(--color-high-contrast);--lumo-primary-color: var(--color-high-contrast);--lumo-primary-color-50pct: var(--color-accent);--lumo-primary-contrast-color: var(--lumo-secondary-text-color);--lumo-space-xs: var(--space-50);--lumo-space-s: var(--space-100);--lumo-space-m: var(--space-200);--lumo-space-l: var(--space-300);--lumo-space-xl: var(--space-500);--lumo-icon-size-xs: var(--font-size-1);--lumo-icon-size-s: var(--font-size-2);--lumo-icon-size-m: var(--font-size-3);--lumo-icon-size-l: var(--font-size-4);--lumo-icon-size-xl: var(--font-size-5);--vaadin-focus-ring-color: var(--focus-color);--vaadin-focus-ring-width: 2px}:host{color-scheme:light;--surface-0: hsl(var(--gray-h) var(--gray-s) 90% / .8);--surface-1: hsl(var(--gray-h) var(--gray-s) 95% / .8);--surface-2: hsl(var(--gray-h) var(--gray-s) 100% / .8);--surface-background: linear-gradient( hsl(var(--gray-h) var(--gray-s) 95% / .7), hsl(var(--gray-h) var(--gray-s) 95% / .65) );--surface-glow: radial-gradient(circle at 30% 0%, hsl(var(--gray-h) var(--gray-s) 98% / .7), transparent 50%);--surface-border-glow: radial-gradient(at 50% 50%, hsl(var(--purple-h) 90% 90% / .8) 0, transparent 50%);--surface: var(--surface-glow) no-repeat border-box, var(--surface-background) no-repeat padding-box, hsl(var(--gray-h) var(--gray-s) 98% / .2);--surface-with-border-glow: var(--surface-glow) no-repeat border-box, linear-gradient(var(--background-color), var(--background-color)) no-repeat padding-box, var(--surface-border-glow) no-repeat border-box 0 0 / var(--glow-size, 600px) var(--glow-size, 600px);--surface-border-color: hsl(var(--gray-h) var(--gray-s) 100% / .7);--surface-backdrop-filter: blur(10px);--surface-box-shadow-1: 0 0 0 .5px hsl(var(--gray-h) var(--gray-s) 5% / .15), 0 6px 12px -1px hsl(var(--shadow-hsl) / .3);--surface-box-shadow-2: 0 0 0 .5px hsl(var(--gray-h) var(--gray-s) 5% / .15), 0 24px 40px -4px hsl(var(--shadow-hsl) / .4);--background-button: linear-gradient( hsl(var(--gray-h) var(--gray-s) 98% / .4), hsl(var(--gray-h) var(--gray-s) 90% / .2) );--background-button-active: hsl(var(--gray-h) var(--gray-s) 80% / .2);--color: var(--gray-500);--color-high-contrast: var(--gray-900);--color-accent: var(--purple-700);--color-danger: var(--red-700);--border-color: var(--gray-150);--border-color-high-contrast: var(--gray-300);--border-color-button: var(--gray-350);--border-color-popover: hsl(var(--gray-hsl) / .08);--border-color-dialog: hsl(var(--gray-hsl) / .08);--accent-color: var(--purple-600);--selection-color: hsl(var(--blue-hsl));--shadow-hsl: var(--gray-h) var(--gray-s) 20%;--lumo-contrast-5pct: var(--gray-100);--lumo-contrast-10pct: var(--gray-200);--lumo-contrast-60pct: var(--gray-400);--lumo-contrast-80pct: var(--gray-600);--lumo-contrast-90pct: var(--gray-800);--card-bg: rgba(255, 255, 255, .5);--card-hover-bg: rgba(255, 255, 255, .65);--card-open-bg: rgba(255, 255, 255, .8);--card-border: 1px solid rgba(0, 50, 100, .15);--card-open-shadow: 0px 1px 4px -1px rgba(28, 52, 84, .26);--card-section-border: var(--card-border);--card-field-bg: var(--lumo-contrast-5pct);--indicator-border: white}:host(.dark){color-scheme:dark;--surface-0: hsl(var(--gray-h) var(--gray-s) 10% / .85);--surface-1: hsl(var(--gray-h) var(--gray-s) 14% / .85);--surface-2: hsl(var(--gray-h) var(--gray-s) 18% / .85);--surface-background: linear-gradient( hsl(var(--gray-h) var(--gray-s) 8% / .65), hsl(var(--gray-h) var(--gray-s) 8% / .7) );--surface-glow: radial-gradient( circle at 30% 0%, hsl(var(--gray-h) calc(var(--gray-s) * 2) 90% / .12), transparent 50% );--surface: var(--surface-glow) no-repeat border-box, var(--surface-background) no-repeat padding-box, hsl(var(--gray-h) var(--gray-s) 20% / .4);--surface-border-glow: hsl(var(--gray-h) var(--gray-s) 20% / .4) radial-gradient(at 50% 50%, hsl(250 40% 80% / .4) 0, transparent 50%);--surface-border-color: hsl(var(--gray-h) var(--gray-s) 50% / .2);--surface-box-shadow-1: 0 0 0 .5px hsl(var(--purple-h) 40% 5% / .4), 0 6px 12px -1px hsl(var(--shadow-hsl) / .4);--surface-box-shadow-2: 0 0 0 .5px hsl(var(--purple-h) 40% 5% / .4), 0 24px 40px -4px hsl(var(--shadow-hsl) / .5);--color: var(--gray-650);--background-button: linear-gradient( hsl(var(--gray-h) calc(var(--gray-s) * 2) 80% / .1), hsl(var(--gray-h) calc(var(--gray-s) * 2) 80% / 0) );--background-button-active: hsl(var(--gray-h) var(--gray-s) 10% / .1);--border-color-popover: hsl(var(--gray-h) var(--gray-s) 90% / .1);--border-color-dialog: hsl(var(--gray-h) var(--gray-s) 90% / .1);--shadow-hsl: 0 0% 0%;--lumo-disabled-text-color: var(--lumo-contrast-60pct);--card-bg: rgba(255, 255, 255, .05);--card-hover-bg: rgba(255, 255, 255, .065);--card-open-bg: rgba(255, 255, 255, .1);--card-border: 1px solid rgba(255, 255, 255, .11);--card-open-shadow: 0px 1px 4px -1px rgba(0, 0, 0, .26);--card-section-border: var(--card-border);--card-field-bg: var(--lumo-contrast-10pct);--indicator-border: var(--lumo-base-color)}', mc = "button{-webkit-appearance:none;appearance:none;background:var(--background-button);background-origin:border-box;font:var(--font-button);color:var(--color-high-contrast);border:1px solid var(--border-color);border-radius:var(--radius-2);padding:var(--space-25) var(--space-100)}button:focus-visible{outline:2px solid var(--blue-500);outline-offset:2px}button:active:not(:disabled){background:var(--background-button-active)}button:disabled{color:var(--gray-400);background:transparent}", yc = ":is(vaadin-context-menu-overlay,vaadin-select-overlay,vaadin-menu-bar-overlay){z-index:var(--z-index-popover)}:is(vaadin-context-menu-overlay,vaadin-select-overlay,vaadin-menu-bar-overlay):first-of-type{padding-top:0}:is(vaadin-context-menu-overlay,vaadin-menu-bar-overlay,vaadin-select-overlay,vaadin-combo-box-overlay,vaadin-tooltip-overlay)::part(overlay){background:var(--background-color);-webkit-backdrop-filter:var(--surface-backdrop-filter);backdrop-filter:var(--surface-backdrop-filter);border:1px solid var(--contrast-color-5);border-radius:var(--radius-1);box-shadow:var(--surface-box-shadow-1);margin-top:0}:is(vaadin-context-menu-overlay,vaadin-select-overlay,vaadin-menu-bar-overlay)::part(content){padding:var(--space-50)}:is(vaadin-context-menu-item,vaadin-menu-bar-item,vaadin-select-item,vaadin-combo-box-item,.custom-menu-item){align-items:center;border-radius:var(--radius-1);color:var(--body-text-color);cursor:default;display:flex;font:var(--font-xsmall);min-height:0;padding:calc((var(--size-m) - var(--line-height-1)) / 2) var(--space-100);--_lumo-item-selected-icon-display: none}:is(vaadin-context-menu-item,vaadin-menu-bar-item,vaadin-select-item,vaadin-combo-box-item,.custom-menu-item)[disabled],:is(vaadin-context-menu-item,vaadin-menu-bar-item,vaadin-select-item,vaadin-combo-box-item,.custom-menu-item)[disabled] .hint,:is(vaadin-context-menu-item,vaadin-menu-bar-item,vaadin-select-item,vaadin-combo-box-item,.custom-menu-item)[disabled] vaadin-icon{color:var(--lumo-disabled-text-color)}:is(vaadin-context-menu-item,vaadin-menu-bar-item)[expanded]{background:var(--gray-200)}:is(vaadin-context-menu-item,vaadin-menu-bar-item,vaadin-select-item,vaadin-combo-box-item,.custom-menu-item):not([disabled]):hover{background:var(--hover-color)}:is(vaadin-context-menu-item,vaadin-menu-bar-item,vaadin-select-item,vaadin-combo-box-item,.custom-menu-item)[focus-ring]{outline:2px solid var(--selection-color);outline-offset:-2px}:is(vaadin-context-menu-item,vaadin-menu-bar-item,vaadin-select-item,vaadin-combo-box-item,.custom-menu-item):is([aria-haspopup=true]):after{margin-inline-end:calc(var(--space-200) * -1);margin-right:unset}:is(vaadin-context-menu-item,vaadin-menu-bar-item,vaadin-select-item,vaadin-combo-box-item,.custom-menu-item).danger{color:var(--error-color);--color: currentColor}:is(vaadin-context-menu-item,vaadin-menu-bar-item,vaadin-select-item,vaadin-combo-box-item,.custom-menu-item)::part(content){display:flex;align-items:center;gap:var(--space-100)}:is(vaadin-context-menu-item,vaadin-menu-bar-item,vaadin-select-item,vaadin-combo-box-item,.custom-menu-item) vaadin-icon{width:1em;height:1em;padding:0;color:var(--color)}:is(vaadin-context-menu-overlay,vaadin-select-overlay,vaadin-menu-bar-overlay) hr{margin:var(--space-50)}:is(vaadin-context-menu-item,vaadin-select-item,vaadin-menu-bar-item,.custom-menu-item) .label{padding-inline-end:var(--space-300)}:is(vaadin-context-menu-item,vaadin-select-item,vaadin-menu-bar-item,.custom-menu-item) .hint{margin-inline-start:auto;color:var(--color)}:is(vaadin-context-menu-item,vaadin-menu-bar-item,vaadin-select-item,.custom-menu-item) kbd{display:inline-block;border-radius:var(--radius-1);border:1px solid var(--border-color);min-width:1em;min-height:1em;text-align:center;margin:0 .1em;padding:.1em .25em;box-sizing:border-box;font-size:var(--font-size-1);font-family:var(--font-family);line-height:1}:is(copilot-activation-button-development-workflow),:is(copilot-activation-button-user-info){justify-content:space-between}:is(:is(copilot-activation-button-development-workflow),:is(copilot-activation-button-user-info)) div.warning{--small-text-color: var(--yellow-700)}:is(:is(copilot-activation-button-development-workflow),:is(copilot-activation-button-user-info)) div.error{--small-text-color: var(--red)}:is(:is(copilot-activation-button-development-workflow),:is(copilot-activation-button-user-info)) div.user{font:var(--font-medium);font-size:inherit}:is(:is(copilot-activation-button-development-workflow),:is(copilot-activation-button-user-info)) div.portrait{width:32px;height:32px;border-radius:50%;background-size:cover}:is(:is(copilot-activation-button-development-workflow),:is(copilot-activation-button-user-info)) div.icon{width:8px;height:8px;margin:0 .1em;background-color:var(--small-text-color)}:is(:is(copilot-activation-button-development-workflow),:is(copilot-activation-button-user-info)) div.icon.warning{border-radius:4px}:is(:is(copilot-activation-button-development-workflow),:is(copilot-activation-button-user-info)) div.status{font-size:var(--font-size-0);color:var(--small-text-color)}:is(copilot-alignment-overlay)::part(content){padding:0}:is(.padding-values-overlay){--lumo-base-color: var(--selection-color);--color-high-contrast: white}:is(.padding-values-overlay) vaadin-combo-box-item:hover{color:#272c35d9}", wc = "code.codeblock{background:var(--codeblock-bg);border-radius:var(--radius-2);display:block;font-family:var(--monospace-font-family);font-size:var(--font-size-1);line-height:var(--line-height-1);overflow:hidden;padding:.3125rem 1.75rem .3125rem var(--space-100);position:relative;text-overflow:ellipsis;white-space:pre;min-height:var(--line-height-1)}copilot-copy{position:absolute;right:0;top:0}copilot-copy button{align-items:center;background:none;border:1px solid transparent;border-radius:var(--radius-2);color:var(--color);display:flex;font:var(--font-button);height:1.75rem;justify-content:center;padding:0;width:1.75rem}copilot-copy button:hover{color:var(--color-high-contrast)}", Ac = "vaadin-dialog-overlay::part(overlay){background:#fff}vaadin-dialog-overlay::part(content){background:var(--surface);font:var(--font-xsmall);padding:var(--space-300)}vaadin-dialog-overlay::part(header){background:var(--surface);font:var(--font-xsmall-semibold);border-bottom:1px solid var(--border-color);padding:var(--space-100) var(--space-150)}vaadin-dialog-overlay::part(footer){background:var(--surface);padding:var(--space-150)}vaadin-dialog-overlay::part(header-content){display:flex;line-height:normal;justify-content:space-between;width:100%;align-items:center}vaadin-dialog-overlay [slot=header-content] h2{margin:0;padding:0;font:var(--font-small-medium)}vaadin-dialog-overlay [slot=header-content] .close{line-height:0}vaadin-dialog-overlay{--vaadin-button-font-size: var(--font-size-1);--vaadin-button-height: var(--line-height-4)}vaadin-dialog-overlay vaadin-button[theme~=primary]{background-color:hsl(var(--blue-hsl))}vaadin-dialog-overlay a svg{height:12px;width:12px}.dialog-footer vaadin-button{--vaadin-button-primary-background: var(--button-background);--vaadin-button-border-radius: var(--radius-1);--vaadin-button-primary-text-color: var(--color-high-contrast);--vaadin-button-height: var(--line-height-5);font:var(--font-small-medium)}.dialog-footer vaadin-button span[slot=suffix]{display:flex}.dialog-footer vaadin-button span[slot=suffix] svg{height:14px;width:14px}", Ec = ":host{--vaadin-input-field-label-font-size: var(--font-size-1);--vaadin-select-label-font-size: var(--font-size-1);--vaadin-input-field-helper-font-size: var(--font-size-0);--vaadin-button-font-size: var(--font-size-2);--vaadin-checkbox-label-font-size: var(--font-size-1);--vaadin-input-field-value-font-size: var(--font-xsmall);--vaadin-input-field-background: transparent;--vaadin-input-field-border-color: var(--input-border-color);--vaadin-input-field-border-radius: var(--radius-1);--vaadin-input-field-border-width: 1px;--vaadin-input-field-height: var(--size-m)}"; +var lu = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; +function Oc(e) { + return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; +} +function cu(e) { + if (e.__esModule) return e; + var t = e.default; + if (typeof t == "function") { + var n = function r() { + return this instanceof r ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments); + }; + n.prototype = t.prototype; + } else n = {}; + return Object.defineProperty(n, "__esModule", { value: !0 }), Object.keys(e).forEach(function(r) { + var i = Object.getOwnPropertyDescriptor(e, r); + Object.defineProperty(n, r, i.get ? i : { + enumerable: !0, + get: function() { + return e[r]; + } + }); + }), n; +} +var Rt = { exports: {} }, Zr; +function Sc() { + if (Zr) return Rt.exports; + Zr = 1; + function e(t, n = 100, r = {}) { + if (typeof t != "function") + throw new TypeError(`Expected the first parameter to be a function, got \`${typeof t}\`.`); + if (n < 0) + throw new RangeError("`wait` must not be negative."); + const { immediate: i } = typeof r == "boolean" ? { immediate: r } : r; + let o, a, s, l, c; + function u() { + const g = o, m = a; + return o = void 0, a = void 0, c = t.apply(g, m), c; + } + function d() { + const g = Date.now() - l; + g < n && g >= 0 ? s = setTimeout(d, n - g) : (s = void 0, i || (c = u())); + } + const v = function(...g) { + if (o && this !== o && Object.getPrototypeOf(this) === Object.getPrototypeOf(o)) + throw new Error("Debounced method called with different contexts of the same prototype."); + o = this, a = g, l = Date.now(); + const m = i && !s; + return s || (s = setTimeout(d, n)), m && (c = u()), c; + }; + return Object.defineProperty(v, "isPending", { + get() { + return s !== void 0; + } + }), v.clear = () => { + s && (clearTimeout(s), s = void 0); + }, v.flush = () => { + s && v.trigger(); + }, v.trigger = () => { + c = u(), v.clear(); + }, v; + } + return Rt.exports.debounce = e, Rt.exports = e, Rt.exports; +} +var Nc = /* @__PURE__ */ Sc(); +const xc = /* @__PURE__ */ Oc(Nc); +class _c { + constructor() { + this.documentActive = !0, this.addListeners = () => { + window.addEventListener("pageshow", this.handleWindowVisibilityChange), window.addEventListener("pagehide", this.handleWindowVisibilityChange), window.addEventListener("focus", this.handleWindowFocusChange), window.addEventListener("blur", this.handleWindowFocusChange), document.addEventListener("visibilitychange", this.handleDocumentVisibilityChange); + }, this.removeListeners = () => { + window.removeEventListener("pageshow", this.handleWindowVisibilityChange), window.removeEventListener("pagehide", this.handleWindowVisibilityChange), window.removeEventListener("focus", this.handleWindowFocusChange), window.removeEventListener("blur", this.handleWindowFocusChange), document.removeEventListener("visibilitychange", this.handleDocumentVisibilityChange); + }, this.handleWindowVisibilityChange = (t) => { + t.type === "pageshow" ? this.dispatch(!0) : this.dispatch(!1); + }, this.handleWindowFocusChange = (t) => { + t.type === "focus" ? this.dispatch(!0) : this.dispatch(!1); + }, this.handleDocumentVisibilityChange = () => { + this.dispatch(!document.hidden); + }, this.dispatch = (t) => { + if (t !== this.documentActive) { + const n = window.Vaadin.copilot.eventbus; + this.documentActive = t, n.emit("document-activation-change", { active: this.documentActive }); + } + }; + } + copilotActivated() { + this.addListeners(); + } + copilotDeactivated() { + this.removeListeners(); + } +} +const qr = new _c(), Pc = "copilot-development-setup-user-guide"; +function uu() { + un("use-dev-workflow-guide"), $.updatePanel(Pc, { floating: !0 }); +} +function _o() { + const e = p.jdkInfo; + return e ? e.jrebel ? "success" : e.hotswapAgentFound ? !e.hotswapVersionOk || !e.runningWithExtendClassDef || !e.runningWitHotswap || !e.runningInJavaDebugMode ? "error" : "success" : "warning" : null; +} +function du() { + const e = p.jdkInfo; + return e == null || _o() !== "success" ? "none" : e.jrebel ? "jrebel" : e.runningWitHotswap ? "hotswap" : "none"; +} +function Cc() { + return p.idePluginState?.ide === "eclipse" ? "unsupported" : p.idePluginState !== void 0 && !p.idePluginState.active ? "warning" : "success"; +} +function fu() { + if (!p.jdkInfo) + return { status: "success" }; + const e = _o(), t = Cc(); + return e === "warning" ? t === "warning" ? { status: "warning", message: "IDE Plugin, Hotswap" } : { status: "warning", message: "Hotswap is not enabled" } : t === "warning" ? { status: "warning", message: "IDE Plugin is not active" } : e === "error" ? { status: "error", message: "Hotswap is partially enabled" } : { status: "success" }; +} +function Dc() { + fe(`${Ce}get-dev-setup-info`, {}), window.Vaadin.copilot.eventbus.on("copilot-get-dev-setup-info-response", (e) => { + if (e.detail.content) { + const t = JSON.parse(e.detail.content); + p.setIdePluginState(t.ideInfo), p.setJdkInfo(t.jdkInfo); + } + }); +} +const ot = /* @__PURE__ */ new WeakMap(); +class Rc { + constructor() { + this.root = null, this.flatNodes = [], this._hasFlowComponent = !1, this.flowNodesInSource = {}; + } + async init() { + const t = Ws(); + t && (await this.addToTree(t), await this.addOverlayContentToTreeIfExists("vaadin-popover-overlay"), await this.addOverlayContentToTreeIfExists("vaadin-dialog-overlay")); + } + getChildren(t) { + return this.flatNodes.find((r) => r.uuid === t)?.children || []; + } + get allNodesFlat() { + return this.flatNodes; + } + getNodeOfElement(t) { + if (t) + return this.flatNodes.find((n) => n.element === t); + } + async handleRouteContainers(t, n) { + const r = wr(t); + if (!r && Js(t)) { + const i = Ht(t); + if (i && i.nextElementSibling) + return await this.addToTree(i.nextElementSibling, n), !0; + } + if (r && t.localName === "react-router-outlet") { + for (const i of Array.from(t.children)) { + const o = Kt(i); + o && await this.addToTree(o, n); + } + return !0; + } + return !1; + } + includeReactNode(t) { + return Vt(t) === "PreconfiguredAuthProvider" || Vt(t) === "RouterProvider" ? !1 : mr(t) || Gs(t); + } + async includeFlowNode(t) { + return Xs(t) ? !1 : this.isInitializedInProjectSources(t); + } + async isInitializedInProjectSources(t) { + const n = yr(t); + if (!n) + return !1; + const { nodeId: r, uiId: i } = n; + if (!this.flowNodesInSource[i]) { + const o = await Zn( + "copilot-get-component-source-info", + { uiId: i }, + (a) => a.data.nodeIdsInProject + ); + this.flowNodesInSource[i] = new Set(o); + } + return this.flowNodesInSource[i].has(r); + } + async addToTree(t, n) { + if (await this.handleRouteContainers(t, n)) + return; + const r = wr(t); + let i; + if (!r) + this.includeReactNode(t) && (i = this.generateNodeFromFiber(t, n)); + else if (await this.includeFlowNode(t)) { + const s = this.generateNodeFromFlow(t, n); + if (!s) + return; + this._hasFlowComponent = !0, i = s; + } + if (n) + i && (i.parent = n, n.children || (n.children = []), n.children.push(i)); + else { + if (!i) { + Te("Tree root node is undefined"); + return; + } + this.root = i; + } + i && this.flatNodes.push(i); + const o = i ?? n, a = r ? Array.from(t.children) : Fs(t); + for (const s of a) + await this.addToTree(s, o); + } + generateNodeFromFiber(t, n) { + const r = mr(t) ? Ht(t) : void 0, i = n?.children.length ?? 0; + return { + node: t, + parent: n, + element: r, + depth: n && n.depth + 1 || 0, + children: [], + siblingIndex: i, + isFlowComponent: !1, + isReactComponent: !0, + get uuid() { + if (ot.has(t)) + return ot.get(t); + if (t.alternate && ot.has(t.alternate)) + return ot.get(t.alternate); + const a = So(); + return ot.set(t, a), a; + }, + get name() { + return Ar(Vt(t)); + }, + get identifier() { + return Er(r); + }, + get nameAndIdentifier() { + return Kr(this.name, this.identifier); + }, + get previousSibling() { + if (i !== 0) + return n?.children[i - 1]; + }, + get nextSibling() { + if (!(n === void 0 || i === n.children.length - 1)) + return n.children[i + 1]; + }, + get path() { + return Gr(this); + } + }; + } + generateNodeFromFlow(t, n) { + const r = yr(t); + if (!r) + return; + const i = n?.children.length ?? 0; + return { + node: r, + parent: n, + element: t, + depth: n && n.depth + 1 || 0, + children: [], + siblingIndex: i, + get uuid() { + return `${r.uiId}#${r.nodeId}`; + }, + isFlowComponent: !0, + isReactComponent: !1, + get name() { + return Hs(r) ?? Ar(r.element.localName); + }, + get identifier() { + return Er(t); + }, + get nameAndIdentifier() { + return Kr(this.name, this.identifier); + }, + get previousSibling() { + if (i !== 0) + return n?.children[i - 1]; + }, + get nextSibling() { + if (!(n === void 0 || i === n.children.length - 1)) + return n.children[i + 1]; + }, + get path() { + return Gr(this); + } + }; + } + async addOverlayContentToTreeIfExists(t) { + const n = document.body.querySelector(t); + if (!n) + return; + const r = n.owner; + if (r) { + if (!this.getNodeOfElement(r)) { + const i = Pe(Kt(r)); + await this.addToTree(i ?? r, this.root); + } + for (const i of Array.from(n.children)) + await this.addToTree(i, this.getNodeOfElement(r)); + } + } + hasFlowComponents() { + return this._hasFlowComponent; + } + findNodeByUuid(t) { + return this.flatNodes.find((n) => n.uuid === t); + } + getElementByNodeUuid(t) { + return this.findNodeByUuid(t)?.element; + } + findByTreePath(t) { + if (t) + return this.flatNodes.find((n) => n.path === t); + } +} +function Gr(e) { + if (!e.parent) + return e.name; + let t = 0; + for (let n = 0; n < e.siblingIndex + 1; n++) + e.parent.children[n].name === e.name && t++; + return `${e.parent.path} > ${e.name}[${t}]`; +} +function Kr(e, t) { + return t ? `${e} "${t}"` : e; +} +const Tc = async () => { + const e = new Rc(); + await e.init(), window.Vaadin.copilot.tree.currentTree = e; +}; +var Vc = Object.defineProperty, Ic = Object.getOwnPropertyDescriptor, kc = (e, t, n, r) => { + for (var i = r > 1 ? void 0 : r ? Ic(t, n) : t, o = e.length - 1, a; o >= 0; o--) + (a = e[o]) && (i = (r ? a(t, n, i) : a(i)) || i); + return r && i && Vc(t, n, i), i; +}; +let Hr = class extends Pl { + constructor() { + super(...arguments), this.removers = [], this.initialized = !1, this.active = !1, this.toggleOperationInProgressAttr = () => { + this.toggleAttribute("operation-in-progress", p.operationWaitsHmrUpdate !== void 0); + }, this.operationInProgressCursorUpdateDebounceFunc = xc(this.toggleOperationInProgressAttr, 500), this.overlayOutsideClickListener = (e) => { + qe(e.target?.owner) || (p.active || qe(e.detail.sourceEvent.target)) && e.preventDefault(); + }; + } + static get styles() { + return [ + le(gc), + le(bc), + le(mc), + le(yc), + le(wc), + le(Ac), + le(Ec), + ul` + :host { + position: fixed; + inset: 0; + z-index: 9999; + contain: strict; + font: var(--font-small); + color: var(--color); + pointer-events: all; + cursor: var(--cursor, default); + } + + :host([operation-in-progress]) { + --cursor: wait; + --lumo-clickable-cursor: wait; + } + + :host(:not([active])) { + visibility: hidden !important; + pointer-events: none; + } + + /* Hide floating panels when not active */ + + :host(:not([active])) > copilot-section-panel-wrapper { + display: none !important; + } + :host(:not([active])) > copilot-section-panel-wrapper[individual] { + display: block !important; + visibility: visible; + pointer-events: all; + } + + /* Keep activation button and menu visible */ + + copilot-activation-button, + .activation-button-menu { + visibility: visible; + display: flex !important; + } + + copilot-activation-button { + pointer-events: auto; + } + + a { + color: var(--blue-600); + text-decoration-color: var(--blue-200); + } + + :host([user-select-none]) { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + } + + /* Needed to prevent a JS error because of monkey patched '_attachOverlay'. It is some scope issue, */ + /* where 'this._placeholder.parentNode' is undefined - the scope if 'this' gets messed up at some point. */ + /* We also don't want animations on the overlays to make the feel faster, so this is fine. */ + + :is( + vaadin-context-menu-overlay, + vaadin-menu-bar-overlay, + vaadin-select-overlay, + vaadin-combo-box-overlay, + vaadin-tooltip-overlay + ):is([opening], [closing]), + :is( + vaadin-context-menu-overlay, + vaadin-menu-bar-overlay, + vaadin-select-overlay, + vaadin-combo-box-overlay, + vaadin-tooltip-overlay + )::part(overlay) { + animation: none !important; + } + + :host(:not([active])) copilot-drawer-panel::before { + animation: none; + } + + /* Workaround for https://github.com/vaadin/web-components/issues/5400 */ + + :host([active]) .activation-button-menu .activate, + :host(:not([active])) .activation-button-menu .deactivate, + :host(:not([active])) .activation-button-menu .toggle-spotlight { + display: none; + } + ` + ]; + } + connectedCallback() { + super.connectedCallback(), this.init().catch((e) => Te("Unable to initialize copilot", e)); + } + async init() { + if (this.initialized) + return; + await window.Vaadin.copilot._machineState.initializer.promise, document.body.style.setProperty("--dev-tools-button-display", "none"), await import("./copilot-global-vars-later-UtaKiaeu.js"), await import("./copilot-init-step2-tquZBMEC.js"), Vl(), Cl(), this.tabIndex = 0, Dt.hostConnectedCallback(), window.addEventListener("keydown", Ur), E.onSend(this.handleSendEvent), this.removers.push(E.on("close-drawers", this.closeDrawers.bind(this))), this.removers.push( + E.on("open-attention-required-drawer", this.openDrawerIfPanelRequiresAttention.bind(this)) + ), this.removers.push( + E.on("set-pointer-events", (t) => { + this.style.pointerEvents = t.detail.enable ? "" : "none"; + }) + ), this.addEventListener("mousemove", this.mouseMoveListener), this.addEventListener("dragover", this.mouseMoveListener), nt.addOverlayOutsideClickEvent(); + const e = window.matchMedia("(prefers-color-scheme: dark)"); + this.classList.toggle("dark", e.matches), e.addEventListener("change", (t) => { + this.classList.toggle("dark", e.matches); + }), this.reaction( + () => p.spotlightActive, + () => { + ue.saveSpotlightActivation(p.spotlightActive), Array.from(this.shadowRoot.querySelectorAll("copilot-section-panel-wrapper")).filter((t) => t.panelInfo?.floating === !0).forEach((t) => { + p.spotlightActive ? t.style.setProperty("display", "none") : t.style.removeProperty("display"); + }); + } + ), this.reaction( + () => p.active, + () => { + this.toggleAttribute("active", p.active), p.active ? this.activate() : this.deactivate(), ue.saveCopilotActivation(p.active); + } + ), this.reaction( + () => p.activatedAtLeastOnce, + () => { + wo(), Dl(); + } + ), this.reaction( + () => p.sectionPanelDragging, + () => { + p.sectionPanelDragging && Array.from(this.shadowRoot.children).filter((n) => n.localName.endsWith("-overlay")).forEach((n) => { + n.close && n.close(); + }); + } + ), this.reaction( + () => p.operationWaitsHmrUpdate, + () => { + p.operationWaitsHmrUpdate ? this.operationInProgressCursorUpdateDebounceFunc() : (this.operationInProgressCursorUpdateDebounceFunc.clear(), this.toggleOperationInProgressAttr()); + } + ), this.reaction( + () => $.panels, + () => { + $.panels.find((t) => t.individual) && this.requestUpdate(); + } + ), ue.getCopilotActivation() && Ji().then(() => { + p.setActive(!0, "restore"); + }), this.removers.push( + E.on("user-select", (t) => { + const { allowSelection: n } = t.detail; + this.toggleAttribute("user-select-none", !n); + }) + ), go(), this.initialized = !0, Dc(); + } + /** + * Called when Copilot is activated. Good place to start attach listeners etc. + */ + async activate() { + un("activate"), Dt.activate(), qr.copilotActivated(), Rl(), this.openDrawerIfPanelRequiresAttention(), document.documentElement.addEventListener("mouseleave", this.mouseLeaveListener), nt.onCopilotActivation(), await Tc(), yo.loadPreviewConfiguration(), this.active = !0; + } + /** + * Called when Copilot is deactivated. Good place to remove listeners etc. + */ + deactivate() { + this.closeDrawers(), Dt.deactivate(), qr.copilotDeactivated(), document.documentElement.removeEventListener("mouseleave", this.mouseLeaveListener), nt.onCopilotDeactivation(), this.active = !1; + } + disconnectedCallback() { + super.disconnectedCallback(), Dt.hostDisconnectedCallback(), window.removeEventListener("keydown", Ur), E.offSend(this.handleSendEvent), this.removers.forEach((e) => e()), this.removeEventListener("mousemove", this.mouseMoveListener), this.removeEventListener("dragover", this.mouseMoveListener), nt.removeOverlayOutsideClickEvent(), document.documentElement.removeEventListener("vaadin-overlay-outside-click", this.overlayOutsideClickListener); + } + handleSendEvent(e) { + const t = e.detail.command, n = e.detail.data; + fe(t, n); + } + /** + * Opens the attention required drawer if there is any. + */ + openDrawerIfPanelRequiresAttention() { + const e = $.getAttentionRequiredPanelConfiguration(); + if (!e) + return; + const t = e.panel; + if (!t || e.floating) + return; + const n = this.shadowRoot.querySelector(`copilot-drawer-panel[position="${t}"]`); + n.opened = !0; + } + render() { + return ct` + + + + + + ${this.renderDrawer("left")} ${this.renderDrawer("right")} ${this.renderDrawer("bottom")} ${cc()} + ${this.renderSpotlight()} + + + `; + } + renderSpotlight() { + return p.userInfo === void 0 || p.userInfo.copilotProjectCannotLeaveLocalhost ? O : ct` + + `; + } + renderDrawer(e) { + return ct` + ${lc(e)} + `; + } + /** + * Closes the open drawers if any opened unless an overlay is opened from drawer. + */ + closeDrawers() { + const e = this.shadowRoot.querySelectorAll(`${Ce}drawer-panel`); + if (!Array.from(e).some((o) => o.opened)) + return; + const n = Array.from(this.shadowRoot.children).find( + (o) => o.localName.endsWith("overlay") + ), r = n && nt.getOwner(n); + if (!r) { + e.forEach((o) => { + o.opened = !1; + }); + return; + } + const i = nl(r, "copilot-drawer-panel"); + if (!i) { + e.forEach((o) => { + o.opened = !1; + }); + return; + } + Array.from(e).filter((o) => o.position !== i.position).forEach((o) => { + o.opened = !1; + }); + } + updated(e) { + super.updated(e), this.attachActivationButtonToBody(), pc(); + } + attachActivationButtonToBody() { + const e = document.body.querySelectorAll("copilot-activation-button"); + e.length > 1 && e[0].remove(); + } + mouseMoveListener(e) { + e.composedPath().find((t) => t.localName === `${Ce}drawer-panel`) || this.closeDrawers(); + } + mouseLeaveListener() { + E.emit("close-drawers", {}); + } +}; +Hr = kc([ + cl("copilot-main") +], Hr); +const Lc = window.Vaadin, Mc = { + init(e) { + Fi( + () => window.Vaadin.devTools, + (t) => { + const n = t.handleFrontendMessage; + t.handleFrontendMessage = (r) => { + vc(r) || n.call(t, r); + }; + } + ); + } +}; +Lc.devToolsPlugins.push(Mc); +export { + Xe as $, + Uc as A, + Ja as B, + Rc as C, + du as D, + O as E, + Pc as F, + uu as G, + fu as H, + Bc as I, + yo as J, + iu as K, + xc as L, + Pl as M, + ou as N, + eu as O, + Ce as P, + au as Q, + Il as R, + jc as S, + Fc as T, + un as U, + zc as V, + wc as W, + mc as X, + qc as Y, + fo as Z, + vo as _, + Oc as a, + Tc as a0, + mo as a1, + bo as a2, + Qs as a3, + sn as a4, + ru as a5, + Cc as a6, + Rn as a7, + Yi as a8, + Xc as a9, + E as b, + lu as c, + Ms as d, + js as e, + Zc as f, + cu as g, + tu as h, + Wc as i, + p as j, + Zn as k, + Te as l, + su as m, + cl as n, + ue as o, + $ as p, + Gc as q, + le as r, + fe as s, + nu as t, + ul as u, + dn as v, + ut as w, + ct as x, + $c as y, + _o as z +}; diff --git a/src/main/frontend/generated/jar-resources/copilot/icons-AkLm3oZf.js b/src/main/frontend/generated/jar-resources/copilot/icons-AkLm3oZf.js new file mode 100644 index 0000000..f98c53f --- /dev/null +++ b/src/main/frontend/generated/jar-resources/copilot/icons-AkLm3oZf.js @@ -0,0 +1,463 @@ +import { a9 as o } from "./copilot-xjoIJFQc.js"; +const r = { + popup: o` + + + + `, + dock: o` + + + + `, + close: o` + + + + `, + minus: o` + + + + `, + plus: o` + + + + `, + arrowLeft: o` + + + + `, + chevronLeft: o` + + + + `, + chevronRight: o` + + + + `, + chevronDown: o` + + + + `, + chevronUp: o` + + + + `, + edit: o` + + + + `, + editAlt: o` + + + + + + + + + + + `, + code: o` + + + `, + codeAlt: o` + + + `, + trash: o` + + `, + clock: o` + + `, + exclamationMark: o` + + `, + warning: o` + + `, + refresh: o` + + + + `, + save: o` + + + + `, + info: o` + + `, + github: o` + + + + + + + + + + + `, + play: o` + + + + `, + loading: o` + + + + `, + error: o` + + + + + + + + + + + + `, + help: o` + + + + + + + + + + + + `, + copy: o` + + `, + paste: o` + + `, + duplicate: o` + + `, + overlay: o` + + + + + + + + + + + + `, + linkExternal: o` + + `, + locked: o` + + +`, + unlocked: o` + +`, + rhombus: o` + +`, + atom: o` + + `, + codeSnippet: o` + +`, + thumbsUp: o` + +`, + thumbsUpFilled: o` + + +`, + thumbsDown: o` + +`, + thumbsDownFilled: o` + + +`, + check: o` + + `, + vaadinLogo: o` + + + + `, + cancel: o` + + + + + `, + x: o` + + + + `, + rotatingSpinner: o` + + + + + + + `, + dockLeft: o` + + + + `, + dockBottom: o` + + + + `, + dockRight: o` + + + + + `, + tabOrder: o` + +`, + terminal: o` + + `, + undo: o` + +`, + redo: o` + +`, + userUp: o` + + `, + userLeft: o` + + `, + userRight: o` + + `, + padding: o` + + + + + `, + paddingTop: o` + + + + + `, + paddingRight: o` + + + + + `, + paddingBottom: o` + + + + + `, + paddingLeft: o` + + + + + `, + paddingVertical: o` + + + + + `, + paddingHorizontal: o` + + + + + `, + maximize: o` + + + + `, + gapHorizontal: o` + + + + `, + gapVertical: o` + + + + `, + select: o` + + `, + click: o` + + `, + wrap: o` + + `, + link: o` + + + + `, + warningColorful: o` + +`, + successColorful: o` + +`, + heightFill: o` + + + + `, + heightFixed: o` + + + + + `, + heightHug: o` + + + + `, + heightMax: o` + + + + `, + heightMin: o` + + + + `, + alignBottom: o` + + + + `, + horizontalBottom: o` + + + + + + `, + horizontalCenter: o` + + + + + + `, + horizontalTop: o` + + + + + + `, + verticalCenter: o` + + + + + + `, + verticalEnd: o` + + + + + + `, + verticalStart: o` + + + + + + `, + switchOn: o` + + + + + `, + switchOff: o` + + + + + `, + databaseUpload: o` + +` +}; +export { + r as i +}; diff --git a/src/main/frontend/generated/jar-resources/copilot/overlay-monkeypatch-CXhp9hXg.js b/src/main/frontend/generated/jar-resources/copilot/overlay-monkeypatch-CXhp9hXg.js new file mode 100644 index 0000000..3340136 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/copilot/overlay-monkeypatch-CXhp9hXg.js @@ -0,0 +1,48 @@ +import { P as c } from "./copilot-xjoIJFQc.js"; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const d = (e, a, n) => (n.configurable = !0, n.enumerable = !0, Reflect.decorate && typeof a != "object" && Object.defineProperty(e, a, n), n); +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +function v(e, a) { + return (n, o, b) => { + const i = (l) => l.renderRoot?.querySelector(e) ?? null; + return d(n, o, { get() { + return i(this); + } }); + }; +} +function u(e) { + e.querySelectorAll( + "vaadin-context-menu, vaadin-menu-bar, vaadin-menu-bar-submenu, vaadin-select, vaadin-combo-box, vaadin-tooltip, vaadin-dialog, vaadin-multi-select-combo-box" + ).forEach((a) => { + a?.$?.comboBox && (a = a.$.comboBox); + let n = a.shadowRoot?.querySelector( + `${a.localName}-overlay, ${a.localName}-submenu, vaadin-menu-bar-overlay` + ); + n?.localName === "vaadin-menu-bar-submenu" && (n = n.shadowRoot.querySelector("vaadin-menu-bar-overlay")), n ? n._attachOverlay = t.bind(n) : a.$?.overlay && (a.$.overlay._attachOverlay = t.bind(a.$.overlay)); + }); +} +function r() { + return document.querySelector(`${c}main`).shadowRoot; +} +const m = () => Array.from(r().children).filter((a) => a._hasOverlayStackMixin && !a.hasAttribute("closing")).sort((a, n) => a.__zIndex - n.__zIndex || 0), s = (e) => e === m().pop(); +function t() { + const e = this; + e._placeholder = document.createComment("vaadin-overlay-placeholder"), e.parentNode.insertBefore(e._placeholder, e), r().appendChild(e), e.hasOwnProperty("_last") || Object.defineProperty(e, "_last", { + // Only returns odd die sides + get() { + return s(this); + } + }), e.bringToFront(), requestAnimationFrame(() => u(e)); +} +export { + v as e, + u as m +}; diff --git a/src/main/frontend/generated/jar-resources/copilot/state-9-chcL5F.js b/src/main/frontend/generated/jar-resources/copilot/state-9-chcL5F.js new file mode 100644 index 0000000..e727ac3 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/copilot/state-9-chcL5F.js @@ -0,0 +1,45 @@ +import { a7 as p, a8 as u } from "./copilot-xjoIJFQc.js"; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const l = { attribute: !0, type: String, converter: p, reflect: !1, hasChanged: u }, d = (t = l, o, e) => { + const { kind: a, metadata: s } = e; + let n = globalThis.litPropertyMetadata.get(s); + if (n === void 0 && globalThis.litPropertyMetadata.set(s, n = /* @__PURE__ */ new Map()), n.set(e.name, t), a === "accessor") { + const { name: r } = e; + return { set(i) { + const c = o.get.call(this); + o.set.call(this, i), this.requestUpdate(r, c, t); + }, init(i) { + return i !== void 0 && this.P(r, void 0, t), i; + } }; + } + if (a === "setter") { + const { name: r } = e; + return function(i) { + const c = this[r]; + o.call(this, i), this.requestUpdate(r, c, t); + }; + } + throw Error("Unsupported decorator location: " + a); +}; +function h(t) { + return (o, e) => typeof e == "object" ? d(t, o, e) : ((a, s, n) => { + const r = s.hasOwnProperty(n); + return s.constructor.createProperty(n, r ? { ...a, wrapped: !0 } : a), r ? Object.getOwnPropertyDescriptor(s, n) : void 0; + })(t, o, e); +} +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +function g(t) { + return h({ ...t, state: !0, attribute: !1 }); +} +export { + h as n, + g as r +}; diff --git a/src/main/frontend/generated/jar-resources/datepickerConnector.js b/src/main/frontend/generated/jar-resources/datepickerConnector.js new file mode 100644 index 0000000..cde1317 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/datepickerConnector.js @@ -0,0 +1,179 @@ +import dateFnsFormat from 'date-fns/format'; +import dateFnsParse from 'date-fns/parse'; +import dateFnsIsValid from 'date-fns/isValid'; +import { extractDateParts, parseDate as _parseDate } from '@vaadin/date-picker/src/vaadin-date-picker-helper.js'; + +window.Vaadin.Flow.datepickerConnector = {}; +window.Vaadin.Flow.datepickerConnector.initLazy = (datepicker) => { + // Check whether the connector was already initialized for the datepicker + if (datepicker.$connector) { + return; + } + + datepicker.$connector = {}; + + const createLocaleBasedDateFormat = function (locale) { + try { + // Check whether the locale is supported or not + new Date().toLocaleDateString(locale); + } catch (e) { + console.warn('The locale is not supported, using default format setting (ISO 8601).'); + return 'yyyy-MM-dd'; + } + + // format test date and convert to date-fns pattern + const testDate = new Date(Date.UTC(1234, 4, 6)); + let pattern = testDate.toLocaleDateString(locale, { timeZone: 'UTC' }); + pattern = pattern + // escape date-fns pattern letters by enclosing them in single quotes + .replace(/([a-zA-Z]+)/g, "'$1'") + // insert date placeholder + .replace('06', 'dd') + .replace('6', 'd') + // insert month placeholder + .replace('05', 'MM') + .replace('5', 'M') + // insert year placeholder + .replace('1234', 'yyyy'); + const isValidPattern = pattern.includes('d') && pattern.includes('M') && pattern.includes('y'); + if (!isValidPattern) { + console.warn('The locale is not supported, using default format setting (ISO 8601).'); + return 'yyyy-MM-dd'; + } + + return pattern; + }; + + function createFormatterAndParser(formats) { + if (!formats || formats.length === 0) { + throw new Error('Array of custom date formats is null or empty'); + } + + function getShortYearFormat(format) { + if (format.includes('yyyy') && !format.includes('yyyyy')) { + return format.replace('yyyy', 'yy'); + } + if (format.includes('YYYY') && !format.includes('YYYYY')) { + return format.replace('YYYY', 'YY'); + } + return undefined; + } + + function isFormatWithYear(format) { + return format.includes('y') || format.includes('Y'); + } + + function isShortYearFormat(format) { + // Format is long if it includes a four-digit year. + return !format.includes('yyyy') && !format.includes('YYYY'); + } + + function getExtendedFormats(formats) { + return formats.reduce((acc, format) => { + // We first try to match the date with the shorter version, + // as short years are supported with the long date format. + if (isFormatWithYear(format) && !isShortYearFormat(format)) { + acc.push(getShortYearFormat(format)); + } + acc.push(format); + return acc; + }, []); + } + + function correctFullYear(date) { + // The last parsed date check handles the case where a four-digit year is parsed, then formatted + // as a two-digit year, and then parsed again. In this case we want to keep the century of the + // originally parsed year, instead of using the century of the reference date. + + // Do not apply any correction if the previous parse attempt was failed. + if (datepicker.$connector._lastParseStatus === 'error') { + return; + } + + // Update century if the last parsed date is the same except the century. + if (datepicker.$connector._lastParseStatus === 'successful') { + if ( + datepicker.$connector._lastParsedDate.day === date.getDate() && + datepicker.$connector._lastParsedDate.month === date.getMonth() && + datepicker.$connector._lastParsedDate.year % 100 === date.getFullYear() % 100 + ) { + date.setFullYear(datepicker.$connector._lastParsedDate.year); + } + return; + } + + // Update century if this is the first parse after overlay open. + const currentValue = _parseDate(datepicker.value); + if ( + dateFnsIsValid(currentValue) && + currentValue.getDate() === date.getDate() && + currentValue.getMonth() === date.getMonth() && + currentValue.getFullYear() % 100 === date.getFullYear() % 100 + ) { + date.setFullYear(currentValue.getFullYear()); + } + } + + function formatDate(dateParts) { + const format = formats[0]; + const date = _parseDate(`${dateParts.year}-${dateParts.month + 1}-${dateParts.day}`); + + return dateFnsFormat(date, format); + } + + function doParseDate(dateString, format, referenceDate) { + // When format does not contain a year, then current year should be used. + const refDate = isFormatWithYear(format) ? referenceDate : new Date(); + const date = dateFnsParse(dateString, format, refDate); + if (dateFnsIsValid(date)) { + if (isFormatWithYear(format) && isShortYearFormat(format)) { + correctFullYear(date); + } + return { + day: date.getDate(), + month: date.getMonth(), + year: date.getFullYear() + }; + } + } + + function parseDate(dateString) { + const referenceDate = _getReferenceDate(); + for (let format of getExtendedFormats(formats)) { + const parsedDate = doParseDate(dateString, format, referenceDate); + if (parsedDate) { + datepicker.$connector._lastParseStatus = 'successful'; + datepicker.$connector._lastParsedDate = parsedDate; + return parsedDate; + } + } + datepicker.$connector._lastParseStatus = 'error'; + return false; + } + + return { + formatDate: formatDate, + parseDate: parseDate + }; + } + + function _getReferenceDate() { + const { referenceDate } = datepicker.i18n; + return referenceDate ? new Date(referenceDate.year, referenceDate.month, referenceDate.day) : new Date(); + } + + datepicker.$connector.updateI18n = (locale, i18n) => { + // Either use custom formats specified in I18N, or create format from locale + const hasCustomFormats = i18n && i18n.dateFormats && i18n.dateFormats.length > 0; + if (i18n && i18n.referenceDate) { + i18n.referenceDate = extractDateParts(new Date(i18n.referenceDate)); + } + const usedFormats = hasCustomFormats ? i18n.dateFormats : [createLocaleBasedDateFormat(locale)]; + const formatterAndParser = createFormatterAndParser(usedFormats); + + // Merge current web component I18N settings with new I18N settings and the formatting and parsing functions + datepicker.i18n = Object.assign({}, datepicker.i18n, i18n, formatterAndParser); + }; + + datepicker.addEventListener('opened-changed', () => (datepicker.$connector._lastParseStatus = undefined)); +} diff --git a/src/main/frontend/generated/jar-resources/disableOnClickFunctions.js b/src/main/frontend/generated/jar-resources/disableOnClickFunctions.js new file mode 100644 index 0000000..91f10c2 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/disableOnClickFunctions.js @@ -0,0 +1,14 @@ +function disableOnClickListener({currentTarget: element}) { + if (element.disableOnClick) { + requestAnimationFrame(() => element.disabled = true); + } +} + +window.Vaadin.Flow.disableOnClick = { + initDisableOnClick: (element) => { + if (!element.__hasDisableOnClickListener) { + element.addEventListener('click', disableOnClickListener); + element.__hasDisableOnClickListener = true; + } + } +} diff --git a/src/main/frontend/generated/jar-resources/dndConnector.js b/src/main/frontend/generated/jar-resources/dndConnector.js new file mode 100644 index 0000000..5450db3 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/dndConnector.js @@ -0,0 +1,130 @@ +window.Vaadin = window.Vaadin || {}; +window.Vaadin.Flow = window.Vaadin.Flow || {}; +window.Vaadin.Flow.dndConnector = { + __ondragenterListener: function (event) { + // TODO filter by data type + // TODO prevent dropping on itself (by default) + const effect = event.currentTarget['__dropEffect']; + if (!event.currentTarget.hasAttribute('disabled')) { + if (effect) { + event.dataTransfer.dropEffect = effect; + } + + if (effect !== 'none') { + /* #7108: if drag moves on top of drop target's children, first another ondragenter event + * is fired and then a ondragleave event. This happens again once the drag + * moves on top of another children, or back on top of the drop target element. + * Thus need to "cancel" the following ondragleave, to not remove class name. + * Drop event will happen even when dropped to a child element. */ + if (event.currentTarget.classList.contains('v-drag-over-target')) { + event.currentTarget['__skip-leave'] = true; + } else { + event.currentTarget.classList.add('v-drag-over-target'); + } + // enables browser specific pseudo classes (at least FF) + event.preventDefault(); + event.stopPropagation(); // don't let parents know + } + } + }, + + __ondragoverListener: function (event) { + // TODO filter by data type + // TODO filter by effectAllowed != dropEffect due to Safari & IE11 ? + if (!event.currentTarget.hasAttribute('disabled')) { + const effect = event.currentTarget['__dropEffect']; + if (effect) { + event.dataTransfer.dropEffect = effect; + } + // allows the drop && don't let parents know + event.preventDefault(); + event.stopPropagation(); + } + }, + + __ondragleaveListener: function (event) { + if (event.currentTarget['__skip-leave']) { + event.currentTarget['__skip-leave'] = false; + } else { + event.currentTarget.classList.remove('v-drag-over-target'); + } + // #7109 need to stop or any parent drop target might not get highlighted, + // as ondragenter for it is fired before the child gets dragleave. + event.stopPropagation(); + }, + + __ondropListener: function (event) { + const effect = event.currentTarget['__dropEffect']; + if (effect) { + event.dataTransfer.dropEffect = effect; + } + event.currentTarget.classList.remove('v-drag-over-target'); + // prevent browser handling && don't let parents know + event.preventDefault(); + event.stopPropagation(); + }, + + updateDropTarget: function (element) { + if (element['__active']) { + element.addEventListener('dragenter', this.__ondragenterListener, false); + element.addEventListener('dragover', this.__ondragoverListener, false); + element.addEventListener('dragleave', this.__ondragleaveListener, true); + element.addEventListener('drop', this.__ondropListener, false); + } else { + element.removeEventListener('dragenter', this.__ondragenterListener, false); + element.removeEventListener('dragover', this.__ondragoverListener, false); + element.removeEventListener('dragleave', this.__ondragleaveListener, false); + element.removeEventListener('drop', this.__ondropListener, false); + element.classList.remove('v-drag-over-target'); + } + }, + + /** DRAG SOURCE METHODS: */ + + __dragstartListener: function (event) { + event.stopPropagation(); + event.dataTransfer.setData('text/plain', ''); + if (event.currentTarget.hasAttribute('disabled')) { + event.preventDefault(); + } else { + if (event.currentTarget['__effectAllowed']) { + event.dataTransfer.effectAllowed = event.currentTarget['__effectAllowed']; + } + event.currentTarget.classList.add('v-dragged'); + } + if(event.currentTarget.__dragImage) { + if(event.currentTarget.__dragImage.style.display === "none") { + event.currentTarget.__dragImage.style.display = "block"; + event.currentTarget.classList.add('shown'); + } + event.dataTransfer.setDragImage( + event.currentTarget.__dragImage, + event.currentTarget.__dragImageOffsetX, + event.currentTarget.__dragImageOffsetY); + } + }, + + __dragendListener: function (event) { + event.currentTarget.classList.remove('v-dragged'); + if(event.currentTarget.classList.contains('shown')) { + event.currentTarget.classList.remove('shown'); + event.currentTarget.__dragImage.style.display = "none"; + } + }, + + updateDragSource: function (element) { + if (element['draggable']) { + element.addEventListener('dragstart', this.__dragstartListener, false); + element.addEventListener('dragend', this.__dragendListener, false); + } else { + element.removeEventListener('dragstart', this.__dragstartListener, false); + element.removeEventListener('dragend', this.__dragendListener, false); + } + }, + + setDragImage: function (dragImage, offsetX, offsetY, dragSource) { + dragSource.__dragImage = dragImage; + dragSource.__dragImageOffsetX = offsetX; + dragSource.__dragImageOffsetY = offsetY; + } +}; diff --git a/src/main/frontend/generated/jar-resources/flow-component-directive.js b/src/main/frontend/generated/jar-resources/flow-component-directive.js new file mode 100644 index 0000000..9727016 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/flow-component-directive.js @@ -0,0 +1,68 @@ +import { noChange } from 'lit'; +import { directive, PartType } from 'lit/directive.js'; +import { AsyncDirective } from 'lit/async-directive.js'; + +class FlowComponentDirective extends AsyncDirective { + constructor(partInfo) { + super(partInfo); + if (partInfo.type !== PartType.CHILD) { + throw new Error(`${this.constructor.directiveName}() can only be used in child bindings`); + } + } + + update(part, [appid, nodeid]) { + this.updateContent(part, appid, nodeid); + return noChange; + } + + updateContent(part, appid, nodeid) { + const { parentNode, startNode } = part; + this.__parentNode = parentNode; + + const hasNewNodeId = nodeid !== undefined && nodeid !== null; + const newNode = hasNewNodeId ? this.getNewNode(appid, nodeid) : null; + const oldNode = this.getOldNode(part); + + clearTimeout(this.__parentNode.__nodeRetryTimeout); + + if (hasNewNodeId && !newNode) { + // If the node is not found, try again later. + this.__parentNode.__nodeRetryTimeout = setTimeout(() => this.updateContent(part, appid, nodeid)); + } else if (oldNode === newNode) { + return; + } else if (oldNode && newNode) { + parentNode.replaceChild(newNode, oldNode); + } else if (oldNode) { + parentNode.removeChild(oldNode); + } else if (newNode) { + startNode.after(newNode); + } + } + + getNewNode(appid, nodeid) { + return window.Vaadin.Flow.clients[appid].getByNodeId(nodeid); + } + + getOldNode(part) { + const { startNode, endNode } = part; + if (startNode.nextSibling === endNode) { + return; + } + return startNode.nextSibling; + } + + disconnected() { + clearTimeout(this.__parentNode.__nodeRetryTimeout); + } +} + +/** + * Renders the given flow component node. + * + * WARNING: This directive is not intended for public use. + * + * @param {string} appid + * @param {number} nodeid + * @private + */ +export const flowComponentDirective = directive(FlowComponentDirective); diff --git a/src/main/frontend/generated/jar-resources/flow-component-renderer.js b/src/main/frontend/generated/jar-resources/flow-component-renderer.js new file mode 100644 index 0000000..3f146a7 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/flow-component-renderer.js @@ -0,0 +1,208 @@ +import '@polymer/polymer/lib/elements/dom-if.js'; +import { html } from '@polymer/polymer/lib/utils/html-tag.js'; +import { Debouncer } from '@polymer/polymer/lib/utils/debounce.js'; +import { idlePeriod } from '@polymer/polymer/lib/utils/async.js'; +import { PolymerElement } from '@polymer/polymer/polymer-element.js'; +import { flowComponentDirective } from './flow-component-directive.js'; +import { render, html as litHtml } from 'lit'; + +/** + * Returns the requested node in a form suitable for Lit template interpolation. + * @param {string} appid + * @param {number} nodeid + * @returns {any} a Lit directive + */ +function getNode(appid, nodeid) { + return flowComponentDirective(appid, nodeid); +} + +/** + * Sets the nodes defined by the given node ids as the child nodes of the + * given root element. + * @param {string} appid + * @param {number[]} nodeIds + * @param {Element} root + */ +function setChildNodes(appid, nodeIds, root) { + render(litHtml`${nodeIds.map(id => flowComponentDirective(appid, id))}`, root); +} + +/** + * SimpleElementBindingStrategy::addChildren uses insertBefore to add child + * elements to the container. When the children are manually placed under + * another element, the call to insertBefore can occasionally fail due to + * an invalid reference node. + * + * This is a temporary workaround which patches the container's native API + * to not fail when called with invalid arguments. + */ +function patchVirtualContainer(container) { + const originalInsertBefore = container.insertBefore; + + container.insertBefore = function (newNode, referenceNode) { + if (referenceNode && referenceNode.parentNode === this) { + return originalInsertBefore.call(this, newNode, referenceNode); + } else { + return originalInsertBefore.call(this, newNode, null); + } + }; +} + +window.Vaadin ||= {}; +window.Vaadin.FlowComponentHost ||= { patchVirtualContainer, getNode, setChildNodes }; + +class FlowComponentRenderer extends PolymerElement { + static get template() { + return html` + + + `; + } + + static get is() { + return 'flow-component-renderer'; + } + static get properties() { + return { + nodeid: Number, + appid: String, + }; + } + static get observers() { + return ['_attachRenderedComponentIfAble(appid, nodeid)']; + } + + ready() { + super.ready(); + this.addEventListener('click', function (event) { + if ( + this.firstChild && + typeof this.firstChild.click === 'function' && + event.target === this + ) { + event.stopPropagation(); + this.firstChild.click(); + } + }); + this.addEventListener('animationend', this._onAnimationEnd); + } + + _asyncAttachRenderedComponentIfAble() { + this._debouncer = Debouncer.debounce(this._debouncer, idlePeriod, () => + this._attachRenderedComponentIfAble() + ); + } + + _attachRenderedComponentIfAble() { + if (this.appid == null) { + return; + } + if (this.nodeid == null) { + if (this.firstChild) { + this.removeChild(this.firstChild); + } + return; + } + const renderedComponent = this._getRenderedComponent(); + if (this.firstChild) { + if (!renderedComponent) { + this._asyncAttachRenderedComponentIfAble(); + } else if (this.firstChild !== renderedComponent) { + this.replaceChild(renderedComponent, this.firstChild); + this._defineFocusTarget(); + this.onComponentRendered(); + } else { + this._defineFocusTarget(); + this.onComponentRendered(); + } + } else { + if (renderedComponent) { + this.appendChild(renderedComponent); + this._defineFocusTarget(); + this.onComponentRendered(); + } else { + this._asyncAttachRenderedComponentIfAble(); + } + } + } + + _getRenderedComponent() { + try { + return window.Vaadin.Flow.clients[this.appid].getByNodeId(this.nodeid); + } catch (error) { + console.error( + 'Could not get node %s from app %s', + this.nodeid, + this.appid + ); + console.error(error); + } + return null; + } + + onComponentRendered() { + // subclasses can override this method to execute custom logic on resize + } + + /* Setting the `focus-target` attribute to the first focusable descendant + starting from the firstChild necessary for the focus to be delegated + within the flow-component-renderer when used inside a vaadin-grid cell */ + _defineFocusTarget() { + var focusable = this._getFirstFocusableDescendant(this.firstChild); + if (focusable !== null) { + focusable.setAttribute('focus-target', 'true'); + } + } + + _getFirstFocusableDescendant(node) { + if (this._isFocusable(node)) { + return node; + } + if (node.hasAttribute && (node.hasAttribute('disabled') || node.hasAttribute('hidden'))) { + return null; + } + if (!node.children) { + return null; + } + for (var i = 0; i < node.children.length; i++) { + var focusable = this._getFirstFocusableDescendant(node.children[i]); + if (focusable !== null) { + return focusable; + } + } + return null; + } + + _isFocusable(node) { + if ( + node.hasAttribute && + typeof node.hasAttribute === 'function' && + (node.hasAttribute('disabled') || node.hasAttribute('hidden')) + ) { + return false; + } + + return node.tabIndex === 0; + } + + _onAnimationEnd(e) { + // ShadyCSS applies scoping suffixes to animation names + // To ensure that child is attached once element is unhidden + // for when it was filtered out from, eg, ComboBox + // https://github.com/vaadin/vaadin-flow-components/issues/437 + if (e.animationName.indexOf('flow-component-renderer-appear') === 0) { + this._attachRenderedComponentIfAble(); + } + } +} +window.customElements.define(FlowComponentRenderer.is, FlowComponentRenderer); diff --git a/src/main/frontend/generated/jar-resources/gridConnector.ts b/src/main/frontend/generated/jar-resources/gridConnector.ts new file mode 100644 index 0000000..b92090c --- /dev/null +++ b/src/main/frontend/generated/jar-resources/gridConnector.ts @@ -0,0 +1,1204 @@ +// @ts-nocheck +import { Debouncer } from '@polymer/polymer/lib/utils/debounce.js'; +import { timeOut, animationFrame } from '@polymer/polymer/lib/utils/async.js'; +import { Grid } from '@vaadin/grid/src/vaadin-grid.js'; +import { isFocusable } from '@vaadin/grid/src/vaadin-grid-active-item-mixin.js'; +import { GridFlowSelectionColumn } from "./vaadin-grid-flow-selection-column.js"; + +window.Vaadin.Flow.gridConnector = {}; +window.Vaadin.Flow.gridConnector.initLazy = (grid) => { + // Check whether the connector was already initialized for the grid + if (grid.$connector) { + return; + } + + const dataProviderController = grid._dataProviderController; + + dataProviderController.ensureFlatIndexHierarchyOriginal = dataProviderController.ensureFlatIndexHierarchy; + dataProviderController.ensureFlatIndexHierarchy = function (flatIndex) { + const { item } = this.getFlatIndexContext(flatIndex); + if (!item || !this.isExpanded(item)) { + return; + } + + const isCached = grid.$connector.hasCacheForParentKey(grid.getItemId(item)); + if (isCached) { + // The sub-cache items are already in the connector's cache. Skip the debouncing process. + this.ensureFlatIndexHierarchyOriginal(flatIndex); + } else { + grid.$connector.beforeEnsureFlatIndexHierarchy(flatIndex, item); + } + }; + + dataProviderController.isLoadingOriginal = dataProviderController.isLoading; + dataProviderController.isLoading = function () { + return grid.$connector.hasEnsureSubCacheQueue() || this.isLoadingOriginal(); + }; + + dataProviderController.getItemSubCache = function (item) { + return this.getItemContext(item)?.subCache; + }; + + let cache = {}; + + /* parentRequestDelay - optimizes parent requests by batching several requests + * into one request. Delay in milliseconds. Disable by setting to 0. + * parentRequestBatchMaxSize - maximum size of the batch. + */ + const parentRequestDelay = 50; + const parentRequestBatchMaxSize = 20; + + let parentRequestQueue = []; + let parentRequestDebouncer; + let ensureSubCacheQueue = []; + let ensureSubCacheDebouncer; + + const rootRequestDelay = 150; + let rootRequestDebouncer; + + let lastRequestedRanges = {}; + const root = 'null'; + lastRequestedRanges[root] = [0, 0]; + + let currentUpdateClearRange = null; + let currentUpdateSetRange = null; + + const validSelectionModes = ['SINGLE', 'NONE', 'MULTI']; + let selectedKeys = {}; + let selectionMode = 'SINGLE'; + + let sorterDirectionsSetFromServer = false; + + grid.size = 0; // To avoid NaN here and there before we get proper data + grid.itemIdPath = 'key'; + + function createEmptyItemFromKey(key) { + return { [grid.itemIdPath]: key }; + } + + grid.$connector = {}; + + grid.$connector.hasCacheForParentKey = (parentKey) => cache[parentKey]?.size !== undefined; + + grid.$connector.hasEnsureSubCacheQueue = () => ensureSubCacheQueue.length > 0; + + grid.$connector.hasParentRequestQueue = () => parentRequestQueue.length > 0; + + grid.$connector.hasRootRequestQueue = () => { + const { pendingRequests } = dataProviderController.rootCache; + return Object.keys(pendingRequests).length > 0 || !!rootRequestDebouncer?.isActive(); + }; + + grid.$connector.beforeEnsureFlatIndexHierarchy = function (flatIndex, item) { + // add call to queue + ensureSubCacheQueue.push({ + flatIndex, + itemkey: grid.getItemId(item) + }); + + ensureSubCacheDebouncer = Debouncer.debounce(ensureSubCacheDebouncer, animationFrame, () => { + while (ensureSubCacheQueue.length) { + grid.$connector.flushEnsureSubCache(); + } + }); + }; + + grid.$connector.doSelection = function (items, userOriginated) { + if (selectionMode === 'NONE' || !items.length || (userOriginated && grid.hasAttribute('disabled'))) { + return; + } + if (selectionMode === 'SINGLE') { + selectedKeys = {}; + } + + let selectedItemsChanged = false; + items.forEach((item) => { + const selectable = !userOriginated || grid.isItemSelectable(item); + selectedItemsChanged = selectedItemsChanged || selectable; + if (item && selectable) { + selectedKeys[item.key] = item; + item.selected = true; + if (userOriginated) { + grid.$server.select(item.key); + } + } + + // FYI: In single selection mode, the server can send items = [null] + // which means a "Deselect All" command. + const isSelectedItemDifferentOrNull = !grid.activeItem || !item || item.key != grid.activeItem.key; + if (!userOriginated && selectionMode === 'SINGLE' && isSelectedItemDifferentOrNull) { + grid.activeItem = item; + } + }); + + if (selectedItemsChanged) { + grid.selectedItems = Object.values(selectedKeys); + } + }; + + grid.$connector.doDeselection = function (items, userOriginated) { + if (selectionMode === 'NONE' || !items.length || (userOriginated && grid.hasAttribute('disabled'))) { + return; + } + + const updatedSelectedItems = grid.selectedItems.slice(); + while (items.length) { + const itemToDeselect = items.shift(); + const selectable = !userOriginated || grid.isItemSelectable(itemToDeselect); + if (!selectable) { + continue; + } + for (let i = 0; i < updatedSelectedItems.length; i++) { + const selectedItem = updatedSelectedItems[i]; + if (itemToDeselect?.key === selectedItem.key) { + updatedSelectedItems.splice(i, 1); + break; + } + } + if (itemToDeselect) { + delete selectedKeys[itemToDeselect.key]; + delete itemToDeselect.selected; + if (userOriginated) { + grid.$server.deselect(itemToDeselect.key); + } + } + } + grid.selectedItems = updatedSelectedItems; + }; + + grid.__activeItemChanged = function (newVal, oldVal) { + if (selectionMode != 'SINGLE') { + return; + } + if (!newVal) { + if (oldVal && selectedKeys[oldVal.key]) { + if (grid.__deselectDisallowed) { + grid.activeItem = oldVal; + } else { + // The item instance may have changed since the item was stored as active item + // and information such as whether the item may be selected or deselected may + // be stale. Use data provider controller to get updated instance from grid + // cache. + oldVal = dataProviderController.getItemContext(oldVal).item; + grid.$connector.doDeselection([oldVal], true); + } + } + } else if (!selectedKeys[newVal.key]) { + grid.$connector.doSelection([newVal], true); + } + }; + grid._createPropertyObserver('activeItem', '__activeItemChanged', true); + + grid.__activeItemChangedDetails = function (newVal, oldVal) { + if (grid.__disallowDetailsOnClick) { + return; + } + // when grid is attached, newVal is not set and oldVal is undefined + // do nothing + if (newVal == null && oldVal === undefined) { + return; + } + if (newVal && !newVal.detailsOpened) { + grid.$server.setDetailsVisible(newVal.key); + } else { + grid.$server.setDetailsVisible(null); + } + }; + grid._createPropertyObserver('activeItem', '__activeItemChangedDetails', true); + + grid.$connector._getSameLevelPage = function (parentKey, currentCache, currentCacheItemIndex) { + const currentParentKey = currentCache.parentItem ? grid.getItemId(currentCache.parentItem) : root; + if (currentParentKey === parentKey) { + // Level match found, return the page number. + return Math.floor(currentCacheItemIndex / grid.pageSize); + } + const { parentCache, parentCacheIndex } = currentCache; + if (!parentCache) { + // There is no parent cache to match level + return null; + } + // Traverse the tree upwards until a match is found or the end is reached + return this._getSameLevelPage(parentKey, parentCache, parentCacheIndex); + }; + + grid.$connector.flushEnsureSubCache = function () { + const pendingFetch = ensureSubCacheQueue.shift(); + if (pendingFetch) { + dataProviderController.ensureFlatIndexHierarchyOriginal(pendingFetch.flatIndex); + return true; + } + return false; + }; + + grid.$connector.debounceRootRequest = function (page) { + const delay = grid._hasData ? rootRequestDelay : 0; + + rootRequestDebouncer = Debouncer.debounce(rootRequestDebouncer, timeOut.after(delay), () => { + grid.$connector.fetchPage( + (firstIndex, size) => grid.$server.setRequestedRange(firstIndex, size), + page, + root + ); + }); + }; + + grid.$connector.flushParentRequests = function () { + const pendingFetches = []; + + parentRequestQueue.splice(0, parentRequestBatchMaxSize).forEach(({ parentKey, page }) => { + grid.$connector.fetchPage( + (firstIndex, size) => pendingFetches.push({ parentKey, firstIndex, size }), + page, + parentKey + ); + }); + + if (pendingFetches.length) { + grid.$server.setParentRequestedRanges(pendingFetches); + } + }; + + grid.$connector.debounceParentRequest = function (parentKey, page) { + // Remove any pending requests for the same parentKey. + parentRequestQueue = parentRequestQueue.filter((request) => request.parentKey !== parentKey); + // Add the new request to the queue. + parentRequestQueue.push({ parentKey, page }); + // Debounce the request to avoid sending multiple requests for the same parentKey. + parentRequestDebouncer = Debouncer.debounce(parentRequestDebouncer, timeOut.after(parentRequestDelay), () => { + while (parentRequestQueue.length) { + grid.$connector.flushParentRequests(); + } + }); + }; + + grid.$connector.fetchPage = function (fetch, page, parentKey) { + // Adjust the requested page to be within the valid range in case + // the grid size has changed while fetchPage was debounced. + if (parentKey === root) { + page = Math.min(page, Math.floor((grid.size - 1) / grid.pageSize)); + } + + // Determine what to fetch based on scroll position and not only + // what grid asked for + const visibleRows = grid._getRenderedRows(); + let start = visibleRows.length > 0 ? visibleRows[0].index : 0; + let end = visibleRows.length > 0 ? visibleRows[visibleRows.length - 1].index : 0; + + // The buffer size could be multiplied by some constant defined by the user, + // if he needs to reduce the number of items sent to the Grid to improve performance + // or to increase it to make Grid smoother when scrolling + let buffer = end - start; + let firstNeededIndex = Math.max(0, start - buffer); + let lastNeededIndex = Math.min(end + buffer, grid._flatSize); + + let pageRange = [null, null]; + for (let idx = firstNeededIndex; idx <= lastNeededIndex; idx++) { + const { cache, index } = dataProviderController.getFlatIndexContext(idx); + // Try to match level by going up in hierarchy. The page range should include + // pages that contain either of the following: + // - visible items of the current cache + // - same level parents of visible descendant items + // If the parent items are not considered, Flow would remove the hidden parent + // items from the current level cache. This can lead to an infinite loop when using + // scrollToIndex feature. + const sameLevelPage = grid.$connector._getSameLevelPage(parentKey, cache, index); + if (sameLevelPage === null) { + continue; + } + pageRange[0] = Math.min(pageRange[0] ?? sameLevelPage, sameLevelPage); + pageRange[1] = Math.max(pageRange[1] ?? sameLevelPage, sameLevelPage); + } + + // When the viewport doesn't contain the requested page or it doesn't contain any items from + // the requested level at all, it means that the scroll position has changed while fetchPage + // was debounced. For example, it can happen if the user scrolls the grid to the bottom and + // then immediately back to the top. In this case, the request for the last page will be left + // hanging. To avoid this, as a workaround, we reset the range to only include the requested page + // to make sure all hanging requests are resolved. After that, the grid requests the first page + // or whatever in the viewport again. + if (pageRange.some((p) => p === null) || page < pageRange[0] || page > pageRange[1]) { + pageRange = [page, page]; + } + + let lastRequestedRange = lastRequestedRanges[parentKey] || [-1, -1]; + if (lastRequestedRange[0] != pageRange[0] || lastRequestedRange[1] != pageRange[1]) { + lastRequestedRanges[parentKey] = pageRange; + let pageCount = pageRange[1] - pageRange[0] + 1; + fetch(pageRange[0] * grid.pageSize, pageCount * grid.pageSize); + } + }; + + grid.dataProvider = function (params, callback) { + if (params.pageSize != grid.pageSize) { + throw 'Invalid pageSize'; + } + + let page = params.page; + + if (params.parentItem) { + let parentUniqueKey = grid.getItemId(params.parentItem); + + const parentItemSubCache = dataProviderController.getItemSubCache(params.parentItem); + if (cache[parentUniqueKey]?.[page] && parentItemSubCache) { + // Ensure grid isn't in loading state when the callback executes + ensureSubCacheQueue = []; + // Resolve the callback from cache + callback(cache[parentUniqueKey][page], cache[parentUniqueKey].size); + } else { + grid.$connector.debounceParentRequest(parentUniqueKey, page); + } + } else { + // size is controlled by the server (data communicator), so if the + // size is zero, we know that there is no data to fetch. + // This also prevents an empty grid getting stuck in a loading state. + // The connector does not cache empty pages, so if the grid requests + // data again, there would be no cache entry, causing a request to + // the server. However, the data communicator will never respond, + // as it assumes that the data is already cached. + if (grid.size === 0) { + callback([], 0); + return; + } + + if (cache[root]?.[page]) { + callback(cache[root][page]); + } else { + grid.$connector.debounceRootRequest(page); + } + } + }; + + grid.$connector.setSorterDirections = function (directions) { + sorterDirectionsSetFromServer = true; + setTimeout(() => { + try { + const sorters = Array.from(grid.querySelectorAll('vaadin-grid-sorter')); + + // Sorters for hidden columns are removed from DOM but stored in the web component. + // We need to ensure that all the sorters are reset when using `grid.sort(null)`. + grid._sorters.forEach((sorter) => { + if (!sorters.includes(sorter)) { + sorters.push(sorter); + } + }); + + sorters.forEach((sorter) => { + sorter.direction = null; + }); + + // Apply directions in correct order, depending on configured multi-sort priority. + // For the default "prepend" mode, directions need to be applied in reverse, in + // order for the sort indicators to match the order on the server. For "append" + // just keep the order passed from the server. + if (grid.multiSortPriority !== 'append') { + directions = directions.reverse(); + } + directions.forEach(({ column, direction }) => { + sorters.forEach((sorter) => { + if (sorter.getAttribute('path') === column) { + sorter.direction = direction; + } + }); + }); + + // Manually trigger a re-render of the sorter priority indicators + // in case some of the sorters were hidden while being updated above + // and therefore didn't notify the grid about their direction change. + grid.__applySorters(); + } finally { + sorterDirectionsSetFromServer = false; + } + }); + }; + + grid._updateItem = function (row, item) { + Grid.prototype._updateItem.call(grid, row, item); + + // There might be inactive component renderers on hidden rows that still refer to the + // same component instance as one of the renderers on a visible row. Making the + // inactive/hidden renderer attach the component might steal it from a visible/active one. + if (!row.hidden) { + // make sure that component renderers are updated + Array.from(row.children).forEach((cell) => { + Array.from(cell?._content?.__templateInstance?.children || []).forEach((content) => { + if (content._attachRenderedComponentIfAble) { + content._attachRenderedComponentIfAble(); + } + // In hierarchy column of tree grid, the component renderer is inside its content, + // this updates it renderer from innerContent + Array.from(content?.children || []).forEach((innerContent) => { + if (innerContent._attachRenderedComponentIfAble) { + innerContent._attachRenderedComponentIfAble(); + } + }); + }); + }); + } + // since no row can be selected when selection mode is NONE + // if selectionMode is set to NONE, remove aria-selected attribute from the row + if (selectionMode === validSelectionModes[1]) { + // selectionMode === NONE + row.removeAttribute('aria-selected'); + Array.from(row.children).forEach((cell) => cell.removeAttribute('aria-selected')); + } + }; + + const itemExpandedChanged = function (item, expanded) { + // method available only for the TreeGrid server-side component + if (item == undefined || grid.$server.updateExpandedState == undefined) { + return; + } + let parentKey = grid.getItemId(item); + grid.$server.updateExpandedState(parentKey, expanded); + }; + + // Patch grid.expandItem and grid.collapseItem to have + // itemExpandedChanged run when either happens. + grid.expandItem = function (item) { + itemExpandedChanged(item, true); + Grid.prototype.expandItem.call(grid, item); + }; + + grid.collapseItem = function (item) { + itemExpandedChanged(item, false); + Grid.prototype.collapseItem.call(grid, item); + }; + + const itemsUpdated = function (items) { + if (!items || !Array.isArray(items)) { + throw 'Attempted to call itemsUpdated with an invalid value: ' + JSON.stringify(items); + } + let detailsOpenedItems = Array.from(grid.detailsOpenedItems); + for (let i = 0; i < items.length; ++i) { + const item = items[i]; + if (!item) { + continue; + } + if (item.detailsOpened) { + if (grid._getItemIndexInArray(item, detailsOpenedItems) < 0) { + detailsOpenedItems.push(item); + } + } else if (grid._getItemIndexInArray(item, detailsOpenedItems) >= 0) { + detailsOpenedItems.splice(grid._getItemIndexInArray(item, detailsOpenedItems), 1); + } + } + grid.detailsOpenedItems = detailsOpenedItems; + }; + + /** + * Updates the cache for the given page for grid or tree-grid. + * + * @param page index of the page to update + * @param parentKey the key of the parent item for the page + * @returns an array of the updated items for the page, or undefined if no items were cached for the page + */ + const updateGridCache = function (page, parentKey = root) { + const items = cache[parentKey][page]; + const parentItem = createEmptyItemFromKey(parentKey); + + let gridCache = parentKey === root + ? dataProviderController.rootCache + : dataProviderController.getItemSubCache(parentItem); + + // Force update unless there's a callback waiting + if (gridCache && !gridCache.pendingRequests[page]) { + // Update the items in the grid cache or set an array of undefined items + // to remove the page from the grid cache if there are no corresponding items + // in the connector cache. + gridCache.setPage(page, items || Array.from({ length: grid.pageSize })); + } + + return items; + }; + + /** + * Updates all visible grid rows in DOM. + */ + const updateAllGridRowsInDomBasedOnCache = function () { + updateGridFlatSize(); + grid.__updateVisibleRows(); + }; + + /** + * Updates the 's internal cache size and flat size. + */ + const updateGridFlatSize = function () { + dataProviderController.recalculateFlatSize(); + grid._flatSize = dataProviderController.flatSize; + }; + + /** + * Update the given items in DOM if currently visible. + * + * @param array items the items to update in DOM + */ + const updateGridItemsInDomBasedOnCache = function (items) { + if (!items || !grid.$ || grid.$.items.childElementCount === 0) { + return; + } + + const itemKeys = items.map((item) => item.key); + const indexes = grid + ._getRenderedRows() + .filter((row) => row._item && itemKeys.includes(row._item.key)) + .map((row) => row.index); + if (indexes.length > 0) { + grid.__updateVisibleRows(indexes[0], indexes[indexes.length - 1]); + } + }; + + grid.$connector.set = function (index, items, parentKey) { + if (index % grid.pageSize != 0) { + throw 'Got new data to index ' + index + ' which is not aligned with the page size of ' + grid.pageSize; + } + let pkey = parentKey || root; + + const firstPage = index / grid.pageSize; + const updatedPageCount = Math.ceil(items.length / grid.pageSize); + + // For root cache, remember the range of pages that were set during an update + if (pkey === root) { + currentUpdateSetRange = [firstPage, firstPage + updatedPageCount - 1]; + } + + for (let i = 0; i < updatedPageCount; i++) { + let page = firstPage + i; + let slice = items.slice(i * grid.pageSize, (i + 1) * grid.pageSize); + if (!cache[pkey]) { + cache[pkey] = {}; + } + cache[pkey][page] = slice; + + grid.$connector.doSelection(slice.filter((item) => item.selected)); + grid.$connector.doDeselection(slice.filter((item) => !item.selected && selectedKeys[item.key])); + + const updatedItems = updateGridCache(page, pkey); + if (updatedItems) { + itemsUpdated(updatedItems); + updateGridItemsInDomBasedOnCache(updatedItems); + } + } + }; + + const itemToCacheLocation = function (item) { + let parent = item.parentUniqueKey || root; + if (cache[parent]) { + for (let page in cache[parent]) { + for (let index in cache[parent][page]) { + if (grid.getItemId(cache[parent][page][index]) === grid.getItemId(item)) { + return { page: page, index: index, parentKey: parent }; + } + } + } + } + return null; + }; + + /** + * Updates the given items for a hierarchical grid. + * + * @param updatedItems the updated items array + */ + grid.$connector.updateHierarchicalData = function (updatedItems) { + let pagesToUpdate = []; + // locate and update the items in cache + // find pages that need updating + for (let i = 0; i < updatedItems.length; i++) { + let cacheLocation = itemToCacheLocation(updatedItems[i]); + if (cacheLocation) { + cache[cacheLocation.parentKey][cacheLocation.page][cacheLocation.index] = updatedItems[i]; + let key = cacheLocation.parentKey + ':' + cacheLocation.page; + if (!pagesToUpdate[key]) { + pagesToUpdate[key] = { + parentKey: cacheLocation.parentKey, + page: cacheLocation.page + }; + } + } + } + // IE11 doesn't work with the transpiled version of the forEach. + let keys = Object.keys(pagesToUpdate); + for (let i = 0; i < keys.length; i++) { + let pageToUpdate = pagesToUpdate[keys[i]]; + const affectedUpdatedItems = updateGridCache(pageToUpdate.page, pageToUpdate.parentKey); + if (affectedUpdatedItems) { + itemsUpdated(affectedUpdatedItems); + updateGridItemsInDomBasedOnCache(affectedUpdatedItems); + } + } + }; + + /** + * Updates the given items for a non-hierarchical grid. + * + * @param updatedItems the updated items array + */ + grid.$connector.updateFlatData = function (updatedItems) { + // update (flat) caches + for (let i = 0; i < updatedItems.length; i++) { + let cacheLocation = itemToCacheLocation(updatedItems[i]); + if (cacheLocation) { + // update connector cache + cache[cacheLocation.parentKey][cacheLocation.page][cacheLocation.index] = updatedItems[i]; + + // update grid's cache + const index = parseInt(cacheLocation.page) * grid.pageSize + parseInt(cacheLocation.index); + const { rootCache } = dataProviderController; + if (rootCache.items[index]) { + rootCache.items[index] = updatedItems[i]; + } + } + } + itemsUpdated(updatedItems); + + updateGridItemsInDomBasedOnCache(updatedItems); + }; + + grid.$connector.clearExpanded = function () { + grid.expandedItems = []; + ensureSubCacheQueue = []; + parentRequestQueue = []; + }; + + /** + * Ensures that the last requested page range does not include pages for data that has been cleared. + * The last requested range is used in `fetchPage` to skip requests to the server if the page range didn't + * change. However, if some pages of that range have been cleared by data communicator, we need to clear the + * range to ensure the pages get loaded again. This can happen for example when changing the requested range + * on the server (e.g. preload of items on scroll to index), which can cause data communicator to clear pages + * that the connector assumes are already loaded. + */ + const sanitizeLastRequestedRange = function () { + // Only relevant for the root cache + const range = lastRequestedRanges[root]; + // Range may not be set yet, or nothing was cleared + if (!range || !currentUpdateClearRange) { + return; + } + + // Determine all pages that were cleared + const numClearedPages = currentUpdateClearRange[1] - currentUpdateClearRange[0] + 1; + const clearedPages = Array.from({ length: numClearedPages }, (_, i) => currentUpdateClearRange[0] + i); + + // Remove pages that have been set in same update + if (currentUpdateSetRange) { + const [first, last] = currentUpdateSetRange; + for (let page = first; page <= last; page++) { + const index = clearedPages.indexOf(page); + if (index >= 0) { + clearedPages.splice(index, 1); + } + } + } + + // Clear the last requested range if it includes any of the cleared pages + if (clearedPages.some((page) => page >= range[0] && page <= range[1])) { + range[0] = -1; + range[1] = -1; + } + }; + + grid.$connector.clear = function (index, length, parentKey) { + let pkey = parentKey || root; + if (!cache[pkey] || Object.keys(cache[pkey]).length === 0) { + return; + } + if (index % grid.pageSize != 0) { + throw ( + 'Got cleared data for index ' + index + ' which is not aligned with the page size of ' + grid.pageSize + ); + } + + let firstPage = Math.floor(index / grid.pageSize); + let updatedPageCount = Math.ceil(length / grid.pageSize); + + // For root cache, remember the range of pages that were cleared during an update + if (pkey === root) { + currentUpdateClearRange = [firstPage, firstPage + updatedPageCount - 1]; + } + + for (let i = 0; i < updatedPageCount; i++) { + let page = firstPage + i; + let items = cache[pkey][page]; + grid.$connector.doDeselection(items.filter((item) => selectedKeys[item.key])); + items.forEach((item) => grid.closeItemDetails(item)); + delete cache[pkey][page]; + updateGridCache(page, parentKey); + updateGridItemsInDomBasedOnCache(items); + } + let cacheToClear = dataProviderController.rootCache; + if (parentKey) { + const parentItem = createEmptyItemFromKey(pkey); + cacheToClear = dataProviderController.getItemSubCache(parentItem); + } + const endIndex = index + updatedPageCount * grid.pageSize; + for (let itemIndex = index; itemIndex < endIndex; itemIndex++) { + delete cacheToClear.items[itemIndex]; + cacheToClear.removeSubCache(itemIndex); + } + updateGridFlatSize(); + }; + + grid.$connector.reset = function () { + grid.size = 0; + cache = {}; + dataProviderController.rootCache.items = []; + lastRequestedRanges = {}; + if (ensureSubCacheDebouncer) { + ensureSubCacheDebouncer.cancel(); + } + if (parentRequestDebouncer) { + parentRequestDebouncer.cancel(); + } + if (rootRequestDebouncer) { + rootRequestDebouncer.cancel(); + } + ensureSubCacheDebouncer = undefined; + parentRequestDebouncer = undefined; + ensureSubCacheQueue = []; + parentRequestQueue = []; + updateAllGridRowsInDomBasedOnCache(); + }; + + grid.$connector.updateSize = (newSize) => (grid.size = newSize); + + grid.$connector.updateUniqueItemIdPath = (path) => (grid.itemIdPath = path); + + grid.$connector.expandItems = function (items) { + let newExpandedItems = Array.from(grid.expandedItems); + items.filter((item) => !grid._isExpanded(item)).forEach((item) => newExpandedItems.push(item)); + grid.expandedItems = newExpandedItems; + }; + + grid.$connector.collapseItems = function (items) { + let newExpandedItems = Array.from(grid.expandedItems); + items.forEach((item) => { + let index = grid._getItemIndexInArray(item, newExpandedItems); + if (index >= 0) { + newExpandedItems.splice(index, 1); + } + }); + grid.expandedItems = newExpandedItems; + items.forEach((item) => grid.$connector.removeFromQueue(item)); + }; + + grid.$connector.removeFromQueue = function (item) { + // The page callbacks for the given item are about to be discarded -> + // Resolve the callbacks with an empty array to not leave grid in loading state + const itemSubCache = dataProviderController.getItemSubCache(item); + Object.values(itemSubCache?.pendingRequests || {}).forEach((callback) => callback([])); + + const itemId = grid.getItemId(item); + ensureSubCacheQueue = ensureSubCacheQueue.filter((item) => item.itemkey !== itemId); + parentRequestQueue = parentRequestQueue.filter((item) => item.parentKey !== itemId); + }; + + grid.$connector.confirmParent = function (id, parentKey, levelSize) { + // Create connector cache if it doesn't exist + if (!cache[parentKey]) { + cache[parentKey] = {}; + } + // Update connector cache size + const hasSizeChanged = cache[parentKey].size !== levelSize; + cache[parentKey].size = levelSize; + if (levelSize === 0) { + cache[parentKey][0] = []; + } + + const parentItem = createEmptyItemFromKey(parentKey); + const parentItemSubCache = dataProviderController.getItemSubCache(parentItem); + if (parentItemSubCache) { + // If grid has pending requests for this parent, then resolve them + // and let grid update the flat size and re-render. + const { pendingRequests } = parentItemSubCache; + Object.entries(pendingRequests).forEach(([page, callback]) => { + let lastRequestedRange = lastRequestedRanges[parentKey] || [0, 0]; + + if ( + (cache[parentKey] && cache[parentKey][page]) || + page < lastRequestedRange[0] || + page > lastRequestedRange[1] + ) { + let items = cache[parentKey][page] || new Array(levelSize); + callback(items, levelSize); + } else if (callback && levelSize === 0) { + // The parent item has 0 child items => resolve the callback with an empty array + callback([], levelSize); + } + }); + + // If size has changed, and there are no pending requests, then + // manually update the size of the grid cache and update the effective + // size, effectively re-rendering the grid. This is necessary when + // individual items are refreshed on the server, in which case there + // is no loading request from the grid itself. In that case, if + // children were added or removed, the grid will not be aware of it + // unless we manually update the size. + if (hasSizeChanged && Object.keys(pendingRequests).length === 0) { + parentItemSubCache.size = levelSize; + updateGridFlatSize(); + } + } + + // Let server know we're done + grid.$server.confirmParentUpdate(id, parentKey); + }; + + grid.$connector.confirm = function (id) { + // We're done applying changes from this batch, resolve pending + // callbacks + const { pendingRequests } = dataProviderController.rootCache; + Object.entries(pendingRequests).forEach(([page, callback]) => { + const lastRequestedRange = lastRequestedRanges[root] || [0, 0]; + const lastAvailablePage = grid.size ? Math.ceil(grid.size / grid.pageSize) - 1 : 0; + // It's possible that the lastRequestedRange includes a page that's beyond lastAvailablePage if the grid's size got reduced during an ongoing data request + const lastRequestedRangeEnd = Math.min(lastRequestedRange[1], lastAvailablePage); + // Resolve if we have data or if we don't expect to get data + if (cache[root]?.[page]) { + // Cached data is available, resolve the callback + callback(cache[root][page]); + } else if (page < lastRequestedRange[0] || +page > lastRequestedRangeEnd) { + // No cached data, resolve the callback with an empty array + callback(new Array(grid.pageSize)); + // Request grid for content update + grid.requestContentUpdate(); + } else if (callback && grid.size === 0) { + // The grid has 0 items => resolve the callback with an empty array + callback([]); + } + }); + + // Sanitize last requested range for the root level + sanitizeLastRequestedRange(); + // Clear current update state + currentUpdateSetRange = null; + currentUpdateClearRange = null; + + // Let server know we're done + grid.$server.confirmUpdate(id); + }; + + grid.$connector.ensureHierarchy = function () { + for (let parentKey in cache) { + if (parentKey !== root) { + delete cache[parentKey]; + } + } + + lastRequestedRanges = {}; + + dataProviderController.rootCache.removeSubCaches(); + + updateAllGridRowsInDomBasedOnCache(); + }; + + grid.$connector.setSelectionMode = function (mode) { + if ((typeof mode === 'string' || mode instanceof String) && validSelectionModes.indexOf(mode) >= 0) { + selectionMode = mode; + selectedKeys = {}; + grid.selectedItems = []; + grid.$connector.updateMultiSelectable(); + } else { + throw 'Attempted to set an invalid selection mode'; + } + }; + + /* + * Manage aria-multiselectable attribute depending on the selection mode. + * see more: https://github.com/vaadin/web-components/issues/1536 + * or: https://www.w3.org/TR/wai-aria-1.1/#aria-multiselectable + * For selection mode SINGLE, set the aria-multiselectable attribute to false + */ + grid.$connector.updateMultiSelectable = function () { + if (!grid.$) { + return; + } + + if (selectionMode === validSelectionModes[0]) { + grid.$.table.setAttribute('aria-multiselectable', false); + // For selection mode NONE, remove the aria-multiselectable attribute + } else if (selectionMode === validSelectionModes[1]) { + grid.$.table.removeAttribute('aria-multiselectable'); + // For selection mode MULTI, set aria-multiselectable to true + } else { + grid.$.table.setAttribute('aria-multiselectable', true); + } + }; + + // Have the multi-selectable state updated on attach + grid._createPropertyObserver('isAttached', () => grid.$connector.updateMultiSelectable()); + + const singleTimeRenderer = (renderer) => { + return (root) => { + if (renderer) { + renderer(root); + renderer = null; + } + }; + }; + + grid.$connector.setHeaderRenderer = function (column, options) { + const { content, showSorter, sorterPath } = options; + + if (content === null) { + column.headerRenderer = null; + return; + } + + column.headerRenderer = singleTimeRenderer((root) => { + // Clear previous contents + root.innerHTML = ''; + // Render sorter + let contentRoot = root; + if (showSorter) { + const sorter = document.createElement('vaadin-grid-sorter'); + sorter.setAttribute('path', sorterPath); + const ariaLabel = content instanceof Node ? content.textContent : content; + if (ariaLabel) { + sorter.setAttribute('aria-label', `Sort by ${ariaLabel}`); + } + root.appendChild(sorter); + + // Use sorter as content root + contentRoot = sorter; + } + // Add content + if (content instanceof Node) { + contentRoot.appendChild(content); + } else { + contentRoot.textContent = content; + } + }); + }; + + // This method is overridden to prevent the grid web component from + // automatically excluding columns from sorting when they get hidden. + // In Flow, it's the developer's responsibility to remove the column + // from the backend sort order when the column gets hidden. + grid._getActiveSorters = function() { + return this._sorters.filter((sorter) => sorter.direction); + } + + grid.__applySorters = () => { + const sorters = grid._mapSorters(); + const sortersChanged = JSON.stringify(grid._previousSorters) !== JSON.stringify(sorters); + + // Update the _previousSorters in vaadin-grid-sort-mixin so that the __applySorters + // method in the mixin will skip calling clearCache(). + // + // In Flow Grid's case, we never want to clear the cache eagerly when the sorter elements + // change due to one of the following reasons: + // + // 1. Sorted by user: The items in the new sort order need to be fetched from the server, + // and we want to avoid a heavy re-render before the updated items have actually been fetched. + // + // 2. Sorted programmatically on the server: The items in the new sort order have already + // been fetched and applied to the grid. The sorter element states are updated programmatically + // to reflect the new sort order, but there's no need to re-render the grid rows. + grid._previousSorters = sorters; + + // Call the original __applySorters method in vaadin-grid-sort-mixin + Grid.prototype.__applySorters.call(grid); + + if (sortersChanged && !sorterDirectionsSetFromServer) { + grid.$server.sortersChanged(sorters); + } + }; + + grid.$connector.setFooterRenderer = function (column, options) { + const { content } = options; + + if (content === null) { + column.footerRenderer = null; + return; + } + + column.footerRenderer = singleTimeRenderer((root) => { + // Clear previous contents + root.innerHTML = ''; + // Add content + if (content instanceof Node) { + root.appendChild(content); + } else { + root.textContent = content; + } + }); + }; + + grid.addEventListener( + 'vaadin-context-menu-before-open', + function (e) { + const { key, columnId } = e.detail; + grid.$server.updateContextMenuTargetItem(key, columnId); + } + ); + + grid.getContextMenuBeforeOpenDetail = function (event) { + // For `contextmenu` events, we need to access the source event, + // when using open on click we just use the click event itself + const sourceEvent = event.detail.sourceEvent || event; + const eventContext = grid.getEventContext(sourceEvent); + const key = eventContext.item?.key || ''; + const columnId = eventContext.column?.id || ''; + return { key, columnId }; + }; + + grid.preventContextMenu = function (event) { + const isLeftClick = event.type === 'click'; + const { column } = grid.getEventContext(event); + + return isLeftClick && column instanceof GridFlowSelectionColumn; + }; + + grid.addEventListener( + 'click', + (e) => _fireClickEvent(e, 'item-click') + ); + grid.addEventListener( + 'dblclick', + (e) => _fireClickEvent(e, 'item-double-click') + ); + + grid.addEventListener( + 'column-resize', + (e) => { + const cols = grid._getColumnsInOrder().filter((col) => !col.hidden); + + cols.forEach((col) => { + col.dispatchEvent(new CustomEvent('column-drag-resize')); + }); + + grid.dispatchEvent( + new CustomEvent('column-drag-resize', { + detail: { + resizedColumnKey: e.detail.resizedColumn._flowId + } + }) + ); + } + ); + + grid.addEventListener( + 'column-reorder', + (e) => { + const columns = grid._columnTree + .slice(0) + .pop() + .filter((c) => c._flowId) + .sort((b, a) => b._order - a._order) + .map((c) => c._flowId); + + grid.dispatchEvent( + new CustomEvent('column-reorder-all-columns', { + detail: { columns } + }) + ); + } + ); + + grid.addEventListener( + 'cell-focus', + (e) => { + const eventContext = grid.getEventContext(e); + const expectedSectionValues = ['header', 'body', 'footer']; + + if (expectedSectionValues.indexOf(eventContext.section) === -1) { + return; + } + + grid.dispatchEvent( + new CustomEvent('grid-cell-focus', { + detail: { + itemKey: eventContext.item ? eventContext.item.key : null, + + internalColumnId: eventContext.column ? eventContext.column._flowId : null, + + section: eventContext.section + } + }) + ); + } + ); + + function _fireClickEvent(event, eventName) { + // Click event was handled by the component inside grid, do nothing. + if (event.defaultPrevented) { + return; + } + + const path = event.composedPath(); + const idx = path.findIndex((node) => node.localName === 'td' || node.localName === 'th'); + const content = path.slice(0, idx); + + // Do not fire item click event if cell content contains focusable elements. + // Use this instead of event.target to detect cases like icon inside button. + // See https://github.com/vaadin/flow-components/issues/4065 + if (content.some((node) => isFocusable(node) || node instanceof HTMLLabelElement)) { + return; + } + + const eventContext = grid.getEventContext(event); + const section = eventContext.section; + + if (eventContext.item && section !== 'details') { + event.itemKey = eventContext.item.key; + // if you have a details-renderer, getEventContext().column is undefined + if (eventContext.column) { + event.internalColumnId = eventContext.column._flowId; + } + grid.dispatchEvent(new CustomEvent(eventName, { detail: event })); + } + } + + grid.cellClassNameGenerator = function (column, rowData) { + const style = rowData.item.style; + if (!style) { + return; + } + return (style.row || '') + ' ' + ((column && style[column._flowId]) || ''); + }; + + grid.cellPartNameGenerator = function (column, rowData) { + const part = rowData.item.part; + if (!part) { + return; + } + return (part.row || '') + ' ' + ((column && part[column._flowId]) || ''); + }; + + grid.dropFilter = (rowData) => rowData.item && !rowData.item.dropDisabled; + + grid.dragFilter = (rowData) => rowData.item && !rowData.item.dragDisabled; + + grid.addEventListener( + 'grid-dragstart', + (e) => { + if (grid._isSelected(e.detail.draggedItems[0])) { + // Dragging selected (possibly multiple) items + if (grid.__selectionDragData) { + Object.keys(grid.__selectionDragData).forEach((type) => { + e.detail.setDragData(type, grid.__selectionDragData[type]); + }); + } else { + (grid.__dragDataTypes || []).forEach((type) => { + e.detail.setDragData(type, e.detail.draggedItems.map((item) => item.dragData[type]).join('\n')); + }); + } + + if (grid.__selectionDraggedItemsCount > 1) { + e.detail.setDraggedItemsCount(grid.__selectionDraggedItemsCount); + } + } else { + // Dragging just one (non-selected) item + (grid.__dragDataTypes || []).forEach((type) => { + e.detail.setDragData(type, e.detail.draggedItems[0].dragData[type]); + }); + } + } + ); + + grid.isItemSelectable = (item) => { + // If there is no selectable data, assume the item is selectable + return item?.selectable === undefined || item.selectable; + }; +}; diff --git a/src/main/frontend/generated/jar-resources/index.d.ts b/src/main/frontend/generated/jar-resources/index.d.ts new file mode 100644 index 0000000..d4e6e0d --- /dev/null +++ b/src/main/frontend/generated/jar-resources/index.d.ts @@ -0,0 +1 @@ +export * from './Flow'; diff --git a/src/main/frontend/generated/jar-resources/index.js b/src/main/frontend/generated/jar-resources/index.js new file mode 100644 index 0000000..6c14827 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/index.js @@ -0,0 +1,2 @@ +export * from './Flow'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/src/main/frontend/generated/jar-resources/index.js.map b/src/main/frontend/generated/jar-resources/index.js.map new file mode 100644 index 0000000..c662ab4 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/main/frontend/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC","sourcesContent":["export * from './Flow';\n"]} \ No newline at end of file diff --git a/src/main/frontend/generated/jar-resources/lit-renderer.ts b/src/main/frontend/generated/jar-resources/lit-renderer.ts new file mode 100644 index 0000000..029ff0a --- /dev/null +++ b/src/main/frontend/generated/jar-resources/lit-renderer.ts @@ -0,0 +1,112 @@ +/* eslint-disable no-restricted-syntax */ +/* eslint-disable max-params */ +import { html, render } from 'lit'; +import { live } from 'lit/directives/live.js'; + +type RenderRoot = HTMLElement & { __litRenderer?: Renderer; _$litPart$?: any }; + +type ItemModel = { item: any; index: number }; + +type Renderer = ((root: RenderRoot, rendererOwner: HTMLElement, model: ItemModel) => void) & { __rendererId?: string }; + +type Component = HTMLElement & { [key: string]: Renderer | undefined }; + +const _window = window as any; +_window.Vaadin = _window.Vaadin || {}; + +/** + * Assigns the component a renderer function which uses Lit to render + * the given template expression inside the render root element. + * + * @param component The host component to which the renderer runction is to be set + * @param rendererName The name of the renderer function + * @param templateExpression The content of the template literal passed to Lit for rendering. + * @param returnChannel A channel to the server. + * Calling it will end up invoking a handler in the server-side LitRenderer. + * @param clientCallables A list of function names that can be called from within the template literal. + * @param propertyNamespace LitRenderer-specific namespace for properties. + * Needed to avoid property name collisions between renderers. + */ +_window.Vaadin.setLitRenderer = ( + component: Component, + rendererName: string, + templateExpression: string, + returnChannel: (name: string, itemKey: string, args: any[]) => void, + clientCallables: string[], + propertyNamespace: string, + appId: string +) => { + const callablesCreator = (itemKey: string) => { + return clientCallables.map((clientCallable) => (...args: any[]) => { + if (itemKey !== undefined) { + returnChannel(clientCallable, itemKey, args[0] instanceof Event ? [] : [...args]); + } + }); + }; + const fnArgs = [ + 'html', + 'root', + 'live', + 'appId', + 'itemKey', + 'model', + 'item', + 'index', + ...clientCallables, + `return html\`${templateExpression}\`` + ]; + const htmlGenerator = new Function(...fnArgs); + const renderFunction = (root: RenderRoot, model: ItemModel, itemKey: string) => { + const { item, index } = model; + render(htmlGenerator(html, root, live, appId, itemKey, model, item, index, ...callablesCreator(itemKey)), root); + }; + + const renderer: Renderer = (root, _, model) => { + const { item } = model; + // Clean up the root element of any existing content + // (and Lit's _$litPart$ property) from other renderers + // TODO: Remove once https://github.com/vaadin/web-components/issues/2235 is done + if (root.__litRenderer !== renderer) { + root.innerHTML = ''; + delete root._$litPart$; + root.__litRenderer = renderer; + } + + // Map a new item that only includes the properties defined by + // this specific LitRenderer instance. The renderer instance specific + // "propertyNamespace" prefix is stripped from the property name at this point: + // + // item: { key: "2", lr_3769df5394a74ef3_lastName: "Tyler"} + // -> + // mappedItem: { lastName: "Tyler" } + const mappedItem: { [key: string]: any } = {}; + for (const key in item) { + if (key.startsWith(propertyNamespace)) { + mappedItem[key.replace(propertyNamespace, '')] = item[key]; + } + } + + renderFunction(root, { ...model, item: mappedItem }, item.key); + }; + + renderer.__rendererId = propertyNamespace; + component[rendererName] = renderer; +}; + +/** + * Removes the renderer function with the given name from the component + * if the propertyNamespace matches the renderer's id. + * + * @param component The host component whose renderer function is to be removed + * @param rendererName The name of the renderer function + * @param rendererId The rendererId of the function to be removed + */ +_window.Vaadin.unsetLitRenderer = (component: Component, rendererName: string, rendererId: string) => { + // The check for __rendererId property is necessary since the renderer function + // may get overridden by another renderer, for example, by one coming from + // vaadin-template-renderer. We don't want LitRenderer registration cleanup to + // unintentionally remove the new renderer. + if (component[rendererName]?.__rendererId === rendererId) { + component[rendererName] = undefined; + } +}; diff --git a/src/main/frontend/generated/jar-resources/menubarConnector.js b/src/main/frontend/generated/jar-resources/menubarConnector.js new file mode 100644 index 0000000..0ce861a --- /dev/null +++ b/src/main/frontend/generated/jar-resources/menubarConnector.js @@ -0,0 +1,122 @@ +/* + * Copyright 2000-2024 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +import './contextMenuConnector.js'; + +/** + * Initializes the connector for a menu bar element. + * + * @param {HTMLElement} menubar + * @param {string} appId + */ +function initLazy(menubar, appId) { + if (menubar.$connector) { + return; + } + + const observer = new MutationObserver((records) => { + const hasChangedAttributes = records.some((entry) => { + const oldValue = entry.oldValue; + const newValue = entry.target.getAttribute(entry.attributeName); + return oldValue !== newValue; + }); + + if (hasChangedAttributes) { + menubar.$connector.generateItems(); + } + }); + + menubar.$connector = { + /** + * Generates and assigns the items to the menu bar. + * + * When the method is called without providing a node id, + * the previously generated items tree will be used. + * That can be useful if you only want to sync the disabled and hidden properties of root items. + * + * @param {number | undefined} nodeId + */ + generateItems(nodeId) { + if (!menubar.shadowRoot) { + // workaround for https://github.com/vaadin/flow/issues/5722 + setTimeout(() => menubar.$connector.generateItems(nodeId)); + return; + } + + if (!menubar._container) { + // Menu-bar defers first buttons render to avoid re-layout + // See https://github.com/vaadin/web-components/issues/7271 + queueMicrotask(() => menubar.$connector.generateItems(nodeId)); + return; + } + + if (nodeId) { + menubar.__generatedItems = window.Vaadin.Flow.contextMenuConnector.generateItemsTree(appId, nodeId); + } + + let items = menubar.__generatedItems || []; + + items.forEach((item) => { + // Propagate disabled state from items to parent buttons + item.disabled = item.component.disabled; + + // Saving item to component because `_item` can be reassigned to a new value + // when the component goes to the overflow menu + item.component._rootItem = item; + }); + + // Observe for hidden and disabled attributes in case they are changed by Flow. + // When a change occurs, the observer will re-generate items on top of the existing tree + // to sync the new attribute values with the corresponding properties in the items array. + items.forEach((item) => { + observer.observe(item.component, { + attributeFilter: ['hidden', 'disabled'], + attributeOldValue: true + }); + }); + + // Remove hidden items entirely from the array. Just hiding them + // could cause the overflow button to be rendered without items. + // + // The items-prop needs to be set even when all items are visible + // to update the disabled state and re-render buttons. + items = items.filter((item) => !item.component.hidden); + + menubar.items = items; + + // Propagate click events from the menu buttons to the item components + menubar._buttons.forEach((button) => { + if (button.item && button.item.component) { + button.addEventListener('click', (e) => { + if (e.composedPath().indexOf(button.item.component) === -1) { + button.item.component.click(); + e.stopPropagation(); + } + }); + } + }); + } + }; +} + +function setClassName(component) { + const item = component._rootItem || component._item; + + if (item) { + item.className = component.className; + } +} + +window.Vaadin.Flow.menubarConnector = { initLazy, setClassName }; diff --git a/src/main/frontend/generated/jar-resources/messageListConnector.js b/src/main/frontend/generated/jar-resources/messageListConnector.js new file mode 100644 index 0000000..260b1af --- /dev/null +++ b/src/main/frontend/generated/jar-resources/messageListConnector.js @@ -0,0 +1,33 @@ +/* + * Copyright 2000-2024 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +window.Vaadin.Flow.messageListConnector = { + setItems(list, items, locale) { + const formatter = new Intl.DateTimeFormat(locale, { + year: 'numeric', + month: 'short', + day: 'numeric', + hour: 'numeric', + minute: 'numeric' + }); + list.items = items.map((item) => + item.time + ? Object.assign(item, { + time: formatter.format(new Date(item.time)) + }) + : item + ); + } +}; diff --git a/src/main/frontend/generated/jar-resources/selectConnector.js b/src/main/frontend/generated/jar-resources/selectConnector.js new file mode 100644 index 0000000..1f40564 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/selectConnector.js @@ -0,0 +1,19 @@ +window.Vaadin.Flow.selectConnector = {} +window.Vaadin.Flow.selectConnector.initLazy = (select) => { + // do not init this connector twice for the given select + if (select.$connector) { + return; + } + + select.$connector = {}; + + select.renderer = (root) => { + const listBox = select.querySelector('vaadin-select-list-box'); + if (listBox) { + if (root.firstChild) { + root.removeChild(root.firstChild); + } + root.appendChild(listBox); + } + }; +} diff --git a/src/main/frontend/generated/jar-resources/theme-util.js b/src/main/frontend/generated/jar-resources/theme-util.js new file mode 100644 index 0000000..31506c1 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/theme-util.js @@ -0,0 +1,175 @@ +import stripCssComments from 'strip-css-comments'; + +// Safari 15 - 16.3, polyfilled +const polyfilledSafari = CSSStyleSheet.toString().includes('document.createElement'); + +const createLinkReferences = (css, target) => { + // Unresolved urls are written as '@import url(text);' or '@import "text";' to the css + // media query can be present on @media tag or on @import directive after url + // Note that with Vite production build there is no space between @import and "text" + // [0] is the full match + // [1] matches the media query + // [2] matches the url + // [3] matches the quote char surrounding in '@import "..."' + // [4] matches the url in '@import "..."' + // [5] matches media query on @import statement + const importMatcher = + /(?:@media\s(.+?))?(?:\s{)?\@import\s*(?:url\(\s*['"]?(.+?)['"]?\s*\)|(["'])((?:\\.|[^\\])*?)\3)([^;]*);(?:})?/g; + + // Only cleanup if comment exist + if (/\/\*(.|[\r\n])*?\*\//gm.exec(css) != null) { + // clean up comments + css = stripCssComments(css); + } + + var match; + var styleCss = css; + + // For each external url import add a link reference + while ((match = importMatcher.exec(css)) !== null) { + styleCss = styleCss.replace(match[0], ''); + const link = document.createElement('link'); + link.rel = 'stylesheet'; + link.href = match[2] || match[4]; + const media = match[1] || match[5]; + if (media) { + link.media = media; + } + // For target document append to head else append to target + if (target === document) { + document.head.appendChild(link); + } else { + target.appendChild(link); + } + } + return styleCss; +}; + +const addAdoptedStyleSafariPolyfill = (sheet, target, first) => { + if (first) { + target.adoptedStyleSheets = [sheet, ...target.adoptedStyleSheets]; + } else { + target.adoptedStyleSheets = [...target.adoptedStyleSheets, sheet]; + } + return () => { + target.adoptedStyleSheets = target.adoptedStyleSheets.filter((ss) => ss !== sheet); + }; +}; + +const addAdoptedStyle = (cssText, target, first) => { + const sheet = new CSSStyleSheet(); + sheet.replaceSync(cssText); + if (polyfilledSafari) { + return addAdoptedStyleSafariPolyfill(sheet, target, first); + } + if (first) { + target.adoptedStyleSheets.splice(0, 0, sheet); + } else { + target.adoptedStyleSheets.push(sheet); + } + return () => { + target.adoptedStyleSheets.splice(target.adoptedStyleSheets.indexOf(sheet), 1); + }; +}; + +const addStyleTag = (cssText, referenceComment) => { + const styleTag = document.createElement('style'); + styleTag.type = 'text/css'; + styleTag.textContent = cssText; + + let beforeThis = undefined; + if (referenceComment) { + const comments = Array.from(document.head.childNodes).filter(elem => elem.nodeType === Node.COMMENT_NODE); + const container = comments.find(comment => comment.data.trim() === referenceComment); + if (container) { + beforeThis = container; + } + } + document.head.insertBefore(styleTag, beforeThis); + return () => { + styleTag.remove(); + }; +}; + +// target: Document | ShadowRoot +export const injectGlobalCss = (css, referenceComment, target, first) => { + if (target === document) { + const hash = getHash(css); + if (window.Vaadin.theme.injectedGlobalCss.indexOf(hash) !== -1) { + return; + } + window.Vaadin.theme.injectedGlobalCss.push(hash); + } + const cssText = createLinkReferences(css, target); + + // We avoid mixing style tags and adoptedStyleSheets to make override order clear + if (target === document) { + return addStyleTag(cssText, referenceComment); + } + + return addAdoptedStyle(cssText, target, first); +}; + +window.Vaadin = window.Vaadin || {}; +window.Vaadin.theme = window.Vaadin.theme || {}; +window.Vaadin.theme.injectedGlobalCss = []; + +const webcomponentGlobalCss = { + css: [], + importers: [] +}; + +export const injectGlobalWebcomponentCss = (css) => { + webcomponentGlobalCss.css.push(css); + webcomponentGlobalCss.importers.forEach(registrar => { + registrar(css); + }); +}; + +export const webcomponentGlobalCssInjector = (registrar) => { + const registeredCss = []; + const wrapper = (css) => { + const hash = getHash(css); + if (!registeredCss.includes(hash)) { + registeredCss.push(hash); + registrar(css); + } + }; + webcomponentGlobalCss.importers.push(wrapper); + webcomponentGlobalCss.css.forEach(wrapper); +}; + +/** + * Calculate a 32 bit FNV-1a hash + * Found here: https://gist.github.com/vaiorabbit/5657561 + * Ref.: http://isthe.com/chongo/tech/comp/fnv/ + * + * @param {string} str the input value + * @returns {string} 32 bit (as 8 byte hex string) + */ +function hashFnv32a(str) { + /*jshint bitwise:false */ + let i, + l, + hval = 0x811c9dc5; + + for (i = 0, l = str.length; i < l; i++) { + hval ^= str.charCodeAt(i); + hval += (hval << 1) + (hval << 4) + (hval << 7) + (hval << 8) + (hval << 24); + } + + // Convert to 8 digit hex string + return ('0000000' + (hval >>> 0).toString(16)).substr(-8); +} + +/** + * Calculate a 64 bit hash for the given input. + * Double hash is used to significantly lower the collision probability. + * + * @param {string} input value to get hash for + * @returns {string} 64 bit (as 16 byte hex string) + */ +function getHash(input) { + let h1 = hashFnv32a(input); // returns 32 bit (as 8 byte hex string) + return h1 + hashFnv32a(h1 + input); +} diff --git a/src/main/frontend/generated/jar-resources/tooltip.ts b/src/main/frontend/generated/jar-resources/tooltip.ts new file mode 100644 index 0000000..351527c --- /dev/null +++ b/src/main/frontend/generated/jar-resources/tooltip.ts @@ -0,0 +1,23 @@ +import { Tooltip } from '@vaadin/tooltip/src/vaadin-tooltip.js'; + +const _window = window as any; +_window.Vaadin ||= {}; +_window.Vaadin.Flow ||= {}; +_window.Vaadin.Flow.tooltip ||= {}; + +Object.assign(_window.Vaadin.Flow.tooltip, { + setDefaultHideDelay: (hideDelay: number) => Tooltip.setDefaultHideDelay(hideDelay), + setDefaultFocusDelay: (focusDelay: number) => Tooltip.setDefaultFocusDelay(focusDelay), + setDefaultHoverDelay: (hoverDelay: number) => Tooltip.setDefaultHoverDelay(hoverDelay) +}); + +const { defaultHideDelay, defaultFocusDelay, defaultHoverDelay } = _window.Vaadin.Flow.tooltip; +if (defaultHideDelay) { + Tooltip.setDefaultHideDelay(defaultHideDelay); +} +if (defaultFocusDelay) { + Tooltip.setDefaultFocusDelay(defaultFocusDelay); +} +if (defaultHoverDelay) { + Tooltip.setDefaultHoverDelay(defaultHoverDelay); +} diff --git a/src/main/frontend/generated/jar-resources/vaadin-big-decimal-field.js b/src/main/frontend/generated/jar-resources/vaadin-big-decimal-field.js new file mode 100644 index 0000000..54d93eb --- /dev/null +++ b/src/main/frontend/generated/jar-resources/vaadin-big-decimal-field.js @@ -0,0 +1,69 @@ +/* + * Copyright 2000-2024 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +let memoizedTemplate; + +customElements.whenDefined('vaadin-text-field').then(() => { + class BigDecimalFieldElement extends customElements.get('vaadin-text-field') { + static get template() { + if (!memoizedTemplate) { + memoizedTemplate = super.template.cloneNode(true); + memoizedTemplate.innerHTML += ``; + } + return memoizedTemplate; + } + + static get is() { + return 'vaadin-big-decimal-field'; + } + + static get properties() { + return { + _decimalSeparator: { + type: String, + value: '.', + observer: '__decimalSeparatorChanged' + } + }; + } + + ready() { + super.ready(); + this.inputElement.setAttribute('inputmode', 'decimal'); + } + + __decimalSeparatorChanged(separator, oldSeparator) { + this.allowedCharPattern = '[-+\\d' + separator + ']'; + + if (this.value && oldSeparator) { + this.value = this.value.split(oldSeparator).join(separator); + } + } + } + + customElements.define(BigDecimalFieldElement.is, BigDecimalFieldElement); +}); diff --git a/src/main/frontend/generated/jar-resources/vaadin-dev-tools/License.d.ts b/src/main/frontend/generated/jar-resources/vaadin-dev-tools/License.d.ts new file mode 100644 index 0000000..ffcbc11 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/vaadin-dev-tools/License.d.ts @@ -0,0 +1,16 @@ +import { ServerMessage } from "./vaadin-dev-tools"; +export interface Product { + name: string; + version: string; +} +export interface ProductAndMessage { + message: string; + messageHtml?: string; + product: Product; +} +export declare const findAll: (element: Element | ShadowRoot | Document, tags: string[]) => Element[]; +export declare const licenseCheckOk: (data: Product) => void; +export declare const licenseCheckFailed: (data: ProductAndMessage) => void; +export declare const licenseCheckNoKey: (data: ProductAndMessage) => void; +export declare const handleLicenseMessage: (message: ServerMessage) => boolean; +export declare const licenseInit: () => void; diff --git a/src/main/frontend/generated/jar-resources/vaadin-dev-tools/connection.d.ts b/src/main/frontend/generated/jar-resources/vaadin-dev-tools/connection.d.ts new file mode 100644 index 0000000..805a724 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/vaadin-dev-tools/connection.d.ts @@ -0,0 +1,15 @@ +export declare enum ConnectionStatus { + ACTIVE = "active", + INACTIVE = "inactive", + UNAVAILABLE = "unavailable", + ERROR = "error" +} +export declare abstract class Connection { + static HEARTBEAT_INTERVAL: number; + status: ConnectionStatus; + onHandshake(): void; + onConnectionError(_: string): void; + onStatusChange(_: ConnectionStatus): void; + setActive(yes: boolean): void; + setStatus(status: ConnectionStatus): void; +} diff --git a/src/main/frontend/generated/jar-resources/vaadin-dev-tools/live-reload-connection.d.ts b/src/main/frontend/generated/jar-resources/vaadin-dev-tools/live-reload-connection.d.ts new file mode 100644 index 0000000..426e8a7 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/vaadin-dev-tools/live-reload-connection.d.ts @@ -0,0 +1,8 @@ +import { Connection } from './connection.js'; +export declare class LiveReloadConnection extends Connection { + webSocket?: WebSocket; + constructor(url: string); + onReload(_strategy: string): void; + handleMessage(msg: any): void; + handleError(msg: any): void; +} diff --git a/src/main/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.d.ts b/src/main/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.d.ts new file mode 100644 index 0000000..9602896 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.d.ts @@ -0,0 +1,99 @@ +import { LitElement } from 'lit'; +import { Product } from './License'; +import { ConnectionStatus } from './connection'; +/** + * Plugin API for the dev tools window. + */ +export interface DevToolsInterface { + send(command: string, data: any): void; +} +export interface MessageHandler { + handleMessage(message: ServerMessage): boolean; +} +export interface ServerMessage { + /** + * The command + */ + command: string; + /** + * the data for the command + */ + data: any; +} +/** + * To create and register a plugin, use e.g. + * @example + * export class MyTab extends LitElement implements MessageHandler { + * render() { + * return html`
Here I am
`; + * } + * } + * customElements.define('my-tab', MyTab); + * + * const plugin: DevToolsPlugin = { + * init: function (devToolsInterface: DevToolsInterface): void { + * devToolsInterface.addTab('Tab title', 'my-tab') + * } + * }; + * + * (window as any).Vaadin.devToolsPlugins.push(plugin); + */ +export interface DevToolsPlugin { + /** + * Called once to initialize the plugin. + * + * @param devToolsInterface provides methods to interact with the dev tools + */ + init(devToolsInterface: DevToolsInterface): void; +} +export declare enum MessageType { + LOG = "log", + INFORMATION = "information", + WARNING = "warning", + ERROR = "error" +} +type DevToolsConf = { + enable: boolean; + url: string; + backend?: string; + liveReloadPort: number; + token?: string; +}; +export declare class VaadinDevTools extends LitElement { + unhandledMessages: ServerMessage[]; + conf: DevToolsConf; + static get styles(): import("lit").CSSResult[]; + static DISMISSED_NOTIFICATIONS_IN_LOCAL_STORAGE: string; + static ACTIVE_KEY_IN_SESSION_STORAGE: string; + static TRIGGERED_KEY_IN_SESSION_STORAGE: string; + static TRIGGERED_COUNT_KEY_IN_SESSION_STORAGE: string; + static AUTO_DEMOTE_NOTIFICATION_DELAY: number; + static HOTSWAP_AGENT: string; + static JREBEL: string; + static SPRING_BOOT_DEVTOOLS: string; + static BACKEND_DISPLAY_NAME: Record; + static get isActive(): boolean; + frontendStatus: ConnectionStatus; + javaStatus: ConnectionStatus; + private root; + componentPickActive: boolean; + private javaConnection?; + private frontendConnection?; + private nextMessageId; + private transitionDuration; + elementTelemetry(): void; + openWebSocketConnection(): void; + tabHandleMessage(tabElement: HTMLElement, message: ServerMessage): boolean; + handleFrontendMessage(message: ServerMessage): void; + handleHmrMessage(message: ServerMessage): boolean; + getDedicatedWebSocketUrl(): string | undefined; + getSpringBootWebSocketUrl(location: any): string; + connectedCallback(): void; + initPlugin(plugin: DevToolsPlugin): Promise; + format(o: any): string; + checkLicense(productInfo: Product): void; + setActive(yes: boolean): void; + render(): import("lit-html").TemplateResult<1>; + setJavaLiveReloadActive(active: boolean): void; +} +export {}; diff --git a/src/main/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.js b/src/main/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.js new file mode 100644 index 0000000..9887da6 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.js @@ -0,0 +1,486 @@ +import{LitElement as C,css as O,html as N}from"lit";import{property as A,query as L,state as V,customElement as G}from"lit/decorators.js";function u(t,e,o,s){var n=arguments.length,r=n<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,o):s,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(t,e,o,s);else for(var i=t.length-1;i>=0;i--)(c=t[i])&&(r=(n<3?c(r):n>3?c(e,o,r):c(e,o))||r);return n>3&&r&&Object.defineProperty(e,o,r),r}const b=1e3,w=(t,e)=>{const o=Array.from(t.querySelectorAll(e.join(", "))),s=Array.from(t.querySelectorAll("*")).filter(n=>n.shadowRoot).flatMap(n=>w(n.shadowRoot,e));return[...o,...s]};let E=!1;const g=(t,e)=>{E||(window.addEventListener("message",n=>{n.data==="validate-license"&&window.location.reload()},!1),E=!0);const o=t._overlayElement;if(o){if(o.shadowRoot){const n=o.shadowRoot.querySelector("slot:not([name])");if(n&&n.assignedElements().length>0){g(n.assignedElements()[0],e);return}}g(o,e);return}const s=e.messageHtml?e.messageHtml:`${e.message}

Component: ${e.product.name} ${e.product.version}

`.replace(/https:([^ ]*)/g,"https:$1");t.isConnected&&(t.outerHTML=`
${s}
`)},v={},y={},m={},I={},h=t=>`${t.name}_${t.version}`,k=t=>{const{cvdlName:e,version:o}=t.constructor,s={name:e,version:o},n=t.tagName.toLowerCase();v[e]=v[e]??[],v[e].push(n);const r=m[h(s)];r&&setTimeout(()=>g(t,r),b),m[h(s)]||I[h(s)]||y[h(s)]||(y[h(s)]=!0,window.Vaadin.devTools.checkLicense(s))},D=t=>{I[h(t)]=!0,console.debug("License check ok for",t)},R=t=>{const e=t.product.name;m[h(t.product)]=t,console.error("License check failed for",e);const o=v[e];(o==null?void 0:o.length)>0&&w(document,o).forEach(s=>{setTimeout(()=>g(s,m[h(t.product)]),b)})},$=t=>{const e=t.message,o=t.product.name;t.messageHtml=`No license found. Go here to start a trial or retrieve your license.`,m[h(t.product)]=t,console.error("No license found when checking",o);const s=v[o];(s==null?void 0:s.length)>0&&w(document,s).forEach(n=>{setTimeout(()=>g(n,m[h(t.product)]),b)})},M=t=>t.command==="license-check-ok"?(D(t.data),!0):t.command==="license-check-failed"?(R(t.data),!0):t.command==="license-check-nokey"?($(t.data),!0):!1,P=()=>{window.Vaadin.devTools.createdCvdlElements.forEach(t=>{k(t)}),window.Vaadin.devTools.createdCvdlElements={push:t=>{k(t)}}};var a;(function(t){t.ACTIVE="active",t.INACTIVE="inactive",t.UNAVAILABLE="unavailable",t.ERROR="error"})(a||(a={}));class f{constructor(){this.status=a.UNAVAILABLE}onHandshake(){}onConnectionError(e){}onStatusChange(e){}setActive(e){!e&&this.status===a.ACTIVE?this.setStatus(a.INACTIVE):e&&this.status===a.INACTIVE&&this.setStatus(a.ACTIVE)}setStatus(e){this.status!==e&&(this.status=e,this.onStatusChange(e))}}f.HEARTBEAT_INTERVAL=18e4;class B extends f{constructor(e){super(),this.webSocket=new WebSocket(e),this.webSocket.onmessage=o=>this.handleMessage(o),this.webSocket.onerror=o=>this.handleError(o),this.webSocket.onclose=o=>{this.status!==a.ERROR&&this.setStatus(a.UNAVAILABLE),this.webSocket=void 0},setInterval(()=>{this.webSocket&&self.status!==a.ERROR&&this.status!==a.UNAVAILABLE&&this.webSocket.send("")},f.HEARTBEAT_INTERVAL)}onReload(e){}handleMessage(e){let o;try{o=JSON.parse(e.data)}catch(s){this.handleError(`[${s.name}: ${s.message}`);return}if(o.command==="hello")this.setStatus(a.ACTIVE),this.onHandshake();else if(o.command==="reload"){if(this.status===a.ACTIVE){const s=o.strategy||"reload";this.onReload(s)}}else this.handleError(`Unknown message from the livereload server: ${e}`)}handleError(e){console.error(e),this.setStatus(a.ERROR),e instanceof Event&&this.webSocket?this.onConnectionError(`Error in WebSocket connection to ${this.webSocket.url}`):this.onConnectionError(e)}}const x=16384;class _ extends f{constructor(e){if(super(),this.canSend=!1,!e)return;const o={transport:"websocket",fallbackTransport:"websocket",url:e,contentType:"application/json; charset=UTF-8",reconnectInterval:5e3,timeout:-1,maxReconnectOnClose:1e7,trackMessageLength:!0,enableProtocol:!0,handleOnlineOffline:!1,executeCallbackBeforeReconnect:!0,messageDelimiter:"|",onMessage:s=>{const n={data:s.responseBody};this.handleMessage(n)},onError:s=>{this.canSend=!1,this.handleError(s)},onOpen:()=>{this.canSend=!0},onClose:()=>{this.canSend=!1},onClientTimeout:()=>{this.canSend=!1},onReconnect:()=>{this.canSend=!1},onReopen:()=>{this.canSend=!0}};U().then(s=>{this.socket=s.subscribe(o)})}onReload(e){}onUpdate(e,o){}onMessage(e){}handleMessage(e){let o;try{o=JSON.parse(e.data)}catch(s){this.handleError(`[${s.name}: ${s.message}`);return}if(o.command==="hello")this.setStatus(a.ACTIVE),this.onHandshake();else if(o.command==="reload"){if(this.status===a.ACTIVE){const s=o.strategy||"reload";this.onReload(s)}}else o.command==="update"?this.status===a.ACTIVE&&this.onUpdate(o.path,o.content):this.onMessage(o)}handleError(e){console.error(e),this.setStatus(a.ERROR),this.onConnectionError(e)}send(e,o){if(!this.socket||!this.canSend){S(()=>this.socket&&this.canSend,c=>this.send(e,o));return}const s=JSON.stringify({command:e,data:o});let r=s.length+"|"+s;for(;r.length;)this.socket.push(r.substring(0,x)),r=r.substring(x)}}_.HEARTBEAT_INTERVAL=18e4;function S(t,e){const o=t();o?e(o):setTimeout(()=>S(t,e),50)}function U(){return new Promise((t,e)=>{S(()=>{var o;return(o=window==null?void 0:window.vaadinPush)==null?void 0:o.atmosphere},t)})}var d,p;(function(t){t.LOG="log",t.INFORMATION="information",t.WARNING="warning",t.ERROR="error"})(p||(p={}));const T=import.meta.hot?import.meta.hot.hmrClient:void 0;let l=d=class extends C{constructor(){super(...arguments),this.unhandledMessages=[],this.conf={enable:!1,url:"",liveReloadPort:-1},this.frontendStatus=a.UNAVAILABLE,this.javaStatus=a.UNAVAILABLE,this.componentPickActive=!1,this.nextMessageId=1,this.transitionDuration=0}static get styles(){return[O` + :host { + --dev-tools-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, + 'Helvetica Neue', sans-serif; + --dev-tools-font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', + monospace; + + --dev-tools-font-size: 0.8125rem; + --dev-tools-font-size-small: 0.75rem; + + --dev-tools-text-color: rgba(255, 255, 255, 0.8); + --dev-tools-text-color-secondary: rgba(255, 255, 255, 0.65); + --dev-tools-text-color-emphasis: rgba(255, 255, 255, 0.95); + --dev-tools-text-color-active: rgba(255, 255, 255, 1); + + --dev-tools-background-color-inactive: rgba(45, 45, 45, 0.25); + --dev-tools-background-color-active: rgba(45, 45, 45, 0.98); + --dev-tools-background-color-active-blurred: rgba(45, 45, 45, 0.85); + + --dev-tools-border-radius: 0.5rem; + --dev-tools-box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 4px 12px -2px rgba(0, 0, 0, 0.4); + + --dev-tools-blue-hsl: 206, 100%, 70%; + --dev-tools-blue-color: hsl(var(--dev-tools-blue-hsl)); + --dev-tools-green-hsl: 145, 80%, 42%; + --dev-tools-green-color: hsl(var(--dev-tools-green-hsl)); + --dev-tools-grey-hsl: 0, 0%, 50%; + --dev-tools-grey-color: hsl(var(--dev-tools-grey-hsl)); + --dev-tools-yellow-hsl: 38, 98%, 64%; + --dev-tools-yellow-color: hsl(var(--dev-tools-yellow-hsl)); + --dev-tools-red-hsl: 355, 100%, 68%; + --dev-tools-red-color: hsl(var(--dev-tools-red-hsl)); + + /* Needs to be in ms, used in JavaScript as well */ + --dev-tools-transition-duration: 180ms; + + all: initial; + + direction: ltr; + cursor: default; + font: normal 400 var(--dev-tools-font-size) / 1.125rem var(--dev-tools-font-family); + color: var(--dev-tools-text-color); + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + color-scheme: dark; + + position: fixed; + z-index: 20000; + pointer-events: none; + bottom: 0; + right: 0; + width: 100%; + height: 100%; + display: flex; + flex-direction: column-reverse; + align-items: flex-end; + } + + .dev-tools { + pointer-events: auto; + display: flex; + align-items: center; + position: fixed; + z-index: inherit; + right: 0.5rem; + bottom: 0.5rem; + min-width: 1.75rem; + height: 1.75rem; + max-width: 1.75rem; + border-radius: 0.5rem; + padding: 0.375rem; + box-sizing: border-box; + background-color: var(--dev-tools-background-color-inactive); + box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05); + color: var(--dev-tools-text-color); + transition: var(--dev-tools-transition-duration); + white-space: nowrap; + line-height: 1rem; + } + + .dev-tools:hover, + .dev-tools.active { + background-color: var(--dev-tools-background-color-active); + box-shadow: var(--dev-tools-box-shadow); + } + + .dev-tools.active { + max-width: calc(100% - 1rem); + } + + .dev-tools .status-description { + overflow: hidden; + text-overflow: ellipsis; + padding: 0 0.25rem; + } + + .dev-tools.error { + background-color: hsla(var(--dev-tools-red-hsl), 0.15); + animation: bounce 0.5s; + animation-iteration-count: 2; + } + + .window.hidden { + opacity: 0; + transform: scale(0); + position: absolute; + } + + .window.visible { + transform: none; + opacity: 1; + pointer-events: auto; + } + + .window.visible ~ .dev-tools { + opacity: 0; + pointer-events: none; + } + + .window.visible ~ .dev-tools .dev-tools-icon, + .window.visible ~ .dev-tools .status-blip { + transition: none; + opacity: 0; + } + + .window { + border-radius: var(--dev-tools-border-radius); + overflow: auto; + margin: 0.5rem; + min-width: 30rem; + max-width: calc(100% - 1rem); + max-height: calc(100vh - 1rem); + flex-shrink: 1; + background-color: var(--dev-tools-background-color-active); + color: var(--dev-tools-text-color); + transition: var(--dev-tools-transition-duration); + transform-origin: bottom right; + display: flex; + flex-direction: column; + box-shadow: var(--dev-tools-box-shadow); + outline: none; + } + + .window-toolbar { + display: flex; + flex: none; + align-items: center; + padding: 0.375rem; + white-space: nowrap; + order: 1; + background-color: rgba(0, 0, 0, 0.2); + gap: 0.5rem; + } + + .ahreflike { + font-weight: 500; + color: var(--dev-tools-text-color-secondary); + text-decoration: underline; + cursor: pointer; + } + + .ahreflike:hover { + color: var(--dev-tools-text-color-emphasis); + } + + .button { + all: initial; + font-family: inherit; + font-size: var(--dev-tools-font-size-small); + line-height: 1; + white-space: nowrap; + background-color: rgba(0, 0, 0, 0.2); + color: inherit; + font-weight: 600; + padding: 0.25rem 0.375rem; + border-radius: 0.25rem; + } + + .button:focus, + .button:hover { + color: var(--dev-tools-text-color-emphasis); + } + + .message.information { + --dev-tools-notification-color: var(--dev-tools-blue-color); + } + + .message.warning { + --dev-tools-notification-color: var(--dev-tools-yellow-color); + } + + .message.error { + --dev-tools-notification-color: var(--dev-tools-red-color); + } + + .message { + display: flex; + padding: 0.1875rem 0.75rem 0.1875rem 2rem; + background-clip: padding-box; + } + + .message.log { + padding-left: 0.75rem; + } + + .message-content { + margin-right: 0.5rem; + -webkit-user-select: text; + -moz-user-select: text; + user-select: text; + } + + .message-heading { + position: relative; + display: flex; + align-items: center; + margin: 0.125rem 0; + } + + .message.log { + color: var(--dev-tools-text-color-secondary); + } + + .message:not(.log) .message-heading { + font-weight: 500; + } + + .message.has-details .message-heading { + color: var(--dev-tools-text-color-emphasis); + font-weight: 600; + } + + .message-heading::before { + position: absolute; + margin-left: -1.5rem; + display: inline-block; + text-align: center; + font-size: 0.875em; + font-weight: 600; + line-height: calc(1.25em - 2px); + width: 14px; + height: 14px; + box-sizing: border-box; + border: 1px solid transparent; + border-radius: 50%; + } + + .message.information .message-heading::before { + content: 'i'; + border-color: currentColor; + color: var(--dev-tools-notification-color); + } + + .message.warning .message-heading::before, + .message.error .message-heading::before { + content: '!'; + color: var(--dev-tools-background-color-active); + background-color: var(--dev-tools-notification-color); + } + + .features-tray { + padding: 0.75rem; + flex: auto; + overflow: auto; + animation: fade-in var(--dev-tools-transition-duration) ease-in; + user-select: text; + } + + .features-tray p { + margin-top: 0; + color: var(--dev-tools-text-color-secondary); + } + + .features-tray .feature { + display: flex; + align-items: center; + gap: 1rem; + padding-bottom: 0.5em; + } + + .message .message-details { + font-weight: 400; + color: var(--dev-tools-text-color-secondary); + margin: 0.25rem 0; + } + + .message .message-details[hidden] { + display: none; + } + + .message .message-details p { + display: inline; + margin: 0; + margin-right: 0.375em; + word-break: break-word; + } + + .message .persist { + color: var(--dev-tools-text-color-secondary); + white-space: nowrap; + margin: 0.375rem 0; + display: flex; + align-items: center; + position: relative; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + } + + .message .persist::before { + content: ''; + width: 1em; + height: 1em; + border-radius: 0.2em; + margin-right: 0.375em; + background-color: rgba(255, 255, 255, 0.3); + } + + .message .persist:hover::before { + background-color: rgba(255, 255, 255, 0.4); + } + + .message .persist.on::before { + background-color: rgba(255, 255, 255, 0.9); + } + + .message .persist.on::after { + content: ''; + order: -1; + position: absolute; + width: 0.75em; + height: 0.25em; + border: 2px solid var(--dev-tools-background-color-active); + border-width: 0 0 2px 2px; + transform: translate(0.05em, -0.05em) rotate(-45deg) scale(0.8, 0.9); + } + + .message .dismiss-message { + font-weight: 600; + align-self: stretch; + display: flex; + align-items: center; + padding: 0 0.25rem; + margin-left: 0.5rem; + color: var(--dev-tools-text-color-secondary); + } + + .message .dismiss-message:hover { + color: var(--dev-tools-text-color); + } + + .notification-tray { + display: flex; + flex-direction: column-reverse; + align-items: flex-end; + margin: 0.5rem; + flex: none; + } + + .window.hidden + .notification-tray { + margin-bottom: 3rem; + } + + .notification-tray .message { + pointer-events: auto; + background-color: var(--dev-tools-background-color-active); + color: var(--dev-tools-text-color); + max-width: 30rem; + box-sizing: border-box; + border-radius: var(--dev-tools-border-radius); + margin-top: 0.5rem; + transition: var(--dev-tools-transition-duration); + transform-origin: bottom right; + animation: slideIn var(--dev-tools-transition-duration); + box-shadow: var(--dev-tools-box-shadow); + padding-top: 0.25rem; + padding-bottom: 0.25rem; + } + + .notification-tray .message.animate-out { + animation: slideOut forwards var(--dev-tools-transition-duration); + } + + .notification-tray .message .message-details { + max-height: 10em; + overflow: hidden; + } + + .message-tray { + flex: auto; + overflow: auto; + max-height: 20rem; + user-select: text; + } + + .message-tray .message { + animation: fade-in var(--dev-tools-transition-duration) ease-in; + padding-left: 2.25rem; + } + + .message-tray .message.warning { + background-color: hsla(var(--dev-tools-yellow-hsl), 0.09); + } + + .message-tray .message.error { + background-color: hsla(var(--dev-tools-red-hsl), 0.09); + } + + .message-tray .message.error .message-heading { + color: hsl(var(--dev-tools-red-hsl)); + } + + .message-tray .message.warning .message-heading { + color: hsl(var(--dev-tools-yellow-hsl)); + } + + .message-tray .message + .message { + border-top: 1px solid rgba(255, 255, 255, 0.07); + } + + .message-tray .dismiss-message, + .message-tray .persist { + display: none; + } + + @keyframes slideIn { + from { + transform: translateX(100%); + opacity: 0; + } + to { + transform: translateX(0%); + opacity: 1; + } + } + + @keyframes slideOut { + from { + transform: translateX(0%); + opacity: 1; + } + to { + transform: translateX(100%); + opacity: 0; + } + } + + @keyframes fade-in { + 0% { + opacity: 0; + } + } + + @keyframes bounce { + 0% { + transform: scale(0.8); + } + 50% { + transform: scale(1.5); + background-color: hsla(var(--dev-tools-red-hsl), 1); + } + 100% { + transform: scale(1); + } + } + + @supports (backdrop-filter: blur(1px)) { + .dev-tools, + .window, + .notification-tray .message { + backdrop-filter: blur(8px); + } + .dev-tools:hover, + .dev-tools.active, + .window, + .notification-tray .message { + background-color: var(--dev-tools-background-color-active-blurred); + } + } + `]}static get isActive(){const e=window.sessionStorage.getItem(d.ACTIVE_KEY_IN_SESSION_STORAGE);return e===null||e!=="false"}elementTelemetry(){let e={};try{const o=localStorage.getItem("vaadin.statistics.basket");if(!o)return;e=JSON.parse(o)}catch{return}this.frontendConnection&&this.frontendConnection.send("reportTelemetry",{browserData:e})}openWebSocketConnection(){if(this.frontendStatus=a.UNAVAILABLE,this.javaStatus=a.UNAVAILABLE,!this.conf.token){console.error("Dev tools functionality denied for this host."),this.log(p.LOG,"See Vaadin documentation on how to configure devmode.hostsAllowed property.",void 0,"https://vaadin.com/docs/latest/configuration/properties#properties",void 0);return}const e=r=>console.error(r),o=(r="reload")=>{if(r==="refresh"||r==="full-refresh"){const c=window.Vaadin;Object.keys(c.Flow.clients).filter(i=>i!=="TypeScript").map(i=>c.Flow.clients[i]).forEach(i=>{i.sendEventMessage?i.sendEventMessage(1,"ui-refresh",{fullRefresh:r==="full-refresh"}):console.warn("Ignoring ui-refresh event for application ",id)})}else{const c=window.sessionStorage.getItem(d.TRIGGERED_COUNT_KEY_IN_SESSION_STORAGE),i=c?parseInt(c,10)+1:1;window.sessionStorage.setItem(d.TRIGGERED_COUNT_KEY_IN_SESSION_STORAGE,i.toString()),window.sessionStorage.setItem(d.TRIGGERED_KEY_IN_SESSION_STORAGE,"true"),window.location.reload()}},s=(r,c)=>{let i=document.head.querySelector(`style[data-file-path='${r}']`);i?(i.textContent=c,document.dispatchEvent(new CustomEvent("vaadin-theme-updated"))):o()},n=new _(this.getDedicatedWebSocketUrl());n.onHandshake=()=>{d.isActive||n.setActive(!1),this.elementTelemetry()},n.onConnectionError=e,n.onReload=o,n.onUpdate=s,n.onStatusChange=r=>{this.frontendStatus=r},n.onMessage=r=>this.handleFrontendMessage(r),this.frontendConnection=n,this.conf.backend===d.SPRING_BOOT_DEVTOOLS&&(this.javaConnection=new B(this.getSpringBootWebSocketUrl(window.location)),this.javaConnection.onHandshake=()=>{d.isActive||this.javaConnection.setActive(!1)},this.javaConnection.onReload=o,this.javaConnection.onConnectionError=e,this.javaConnection.onStatusChange=r=>{this.javaStatus=r})}tabHandleMessage(e,o){const s=e;return s.handleMessage&&s.handleMessage.call(e,o)}handleFrontendMessage(e){e.command==="featureFlags"||M(e)||this.handleHmrMessage(e)||this.unhandledMessages.push(e)}handleHmrMessage(e){return e.command!=="hmr"?!1:(T&&T.notifyListeners(e.data.event,e.data.eventData),!0)}getDedicatedWebSocketUrl(){function e(s){const n=document.createElement("div");return n.innerHTML=``,n.firstChild.href}if(this.conf.url===void 0)return;const o=e(this.conf.url);if(!o.startsWith("http://")&&!o.startsWith("https://")){console.error("The protocol of the url should be http or https for live reload to work.");return}return`${o}?v-r=push&debug_window&token=${this.conf.token}`}getSpringBootWebSocketUrl(e){const{hostname:o}=e,s=e.protocol==="https:"?"wss":"ws";if(o.endsWith("gitpod.io")){const n=o.replace(/.*?-/,"");return`${s}://${this.conf.liveReloadPort}-${n}`}else return`${s}://${o}:${this.conf.liveReloadPort}`}connectedCallback(){if(super.connectedCallback(),this.conf=window.Vaadin.devToolsConf||this.conf,window.sessionStorage.getItem(d.TRIGGERED_KEY_IN_SESSION_STORAGE)){const n=new Date;`${`0${n.getHours()}`.slice(-2)}${`0${n.getMinutes()}`.slice(-2)}${`0${n.getSeconds()}`.slice(-2)}`,window.sessionStorage.removeItem(d.TRIGGERED_KEY_IN_SESSION_STORAGE)}this.transitionDuration=parseInt(window.getComputedStyle(this).getPropertyValue("--dev-tools-transition-duration"),10);const o=window;o.Vaadin=o.Vaadin||{},o.Vaadin.devTools=Object.assign(this,o.Vaadin.devTools);const s=window.Vaadin;s.devToolsPlugins&&(Array.from(s.devToolsPlugins).forEach(n=>this.initPlugin(n)),s.devToolsPlugins={push:n=>this.initPlugin(n)}),this.openWebSocketConnection(),P()}async initPlugin(e){const o=this;e.init({send:function(s,n){o.frontendConnection.send(s,n)}})}format(e){return e.toString()}checkLicense(e){this.frontendConnection?this.frontendConnection.send("checkLicense",e):R({message:"Internal error: no connection",product:e})}setActive(e){var o,s;(o=this.frontendConnection)==null||o.setActive(e),(s=this.javaConnection)==null||s.setActive(e),window.sessionStorage.setItem(d.ACTIVE_KEY_IN_SESSION_STORAGE,e?"true":"false")}render(){return N` + `}setJavaLiveReloadActive(e){var o;this.javaConnection?this.javaConnection.setActive(e):(o=this.frontendConnection)==null||o.setActive(e)}};l.DISMISSED_NOTIFICATIONS_IN_LOCAL_STORAGE="vaadin.live-reload.dismissedNotifications";l.ACTIVE_KEY_IN_SESSION_STORAGE="vaadin.live-reload.active";l.TRIGGERED_KEY_IN_SESSION_STORAGE="vaadin.live-reload.triggered";l.TRIGGERED_COUNT_KEY_IN_SESSION_STORAGE="vaadin.live-reload.triggeredCount";l.AUTO_DEMOTE_NOTIFICATION_DELAY=5e3;l.HOTSWAP_AGENT="HOTSWAP_AGENT";l.JREBEL="JREBEL";l.SPRING_BOOT_DEVTOOLS="SPRING_BOOT_DEVTOOLS";l.BACKEND_DISPLAY_NAME={HOTSWAP_AGENT:"HotswapAgent",JREBEL:"JRebel",SPRING_BOOT_DEVTOOLS:"Spring Boot Devtools"};u([A({type:String,attribute:!1})],l.prototype,"frontendStatus",void 0);u([A({type:String,attribute:!1})],l.prototype,"javaStatus",void 0);u([L(".window")],l.prototype,"root",void 0);u([V()],l.prototype,"componentPickActive",void 0);l=d=u([G("vaadin-dev-tools")],l); diff --git a/src/main/frontend/generated/jar-resources/vaadin-dev-tools/websocket-connection.d.ts b/src/main/frontend/generated/jar-resources/vaadin-dev-tools/websocket-connection.d.ts new file mode 100644 index 0000000..818b250 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/vaadin-dev-tools/websocket-connection.d.ts @@ -0,0 +1,13 @@ +import { Connection } from './connection'; +export declare class WebSocketConnection extends Connection { + static HEARTBEAT_INTERVAL: number; + socket?: any; + canSend: boolean; + constructor(url: string); + onReload(_strategy: string): void; + onUpdate(_path: string, _content: string): void; + onMessage(_message: any): void; + handleMessage(msg: any): void; + handleError(msg: any): void; + send(command: string, data: any): void; +} diff --git a/src/main/frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js b/src/main/frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js new file mode 100644 index 0000000..c2b821b --- /dev/null +++ b/src/main/frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js @@ -0,0 +1,97 @@ +import '@vaadin/grid/vaadin-grid-column.js'; +import { GridColumn } from '@vaadin/grid/src/vaadin-grid-column.js'; +import { GridSelectionColumnBaseMixin } from '@vaadin/grid/src/vaadin-grid-selection-column-base-mixin.js'; + +export class GridFlowSelectionColumn extends GridSelectionColumnBaseMixin(GridColumn) { + + static get is() { + return 'vaadin-grid-flow-selection-column'; + } + + static get properties() { + return { + /** + * Override property to enable auto-width + */ + autoWidth: { + type: Boolean, + value: true + }, + + /** + * Override property to set custom width + */ + width: { + type: String, + value: '56px' + } + }; + } + + /** + * Override method from `GridSelectionColumnBaseMixin` to add ID to select all + * checkbox + * + * @override + */ + _defaultHeaderRenderer(root, _column) { + super._defaultHeaderRenderer(root, _column); + const checkbox = root.firstElementChild; + if (checkbox) { + checkbox.id = 'selectAllCheckbox'; + } + } + + + /** + * Override a method from `GridSelectionColumnBaseMixin` to handle the user + * selecting all items. + * + * @protected + * @override + */ + _selectAll() { + this.selectAll = true; + this.$server.selectAll(); + } + + /** + * Override a method from `GridSelectionColumnBaseMixin` to handle the user + * deselecting all items. + * + * @protected + * @override + */ + _deselectAll() { + this.selectAll = false; + this.$server.deselectAll(); + } + + /** + * Override a method from `GridSelectionColumnBaseMixin` to handle the user + * selecting an item. + * + * @param {Object} item the item to select + * @protected + * @override + */ + _selectItem(item) { + this._grid.$connector.doSelection([item], true); + } + + /** + * Override a method from `GridSelectionColumnBaseMixin` to handle the user + * deselecting an item. + * + * @param {Object} item the item to deselect + * @protected + * @override + */ + _deselectItem(item) { + this._grid.$connector.doDeselection([item], true); + // Optimistically update select all state + this.selectAll = false; + } +} + +customElements.define(GridFlowSelectionColumn.is, GridFlowSelectionColumn); diff --git a/src/main/frontend/generated/jar-resources/vaadin-popover/popover.ts b/src/main/frontend/generated/jar-resources/vaadin-popover/popover.ts new file mode 100644 index 0000000..592fbf0 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/vaadin-popover/popover.ts @@ -0,0 +1,26 @@ +import { Popover } from '@vaadin/popover/src/vaadin-popover.js'; + +const _window = window as any; +_window.Vaadin ||= {}; +_window.Vaadin.Flow ||= {}; +_window.Vaadin.Flow.popover ||= {}; + +Object.assign(_window.Vaadin.Flow.popover, { + setDefaultHideDelay: (hideDelay: number) => Popover.setDefaultHideDelay(hideDelay), + setDefaultFocusDelay: (focusDelay: number) => Popover.setDefaultFocusDelay(focusDelay), + setDefaultHoverDelay: (hoverDelay: number) => Popover.setDefaultHoverDelay(hoverDelay) +}); + +const { defaultHideDelay, defaultFocusDelay, defaultHoverDelay } = _window.Vaadin.Flow.popover; + +if (defaultHideDelay) { + Popover.setDefaultHideDelay(defaultHideDelay); +} + +if (defaultFocusDelay) { + Popover.setDefaultFocusDelay(defaultFocusDelay); +} + +if (defaultHoverDelay) { + Popover.setDefaultHoverDelay(defaultHoverDelay); +} diff --git a/src/main/frontend/generated/jar-resources/vaadin-time-picker/helpers.js b/src/main/frontend/generated/jar-resources/vaadin-time-picker/helpers.js new file mode 100644 index 0000000..dd3c328 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/vaadin-time-picker/helpers.js @@ -0,0 +1,183 @@ +// map from unicode eastern arabic number characters to arabic numbers +const EASTERN_ARABIC_DIGIT_MAP = { + '\\u0660': '0', + '\\u0661': '1', + '\\u0662': '2', + '\\u0663': '3', + '\\u0664': '4', + '\\u0665': '5', + '\\u0666': '6', + '\\u0667': '7', + '\\u0668': '8', + '\\u0669': '9' +}; + +/** + * Escapes the given string so it can be safely used in a regexp. + * + * @param {string} string + * @return {string} + */ +function escapeRegExp(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); +} + +/** + * Parses eastern arabic number characters to arabic numbers (0-9) + * + * @param {string} digits + * @return {string} + */ +function parseEasternArabicDigits(digits) { + return digits.replace(/[\u0660-\u0669]/g, function (char) { + const unicode = '\\u0' + char.charCodeAt(0).toString(16); + return EASTERN_ARABIC_DIGIT_MAP[unicode]; + }); +} + +/** + * @param {string} locale + * @param {Date} testTime + * @return {string | null} + */ +function getAmOrPmString(locale, testTime) { + const testTimeString = testTime.toLocaleTimeString(locale); + + // AM/PM string is anything from one letter in eastern arabic to standard two letters, + // to having space in between, dots ... + // cannot disqualify whitespace since some locales use a. m. / p. m. + // TODO when more scripts support is added (than Arabic), need to exclude those numbers too + const amOrPmRegExp = /[^\d\u0660-\u0669]/; + + const matches = + // In most locales, the time ends with AM/PM: + testTimeString.match(new RegExp(`${amOrPmRegExp.source}+$`, 'g')) || + // In some locales, the time starts with AM/PM e.g in Chinese: + testTimeString.match(new RegExp(`^${amOrPmRegExp.source}+`, 'g')); + + return matches && matches[0].trim(); +} + +/** + * @param {string} locale + * @return {string | null} + */ +export function getSeparator(locale) { + let timeString = TEST_PM_TIME.toLocaleTimeString(locale); + + // Since the next regex picks first non-number-whitespace, + // need to discard possible PM from beginning (eg. chinese locale) + const pmString = getPmString(locale); + if (pmString && timeString.startsWith(pmString)) { + timeString = timeString.replace(pmString, ''); + } + + const matches = timeString.match(/[^\u0660-\u0669\s\d]/); + return matches && matches[0]; +} + +/** + * Searches for either an AM or PM token in the given time string + * depending on what is provided in `amOrPmString`. + * + * The search is case and space insensitive. + * + * @example + * `searchAmOrPmToken('1 P M', 'PM')` => `'P M'` + * + * @example + * `searchAmOrPmToken('1 a.m.', 'A. M.')` => `a.m.` + * + * @param {string} timeString + * @param {string} amOrPmString + * @return {string | null} + */ +export function searchAmOrPmToken(timeString, amOrPmString) { + if (!amOrPmString) return null; + + // Create a regexp string for searching for AM/PM without space-sensitivity. + const tokenRegExpString = amOrPmString.split(/\s*/).map(escapeRegExp).join('\\s*'); + + // Create a regexp without case-sensitivity. + const tokenRegExp = new RegExp(tokenRegExpString, 'i'); + + // Match the regexp against the time string. + const tokenMatches = timeString.match(tokenRegExp); + if (tokenMatches) { + return tokenMatches[0]; + } +} + +export const TEST_PM_TIME = new Date('August 19, 1975 23:15:30'); + +export const TEST_AM_TIME = new Date('August 19, 1975 05:15:30'); + +/** + * @param {string} locale + * @return {string} + */ +export function getPmString(locale) { + return getAmOrPmString(locale, TEST_PM_TIME); +} + +/** + * @param {string} locale + * @return {string} + */ +export function getAmString(locale) { + return getAmOrPmString(locale, TEST_AM_TIME); +} + +/** + * @param {string} digits + * @return {number} + */ +export function parseDigitsIntoInteger(digits) { + return parseInt(parseEasternArabicDigits(digits)); +} + +/** + * @param {string} milliseconds + * @return {number} + */ +export function parseMillisecondsIntoInteger(milliseconds) { + milliseconds = parseEasternArabicDigits(milliseconds); + // digits are either .1 .01 or .001 so need to "shift" + if (milliseconds.length === 1) { + milliseconds += '00'; + } else if (milliseconds.length === 2) { + milliseconds += '0'; + } + return parseInt(milliseconds); +} + +/** + * @param {string} timeString + * @param {number} milliseconds + * @param {string} amString + * @param {string} pmString + * @return {string} + */ +export function formatMilliseconds(timeString, milliseconds, amString, pmString) { + // might need to inject milliseconds between seconds and AM/PM + let cleanedTimeString = timeString; + if (timeString.endsWith(amString)) { + cleanedTimeString = timeString.replace(' ' + amString, ''); + } else if (timeString.endsWith(pmString)) { + cleanedTimeString = timeString.replace(' ' + pmString, ''); + } + if (milliseconds) { + let millisecondsString = milliseconds < 10 ? '0' : ''; + millisecondsString += milliseconds < 100 ? '0' : ''; + millisecondsString += milliseconds; + cleanedTimeString += '.' + millisecondsString; + } else { + cleanedTimeString += '.000'; + } + if (timeString.endsWith(amString)) { + cleanedTimeString = cleanedTimeString + ' ' + amString; + } else if (timeString.endsWith(pmString)) { + cleanedTimeString = cleanedTimeString + ' ' + pmString; + } + return cleanedTimeString; +} diff --git a/src/main/frontend/generated/jar-resources/vaadin-time-picker/timepickerConnector.js b/src/main/frontend/generated/jar-resources/vaadin-time-picker/timepickerConnector.js new file mode 100644 index 0000000..ab18fa5 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/vaadin-time-picker/timepickerConnector.js @@ -0,0 +1,185 @@ +import { + TEST_PM_TIME, + formatMilliseconds, + parseMillisecondsIntoInteger, + parseDigitsIntoInteger, + getAmString, + getPmString, + getSeparator, + searchAmOrPmToken +} from './helpers.js'; +import { parseISOTime } from '@vaadin/time-picker/src/vaadin-time-picker-helper.js'; + +// Execute callback when predicate returns true. +// Try again later if predicate returns false. +function when(predicate, callback, timeout = 0) { + if (predicate()) { + callback(); + } else { + setTimeout(() => when(predicate, callback, 200), timeout); + } +} + +function parseISO(text) { + // The default i18n parser of the web component is ISO 8601 compliant. + const timeObject = parseISOTime(text); + + // The web component returns an object with string values + // while the connector expects number values. + return { + hours: parseInt(timeObject.hours || 0), + minutes: parseInt(timeObject.minutes || 0), + seconds: parseInt(timeObject.seconds || 0), + milliseconds: parseInt(timeObject.milliseconds || 0) + } +}; + +window.Vaadin.Flow.timepickerConnector = {}; +window.Vaadin.Flow.timepickerConnector.initLazy = (timepicker) => { + // Check whether the connector was already initialized for the timepicker + if (timepicker.$connector) { + return; + } + + timepicker.$connector = {}; + + timepicker.$connector.setLocale = (locale) => { + // capture previous value if any + let previousValueObject; + if (timepicker.value && timepicker.value !== '') { + previousValueObject = parseISO(timepicker.value); + } + + try { + // Check whether the locale is supported by the browser or not + TEST_PM_TIME.toLocaleTimeString(locale); + } catch (e) { + locale = 'en-US'; + // FIXME should do a callback for server to throw an exception ? + throw new Error( + 'vaadin-time-picker: The locale ' + + locale + + ' is not supported, falling back to default locale setting(en-US).' + ); + } + + // 1. 24 or 12 hour clock, if latter then what are the am/pm strings ? + const pmString = getPmString(locale); + const amString = getAmString(locale); + + // 2. What is the separator ? + const separator = getSeparator(locale); + + const includeSeconds = function () { + return timepicker.step && timepicker.step < 60; + }; + + const includeMilliSeconds = function () { + return timepicker.step && timepicker.step < 1; + }; + + let cachedTimeString; + let cachedTimeObject; + + timepicker.i18n = { + formatTime(timeObject) { + if (!timeObject) return; + + const timeToBeFormatted = new Date(); + timeToBeFormatted.setHours(timeObject.hours); + timeToBeFormatted.setMinutes(timeObject.minutes); + timeToBeFormatted.setSeconds(timeObject.seconds !== undefined ? timeObject.seconds : 0); + + // the web component expects the correct granularity used for the time string, + // thus need to format the time object in correct granularity by passing the format options + let localeTimeString = timeToBeFormatted.toLocaleTimeString(locale, { + hour: 'numeric', + minute: 'numeric', + second: includeSeconds() ? 'numeric' : undefined + }); + + // milliseconds not part of the time format API + if (includeMilliSeconds()) { + localeTimeString = formatMilliseconds(localeTimeString, timeObject.milliseconds, amString, pmString); + } + + return localeTimeString; + }, + + parseTime(timeString) { + if (timeString && timeString === cachedTimeString && cachedTimeObject) { + return cachedTimeObject; + } + + if (!timeString) { + // when nothing is returned, the component shows the invalid state for the input + return; + } + + const amToken = searchAmOrPmToken(timeString, amString); + const pmToken = searchAmOrPmToken(timeString, pmString); + + const numbersOnlyTimeString = timeString + .replace(amToken || '', '') + .replace(pmToken || '', '') + .trim(); + + // A regexp that allows to find the numbers with optional separator and continuing searching after it. + const numbersRegExp = new RegExp('([\\d\\u0660-\\u0669]){1,2}(?:' + separator + ')?', 'g'); + + let hours = numbersRegExp.exec(numbersOnlyTimeString); + if (hours) { + hours = parseDigitsIntoInteger(hours[0].replace(separator, '')); + // handle 12 am -> 0 + // do not do anything if am & pm are not used or if those are the same, + // as with locale bg-BG there is always ч. at the end of the time + if (amToken !== pmToken) { + if (hours === 12 && amToken) { + hours = 0; + } + if (hours !== 12 && pmToken) { + hours += 12; + } + } + const minutes = numbersRegExp.exec(numbersOnlyTimeString); + const seconds = minutes && numbersRegExp.exec(numbersOnlyTimeString); + // detecting milliseconds from input, expects am/pm removed from end, eg. .0 or .00 or .000 + const millisecondRegExp = /[[\.][\d\u0660-\u0669]{1,3}$/; + // reset to end or things can explode + let milliseconds = seconds && includeMilliSeconds() && millisecondRegExp.exec(numbersOnlyTimeString); + // handle case where last numbers are seconds and . is the separator (invalid regexp match) + if (milliseconds && milliseconds['index'] <= seconds['index']) { + milliseconds = undefined; + } + // hours is a number at this point, others are either arrays or null + // the string in [0] from the arrays includes the separator too + cachedTimeObject = hours !== undefined && { + hours: hours, + minutes: minutes ? parseDigitsIntoInteger(minutes[0].replace(separator, '')) : 0, + seconds: seconds ? parseDigitsIntoInteger(seconds[0].replace(separator, '')) : 0, + milliseconds: + minutes && seconds && milliseconds + ? parseMillisecondsIntoInteger(milliseconds[0].replace('.', '')) + : 0 + }; + cachedTimeString = timeString; + return cachedTimeObject; + } + } + }; + + if (previousValueObject) { + when( + () => timepicker.$, + () => { + const newValue = timepicker.i18n.formatTime(previousValueObject); + // FIXME works but uses private API, needs fixes in web component + if (timepicker.inputElement.value !== newValue) { + timepicker.inputElement.value = newValue; + timepicker.$.comboBox.value = newValue; + } + } + ); + } + }; +} diff --git a/src/main/frontend/generated/jar-resources/virtualListConnector.js b/src/main/frontend/generated/jar-resources/virtualListConnector.js new file mode 100644 index 0000000..9089923 --- /dev/null +++ b/src/main/frontend/generated/jar-resources/virtualListConnector.js @@ -0,0 +1,150 @@ +import { Debouncer } from '@polymer/polymer/lib/utils/debounce.js'; +import { timeOut } from '@polymer/polymer/lib/utils/async.js'; + +window.Vaadin.Flow.virtualListConnector = { + initLazy: function (list) { + // Check whether the connector was already initialized for the virtual list + if (list.$connector) { + return; + } + + const extraItemsBuffer = 20; + + let lastRequestedRange = [0, 0]; + + list.$connector = {}; + list.$connector.placeholderItem = { __placeholder: true }; + + const updateRequestedItem = function () { + /* + * TODO virtual list seems to do a small index adjustment after scrolling + * has stopped. This causes a redundant request to be sent to make a + * corresponding minimal change to the buffer. We should avoid these + * requests by making the logic skip doing a request if the available + * buffer is within some tolerance compared to the requested buffer. + */ + const visibleIndexes = [...list.children] + .filter((el) => '__virtualListIndex' in el) + .map((el) => el.__virtualListIndex); + const firstNeededItem = Math.min(...visibleIndexes); + const lastNeededItem = Math.max(...visibleIndexes); + + let first = Math.max(0, firstNeededItem - extraItemsBuffer); + let last = Math.min(lastNeededItem + extraItemsBuffer, list.items.length); + + if (lastRequestedRange[0] != first || lastRequestedRange[1] != last) { + lastRequestedRange = [first, last]; + const count = 1 + last - first; + list.$server.setRequestedRange(first, count); + } + }; + + const scheduleUpdateRequest = function () { + list.__requestDebounce = Debouncer.debounce(list.__requestDebounce, timeOut.after(50), updateRequestedItem); + }; + + requestAnimationFrame(() => updateRequestedItem); + + // Add an observer function that will invoke on virtualList.renderer property + // change and then patches it with a wrapper renderer + list.patchVirtualListRenderer = function () { + if (!list.renderer || list.renderer.__virtualListConnectorPatched) { + // The list either doesn't have a renderer yet or it's already been patched + return; + } + + const originalRenderer = list.renderer; + + const renderer = (root, list, model) => { + root.__virtualListIndex = model.index; + + if (model.item === undefined) { + if (list.$connector.placeholderElement) { + // ComponentRenderer + if (!root.__hasComponentRendererPlaceholder) { + // The root was previously rendered by the ComponentRenderer. Clear and add a placeholder. + root.innerHTML = ''; + delete root._$litPart$; + root.appendChild(list.$connector.placeholderElement.cloneNode(true)); + root.__hasComponentRendererPlaceholder = true; + } + } else { + // LitRenderer + originalRenderer.call(list, root, list, { + ...model, + item: list.$connector.placeholderItem + }); + } + } else { + if (root.__hasComponentRendererPlaceholder) { + // The root was previously populated with a placeholder. Clear it. + root.innerHTML = ''; + root.__hasComponentRendererPlaceholder = false; + } + + originalRenderer.call(list, root, list, model); + } + + /* + * Check if we need to do anything once things have settled down. + * This method is called multiple times in sequence for the same user + * action, but we only want to do the check once. + */ + scheduleUpdateRequest(); + }; + renderer.__virtualListConnectorPatched = true; + renderer.__rendererId = originalRenderer.__rendererId; + + list.renderer = renderer; + }; + + list._createPropertyObserver('renderer', 'patchVirtualListRenderer', true); + list.patchVirtualListRenderer(); + + list.items = []; + + list.$connector.set = function (index, items) { + list.items.splice(index, items.length, ...items); + list.items = [...list.items]; + }; + + list.$connector.clear = function (index, length) { + // How many items, starting from "index", should be set as undefined + const clearCount = Math.min(length, list.items.length - index); + list.$connector.set(index, [...Array(clearCount)]); + }; + + list.$connector.updateData = function (items) { + const updatedItemsMap = items.reduce((map, item) => { + map[item.key] = item; + return map; + }, {}); + + list.items = list.items.map((item) => { + // Items can be undefined if they are outside the viewport + if (!item) { + return item; + } + // Replace existing item with updated item, + // return existing item as fallback if it was not updated + return updatedItemsMap[item.key] || item; + }); + }; + + list.$connector.updateSize = function (newSize) { + const delta = newSize - list.items.length; + if (delta > 0) { + list.items = [...list.items, ...Array(delta)]; + } else if (delta < 0) { + list.items = list.items.slice(0, newSize); + } + }; + + list.$connector.setPlaceholderItem = function (placeholderItem = {}, appId) { + placeholderItem.__placeholder = true; + list.$connector.placeholderItem = placeholderItem; + const nodeId = Object.entries(placeholderItem).find(([key]) => key.endsWith('_nodeid')); + list.$connector.placeholderElement = nodeId ? Vaadin.Flow.clients[appId].getByNodeId(nodeId[1]) : null; + }; + } +}; diff --git a/src/main/frontend/generated/vaadin-featureflags.js b/src/main/frontend/generated/vaadin-featureflags.js new file mode 100644 index 0000000..3215e91 --- /dev/null +++ b/src/main/frontend/generated/vaadin-featureflags.js @@ -0,0 +1,11 @@ +// @ts-nocheck +window.Vaadin = window.Vaadin || {}; +window.Vaadin.featureFlags = window.Vaadin.featureFlags || {}; +window.Vaadin.featureFlags.exampleFeatureFlag = false; +window.Vaadin.featureFlags.collaborationEngineBackend = false; +window.Vaadin.featureFlags.formFillerAddon = false; +window.Vaadin.featureFlags.hillaI18n = false; +window.Vaadin.featureFlags.fullstackSignals = false; +window.Vaadin.featureFlags.copilotExperimentalFeatures = false; +window.Vaadin.featureFlags.dashboardComponent = false; +export {}; \ No newline at end of file diff --git a/src/main/frontend/generated/vaadin.ts b/src/main/frontend/generated/vaadin.ts new file mode 100644 index 0000000..b4f919a --- /dev/null +++ b/src/main/frontend/generated/vaadin.ts @@ -0,0 +1,6 @@ +import './vaadin-featureflags.js'; + +import './index'; + +import './vaadin-react.js'; +import 'Frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.js'; diff --git a/src/main/frontend/index.html b/src/main/frontend/index.html new file mode 100644 index 0000000..d36e593 --- /dev/null +++ b/src/main/frontend/index.html @@ -0,0 +1,23 @@ + + + + + + + + + + + + +
+ + diff --git a/src/main/java/aReminder b/src/main/java/aReminder new file mode 100644 index 0000000..692c9e4 --- /dev/null +++ b/src/main/java/aReminder @@ -0,0 +1 @@ +TODO: Change package \ No newline at end of file diff --git a/src/main/java/ru/vyatsu/qr_access_admin/QrAccessAdminApplication.java b/src/main/java/ru/vyatsu/qr_access_admin/QrAccessAdminApplication.java new file mode 100644 index 0000000..bb21966 --- /dev/null +++ b/src/main/java/ru/vyatsu/qr_access_admin/QrAccessAdminApplication.java @@ -0,0 +1,12 @@ +package ru.vyatsu.qr_access_admin; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class QrAccessAdminApplication { + + public static void main(String[] args) { + SpringApplication.run(QrAccessAdminApplication.class, args); + } +} diff --git a/src/main/java/ru/vyatsu/qr_access_admin/common/MainLayout.java b/src/main/java/ru/vyatsu/qr_access_admin/common/MainLayout.java new file mode 100644 index 0000000..29a95d6 --- /dev/null +++ b/src/main/java/ru/vyatsu/qr_access_admin/common/MainLayout.java @@ -0,0 +1,131 @@ +package ru.vyatsu.qr_access_admin.common; + +import ru.vyatsu.qr_access_admin.common.view.MainView; +import ru.vyatsu.qr_access_admin.door.view.DoorView; +import ru.vyatsu.qr_access_admin.qr.view.QrView; +import ru.vyatsu.qr_access_admin.unit.view.UnitView; +import com.vaadin.flow.component.Component; +import com.vaadin.flow.component.ComponentUtil; +import com.vaadin.flow.component.applayout.AppLayout; +import com.vaadin.flow.component.applayout.DrawerToggle; +import com.vaadin.flow.component.html.H1; +import com.vaadin.flow.component.html.H2; +import com.vaadin.flow.component.icon.VaadinIcon; +import com.vaadin.flow.component.orderedlayout.FlexComponent; +import com.vaadin.flow.component.orderedlayout.HorizontalLayout; +import com.vaadin.flow.component.orderedlayout.VerticalLayout; +import com.vaadin.flow.component.tabs.Tab; +import com.vaadin.flow.component.tabs.Tabs; +import com.vaadin.flow.component.tabs.TabsVariant; +import com.vaadin.flow.router.PageTitle; +import com.vaadin.flow.router.RouterLink; + +import java.util.Optional; + +public class MainLayout extends AppLayout { + private final Tabs menu; + private H2 viewTitle; + + + public MainLayout() { + setPrimarySection(Section.DRAWER); + addToNavbar(true, createHeaderContent()); + menu = createMenu(); + + addToDrawer(createDrawerContent(menu)); + } + + @Override + protected void afterNavigation() { + super.afterNavigation(); + + // Select the tab corresponding to currently shown view + getTabForComponent(getContent()).ifPresent(menu::setSelectedTab); + + // Set the view title in the header + viewTitle.setText(getCurrentPageTitle()); + } + + private Optional getTabForComponent(Component component) { + return menu.getChildren() + .filter(tab -> ComponentUtil.getData(tab, Class.class) + .equals(component.getClass())) + .findFirst().map(Tab.class::cast); + } + + private String getCurrentPageTitle() { + return getContent().getClass().getAnnotation(PageTitle.class).value(); + } + + private Component createHeaderContent() { + HorizontalLayout layout = new HorizontalLayout(); + + layout.setId("header"); + layout.getThemeList().set("dark", true); + layout.setWidthFull(); + layout.setAlignItems(FlexComponent.Alignment.CENTER); + + HorizontalLayout innerLayout = new HorizontalLayout(); + innerLayout.setJustifyContentMode(FlexComponent.JustifyContentMode.BETWEEN); + innerLayout.setAlignItems(FlexComponent.Alignment.CENTER); + innerLayout.setWidth("100%"); + layout.add(new DrawerToggle()); + + viewTitle = new H2(); + innerLayout.add(viewTitle); + + RouterLink homeLink = new RouterLink(MainView.class); + homeLink.add(VaadinIcon.USER.create()); + innerLayout.add(homeLink); + layout.add(innerLayout); + + return layout; + } + + private Component createDrawerContent(Tabs menu) { + VerticalLayout layout = new VerticalLayout(); + + // Configure styling for the drawer + layout.setSizeFull(); + layout.setPadding(false); + layout.setSpacing(false); + layout.getThemeList().set("spacing-s", true); + layout.setAlignItems(FlexComponent.Alignment.STRETCH); + + // Have a drawer header with an application logo + HorizontalLayout logoLayout = new HorizontalLayout(); + logoLayout.setId("logo"); + logoLayout.setAlignItems(FlexComponent.Alignment.CENTER); + logoLayout.add(VaadinIcon.QRCODE.create()); + logoLayout.add(new H1("QR-admin")); + + // Display the logo and the menu in the drawer + layout.add(logoLayout, menu); + return layout; + } + + private Tabs createMenu() { + final Tabs tabs = new Tabs(); + tabs.setOrientation(Tabs.Orientation.VERTICAL); + tabs.addThemeVariants(TabsVariant.LUMO_MINIMAL); + tabs.setId("tabs"); + tabs.add(createMenuItems()); + return tabs; + } + + private Tab[] createMenuItems() { + return new Tab[]{ + createTab("Домашняя страница", MainView.class), + createTab("Устройства", UnitView.class), + createTab("Двери", DoorView.class), + createTab("QR-коды", QrView.class) + }; + } + + private static Tab createTab(String text, Class navigationTarget) { + final Tab tab = new Tab(); + tab.add(new RouterLink(text, navigationTarget)); + ComponentUtil.setData(tab, Class.class, navigationTarget); + return tab; + } +} diff --git a/src/main/java/ru/vyatsu/qr_access_admin/common/config/CustomShellConfigurator.java b/src/main/java/ru/vyatsu/qr_access_admin/common/config/CustomShellConfigurator.java new file mode 100644 index 0000000..3870764 --- /dev/null +++ b/src/main/java/ru/vyatsu/qr_access_admin/common/config/CustomShellConfigurator.java @@ -0,0 +1,9 @@ +package ru.vyatsu.qr_access_admin.common.config; + +import com.vaadin.flow.component.page.AppShellConfigurator; +import com.vaadin.flow.theme.Theme; +import com.vaadin.flow.theme.lumo.Lumo; + +@Theme(themeClass = Lumo.class) +public class CustomShellConfigurator implements AppShellConfigurator { +} diff --git a/src/main/java/ru/vyatsu/qr_access_admin/common/validation/IsAfter.java b/src/main/java/ru/vyatsu/qr_access_admin/common/validation/IsAfter.java new file mode 100644 index 0000000..fa6f14b --- /dev/null +++ b/src/main/java/ru/vyatsu/qr_access_admin/common/validation/IsAfter.java @@ -0,0 +1,20 @@ +package ru.vyatsu.qr_access_admin.common.validation; + +import jakarta.validation.Constraint; +import jakarta.validation.Payload; + +import java.lang.annotation.*; + +@Target(ElementType.FIELD) +@Retention(RetentionPolicy.RUNTIME) +@Constraint(validatedBy = IsAfterValidator.class) +@Documented +public @interface IsAfter { + String message() default "{date.time.is.after.validation}"; + + String dateTime() default "NOW"; + + Class[] groups() default {}; + + Class[] payload() default {}; +} diff --git a/src/main/java/ru/vyatsu/qr_access_admin/common/validation/IsAfterValidator.java b/src/main/java/ru/vyatsu/qr_access_admin/common/validation/IsAfterValidator.java new file mode 100644 index 0000000..f29b05c --- /dev/null +++ b/src/main/java/ru/vyatsu/qr_access_admin/common/validation/IsAfterValidator.java @@ -0,0 +1,27 @@ +package ru.vyatsu.qr_access_admin.common.validation; + +import jakarta.validation.ConstraintValidator; +import jakarta.validation.ConstraintValidatorContext; + +import java.time.LocalDateTime; + +public class IsAfterValidator implements ConstraintValidator { + + private LocalDateTime dateTime; + + @Override + public void initialize(IsAfter constraintAnnotation) { + String sDate = constraintAnnotation.dateTime(); + if (sDate.equals("NOW")) { + dateTime = LocalDateTime.now(); + } else { + dateTime = LocalDateTime.parse(sDate); + } + } + + @Override + public boolean isValid(LocalDateTime value, ConstraintValidatorContext context) { + if (value == null) return true; + return value.isAfter(dateTime); + } +} diff --git a/src/main/java/ru/vyatsu/qr_access_admin/common/view/MainView.java b/src/main/java/ru/vyatsu/qr_access_admin/common/view/MainView.java new file mode 100644 index 0000000..e4c428f --- /dev/null +++ b/src/main/java/ru/vyatsu/qr_access_admin/common/view/MainView.java @@ -0,0 +1,12 @@ +package ru.vyatsu.qr_access_admin.common.view; + +import ru.vyatsu.qr_access_admin.common.MainLayout; +import com.vaadin.flow.component.orderedlayout.VerticalLayout; +import com.vaadin.flow.router.PageTitle; +import com.vaadin.flow.router.Route; + +@Route(value = "", layout = MainLayout.class) +@PageTitle("Start") +public class MainView extends VerticalLayout { + +} diff --git a/src/main/java/ru/vyatsu/qr_access_admin/door/component/DoorEditor.java b/src/main/java/ru/vyatsu/qr_access_admin/door/component/DoorEditor.java new file mode 100644 index 0000000..6936e1a --- /dev/null +++ b/src/main/java/ru/vyatsu/qr_access_admin/door/component/DoorEditor.java @@ -0,0 +1,89 @@ +package ru.vyatsu.qr_access_admin.door.component; + +import ru.vyatsu.qr_access_admin.door.entity.DoorEntity; +import ru.vyatsu.qr_access_admin.unit.model.UnitComboBoxModel; +import ru.vyatsu.qr_access_admin.unit.entity.UnitRepository; +import ru.vyatsu.qr_access_admin.unit.mapper.UnitEntityUnitComboBoxModelMapper; +import com.vaadin.flow.component.Composite; +import com.vaadin.flow.component.Key; +import com.vaadin.flow.component.button.Button; +import com.vaadin.flow.component.button.ButtonVariant; +import com.vaadin.flow.component.combobox.ComboBox; +import com.vaadin.flow.component.icon.VaadinIcon; +import com.vaadin.flow.component.orderedlayout.HorizontalLayout; +import com.vaadin.flow.component.orderedlayout.VerticalLayout; +import com.vaadin.flow.data.binder.BeanValidationBinder; +import com.vaadin.flow.data.binder.Binder; +import lombok.Getter; +import lombok.Setter; + +import java.util.Map; +import java.util.stream.Collectors; + +public class DoorEditor extends Composite { + + private final UnitEntityUnitComboBoxModelMapper unitMapper = new UnitEntityUnitComboBoxModelMapper(); + + public interface SaveListener { + void onSave(DoorEntity door); + } + + public interface DeleteListener { + void onDelete(DoorEntity door); + } + + public interface CancelListener { + void onCancel(); + } + + private volatile DoorEntity currentDoor; + + @Getter + @Setter + private SaveListener saveListener; + @Getter + @Setter + private DeleteListener deleteListener; + @Getter + @Setter + private CancelListener cancelListener; + + private final Binder binder = new BeanValidationBinder<>(DoorEntity.class); + + public void setCurrentDoor(DoorEntity door) { + this.currentDoor = door; + binder.setBean(door); + } + + public DoorEditor(UnitRepository unitRepository) { + ComboBox unitField = new ComboBox<>("Устройство"); + unitField.setRequired(true); + unitField.setPageSize(100); + Map units = unitRepository.findAll() + .stream() + .map(unitMapper::toModel) + .collect(Collectors.toMap(UnitComboBoxModel::clientId, unit -> unit)); + unitField.setItems(units.values()); + unitField.setItemLabelGenerator(UnitComboBoxModel::clientName); + + var save = new Button("Сохранить", VaadinIcon.CHECK.create()); + var cancel = new Button("Отмена"); + var delete = new Button("Удалить", VaadinIcon.TRASH.create()); + + binder.forField(unitField) + .withConverter(UnitComboBoxModel::clientId, units::get, "Invalid value") + .bind("unitId"); + + save.addThemeVariants(ButtonVariant.LUMO_PRIMARY); + save.addClickListener(e -> saveListener.onSave(currentDoor)); + save.addClickShortcut(Key.ENTER); + + delete.addThemeVariants(ButtonVariant.LUMO_ERROR); + delete.addClickListener(e -> deleteListener.onDelete(currentDoor)); + + cancel.addClickListener(e -> cancelListener.onCancel()); + + getContent().add(unitField, new HorizontalLayout(save, cancel, delete)); + } + +} diff --git a/src/main/java/ru/vyatsu/qr_access_admin/door/entity/DoorEntity.java b/src/main/java/ru/vyatsu/qr_access_admin/door/entity/DoorEntity.java new file mode 100644 index 0000000..6b9928c --- /dev/null +++ b/src/main/java/ru/vyatsu/qr_access_admin/door/entity/DoorEntity.java @@ -0,0 +1,19 @@ +package ru.vyatsu.qr_access_admin.door.entity; + +import jakarta.persistence.*; +import lombok.Getter; +import lombok.Setter; + +@Entity +@Table(name = "doors") +@Getter +@Setter +public class DoorEntity { + + @Id + @GeneratedValue(strategy = GenerationType.UUID) + private String id; + + @Column + private String unitId; +} diff --git a/src/main/java/ru/vyatsu/qr_access_admin/door/entity/DoorRepository.java b/src/main/java/ru/vyatsu/qr_access_admin/door/entity/DoorRepository.java new file mode 100644 index 0000000..17dbed9 --- /dev/null +++ b/src/main/java/ru/vyatsu/qr_access_admin/door/entity/DoorRepository.java @@ -0,0 +1,7 @@ +package ru.vyatsu.qr_access_admin.door.entity; + +import org.springframework.data.jpa.repository.JpaRepository; + +public interface DoorRepository extends JpaRepository { + +} diff --git a/src/main/java/ru/vyatsu/qr_access_admin/door/view/DoorView.java b/src/main/java/ru/vyatsu/qr_access_admin/door/view/DoorView.java new file mode 100644 index 0000000..08decbc --- /dev/null +++ b/src/main/java/ru/vyatsu/qr_access_admin/door/view/DoorView.java @@ -0,0 +1,79 @@ +package ru.vyatsu.qr_access_admin.door.view; + +import ru.vyatsu.qr_access_admin.common.MainLayout; +import ru.vyatsu.qr_access_admin.door.component.DoorEditor; +import ru.vyatsu.qr_access_admin.door.entity.DoorEntity; +import ru.vyatsu.qr_access_admin.door.entity.DoorRepository; +import ru.vyatsu.qr_access_admin.unit.entity.UnitRepository; +import com.vaadin.flow.component.button.Button; +import com.vaadin.flow.component.grid.Grid; +import com.vaadin.flow.component.icon.VaadinIcon; +import com.vaadin.flow.component.orderedlayout.HorizontalLayout; +import com.vaadin.flow.component.orderedlayout.VerticalLayout; +import com.vaadin.flow.router.PageTitle; +import com.vaadin.flow.router.Route; + +import java.util.List; + +@Route(value = "doors", layout = MainLayout.class) +@PageTitle("Двери") +public class DoorView extends VerticalLayout { + private final Grid grid; + private final DoorRepository repository; + private final DoorEditor editor; + + public DoorView(DoorRepository repository, UnitRepository unitRepository) { + this.repository = repository; + + var addButton = new Button("Добавить дверь", VaadinIcon.PLUS.create()); + + grid = new Grid<>(DoorEntity.class); + editor = new DoorEditor(unitRepository); + + var actionsLayout = new HorizontalLayout(addButton); + add(actionsLayout, grid, editor); + + this.configureEditor(); + + addButton.addClickListener(e -> editDoor(new DoorEntity())); + + grid.setHeight("200px"); + + grid.asSingleSelect().addValueChangeListener(e -> editDoor(e.getValue())); + + refreshDoorsGrid(); + } + + private void refreshDoorsGrid() { + List entities = repository.findAll(); + + grid.setItems(entities); + } + + private void editDoor(DoorEntity door) { + if (door == null) { + editor.setVisible(false); + } else { + editor.setVisible(true); + editor.setCurrentDoor(door); + } + } + + private void configureEditor() { + editor.setVisible(false); + + editor.setSaveListener(door -> { + repository.save(door); + refreshDoorsGrid(); + editDoor(null); + }); + + editor.setDeleteListener(door -> { + repository.deleteById(door.getId()); + refreshDoorsGrid(); + editDoor(null); + }); + + editor.setCancelListener(() -> editDoor(null)); + } +} diff --git a/src/main/java/ru/vyatsu/qr_access_admin/qr/component/QrEditor.java b/src/main/java/ru/vyatsu/qr_access_admin/qr/component/QrEditor.java new file mode 100644 index 0000000..7d9922c --- /dev/null +++ b/src/main/java/ru/vyatsu/qr_access_admin/qr/component/QrEditor.java @@ -0,0 +1,89 @@ +package ru.vyatsu.qr_access_admin.qr.component; + +import com.vaadin.flow.component.Composite; +import com.vaadin.flow.component.Key; +import com.vaadin.flow.component.button.Button; +import com.vaadin.flow.component.button.ButtonVariant; +import com.vaadin.flow.component.combobox.ComboBox; +import com.vaadin.flow.component.datetimepicker.DateTimePicker; +import com.vaadin.flow.component.icon.VaadinIcon; +import com.vaadin.flow.component.orderedlayout.HorizontalLayout; +import com.vaadin.flow.component.orderedlayout.VerticalLayout; +import com.vaadin.flow.data.binder.BeanValidationBinder; +import com.vaadin.flow.data.binder.Binder; +import lombok.Getter; +import lombok.Setter; +import ru.vyatsu.qr_access_admin.door.entity.DoorEntity; +import ru.vyatsu.qr_access_admin.door.entity.DoorRepository; +import ru.vyatsu.qr_access_admin.qr.entity.QrEntity; + +import java.util.Map; +import java.util.stream.Collectors; + +public class QrEditor extends Composite { + + public interface SaveListener { + void onSave(QrEntity qr); + } + + public interface DeleteListener { + void onDelete(QrEntity qr); + } + + public interface CancelListener { + void onCancel(); + } + + private volatile QrEntity currentQr; + + @Getter + @Setter + private SaveListener saveListener; + @Getter + @Setter + private DeleteListener deleteListener; + @Getter + @Setter + private CancelListener cancelListener; + + private final Binder binder = new BeanValidationBinder<>(QrEntity.class); + + public void setCurrentQr(QrEntity qr) { + this.currentQr = qr; + binder.setBean(qr); + } + + public QrEditor(DoorRepository doorRepository) { + ComboBox doorIdField = new ComboBox<>("Идентификатор двери"); + doorIdField.setRequired(true); + doorIdField.setItemLabelGenerator(DoorEntity::getId); + Map doors = doorRepository.findAll() + .stream() + .collect(Collectors.toMap(DoorEntity::getId, e -> e)); + + doorIdField.setItems(doors.values()); + var startDateTime = new DateTimePicker("Начало действия"); + var endDateTime = new DateTimePicker("Актуален до"); + + var save = new Button("Сохранить", VaadinIcon.CHECK.create()); + var cancel = new Button("Отмена"); + var delete = new Button("Удалить", VaadinIcon.TRASH.create()); + + binder.forField(doorIdField) + .withConverter(DoorEntity::getId, doors::get, "Invalid value") + .bind("doorId"); + binder.forField(startDateTime).bind("startDateTime"); + binder.forField(endDateTime).bind("endDateTime"); + + save.addThemeVariants(ButtonVariant.LUMO_PRIMARY); + save.addClickListener(e -> saveListener.onSave(currentQr)); + save.addClickShortcut(Key.ENTER); + + delete.addThemeVariants(ButtonVariant.LUMO_ERROR); + delete.addClickListener(e -> deleteListener.onDelete(currentQr)); + + cancel.addClickListener(e -> cancelListener.onCancel()); + + getContent().add(doorIdField, startDateTime, endDateTime, new HorizontalLayout(save, cancel, delete)); + } +} diff --git a/src/main/java/ru/vyatsu/qr_access_admin/qr/entity/QrEntity.java b/src/main/java/ru/vyatsu/qr_access_admin/qr/entity/QrEntity.java new file mode 100644 index 0000000..713ef92 --- /dev/null +++ b/src/main/java/ru/vyatsu/qr_access_admin/qr/entity/QrEntity.java @@ -0,0 +1,28 @@ +package ru.vyatsu.qr_access_admin.qr.entity; + +import jakarta.persistence.*; +import lombok.Getter; +import lombok.Setter; + +import java.time.LocalDateTime; + +@Entity +@Table(name = "qrs") +@Getter +@Setter +public class QrEntity { + + @Id + @Column + @GeneratedValue(strategy = GenerationType.UUID) + private String keyCode; + + @Column + private String doorId; + + @Column + private LocalDateTime startDateTime; + + @Column + private LocalDateTime endDateTime; +} diff --git a/src/main/java/ru/vyatsu/qr_access_admin/qr/entity/QrRepository.java b/src/main/java/ru/vyatsu/qr_access_admin/qr/entity/QrRepository.java new file mode 100644 index 0000000..836d0cb --- /dev/null +++ b/src/main/java/ru/vyatsu/qr_access_admin/qr/entity/QrRepository.java @@ -0,0 +1,6 @@ +package ru.vyatsu.qr_access_admin.qr.entity; + +import org.springframework.data.jpa.repository.JpaRepository; + +public interface QrRepository extends JpaRepository { +} diff --git a/src/main/java/ru/vyatsu/qr_access_admin/qr/view/QrView.java b/src/main/java/ru/vyatsu/qr_access_admin/qr/view/QrView.java new file mode 100644 index 0000000..aac4133 --- /dev/null +++ b/src/main/java/ru/vyatsu/qr_access_admin/qr/view/QrView.java @@ -0,0 +1,76 @@ +package ru.vyatsu.qr_access_admin.qr.view; + +import com.vaadin.flow.component.button.Button; +import com.vaadin.flow.component.grid.Grid; +import com.vaadin.flow.component.icon.VaadinIcon; +import com.vaadin.flow.component.orderedlayout.HorizontalLayout; +import com.vaadin.flow.component.orderedlayout.VerticalLayout; +import com.vaadin.flow.router.PageTitle; +import com.vaadin.flow.router.Route; +import ru.vyatsu.qr_access_admin.common.MainLayout; +import ru.vyatsu.qr_access_admin.door.entity.DoorRepository; +import ru.vyatsu.qr_access_admin.qr.component.QrEditor; +import ru.vyatsu.qr_access_admin.qr.entity.QrEntity; +import ru.vyatsu.qr_access_admin.qr.entity.QrRepository; + +import java.util.List; + +@Route(value = "qrs", layout = MainLayout.class) +@PageTitle("Коды") +public class QrView extends VerticalLayout { + private final QrRepository repository; + private final Grid grid; + private final QrEditor editor; + + public QrView(QrRepository repository, DoorRepository doorRepository) { + this.repository = repository; + + var addButton = new Button("Добавить код", VaadinIcon.PLUS.create()); + grid = new Grid<>(QrEntity.class); + editor = new QrEditor(doorRepository); + + var actionsLayout = new HorizontalLayout(addButton); + add(actionsLayout, grid, editor); + + this.configureEditor(); + + addButton.addClickListener(e -> editQr(new QrEntity())); + + grid.setHeight("200px"); + grid.asSingleSelect().addValueChangeListener(e -> editQr(e.getValue())); + + refreshQrGrid(); + } + + private void refreshQrGrid() { + List entities = repository.findAll(); + grid.setItems(entities); + } + + private void editQr(QrEntity qr) { + if (qr == null) { + editor.setVisible(false); + } else { + editor.setVisible(true); + editor.setCurrentQr(qr); + } + } + + private void configureEditor() { + editor.setVisible(false); + + editor.setSaveListener(qr -> { + repository.save(qr); + refreshQrGrid(); + editQr(null); + }); + + editor.setDeleteListener(qr -> { + repository.deleteById(qr.getKeyCode()); + refreshQrGrid(); + editQr(null); + }); + + editor.setCancelListener(() -> editQr(null)); + } +} diff --git a/src/main/java/ru/vyatsu/qr_access_admin/unit/component/UnitEditor.java b/src/main/java/ru/vyatsu/qr_access_admin/unit/component/UnitEditor.java new file mode 100644 index 0000000..f85b774 --- /dev/null +++ b/src/main/java/ru/vyatsu/qr_access_admin/unit/component/UnitEditor.java @@ -0,0 +1,80 @@ +package ru.vyatsu.qr_access_admin.unit.component; + +import ru.vyatsu.qr_access_admin.unit.model.UnitModel; +import com.vaadin.flow.component.Composite; +import com.vaadin.flow.component.Key; +import com.vaadin.flow.component.button.Button; +import com.vaadin.flow.component.button.ButtonVariant; +import com.vaadin.flow.component.datetimepicker.DateTimePicker; +import com.vaadin.flow.component.icon.VaadinIcon; +import com.vaadin.flow.component.orderedlayout.HorizontalLayout; +import com.vaadin.flow.component.orderedlayout.VerticalLayout; +import com.vaadin.flow.component.textfield.TextField; +import com.vaadin.flow.data.binder.BeanValidationBinder; +import com.vaadin.flow.data.binder.Binder; +import lombok.Getter; +import lombok.Setter; + +public class UnitEditor extends Composite { + public interface SaveListener { + void onSave(UnitModel unit); + } + + public interface DeleteListener { + void onDelete(UnitModel unit); + } + + public interface CancelListener { + void onCancel(); + } + + private volatile UnitModel currentUnit; + + @Getter + @Setter + private SaveListener saveListener; + @Getter + @Setter + private DeleteListener deleteListener; + @Getter + @Setter + private CancelListener cancelListener; + + private final Binder binder = new BeanValidationBinder<>(UnitModel.class); + + public void setCurrentUnit(UnitModel unit) { + this.currentUnit = unit; + binder.setBean(unit); + } + + public UnitEditor() { + var clientId = new TextField("Идентификатор устройства"); + clientId.setRequired(true); + var clientSecret = new TextField("Секрет устройства"); + clientSecret.setRequired(true); + var clientSecretExpiresAt = new DateTimePicker("Актуален до"); + clientSecretExpiresAt.setRequiredIndicatorVisible(true); + var clientName = new TextField("Человекочитаемое название устройства"); + clientName.setRequired(true); + + var save = new Button("Сохранить", VaadinIcon.CHECK.create()); + var cancel = new Button("Отмена"); + var delete = new Button("Удалить", VaadinIcon.TRASH.create()); + + binder.forField(clientId).bind("clientId"); + binder.forField(clientSecret).bind("clientSecret"); + binder.forField(clientSecretExpiresAt).bind("clientSecretExpiresAt"); + binder.forField(clientName).bind("clientName"); + + save.addThemeVariants(ButtonVariant.LUMO_PRIMARY); + save.addClickListener(e -> saveListener.onSave(currentUnit)); + save.addClickShortcut(Key.ENTER); + + delete.addThemeVariants(ButtonVariant.LUMO_ERROR); + delete.addClickListener(e -> deleteListener.onDelete(currentUnit)); + + cancel.addClickListener(e -> cancelListener.onCancel()); + + getContent().add(clientId, clientSecret, clientSecretExpiresAt, clientName, new HorizontalLayout(save, cancel, delete)); + } +} diff --git a/src/main/java/ru/vyatsu/qr_access_admin/unit/entity/UnitEntity.java b/src/main/java/ru/vyatsu/qr_access_admin/unit/entity/UnitEntity.java new file mode 100644 index 0000000..01c4f55 --- /dev/null +++ b/src/main/java/ru/vyatsu/qr_access_admin/unit/entity/UnitEntity.java @@ -0,0 +1,50 @@ +package ru.vyatsu.qr_access_admin.unit.entity; + +import jakarta.persistence.*; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import org.hibernate.annotations.CreationTimestamp; +import org.hibernate.annotations.JdbcTypeCode; +import org.hibernate.annotations.SourceType; +import org.hibernate.type.SqlTypes; + +import java.time.LocalDateTime; + +@Entity +@Table(name = "oauth2_registered_client") +@Getter +@Setter +@NoArgsConstructor +public class UnitEntity { + @Id + @GeneratedValue(strategy = GenerationType.UUID) + private String id; + @Column + private String clientId; + @Column + @CreationTimestamp(source = SourceType.DB) + private LocalDateTime clientIdIssuedAt; + @Column + private String clientSecret; + @Column + private LocalDateTime clientSecretExpiresAt; + @Column + private String clientName; + @Column + private String clientAuthenticationMethods; + @Column + private String authorizationGrantTypes; + @Column + private String redirectUris; + @Column + private String postLogoutRedirectUris; + @Column + private String scopes; + @Column + @JdbcTypeCode(SqlTypes.JSON) + private String clientSettings; + @Column + @JdbcTypeCode(SqlTypes.JSON) + private String tokenSettings; +} diff --git a/src/main/java/ru/vyatsu/qr_access_admin/unit/entity/UnitRepository.java b/src/main/java/ru/vyatsu/qr_access_admin/unit/entity/UnitRepository.java new file mode 100644 index 0000000..9f539e3 --- /dev/null +++ b/src/main/java/ru/vyatsu/qr_access_admin/unit/entity/UnitRepository.java @@ -0,0 +1,8 @@ +package ru.vyatsu.qr_access_admin.unit.entity; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface UnitRepository extends JpaRepository { +} diff --git a/src/main/java/ru/vyatsu/qr_access_admin/unit/mapper/UnitEntityUnitComboBoxModelMapper.java b/src/main/java/ru/vyatsu/qr_access_admin/unit/mapper/UnitEntityUnitComboBoxModelMapper.java new file mode 100644 index 0000000..efe6e74 --- /dev/null +++ b/src/main/java/ru/vyatsu/qr_access_admin/unit/mapper/UnitEntityUnitComboBoxModelMapper.java @@ -0,0 +1,23 @@ +package ru.vyatsu.qr_access_admin.unit.mapper; + +import ru.vyatsu.qr_access_admin.unit.model.UnitComboBoxModel; +import ru.vyatsu.qr_access_admin.unit.entity.UnitEntity; + +import java.util.Collection; +import java.util.List; + +public class UnitEntityUnitComboBoxModelMapper { + + public UnitComboBoxModel toModel(UnitEntity entity) { + if (entity == null) { + throw new IllegalArgumentException("UnitEntity cannot be null"); + } + return new UnitComboBoxModel(entity.getClientId(), entity.getClientName()); + } + + public List toModels(Collection entities) { + return entities.stream() + .map(this::toModel) + .toList(); + } +} diff --git a/src/main/java/ru/vyatsu/qr_access_admin/unit/mapper/UnitEntityUnitModelMapper.java b/src/main/java/ru/vyatsu/qr_access_admin/unit/mapper/UnitEntityUnitModelMapper.java new file mode 100644 index 0000000..ed6f366 --- /dev/null +++ b/src/main/java/ru/vyatsu/qr_access_admin/unit/mapper/UnitEntityUnitModelMapper.java @@ -0,0 +1,53 @@ +package ru.vyatsu.qr_access_admin.unit.mapper; + +import ru.vyatsu.qr_access_admin.unit.entity.UnitEntity; +import ru.vyatsu.qr_access_admin.unit.model.UnitModel; +import org.springframework.stereotype.Component; + +import java.util.Collection; +import java.util.List; + +@Component +public class UnitEntityUnitModelMapper { + + public static final String DEFAULT_CLIENT_SETTINGS = "{\"@class\":\"java.util.Collections$UnmodifiableMap\",\"settings.client.require-proof-key\":false,\"settings.client.require-authorization-consent\":false}"; + private static final String DEFAULT_TOKEN_SETTINGS = """ + {"@class":"java.util.Collections$UnmodifiableMap","settings.token.reuse-refresh-tokens":true,"settings.token.x509-certificate-bound-access-tokens":false,"settings.token.id-token-signature-algorithm":["org.springframework.security.oauth2.jose.jws.SignatureAlgorithm","RS256"],"settings.token.access-token-time-to-live":["java.time.Duration",31540000.000000000],"settings.token.access-token-format":{"@class":"org.springframework.security.oauth2.server.authorization.settings.OAuth2TokenFormat","value":"self-contained"},"settings.token.refresh-token-time-to-live":["java.time.Duration",3600.000000000],"settings.token.authorization-code-time-to-live":["java.time.Duration",300.000000000],"settings.token.device-code-time-to-live":["java.time.Duration",300.000000000]} + """; + + public UnitEntity mapModelToEntity(UnitModel model) { + UnitEntity entity = new UnitEntity(); + entity.setId(model.getId()); + entity.setClientId(model.getClientId()); + // TODO: Приделать PasswordEncoder когда заедет security + entity.setClientSecret(model.getClientSecret()); + entity.setClientSecretExpiresAt(model.getClientSecretExpiresAt()); + entity.setClientName(model.getClientName()); + entity.setScopes(""); + // TODO: Использовать enum, когда заедет oauth2 + entity.setAuthorizationGrantTypes("client_credentials"); + // TODO: Использовать enum, когда заедет oauth2 + entity.setClientAuthenticationMethods("client_secret_post"); + entity.setClientSettings(DEFAULT_CLIENT_SETTINGS); + entity.setTokenSettings(DEFAULT_TOKEN_SETTINGS); + entity.setRedirectUris(""); + entity.setPostLogoutRedirectUris(""); + return entity; + } + + public UnitModel mapEntityToModel(UnitEntity entity) { + UnitModel unitModel = new UnitModel(); + unitModel.setId(entity.getId()); + unitModel.setClientId(entity.getClientId()); + unitModel.setClientSecret(entity.getClientSecret()); + unitModel.setClientName(entity.getClientName()); + unitModel.setClientSecretExpiresAt(entity.getClientSecretExpiresAt()); + return unitModel; + } + + public List mapEntityToModel(Collection entities) { + return entities.stream() + .map(this::mapEntityToModel) + .toList(); + } +} diff --git a/src/main/java/ru/vyatsu/qr_access_admin/unit/model/UnitComboBoxModel.java b/src/main/java/ru/vyatsu/qr_access_admin/unit/model/UnitComboBoxModel.java new file mode 100644 index 0000000..888bc10 --- /dev/null +++ b/src/main/java/ru/vyatsu/qr_access_admin/unit/model/UnitComboBoxModel.java @@ -0,0 +1,4 @@ +package ru.vyatsu.qr_access_admin.unit.model; + +public record UnitComboBoxModel(String clientId, String clientName) { +} diff --git a/src/main/java/ru/vyatsu/qr_access_admin/unit/model/UnitModel.java b/src/main/java/ru/vyatsu/qr_access_admin/unit/model/UnitModel.java new file mode 100644 index 0000000..30c7f7b --- /dev/null +++ b/src/main/java/ru/vyatsu/qr_access_admin/unit/model/UnitModel.java @@ -0,0 +1,29 @@ +package ru.vyatsu.qr_access_admin.unit.model; + +import ru.vyatsu.qr_access_admin.common.validation.IsAfter; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Size; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.time.LocalDateTime; + +@NoArgsConstructor +@Getter +@Setter +public class UnitModel { + + private String id; + @NotBlank + @Size(max = 100) + private String clientId; + @Size(max = 255) + @NotBlank + private String clientSecret; + @IsAfter + private LocalDateTime clientSecretExpiresAt; + @NotBlank + @Size(max = 255) + private String clientName; +} diff --git a/src/main/java/ru/vyatsu/qr_access_admin/unit/view/UnitView.java b/src/main/java/ru/vyatsu/qr_access_admin/unit/view/UnitView.java new file mode 100644 index 0000000..da0fdd2 --- /dev/null +++ b/src/main/java/ru/vyatsu/qr_access_admin/unit/view/UnitView.java @@ -0,0 +1,82 @@ +package ru.vyatsu.qr_access_admin.unit.view; + +import com.vaadin.flow.component.button.Button; +import com.vaadin.flow.component.grid.Grid; +import com.vaadin.flow.component.icon.VaadinIcon; +import com.vaadin.flow.component.orderedlayout.HorizontalLayout; +import com.vaadin.flow.component.orderedlayout.VerticalLayout; +import com.vaadin.flow.router.PageTitle; +import com.vaadin.flow.router.Route; +import ru.vyatsu.qr_access_admin.common.MainLayout; +import ru.vyatsu.qr_access_admin.unit.component.UnitEditor; +import ru.vyatsu.qr_access_admin.unit.entity.UnitEntity; +import ru.vyatsu.qr_access_admin.unit.entity.UnitRepository; +import ru.vyatsu.qr_access_admin.unit.mapper.UnitEntityUnitModelMapper; +import ru.vyatsu.qr_access_admin.unit.model.UnitModel; + +import java.util.List; + +@Route(value = "units", layout = MainLayout.class) +@PageTitle("Устройства") +public class UnitView extends VerticalLayout { + + private final UnitRepository unitRepository; + private final Grid grid; + private final UnitEditor editor; + private final UnitEntityUnitModelMapper entityModelMapper; + + public UnitView(UnitRepository unitRepository, UnitEntityUnitModelMapper entityModelMapper) { + this.unitRepository = unitRepository; + this.entityModelMapper = entityModelMapper; + + var addButton = new Button("Добавить устройство", VaadinIcon.PLUS.create()); + grid = new Grid<>(UnitModel.class); + editor = new UnitEditor(); + + var actionsLayout = new HorizontalLayout(addButton); + add(actionsLayout, grid, editor); + + this.configureEditor(); + + addButton.addClickListener(e -> editUnit(new UnitModel())); + + grid.setHeight("200px"); + grid.asSingleSelect().addValueChangeListener(e -> editUnit(e.getValue())); + + refreshUnitsGrid(); + } + + private void refreshUnitsGrid() { + List entities = unitRepository.findAll(); + + grid.setItems(entityModelMapper.mapEntityToModel(entities)); + } + + private void editUnit(UnitModel unit) { + if (unit == null) { + editor.setVisible(false); + } else { + editor.setVisible(true); + editor.setCurrentUnit(unit); + } + } + + private void configureEditor() { + editor.setVisible(false); + + editor.setSaveListener(unit -> { + UnitEntity entity = entityModelMapper.mapModelToEntity(unit); + unitRepository.save(entity); + refreshUnitsGrid(); + editUnit(null); + }); + + editor.setDeleteListener(unit -> { + unitRepository.deleteById(unit.getId()); + refreshUnitsGrid(); + editUnit(null); + }); + + editor.setCancelListener(() -> editUnit(null)); + } +} diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml new file mode 100644 index 0000000..2e2c7d8 --- /dev/null +++ b/src/main/resources/application.yaml @@ -0,0 +1,14 @@ +server: + port: 8082 +spring: + application: + name: qr-access-admin + datasource: + url: jdbc:postgresql://localhost:5432/qr_access + username: qr_access_user + password: 123 + security: + oauth2: + resourceserver: + jwt: + jwk-set-uri: http://localhost:8081/oauth2/jwks \ No newline at end of file diff --git a/src/main/resources/static/favicon.ico b/src/main/resources/static/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..d3bc643dc1180f2649685b3eabbcf0890bd33be0 GIT binary patch literal 3740 zcmV;N4rB3&P)Y92&Q;G_J3&ItV z3a&6D7!*Q5z{NNM98p17Aq-@YXti6y<~uJ0RwOW17ySvCv50C z97+Q`V3?9S)Se7|8S}3<)Mw%sm6rTz+Hn8^4maY0_IpN*2YOtukLz*IB5<^s6M8PF z?wvQOdtx|d5`eLP#D(~*CG-c^bGlFcdP@9;k`nAcS^M*b zI?}wy2+TdI8D&Z-rP3PlSqfzjv^a+sRaA>-56`1c&C8UPN-57xG60BGQWKiK9)eef zdT3d=&WBSzYf<(!0#s^(Qr*v_akfI!tf*@lxLdGCL{c;wH%apEs;j_vwYQAP6!4hTRcLXm9wh_3F&M;;SxP41E7t^d5)?dieU z;tx3>0SN+1v*y$G#1A#wgaU`_wKv;)_rP_EDrPPqGAll&W5o8qGcp(GdU>~YwmC)x zWRram5O|*3(+9Z2_8C8X#EwRbDxPm-$ww*K)A2jy2mmHADGLIy+8y_!V?`FwCnzAY z(vSM|##;uPT>Xc}jL86OsQ!1~E3SMwAu}KDxUdJm*L~-v;6>*H0G#-)UlviWT#f4GdoquHJ6W{j+piID;QABX^0YHH8A1tDVPAM&$RtrEE%6{%p z5`=Ln`VPD&96Nmv;{gS5fCDTOpU#6H2n7H}xOBp_S_N>*^$X`vW`PjT?swkUHy#qF zfr8{*3{?u!@ljItzVcckD5$8aa!VrsB$1&DX0cES2n9jwp4W;kaBBGg;XyztNHrL{ zXlc%uj^n;{5U>GwOP28FR!}XGF9oJlsoqWwX!}0VZQHY~agcu$6g=UGq3mV24w#yc zQr@xSf)DC(;F%ZdpLt>A-z6jfuctTKaKe~dS9pn2K>`vSTqR4zXv&~psjj^Tz=tbX zoR2;dd^E@H+V`8H$ek2&Fe>KYNh;;(#t-+zj$HryetcL$b{=?dYJW_HgM}4- z6cnULs*kZq$wwSN>UvQCplreS*V~3M=AN+Ue%k$Uy$u`O>DaNe@~^MYN8of&fPgz# zxzB*)_9nOx&;1Vo3sx{#*2Bh<0ia*DIPoPwSnSB5oTW_%37gxtNM~SUkb;lkhxWgj z_#T)u<+M8-fr?2rwq0 z$AgzcbJEq-MM#noDesMT?s~KQ^Rx5|&P&x;DW%?hr@yVU_A6f+2o)kk;PBuH_SvJ~)F zk7v90bZy;Qm@7+w!-nm9w4_D4d|?cDU-ZKb_jv=+@Qm~HKl*a+Mydb>B~@XWB#@nc zq=4fz-Mm8U9f%06WBtQU{fQhesGx*$r3-*3oIpX51s|nUZ}0I{ci6}30p-H&i*~i% zzSe2=S*%ik1Oyy764F6Y%K3EgN+X?u8gV#WM0?+T=t+0qdn3aSS>N#Kin~P1r^#C- zJp`0g#n8zad?ZF$vPc{XT&h^CansX*ov#BfMnt$ST=)2~mQ`!)Q(cLtNkgrYAD-|e zq<|nqkuh6&W01kcJ@bD(WKnfQSr;(M~x>0)Z!tw{# zSg_925`$KH?R8amtaJziV57(Qn>Bnp^b(EoR6R?-&-b zN~*5Dx^~48qBrU?~z2S#}5ObV1; zJjzk}jq5^7Z-5}oG^!Ubn7aBOguxO9mc4R<1pWWIt$*js?r8pE|3`ffJ!SRBNZxr+ z*7*y)K)pGlZ0aq^WtC$|4&XvNJaoZR_JbjMB&gp$10u#&Eh zQ-oxnaB?&@W7-VAiM|Gq_YWUgb{o7{(i03Al(@OLw8aC_P$ zzhrdV^O{;4)@*>6(lTARws23bUT1&!VHx+6W{yU-d?aL!S-yhZ-P5}IKDVPiQ?0_| zv3SRt2i*3PM3LMkrEK}QaI>t4kAWJnd+&YRJ>CGg$P{0@aNX9Hw&i!BXF$tINg4QL z48zjEV1`AF_+1+Z4(?ByaU_KYudC_U(RMLgrYl1OQl3yJ5p7`NB)NB${(d>QQC?ArKfdQZjVWE!w+ct0ePi!SOrqBgt1CoJIlsH6u)SMC0R|+~;@XX|ZWw!|vX@=h$uE(>-EoDd(kp`Dj#= z9VdTx>pywF*gX#AHN3gE;jjKSe)zCPwWN`F-h2c)f3St`|1Ad}hdLVvM}1q%vODyi zXwrd{FCUxmvema4^XKQ;Pu8%aRgBa)giQ zwpcTU4cj{Jb5#%D9jq*&hVKO>MkF|K!#&}J^ZW`}#2Jtip)Z_2dF8Ey`g=1?5LSNM z%9<-KmyG)Llttu|NF2mvU#Yld8M1yc)Ki%9t-mSx<16}dTK`u34G$ zoNE#_=t9Sjj|Y!TD4X`k`anfF$f&v!v8<{`?=>r`@~UqU0CZe8KoKTmwUsj-TgQTd z5x>&vf7uwCRc8x3uR@9f)VOcxA^z1;Hhk5<&v!O*dEG=n*e3OBURox zj%|x{ChU{jsZKi_Q=6$RZESkFdg|4b(X)8FlVqR(fh*it`;RNwwmv7&5(^V?h)Rj( z{>$n+FP&I1Tbx6L6zqYcwSiZwBX1C@{jBlxZ=b9oJ9gDAu5Ktd93kMHJ6r%T1|uS5(o*{7B^B zK8uMx`;-_QC_{TQ3JFIsPij%2d4k5cHQ;D{LbHX&rS|_k#+7ZbfPF~Iz;{QD5#V7_ZcRQa&5SaUU0 z6pege?^(&}t^&yh-EtZt;P807Pu3xxxC@_6nJqZ03i5M`)RonIDA?W>j6X94l==em+}w-<$rcwE@9u7|FD`t2e0)4SJiNTTf`WqF-Q5EM0t!MH1_uY<9sT|L z_xSkOVrA&7{Ia~P?8^6{p&|6;&FLvc9^?E?Q&m+}9Sw69z6Kt9zz=oLgT6!c8wJy4 z*+bTgzk7Rpw63G9%VUSDC{M!k@YTwxoe6NESJ+@fxJ;I+__U$B&81_uq-L}-opGsQ9)W!&hHc^J)}@_a+^VNQHnkcd^esRvF{^pkdJqdv(4Hvu z16BZ6E$-bz`406@4t0C%RyfRr4<9{$<8@6jpVQV?1F-HRx5jR30cLw*O*eeliRr;% z7@j(U=pucSlOTik!WZi+E4h1*1F@7WPk49|y{ZB2edIJc*fDz?`ZzZh*5~8Z^ZduD zIC-+bH@jj7eDC<*nKUVS$~QscMOBJ+2ric-wu|=@WoYg*o!#&ElTKAd))HR{6RY5C z1vU6=N2gDcrB{ZnX-M!gwsl&ywzVzJ&rk13Ix-SUcz zKH5!*t?@X~;d;r>Z;RwNrs$~qUZS7Da?UQ_WUOHooAaE)8J%GBKsPw;%8+SnFc07q zDRcDH%vt48LxVaW>F&qa7`>~rvq>>%bI0=S=Fr#T;^Nd)Dj8Y9FYP=E8bCd{XIoMN zrda69OKOHr)`+q~f$XfTteL#Ip4(elHWaUP3{9bEt*iqxAT9be>Z-CY`2G$tFfSuu zlh0RyIM(X{*45?nD>=|$VSV2_vMF@uzNz8|X!co5h_BE)e4kleWhn~$_3PIUJmLrS zcyu@8A2Vh+_Yy;OHnW*0R^n&NE*lyeIvgWA6OvV~VgBi^re(sLc&)57!fdNj7Z+zJ z&shr@kD#FV&?VZsV^7Kjo4B={?+EAx`KyPdCUYfTs~Dvv*bv!ITI7WdP9Q_M?Iyxr z_PU*(90jzEvQ;OvMOl4d156$bDD;Y~% zJm1O6$OM>Pmj3gvOh%s)v4ksff&o56e)`HSj4+I|2w2WE+NkYb07wO7QG7Q*?+9V0 ze)YIfxsgL=UXbp`fC;_;U1!V3(g^j{%j z&ZYWyM@NV`0X-+fHg1!FsEX7hb#M~;tNN_NM z`1>k9Vi0f~NjOipz_KCx<53y*6Wjsf-706gvzF`@3E)8W%|RiS7i7_w|I0;^D7~Y$K zMV}Y}awnrSvJ~IzI6pB;f}=cNvf(#Z43xhQ(mYCvP>&0Ry{F5L{t9{ZrMbB|Y$s;C zBxd)ZKr8_c^BT|)9LsBlmkIg`Ra;bSbKl;b?o8?Iwm7wmkuF)8en4$+|9*u}Razqt zqIm*_9+8b0$wV4FC^L%VUi*R0NAxF>Iggb2B@p&|tM*#gbL$(&tcRYTpBEBRs)CJ} z>Mb%Ox8~aHBoE*HV&T>E@D>+6OMmqzpJ6}#pe!#U%6TX~>PbGj9V(Q~PCeNESDF;Z*85ydB6l@rY?#^a7(fm7)q*jhy27;0Rs^`Wrwej1l~ z0f4@-bKbB=9c#2%5bcD{Q+NNfR^o0SZGYv2WEMT{)1KHc zHjnE5mUI@1Os3TsFM-jPP)TkPz9I|5ms&YJ70rX8(H^r;?+*_TcXx?QF`>iF)m6dQ z&riwW+UR;a5=__AuO(43LPlNxqeN_pLtI;nvJ|FKiP6t!x##bgm>9$dJ|CYP+ox@( z$HxZi6g(LBOp9psc}^{4i$x3{gIGHW+a*LrNh5$olgxyi8+--Ikb;;U?5 zX8#i%Wo?z;W$LVTeeW?<7v^BX6{dk=%&1Z)BFUI5qv-AnhVuyaYwhuk8H?|VZXA^A zl%@JGq89OXDh8Y|l1cKep)VZGQIuj};cg&??sZGCdTtBOT68;lZK=>>eeHiA!8CCnI-{+Dk@5? zNh(ROIfS z+gn&zfbmD$4DBFey2pwB=xSoqY94H56&N5N7SR|S_jBQnXxl6{3U>JgP6a^5RlTRn z8HTW}vwHP;&C6F}z-aZl?g;0(HODj=WHzhqh63KeWa(yy$k+XmP8v}-U7lP6f{RJF z)`VqwY6H6cP9)N=!pG~WLMX`E?AyA6_n&PqS}V>q%L)^c(9%YvZ8oSPVyJ2$-*NQr zhtMz-+ymEWXfxxNq?t5a{5df}fe>7x(N1J3W@0odBq?!K&F`8RVJ#61nAfrVnR-IDbU+c@Bb5ISMtJHESV; znH<`)W6xdBx@3@A#c%jXsPh{csfrYI#R^>dkTt z-c~LwVT()#uE`F>Fcc;fcustHSt{r@ZvBD zGNY)Pw}6#uZSnEpC^BhLl}FcIf1fMaO{bJi1>UdP3Yr(5?VofWzCdr163aM2qJXB4 zp-e!-zn@HbCF{jV$9-(mbG#C%PP^(rva{)a=vIo+IQ2W+`Y zcfnDy4y_gQ^dW=ST9z0URK66d)bbH!@d0X`p)uj_JLgoP*0)rOT8I~nj{7}c2pWwp z;hi!AH_;$RVIRETYH5)iW9Z7a7CdI>BUKC|g{4!tW}3R$`&^qTh_GOS*%tNJ%+)4ULj3EWtq@5^?aHOo0@Wfy86-vJsV&BmI+i_3Hu05X zc^1d)Rbsj#{6PT$ugYLE9u>P~F~HXO72F8hWvkCg5R9;<$js~D?*9H-FK{j4-_iMJ z#gDOy=x1_hhIF6T1N8gF5QjFJ z@#A!2nk3=o2~3J^$)y!cLRRD;1*1fj$Mz{8|G_$o3KfVJCbOFKjD2QR@WHX^c@guz zAM$!PUsqSxY8o`e+AXf4oZU$ET;og#g5Dikf8bH0r})@>gM-D9$Ss3c8%p%Z@6ED( z(?;KqyzpvPd=nRX8na}|!gvUm_LaG&zlOqsh-6z~plWD>J8+8DyiP<@ACW>UzQx{Y zp=k6evSZmWYZ>sAbDUrT zDgQ|0X$f{@oOXobFpH~@`uU>0i?5g0nJ^6D()HL|7Q9es{(>nAXg0Azu`k6}?pO5I zPy+aS;%kM`L?yy}+(zEUtfann@HdQC+s^q|dB0k}ek5-*&*b^V+uS zn||#{U`D4+uJ>KZn7B; zHTBxhXCou9wyfYrjuDBQtE;Qa+gJs8bLZ&-_>&-T-js;>Gc!`W=e{QqY(@XciuTd@ z%qtEr#+n4B635-#@Q-!$a?-YwoY2bc`K6xj$^mMpZBb-D(zl;liivRNVT0EO5yK>i?c zAV=92R=|%F##`P(OZF-&UF$urEy0X`@r;HIzl(ZL>1}}B*VSe*J_8qnQ_~mWd{t)U zxI#gc6TePqJbjfz|M8l^n=vvPI`%#&xxMh=Ta#9!SG#PVUTqJ5RMn|5fq*QpLvhg7 zG|1=*MVpLD{o|gV@IX?@9L>rGlZ1BP5}sB*S;vm^aAZ^wGHr22TtH$O2~e~w6(sW|k~Ul4vEw$M4E-*obB7Pbk@2A5HgIRKWILJg4=HdH3y!2F63uzs435e|W=y zxQCN^Mpes)=&K;aTDwswu1m!PtYGrJ4=iW;3-V%@>yO9NDP!MMQ1*4}DCx8QuE#hF zG3>!g^V1_(!ObfyJ~Tvj>-y%~jZ&f}U^hCJAwsJ27caAsu0flqloAOWPu_dBN5RY5 z47h6!rxe@D_P=H&&Fjilt*iAKmGL3FDZ8a(gcmy*HNkJnT&)MOi|lL-z@JTn5h>3g z2<0M|%H2$qq@(I=Cyf=O8r<&P>MzD6wbOJ|5O{y1yk>!%5`qBW#kK2<1nR{#{!33h zL;I_2qm!_1K%dRqzLrKFWC%b)Tj+;BX*cYg5J!Kj@em4TSWQC)TT_ofa-=?{T4J0leEZJfN*in+FqT$P*6cs{q#EjWMpr1&Q8}AkCFqj zd?I=&p&3hJ%fdyWtEIE>C(T}xyuAFS9F3d(+3GLSYj+Z6ja%bi$ZD1)U~~9lkA`O$ z9S8as!AzwvOrU-Ey-;P2LyR}XjbTH^*e}eA9gRA7~SQZ;TF`L;IPh_NekiErN&Vs9pD*nf!?UBjeOQuZB#_s)Lis#6* zU6#a6eg~0AOu3J~e4X=s3r||L_p}0Zz>dw!aGE61JsS4msV-b#hai39TKZK?*NJ1r z>zm~r-lop@#0PJ|*Bc&WL+KZSrKtS5|7QKQO$QarJc{`R?!{pGr*qfJL%`%kE& zcv7KJx9F%WhQcbQxF(eDP>PIJon|O1?yd4v_J2V z)>Uc{+($yEhdiwPO~4{-Ec-xT-;(DKIz%fBWiP=*pZawRFl1H!qlyv#%m*}KJ<`*e zXzO?~sy^^&xhidGeqrHOzd-|=%8fz*4}&6h@(Y41Czx|TA19Xy5((Y2eV>+hn|_p< z{{H0T$G1B$j4%&h8K8EnH%x`PD*hm8@livB^10#Zzoh+2>n@S@l6orP*wnm#HCXKJ zC9W%lG!qsZoSDm^Us8^!{?@Asw7Ia4F z2P2Z7LE_e0nOB+b$ufP3*43&KW9XO5oyLy+{{^7=3P{bQ`XZ0eebk(UR?iR)CY)DY z|4^M%-)EmWs|e_5oRAmW;<+`-PPvLU%{7Ct9*{~V?-qvH3N9ASwtYzm|IHrze1+)Z z%T{1*)F8zQ|IAKpjkfviM3;J6+#2i~GH;D@4~zDiGnm0));{Xw@c)~}3*@zOZ(U|^ z4i6n3LnDE@nUcxiWlLZM8I zZ9h+1KZz3{65{i6jeGdJH|=3ZtdWN@+pYZ^nF*maq4D^Zv?Lt3U3$k}Y5$i>QyX4- z`@gmzBxw-fyBHuBIYH0Ba73gO^0PElN=ga`y|IC(jKj>PejyV7;B~pX8jZW=KNQQ{ z{btv`+jK7er{#RN_MZI40~0)XL(+Dou5Z$yre=g63agch9*TK>W}CRbd-o3OSC&rk zp)Y5($zx#)d;<&!l+Y)9rlXq#a=X3&T24nM{6R1w zI6}|MMy9Q`HH-S~Tjs25)eQ!`GxVnJ)8irIOXC91vf2M@Hqu&vv?%MNfRKDzdiq)M z`IiFrnWt}|QZcU8(x9}Ab`)Mq`r18OKj?H!C9Wg0>qd!D1Asv_4+(xOxBE`hkP!{{ zX`cTL2wPz49?vUz8cK$|-^@SQ^~qsJj{JH3l*LjrDJW$$i`ft=B$IRn% zDm-KMaMc6FP4=Z7pdY7UJ;ecv5yDtmLJ~b8YcyTouF4Aw%*sXGOF|-@@bL%VFh0-E z4Rz%>z&llq7qwttm1=i>mNf42*Y4< z%#JIL%SSFcHpYSfA}Q$RH|hB)SYM^FSYiF~#oX2d>m_Sibkc<#i!MM!n`AtcI4`7m zRiOmTZmv2xO(B`M8zU{~ZH)i-{kSR5?TykX(&tH2m2YK_MI8Kz&vCO`g2Hu*suE;3 zx+S@#TSQ+=)k6K|u`LhRsIu?FwmWD18hynV@*yZLd+@&7QouQxMtp_5q@$oWtTVu1%ikE zoMC&-Q_G1^P6p8RjY%j%_YO}n3|mQb-hY+`_7jtcUV3Sf8yCd_SdpQF34q^Ys^$hV z`%I273#}YEkoPwi+ZvPBHKwdaPF%VzP5MiyCSn5DZ${4TnGJ-f6R2`k2;qf!^e9m|YpPmVgwZ8OXC8tnUis!og znt-Qa@%Vm@;rB000)bN0yoP@?j|1u7?qp+i<6pUyq6mP}%`j!8We)i%bIJPcQ5mOV z45iDDINN}VL8)V-tUqFi4m-{G`ms>qQSlR*kP>W;ceSn-ne5_mR=$CbYkMksxv7rYt=KmQjVS0P%1i@Yr ziMKb#PI2Do7xl>0n`*@edM4RqB^w1k+PPuZm_VESLkj@aI9*#g1~$V?-9mf75+#6E zr=g21VW>pXM>F{SM6&Oa@`Ad7j+DMKSDOtc%8$X7r+&ZGrt}(kLi5fLmQ|i~Igv+h zd`MloreIN<<QWsWLJNDd(3 z8@aDlabXZ3^1fGJ{<9zP$Kv=R!>aL`QFv*U8Htr<{Kxf&EJC3=I{6yeS*mdc3L9=g z%AAQe!7kb1>K8^mdYaZ_4|8fnROn&&85z^;l@vGml#j+xp81qI!Z5+AbGQN42z>y# zXtI*zHZb|cpCq7JEl;zI?TKvOb75nzj2|AXPRTOvth$fwDTiU8rEddsp!E)wb#8oo zeC>k2Kj5R?Pk_GLbo`qDE=K$=&L=DQ_D4{-ozvB}Sb2fw2@X=FRY+5|W7jMl&Qgef zI{2p6G55_whBaze%x+VDOetjzrEtvDgVCPRJizU$!|x>)Zh0wLKL~r^sjrY7qV5MsOyrQ1mM@!Wn|-BwwT&AnxL_N)Rwv0T6kJ^QWRPIIdEo|tgebl% zKq>+&CYQv)eaV>WS8X?3zloWy1Jx=A*JFfQn$56jSI5130BDQDh=qpjw_B%zgmFfR zc6xst&N1tp2m70kOZlcZ+zT{FnT8sLTCq3{fH=IU6<`z^WZa&kA8je{Y?4VEu3l$U zn`)ZrP*dnHOJ0|VgFN9pYAcrPfa#0_j8qc85M@nq;_^k^7bc~A@}sUa66zdWai~T8 zUSBV~l?|7Wm)}(X(f=e4lHDBQ`mGia(zUh#c)(C6)ZdTitZIwy2F>d`SI+p;|AYpi{R2U`C z7I_|9LYIt>pegJSKP*?K3tyBiP&lra9BX%w<8Q~b8wxHNx#xI310S@BSN=J8b~68+ zhHXe3r?^-Km!b#Gx71fLz>;v*=3saPjoiApx@s~KY9f&m-0(Y#RI7Wuz&y^0+ZM{8 zvQGPOR;AgjcKt;o0t)SLC`c;)=77L)2HBrb6sTU{l9TROh;VRTmJO;T~@KEoq% z9=2hc(ufqI3DwM-c*kd+%=I(#v*LYfh2bpZh_X79gA%iNqiwGsCznMbc#8I;2X{lowIR#eDB~Nac3-ccM*Q6-x32FR5 zim*xZ)?rpij;_gg@lLB{*r=cbMgV=y@h1W9n6xW40>yN$*$AKht=1FFb5cQ84mUNb zatt{x8%9|R<4YG!eV*Dde@yCBYk3>F7|QW%|5iMYZWv4^dOmx4$T<5w6{QY+?SN_7 zz~Wz{{4#*8ohEVkX4uwi)ooIFxWm0n4>yTLF5{Coz39J-CD4xi(V$*-sPFL10~lV9 zMh%8g)@02Qj1hTIw~WJtT3=!i)k0Ovwf7RV^mp9Trcj0F(Oi*XEaq#|YT}P1j18o; zZD3q}@A}f>w}c8#m1)u*8h+5&R!;|+yJYLs+ryPFA)zc0__M~yV`3P~j0gMec>T1< z=+)asjwIle%V)J+>b7mU12dCMwS8-a_}A*lWBCNW| zl0CA|w*QMEJER(|5c`x9vxEZM+sqY=;m5 zd9r{nS>oynb2~(OZKw$&8=~Tc7JHw*X1-m0xof~ z{}&ZXw?0>zGOeccejFFbfdoI!uv~kA3#v+)m64-%-9A%7MeWpS{pSGMjArJ>qj^JYN%z1CPnFDu_IB~iiN?k(r0CSfr@nF1UUQ>V z!OVfJn#`FGc^lsBQ`VUrxOJhucG$sF@BI9lEGjZe5J_FxQ%O{jrPL|>yroZJ54>zb zw$e7A#C^I2UEUxU}0K23t}4!4js}?ss8c*mf)0} z)^K_4CA84%EcQb7b68Bw<5|LIL(H%&X{AMNm)CqCsR`0a2FT5E2*Dz)Gy%G`UIDsAW#Ln<-nOQzRs67k;)lNcCkhR)=n7BQi*x7-c@DOq6 z(Vwde0y{C#%ShmH(Vu@b4?bVyIIzW4rFq-DcD`2Mk&u>dZfy;h!(8;RFNQBJ+w?s^ zCP*dmc`Qr$iA9*H_+wfg&%1SWbzL~hC^$GcE>bY^0S2BZzbj2F#vl&(3X47r1FS6L z!kf%6cN&R(Oi9OK`_Vrj;HO^Xd#ZiRJ)cud@dWH!9{7bPK>PP^m34b11({|S>PRu* tW^d0WH^m?XVUZ`|74yZDUf@z5EhHrITWcR1b7u)lLsdtmQpx7S{{d?ykd6QV literal 0 HcmV?d00001 diff --git a/src/main/resources/static/images/logo.png b/src/main/resources/static/images/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..d3bc643dc1180f2649685b3eabbcf0890bd33be0 GIT binary patch literal 3740 zcmV;N4rB3&P)Y92&Q;G_J3&ItV z3a&6D7!*Q5z{NNM98p17Aq-@YXti6y<~uJ0RwOW17ySvCv50C z97+Q`V3?9S)Se7|8S}3<)Mw%sm6rTz+Hn8^4maY0_IpN*2YOtukLz*IB5<^s6M8PF z?wvQOdtx|d5`eLP#D(~*CG-c^bGlFcdP@9;k`nAcS^M*b zI?}wy2+TdI8D&Z-rP3PlSqfzjv^a+sRaA>-56`1c&C8UPN-57xG60BGQWKiK9)eef zdT3d=&WBSzYf<(!0#s^(Qr*v_akfI!tf*@lxLdGCL{c;wH%apEs;j_vwYQAP6!4hTRcLXm9wh_3F&M;;SxP41E7t^d5)?dieU z;tx3>0SN+1v*y$G#1A#wgaU`_wKv;)_rP_EDrPPqGAll&W5o8qGcp(GdU>~YwmC)x zWRram5O|*3(+9Z2_8C8X#EwRbDxPm-$ww*K)A2jy2mmHADGLIy+8y_!V?`FwCnzAY z(vSM|##;uPT>Xc}jL86OsQ!1~E3SMwAu}KDxUdJm*L~-v;6>*H0G#-)UlviWT#f4GdoquHJ6W{j+piID;QABX^0YHH8A1tDVPAM&$RtrEE%6{%p z5`=Ln`VPD&96Nmv;{gS5fCDTOpU#6H2n7H}xOBp_S_N>*^$X`vW`PjT?swkUHy#qF zfr8{*3{?u!@ljItzVcckD5$8aa!VrsB$1&DX0cES2n9jwp4W;kaBBGg;XyztNHrL{ zXlc%uj^n;{5U>GwOP28FR!}XGF9oJlsoqWwX!}0VZQHY~agcu$6g=UGq3mV24w#yc zQr@xSf)DC(;F%ZdpLt>A-z6jfuctTKaKe~dS9pn2K>`vSTqR4zXv&~psjj^Tz=tbX zoR2;dd^E@H+V`8H$ek2&Fe>KYNh;;(#t-+zj$HryetcL$b{=?dYJW_HgM}4- z6cnULs*kZq$wwSN>UvQCplreS*V~3M=AN+Ue%k$Uy$u`O>DaNe@~^MYN8of&fPgz# zxzB*)_9nOx&;1Vo3sx{#*2Bh<0ia*DIPoPwSnSB5oTW_%37gxtNM~SUkb;lkhxWgj z_#T)u<+M8-fr?2rwq0 z$AgzcbJEq-MM#noDesMT?s~KQ^Rx5|&P&x;DW%?hr@yVU_A6f+2o)kk;PBuH_SvJ~)F zk7v90bZy;Qm@7+w!-nm9w4_D4d|?cDU-ZKb_jv=+@Qm~HKl*a+Mydb>B~@XWB#@nc zq=4fz-Mm8U9f%06WBtQU{fQhesGx*$r3-*3oIpX51s|nUZ}0I{ci6}30p-H&i*~i% zzSe2=S*%ik1Oyy764F6Y%K3EgN+X?u8gV#WM0?+T=t+0qdn3aSS>N#Kin~P1r^#C- zJp`0g#n8zad?ZF$vPc{XT&h^CansX*ov#BfMnt$ST=)2~mQ`!)Q(cLtNkgrYAD-|e zq<|nqkuh6&W01kcJ@bD(WKnfQSr;(M~x>0)Z!tw{# zSg_925`$KH?R8amtaJziV57(Qn>Bnp^b(EoR6R?-&-b zN~*5Dx^~48qBrU?~z2S#}5ObV1; zJjzk}jq5^7Z-5}oG^!Ubn7aBOguxO9mc4R<1pWWIt$*js?r8pE|3`ffJ!SRBNZxr+ z*7*y)K)pGlZ0aq^WtC$|4&XvNJaoZR_JbjMB&gp$10u#&Eh zQ-oxnaB?&@W7-VAiM|Gq_YWUgb{o7{(i03Al(@OLw8aC_P$ zzhrdV^O{;4)@*>6(lTARws23bUT1&!VHx+6W{yU-d?aL!S-yhZ-P5}IKDVPiQ?0_| zv3SRt2i*3PM3LMkrEK}QaI>t4kAWJnd+&YRJ>CGg$P{0@aNX9Hw&i!BXF$tINg4QL z48zjEV1`AF_+1+Z4(?ByaU_KYudC_U(RMLgrYl1OQl3yJ5p7`NB)NB${(d>QQC?ArKfdQZjVWE!w+ct0ePi!SOrqBgt1CoJIlsH6u)SMC0R|+~;@XX|ZWw!|vX@=h$uE(>-EoDd(kp`Dj#= z9VdTx>pywF*gX#AHN3gE;jjKSe)zCPwWN`F-h2c)f3St`|1Ad}hdLVvM}1q%vODyi zXwrd{FCUxmvema4^XKQ;Pu8%aRgBa)giQ zwpcTU4cj{Jb5#%D9jq*&hVKO>MkF|K!#&}J^ZW`}#2Jtip)Z_2dF8Ey`g=1?5LSNM z%9<-KmyG)Llttu|NF2mvU#Yld8M1yc)Ki%9t-mSx<16}dTK`u34G$ zoNE#_=t9Sjj|Y!TD4X`k`anfF$f&v!v8<{`?=>r`@~UqU0CZe8KoKTmwUsj-TgQTd z5x>&vf7uwCRc8x3uR@9f)VOcxA^z1;Hhk5<&v!O*dEG=n*e3OBURox zj%|x{ChU{jsZKi_Q=6$RZESkFdg|4b(X)8FlVqR(fh*it`;RNwwmv7&5(^V?h)Rj( z{>$n+FP&I1Tbx6L6zqYcwSiZwBX1C@{jBlxZ=b9oJ9gDAu5Ktd93kMHJ6r%T1|uS5(o*{7B^B zK8uMx`;-_QC_{TQ3JFIsPij%2d4k5cHQ;D{LbHX&rS|_k#+7Z